boxes-core 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.
@@ -0,0 +1,613 @@
1
+ (function(Ma,s1){typeof exports=="object"&&typeof module<"u"?s1(exports):typeof define=="function"&&define.amd?define(["exports"],s1):(Ma=typeof globalThis<"u"?globalThis:Ma||self,s1(Ma.BoxesCore={}))})(this,function(Ma){"use strict";function s1(r,t){for(var i=0;i<t.length;i++){const a=t[i];if(typeof a!="string"&&!Array.isArray(a)){for(const u in a)if(u!=="default"&&!(u in r)){const c=Object.getOwnPropertyDescriptor(a,u);c&&Object.defineProperty(r,u,c.get?c:{enumerable:!0,get:()=>a[u]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}function tC(r,t){(t==null||t>r.length)&&(t=r.length);for(var i=0,a=Array(t);i<t;i++)a[i]=r[i];return a}function xpe(r){if(Array.isArray(r))return r}function Epe(r){if(Array.isArray(r))return tC(r)}function wd(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function kpe(r,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,S$(a.key),a)}}function _d(r,t,i){return t&&kpe(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function Zo(r,t){var i=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!i){if(Array.isArray(r)||(i=nC(r))||t){i&&(r=i);var a=0,u=function(){};return{s:u,n:function(){return a>=r.length?{done:!0}:{done:!1,value:r[a++]}},e:function(v){throw v},f:u}}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 c,l=!0,h=!1;return{s:function(){i=i.call(r)},n:function(){var v=i.next();return l=v.done,v},e:function(v){h=!0,c=v},f:function(){try{l||i.return==null||i.return()}finally{if(h)throw c}}}}function k$(r,t,i){return(t=S$(t))in r?Object.defineProperty(r,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[t]=i,r}function Spe(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Tpe(r,t){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var a,u,c,l,h=[],v=!0,p=!1;try{if(c=(i=i.call(r)).next,t===0){if(Object(i)!==i)return;v=!1}else for(;!(v=(a=c.call(i)).done)&&(h.push(a.value),h.length!==t);v=!0);}catch(g){p=!0,u=g}finally{try{if(!v&&i.return!=null&&(l=i.return(),Object(l)!==l))return}finally{if(p)throw u}}return h}}function Rpe(){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 Ipe(){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 ja(r,t){return xpe(r)||Tpe(r,t)||nC(r,t)||Rpe()}function Tx(r){return Epe(r)||Spe(r)||nC(r)||Ipe()}function Cpe(r,t){if(typeof r!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var a=i.call(r,t);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function S$(r){var t=Cpe(r,"string");return typeof t=="symbol"?t:t+""}function es(r){"@babel/helpers - typeof";return es=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},es(r)}function nC(r,t){if(r){if(typeof r=="string")return tC(r,t);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?tC(r,t):void 0}}var ts=typeof window>"u"?null:window,T$=ts?ts.navigator:null;ts&&ts.document;var Ape=es(""),R$=es({}),Ppe=es(function(){}),Lpe=typeof HTMLElement>"u"?"undefined":es(HTMLElement),o1=function(t){return t&&t.instanceString&&Ji(t.instanceString)?t.instanceString():null},hn=function(t){return t!=null&&es(t)==Ape},Ji=function(t){return t!=null&&es(t)===Ppe},di=function(t){return!Pu(t)&&(Array.isArray?Array.isArray(t):t!=null&&t instanceof Array)},Sr=function(t){return t!=null&&es(t)===R$&&!di(t)&&t.constructor===Object},Npe=function(t){return t!=null&&es(t)===R$},Ft=function(t){return t!=null&&es(t)===es(1)&&!isNaN(t)},Ope=function(t){return Ft(t)&&Math.floor(t)===t},Rx=function(t){if(Lpe!=="undefined")return t!=null&&t instanceof HTMLElement},Pu=function(t){return u1(t)||I$(t)},u1=function(t){return o1(t)==="collection"&&t._private.single},I$=function(t){return o1(t)==="collection"&&!t._private.single},rC=function(t){return o1(t)==="core"},C$=function(t){return o1(t)==="stylesheet"},Dpe=function(t){return o1(t)==="event"},xd=function(t){return t==null?!0:!!(t===""||t.match(/^\s+$/))},Mpe=function(t){return typeof HTMLElement>"u"?!1:t instanceof HTMLElement},jpe=function(t){return Sr(t)&&Ft(t.x1)&&Ft(t.x2)&&Ft(t.y1)&&Ft(t.y2)},Bpe=function(t){return Npe(t)&&Ji(t.then)},qpe=function(){return T$&&T$.userAgent.match(/msie|trident|edge/i)},ob=function(t,i){i||(i=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var c=[],l=0;l<arguments.length;l++)c.push(arguments[l]);return c.join("$")});var a=function(){var c=this,l=arguments,h,v=i.apply(c,l),p=a.cache;return(h=p[v])||(h=p[v]=t.apply(c,l)),h};return a.cache={},a},iC=ob(function(r){return r.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}),Ix=ob(function(r){return r.replace(/(-\w)/g,function(t){return t[1].toUpperCase()})}),A$=ob(function(r,t){return r+t[0].toUpperCase()+t.substring(1)},function(r,t){return r+"$"+t}),P$=function(t){return xd(t)?t:t.charAt(0).toUpperCase()+t.substring(1)},Ed=function(t,i){return t.slice(-1*i.length)===i},ns="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",Fpe="rgb[a]?\\(("+ns+"[%]?)\\s*,\\s*("+ns+"[%]?)\\s*,\\s*("+ns+"[%]?)(?:\\s*,\\s*("+ns+"))?\\)",$pe="rgb[a]?\\((?:"+ns+"[%]?)\\s*,\\s*(?:"+ns+"[%]?)\\s*,\\s*(?:"+ns+"[%]?)(?:\\s*,\\s*(?:"+ns+"))?\\)",Gpe="hsl[a]?\\(("+ns+")\\s*,\\s*("+ns+"[%])\\s*,\\s*("+ns+"[%])(?:\\s*,\\s*("+ns+"))?\\)",Hpe="hsl[a]?\\((?:"+ns+")\\s*,\\s*(?:"+ns+"[%])\\s*,\\s*(?:"+ns+"[%])(?:\\s*,\\s*(?:"+ns+"))?\\)",zpe="\\#[0-9a-fA-F]{3}",Vpe="\\#[0-9a-fA-F]{6}",L$=function(t,i){return t<i?-1:t>i?1:0},Upe=function(t,i){return-1*L$(t,i)},yn=Object.assign!=null?Object.assign.bind(Object):function(r){for(var t=arguments,i=1;i<t.length;i++){var a=t[i];if(a!=null)for(var u=Object.keys(a),c=0;c<u.length;c++){var l=u[c];r[l]=a[l]}}return r},Ype=function(t){if(!(!(t.length===4||t.length===7)||t[0]!=="#")){var i=t.length===4,a,u,c,l=16;return i?(a=parseInt(t[1]+t[1],l),u=parseInt(t[2]+t[2],l),c=parseInt(t[3]+t[3],l)):(a=parseInt(t[1]+t[2],l),u=parseInt(t[3]+t[4],l),c=parseInt(t[5]+t[6],l)),[a,u,c]}},Wpe=function(t){var i,a,u,c,l,h,v,p;function g(k,I,C){return C<0&&(C+=1),C>1&&(C-=1),C<1/6?k+(I-k)*6*C:C<1/2?I:C<2/3?k+(I-k)*(2/3-C)*6:k}var w=new RegExp("^"+Gpe+"$").exec(t);if(w){if(a=parseInt(w[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,u=parseFloat(w[2]),u<0||u>100||(u=u/100,c=parseFloat(w[3]),c<0||c>100)||(c=c/100,l=w[4],l!==void 0&&(l=parseFloat(l),l<0||l>1)))return;if(u===0)h=v=p=Math.round(c*255);else{var _=c<.5?c*(1+u):c+u-c*u,E=2*c-_;h=Math.round(255*g(E,_,a+1/3)),v=Math.round(255*g(E,_,a)),p=Math.round(255*g(E,_,a-1/3))}i=[h,v,p,l]}return i},Kpe=function(t){var i,a=new RegExp("^"+Fpe+"$").exec(t);if(a){i=[];for(var u=[],c=1;c<=3;c++){var l=a[c];if(l[l.length-1]==="%"&&(u[c]=!0),l=parseFloat(l),u[c]&&(l=l/100*255),l<0||l>255)return;i.push(Math.floor(l))}var h=u[1]||u[2]||u[3],v=u[1]&&u[2]&&u[3];if(h&&!v)return;var p=a[4];if(p!==void 0){if(p=parseFloat(p),p<0||p>1)return;i.push(p)}}return i},Xpe=function(t){return Jpe[t.toLowerCase()]},N$=function(t){return(di(t)?t:null)||Xpe(t)||Ype(t)||Kpe(t)||Wpe(t)},Jpe={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]},O$=function(t){for(var i=t.map,a=t.keys,u=a.length,c=0;c<u;c++){var l=a[c];if(Sr(l))throw Error("Tried to set map with object key");c<a.length-1?(i[l]==null&&(i[l]={}),i=i[l]):i[l]=t.value}},D$=function(t){for(var i=t.map,a=t.keys,u=a.length,c=0;c<u;c++){var l=a[c];if(Sr(l))throw Error("Tried to get map with object key");if(i=i[l],i==null)return i}return i},Cx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function c1(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var aC,M$;function l1(){if(M$)return aC;M$=1;function r(t){var i=typeof t;return t!=null&&(i=="object"||i=="function")}return aC=r,aC}var sC,j$;function Qpe(){if(j$)return sC;j$=1;var r=typeof Cx=="object"&&Cx&&Cx.Object===Object&&Cx;return sC=r,sC}var oC,B$;function Ax(){if(B$)return oC;B$=1;var r=Qpe(),t=typeof self=="object"&&self&&self.Object===Object&&self,i=r||t||Function("return this")();return oC=i,oC}var uC,q$;function Zpe(){if(q$)return uC;q$=1;var r=Ax(),t=function(){return r.Date.now()};return uC=t,uC}var cC,F$;function ege(){if(F$)return cC;F$=1;var r=/\s/;function t(i){for(var a=i.length;a--&&r.test(i.charAt(a)););return a}return cC=t,cC}var lC,$$;function tge(){if($$)return lC;$$=1;var r=ege(),t=/^\s+/;function i(a){return a&&a.slice(0,r(a)+1).replace(t,"")}return lC=i,lC}var fC,G$;function hC(){if(G$)return fC;G$=1;var r=Ax(),t=r.Symbol;return fC=t,fC}var dC,H$;function nge(){if(H$)return dC;H$=1;var r=hC(),t=Object.prototype,i=t.hasOwnProperty,a=t.toString,u=r?r.toStringTag:void 0;function c(l){var h=i.call(l,u),v=l[u];try{l[u]=void 0;var p=!0}catch{}var g=a.call(l);return p&&(h?l[u]=v:delete l[u]),g}return dC=c,dC}var vC,z$;function rge(){if(z$)return vC;z$=1;var r=Object.prototype,t=r.toString;function i(a){return t.call(a)}return vC=i,vC}var pC,V$;function U$(){if(V$)return pC;V$=1;var r=hC(),t=nge(),i=rge(),a="[object Null]",u="[object Undefined]",c=r?r.toStringTag:void 0;function l(h){return h==null?h===void 0?u:a:c&&c in Object(h)?t(h):i(h)}return pC=l,pC}var gC,Y$;function ige(){if(Y$)return gC;Y$=1;function r(t){return t!=null&&typeof t=="object"}return gC=r,gC}var bC,W$;function f1(){if(W$)return bC;W$=1;var r=U$(),t=ige(),i="[object Symbol]";function a(u){return typeof u=="symbol"||t(u)&&r(u)==i}return bC=a,bC}var yC,K$;function age(){if(K$)return yC;K$=1;var r=tge(),t=l1(),i=f1(),a=NaN,u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,l=/^0o[0-7]+$/i,h=parseInt;function v(p){if(typeof p=="number")return p;if(i(p))return a;if(t(p)){var g=typeof p.valueOf=="function"?p.valueOf():p;p=t(g)?g+"":g}if(typeof p!="string")return p===0?p:+p;p=r(p);var w=c.test(p);return w||l.test(p)?h(p.slice(2),w?2:8):u.test(p)?a:+p}return yC=v,yC}var mC,X$;function sge(){if(X$)return mC;X$=1;var r=l1(),t=Zpe(),i=age(),a="Expected a function",u=Math.max,c=Math.min;function l(h,v,p){var g,w,_,E,k,I,C=0,P=!1,A=!1,L=!0;if(typeof h!="function")throw new TypeError(a);v=i(v)||0,r(p)&&(P=!!p.leading,A="maxWait"in p,_=A?u(i(p.maxWait)||0,v):_,L="trailing"in p?!!p.trailing:L);function O(G){var X=g,ne=w;return g=w=void 0,C=G,E=h.apply(ne,X),E}function M(G){return C=G,k=setTimeout(q,v),P?O(G):E}function B(G){var X=G-I,ne=G-C,ae=v-X;return A?c(ae,_-ne):ae}function F(G){var X=G-I,ne=G-C;return I===void 0||X>=v||X<0||A&&ne>=_}function q(){var G=t();if(F(G))return $(G);k=setTimeout(q,B(G))}function $(G){return k=void 0,L&&g?O(G):(g=w=void 0,E)}function Y(){k!==void 0&&clearTimeout(k),C=0,g=I=w=k=void 0}function V(){return k===void 0?E:$(t())}function U(){var G=t(),X=F(G);if(g=arguments,w=this,I=G,X){if(k===void 0)return M(I);if(A)return clearTimeout(k),k=setTimeout(q,v),O(I)}return k===void 0&&(k=setTimeout(q,v)),E}return U.cancel=Y,U.flush=V,U}return mC=l,mC}var oge=sge(),h1=c1(oge),wC=ts?ts.performance:null,J$=wC&&wC.now?function(){return wC.now()}:function(){return Date.now()},uge=function(){if(ts){if(ts.requestAnimationFrame)return function(r){ts.requestAnimationFrame(r)};if(ts.mozRequestAnimationFrame)return function(r){ts.mozRequestAnimationFrame(r)};if(ts.webkitRequestAnimationFrame)return function(r){ts.webkitRequestAnimationFrame(r)};if(ts.msRequestAnimationFrame)return function(r){ts.msRequestAnimationFrame(r)}}return function(r){r&&setTimeout(function(){r(J$())},1e3/60)}}(),Px=function(t){return uge(t)},ih=J$,ip=9261,Q$=65599,ub=5381,Z$=function(t){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ip,a=i,u;u=t.next(),!u.done;)a=a*Q$+u.value|0;return a},d1=function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ip;return i*Q$+t|0},v1=function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ub;return(i<<5)+i+t|0},cge=function(t,i){return t*2097152+i},kd=function(t){return t[0]*2097152+t[1]},Lx=function(t,i){return[d1(t[0],i[0]),v1(t[1],i[1])]},e8=function(t,i){var a={value:0,done:!1},u=0,c=t.length,l={next:function(){return u<c?a.value=t[u++]:a.done=!0,a}};return Z$(l,i)},ap=function(t,i){var a={value:0,done:!1},u=0,c=t.length,l={next:function(){return u<c?a.value=t.charCodeAt(u++):a.done=!0,a}};return Z$(l,i)},t8=function(){return lge(arguments)},lge=function(t){for(var i,a=0;a<t.length;a++){var u=t[a];a===0?i=ap(u):i=ap(u,i)}return i};function fge(r,t,i,a,u){var c=u*Math.PI/180,l=Math.cos(c)*(r-i)-Math.sin(c)*(t-a)+i,h=Math.sin(c)*(r-i)+Math.cos(c)*(t-a)+a;return{x:l,y:h}}var hge=function(t,i,a,u,c,l){return{x:(t-a)*c+a,y:(i-u)*l+u}};function dge(r,t,i){if(i===0)return r;var a=(t.x1+t.x2)/2,u=(t.y1+t.y2)/2,c=t.w/t.h,l=1/c,h=fge(r.x,r.y,a,u,i),v=hge(h.x,h.y,a,u,c,l);return{x:v.x,y:v.y}}var n8=!0,vge=console.warn!=null,pge=console.trace!=null,_C=Number.MAX_SAFE_INTEGER||9007199254740991,r8=function(){return!0},Nx=function(){return!1},i8=function(){return 0},xC=function(){},qi=function(t){throw new Error(t)},a8=function(t){if(t!==void 0)n8=!!t;else return n8},Hr=function(t){a8()&&(vge?console.warn(t):(console.log(t),pge&&console.trace()))},gge=function(t){return yn({},t)},zl=function(t){return t==null?t:di(t)?t.slice():Sr(t)?gge(t):t},bge=function(t){return t.slice()},s8=function(t,i){for(i=t="";t++<36;i+=t*51&52?(t^15?8^Math.random()*(t^20?16:4):4).toString(16):"-");return i},yge={},o8=function(){return yge},qs=function(t){var i=Object.keys(t);return function(a){for(var u={},c=0;c<i.length;c++){var l=i[c],h=a==null?void 0:a[l];u[l]=h===void 0?t[l]:h}return u}},Sd=function(t,i,a){for(var u=t.length-1;u>=0;u--)t[u]===i&&t.splice(u,1)},EC=function(t){t.splice(0,t.length)},mge=function(t,i){for(var a=0;a<i.length;a++){var u=i[a];t.push(u)}},eu=function(t,i,a){return a&&(i=A$(a,i)),t[i]},ah=function(t,i,a,u){a&&(i=A$(a,i)),t[i]=u},wge=function(){function r(){wd(this,r),this._obj={}}return _d(r,[{key:"set",value:function(i,a){return this._obj[i]=a,this}},{key:"delete",value:function(i){return this._obj[i]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(i){return this._obj[i]!==void 0}},{key:"get",value:function(i){return this._obj[i]}}])}(),sh=typeof Map<"u"?Map:wge,_ge="undefined",xge=function(){function r(t){if(wd(this,r),this._obj=Object.create(null),this.size=0,t!=null){var i;t.instanceString!=null&&t.instanceString()===this.instanceString()?i=t.toArray():i=t;for(var a=0;a<i.length;a++)this.add(i[a])}}return _d(r,[{key:"instanceString",value:function(){return"set"}},{key:"add",value:function(i){var a=this._obj;a[i]!==1&&(a[i]=1,this.size++)}},{key:"delete",value:function(i){var a=this._obj;a[i]===1&&(a[i]=0,this.size--)}},{key:"clear",value:function(){this._obj=Object.create(null)}},{key:"has",value:function(i){return this._obj[i]===1}},{key:"toArray",value:function(){var i=this;return Object.keys(this._obj).filter(function(a){return i.has(a)})}},{key:"forEach",value:function(i,a){return this.toArray().forEach(i,a)}}])}(),cb=(typeof Set>"u"?"undefined":es(Set))!==_ge?Set:xge,Ox=function(t,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(t===void 0||i===void 0||!rC(t)){qi("An element must have a core reference and parameters set");return}var u=i.group;if(u==null&&(i.data&&i.data.source!=null&&i.data.target!=null?u="edges":u="nodes"),u!=="nodes"&&u!=="edges"){qi("An element must be of type `nodes` or `edges`; you specified `"+u+"`");return}this.length=1,this[0]=this;var c=this._private={cy:t,single:!0,data:i.data||{},position:i.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:u,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!i.selected,selectable:i.selectable===void 0?!0:!!i.selectable,locked:!!i.locked,grabbed:!1,grabbable:i.grabbable===void 0?!0:!!i.grabbable,pannable:i.pannable===void 0?u==="edges":!!i.pannable,active:!1,classes:new cb,animation:{current:[],queue:[]},rscratch:{},scratch:i.scratch||{},edges:[],children:[],parent:i.parent&&i.parent.isNode()?i.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),i.renderedPosition){var l=i.renderedPosition,h=t.pan(),v=t.zoom();c.position={x:(l.x-h.x)/v,y:(l.y-h.y)/v}}var p=[];di(i.classes)?p=i.classes:hn(i.classes)&&(p=i.classes.split(/\s+/));for(var g=0,w=p.length;g<w;g++){var _=p[g];!_||_===""||c.classes.add(_)}this.createEmitter(),(a===void 0||a)&&this.restore();var E=i.style||i.css;E&&(Hr("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(E))},u8=function(t){return t={bfs:t.bfs||!t.dfs,dfs:t.dfs||!t.bfs},function(a,u,c){var l;Sr(a)&&!Pu(a)&&(l=a,a=l.roots||l.root,u=l.visit,c=l.directed),c=arguments.length===2&&!Ji(u)?u:c,u=Ji(u)?u:function(){};for(var h=this._private.cy,v=a=hn(a)?this.filter(a):a,p=[],g=[],w={},_={},E={},k=0,I,C=this.byGroup(),P=C.nodes,A=C.edges,L=0;L<v.length;L++){var O=v[L],M=O.id();O.isNode()&&(p.unshift(O),t.bfs&&(E[M]=!0,g.push(O)),_[M]=0)}for(var B=function(){var G=t.bfs?p.shift():p.pop(),X=G.id();if(t.dfs){if(E[X])return 0;E[X]=!0,g.push(G)}var ne=_[X],ae=w[X],oe=ae!=null?ae.source():null,le=ae!=null?ae.target():null,pe=ae==null?void 0:G.same(oe)?le[0]:oe[0],ge;if(ge=u(G,ae,pe,k++,ne),ge===!0)return I=G,1;if(ge===!1)return 1;for(var de=G.connectedEdges().filter(function(Pe){return(!c||Pe.source().same(G))&&A.has(Pe)}),Se=0;Se<de.length;Se++){var Ne=de[Se],ye=Ne.connectedNodes().filter(function(Pe){return!Pe.same(G)&&P.has(Pe)}),we=ye.id();ye.length!==0&&!E[we]&&(ye=ye[0],p.push(ye),t.bfs&&(E[we]=!0,g.push(ye)),w[we]=Ne,_[we]=_[X]+1)}},F;p.length!==0&&(F=B(),!(F!==0&&F===1)););for(var q=h.collection(),$=0;$<g.length;$++){var Y=g[$],V=w[Y.id()];V!=null&&q.push(V),q.push(Y)}return{path:h.collection(q),found:h.collection(I)}}},p1={breadthFirstSearch:u8({bfs:!0}),depthFirstSearch:u8({dfs:!0})};p1.bfs=p1.breadthFirstSearch,p1.dfs=p1.depthFirstSearch;var Dx={exports:{}},Ege=Dx.exports,c8;function kge(){return c8||(c8=1,function(r,t){(function(){var i,a,u,c,l,h,v,p,g,w,_,E,k,I,C;u=Math.floor,w=Math.min,a=function(P,A){return P<A?-1:P>A?1:0},g=function(P,A,L,O,M){var B;if(L==null&&(L=0),M==null&&(M=a),L<0)throw new Error("lo must be non-negative");for(O==null&&(O=P.length);L<O;)B=u((L+O)/2),M(A,P[B])<0?O=B:L=B+1;return[].splice.apply(P,[L,L-L].concat(A)),A},h=function(P,A,L){return L==null&&(L=a),P.push(A),I(P,0,P.length-1,L)},l=function(P,A){var L,O;return A==null&&(A=a),L=P.pop(),P.length?(O=P[0],P[0]=L,C(P,0,A)):O=L,O},p=function(P,A,L){var O;return L==null&&(L=a),O=P[0],P[0]=A,C(P,0,L),O},v=function(P,A,L){var O;return L==null&&(L=a),P.length&&L(P[0],A)<0&&(O=[P[0],A],A=O[0],P[0]=O[1],C(P,0,L)),A},c=function(P,A){var L,O,M,B,F,q;for(A==null&&(A=a),B=(function(){q=[];for(var $=0,Y=u(P.length/2);0<=Y?$<Y:$>Y;0<=Y?$++:$--)q.push($);return q}).apply(this).reverse(),F=[],O=0,M=B.length;O<M;O++)L=B[O],F.push(C(P,L,A));return F},k=function(P,A,L){var O;if(L==null&&(L=a),O=P.indexOf(A),O!==-1)return I(P,0,O,L),C(P,O,L)},_=function(P,A,L){var O,M,B,F,q;if(L==null&&(L=a),M=P.slice(0,A),!M.length)return M;for(c(M,L),q=P.slice(A),B=0,F=q.length;B<F;B++)O=q[B],v(M,O,L);return M.sort(L).reverse()},E=function(P,A,L){var O,M,B,F,q,$,Y,V,U;if(L==null&&(L=a),A*10<=P.length){if(B=P.slice(0,A).sort(L),!B.length)return B;for(M=B[B.length-1],Y=P.slice(A),F=0,$=Y.length;F<$;F++)O=Y[F],L(O,M)<0&&(g(B,O,0,null,L),B.pop(),M=B[B.length-1]);return B}for(c(P,L),U=[],q=0,V=w(A,P.length);0<=V?q<V:q>V;0<=V?++q:--q)U.push(l(P,L));return U},I=function(P,A,L,O){var M,B,F;for(O==null&&(O=a),M=P[L];L>A;){if(F=L-1>>1,B=P[F],O(M,B)<0){P[L]=B,L=F;continue}break}return P[L]=M},C=function(P,A,L){var O,M,B,F,q;for(L==null&&(L=a),M=P.length,q=A,B=P[A],O=2*A+1;O<M;)F=O+1,F<M&&!(L(P[O],P[F])<0)&&(O=F),P[A]=P[O],A=O,O=2*A+1;return P[A]=B,I(P,q,A,L)},i=function(){P.push=h,P.pop=l,P.replace=p,P.pushpop=v,P.heapify=c,P.updateItem=k,P.nlargest=_,P.nsmallest=E;function P(A){this.cmp=A??a,this.nodes=[]}return P.prototype.push=function(A){return h(this.nodes,A,this.cmp)},P.prototype.pop=function(){return l(this.nodes,this.cmp)},P.prototype.peek=function(){return this.nodes[0]},P.prototype.contains=function(A){return this.nodes.indexOf(A)!==-1},P.prototype.replace=function(A){return p(this.nodes,A,this.cmp)},P.prototype.pushpop=function(A){return v(this.nodes,A,this.cmp)},P.prototype.heapify=function(){return c(this.nodes,this.cmp)},P.prototype.updateItem=function(A){return k(this.nodes,A,this.cmp)},P.prototype.clear=function(){return this.nodes=[]},P.prototype.empty=function(){return this.nodes.length===0},P.prototype.size=function(){return this.nodes.length},P.prototype.clone=function(){var A;return A=new P,A.nodes=this.nodes.slice(0),A},P.prototype.toArray=function(){return this.nodes.slice(0)},P.prototype.insert=P.prototype.push,P.prototype.top=P.prototype.peek,P.prototype.front=P.prototype.peek,P.prototype.has=P.prototype.contains,P.prototype.copy=P.prototype.clone,P}(),function(P,A){return r.exports=A()}(this,function(){return i})}).call(Ege)}(Dx)),Dx.exports}var kC,l8;function Sge(){return l8||(l8=1,kC=kge()),kC}var Tge=Sge(),g1=c1(Tge),Rge=qs({root:null,weight:function(t){return 1},directed:!1}),Ige={dijkstra:function(t){if(!Sr(t)){var i=arguments;t={root:i[0],weight:i[1],directed:i[2]}}var a=Rge(t),u=a.root,c=a.weight,l=a.directed,h=this,v=c,p=hn(u)?this.filter(u)[0]:u[0],g={},w={},_={},E=this.byGroup(),k=E.nodes,I=E.edges;I.unmergeBy(function(ne){return ne.isLoop()});for(var C=function(ae){return g[ae.id()]},P=function(ae,oe){g[ae.id()]=oe,A.updateItem(ae)},A=new g1(function(ne,ae){return C(ne)-C(ae)}),L=0;L<k.length;L++){var O=k[L];g[O.id()]=O.same(p)?0:1/0,A.push(O)}for(var M=function(ae,oe){for(var le=(l?ae.edgesTo(oe):ae.edgesWith(oe)).intersect(I),pe=1/0,ge,de=0;de<le.length;de++){var Se=le[de],Ne=v(Se);(Ne<pe||!ge)&&(pe=Ne,ge=Se)}return{edge:ge,dist:pe}};A.size()>0;){var B=A.pop(),F=C(B),q=B.id();if(_[q]=F,F!==1/0)for(var $=B.neighborhood().intersect(k),Y=0;Y<$.length;Y++){var V=$[Y],U=V.id(),G=M(B,V),X=F+G.dist;X<C(V)&&(P(V,X),w[U]={node:B,edge:G.edge})}}return{distanceTo:function(ae){var oe=hn(ae)?k.filter(ae)[0]:ae[0];return _[oe.id()]},pathTo:function(ae){var oe=hn(ae)?k.filter(ae)[0]:ae[0],le=[],pe=oe,ge=pe.id();if(oe.length>0)for(le.unshift(oe);w[ge];){var de=w[ge];le.unshift(de.edge),le.unshift(de.node),pe=de.node,ge=pe.id()}return h.spawn(le)}}}},Cge={kruskal:function(t){t=t||function(L){return 1};for(var i=this.byGroup(),a=i.nodes,u=i.edges,c=a.length,l=new Array(c),h=a,v=function(O){for(var M=0;M<l.length;M++){var B=l[M];if(B.has(O))return M}},p=0;p<c;p++)l[p]=this.spawn(a[p]);for(var g=u.sort(function(L,O){return t(L)-t(O)}),w=0;w<g.length;w++){var _=g[w],E=_.source()[0],k=_.target()[0],I=v(E),C=v(k),P=l[I],A=l[C];I!==C&&(h.merge(_),P.merge(A),l.splice(C,1))}return h}},Age=qs({root:null,goal:null,weight:function(t){return 1},heuristic:function(t){return 0},directed:!1}),Pge={aStar:function(t){var i=this.cy(),a=Age(t),u=a.root,c=a.goal,l=a.heuristic,h=a.directed,v=a.weight;u=i.collection(u)[0],c=i.collection(c)[0];var p=u.id(),g=c.id(),w={},_={},E={},k=new g1(function(ge,de){return _[ge.id()]-_[de.id()]}),I=new cb,C={},P={},A=function(de,Se){k.push(de),I.add(Se)},L,O,M=function(){L=k.pop(),O=L.id(),I.delete(O)},B=function(de){return I.has(de)};A(u,p),w[p]=0,_[p]=l(u);for(var F=0;k.size()>0;){if(M(),F++,O===g){for(var q=[],$=c,Y=g,V=P[Y];q.unshift($),V!=null&&q.unshift(V),$=C[Y],$!=null;)Y=$.id(),V=P[Y];return{found:!0,distance:w[O],path:this.spawn(q),steps:F}}E[O]=!0;for(var U=L._private.edges,G=0;G<U.length;G++){var X=U[G];if(this.hasElementWithId(X.id())&&!(h&&X.data("source")!==O)){var ne=X.source(),ae=X.target(),oe=ne.id()!==O?ne:ae,le=oe.id();if(this.hasElementWithId(le)&&!E[le]){var pe=w[O]+v(X);if(!B(le)){w[le]=pe,_[le]=pe+l(oe),A(oe,le),C[le]=L,P[le]=X;continue}pe<w[le]&&(w[le]=pe,_[le]=pe+l(oe),C[le]=L,P[le]=X)}}}}return{found:!1,distance:void 0,path:void 0,steps:F}}},Lge=qs({weight:function(t){return 1},directed:!1}),Nge={floydWarshall:function(t){for(var i=this.cy(),a=Lge(t),u=a.weight,c=a.directed,l=u,h=this.byGroup(),v=h.nodes,p=h.edges,g=v.length,w=g*g,_=function(Ne){return v.indexOf(Ne)},E=function(Ne){return v[Ne]},k=new Array(w),I=0;I<w;I++){var C=I%g,P=(I-C)/g;P===C?k[I]=0:k[I]=1/0}for(var A=new Array(w),L=new Array(w),O=0;O<p.length;O++){var M=p[O],B=M.source()[0],F=M.target()[0];if(B!==F){var q=_(B),$=_(F),Y=q*g+$,V=l(M);if(k[Y]>V&&(k[Y]=V,A[Y]=$,L[Y]=M),!c){var U=$*g+q;!c&&k[U]>V&&(k[U]=V,A[U]=q,L[U]=M)}}}for(var G=0;G<g;G++)for(var X=0;X<g;X++)for(var ne=X*g+G,ae=0;ae<g;ae++){var oe=X*g+ae,le=G*g+ae;k[ne]+k[le]<k[oe]&&(k[oe]=k[ne]+k[le],A[oe]=A[ne])}var pe=function(Ne){return(hn(Ne)?i.filter(Ne):Ne)[0]},ge=function(Ne){return _(pe(Ne))},de={distance:function(Ne,ye){var we=ge(Ne),Pe=ge(ye);return k[we*g+Pe]},path:function(Ne,ye){var we=ge(Ne),Pe=ge(ye),Fe=E(we);if(we===Pe)return Fe.collection();if(A[we*g+Pe]==null)return i.collection();var Ue=i.collection(),He=we,De;for(Ue.merge(Fe);we!==Pe;)He=we,we=A[we*g+Pe],De=L[He*g+we],Ue.merge(De),Ue.merge(E(we));return Ue}};return de}},Oge=qs({weight:function(t){return 1},directed:!1,root:null}),Dge={bellmanFord:function(t){var i=this,a=Oge(t),u=a.weight,c=a.directed,l=a.root,h=u,v=this,p=this.cy(),g=this.byGroup(),w=g.edges,_=g.nodes,E=_.length,k=new sh,I=!1,C=[];l=p.collection(l)[0],w.unmergeBy(function(Me){return Me.isLoop()});for(var P=w.length,A=function(ot){var dt=k.get(ot.id());return dt||(dt={},k.set(ot.id(),dt)),dt},L=function(ot){return(hn(ot)?p.$(ot):ot)[0]},O=function(ot){return A(L(ot)).dist},M=function(ot){for(var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l,pt=L(ot),Lt=[],ut=pt;;){if(ut==null)return i.spawn();var $t=A(ut),Yt=$t.edge,fn=$t.pred;if(Lt.unshift(ut[0]),ut.same(dt)&&Lt.length>0)break;Yt!=null&&Lt.unshift(Yt),ut=fn}return v.spawn(Lt)},B=0;B<E;B++){var F=_[B],q=A(F);F.same(l)?q.dist=0:q.dist=1/0,q.pred=null,q.edge=null}for(var $=!1,Y=function(ot,dt,pt,Lt,ut,$t){var Yt=Lt.dist+$t;Yt<ut.dist&&!pt.same(Lt.edge)&&(ut.dist=Yt,ut.pred=ot,ut.edge=pt,$=!0)},V=1;V<E;V++){$=!1;for(var U=0;U<P;U++){var G=w[U],X=G.source(),ne=G.target(),ae=h(G),oe=A(X),le=A(ne);Y(X,ne,G,oe,le,ae),c||Y(ne,X,G,le,oe,ae)}if(!$)break}if($)for(var pe=[],ge=0;ge<P;ge++){var de=w[ge],Se=de.source(),Ne=de.target(),ye=h(de),we=A(Se).dist,Pe=A(Ne).dist;if(we+ye<Pe||!c&&Pe+ye<we)if(I||(Hr("Graph contains a negative weight cycle for Bellman-Ford"),I=!0),t.findNegativeWeightCycles!==!1){var Fe=[];we+ye<Pe&&Fe.push(Se),!c&&Pe+ye<we&&Fe.push(Ne);for(var Ue=Fe.length,He=0;He<Ue;He++){var De=Fe[He],Ce=[De];Ce.push(A(De).edge);for(var Be=A(De).pred;Ce.indexOf(Be)===-1;)Ce.push(Be),Ce.push(A(Be).edge),Be=A(Be).pred;Ce=Ce.slice(Ce.indexOf(Be));for(var ve=Ce[0].id(),ke=0,je=2;je<Ce.length;je+=2)Ce[je].id()<ve&&(ve=Ce[je].id(),ke=je);Ce=Ce.slice(ke).concat(Ce.slice(0,ke)),Ce.push(Ce[0]);var qe=Ce.map(function(Me){return Me.id()}).join(",");pe.indexOf(qe)===-1&&(C.push(v.spawn(Ce)),pe.push(qe))}}else break}return{distanceTo:O,pathTo:M,hasNegativeWeightCycle:I,negativeWeightCycles:C}}},Mge=Math.sqrt(2),jge=function(t,i,a){a.length===0&&qi("Karger-Stein must be run on a connected (sub)graph");for(var u=a[t],c=u[1],l=u[2],h=i[c],v=i[l],p=a,g=p.length-1;g>=0;g--){var w=p[g],_=w[1],E=w[2];(i[_]===h&&i[E]===v||i[_]===v&&i[E]===h)&&p.splice(g,1)}for(var k=0;k<p.length;k++){var I=p[k];I[1]===v?(p[k]=I.slice(),p[k][1]=h):I[2]===v&&(p[k]=I.slice(),p[k][2]=h)}for(var C=0;C<i.length;C++)i[C]===v&&(i[C]=h);return p},SC=function(t,i,a,u){for(;a>u;){var c=Math.floor(Math.random()*i.length);i=jge(c,t,i),a--}return i},Bge={kargerStein:function(){var t=this,i=this.byGroup(),a=i.nodes,u=i.edges;u.unmergeBy(function(le){return le.isLoop()});var c=a.length,l=u.length,h=Math.ceil(Math.pow(Math.log(c)/Math.LN2,2)),v=Math.floor(c/Mge);if(c<2){qi("At least 2 nodes are required for Karger-Stein algorithm");return}for(var p=[],g=0;g<l;g++){var w=u[g];p.push([g,a.indexOf(w.source()),a.indexOf(w.target())])}for(var _=1/0,E=[],k=new Array(c),I=new Array(c),C=new Array(c),P=function(pe,ge){for(var de=0;de<c;de++)ge[de]=pe[de]},A=0;A<=h;A++){for(var L=0;L<c;L++)I[L]=L;var O=SC(I,p.slice(),c,v),M=O.slice();P(I,C);var B=SC(I,O,v,2),F=SC(C,M,v,2);B.length<=F.length&&B.length<_?(_=B.length,E=B,P(I,k)):F.length<=B.length&&F.length<_&&(_=F.length,E=F,P(C,k))}for(var q=this.spawn(E.map(function(le){return u[le[0]]})),$=this.spawn(),Y=this.spawn(),V=k[0],U=0;U<k.length;U++){var G=k[U],X=a[U];G===V?$.merge(X):Y.merge(X)}var ne=function(pe){var ge=t.spawn();return pe.forEach(function(de){ge.merge(de),de.connectedEdges().forEach(function(Se){t.contains(Se)&&!q.contains(Se)&&ge.merge(Se)})}),ge},ae=[ne($),ne(Y)],oe={cut:q,components:ae,partition1:$,partition2:Y};return oe}},TC,qge=function(t){return{x:t.x,y:t.y}},Mx=function(t,i,a){return{x:t.x*i+a.x,y:t.y*i+a.y}},f8=function(t,i,a){return{x:(t.x-a.x)/i,y:(t.y-a.y)/i}},lb=function(t){return{x:t[0],y:t[1]}},Fge=function(t){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,u=1/0,c=i;c<a;c++){var l=t[c];isFinite(l)&&(u=Math.min(l,u))}return u},$ge=function(t){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,u=-1/0,c=i;c<a;c++){var l=t[c];isFinite(l)&&(u=Math.max(l,u))}return u},Gge=function(t){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,u=0,c=0,l=i;l<a;l++){var h=t[l];isFinite(h)&&(u+=h,c++)}return u/c},Hge=function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;u?t=t.slice(i,a):(a<t.length&&t.splice(a,t.length-a),i>0&&t.splice(0,i));for(var h=0,v=t.length-1;v>=0;v--){var p=t[v];l?isFinite(p)||(t[v]=-1/0,h++):t.splice(v,1)}c&&t.sort(function(_,E){return _-E});var g=t.length,w=Math.floor(g/2);return g%2!==0?t[w+1+h]:(t[w-1+h]+t[w+h])/2},zge=function(t){return Math.PI*t/180},jx=function(t,i){return Math.atan2(i,t)-Math.PI/2},RC=Math.log2||function(r){return Math.log(r)/Math.log(2)},IC=function(t){return t>0?1:t<0?-1:0},sp=function(t,i){return Math.sqrt(op(t,i))},op=function(t,i){var a=i.x-t.x,u=i.y-t.y;return a*a+u*u},Vge=function(t){for(var i=t.length,a=0,u=0;u<i;u++)a+=t[u];for(var c=0;c<i;c++)t[c]=t[c]/a;return t},ms=function(t,i,a,u){return(1-u)*(1-u)*t+2*(1-u)*u*i+u*u*a},fb=function(t,i,a,u){return{x:ms(t.x,i.x,a.x,u),y:ms(t.y,i.y,a.y,u)}},Uge=function(t,i,a,u){var c={x:i.x-t.x,y:i.y-t.y},l=sp(t,i),h={x:c.x/l,y:c.y/l};return a=a??0,u=u??a*l,{x:t.x+h.x*u,y:t.y+h.y*u}},b1=function(t,i,a){return Math.max(t,Math.min(a,i))},wo=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}}},Yge=function(t){return{x1:t.x1,x2:t.x2,w:t.w,y1:t.y1,y2:t.y2,h:t.h}},Wge=function(t){t.x1=1/0,t.y1=1/0,t.x2=-1/0,t.y2=-1/0,t.w=0,t.h=0},Kge=function(t,i){t.x1=Math.min(t.x1,i.x1),t.x2=Math.max(t.x2,i.x2),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,i.y1),t.y2=Math.max(t.y2,i.y2),t.h=t.y2-t.y1},h8=function(t,i,a){t.x1=Math.min(t.x1,i),t.x2=Math.max(t.x2,i),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},Bx=function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.x1-=i,t.x2+=i,t.y1-=i,t.y2+=i,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},qx=function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],a,u,c,l;if(i.length===1)a=u=c=l=i[0];else if(i.length===2)a=c=i[0],l=u=i[1];else if(i.length===4){var h=ja(i,4);a=h[0],u=h[1],c=h[2],l=h[3]}return t.x1-=l,t.x2+=u,t.y1-=a,t.y2+=c,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},d8=function(t,i){t.x1=i.x1,t.y1=i.y1,t.x2=i.x2,t.y2=i.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1},CC=function(t,i){return!(t.x1>i.x2||i.x1>t.x2||t.x2<i.x1||i.x2<t.x1||t.y2<i.y1||i.y2<t.y1||t.y1>i.y2||i.y1>t.y2)},Td=function(t,i,a){return t.x1<=i&&i<=t.x2&&t.y1<=a&&a<=t.y2},v8=function(t,i){return Td(t,i.x,i.y)},p8=function(t,i){return Td(t,i.x1,i.y1)&&Td(t,i.x2,i.y2)},Xge=(TC=Math.hypot)!==null&&TC!==void 0?TC:function(r,t){return Math.sqrt(r*r+t*t)};function Jge(r,t){if(r.length<3)throw new Error("Need at least 3 vertices");var i=function(q,$){return{x:q.x+$.x,y:q.y+$.y}},a=function(q,$){return{x:q.x-$.x,y:q.y-$.y}},u=function(q,$){return{x:q.x*$,y:q.y*$}},c=function(q,$){return q.x*$.y-q.y*$.x},l=function(q){var $=Xge(q.x,q.y);return $===0?{x:0,y:0}:{x:q.x/$,y:q.y/$}},h=function(q){for(var $=0,Y=0;Y<q.length;Y++){var V=q[Y],U=q[(Y+1)%q.length];$+=V.x*U.y-U.x*V.y}return $/2},v=function(q,$,Y,V){var U=a($,q),G=a(V,Y),X=c(U,G);if(Math.abs(X)<1e-9)return i(q,u(U,.5));var ne=c(a(Y,q),G)/X;return i(q,u(U,ne))},p=r.map(function(F){return{x:F.x,y:F.y}});h(p)<0&&p.reverse();for(var g=p.length,w=[],_=0;_<g;_++){var E=p[_],k=p[(_+1)%g],I=a(k,E),C=l({x:I.y,y:-I.x});w.push(C)}for(var P=w.map(function(F,q){var $=i(p[q],u(F,t)),Y=i(p[(q+1)%g],u(F,t));return{p1:$,p2:Y}}),A=[],L=0;L<g;L++){var O=P[(L-1+g)%g],M=P[L],B=v(O.p1,O.p2,M.p1,M.p2);A.push(B)}return A}function Qge(r,t,i,a,u,c){var l=obe(r,t,i,a,u),h=Jge(l,c),v=wo();return h.forEach(function(p){return h8(v,p.x,p.y)}),v}var g8=function(t,i,a,u,c,l,h){var v=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",p=v==="auto"?Id(c,l):v,g=c/2,w=l/2;p=Math.min(p,g,w);var _=p!==g,E=p!==w,k;if(_){var I=a-g+p-h,C=u-w-h,P=a+g-p+h,A=C;if(k=Rd(t,i,a,u,I,C,P,A,!1),k.length>0)return k}if(E){var L=a+g+h,O=u-w+p-h,M=L,B=u+w-p+h;if(k=Rd(t,i,a,u,L,O,M,B,!1),k.length>0)return k}if(_){var F=a-g+p-h,q=u+w+h,$=a+g-p+h,Y=q;if(k=Rd(t,i,a,u,F,q,$,Y,!1),k.length>0)return k}if(E){var V=a-g-h,U=u-w+p-h,G=V,X=u+w-p+h;if(k=Rd(t,i,a,u,V,U,G,X,!1),k.length>0)return k}var ne;{var ae=a-g+p,oe=u-w+p;if(ne=y1(t,i,a,u,ae,oe,p+h),ne.length>0&&ne[0]<=ae&&ne[1]<=oe)return[ne[0],ne[1]]}{var le=a+g-p,pe=u-w+p;if(ne=y1(t,i,a,u,le,pe,p+h),ne.length>0&&ne[0]>=le&&ne[1]<=pe)return[ne[0],ne[1]]}{var ge=a+g-p,de=u+w-p;if(ne=y1(t,i,a,u,ge,de,p+h),ne.length>0&&ne[0]>=ge&&ne[1]>=de)return[ne[0],ne[1]]}{var Se=a-g+p,Ne=u+w-p;if(ne=y1(t,i,a,u,Se,Ne,p+h),ne.length>0&&ne[0]<=Se&&ne[1]>=Ne)return[ne[0],ne[1]]}return[]},Zge=function(t,i,a,u,c,l,h){var v=h,p=Math.min(a,c),g=Math.max(a,c),w=Math.min(u,l),_=Math.max(u,l);return p-v<=t&&t<=g+v&&w-v<=i&&i<=_+v},ebe=function(t,i,a,u,c,l,h,v,p){var g={x1:Math.min(a,h,c)-p,x2:Math.max(a,h,c)+p,y1:Math.min(u,v,l)-p,y2:Math.max(u,v,l)+p};return!(t<g.x1||t>g.x2||i<g.y1||i>g.y2)},tbe=function(t,i,a,u){a-=u;var c=i*i-4*t*a;if(c<0)return[];var l=Math.sqrt(c),h=2*t,v=(-i+l)/h,p=(-i-l)/h;return[v,p]},nbe=function(t,i,a,u,c){var l=1e-5;t===0&&(t=l),i/=t,a/=t,u/=t;var h,v,p,g,w,_,E,k;if(v=(3*a-i*i)/9,p=-(27*u)+i*(9*a-2*(i*i)),p/=54,h=v*v*v+p*p,c[1]=0,E=i/3,h>0){w=p+Math.sqrt(h),w=w<0?-Math.pow(-w,1/3):Math.pow(w,1/3),_=p-Math.sqrt(h),_=_<0?-Math.pow(-_,1/3):Math.pow(_,1/3),c[0]=-E+w+_,E+=(w+_)/2,c[4]=c[2]=-E,E=Math.sqrt(3)*(-_+w)/2,c[3]=E,c[5]=-E;return}if(c[5]=c[3]=0,h===0){k=p<0?-Math.pow(-p,1/3):Math.pow(p,1/3),c[0]=-E+2*k,c[4]=c[2]=-(k+E);return}v=-v,g=v*v*v,g=Math.acos(p/Math.sqrt(g)),k=2*Math.sqrt(v),c[0]=-E+k*Math.cos(g/3),c[2]=-E+k*Math.cos((g+2*Math.PI)/3),c[4]=-E+k*Math.cos((g+4*Math.PI)/3)},rbe=function(t,i,a,u,c,l,h,v){var p=1*a*a-4*a*c+2*a*h+4*c*c-4*c*h+h*h+u*u-4*u*l+2*u*v+4*l*l-4*l*v+v*v,g=1*9*a*c-3*a*a-3*a*h-6*c*c+3*c*h+9*u*l-3*u*u-3*u*v-6*l*l+3*l*v,w=1*3*a*a-6*a*c+a*h-a*t+2*c*c+2*c*t-h*t+3*u*u-6*u*l+u*v-u*i+2*l*l+2*l*i-v*i,_=1*a*c-a*a+a*t-c*t+u*l-u*u+u*i-l*i,E=[];nbe(p,g,w,_,E);for(var k=1e-7,I=[],C=0;C<6;C+=2)Math.abs(E[C+1])<k&&E[C]>=0&&E[C]<=1&&I.push(E[C]);I.push(1),I.push(0);for(var P=-1,A,L,O,M=0;M<I.length;M++)A=Math.pow(1-I[M],2)*a+2*(1-I[M])*I[M]*c+I[M]*I[M]*h,L=Math.pow(1-I[M],2)*u+2*(1-I[M])*I[M]*l+I[M]*I[M]*v,O=Math.pow(A-t,2)+Math.pow(L-i,2),P>=0?O<P&&(P=O):P=O;return P},ibe=function(t,i,a,u,c,l){var h=[t-a,i-u],v=[c-a,l-u],p=v[0]*v[0]+v[1]*v[1],g=h[0]*h[0]+h[1]*h[1],w=h[0]*v[0]+h[1]*v[1],_=w*w/p;return w<0?g:_>p?(t-c)*(t-c)+(i-l)*(i-l):g-_},tu=function(t,i,a){for(var u,c,l,h,v,p=0,g=0;g<a.length/2;g++)if(u=a[g*2],c=a[g*2+1],g+1<a.length/2?(l=a[(g+1)*2],h=a[(g+1)*2+1]):(l=a[(g+1-a.length/2)*2],h=a[(g+1-a.length/2)*2+1]),!(u==t&&l==t))if(u>=t&&t>=l||u<=t&&t<=l)v=(t-u)/(l-u)*(h-c)+c,v>i&&p++;else continue;return p%2!==0},oh=function(t,i,a,u,c,l,h,v,p){var g=new Array(a.length),w;v[0]!=null?(w=Math.atan(v[1]/v[0]),v[0]<0?w=w+Math.PI/2:w=-w-Math.PI/2):w=v;for(var _=Math.cos(-w),E=Math.sin(-w),k=0;k<g.length/2;k++)g[k*2]=l/2*(a[k*2]*_-a[k*2+1]*E),g[k*2+1]=h/2*(a[k*2+1]*_+a[k*2]*E),g[k*2]+=u,g[k*2+1]+=c;var I;if(p>0){var C=$x(g,-p);I=Fx(C)}else I=g;return tu(t,i,I)},abe=function(t,i,a,u,c,l,h,v){for(var p=new Array(a.length*2),g=0;g<v.length;g++){var w=v[g];p[g*4+0]=w.startX,p[g*4+1]=w.startY,p[g*4+2]=w.stopX,p[g*4+3]=w.stopY;var _=Math.pow(w.cx-t,2)+Math.pow(w.cy-i,2);if(_<=Math.pow(w.radius,2))return!0}return tu(t,i,p)},Fx=function(t){for(var i=new Array(t.length/2),a,u,c,l,h,v,p,g,w=0;w<t.length/4;w++){a=t[w*4],u=t[w*4+1],c=t[w*4+2],l=t[w*4+3],w<t.length/4-1?(h=t[(w+1)*4],v=t[(w+1)*4+1],p=t[(w+1)*4+2],g=t[(w+1)*4+3]):(h=t[0],v=t[1],p=t[2],g=t[3]);var _=Rd(a,u,c,l,h,v,p,g,!0);i[w*2]=_[0],i[w*2+1]=_[1]}return i},$x=function(t,i){for(var a=new Array(t.length*2),u,c,l,h,v=0;v<t.length/2;v++){u=t[v*2],c=t[v*2+1],v<t.length/2-1?(l=t[(v+1)*2],h=t[(v+1)*2+1]):(l=t[0],h=t[1]);var p=h-c,g=-(l-u),w=Math.sqrt(p*p+g*g),_=p/w,E=g/w;a[v*4]=u+_*i,a[v*4+1]=c+E*i,a[v*4+2]=l+_*i,a[v*4+3]=h+E*i}return a},sbe=function(t,i,a,u,c,l){var h=a-t,v=u-i;h/=c,v/=l;var p=Math.sqrt(h*h+v*v),g=p-1;if(g<0)return[];var w=g/p;return[(a-t)*w+t,(u-i)*w+i]},up=function(t,i,a,u,c,l,h){return t-=c,i-=l,t/=a/2+h,i/=u/2+h,t*t+i*i<=1},y1=function(t,i,a,u,c,l,h){var v=[a-t,u-i],p=[t-c,i-l],g=v[0]*v[0]+v[1]*v[1],w=2*(p[0]*v[0]+p[1]*v[1]),_=p[0]*p[0]+p[1]*p[1]-h*h,E=w*w-4*g*_;if(E<0)return[];var k=(-w+Math.sqrt(E))/(2*g),I=(-w-Math.sqrt(E))/(2*g),C=Math.min(k,I),P=Math.max(k,I),A=[];if(C>=0&&C<=1&&A.push(C),P>=0&&P<=1&&A.push(P),A.length===0)return[];var L=A[0]*v[0]+t,O=A[0]*v[1]+i;if(A.length>1){if(A[0]==A[1])return[L,O];var M=A[1]*v[0]+t,B=A[1]*v[1]+i;return[L,O,M,B]}else return[L,O]},AC=function(t,i,a){return i<=t&&t<=a||a<=t&&t<=i?t:t<=i&&i<=a||a<=i&&i<=t?i:a},Rd=function(t,i,a,u,c,l,h,v,p){var g=t-c,w=a-t,_=h-c,E=i-l,k=u-i,I=v-l,C=_*E-I*g,P=w*E-k*g,A=I*w-_*k;if(A!==0){var L=C/A,O=P/A,M=.001,B=0-M,F=1+M;return B<=L&&L<=F&&B<=O&&O<=F?[t+L*w,i+L*k]:p?[t+L*w,i+L*k]:[]}else return C===0||P===0?AC(t,a,h)===h?[h,v]:AC(t,a,c)===c?[c,l]:AC(c,h,a)===a?[a,u]:[]:[]},obe=function(t,i,a,u,c){var l=[],h=u/2,v=c/2,p=i,g=a;l.push({x:p+h*t[0],y:g+v*t[1]});for(var w=1;w<t.length/2;w++)l.push({x:p+h*t[w*2],y:g+v*t[w*2+1]});return l},m1=function(t,i,a,u,c,l,h,v){var p=[],g,w=new Array(a.length),_=!0;l==null&&(_=!1);var E;if(_){for(var k=0;k<w.length/2;k++)w[k*2]=a[k*2]*l+u,w[k*2+1]=a[k*2+1]*h+c;if(v>0){var I=$x(w,-v);E=Fx(I)}else E=w}else E=a;for(var C,P,A,L,O=0;O<E.length/2;O++)C=E[O*2],P=E[O*2+1],O<E.length/2-1?(A=E[(O+1)*2],L=E[(O+1)*2+1]):(A=E[0],L=E[1]),g=Rd(t,i,u,c,C,P,A,L),g.length!==0&&p.push(g[0],g[1]);return p},ube=function(t,i,a,u,c,l,h,v,p){var g=[],w,_=new Array(a.length*2);p.forEach(function(A,L){L===0?(_[_.length-2]=A.startX,_[_.length-1]=A.startY):(_[L*4-2]=A.startX,_[L*4-1]=A.startY),_[L*4]=A.stopX,_[L*4+1]=A.stopY,w=y1(t,i,u,c,A.cx,A.cy,A.radius),w.length!==0&&g.push(w[0],w[1])});for(var E=0;E<_.length/4;E++)w=Rd(t,i,u,c,_[E*4],_[E*4+1],_[E*4+2],_[E*4+3],!1),w.length!==0&&g.push(w[0],w[1]);if(g.length>2){for(var k=[g[0],g[1]],I=Math.pow(k[0]-t,2)+Math.pow(k[1]-i,2),C=1;C<g.length/2;C++){var P=Math.pow(g[C*2]-t,2)+Math.pow(g[C*2+1]-i,2);P<=I&&(k[0]=g[C*2],k[1]=g[C*2+1],I=P)}return k}return g},Gx=function(t,i,a){var u=[t[0]-i[0],t[1]-i[1]],c=Math.sqrt(u[0]*u[0]+u[1]*u[1]),l=(c-a)/c;return l<0&&(l=1e-5),[i[0]+l*u[0],i[1]+l*u[1]]},_o=function(t,i){var a=PC(t,i);return a=b8(a),a},b8=function(t){for(var i,a,u=t.length/2,c=1/0,l=1/0,h=-1/0,v=-1/0,p=0;p<u;p++)i=t[2*p],a=t[2*p+1],c=Math.min(c,i),h=Math.max(h,i),l=Math.min(l,a),v=Math.max(v,a);for(var g=2/(h-c),w=2/(v-l),_=0;_<u;_++)i=t[2*_]=t[2*_]*g,a=t[2*_+1]=t[2*_+1]*w,c=Math.min(c,i),h=Math.max(h,i),l=Math.min(l,a),v=Math.max(v,a);if(l<-1)for(var E=0;E<u;E++)a=t[2*E+1]=t[2*E+1]+(-1-l);return t},PC=function(t,i){var a=1/t*2*Math.PI,u=t%2===0?Math.PI/2+a/2:Math.PI/2;u+=i;for(var c=new Array(t*2),l,h=0;h<t;h++)l=h*a+u,c[2*h]=Math.cos(l),c[2*h+1]=Math.sin(-l);return c},Id=function(t,i){return Math.min(t/4,i/4,8)},y8=function(t,i){return Math.min(t/10,i/10,8)},LC=function(){return 8},cbe=function(t,i,a){return[t-2*i+a,2*(i-t),t]},NC=function(t,i){return{heightOffset:Math.min(15,.05*i),widthOffset:Math.min(100,.25*t),ctrlPtOffsetPct:.05}};function OC(r,t){function i(w){for(var _=[],E=0;E<w.length;E++){var k=w[E],I=w[(E+1)%w.length],C={x:I.x-k.x,y:I.y-k.y},P={x:-C.y,y:C.x},A=Math.sqrt(P.x*P.x+P.y*P.y);_.push({x:P.x/A,y:P.y/A})}return _}function a(w,_){var E=1/0,k=-1/0,I=Zo(w),C;try{for(I.s();!(C=I.n()).done;){var P=C.value,A=P.x*_.x+P.y*_.y;E=Math.min(E,A),k=Math.max(k,A)}}catch(L){I.e(L)}finally{I.f()}return{min:E,max:k}}function u(w,_){return!(w.max<_.min||_.max<w.min)}var c=[].concat(Tx(i(r)),Tx(i(t))),l=Zo(c),h;try{for(l.s();!(h=l.n()).done;){var v=h.value,p=a(r,v),g=a(t,v);if(!u(p,g))return!1}}catch(w){l.e(w)}finally{l.f()}return!0}var lbe=qs({dampingFactor:.8,precision:1e-6,iterations:200,weight:function(t){return 1}}),fbe={pageRank:function(t){for(var i=lbe(t),a=i.dampingFactor,u=i.precision,c=i.iterations,l=i.weight,h=this._private.cy,v=this.byGroup(),p=v.nodes,g=v.edges,w=p.length,_=w*w,E=g.length,k=new Array(_),I=new Array(w),C=(1-a)/w,P=0;P<w;P++){for(var A=0;A<w;A++){var L=P*w+A;k[L]=0}I[P]=0}for(var O=0;O<E;O++){var M=g[O],B=M.data("source"),F=M.data("target");if(B!==F){var q=p.indexOfId(B),$=p.indexOfId(F),Y=l(M),V=$*w+q;k[V]+=Y,I[q]+=Y}}for(var U=1/w+C,G=0;G<w;G++)if(I[G]===0)for(var X=0;X<w;X++){var ne=X*w+G;k[ne]=U}else for(var ae=0;ae<w;ae++){var oe=ae*w+G;k[oe]=k[oe]/I[G]+C}for(var le=new Array(w),pe=new Array(w),ge,de=0;de<w;de++)le[de]=1;for(var Se=0;Se<c;Se++){for(var Ne=0;Ne<w;Ne++)pe[Ne]=0;for(var ye=0;ye<w;ye++)for(var we=0;we<w;we++){var Pe=ye*w+we;pe[ye]+=k[Pe]*le[we]}Vge(pe),ge=le,le=pe,pe=ge;for(var Fe=0,Ue=0;Ue<w;Ue++){var He=ge[Ue]-le[Ue];Fe+=He*He}if(Fe<u)break}var De={rank:function(Be){return Be=h.collection(Be)[0],le[p.indexOf(Be)]}};return De}},m8=qs({root:null,weight:function(t){return 1},directed:!1,alpha:0}),hb={degreeCentralityNormalized:function(t){t=m8(t);var i=this.cy(),a=this.nodes(),u=a.length;if(t.directed){for(var g={},w={},_=0,E=0,k=0;k<u;k++){var I=a[k],C=I.id();t.root=I;var P=this.degreeCentrality(t);_<P.indegree&&(_=P.indegree),E<P.outdegree&&(E=P.outdegree),g[C]=P.indegree,w[C]=P.outdegree}return{indegree:function(L){return _==0?0:(hn(L)&&(L=i.filter(L)),g[L.id()]/_)},outdegree:function(L){return E===0?0:(hn(L)&&(L=i.filter(L)),w[L.id()]/E)}}}else{for(var c={},l=0,h=0;h<u;h++){var v=a[h];t.root=v;var p=this.degreeCentrality(t);l<p.degree&&(l=p.degree),c[v.id()]=p.degree}return{degree:function(L){return l===0?0:(hn(L)&&(L=i.filter(L)),c[L.id()]/l)}}}},degreeCentrality:function(t){t=m8(t);var i=this.cy(),a=this,u=t,c=u.root,l=u.weight,h=u.directed,v=u.alpha;if(c=i.collection(c)[0],h){for(var E=c.connectedEdges(),k=E.filter(function(B){return B.target().same(c)&&a.has(B)}),I=E.filter(function(B){return B.source().same(c)&&a.has(B)}),C=k.length,P=I.length,A=0,L=0,O=0;O<k.length;O++)A+=l(k[O]);for(var M=0;M<I.length;M++)L+=l(I[M]);return{indegree:Math.pow(C,1-v)*Math.pow(A,v),outdegree:Math.pow(P,1-v)*Math.pow(L,v)}}else{for(var p=c.connectedEdges().intersection(a),g=p.length,w=0,_=0;_<p.length;_++)w+=l(p[_]);return{degree:Math.pow(g,1-v)*Math.pow(w,v)}}}};hb.dc=hb.degreeCentrality,hb.dcn=hb.degreeCentralityNormalised=hb.degreeCentralityNormalized;var w8=qs({harmonic:!0,weight:function(){return 1},directed:!1,root:null}),db={closenessCentralityNormalized:function(t){for(var i=w8(t),a=i.harmonic,u=i.weight,c=i.directed,l=this.cy(),h={},v=0,p=this.nodes(),g=this.floydWarshall({weight:u,directed:c}),w=0;w<p.length;w++){for(var _=0,E=p[w],k=0;k<p.length;k++)if(w!==k){var I=g.distance(E,p[k]);a?_+=1/I:_+=I}a||(_=1/_),v<_&&(v=_),h[E.id()]=_}return{closeness:function(P){return v==0?0:(hn(P)?P=l.filter(P)[0].id():P=P.id(),h[P]/v)}}},closenessCentrality:function(t){var i=w8(t),a=i.root,u=i.weight,c=i.directed,l=i.harmonic;a=this.filter(a)[0];for(var h=this.dijkstra({root:a,weight:u,directed:c}),v=0,p=this.nodes(),g=0;g<p.length;g++){var w=p[g];if(!w.same(a)){var _=h.distanceTo(w);l?v+=1/_:v+=_}}return l?v:1/v}};db.cc=db.closenessCentrality,db.ccn=db.closenessCentralityNormalised=db.closenessCentralityNormalized;var hbe=qs({weight:null,directed:!1}),DC={betweennessCentrality:function(t){for(var i=hbe(t),a=i.directed,u=i.weight,c=u!=null,l=this.cy(),h=this.nodes(),v={},p={},g=0,w={set:function(L,O){p[L]=O,O>g&&(g=O)},get:function(L){return p[L]}},_=0;_<h.length;_++){var E=h[_],k=E.id();a?v[k]=E.outgoers().nodes():v[k]=E.openNeighborhood().nodes(),w.set(k,0)}for(var I=function(){for(var L=h[C].id(),O=[],M={},B={},F={},q=new g1(function(ye,we){return F[ye]-F[we]}),$=0;$<h.length;$++){var Y=h[$].id();M[Y]=[],B[Y]=0,F[Y]=1/0}for(B[L]=1,F[L]=0,q.push(L);!q.empty();){var V=q.pop();if(O.push(V),c)for(var U=0;U<v[V].length;U++){var G=v[V][U],X=l.getElementById(V),ne=void 0;X.edgesTo(G).length>0?ne=X.edgesTo(G)[0]:ne=G.edgesTo(X)[0];var ae=u(ne);G=G.id(),F[G]>F[V]+ae&&(F[G]=F[V]+ae,q.nodes.indexOf(G)<0?q.push(G):q.updateItem(G),B[G]=0,M[G]=[]),F[G]==F[V]+ae&&(B[G]=B[G]+B[V],M[G].push(V))}else for(var oe=0;oe<v[V].length;oe++){var le=v[V][oe].id();F[le]==1/0&&(q.push(le),F[le]=F[V]+1),F[le]==F[V]+1&&(B[le]=B[le]+B[V],M[le].push(V))}}for(var pe={},ge=0;ge<h.length;ge++)pe[h[ge].id()]=0;for(;O.length>0;){for(var de=O.pop(),Se=0;Se<M[de].length;Se++){var Ne=M[de][Se];pe[Ne]=pe[Ne]+B[Ne]/B[de]*(1+pe[de])}de!=h[C].id()&&w.set(de,w.get(de)+pe[de])}},C=0;C<h.length;C++)I();var P={betweenness:function(L){var O=l.collection(L).id();return w.get(O)},betweennessNormalized:function(L){if(g==0)return 0;var O=l.collection(L).id();return w.get(O)/g}};return P.betweennessNormalised=P.betweennessNormalized,P}};DC.bc=DC.betweennessCentrality;var dbe=qs({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(r){return 1}]}),vbe=function(t){return dbe(t)},pbe=function(t,i){for(var a=0,u=0;u<i.length;u++)a+=i[u](t);return a},gbe=function(t,i,a){for(var u=0;u<i;u++)t[u*i+u]=a},_8=function(t,i){for(var a,u=0;u<i;u++){a=0;for(var c=0;c<i;c++)a+=t[c*i+u];for(var l=0;l<i;l++)t[l*i+u]=t[l*i+u]/a}},bbe=function(t,i,a){for(var u=new Array(a*a),c=0;c<a;c++){for(var l=0;l<a;l++)u[c*a+l]=0;for(var h=0;h<a;h++)for(var v=0;v<a;v++)u[c*a+v]+=t[c*a+h]*i[h*a+v]}return u},ybe=function(t,i,a){for(var u=t.slice(0),c=1;c<a;c++)t=bbe(t,u,i);return t},mbe=function(t,i,a){for(var u=new Array(i*i),c=0;c<i*i;c++)u[c]=Math.pow(t[c],a);return _8(u,i),u},wbe=function(t,i,a,u){for(var c=0;c<a;c++){var l=Math.round(t[c]*Math.pow(10,u))/Math.pow(10,u),h=Math.round(i[c]*Math.pow(10,u))/Math.pow(10,u);if(l!==h)return!1}return!0},_be=function(t,i,a,u){for(var c=[],l=0;l<i;l++){for(var h=[],v=0;v<i;v++)Math.round(t[l*i+v]*1e3)/1e3>0&&h.push(a[v]);h.length!==0&&c.push(u.collection(h))}return c},xbe=function(t,i){for(var a=0;a<t.length;a++)if(!i[a]||t[a].id()!==i[a].id())return!1;return!0},Ebe=function(t){for(var i=0;i<t.length;i++)for(var a=0;a<t.length;a++)i!=a&&xbe(t[i],t[a])&&t.splice(a,1);return t},x8=function(t){for(var i=this.nodes(),a=this.edges(),u=this.cy(),c=vbe(t),l={},h=0;h<i.length;h++)l[i[h].id()]=h;for(var v=i.length,p=v*v,g=new Array(p),w,_=0;_<p;_++)g[_]=0;for(var E=0;E<a.length;E++){var k=a[E],I=l[k.source().id()],C=l[k.target().id()],P=pbe(k,c.attributes);g[I*v+C]+=P,g[C*v+I]+=P}gbe(g,v,c.multFactor),_8(g,v);for(var A=!0,L=0;A&&L<c.maxIterations;)A=!1,w=ybe(g,v,c.expandFactor),g=mbe(w,v,c.inflateFactor),wbe(g,w,p,4)||(A=!0),L++;var O=_be(g,v,i,u);return O=Ebe(O),O},kbe={markovClustering:x8,mcl:x8},Sbe=function(t){return t},E8=function(t,i){return Math.abs(i-t)},k8=function(t,i,a){return t+E8(i,a)},S8=function(t,i,a){return t+Math.pow(a-i,2)},Tbe=function(t){return Math.sqrt(t)},Rbe=function(t,i,a){return Math.max(t,E8(i,a))},w1=function(t,i,a,u,c){for(var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Sbe,h=u,v,p,g=0;g<t;g++)v=i(g),p=a(g),h=c(h,v,p);return l(h)},vb={euclidean:function(t,i,a){return t>=2?w1(t,i,a,0,S8,Tbe):w1(t,i,a,0,k8)},squaredEuclidean:function(t,i,a){return w1(t,i,a,0,S8)},manhattan:function(t,i,a){return w1(t,i,a,0,k8)},max:function(t,i,a){return w1(t,i,a,-1/0,Rbe)}};vb["squared-euclidean"]=vb.squaredEuclidean,vb.squaredeuclidean=vb.squaredEuclidean;function Hx(r,t,i,a,u,c){var l;return Ji(r)?l=r:l=vb[r]||vb.euclidean,t===0&&Ji(r)?l(u,c):l(t,i,a,u,c)}var Ibe=qs({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),MC=function(t){return Ibe(t)},zx=function(t,i,a,u,c){var l=c!=="kMedoids",h=l?function(w){return a[w]}:function(w){return u[w](a)},v=function(_){return u[_](i)},p=a,g=i;return Hx(t,u.length,h,v,p,g)},jC=function(t,i,a){for(var u=a.length,c=new Array(u),l=new Array(u),h=new Array(i),v=null,p=0;p<u;p++)c[p]=t.min(a[p]).value,l[p]=t.max(a[p]).value;for(var g=0;g<i;g++){v=[];for(var w=0;w<u;w++)v[w]=Math.random()*(l[w]-c[w])+c[w];h[g]=v}return h},T8=function(t,i,a,u,c){for(var l=1/0,h=0,v=0;v<i.length;v++){var p=zx(a,t,i[v],u,c);p<l&&(l=p,h=v)}return h},R8=function(t,i,a){for(var u=[],c=null,l=0;l<i.length;l++)c=i[l],a[c.id()]===t&&u.push(c);return u},Cbe=function(t,i,a){return Math.abs(i-t)<=a},Abe=function(t,i,a){for(var u=0;u<t.length;u++)for(var c=0;c<t[u].length;c++){var l=Math.abs(t[u][c]-i[u][c]);if(l>a)return!1}return!0},Pbe=function(t,i,a){for(var u=0;u<a;u++)if(t===i[u])return!0;return!1},I8=function(t,i){var a=new Array(i);if(t.length<50)for(var u=0;u<i;u++){for(var c=t[Math.floor(Math.random()*t.length)];Pbe(c,a,u);)c=t[Math.floor(Math.random()*t.length)];a[u]=c}else for(var l=0;l<i;l++)a[l]=t[Math.floor(Math.random()*t.length)];return a},C8=function(t,i,a){for(var u=0,c=0;c<i.length;c++)u+=zx("manhattan",i[c],t,a,"kMedoids");return u},Lbe=function(t){var i=this.cy(),a=this.nodes(),u=null,c=MC(t),l=new Array(c.k),h={},v;c.testMode?typeof c.testCentroids=="number"?(c.testCentroids,v=jC(a,c.k,c.attributes)):es(c.testCentroids)==="object"?v=c.testCentroids:v=jC(a,c.k,c.attributes):v=jC(a,c.k,c.attributes);for(var p=!0,g=0;p&&g<c.maxIterations;){for(var w=0;w<a.length;w++)u=a[w],h[u.id()]=T8(u,v,c.distance,c.attributes,"kMeans");p=!1;for(var _=0;_<c.k;_++){var E=R8(_,a,h);if(E.length!==0){for(var k=c.attributes.length,I=v[_],C=new Array(k),P=new Array(k),A=0;A<k;A++){P[A]=0;for(var L=0;L<E.length;L++)u=E[L],P[A]+=c.attributes[A](u);C[A]=P[A]/E.length,Cbe(C[A],I[A],c.sensitivityThreshold)||(p=!0)}v[_]=C,l[_]=i.collection(E)}}g++}return l},Nbe=function(t){var i=this.cy(),a=this.nodes(),u=null,c=MC(t),l=new Array(c.k),h,v={},p,g=new Array(c.k);c.testMode?typeof c.testCentroids=="number"||(es(c.testCentroids)==="object"?h=c.testCentroids:h=I8(a,c.k)):h=I8(a,c.k);for(var w=!0,_=0;w&&_<c.maxIterations;){for(var E=0;E<a.length;E++)u=a[E],v[u.id()]=T8(u,h,c.distance,c.attributes,"kMedoids");w=!1;for(var k=0;k<h.length;k++){var I=R8(k,a,v);if(I.length!==0){g[k]=C8(h[k],I,c.attributes);for(var C=0;C<I.length;C++)p=C8(I[C],I,c.attributes),p<g[k]&&(g[k]=p,h[k]=I[C],w=!0);l[k]=i.collection(I)}}_++}return l},Obe=function(t,i,a,u,c){for(var l,h,v=0;v<i.length;v++)for(var p=0;p<t.length;p++)u[v][p]=Math.pow(a[v][p],c.m);for(var g=0;g<t.length;g++)for(var w=0;w<c.attributes.length;w++){l=0,h=0;for(var _=0;_<i.length;_++)l+=u[_][g]*c.attributes[w](i[_]),h+=u[_][g];t[g][w]=l/h}},Dbe=function(t,i,a,u,c){for(var l=0;l<t.length;l++)i[l]=t[l].slice();for(var h,v,p,g=2/(c.m-1),w=0;w<a.length;w++)for(var _=0;_<u.length;_++){h=0;for(var E=0;E<a.length;E++)v=zx(c.distance,u[_],a[w],c.attributes,"cmeans"),p=zx(c.distance,u[_],a[E],c.attributes,"cmeans"),h+=Math.pow(v/p,g);t[_][w]=1/h}},Mbe=function(t,i,a,u){for(var c=new Array(a.k),l=0;l<c.length;l++)c[l]=[];for(var h,v,p=0;p<i.length;p++){h=-1/0,v=-1;for(var g=0;g<i[0].length;g++)i[p][g]>h&&(h=i[p][g],v=g);c[v].push(t[p])}for(var w=0;w<c.length;w++)c[w]=u.collection(c[w]);return c},A8=function(t){var i=this.cy(),a=this.nodes(),u=MC(t),c,l,h,v,p;v=new Array(a.length);for(var g=0;g<a.length;g++)v[g]=new Array(u.k);h=new Array(a.length);for(var w=0;w<a.length;w++)h[w]=new Array(u.k);for(var _=0;_<a.length;_++){for(var E=0,k=0;k<u.k;k++)h[_][k]=Math.random(),E+=h[_][k];for(var I=0;I<u.k;I++)h[_][I]=h[_][I]/E}l=new Array(u.k);for(var C=0;C<u.k;C++)l[C]=new Array(u.attributes.length);p=new Array(a.length);for(var P=0;P<a.length;P++)p[P]=new Array(u.k);for(var A=!0,L=0;A&&L<u.maxIterations;)A=!1,Obe(l,a,h,p,u),Dbe(h,v,l,a,u),Abe(h,v,u.sensitivityThreshold)||(A=!0),L++;return c=Mbe(a,h,u,i),{clusters:c,degreeOfMembership:h}},jbe={kMeans:Lbe,kMedoids:Nbe,fuzzyCMeans:A8,fcm:A8},Bbe=qs({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),qbe={single:"min",complete:"max"},Fbe=function(t){var i=Bbe(t),a=qbe[i.linkage];return a!=null&&(i.linkage=a),i},P8=function(t,i,a,u,c){for(var l=0,h=1/0,v,p=c.attributes,g=function($,Y){return Hx(c.distance,p.length,function(V){return p[V]($)},function(V){return p[V](Y)},$,Y)},w=0;w<t.length;w++){var _=t[w].key,E=a[_][u[_]];E<h&&(l=_,h=E)}if(c.mode==="threshold"&&h>=c.threshold||c.mode==="dendrogram"&&t.length===1)return!1;var k=i[l],I=i[u[l]],C;c.mode==="dendrogram"?C={left:k,right:I,key:k.key}:C={value:k.value.concat(I.value),key:k.key},t[k.index]=C,t.splice(I.index,1),i[k.key]=C;for(var P=0;P<t.length;P++){var A=t[P];k.key===A.key?v=1/0:c.linkage==="min"?(v=a[k.key][A.key],a[k.key][A.key]>a[I.key][A.key]&&(v=a[I.key][A.key])):c.linkage==="max"?(v=a[k.key][A.key],a[k.key][A.key]<a[I.key][A.key]&&(v=a[I.key][A.key])):c.linkage==="mean"?v=(a[k.key][A.key]*k.size+a[I.key][A.key]*I.size)/(k.size+I.size):c.mode==="dendrogram"?v=g(A.value,k.value):v=g(A.value[0],k.value[0]),a[k.key][A.key]=a[A.key][k.key]=v}for(var L=0;L<t.length;L++){var O=t[L].key;if(u[O]===k.key||u[O]===I.key){for(var M=O,B=0;B<t.length;B++){var F=t[B].key;a[O][F]<a[O][M]&&(M=F)}u[O]=M}t[L].index=L}return k.key=I.key=k.index=I.index=null,!0},pb=function(t,i,a){t&&(t.value?i.push(t.value):(t.left&&pb(t.left,i),t.right&&pb(t.right,i)))},BC=function(t,i){if(!t)return"";if(t.left&&t.right){var a=BC(t.left,i),u=BC(t.right,i),c=i.add({group:"nodes",data:{id:a+","+u}});return i.add({group:"edges",data:{source:a,target:c.id()}}),i.add({group:"edges",data:{source:u,target:c.id()}}),c.id()}else if(t.value)return t.value.id()},qC=function(t,i,a){if(!t)return[];var u=[],c=[],l=[];return i===0?(t.left&&pb(t.left,u),t.right&&pb(t.right,c),l=u.concat(c),[a.collection(l)]):i===1?t.value?[a.collection(t.value)]:(t.left&&pb(t.left,u),t.right&&pb(t.right,c),[a.collection(u),a.collection(c)]):t.value?[a.collection(t.value)]:(t.left&&(u=qC(t.left,i-1,a)),t.right&&(c=qC(t.right,i-1,a)),u.concat(c))},L8=function(t){for(var i=this.cy(),a=this.nodes(),u=Fbe(t),c=u.attributes,l=function(L,O){return Hx(u.distance,c.length,function(M){return c[M](L)},function(M){return c[M](O)},L,O)},h=[],v=[],p=[],g=[],w=0;w<a.length;w++){var _={value:u.mode==="dendrogram"?a[w]:[a[w]],key:w,index:w};h[w]=_,g[w]=_,v[w]=[],p[w]=0}for(var E=0;E<h.length;E++)for(var k=0;k<=E;k++){var I=void 0;u.mode==="dendrogram"?I=E===k?1/0:l(h[E].value,h[k].value):I=E===k?1/0:l(h[E].value[0],h[k].value[0]),v[E][k]=I,v[k][E]=I,I<v[E][p[E]]&&(p[E]=k)}for(var C=P8(h,g,v,p,u);C;)C=P8(h,g,v,p,u);var P;return u.mode==="dendrogram"?(P=qC(h[0],u.dendrogramDepth,i),u.addDendrogram&&BC(h[0],i)):(P=new Array(h.length),h.forEach(function(A,L){A.key=A.index=null,P[L]=i.collection(A.value)})),P},$be={hierarchicalClustering:L8,hca:L8},Gbe=qs({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),Hbe=function(t){var i=t.damping,a=t.preference;.5<=i&&i<1||qi("Damping must range on [0.5, 1). Got: ".concat(i));var u=["median","mean","min","max"];return u.some(function(c){return c===a})||Ft(a)||qi("Preference must be one of [".concat(u.map(function(c){return"'".concat(c,"'")}).join(", "),"] or a number. Got: ").concat(a)),Gbe(t)},zbe=function(t,i,a,u){var c=function(h,v){return u[v](h)};return-Hx(t,u.length,function(l){return c(i,l)},function(l){return c(a,l)},i,a)},Vbe=function(t,i){var a=null;return i==="median"?a=Hge(t):i==="mean"?a=Gge(t):i==="min"?a=Fge(t):i==="max"?a=$ge(t):a=i,a},Ube=function(t,i,a){for(var u=[],c=0;c<t;c++)i[c*t+c]+a[c*t+c]>0&&u.push(c);return u},N8=function(t,i,a){for(var u=[],c=0;c<t;c++){for(var l=-1,h=-1/0,v=0;v<a.length;v++){var p=a[v];i[c*t+p]>h&&(l=p,h=i[c*t+p])}l>0&&u.push(l)}for(var g=0;g<a.length;g++)u[a[g]]=a[g];return u},Ybe=function(t,i,a){for(var u=N8(t,i,a),c=0;c<a.length;c++){for(var l=[],h=0;h<u.length;h++)u[h]===a[c]&&l.push(h);for(var v=-1,p=-1/0,g=0;g<l.length;g++){for(var w=0,_=0;_<l.length;_++)w+=i[l[_]*t+l[g]];w>p&&(v=g,p=w)}a[c]=l[v]}return u=N8(t,i,a),u},O8=function(t){for(var i=this.cy(),a=this.nodes(),u=Hbe(t),c={},l=0;l<a.length;l++)c[a[l].id()]=l;var h,v,p,g,w,_;h=a.length,v=h*h,p=new Array(v);for(var E=0;E<v;E++)p[E]=-1/0;for(var k=0;k<h;k++)for(var I=0;I<h;I++)k!==I&&(p[k*h+I]=zbe(u.distance,a[k],a[I],u.attributes));g=Vbe(p,u.preference);for(var C=0;C<h;C++)p[C*h+C]=g;w=new Array(v);for(var P=0;P<v;P++)w[P]=0;_=new Array(v);for(var A=0;A<v;A++)_[A]=0;for(var L=new Array(h),O=new Array(h),M=new Array(h),B=0;B<h;B++)L[B]=0,O[B]=0,M[B]=0;for(var F=new Array(h*u.minIterations),q=0;q<F.length;q++)F[q]=0;var $;for($=0;$<u.maxIterations;$++){for(var Y=0;Y<h;Y++){for(var V=-1/0,U=-1/0,G=-1,X=0,ne=0;ne<h;ne++)L[ne]=w[Y*h+ne],X=_[Y*h+ne]+p[Y*h+ne],X>=V?(U=V,V=X,G=ne):X>U&&(U=X);for(var ae=0;ae<h;ae++)w[Y*h+ae]=(1-u.damping)*(p[Y*h+ae]-V)+u.damping*L[ae];w[Y*h+G]=(1-u.damping)*(p[Y*h+G]-U)+u.damping*L[G]}for(var oe=0;oe<h;oe++){for(var le=0,pe=0;pe<h;pe++)L[pe]=_[pe*h+oe],O[pe]=Math.max(0,w[pe*h+oe]),le+=O[pe];le-=O[oe],O[oe]=w[oe*h+oe],le+=O[oe];for(var ge=0;ge<h;ge++)_[ge*h+oe]=(1-u.damping)*Math.min(0,le-O[ge])+u.damping*L[ge];_[oe*h+oe]=(1-u.damping)*(le-O[oe])+u.damping*L[oe]}for(var de=0,Se=0;Se<h;Se++){var Ne=_[Se*h+Se]+w[Se*h+Se]>0?1:0;F[$%u.minIterations*h+Se]=Ne,de+=Ne}if(de>0&&($>=u.minIterations-1||$==u.maxIterations-1)){for(var ye=0,we=0;we<h;we++){M[we]=0;for(var Pe=0;Pe<u.minIterations;Pe++)M[we]+=F[Pe*h+we];(M[we]===0||M[we]===u.minIterations)&&ye++}if(ye===h)break}}for(var Fe=Ube(h,w,_),Ue=Ybe(h,p,Fe),He={},De=0;De<Fe.length;De++)He[Fe[De]]=[];for(var Ce=0;Ce<a.length;Ce++){var Be=c[a[Ce].id()],ve=Ue[Be];ve!=null&&He[ve].push(a[Ce])}for(var ke=new Array(Fe.length),je=0;je<Fe.length;je++)ke[je]=i.collection(He[Fe[je]]);return ke},Wbe={affinityPropagation:O8,ap:O8},Kbe=qs({root:void 0,directed:!1}),Xbe={hierholzer:function(t){if(!Sr(t)){var i=arguments;t={root:i[0],directed:i[1]}}var a=Kbe(t),u=a.root,c=a.directed,l=this,h=!1,v,p,g;u&&(g=hn(u)?this.filter(u)[0].id():u[0].id());var w={},_={};c?l.forEach(function(A){var L=A.id();if(A.isNode()){var O=A.indegree(!0),M=A.outdegree(!0),B=O-M,F=M-O;B==1?v?h=!0:v=L:F==1?p?h=!0:p=L:(F>1||B>1)&&(h=!0),w[L]=[],A.outgoers().forEach(function(q){q.isEdge()&&w[L].push(q.id())})}else _[L]=[void 0,A.target().id()]}):l.forEach(function(A){var L=A.id();if(A.isNode()){var O=A.degree(!0);O%2&&(v?p?h=!0:p=L:v=L),w[L]=[],A.connectedEdges().forEach(function(M){return w[L].push(M.id())})}else _[L]=[A.source().id(),A.target().id()]});var E={found:!1,trail:void 0};if(h)return E;if(p&&v)if(c){if(g&&p!=g)return E;g=p}else{if(g&&p!=g&&v!=g)return E;g||(g=p)}else g||(g=l[0].id());var k=function(L){for(var O=L,M=[L],B,F,q;w[O].length;)B=w[O].shift(),F=_[B][0],q=_[B][1],O!=q?(w[q]=w[q].filter(function($){return $!=B}),O=q):!c&&O!=F&&(w[F]=w[F].filter(function($){return $!=B}),O=F),M.unshift(B),M.unshift(O);return M},I=[],C=[];for(C=k(g);C.length!=1;)w[C[0]].length==0?(I.unshift(l.getElementById(C.shift())),I.unshift(l.getElementById(C.shift()))):C=k(C.shift()).concat(C);I.unshift(l.getElementById(C.shift()));for(var P in w)if(w[P].length)return E;return E.found=!0,E.trail=this.spawn(I,!0),E}},Vx=function(){var t=this,i={},a=0,u=0,c=[],l=[],h={},v=function(_,E){for(var k=l.length-1,I=[],C=t.spawn();l[k].x!=_||l[k].y!=E;)I.push(l.pop().edge),k--;I.push(l.pop().edge),I.forEach(function(P){var A=P.connectedNodes().intersection(t);C.merge(P),A.forEach(function(L){var O=L.id(),M=L.connectedEdges().intersection(t);C.merge(L),i[O].cutVertex?C.merge(M.filter(function(B){return B.isLoop()})):C.merge(M)})}),c.push(C)},p=function(_,E,k){_===k&&(u+=1),i[E]={id:a,low:a++,cutVertex:!1};var I=t.getElementById(E).connectedEdges().intersection(t);if(I.size()===0)c.push(t.spawn(t.getElementById(E)));else{var C,P,A,L;I.forEach(function(O){C=O.source().id(),P=O.target().id(),A=C===E?P:C,A!==k&&(L=O.id(),h[L]||(h[L]=!0,l.push({x:E,y:A,edge:O})),A in i?i[E].low=Math.min(i[E].low,i[A].id):(p(_,A,E),i[E].low=Math.min(i[E].low,i[A].low),i[E].id<=i[A].low&&(i[E].cutVertex=!0,v(E,A))))})}};t.forEach(function(w){if(w.isNode()){var _=w.id();_ in i||(u=0,p(_,_),i[_].cutVertex=u>1)}});var g=Object.keys(i).filter(function(w){return i[w].cutVertex}).map(function(w){return t.getElementById(w)});return{cut:t.spawn(g),components:c}},Jbe={hopcroftTarjanBiconnected:Vx,htbc:Vx,htb:Vx,hopcroftTarjanBiconnectedComponents:Vx},Ux=function(){var t=this,i={},a=0,u=[],c=[],l=t.spawn(t),h=function(p){c.push(p),i[p]={index:a,low:a++,explored:!1};var g=t.getElementById(p).connectedEdges().intersection(t);if(g.forEach(function(I){var C=I.target().id();C!==p&&(C in i||h(C),i[C].explored||(i[p].low=Math.min(i[p].low,i[C].low)))}),i[p].index===i[p].low){for(var w=t.spawn();;){var _=c.pop();if(w.merge(t.getElementById(_)),i[_].low=i[p].index,i[_].explored=!0,_===p)break}var E=w.edgesWith(w),k=w.merge(E);u.push(k),l=l.difference(k)}};return t.forEach(function(v){if(v.isNode()){var p=v.id();p in i||h(p)}}),{cut:l,components:u}},Qbe={tarjanStronglyConnected:Ux,tsc:Ux,tscc:Ux,tarjanStronglyConnectedComponents:Ux},D8={};[p1,Ige,Cge,Pge,Nge,Dge,Bge,fbe,hb,db,DC,kbe,jbe,$be,Wbe,Xbe,Jbe,Qbe].forEach(function(r){yn(D8,r)});/*!
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 M8=0,j8=1,B8=2,Kc=function(t){if(!(this instanceof Kc))return new Kc(t);this.id="Thenable/1.0.7",this.state=M8,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))};Kc.prototype={fulfill:function(t){return q8(this,j8,"fulfillValue",t)},reject:function(t){return q8(this,B8,"rejectReason",t)},then:function(t,i){var a=this,u=new Kc;return a.onFulfilled.push(G8(t,u,"fulfill")),a.onRejected.push(G8(i,u,"reject")),F8(a),u.proxy}};var q8=function(t,i,a,u){return t.state===M8&&(t.state=i,t[a]=u,F8(t)),t},F8=function(t){t.state===j8?$8(t,"onFulfilled",t.fulfillValue):t.state===B8&&$8(t,"onRejected",t.rejectReason)},$8=function(t,i,a){if(t[i].length!==0){var u=t[i];t[i]=[];var c=function(){for(var h=0;h<u.length;h++)u[h](a)};typeof setImmediate=="function"?setImmediate(c):setTimeout(c,0)}},G8=function(t,i,a){return function(u){if(typeof t!="function")i[a].call(i,u);else{var c;try{c=t(u)}catch(l){i.reject(l);return}H8(i,c)}}},H8=function(t,i){if(t===i||t.proxy===i){t.reject(new TypeError("cannot resolve promise with itself"));return}var a;if(es(i)==="object"&&i!==null||typeof i=="function")try{a=i.then}catch(c){t.reject(c);return}if(typeof a=="function"){var u=!1;try{a.call(i,function(c){u||(u=!0,c===i?t.reject(new TypeError("circular thenable chain")):H8(t,c))},function(c){u||(u=!0,t.reject(c))})}catch(c){u||t.reject(c)}return}t.fulfill(i)};Kc.all=function(r){return new Kc(function(t,i){for(var a=new Array(r.length),u=0,c=function(v,p){a[v]=p,u++,u===r.length&&t(a)},l=0;l<r.length;l++)(function(h){var v=r[h],p=v!=null&&v.then!=null;if(p)v.then(function(w){c(h,w)},function(w){i(w)});else{var g=v;c(h,g)}})(l)})},Kc.resolve=function(r){return new Kc(function(t,i){t(r)})},Kc.reject=function(r){return new Kc(function(t,i){i(r)})};var gb=typeof Promise<"u"?Promise:Kc,FC=function(t,i,a){var u=rC(t),c=!u,l=this._private=yn({duration:1e3},i,a);if(l.target=t,l.style=l.style||l.css,l.started=!1,l.playing=!1,l.hooked=!1,l.applying=!1,l.progress=0,l.completes=[],l.frames=[],l.complete&&Ji(l.complete)&&l.completes.push(l.complete),c){var h=t.position();l.startPosition=l.startPosition||{x:h.x,y:h.y},l.startStyle=l.startStyle||t.cy().style().getAnimationStartStyle(t,l.style)}if(u){var v=t.pan();l.startPan={x:v.x,y:v.y},l.startZoom=t.zoom()}this.length=1,this[0]=this},cp=FC.prototype;yn(cp,{instanceString:function(){return"animation"},hook:function(){var t=this._private;if(!t.hooked){var i,a=t.target._private.animation;t.queue?i=a.queue:i=a.current,i.push(this),Pu(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 i=this._private;return t===void 0?i.progress*i.duration:this.progress(t/i.duration)},progress:function(t){var i=this._private,a=i.playing;return t===void 0?i.progress:(a&&this.pause(),i.progress=t,i.started=!1,a&&this.play(),this)},completed:function(){return this._private.progress===1},reverse:function(){var t=this._private,i=t.playing;i&&this.pause(),t.progress=1-t.progress,t.started=!1;var a=function(p,g){var w=t[p];w!=null&&(t[p]=t[g],t[g]=w)};if(a("zoom","startZoom"),a("pan","startPan"),a("position","startPosition"),t.style)for(var u=0;u<t.style.length;u++){var c=t.style[u],l=c.name,h=t.startStyle[l];t.startStyle[l]=c,t.style[u]=h}return i&&this.play(),this},promise:function(t){var i=this._private,a;switch(t){case"frame":a=i.frames;break;default:case"complete":case"completed":a=i.completes}return new gb(function(u,c){a.push(function(){u()})})}}),cp.complete=cp.completed,cp.run=cp.play,cp.running=cp.playing;var Zbe={animated:function(){return function(){var i=this,a=i.length!==void 0,u=a?i:[i],c=this._private.cy||this;if(!c.styleEnabled())return!1;var l=u[0];if(l)return l._private.animation.current.length>0}},clearQueue:function(){return function(){var i=this,a=i.length!==void 0,u=a?i:[i],c=this._private.cy||this;if(!c.styleEnabled())return this;for(var l=0;l<u.length;l++){var h=u[l];h._private.animation.queue=[]}return this}},delay:function(){return function(i,a){var u=this._private.cy||this;return u.styleEnabled()?this.animate({delay:i,duration:i,complete:a}):this}},delayAnimation:function(){return function(i,a){var u=this._private.cy||this;return u.styleEnabled()?this.animation({delay:i,duration:i,complete:a}):this}},animation:function(){return function(i,a){var u=this,c=u.length!==void 0,l=c?u:[u],h=this._private.cy||this,v=!c,p=!v;if(!h.styleEnabled())return this;var g=h.style();i=yn({},i,a);var w=Object.keys(i).length===0;if(w)return new FC(l[0],i);switch(i.duration===void 0&&(i.duration=400),i.duration){case"slow":i.duration=600;break;case"fast":i.duration=200;break}if(p&&(i.style=g.getPropsList(i.style||i.css),i.css=void 0),p&&i.renderedPosition!=null){var _=i.renderedPosition,E=h.pan(),k=h.zoom();i.position=f8(_,k,E)}if(v&&i.panBy!=null){var I=i.panBy,C=h.pan();i.pan={x:C.x+I.x,y:C.y+I.y}}var P=i.center||i.centre;if(v&&P!=null){var A=h.getCenterPan(P.eles,i.zoom);A!=null&&(i.pan=A)}if(v&&i.fit!=null){var L=i.fit,O=h.getFitViewport(L.eles||L.boundingBox,L.padding);O!=null&&(i.pan=O.pan,i.zoom=O.zoom)}if(v&&Sr(i.zoom)){var M=h.getZoomedViewport(i.zoom);M!=null?(M.zoomed&&(i.zoom=M.zoom),M.panned&&(i.pan=M.pan)):i.zoom=null}return new FC(l[0],i)}},animate:function(){return function(i,a){var u=this,c=u.length!==void 0,l=c?u:[u],h=this._private.cy||this;if(!h.styleEnabled())return this;a&&(i=yn({},i,a));for(var v=0;v<l.length;v++){var p=l[v],g=p.animated()&&(i.queue===void 0||i.queue),w=p.animation(i,g?{queue:!0}:void 0);w.play()}return this}},stop:function(){return function(i,a){var u=this,c=u.length!==void 0,l=c?u:[u],h=this._private.cy||this;if(!h.styleEnabled())return this;for(var v=0;v<l.length;v++){for(var p=l[v],g=p._private,w=g.animation.current,_=0;_<w.length;_++){var E=w[_],k=E._private;a&&(k.duration=0)}i&&(g.animation.queue=[]),a||(g.animation.current=[])}return h.notify("draw"),this}}},$C,z8;function Yx(){if(z8)return $C;z8=1;var r=Array.isArray;return $C=r,$C}var GC,V8;function eye(){if(V8)return GC;V8=1;var r=Yx(),t=f1(),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function u(c,l){if(r(c))return!1;var h=typeof c;return h=="number"||h=="symbol"||h=="boolean"||c==null||t(c)?!0:a.test(c)||!i.test(c)||l!=null&&c in Object(l)}return GC=u,GC}var HC,U8;function tye(){if(U8)return HC;U8=1;var r=U$(),t=l1(),i="[object AsyncFunction]",a="[object Function]",u="[object GeneratorFunction]",c="[object Proxy]";function l(h){if(!t(h))return!1;var v=r(h);return v==a||v==u||v==i||v==c}return HC=l,HC}var zC,Y8;function nye(){if(Y8)return zC;Y8=1;var r=Ax(),t=r["__core-js_shared__"];return zC=t,zC}var VC,W8;function rye(){if(W8)return VC;W8=1;var r=nye(),t=function(){var a=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}();function i(a){return!!t&&t in a}return VC=i,VC}var UC,K8;function iye(){if(K8)return UC;K8=1;var r=Function.prototype,t=r.toString;function i(a){if(a!=null){try{return t.call(a)}catch{}try{return a+""}catch{}}return""}return UC=i,UC}var YC,X8;function aye(){if(X8)return YC;X8=1;var r=tye(),t=rye(),i=l1(),a=iye(),u=/[\\^$.*+?()[\]{}|]/g,c=/^\[object .+?Constructor\]$/,l=Function.prototype,h=Object.prototype,v=l.toString,p=h.hasOwnProperty,g=RegExp("^"+v.call(p).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function w(_){if(!i(_)||t(_))return!1;var E=r(_)?g:c;return E.test(a(_))}return YC=w,YC}var WC,J8;function sye(){if(J8)return WC;J8=1;function r(t,i){return t==null?void 0:t[i]}return WC=r,WC}var KC,Q8;function XC(){if(Q8)return KC;Q8=1;var r=aye(),t=sye();function i(a,u){var c=t(a,u);return r(c)?c:void 0}return KC=i,KC}var JC,Z8;function Wx(){if(Z8)return JC;Z8=1;var r=XC(),t=r(Object,"create");return JC=t,JC}var QC,e9;function oye(){if(e9)return QC;e9=1;var r=Wx();function t(){this.__data__=r?r(null):{},this.size=0}return QC=t,QC}var ZC,t9;function uye(){if(t9)return ZC;t9=1;function r(t){var i=this.has(t)&&delete this.__data__[t];return this.size-=i?1:0,i}return ZC=r,ZC}var eA,n9;function cye(){if(n9)return eA;n9=1;var r=Wx(),t="__lodash_hash_undefined__",i=Object.prototype,a=i.hasOwnProperty;function u(c){var l=this.__data__;if(r){var h=l[c];return h===t?void 0:h}return a.call(l,c)?l[c]:void 0}return eA=u,eA}var tA,r9;function lye(){if(r9)return tA;r9=1;var r=Wx(),t=Object.prototype,i=t.hasOwnProperty;function a(u){var c=this.__data__;return r?c[u]!==void 0:i.call(c,u)}return tA=a,tA}var nA,i9;function fye(){if(i9)return nA;i9=1;var r=Wx(),t="__lodash_hash_undefined__";function i(a,u){var c=this.__data__;return this.size+=this.has(a)?0:1,c[a]=r&&u===void 0?t:u,this}return nA=i,nA}var rA,a9;function hye(){if(a9)return rA;a9=1;var r=oye(),t=uye(),i=cye(),a=lye(),u=fye();function c(l){var h=-1,v=l==null?0:l.length;for(this.clear();++h<v;){var p=l[h];this.set(p[0],p[1])}}return c.prototype.clear=r,c.prototype.delete=t,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,rA=c,rA}var iA,s9;function dye(){if(s9)return iA;s9=1;function r(){this.__data__=[],this.size=0}return iA=r,iA}var aA,o9;function u9(){if(o9)return aA;o9=1;function r(t,i){return t===i||t!==t&&i!==i}return aA=r,aA}var sA,c9;function Kx(){if(c9)return sA;c9=1;var r=u9();function t(i,a){for(var u=i.length;u--;)if(r(i[u][0],a))return u;return-1}return sA=t,sA}var oA,l9;function vye(){if(l9)return oA;l9=1;var r=Kx(),t=Array.prototype,i=t.splice;function a(u){var c=this.__data__,l=r(c,u);if(l<0)return!1;var h=c.length-1;return l==h?c.pop():i.call(c,l,1),--this.size,!0}return oA=a,oA}var uA,f9;function pye(){if(f9)return uA;f9=1;var r=Kx();function t(i){var a=this.__data__,u=r(a,i);return u<0?void 0:a[u][1]}return uA=t,uA}var cA,h9;function gye(){if(h9)return cA;h9=1;var r=Kx();function t(i){return r(this.__data__,i)>-1}return cA=t,cA}var lA,d9;function bye(){if(d9)return lA;d9=1;var r=Kx();function t(i,a){var u=this.__data__,c=r(u,i);return c<0?(++this.size,u.push([i,a])):u[c][1]=a,this}return lA=t,lA}var fA,v9;function yye(){if(v9)return fA;v9=1;var r=dye(),t=vye(),i=pye(),a=gye(),u=bye();function c(l){var h=-1,v=l==null?0:l.length;for(this.clear();++h<v;){var p=l[h];this.set(p[0],p[1])}}return c.prototype.clear=r,c.prototype.delete=t,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,fA=c,fA}var hA,p9;function mye(){if(p9)return hA;p9=1;var r=XC(),t=Ax(),i=r(t,"Map");return hA=i,hA}var dA,g9;function wye(){if(g9)return dA;g9=1;var r=hye(),t=yye(),i=mye();function a(){this.size=0,this.__data__={hash:new r,map:new(i||t),string:new r}}return dA=a,dA}var vA,b9;function _ye(){if(b9)return vA;b9=1;function r(t){var i=typeof t;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?t!=="__proto__":t===null}return vA=r,vA}var pA,y9;function Xx(){if(y9)return pA;y9=1;var r=_ye();function t(i,a){var u=i.__data__;return r(a)?u[typeof a=="string"?"string":"hash"]:u.map}return pA=t,pA}var gA,m9;function xye(){if(m9)return gA;m9=1;var r=Xx();function t(i){var a=r(this,i).delete(i);return this.size-=a?1:0,a}return gA=t,gA}var bA,w9;function Eye(){if(w9)return bA;w9=1;var r=Xx();function t(i){return r(this,i).get(i)}return bA=t,bA}var yA,_9;function kye(){if(_9)return yA;_9=1;var r=Xx();function t(i){return r(this,i).has(i)}return yA=t,yA}var mA,x9;function Sye(){if(x9)return mA;x9=1;var r=Xx();function t(i,a){var u=r(this,i),c=u.size;return u.set(i,a),this.size+=u.size==c?0:1,this}return mA=t,mA}var wA,E9;function Tye(){if(E9)return wA;E9=1;var r=wye(),t=xye(),i=Eye(),a=kye(),u=Sye();function c(l){var h=-1,v=l==null?0:l.length;for(this.clear();++h<v;){var p=l[h];this.set(p[0],p[1])}}return c.prototype.clear=r,c.prototype.delete=t,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,wA=c,wA}var _A,k9;function Rye(){if(k9)return _A;k9=1;var r=Tye(),t="Expected a function";function i(a,u){if(typeof a!="function"||u!=null&&typeof u!="function")throw new TypeError(t);var c=function(){var l=arguments,h=u?u.apply(this,l):l[0],v=c.cache;if(v.has(h))return v.get(h);var p=a.apply(this,l);return c.cache=v.set(h,p)||v,p};return c.cache=new(i.Cache||r),c}return i.Cache=r,_A=i,_A}var xA,S9;function Iye(){if(S9)return xA;S9=1;var r=Rye(),t=500;function i(a){var u=r(a,function(l){return c.size===t&&c.clear(),l}),c=u.cache;return u}return xA=i,xA}var EA,T9;function R9(){if(T9)return EA;T9=1;var r=Iye(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r(function(u){var c=[];return u.charCodeAt(0)===46&&c.push(""),u.replace(t,function(l,h,v,p){c.push(v?p.replace(i,"$1"):h||l)}),c});return EA=a,EA}var kA,I9;function C9(){if(I9)return kA;I9=1;function r(t,i){for(var a=-1,u=t==null?0:t.length,c=Array(u);++a<u;)c[a]=i(t[a],a,t);return c}return kA=r,kA}var SA,A9;function Cye(){if(A9)return SA;A9=1;var r=hC(),t=C9(),i=Yx(),a=f1(),u=r?r.prototype:void 0,c=u?u.toString:void 0;function l(h){if(typeof h=="string")return h;if(i(h))return t(h,l)+"";if(a(h))return c?c.call(h):"";var v=h+"";return v=="0"&&1/h==-1/0?"-0":v}return SA=l,SA}var TA,P9;function L9(){if(P9)return TA;P9=1;var r=Cye();function t(i){return i==null?"":r(i)}return TA=t,TA}var RA,N9;function O9(){if(N9)return RA;N9=1;var r=Yx(),t=eye(),i=R9(),a=L9();function u(c,l){return r(c)?c:t(c,l)?[c]:i(a(c))}return RA=u,RA}var IA,D9;function CA(){if(D9)return IA;D9=1;var r=f1();function t(i){if(typeof i=="string"||r(i))return i;var a=i+"";return a=="0"&&1/i==-1/0?"-0":a}return IA=t,IA}var AA,M9;function Aye(){if(M9)return AA;M9=1;var r=O9(),t=CA();function i(a,u){u=r(u,a);for(var c=0,l=u.length;a!=null&&c<l;)a=a[t(u[c++])];return c&&c==l?a:void 0}return AA=i,AA}var PA,j9;function Pye(){if(j9)return PA;j9=1;var r=Aye();function t(i,a,u){var c=i==null?void 0:r(i,a);return c===void 0?u:c}return PA=t,PA}var Lye=Pye(),Nye=c1(Lye),LA,B9;function Oye(){if(B9)return LA;B9=1;var r=XC(),t=function(){try{var i=r(Object,"defineProperty");return i({},"",{}),i}catch{}}();return LA=t,LA}var NA,q9;function Dye(){if(q9)return NA;q9=1;var r=Oye();function t(i,a,u){a=="__proto__"&&r?r(i,a,{configurable:!0,enumerable:!0,value:u,writable:!0}):i[a]=u}return NA=t,NA}var OA,F9;function Mye(){if(F9)return OA;F9=1;var r=Dye(),t=u9(),i=Object.prototype,a=i.hasOwnProperty;function u(c,l,h){var v=c[l];(!(a.call(c,l)&&t(v,h))||h===void 0&&!(l in c))&&r(c,l,h)}return OA=u,OA}var DA,$9;function jye(){if($9)return DA;$9=1;var r=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function i(a,u){var c=typeof a;return u=u??r,!!u&&(c=="number"||c!="symbol"&&t.test(a))&&a>-1&&a%1==0&&a<u}return DA=i,DA}var MA,G9;function Bye(){if(G9)return MA;G9=1;var r=Mye(),t=O9(),i=jye(),a=l1(),u=CA();function c(l,h,v,p){if(!a(l))return l;h=t(h,l);for(var g=-1,w=h.length,_=w-1,E=l;E!=null&&++g<w;){var k=u(h[g]),I=v;if(k==="__proto__"||k==="constructor"||k==="prototype")return l;if(g!=_){var C=E[k];I=p?p(C,k,E):void 0,I===void 0&&(I=a(C)?C:i(h[g+1])?[]:{})}r(E,k,I),E=E[k]}return l}return MA=c,MA}var jA,H9;function qye(){if(H9)return jA;H9=1;var r=Bye();function t(i,a,u){return i==null?i:r(i,a,u)}return jA=t,jA}var Fye=qye(),$ye=c1(Fye),BA,z9;function Gye(){if(z9)return BA;z9=1;function r(t,i){var a=-1,u=t.length;for(i||(i=Array(u));++a<u;)i[a]=t[a];return i}return BA=r,BA}var qA,V9;function Hye(){if(V9)return qA;V9=1;var r=C9(),t=Gye(),i=Yx(),a=f1(),u=R9(),c=CA(),l=L9();function h(v){return i(v)?r(v,c):a(v)?[v]:t(u(l(v)))}return qA=h,qA}var zye=Hye(),Vye=c1(zye),Uye={data:function(t){var i={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:function(u){},beforeSet:function(u,c){},onSet:function(u){},canSet:function(u){return!0}};return t=yn({},i,t),function(u,c){var l=t,h=this,v=h.length!==void 0,p=v?h:[h],g=v?h[0]:h;if(hn(u)){var w=u.indexOf(".")!==-1,_=w&&Vye(u);if(l.allowGetting&&c===void 0){var E;return g&&(l.beforeGet(g),_&&g._private[l.field][u]===void 0?E=Nye(g._private[l.field],_):E=g._private[l.field][u]),E}else if(l.allowSetting&&c!==void 0){var k=!l.immutableKeys[u];if(k){var I=k$({},u,c);l.beforeSet(h,I);for(var C=0,P=p.length;C<P;C++){var A=p[C];l.canSet(A)&&(_&&g._private[l.field][u]===void 0?$ye(A._private[l.field],_,c):A._private[l.field][u]=c)}l.updateStyle&&h.updateStyle(),l.onSet(h),l.settingTriggersEvent&&h[l.triggerFnName](l.settingEvent)}}}else if(l.allowSetting&&Sr(u)){var L=u,O,M,B=Object.keys(L);l.beforeSet(h,L);for(var F=0;F<B.length;F++){O=B[F],M=L[O];var q=!l.immutableKeys[O];if(q)for(var $=0;$<p.length;$++){var Y=p[$];l.canSet(Y)&&(Y._private[l.field][O]=M)}}l.updateStyle&&h.updateStyle(),l.onSet(h),l.settingTriggersEvent&&h[l.triggerFnName](l.settingEvent)}else if(l.allowBinding&&Ji(u)){var V=u;h.on(l.bindingEvent,V)}else if(l.allowGetting&&u===void 0){var U;return g&&(l.beforeGet(g),U=g._private[l.field]),U}return h}},removeData:function(t){var i={field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}};return t=yn({},i,t),function(u){var c=t,l=this,h=l.length!==void 0,v=h?l:[l];if(hn(u)){for(var p=u.split(/\s+/),g=p.length,w=0;w<g;w++){var _=p[w];if(!xd(_)){var E=!c.immutableKeys[_];if(E)for(var k=0,I=v.length;k<I;k++)v[k]._private[c.field][_]=void 0}}c.triggerEvent&&l[c.triggerFnName](c.event)}else if(u===void 0){for(var C=0,P=v.length;C<P;C++)for(var A=v[C]._private[c.field],L=Object.keys(A),O=0;O<L.length;O++){var M=L[O],B=!c.immutableKeys[M];B&&(A[M]=void 0)}c.triggerEvent&&l[c.triggerFnName](c.event)}return l}}},Yye={eventAliasesOn:function(t){var i=t;i.addListener=i.listen=i.bind=i.on,i.unlisten=i.unbind=i.off=i.removeListener,i.trigger=i.emit,i.pon=i.promiseOn=function(a,u){var c=this,l=Array.prototype.slice.call(arguments,0);return new gb(function(h,v){var p=function(E){c.off.apply(c,w),h(E)},g=l.concat([p]),w=g.concat([]);c.on.apply(c,g)})}}},zr={};[Zbe,Uye,Yye].forEach(function(r){yn(zr,r)});var Wye={animate:zr.animate(),animation:zr.animation(),animated:zr.animated(),clearQueue:zr.clearQueue(),delay:zr.delay(),delayAnimation:zr.delayAnimation(),stop:zr.stop()},Jx={classes:function(t){var i=this;if(t===void 0){var a=[];return i[0]._private.classes.forEach(function(k){return a.push(k)}),a}else di(t)||(t=(t||"").match(/\S+/g)||[]);for(var u=[],c=new cb(t),l=0;l<i.length;l++){for(var h=i[l],v=h._private,p=v.classes,g=!1,w=0;w<t.length;w++){var _=t[w],E=p.has(_);if(!E){g=!0;break}}g||(g=p.size!==t.length),g&&(v.classes=c,u.push(h))}return u.length>0&&this.spawn(u).updateStyle().emit("class"),i},addClass:function(t){return this.toggleClass(t,!0)},hasClass:function(t){var i=this[0];return i!=null&&i._private.classes.has(t)},toggleClass:function(t,i){di(t)||(t=t.match(/\S+/g)||[]);for(var a=this,u=i===void 0,c=[],l=0,h=a.length;l<h;l++)for(var v=a[l],p=v._private.classes,g=!1,w=0;w<t.length;w++){var _=t[w],E=p.has(_),k=!1;i||u&&!E?(p.add(_),k=!0):(!i||u&&E)&&(p.delete(_),k=!0),!g&&k&&(c.push(v),g=!0)}return c.length>0&&this.spawn(c).updateStyle().emit("class"),a},removeClass:function(t){return this.toggleClass(t,!1)},flashClass:function(t,i){var a=this;if(i==null)i=250;else if(i===0)return a;return a.addClass(t),setTimeout(function(){a.removeClass(t)},i),a}};Jx.className=Jx.classNames=Jx.classes;var Tr={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:ns,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Tr.variable="(?:[\\w-.]|(?:\\\\"+Tr.metaChar+"))+",Tr.className="(?:[\\w-]|(?:\\\\"+Tr.metaChar+"))+",Tr.value=Tr.string+"|"+Tr.number,Tr.id=Tr.variable,function(){var r,t,i;for(r=Tr.comparatorOp.split("|"),i=0;i<r.length;i++)t=r[i],Tr.comparatorOp+="|@"+t;for(r=Tr.comparatorOp.split("|"),i=0;i<r.length;i++)t=r[i],!(t.indexOf("!")>=0)&&t!=="="&&(Tr.comparatorOp+="|\\!"+t)}();var oi=function(){return{checks:[]}},Jt={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},FA=[{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(r,t){return Upe(r.selector,t.selector)}),Kye=function(){for(var r={},t,i=0;i<FA.length;i++)t=FA[i],r[t.selector]=t.matches;return r}(),Xye=function(t,i){return Kye[t](i)},Jye="("+FA.map(function(r){return r.selector}).join("|")+")",bb=function(t){return t.replace(new RegExp("\\\\("+Tr.metaChar+")","g"),function(i,a){return a})},Cd=function(t,i,a){t[t.length-1]=a},$A=[{name:"group",query:!0,regex:"("+Tr.group+")",populate:function(t,i,a){var u=ja(a,1),c=u[0];i.checks.push({type:Jt.GROUP,value:c==="*"?c:c+"s"})}},{name:"state",query:!0,regex:Jye,populate:function(t,i,a){var u=ja(a,1),c=u[0];i.checks.push({type:Jt.STATE,value:c})}},{name:"id",query:!0,regex:"\\#("+Tr.id+")",populate:function(t,i,a){var u=ja(a,1),c=u[0];i.checks.push({type:Jt.ID,value:bb(c)})}},{name:"className",query:!0,regex:"\\.("+Tr.className+")",populate:function(t,i,a){var u=ja(a,1),c=u[0];i.checks.push({type:Jt.CLASS,value:bb(c)})}},{name:"dataExists",query:!0,regex:"\\[\\s*("+Tr.variable+")\\s*\\]",populate:function(t,i,a){var u=ja(a,1),c=u[0];i.checks.push({type:Jt.DATA_EXIST,field:bb(c)})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+Tr.variable+")\\s*("+Tr.comparatorOp+")\\s*("+Tr.value+")\\s*\\]",populate:function(t,i,a){var u=ja(a,3),c=u[0],l=u[1],h=u[2],v=new RegExp("^"+Tr.string+"$").exec(h)!=null;v?h=h.substring(1,h.length-1):h=parseFloat(h),i.checks.push({type:Jt.DATA_COMPARE,field:bb(c),operator:l,value:h})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+Tr.boolOp+")\\s*("+Tr.variable+")\\s*\\]",populate:function(t,i,a){var u=ja(a,2),c=u[0],l=u[1];i.checks.push({type:Jt.DATA_BOOL,field:bb(l),operator:c})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+Tr.meta+")\\s*("+Tr.comparatorOp+")\\s*("+Tr.number+")\\s*\\]\\]",populate:function(t,i,a){var u=ja(a,3),c=u[0],l=u[1],h=u[2];i.checks.push({type:Jt.META_COMPARE,field:bb(c),operator:l,value:parseFloat(h)})}},{name:"nextQuery",separator:!0,regex:Tr.separator,populate:function(t,i){var a=t.currentSubject,u=t.edgeCount,c=t.compoundCount,l=t[t.length-1];a!=null&&(l.subject=a,t.currentSubject=null),l.edgeCount=u,l.compoundCount=c,t.edgeCount=0,t.compoundCount=0;var h=t[t.length++]=oi();return h}},{name:"directedEdge",separator:!0,regex:Tr.directedEdge,populate:function(t,i){if(t.currentSubject==null){var a=oi(),u=i,c=oi();return a.checks.push({type:Jt.DIRECTED_EDGE,source:u,target:c}),Cd(t,i,a),t.edgeCount++,c}else{var l=oi(),h=i,v=oi();return l.checks.push({type:Jt.NODE_SOURCE,source:h,target:v}),Cd(t,i,l),t.edgeCount++,v}}},{name:"undirectedEdge",separator:!0,regex:Tr.undirectedEdge,populate:function(t,i){if(t.currentSubject==null){var a=oi(),u=i,c=oi();return a.checks.push({type:Jt.UNDIRECTED_EDGE,nodes:[u,c]}),Cd(t,i,a),t.edgeCount++,c}else{var l=oi(),h=i,v=oi();return l.checks.push({type:Jt.NODE_NEIGHBOR,node:h,neighbor:v}),Cd(t,i,l),v}}},{name:"child",separator:!0,regex:Tr.child,populate:function(t,i){if(t.currentSubject==null){var a=oi(),u=oi(),c=t[t.length-1];return a.checks.push({type:Jt.CHILD,parent:c,child:u}),Cd(t,i,a),t.compoundCount++,u}else if(t.currentSubject===i){var l=oi(),h=t[t.length-1],v=oi(),p=oi(),g=oi(),w=oi();return l.checks.push({type:Jt.COMPOUND_SPLIT,left:h,right:v,subject:p}),p.checks=i.checks,i.checks=[{type:Jt.TRUE}],w.checks.push({type:Jt.TRUE}),v.checks.push({type:Jt.PARENT,parent:w,child:g}),Cd(t,h,l),t.currentSubject=p,t.compoundCount++,g}else{var _=oi(),E=oi(),k=[{type:Jt.PARENT,parent:_,child:E}];return _.checks=i.checks,i.checks=k,t.compoundCount++,E}}},{name:"descendant",separator:!0,regex:Tr.descendant,populate:function(t,i){if(t.currentSubject==null){var a=oi(),u=oi(),c=t[t.length-1];return a.checks.push({type:Jt.DESCENDANT,ancestor:c,descendant:u}),Cd(t,i,a),t.compoundCount++,u}else if(t.currentSubject===i){var l=oi(),h=t[t.length-1],v=oi(),p=oi(),g=oi(),w=oi();return l.checks.push({type:Jt.COMPOUND_SPLIT,left:h,right:v,subject:p}),p.checks=i.checks,i.checks=[{type:Jt.TRUE}],w.checks.push({type:Jt.TRUE}),v.checks.push({type:Jt.ANCESTOR,ancestor:w,descendant:g}),Cd(t,h,l),t.currentSubject=p,t.compoundCount++,g}else{var _=oi(),E=oi(),k=[{type:Jt.ANCESTOR,ancestor:_,descendant:E}];return _.checks=i.checks,i.checks=k,t.compoundCount++,E}}},{name:"subject",modifier:!0,regex:Tr.subject,populate:function(t,i){if(t.currentSubject!=null&&t.currentSubject!==i)return Hr("Redefinition of subject in selector `"+t.toString()+"`"),!1;t.currentSubject=i;var a=t[t.length-1],u=a.checks[0],c=u==null?null:u.type;c===Jt.DIRECTED_EDGE?u.type=Jt.NODE_TARGET:c===Jt.UNDIRECTED_EDGE&&(u.type=Jt.NODE_NEIGHBOR,u.node=u.nodes[1],u.neighbor=u.nodes[0],u.nodes=null)}}];$A.forEach(function(r){return r.regexObj=new RegExp("^"+r.regex)});var Qye=function(t){for(var i,a,u,c=0;c<$A.length;c++){var l=$A[c],h=l.name,v=t.match(l.regexObj);if(v!=null){a=v,i=l,u=h;var p=v[0];t=t.substring(p.length);break}}return{expr:i,match:a,name:u,remaining:t}},Zye=function(t){var i=t.match(/^\s+/);if(i){var a=i[0];t=t.substring(a.length)}return t},e0e=function(t){var i=this,a=i.inputText=t,u=i[0]=oi();for(i.length=1,a=Zye(a);;){var c=Qye(a);if(c.expr==null)return Hr("The selector `"+t+"`is invalid"),!1;var l=c.match.slice(1),h=c.expr.populate(i,u,l);if(h===!1)return!1;if(h!=null&&(u=h),a=c.remaining,a.match(/^\s*$/))break}var v=i[i.length-1];i.currentSubject!=null&&(v.subject=i.currentSubject),v.edgeCount=i.edgeCount,v.compoundCount=i.compoundCount;for(var p=0;p<i.length;p++){var g=i[p];if(g.compoundCount>0&&g.edgeCount>0)return Hr("The selector `"+t+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(g.edgeCount>1)return Hr("The selector `"+t+"` is invalid because it uses multiple edge selectors"),!1;g.edgeCount===1&&Hr("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},t0e=function(){if(this.toStringCache!=null)return this.toStringCache;for(var t=function(g){return g??""},i=function(g){return hn(g)?'"'+g+'"':t(g)},a=function(g){return" "+g+" "},u=function(g,w){var _=g.type,E=g.value;switch(_){case Jt.GROUP:{var k=t(E);return k.substring(0,k.length-1)}case Jt.DATA_COMPARE:{var I=g.field,C=g.operator;return"["+I+a(t(C))+i(E)+"]"}case Jt.DATA_BOOL:{var P=g.operator,A=g.field;return"["+t(P)+A+"]"}case Jt.DATA_EXIST:{var L=g.field;return"["+L+"]"}case Jt.META_COMPARE:{var O=g.operator,M=g.field;return"[["+M+a(t(O))+i(E)+"]]"}case Jt.STATE:return E;case Jt.ID:return"#"+E;case Jt.CLASS:return"."+E;case Jt.PARENT:case Jt.CHILD:return c(g.parent,w)+a(">")+c(g.child,w);case Jt.ANCESTOR:case Jt.DESCENDANT:return c(g.ancestor,w)+" "+c(g.descendant,w);case Jt.COMPOUND_SPLIT:{var B=c(g.left,w),F=c(g.subject,w),q=c(g.right,w);return B+(B.length>0?" ":"")+F+q}case Jt.TRUE:return""}},c=function(g,w){return g.checks.reduce(function(_,E,k){return _+(w===g&&k===0?"$":"")+u(E,w)},"")},l="",h=0;h<this.length;h++){var v=this[h];l+=c(v,v.subject),this.length>1&&h<this.length-1&&(l+=", ")}return this.toStringCache=l,l},n0e={parse:e0e,toString:t0e},U9=function(t,i,a){var u,c=hn(t),l=Ft(t),h=hn(a),v,p,g=!1,w=!1,_=!1;switch(i.indexOf("!")>=0&&(i=i.replace("!",""),w=!0),i.indexOf("@")>=0&&(i=i.replace("@",""),g=!0),(c||h||g)&&(v=!c&&!l?"":""+t,p=""+a),g&&(t=v=v.toLowerCase(),a=p=p.toLowerCase()),i){case"*=":u=v.indexOf(p)>=0;break;case"$=":u=v.indexOf(p,v.length-p.length)>=0;break;case"^=":u=v.indexOf(p)===0;break;case"=":u=t===a;break;case">":_=!0,u=t>a;break;case">=":_=!0,u=t>=a;break;case"<":_=!0,u=t<a;break;case"<=":_=!0,u=t<=a;break;default:u=!1;break}return w&&(t!=null||!_)&&(u=!u),u},r0e=function(t,i){switch(i){case"?":return!!t;case"!":return!t;case"^":return t===void 0}},i0e=function(t){return t!==void 0},GA=function(t,i){return t.data(i)},a0e=function(t,i){return t[i]()},va=[],Ai=function(t,i){return t.checks.every(function(a){return va[a.type](a,i)})};va[Jt.GROUP]=function(r,t){var i=r.value;return i==="*"||i===t.group()},va[Jt.STATE]=function(r,t){var i=r.value;return Xye(i,t)},va[Jt.ID]=function(r,t){var i=r.value;return t.id()===i},va[Jt.CLASS]=function(r,t){var i=r.value;return t.hasClass(i)},va[Jt.META_COMPARE]=function(r,t){var i=r.field,a=r.operator,u=r.value;return U9(a0e(t,i),a,u)},va[Jt.DATA_COMPARE]=function(r,t){var i=r.field,a=r.operator,u=r.value;return U9(GA(t,i),a,u)},va[Jt.DATA_BOOL]=function(r,t){var i=r.field,a=r.operator;return r0e(GA(t,i),a)},va[Jt.DATA_EXIST]=function(r,t){var i=r.field;return r.operator,i0e(GA(t,i))},va[Jt.UNDIRECTED_EDGE]=function(r,t){var i=r.nodes[0],a=r.nodes[1],u=t.source(),c=t.target();return Ai(i,u)&&Ai(a,c)||Ai(a,u)&&Ai(i,c)},va[Jt.NODE_NEIGHBOR]=function(r,t){return Ai(r.node,t)&&t.neighborhood().some(function(i){return i.isNode()&&Ai(r.neighbor,i)})},va[Jt.DIRECTED_EDGE]=function(r,t){return Ai(r.source,t.source())&&Ai(r.target,t.target())},va[Jt.NODE_SOURCE]=function(r,t){return Ai(r.source,t)&&t.outgoers().some(function(i){return i.isNode()&&Ai(r.target,i)})},va[Jt.NODE_TARGET]=function(r,t){return Ai(r.target,t)&&t.incomers().some(function(i){return i.isNode()&&Ai(r.source,i)})},va[Jt.CHILD]=function(r,t){return Ai(r.child,t)&&Ai(r.parent,t.parent())},va[Jt.PARENT]=function(r,t){return Ai(r.parent,t)&&t.children().some(function(i){return Ai(r.child,i)})},va[Jt.DESCENDANT]=function(r,t){return Ai(r.descendant,t)&&t.ancestors().some(function(i){return Ai(r.ancestor,i)})},va[Jt.ANCESTOR]=function(r,t){return Ai(r.ancestor,t)&&t.descendants().some(function(i){return Ai(r.descendant,i)})},va[Jt.COMPOUND_SPLIT]=function(r,t){return Ai(r.subject,t)&&Ai(r.left,t)&&Ai(r.right,t)},va[Jt.TRUE]=function(){return!0},va[Jt.COLLECTION]=function(r,t){var i=r.value;return i.has(t)},va[Jt.FILTER]=function(r,t){var i=r.value;return i(t)};var s0e=function(t){var i=this;if(i.length===1&&i[0].checks.length===1&&i[0].checks[0].type===Jt.ID)return t.getElementById(i[0].checks[0].value).collection();var a=function(c){for(var l=0;l<i.length;l++){var h=i[l];if(Ai(h,c))return!0}return!1};return i.text()==null&&(a=function(){return!0}),t.filter(a)},o0e=function(t){for(var i=this,a=0;a<i.length;a++){var u=i[a];if(Ai(u,t))return!0}return!1},u0e={matches:o0e,filter:s0e},Ad=function(t){this.inputText=t,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,t==null||hn(t)&&t.match(/^\s*$/)||(Pu(t)?this.addQuery({checks:[{type:Jt.COLLECTION,value:t.collection()}]}):Ji(t)?this.addQuery({checks:[{type:Jt.FILTER,value:t}]}):hn(t)?this.parse(t)||(this.invalid=!0):qi("A selector must be created from a string; found "))},Pd=Ad.prototype;[n0e,u0e].forEach(function(r){return yn(Pd,r)}),Pd.text=function(){return this.inputText},Pd.size=function(){return this.length},Pd.eq=function(r){return this[r]},Pd.sameText=function(r){return!this.invalid&&!r.invalid&&this.text()===r.text()},Pd.addQuery=function(r){this[this.length++]=r},Pd.selector=Pd.toString;var Ld={allAre:function(t){var i=new Ad(t);return this.every(function(a){return i.matches(a)})},is:function(t){var i=new Ad(t);return this.some(function(a){return i.matches(a)})},some:function(t,i){for(var a=0;a<this.length;a++){var u=i?t.apply(i,[this[a],a,this]):t(this[a],a,this);if(u)return!0}return!1},every:function(t,i){for(var a=0;a<this.length;a++){var u=i?t.apply(i,[this[a],a,this]):t(this[a],a,this);if(!u)return!1}return!0},same:function(t){if(this===t)return!0;t=this.cy().collection(t);var i=this.length,a=t.length;return i!==a?!1:i===1?this[0]===t[0]:this.every(function(u){return t.hasElementWithId(u.id())})},anySame:function(t){return t=this.cy().collection(t),this.some(function(i){return t.hasElementWithId(i.id())})},allAreNeighbors:function(t){t=this.cy().collection(t);var i=this.neighborhood();return t.every(function(a){return i.hasElementWithId(a.id())})},contains:function(t){t=this.cy().collection(t);var i=this;return t.every(function(a){return i.hasElementWithId(a.id())})}};Ld.allAreNeighbours=Ld.allAreNeighbors,Ld.has=Ld.contains,Ld.equal=Ld.equals=Ld.same;var ic=function(t,i){return function(u,c,l,h){var v=u,p=this,g;if(v==null?g="":Pu(v)&&v.length===1&&(g=v.id()),p.length===1&&g){var w=p[0]._private,_=w.traversalCache=w.traversalCache||{},E=_[i]=_[i]||[],k=ap(g),I=E[k];return I||(E[k]=t.call(p,u,c,l,h))}else return t.call(p,u,c,l,h)}},yb={parent:function(t){var i=[];if(this.length===1){var a=this[0]._private.parent;if(a)return a}for(var u=0;u<this.length;u++){var c=this[u],l=c._private.parent;l&&i.push(l)}return this.spawn(i,!0).filter(t)},parents:function(t){for(var i=[],a=this.parent();a.nonempty();){for(var u=0;u<a.length;u++){var c=a[u];i.push(c)}a=a.parent()}return this.spawn(i,!0).filter(t)},commonAncestors:function(t){for(var i,a=0;a<this.length;a++){var u=this[a],c=u.parents();i=i||c,i=i.intersect(c)}return i.filter(t)},orphans:function(t){return this.stdFilter(function(i){return i.isOrphan()}).filter(t)},nonorphans:function(t){return this.stdFilter(function(i){return i.isChild()}).filter(t)},children:ic(function(r){for(var t=[],i=0;i<this.length;i++)for(var a=this[i],u=a._private.children,c=0;c<u.length;c++)t.push(u[c]);return this.spawn(t,!0).filter(r)},"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 i=[];function a(u){for(var c=0;c<u.length;c++){var l=u[c];i.push(l),l.children().nonempty()&&a(l.children())}}return a(this.children()),this.spawn(i,!0).filter(t)}};function HA(r,t,i,a){for(var u=[],c=new cb,l=r.cy(),h=l.hasCompoundNodes(),v=0;v<r.length;v++){var p=r[v];i?u.push(p):h&&a(u,c,p)}for(;u.length>0;){var g=u.shift();t(g),c.add(g.id()),h&&a(u,c,g)}return r}function Y9(r,t,i){if(i.isParent())for(var a=i._private.children,u=0;u<a.length;u++){var c=a[u];t.has(c.id())||r.push(c)}}yb.forEachDown=function(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return HA(this,r,t,Y9)};function W9(r,t,i){if(i.isChild()){var a=i._private.parent;t.has(a.id())||r.push(a)}}yb.forEachUp=function(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return HA(this,r,t,W9)};function c0e(r,t,i){W9(r,t,i),Y9(r,t,i)}yb.forEachUpAndDown=function(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return HA(this,r,t,c0e)},yb.ancestors=yb.parents;var _1,K9;_1=K9={data:zr.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:zr.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:zr.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:zr.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:zr.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:zr.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var t=this[0];if(t)return t._private.data.id}},_1.attr=_1.data,_1.removeAttr=_1.removeData;var l0e=K9,Qx={};function zA(r){return function(t){var i=this;if(t===void 0&&(t=!0),i.length!==0)if(i.isNode()&&!i.removed()){for(var a=0,u=i[0],c=u._private.edges,l=0;l<c.length;l++){var h=c[l];!t&&h.isLoop()||(a+=r(u,h))}return a}else return}}yn(Qx,{degree:zA(function(r,t){return t.source().same(t.target())?2:1}),indegree:zA(function(r,t){return t.target().same(r)?1:0}),outdegree:zA(function(r,t){return t.source().same(r)?1:0})});function mb(r,t){return function(i){for(var a,u=this.nodes(),c=0;c<u.length;c++){var l=u[c],h=l[r](i);h!==void 0&&(a===void 0||t(h,a))&&(a=h)}return a}}yn(Qx,{minDegree:mb("degree",function(r,t){return r<t}),maxDegree:mb("degree",function(r,t){return r>t}),minIndegree:mb("indegree",function(r,t){return r<t}),maxIndegree:mb("indegree",function(r,t){return r>t}),minOutdegree:mb("outdegree",function(r,t){return r<t}),maxOutdegree:mb("outdegree",function(r,t){return r>t})}),yn(Qx,{totalDegree:function(t){for(var i=0,a=this.nodes(),u=0;u<a.length;u++)i+=a[u].degree(t);return i}});var Xc,X9,J9=function(t,i,a){for(var u=0;u<t.length;u++){var c=t[u];if(!c.locked()){var l=c._private.position,h={x:i.x!=null?i.x-l.x:0,y:i.y!=null?i.y-l.y:0};c.isParent()&&!(h.x===0&&h.y===0)&&c.children().shift(h,a),c.dirtyBoundingBoxCache()}}},Q9={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,i){J9(t,i,!1)},onSet:function(t){t.dirtyCompoundBoundsCache()},canSet:function(t){return!t.locked()}};Xc=X9={position:zr.data(Q9),silentPosition:zr.data(yn({},Q9,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:function(t,i){J9(t,i,!0)},onSet:function(t){t.dirtyCompoundBoundsCache()}})),positions:function(t,i){if(Sr(t))i?this.silentPosition(t):this.position(t);else if(Ji(t)){var a=t,u=this.cy();u.startBatch();for(var c=0;c<this.length;c++){var l=this[c],h=void 0;(h=a(l,c))&&(i?l.silentPosition(h):l.position(h))}u.endBatch()}return this},silentPositions:function(t){return this.positions(t,!0)},shift:function(t,i,a){var u;if(Sr(t)?(u={x:Ft(t.x)?t.x:0,y:Ft(t.y)?t.y:0},a=i):hn(t)&&Ft(i)&&(u={x:0,y:0},u[t]=i),u!=null){var c=this.cy();c.startBatch();for(var l=0;l<this.length;l++){var h=this[l];if(!(c.hasCompoundNodes()&&h.isChild()&&h.ancestors().anySame(this))){var v=h.position(),p={x:v.x+u.x,y:v.y+u.y};a?h.silentPosition(p):h.position(p)}}c.endBatch()}return this},silentShift:function(t,i){return Sr(t)?this.shift(t,!0):hn(t)&&Ft(i)&&this.shift(t,i,!0),this},renderedPosition:function(t,i){var a=this[0],u=this.cy(),c=u.zoom(),l=u.pan(),h=Sr(t)?t:void 0,v=h!==void 0||i!==void 0&&hn(t);if(a&&a.isNode())if(v)for(var p=0;p<this.length;p++){var g=this[p];i!==void 0?g.position(t,(i-l[t])/c):h!==void 0&&g.position(f8(h,c,l))}else{var w=a.position();return h=Mx(w,c,l),t===void 0?h:h[t]}else if(!v)return;return this},relativePosition:function(t,i){var a=this[0],u=this.cy(),c=Sr(t)?t:void 0,l=c!==void 0||i!==void 0&&hn(t),h=u.hasCompoundNodes();if(a&&a.isNode())if(l)for(var v=0;v<this.length;v++){var p=this[v],g=h?p.parent():null,w=g&&g.length>0,_=w;w&&(g=g[0]);var E=_?g.position():{x:0,y:0};i!==void 0?p.position(t,i+E[t]):c!==void 0&&p.position({x:c.x+E.x,y:c.y+E.y})}else{var k=a.position(),I=h?a.parent():null,C=I&&I.length>0,P=C;C&&(I=I[0]);var A=P?I.position():{x:0,y:0};return c={x:k.x-A.x,y:k.y-A.y},t===void 0?c:c[t]}else if(!l)return;return this}},Xc.modelPosition=Xc.point=Xc.position,Xc.modelPositions=Xc.points=Xc.positions,Xc.renderedPoint=Xc.renderedPosition,Xc.relativePoint=Xc.relativePosition;var f0e=X9,wb,Nd;wb=Nd={},Nd.renderedBoundingBox=function(r){var t=this.boundingBox(r),i=this.cy(),a=i.zoom(),u=i.pan(),c=t.x1*a+u.x,l=t.x2*a+u.x,h=t.y1*a+u.y,v=t.y2*a+u.y;return{x1:c,x2:l,y1:h,y2:v,w:l-c,h:v-h}},Nd.dirtyCompoundBoundsCache=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=this.cy();return!t.styleEnabled()||!t.hasCompoundNodes()?this:(this.forEachUp(function(i){if(i.isParent()){var a=i._private;a.compoundBoundsClean=!1,a.bbCache=null,r||i.emitAndNotify("bounds")}}),this)},Nd.updateCompoundBounds=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;if(!r&&t.batching())return this;function i(l){if(!l.isParent())return;var h=l._private,v=l.children(),p=l.pstyle("compound-sizing-wrt-labels").value==="include",g={width:{val:l.pstyle("min-width").pfValue,left:l.pstyle("min-width-bias-left"),right:l.pstyle("min-width-bias-right")},height:{val:l.pstyle("min-height").pfValue,top:l.pstyle("min-height-bias-top"),bottom:l.pstyle("min-height-bias-bottom")}},w=v.boundingBox({includeLabels:p,includeOverlays:!1,useCache:!1}),_=h.position;(w.w===0||w.h===0)&&(w={w:l.pstyle("width").pfValue,h:l.pstyle("height").pfValue},w.x1=_.x-w.w/2,w.x2=_.x+w.w/2,w.y1=_.y-w.h/2,w.y2=_.y+w.h/2);function E($,Y,V){var U=0,G=0,X=Y+V;return $>0&&X>0&&(U=Y/X*$,G=V/X*$),{biasDiff:U,biasComplementDiff:G}}function k($,Y,V,U){if(V.units==="%")switch(U){case"width":return $>0?V.pfValue*$:0;case"height":return Y>0?V.pfValue*Y:0;case"average":return $>0&&Y>0?V.pfValue*($+Y)/2:0;case"min":return $>0&&Y>0?$>Y?V.pfValue*Y:V.pfValue*$:0;case"max":return $>0&&Y>0?$>Y?V.pfValue*$:V.pfValue*Y:0;default:return 0}else return V.units==="px"?V.pfValue:0}var I=g.width.left.value;g.width.left.units==="px"&&g.width.val>0&&(I=I*100/g.width.val);var C=g.width.right.value;g.width.right.units==="px"&&g.width.val>0&&(C=C*100/g.width.val);var P=g.height.top.value;g.height.top.units==="px"&&g.height.val>0&&(P=P*100/g.height.val);var A=g.height.bottom.value;g.height.bottom.units==="px"&&g.height.val>0&&(A=A*100/g.height.val);var L=E(g.width.val-w.w,I,C),O=L.biasDiff,M=L.biasComplementDiff,B=E(g.height.val-w.h,P,A),F=B.biasDiff,q=B.biasComplementDiff;h.autoPadding=k(w.w,w.h,l.pstyle("padding"),l.pstyle("padding-relative-to").value),h.autoWidth=Math.max(w.w,g.width.val),_.x=(-O+w.x1+w.x2+M)/2,h.autoHeight=Math.max(w.h,g.height.val),_.y=(-F+w.y1+w.y2+q)/2}for(var a=0;a<this.length;a++){var u=this[a],c=u._private;(!c.compoundBoundsClean||r)&&(i(u),t.batching()||(c.compoundBoundsClean=!0))}return this};var ac=function(t){return t===1/0||t===-1/0?0:t},Jc=function(t,i,a,u,c){u-i===0||c-a===0||i==null||a==null||u==null||c==null||(t.x1=i<t.x1?i:t.x1,t.x2=u>t.x2?u: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)},Od=function(t,i){return i==null?t:Jc(t,i.x1,i.y1,i.x2,i.y2)},x1=function(t,i,a){return eu(t,i,a)},Zx=function(t,i,a){if(!i.cy().headless()){var u=i._private,c=u.rstyle,l=c.arrowWidth/2,h=i.pstyle(a+"-arrow-shape").value,v,p;if(h!=="none"){a==="source"?(v=c.srcX,p=c.srcY):a==="target"?(v=c.tgtX,p=c.tgtY):(v=c.midX,p=c.midY);var g=u.arrowBounds=u.arrowBounds||{},w=g[a]=g[a]||{};w.x1=v-l,w.y1=p-l,w.x2=v+l,w.y2=p+l,w.w=w.x2-w.x1,w.h=w.y2-w.y1,Bx(w,1),Jc(t,w.x1,w.y1,w.x2,w.y2)}}},VA=function(t,i,a){if(!i.cy().headless()){var u;a?u=a+"-":u="";var c=i._private,l=c.rstyle,h=i.pstyle(u+"label").strValue;if(h){var v=i.pstyle("text-halign"),p=i.pstyle("text-valign"),g=x1(l,"labelWidth",a),w=x1(l,"labelHeight",a),_=x1(l,"labelX",a),E=x1(l,"labelY",a),k=i.pstyle(u+"text-margin-x").pfValue,I=i.pstyle(u+"text-margin-y").pfValue,C=i.isEdge(),P=i.pstyle(u+"text-rotation"),A=i.pstyle("text-outline-width").pfValue,L=i.pstyle("text-border-width").pfValue,O=L/2,M=i.pstyle("text-background-padding").pfValue,B=2,F=w,q=g,$=q/2,Y=F/2,V,U,G,X;if(C)V=_-$,U=_+$,G=E-Y,X=E+Y;else{switch(v.value){case"left":V=_-q,U=_;break;case"center":V=_-$,U=_+$;break;case"right":V=_,U=_+q;break}switch(p.value){case"top":G=E-F,X=E;break;case"center":G=E-Y,X=E+Y;break;case"bottom":G=E,X=E+F;break}}var ne=k-Math.max(A,O)-M-B,ae=k+Math.max(A,O)+M+B,oe=I-Math.max(A,O)-M-B,le=I+Math.max(A,O)+M+B;V+=ne,U+=ae,G+=oe,X+=le;var pe=a||"main",ge=c.labelBounds,de=ge[pe]=ge[pe]||{};de.x1=V,de.y1=G,de.x2=U,de.y2=X,de.w=U-V,de.h=X-G,de.leftPad=ne,de.rightPad=ae,de.topPad=oe,de.botPad=le;var Se=C&&P.strValue==="autorotate",Ne=P.pfValue!=null&&P.pfValue!==0;if(Se||Ne){var ye=Se?x1(c.rstyle,"labelAngle",a):P.pfValue,we=Math.cos(ye),Pe=Math.sin(ye),Fe=(V+U)/2,Ue=(G+X)/2;if(!C){switch(v.value){case"left":Fe=U;break;case"right":Fe=V;break}switch(p.value){case"top":Ue=X;break;case"bottom":Ue=G;break}}var He=function(Me,ot){return Me=Me-Fe,ot=ot-Ue,{x:Me*we-ot*Pe+Fe,y:Me*Pe+ot*we+Ue}},De=He(V,G),Ce=He(V,X),Be=He(U,G),ve=He(U,X);V=Math.min(De.x,Ce.x,Be.x,ve.x),U=Math.max(De.x,Ce.x,Be.x,ve.x),G=Math.min(De.y,Ce.y,Be.y,ve.y),X=Math.max(De.y,Ce.y,Be.y,ve.y)}var ke=pe+"Rot",je=ge[ke]=ge[ke]||{};je.x1=V,je.y1=G,je.x2=U,je.y2=X,je.w=U-V,je.h=X-G,Jc(t,V,G,U,X),Jc(c.labelBounds.all,V,G,U,X)}return t}},Z9=function(t,i){if(!i.cy().headless()){var a=i.pstyle("outline-opacity").value,u=i.pstyle("outline-width").value,c=i.pstyle("outline-offset").value,l=u+c;eG(t,i,a,l,"outside",l/2)}},eG=function(t,i,a,u,c,l){if(!(a===0||u<=0||c==="inside")){var h=i.cy(),v=i.pstyle("shape").value,p=h.renderer().nodeShapes[v],g=i.position(),w=g.x,_=g.y,E=i.width(),k=i.height();if(p.hasMiterBounds){c==="center"&&(u/=2);var I=p.miterBounds(w,_,E,k,u);Od(t,I)}else l!=null&&l>0&&qx(t,[l,l,l,l])}},h0e=function(t,i){if(!i.cy().headless()){var a=i.pstyle("border-opacity").value,u=i.pstyle("border-width").pfValue,c=i.pstyle("border-position").value;eG(t,i,a,u,c)}},d0e=function(t,i){var a=t._private.cy,u=a.styleEnabled(),c=a.headless(),l=wo(),h=t._private,v=t.isNode(),p=t.isEdge(),g,w,_,E,k,I,C=h.rstyle,P=v&&u?t.pstyle("bounds-expansion").pfValue:[0],A=function(qe){return qe.pstyle("display").value!=="none"},L=!u||A(t)&&(!p||A(t.source())&&A(t.target()));if(L){var O=0,M=0;u&&i.includeOverlays&&(O=t.pstyle("overlay-opacity").value,O!==0&&(M=t.pstyle("overlay-padding").value));var B=0,F=0;u&&i.includeUnderlays&&(B=t.pstyle("underlay-opacity").value,B!==0&&(F=t.pstyle("underlay-padding").value));var q=Math.max(M,F),$=0,Y=0;if(u&&($=t.pstyle("width").pfValue,Y=$/2),v&&i.includeNodes){var V=t.position();k=V.x,I=V.y;var U=t.outerWidth(),G=U/2,X=t.outerHeight(),ne=X/2;g=k-G,w=k+G,_=I-ne,E=I+ne,Jc(l,g,_,w,E),u&&Z9(l,t),u&&i.includeOutlines&&!c&&Z9(l,t),u&&h0e(l,t)}else if(p&&i.includeEdges)if(u&&!c){var ae=t.pstyle("curve-style").strValue;if(g=Math.min(C.srcX,C.midX,C.tgtX),w=Math.max(C.srcX,C.midX,C.tgtX),_=Math.min(C.srcY,C.midY,C.tgtY),E=Math.max(C.srcY,C.midY,C.tgtY),g-=Y,w+=Y,_-=Y,E+=Y,Jc(l,g,_,w,E),ae==="haystack"){var oe=C.haystackPts;if(oe&&oe.length===2){if(g=oe[0].x,_=oe[0].y,w=oe[1].x,E=oe[1].y,g>w){var le=g;g=w,w=le}if(_>E){var pe=_;_=E,E=pe}Jc(l,g-Y,_-Y,w+Y,E+Y)}}else if(ae==="bezier"||ae==="unbundled-bezier"||Ed(ae,"segments")||Ed(ae,"taxi")){var ge;switch(ae){case"bezier":case"unbundled-bezier":ge=C.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":ge=C.linePts;break}if(ge!=null)for(var de=0;de<ge.length;de++){var Se=ge[de];g=Se.x-Y,w=Se.x+Y,_=Se.y-Y,E=Se.y+Y,Jc(l,g,_,w,E)}}}else{var Ne=t.source(),ye=Ne.position(),we=t.target(),Pe=we.position();if(g=ye.x,w=Pe.x,_=ye.y,E=Pe.y,g>w){var Fe=g;g=w,w=Fe}if(_>E){var Ue=_;_=E,E=Ue}g-=Y,w+=Y,_-=Y,E+=Y,Jc(l,g,_,w,E)}if(u&&i.includeEdges&&p&&(Zx(l,t,"mid-source"),Zx(l,t,"mid-target"),Zx(l,t,"source"),Zx(l,t,"target")),u){var He=t.pstyle("ghost").value==="yes";if(He){var De=t.pstyle("ghost-offset-x").pfValue,Ce=t.pstyle("ghost-offset-y").pfValue;Jc(l,l.x1+De,l.y1+Ce,l.x2+De,l.y2+Ce)}}var Be=h.bodyBounds=h.bodyBounds||{};d8(Be,l),qx(Be,P),Bx(Be,1),u&&(g=l.x1,w=l.x2,_=l.y1,E=l.y2,Jc(l,g-q,_-q,w+q,E+q));var ve=h.overlayBounds=h.overlayBounds||{};d8(ve,l),qx(ve,P),Bx(ve,1);var ke=h.labelBounds=h.labelBounds||{};ke.all!=null?Wge(ke.all):ke.all=wo(),u&&i.includeLabels&&(i.includeMainLabels&&VA(l,t,null),p&&(i.includeSourceLabels&&VA(l,t,"source"),i.includeTargetLabels&&VA(l,t,"target")))}return l.x1=ac(l.x1),l.y1=ac(l.y1),l.x2=ac(l.x2),l.y2=ac(l.y2),l.w=ac(l.x2-l.x1),l.h=ac(l.y2-l.y1),l.w>0&&l.h>0&&L&&(qx(l,P),Bx(l,1)),l},tG=function(t){var i=0,a=function(l){return(l?1:0)<<i++},u=0;return u+=a(t.incudeNodes),u+=a(t.includeEdges),u+=a(t.includeLabels),u+=a(t.includeMainLabels),u+=a(t.includeSourceLabels),u+=a(t.includeTargetLabels),u+=a(t.includeOverlays),u+=a(t.includeOutlines),u},nG=function(t){var i=function(h){return Math.round(h)};if(t.isEdge()){var a=t.source().position(),u=t.target().position();return e8([i(a.x),i(a.y),i(u.x),i(u.y)])}else{var c=t.position();return e8([i(c.x),i(c.y)])}},rG=function(t,i){var a=t._private,u,c=t.isEdge(),l=i==null?iG:tG(i),h=l===iG;if(a.bbCache==null?(u=d0e(t,E1),a.bbCache=u,a.bbCachePosKey=nG(t)):u=a.bbCache,!h){var v=t.isNode();u=wo(),(i.includeNodes&&v||i.includeEdges&&!v)&&(i.includeOverlays?Od(u,a.overlayBounds):Od(u,a.bodyBounds)),i.includeLabels&&(i.includeMainLabels&&(!c||i.includeSourceLabels&&i.includeTargetLabels)?Od(u,a.labelBounds.all):(i.includeMainLabels&&Od(u,a.labelBounds.mainRot),i.includeSourceLabels&&Od(u,a.labelBounds.sourceRot),i.includeTargetLabels&&Od(u,a.labelBounds.targetRot))),u.w=u.x2-u.x1,u.h=u.y2-u.y1}return u},E1={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},iG=tG(E1),aG=qs(E1);Nd.boundingBox=function(r){var t,i=r===void 0||r.useCache===void 0||r.useCache===!0,a=ob(function(g){var w=g._private;return w.bbCache==null||w.styleDirty||w.bbCachePosKey!==nG(g)},function(g){return g.id()});if(i&&this.length===1&&!a(this[0]))r===void 0?r=E1:r=aG(r),t=rG(this[0],r);else{t=wo(),r=r||E1;var u=aG(r),c=this,l=c.cy(),h=l.styleEnabled();this.edges().forEach(a),this.nodes().forEach(a),h&&this.recalculateRenderedStyle(i),this.updateCompoundBounds(!i);for(var v=0;v<c.length;v++){var p=c[v];a(p)&&p.dirtyBoundingBoxCache(),Od(t,rG(p,u))}}return t.x1=ac(t.x1),t.y1=ac(t.y1),t.x2=ac(t.x2),t.y2=ac(t.y2),t.w=ac(t.x2-t.x1),t.h=ac(t.y2-t.y1),t},Nd.dirtyBoundingBoxCache=function(){for(var r=0;r<this.length;r++){var t=this[r]._private;t.bbCache=null,t.bbCachePosKey=null,t.bodyBounds=null,t.overlayBounds=null,t.labelBounds.all=null,t.labelBounds.source=null,t.labelBounds.target=null,t.labelBounds.main=null,t.labelBounds.sourceRot=null,t.labelBounds.targetRot=null,t.labelBounds.mainRot=null,t.arrowBounds.source=null,t.arrowBounds.target=null,t.arrowBounds["mid-source"]=null,t.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this},Nd.boundingBoxAt=function(r){var t=this.nodes(),i=this.cy(),a=i.hasCompoundNodes(),u=i.collection();if(a&&(u=t.filter(function(p){return p.isParent()}),t=t.not(u)),Sr(r)){var c=r;r=function(){return c}}var l=function(g,w){return g._private.bbAtOldPos=r(g,w)},h=function(g){return g._private.bbAtOldPos};i.startBatch(),t.forEach(l).silentPositions(r),a&&(u.dirtyCompoundBoundsCache(),u.dirtyBoundingBoxCache(),u.updateCompoundBounds(!0));var v=Yge(this.boundingBox({useCache:!1}));return t.silentPositions(h),a&&(u.dirtyCompoundBoundsCache(),u.dirtyBoundingBoxCache(),u.updateCompoundBounds(!0)),i.endBatch(),v},wb.boundingbox=wb.bb=wb.boundingBox,wb.renderedBoundingbox=wb.renderedBoundingBox;var v0e=Nd,k1,S1;k1=S1={};var sG=function(t){t.uppercaseName=P$(t.name),t.autoName="auto"+t.uppercaseName,t.labelName="label"+t.uppercaseName,t.outerName="outer"+t.uppercaseName,t.uppercaseOuterName=P$(t.outerName),k1[t.name]=function(){var a=this[0],u=a._private,c=u.cy,l=c._private.styleEnabled;if(a)if(l){if(a.isParent())return a.updateCompoundBounds(),u[t.autoName]||0;var h=a.pstyle(t.name);switch(h.strValue){case"label":return a.recalculateRenderedStyle(),u.rstyle[t.labelName]||0;default:return h.pfValue}}else return 1},k1["outer"+t.uppercaseName]=function(){var a=this[0],u=a._private,c=u.cy,l=c._private.styleEnabled;if(a)if(l){var h=a[t.name](),v=a.pstyle("border-position").value,p;v==="center"?p=a.pstyle("border-width").pfValue:v==="outside"?p=2*a.pstyle("border-width").pfValue:p=0;var g=2*a.padding();return h+p+g}else return 1},k1["rendered"+t.uppercaseName]=function(){var a=this[0];if(a){var u=a[t.name]();return u*this.cy().zoom()}},k1["rendered"+t.uppercaseOuterName]=function(){var a=this[0];if(a){var u=a[t.outerName]();return u*this.cy().zoom()}}};sG({name:"width"}),sG({name:"height"}),S1.padding=function(){var r=this[0],t=r._private;return r.isParent()?(r.updateCompoundBounds(),t.autoPadding!==void 0?t.autoPadding:r.pstyle("padding").pfValue):r.pstyle("padding").pfValue},S1.paddedHeight=function(){var r=this[0];return r.height()+2*r.padding()},S1.paddedWidth=function(){var r=this[0];return r.width()+2*r.padding()};var p0e=S1,g0e=function(t,i){if(t.isEdge()&&t.takesUpSpace())return i(t)},b0e=function(t,i){if(t.isEdge()&&t.takesUpSpace()){var a=t.cy();return Mx(i(t),a.zoom(),a.pan())}},y0e=function(t,i){if(t.isEdge()&&t.takesUpSpace()){var a=t.cy(),u=a.pan(),c=a.zoom();return i(t).map(function(l){return Mx(l,c,u)})}},m0e=function(t){return t.renderer().getControlPoints(t)},w0e=function(t){return t.renderer().getSegmentPoints(t)},_0e=function(t){return t.renderer().getSourceEndpoint(t)},x0e=function(t){return t.renderer().getTargetEndpoint(t)},E0e=function(t){return t.renderer().getEdgeMidpoint(t)},oG={controlPoints:{get:m0e,mult:!0},segmentPoints:{get:w0e,mult:!0},sourceEndpoint:{get:_0e},targetEndpoint:{get:x0e},midpoint:{get:E0e}},k0e=function(t){return"rendered"+t[0].toUpperCase()+t.substr(1)},S0e=Object.keys(oG).reduce(function(r,t){var i=oG[t],a=k0e(t);return r[t]=function(){return g0e(this,i.get)},i.mult?r[a]=function(){return y0e(this,i.get)}:r[a]=function(){return b0e(this,i.get)},r},{}),T0e=yn({},f0e,v0e,p0e,S0e);/*!
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 uG=function(t,i){this.recycle(t,i)};function T1(){return!1}function e2(){return!0}uG.prototype={instanceString:function(){return"event"},recycle:function(t,i){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=T1,t!=null&&t.preventDefault?(this.type=t.type,this.isDefaultPrevented=t.defaultPrevented?e2:T1):t!=null&&t.type?i=t:this.type=t,i!=null&&(this.originalEvent=i.originalEvent,this.type=i.type!=null?i.type:this.type,this.cy=i.cy,this.target=i.target,this.position=i.position,this.renderedPosition=i.renderedPosition,this.namespace=i.namespace,this.layout=i.layout),this.cy!=null&&this.position!=null&&this.renderedPosition==null){var a=this.position,u=this.cy.zoom(),c=this.cy.pan();this.renderedPosition={x:a.x*u+c.x,y:a.y*u+c.y}}this.timeStamp=t&&t.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=e2;var t=this.originalEvent;t&&t.preventDefault&&t.preventDefault()},stopPropagation:function(){this.isPropagationStopped=e2;var t=this.originalEvent;t&&t.stopPropagation&&t.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=e2,this.stopPropagation()},isDefaultPrevented:T1,isPropagationStopped:T1,isImmediatePropagationStopped:T1};var cG=/^([^.]+)(\.(?:[^.]+))?$/,R0e=".*",lG={qualifierCompare:function(t,i){return t===i},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},fG=Object.keys(lG),I0e={};function t2(){for(var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:I0e,t=arguments.length>1?arguments[1]:void 0,i=0;i<fG.length;i++){var a=fG[i];this[a]=r[a]||lG[a]}this.context=t||this.context,this.listeners=[],this.emitting=0}var Dd=t2.prototype,hG=function(t,i,a,u,c,l,h){Ji(u)&&(c=u,u=null),h&&(l==null?l=h:l=yn({},l,h));for(var v=di(a)?a:a.split(/\s+/),p=0;p<v.length;p++){var g=v[p];if(!xd(g)){var w=g.match(cG);if(w){var _=w[1],E=w[2]?w[2]:null,k=i(t,g,_,E,u,c,l);if(k===!1)break}}}},dG=function(t,i){return t.addEventFields(t.context,i),new uG(i.type,i)},C0e=function(t,i,a){if(Dpe(a)){i(t,a);return}else if(Sr(a)){i(t,dG(t,a));return}for(var u=di(a)?a:a.split(/\s+/),c=0;c<u.length;c++){var l=u[c];if(!xd(l)){var h=l.match(cG);if(h){var v=h[1],p=h[2]?h[2]:null,g=dG(t,{type:v,namespace:p,target:t.context});i(t,g)}}}};Dd.on=Dd.addListener=function(r,t,i,a,u){return hG(this,function(c,l,h,v,p,g,w){Ji(g)&&c.listeners.push({event:l,callback:g,type:h,namespace:v,qualifier:p,conf:w})},r,t,i,a,u),this},Dd.one=function(r,t,i,a){return this.on(r,t,i,a,{one:!0})},Dd.removeListener=Dd.off=function(r,t,i,a){var u=this;this.emitting!==0&&(this.listeners=bge(this.listeners));for(var c=this.listeners,l=function(p){var g=c[p];hG(u,function(w,_,E,k,I,C){if((g.type===E||r==="*")&&(!k&&g.namespace!==".*"||g.namespace===k)&&(!I||w.qualifierCompare(g.qualifier,I))&&(!C||g.callback===C))return c.splice(p,1),!1},r,t,i,a)},h=c.length-1;h>=0;h--)l(h);return this},Dd.removeAllListeners=function(){return this.removeListener("*")},Dd.emit=Dd.trigger=function(r,t,i){var a=this.listeners,u=a.length;return this.emitting++,di(t)||(t=[t]),C0e(this,function(c,l){i!=null&&(a=[{event:l.event,type:l.type,namespace:l.namespace,callback:i}],u=a.length);for(var h=function(){var g=a[v];if(g.type===l.type&&(!g.namespace||g.namespace===l.namespace||g.namespace===R0e)&&c.eventMatches(c.context,g,l)){var w=[l];t!=null&&mge(w,t),c.beforeEmit(c.context,g,l),g.conf&&g.conf.one&&(c.listeners=c.listeners.filter(function(k){return k!==g}));var _=c.callbackContext(c.context,g,l),E=g.callback.apply(_,w);c.afterEmit(c.context,g,l),E===!1&&(l.stopPropagation(),l.preventDefault())}},v=0;v<u;v++)h();c.bubble(c.context)&&!l.isPropagationStopped()&&c.parent(c.context).emit(l,t)},r),this.emitting--,this};var A0e={qualifierCompare:function(t,i){return t==null||i==null?t==null&&i==null:t.sameText(i)},eventMatches:function(t,i,a){var u=i.qualifier;return u!=null?t!==a.target&&u1(a.target)&&u.matches(a.target):!0},addEventFields:function(t,i){i.cy=t.cy(),i.target=t},callbackContext:function(t,i,a){return i.qualifier!=null?a.target:t},beforeEmit:function(t,i){i.conf&&i.conf.once&&i.conf.onceCollection.removeListener(i.event,i.qualifier,i.callback)},bubble:function(){return!0},parent:function(t){return t.isChild()?t.parent():t.cy()}},n2=function(t){return hn(t)?new Ad(t):t},vG={createEmitter:function(){for(var t=0;t<this.length;t++){var i=this[t],a=i._private;a.emitter||(a.emitter=new t2(A0e,i))}return this},emitter:function(){return this._private.emitter},on:function(t,i,a){for(var u=n2(i),c=0;c<this.length;c++){var l=this[c];l.emitter().on(t,u,a)}return this},removeListener:function(t,i,a){for(var u=n2(i),c=0;c<this.length;c++){var l=this[c];l.emitter().removeListener(t,u,a)}return this},removeAllListeners:function(){for(var t=0;t<this.length;t++){var i=this[t];i.emitter().removeAllListeners()}return this},one:function(t,i,a){for(var u=n2(i),c=0;c<this.length;c++){var l=this[c];l.emitter().one(t,u,a)}return this},once:function(t,i,a){for(var u=n2(i),c=0;c<this.length;c++){var l=this[c];l.emitter().on(t,u,a,{once:!0,onceCollection:this})}},emit:function(t,i){for(var a=0;a<this.length;a++){var u=this[a];u.emitter().emit(t,i)}return this},emitAndNotify:function(t,i){if(this.length!==0)return this.cy().notify(t,this),this.emit(t,i),this}};zr.eventAliasesOn(vG);var pG={nodes:function(t){return this.filter(function(i){return i.isNode()}).filter(t)},edges:function(t){return this.filter(function(i){return i.isEdge()}).filter(t)},byGroup:function(){for(var t=this.spawn(),i=this.spawn(),a=0;a<this.length;a++){var u=this[a];u.isNode()?t.push(u):i.push(u)}return{nodes:t,edges:i}},filter:function(t,i){if(t===void 0)return this;if(hn(t)||Pu(t))return new Ad(t).filter(this);if(Ji(t)){for(var a=this.spawn(),u=this,c=0;c<u.length;c++){var l=u[c],h=i?t.apply(i,[l,c,u]):t(l,c,u);h&&a.push(l)}return a}return this.spawn()},not:function(t){if(t){hn(t)&&(t=this.filter(t));for(var i=this.spawn(),a=0;a<this.length;a++){var u=this[a],c=t.has(u);c||i.push(u)}return i}else return this},absoluteComplement:function(){var t=this.cy();return t.mutableElements().not(this)},intersect:function(t){if(hn(t)){var i=t;return this.filter(i)}for(var a=this.spawn(),u=this,c=t,l=this.length<t.length,h=l?u:c,v=l?c:u,p=0;p<h.length;p++){var g=h[p];v.has(g)&&a.push(g)}return a},xor:function(t){var i=this._private.cy;hn(t)&&(t=i.$(t));var a=this.spawn(),u=this,c=t,l=function(v,p){for(var g=0;g<v.length;g++){var w=v[g],_=w._private.data.id,E=p.hasElementWithId(_);E||a.push(w)}};return l(u,c),l(c,u),a},diff:function(t){var i=this._private.cy;hn(t)&&(t=i.$(t));var a=this.spawn(),u=this.spawn(),c=this.spawn(),l=this,h=t,v=function(g,w,_){for(var E=0;E<g.length;E++){var k=g[E],I=k._private.data.id,C=w.hasElementWithId(I);C?c.merge(k):_.push(k)}};return v(l,h,a),v(h,l,u),{left:a,right:u,both:c}},add:function(t){var i=this._private.cy;if(!t)return this;if(hn(t)){var a=t;t=i.mutableElements().filter(a)}for(var u=this.spawnSelf(),c=0;c<t.length;c++){var l=t[c],h=!this.has(l);h&&u.push(l)}return u},merge:function(t){var i=this._private,a=i.cy;if(!t)return this;if(t&&hn(t)){var u=t;t=a.mutableElements().filter(u)}for(var c=i.map,l=0;l<t.length;l++){var h=t[l],v=h._private.data.id,p=!c.has(v);if(p){var g=this.length++;this[g]=h,c.set(v,{ele:h,index:g})}}return this},unmergeAt:function(t){var i=this[t],a=i.id(),u=this._private,c=u.map;this[t]=void 0,c.delete(a);var l=t===this.length-1;if(this.length>1&&!l){var h=this.length-1,v=this[h],p=v._private.data.id;this[h]=void 0,this[t]=v,c.set(p,{ele:v,index:t})}return this.length--,this},unmergeOne:function(t){t=t[0];var i=this._private,a=t._private.data.id,u=i.map,c=u.get(a);if(!c)return this;var l=c.index;return this.unmergeAt(l),this},unmerge:function(t){var i=this._private.cy;if(!t)return this;if(t&&hn(t)){var a=t;t=i.mutableElements().filter(a)}for(var u=0;u<t.length;u++)this.unmergeOne(t[u]);return this},unmergeBy:function(t){for(var i=this.length-1;i>=0;i--){var a=this[i];t(a)&&this.unmergeAt(i)}return this},map:function(t,i){for(var a=[],u=this,c=0;c<u.length;c++){var l=u[c],h=i?t.apply(i,[l,c,u]):t(l,c,u);a.push(h)}return a},reduce:function(t,i){for(var a=i,u=this,c=0;c<u.length;c++)a=t(a,u[c],c,u);return a},max:function(t,i){for(var a=-1/0,u,c=this,l=0;l<c.length;l++){var h=c[l],v=i?t.apply(i,[h,l,c]):t(h,l,c);v>a&&(a=v,u=h)}return{value:a,ele:u}},min:function(t,i){for(var a=1/0,u,c=this,l=0;l<c.length;l++){var h=c[l],v=i?t.apply(i,[h,l,c]):t(h,l,c);v<a&&(a=v,u=h)}return{value:a,ele:u}}},Pr=pG;Pr.u=Pr["|"]=Pr["+"]=Pr.union=Pr.or=Pr.add,Pr["\\"]=Pr["!"]=Pr["-"]=Pr.difference=Pr.relativeComplement=Pr.subtract=Pr.not,Pr.n=Pr["&"]=Pr["."]=Pr.and=Pr.intersection=Pr.intersect,Pr["^"]=Pr["(+)"]=Pr["(-)"]=Pr.symmetricDifference=Pr.symdiff=Pr.xor,Pr.fnFilter=Pr.filterFn=Pr.stdFilter=Pr.filter,Pr.complement=Pr.abscomp=Pr.absoluteComplement;var P0e={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}},gG=function(t,i){var a=t.cy(),u=a.hasCompoundNodes();function c(g){var w=g.pstyle("z-compound-depth");return w.value==="auto"?u?g.zDepth():0:w.value==="bottom"?-1:w.value==="top"?_C:0}var l=c(t)-c(i);if(l!==0)return l;function h(g){var w=g.pstyle("z-index-compare");return w.value==="auto"&&g.isNode()?1:0}var v=h(t)-h(i);if(v!==0)return v;var p=t.pstyle("z-index").value-i.pstyle("z-index").value;return p!==0?p:t.poolIndex()-i.poolIndex()},r2={forEach:function(t,i){if(Ji(t))for(var a=this.length,u=0;u<a;u++){var c=this[u],l=i?t.apply(i,[c,u,this]):t(c,u,this);if(l===!1)break}return this},toArray:function(){for(var t=[],i=0;i<this.length;i++)t.push(this[i]);return t},slice:function(t,i){var a=[],u=this.length;i==null&&(i=u),t==null&&(t=0),t<0&&(t=u+t),i<0&&(i=u+i);for(var c=t;c>=0&&c<i&&c<u;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(!Ji(t))return this;var i=this.toArray().sort(t);return this.spawn(i)},sortByZIndex:function(){return this.sort(gG)},zDepth:function(){var t=this[0];if(t){var i=t._private,a=i.group;if(a==="nodes"){var u=i.data.parent?t.parents().size():0;return t.isParent()?u:_C-1}else{var c=i.source,l=i.target,h=c.zDepth(),v=l.zDepth();return Math.max(h,v,0)}}}};r2.each=r2.forEach;var L0e=function(){var t="undefined",i=(typeof Symbol>"u"?"undefined":es(Symbol))!=t&&es(Symbol.iterator)!=t;i&&(r2[Symbol.iterator]=function(){var a=this,u={value:void 0,done:!1},c=0,l=this.length;return k$({next:function(){return c<l?u.value=a[c++]:(u.value=void 0,u.done=!0),u}},Symbol.iterator,function(){return this})})};L0e();var N0e=qs({nodeDimensionsIncludeLabels:!1}),i2={layoutDimensions:function(t){t=N0e(t);var i;if(!this.takesUpSpace())i={w:0,h:0};else if(t.nodeDimensionsIncludeLabels){var a=this.boundingBox();i={w:a.w,h:a.h}}else i={w:this.outerWidth(),h:this.outerHeight()};return(i.w===0||i.h===0)&&(i.w=i.h=1),i},layoutPositions:function(t,i,a){var u=this.nodes().filter(function(M){return!M.isParent()}),c=this.cy(),l=i.eles,h=function(B){return B.id()},v=ob(a,h);t.emit({type:"layoutstart",layout:t}),t.animations=[];var p=function(B,F,q){var $={x:F.x1+F.w/2,y:F.y1+F.h/2},Y={x:(q.x-$.x)*B,y:(q.y-$.y)*B};return{x:$.x+Y.x,y:$.y+Y.y}},g=i.spacingFactor&&i.spacingFactor!==1,w=function(){if(!g)return null;for(var B=wo(),F=0;F<u.length;F++){var q=u[F],$=v(q,F);h8(B,$.x,$.y)}return B},_=w(),E=ob(function(M,B){var F=v(M,B);if(g){var q=Math.abs(i.spacingFactor);F=p(q,_,F)}return i.transform!=null&&(F=i.transform(M,F)),F},h);if(i.animate){for(var k=0;k<u.length;k++){var I=u[k],C=E(I,k),P=i.animateFilter==null||i.animateFilter(I,k);if(P){var A=I.animation({position:C,duration:i.animationDuration,easing:i.animationEasing});t.animations.push(A)}else I.position(C)}if(i.fit){var L=c.animation({fit:{boundingBox:l.boundingBoxAt(E),padding:i.padding},duration:i.animationDuration,easing:i.animationEasing});t.animations.push(L)}else if(i.zoom!==void 0&&i.pan!==void 0){var O=c.animation({zoom:i.zoom,pan:i.pan,duration:i.animationDuration,easing:i.animationEasing});t.animations.push(O)}t.animations.forEach(function(M){return M.play()}),t.one("layoutready",i.ready),t.emit({type:"layoutready",layout:t}),gb.all(t.animations.map(function(M){return M.promise()})).then(function(){t.one("layoutstop",i.stop),t.emit({type:"layoutstop",layout:t})})}else u.positions(E),i.fit&&c.fit(i.eles,i.padding),i.zoom!=null&&c.zoom(i.zoom),i.pan&&c.pan(i.pan),t.one("layoutready",i.ready),t.emit({type:"layoutready",layout:t}),t.one("layoutstop",i.stop),t.emit({type:"layoutstop",layout:t});return this},layout:function(t){var i=this.cy();return i.makeLayout(yn({},t,{eles:this}))}};i2.createLayout=i2.makeLayout=i2.layout;function bG(r,t,i){var a=i._private,u=a.styleCache=a.styleCache||[],c;return(c=u[r])!=null||(c=u[r]=t(i)),c}function a2(r,t){return r=ap(r),function(a){return bG(r,t,a)}}function s2(r,t){r=ap(r);var i=function(u){return t.call(u)};return function(){var u=this[0];if(u)return bG(r,i,u)}}var Fs={recalculateRenderedStyle:function(t){var i=this.cy(),a=i.renderer(),u=i.styleEnabled();return a&&u&&a.recalculateRenderedStyle(this,t),this},dirtyStyleCache:function(){var t=this.cy(),i=function(c){return c._private.styleCache=null};if(t.hasCompoundNodes()){var a;a=this.spawnSelf().merge(this.descendants()).merge(this.parents()),a.merge(a.connectedEdges()),a.forEach(i)}else this.forEach(function(u){i(u),u.connectedEdges().forEach(i)});return this},updateStyle:function(t){var i=this._private.cy;if(!i.styleEnabled())return this;if(i.batching()){var a=i._private.batchStyleEles;return a.merge(this),this}var u=i.hasCompoundNodes(),c=this;t=!!(t||t===void 0),u&&(c=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var l=c;return t?l.emitAndNotify("style"):l.emit("style"),c.forEach(function(h){return h._private.styleDirty=!0}),this},cleanStyle:function(){var t=this.cy();if(t.styleEnabled())for(var i=0;i<this.length;i++){var a=this[i];a._private.styleDirty&&(a._private.styleDirty=!1,t.style().apply(a))}},parsedStyle:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,a=this[0],u=a.cy();if(u.styleEnabled()&&a){a._private.styleDirty&&(a._private.styleDirty=!1,u.style().apply(a));var c=a._private.style[t];return c??(i?u.style().getDefaultProperty(t):null)}},numericStyle:function(t){var i=this[0];if(i.cy().styleEnabled()&&i){var a=i.pstyle(t);return a.pfValue!==void 0?a.pfValue:a.value}},numericStyleUnits:function(t){var i=this[0];if(i.cy().styleEnabled()&&i)return i.pstyle(t).units},renderedStyle:function(t){var i=this.cy();if(!i.styleEnabled())return this;var a=this[0];if(a)return i.style().getRenderedStyle(a,t)},style:function(t,i){var a=this.cy();if(!a.styleEnabled())return this;var u=!1,c=a.style();if(Sr(t)){var l=t;c.applyBypass(this,l,u),this.emitAndNotify("style")}else if(hn(t))if(i===void 0){var h=this[0];return h?c.getStylePropertyValue(h,t):void 0}else c.applyBypass(this,t,i,u),this.emitAndNotify("style");else if(t===void 0){var v=this[0];return v?c.getRawStyle(v):void 0}return this},removeStyle:function(t){var i=this.cy();if(!i.styleEnabled())return this;var a=!1,u=i.style(),c=this;if(t===void 0)for(var l=0;l<c.length;l++){var h=c[l];u.removeAllBypasses(h,a)}else{t=t.split(/\s+/);for(var v=0;v<c.length;v++){var p=c[v];u.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 i=t.hasCompoundNodes(),a=this[0];if(a){var u=a._private,c=a.pstyle("opacity").value;if(!i)return c;var l=u.data.parent?a.parents():null;if(l)for(var h=0;h<l.length;h++){var v=l[h],p=v.pstyle("opacity").value;c=p*c}return c}},transparent:function(){var t=this.cy();if(!t.styleEnabled())return!1;var i=this[0],a=i.cy().hasCompoundNodes();if(i)return a?i.effectiveOpacity()===0:i.pstyle("opacity").value===0},backgrounding:function(){var t=this.cy();if(!t.styleEnabled())return!1;var i=this[0];return!!i._private.backgrounding}};function UA(r,t){var i=r._private,a=i.data.parent?r.parents():null;if(a)for(var u=0;u<a.length;u++){var c=a[u];if(!t(c))return!1}return!0}function YA(r){var t=r.ok,i=r.edgeOkViaNode||r.ok,a=r.parentOk||r.ok;return function(){var u=this.cy();if(!u.styleEnabled())return!0;var c=this[0],l=u.hasCompoundNodes();if(c){var h=c._private;if(!t(c))return!1;if(c.isNode())return!l||UA(c,a);var v=h.source,p=h.target;return i(v)&&(!l||UA(v,i))&&(v===p||i(p)&&(!l||UA(p,i)))}}}var _b=a2("eleTakesUpSpace",function(r){return r.pstyle("display").value==="element"&&r.width()!==0&&(r.isNode()?r.height()!==0:!0)});Fs.takesUpSpace=s2("takesUpSpace",YA({ok:_b}));var O0e=a2("eleInteractive",function(r){return r.pstyle("events").value==="yes"&&r.pstyle("visibility").value==="visible"&&_b(r)}),D0e=a2("parentInteractive",function(r){return r.pstyle("visibility").value==="visible"&&_b(r)});Fs.interactive=s2("interactive",YA({ok:O0e,parentOk:D0e,edgeOkViaNode:_b})),Fs.noninteractive=function(){var r=this[0];if(r)return!r.interactive()};var M0e=a2("eleVisible",function(r){return r.pstyle("visibility").value==="visible"&&r.pstyle("opacity").pfValue!==0&&_b(r)}),j0e=_b;Fs.visible=s2("visible",YA({ok:M0e,edgeOkViaNode:j0e})),Fs.hidden=function(){var r=this[0];if(r)return!r.visible()},Fs.isBundledBezier=s2("isBundledBezier",function(){return this.cy().styleEnabled()?!this.removed()&&this.pstyle("curve-style").value==="bezier"&&this.takesUpSpace():!1}),Fs.bypass=Fs.css=Fs.style,Fs.renderedCss=Fs.renderedStyle,Fs.removeBypass=Fs.removeCss=Fs.removeStyle,Fs.pstyle=Fs.parsedStyle;var Md={};function yG(r){return function(){var t=arguments,i=[];if(t.length===2){var a=t[0],u=t[1];this.on(r.event,a,u)}else if(t.length===1&&Ji(t[0])){var c=t[0];this.on(r.event,c)}else if(t.length===0||t.length===1&&di(t[0])){for(var l=t.length===1?t[0]:null,h=0;h<this.length;h++){var v=this[h],p=!r.ableField||v._private[r.ableField],g=v._private[r.field]!=r.value;if(r.overrideAble){var w=r.overrideAble(v);if(w!==void 0&&(p=w,!w))return this}p&&(v._private[r.field]=r.value,g&&i.push(v))}var _=this.spawn(i);_.updateStyle(),_.emit(r.event),l&&_.emit(l)}return this}}function xb(r){Md[r.field]=function(){var t=this[0];if(t){if(r.overrideField){var i=r.overrideField(t);if(i!==void 0)return i}return t._private[r.field]}},Md[r.on]=yG({event:r.on,field:r.field,ableField:r.ableField,overrideAble:r.overrideAble,value:!0}),Md[r.off]=yG({event:r.off,field:r.field,ableField:r.ableField,overrideAble:r.overrideAble,value:!1})}xb({field:"locked",overrideField:function(t){return t.cy().autolock()?!0:void 0},on:"lock",off:"unlock"}),xb({field:"grabbable",overrideField:function(t){return t.cy().autoungrabify()||t.pannable()?!1:void 0},on:"grabify",off:"ungrabify"}),xb({field:"selected",ableField:"selectable",overrideAble:function(t){return t.cy().autounselectify()?!1:void 0},on:"select",off:"unselect"}),xb({field:"selectable",overrideField:function(t){return t.cy().autounselectify()?!1:void 0},on:"selectify",off:"unselectify"}),Md.deselect=Md.unselect,Md.grabbed=function(){var r=this[0];if(r)return r._private.grabbed},xb({field:"active",on:"activate",off:"unactivate"}),xb({field:"pannable",on:"panify",off:"unpanify"}),Md.inactive=function(){var r=this[0];if(r)return!r._private.active};var eo={},mG=function(t){return function(a){for(var u=this,c=[],l=0;l<u.length;l++){var h=u[l];if(h.isNode()){for(var v=!1,p=h.connectedEdges(),g=0;g<p.length;g++){var w=p[g],_=w.source(),E=w.target();if(t.noIncomingEdges&&E===h&&_!==h||t.noOutgoingEdges&&_===h&&E!==h){v=!0;break}}v||c.push(h)}}return this.spawn(c,!0).filter(a)}},wG=function(t){return function(i){for(var a=this,u=[],c=0;c<a.length;c++){var l=a[c];if(l.isNode())for(var h=l.connectedEdges(),v=0;v<h.length;v++){var p=h[v],g=p.source(),w=p.target();t.outgoing&&g===l?(u.push(p),u.push(w)):t.incoming&&w===l&&(u.push(p),u.push(g))}}return this.spawn(u,!0).filter(i)}},_G=function(t){return function(i){for(var a=this,u=[],c={};;){var l=t.outgoing?a.outgoers():a.incomers();if(l.length===0)break;for(var h=!1,v=0;v<l.length;v++){var p=l[v],g=p.id();c[g]||(c[g]=!0,u.push(p),h=!0)}if(!h)break;a=l}return this.spawn(u,!0).filter(i)}};eo.clearTraversalCache=function(){for(var r=0;r<this.length;r++)this[r]._private.traversalCache=null},yn(eo,{roots:mG({noIncomingEdges:!0}),leaves:mG({noOutgoingEdges:!0}),outgoers:ic(wG({outgoing:!0}),"outgoers"),successors:_G({outgoing:!0}),incomers:ic(wG({incoming:!0}),"incomers"),predecessors:_G({})}),yn(eo,{neighborhood:ic(function(r){for(var t=[],i=this.nodes(),a=0;a<i.length;a++)for(var u=i[a],c=u.connectedEdges(),l=0;l<c.length;l++){var h=c[l],v=h.source(),p=h.target(),g=u===v?p:v;g.length>0&&t.push(g[0]),t.push(h[0])}return this.spawn(t,!0).filter(r)},"neighborhood"),closedNeighborhood:function(t){return this.neighborhood().add(this).filter(t)},openNeighborhood:function(t){return this.neighborhood(t)}}),eo.neighbourhood=eo.neighborhood,eo.closedNeighbourhood=eo.closedNeighborhood,eo.openNeighbourhood=eo.openNeighborhood,yn(eo,{source:ic(function(t){var i=this[0],a;return i&&(a=i._private.source||i.cy().collection()),a&&t?a.filter(t):a},"source"),target:ic(function(t){var i=this[0],a;return i&&(a=i._private.target||i.cy().collection()),a&&t?a.filter(t):a},"target"),sources:xG({attr:"source"}),targets:xG({attr:"target"})});function xG(r){return function(i){for(var a=[],u=0;u<this.length;u++){var c=this[u],l=c._private[r.attr];l&&a.push(l)}return this.spawn(a,!0).filter(i)}}yn(eo,{edgesWith:ic(EG(),"edgesWith"),edgesTo:ic(EG({thisIsSrc:!0}),"edgesTo")});function EG(r){return function(i){var a=[],u=this._private.cy,c=r||{};hn(i)&&(i=u.$(i));for(var l=0;l<i.length;l++)for(var h=i[l]._private.edges,v=0;v<h.length;v++){var p=h[v],g=p._private.data,w=this.hasElementWithId(g.source)&&i.hasElementWithId(g.target),_=i.hasElementWithId(g.source)&&this.hasElementWithId(g.target),E=w||_;E&&((c.thisIsSrc||c.thisIsTgt)&&(c.thisIsSrc&&!w||c.thisIsTgt&&!_)||a.push(p))}return this.spawn(a,!0)}}yn(eo,{connectedEdges:ic(function(r){for(var t=[],i=this,a=0;a<i.length;a++){var u=i[a];if(u.isNode())for(var c=u._private.edges,l=0;l<c.length;l++){var h=c[l];t.push(h)}}return this.spawn(t,!0).filter(r)},"connectedEdges"),connectedNodes:ic(function(r){for(var t=[],i=this,a=0;a<i.length;a++){var u=i[a];u.isEdge()&&(t.push(u.source()[0]),t.push(u.target()[0]))}return this.spawn(t,!0).filter(r)},"connectedNodes"),parallelEdges:ic(kG(),"parallelEdges"),codirectedEdges:ic(kG({codirected:!0}),"codirectedEdges")});function kG(r){var t={codirected:!1};return r=yn({},t,r),function(a){for(var u=[],c=this.edges(),l=r,h=0;h<c.length;h++)for(var v=c[h],p=v._private,g=p.source,w=g._private.data.id,_=p.data.target,E=g._private.edges,k=0;k<E.length;k++){var I=E[k],C=I._private.data,P=C.target,A=C.source,L=P===_&&A===w,O=w===P&&_===A;(l.codirected&&L||!l.codirected&&(L||O))&&u.push(I)}return this.spawn(u,!0).filter(a)}}yn(eo,{components:function(t){var i=this,a=i.cy(),u=a.collection(),c=t==null?i.nodes():t.nodes(),l=[];t!=null&&c.empty()&&(c=t.sources());var h=function(g,w){u.merge(g),c.unmerge(g),w.merge(g)};if(c.empty())return i.spawn();var v=function(){var g=a.collection();l.push(g);var w=c[0];h(w,g),i.bfs({directed:!1,roots:w,visit:function(E){return h(E,g)}}),g.forEach(function(_){_.connectedEdges().forEach(function(E){i.has(E)&&g.has(E.source())&&g.has(E.target())&&g.merge(E)})})};do v();while(c.length>0);return l},component:function(){var t=this[0];return t.cy().mutableElements().components(t)[0]}}),eo.componentsOf=eo.components;var $s=function(t,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(t===void 0){qi("A collection must have a reference to the core");return}var c=new sh,l=!1;if(!i)i=[];else if(i.length>0&&Sr(i[0])&&!u1(i[0])){l=!0;for(var h=[],v=new cb,p=0,g=i.length;p<g;p++){var w=i[p];w.data==null&&(w.data={});var _=w.data;if(_.id==null)_.id=s8();else if(t.hasElementWithId(_.id)||v.has(_.id))continue;var E=new Ox(t,w,!1);h.push(E),v.add(_.id)}i=h}this.length=0;for(var k=0,I=i.length;k<I;k++){var C=i[k][0];if(C!=null){var P=C._private.data.id;(!a||!c.has(P))&&(a&&c.set(P,{index:this.length,ele:C}),this[this.length]=C,this.length++)}}this._private={eles:this,cy:t,get map(){return this.lazyMap==null&&this.rebuildMap(),this.lazyMap},set map(A){this.lazyMap=A},rebuildMap:function(){for(var L=this.lazyMap=new sh,O=this.eles,M=0;M<O.length;M++){var B=O[M];L.set(B.id(),{index:M,ele:B})}}},a&&(this._private.map=c),l&&!u&&this.restore()},wi=Ox.prototype=$s.prototype=Object.create(Array.prototype);wi.instanceString=function(){return"collection"},wi.spawn=function(r,t){return new $s(this.cy(),r,t)},wi.spawnSelf=function(){return this.spawn(this)},wi.cy=function(){return this._private.cy},wi.renderer=function(){return this._private.cy.renderer()},wi.element=function(){return this[0]},wi.collection=function(){return I$(this)?this:new $s(this._private.cy,[this])},wi.unique=function(){return new $s(this._private.cy,this,!0)},wi.hasElementWithId=function(r){return r=""+r,this._private.map.has(r)},wi.getElementById=function(r){r=""+r;var t=this._private.cy,i=this._private.map.get(r);return i?i.ele:new $s(t)},wi.$id=wi.getElementById,wi.poolIndex=function(){var r=this._private.cy,t=r._private.elements,i=this[0]._private.data.id;return t._private.map.get(i).index},wi.indexOf=function(r){var t=r[0]._private.data.id;return this._private.map.get(t).index},wi.indexOfId=function(r){return r=""+r,this._private.map.get(r).index},wi.json=function(r){var t=this.element(),i=this.cy();if(t==null&&r)return this;if(t!=null){var a=t._private;if(Sr(r)){if(i.startBatch(),r.data){t.data(r.data);var u=a.data;if(t.isEdge()){var c=!1,l={},h=r.data.source,v=r.data.target;h!=null&&h!=u.source&&(l.source=""+h,c=!0),v!=null&&v!=u.target&&(l.target=""+v,c=!0),c&&(t=t.move(l))}else{var p="parent"in r.data,g=r.data.parent;p&&(g!=null||u.parent!=null)&&g!=u.parent&&(g===void 0&&(g=null),g!=null&&(g=""+g),t=t.move({parent:g}))}}r.position&&t.position(r.position);var w=function(I,C,P){var A=r[I];A!=null&&A!==a[I]&&(A?t[C]():t[P]())};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"),r.classes!=null&&t.classes(r.classes),i.endBatch(),this}else if(r===void 0){var _={data:zl(a.data),position:zl(a.position),group:a.group,removed:a.removed,selected:a.selected,selectable:a.selectable,locked:a.locked,grabbable:a.grabbable,pannable:a.pannable,classes:null};_.classes="";var E=0;return a.classes.forEach(function(k){return _.classes+=E++===0?k:" "+k}),_}}},wi.jsons=function(){for(var r=[],t=0;t<this.length;t++){var i=this[t],a=i.json();r.push(a)}return r},wi.clone=function(){for(var r=this.cy(),t=[],i=0;i<this.length;i++){var a=this[i],u=a.json(),c=new Ox(r,u,!1);t.push(c)}return new $s(r,t)},wi.copy=wi.clone,wi.restore=function(){for(var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=this,a=i.cy(),u=a._private,c=[],l=[],h,v=0,p=i.length;v<p;v++){var g=i[v];t&&!g.removed()||(g.isNode()?c.push(g):l.push(g))}h=c.concat(l);var w,_=function(){h.splice(w,1),w--};for(w=0;w<h.length;w++){var E=h[w],k=E._private,I=k.data;if(E.clearTraversalCache(),!(!t&&!k.removed)){if(I.id===void 0)I.id=s8();else if(Ft(I.id))I.id=""+I.id;else if(xd(I.id)||!hn(I.id)){qi("Can not create element with invalid string ID `"+I.id+"`"),_();continue}else if(a.hasElementWithId(I.id)){qi("Can not create second element with ID `"+I.id+"`"),_();continue}}var C=I.id;if(E.isNode()){var P=k.position;P.x==null&&(P.x=0),P.y==null&&(P.y=0)}if(E.isEdge()){for(var A=E,L=["source","target"],O=L.length,M=!1,B=0;B<O;B++){var F=L[B],q=I[F];Ft(q)&&(q=I[F]=""+I[F]),q==null||q===""?(qi("Can not create edge `"+C+"` with unspecified "+F),M=!0):a.hasElementWithId(q)||(qi("Can not create edge `"+C+"` with nonexistant "+F+" `"+q+"`"),M=!0)}if(M){_();continue}var $=a.getElementById(I.source),Y=a.getElementById(I.target);$.same(Y)?$._private.edges.push(A):($._private.edges.push(A),Y._private.edges.push(A)),A._private.source=$,A._private.target=Y}k.map=new sh,k.map.set(C,{ele:E,index:0}),k.removed=!1,t&&a.addToPool(E)}for(var V=0;V<c.length;V++){var U=c[V],G=U._private.data;Ft(G.parent)&&(G.parent=""+G.parent);var X=G.parent,ne=X!=null;if(ne||U._private.parent){var ae=U._private.parent?a.collection().merge(U._private.parent):a.getElementById(X);if(ae.empty())G.parent=void 0;else if(ae[0].removed())Hr("Node added with missing parent, reference to parent removed"),G.parent=void 0,U._private.parent=null;else{for(var oe=!1,le=ae;!le.empty();){if(U.same(le)){oe=!0,G.parent=void 0;break}le=le.parent()}oe||(ae[0]._private.children.push(U),U._private.parent=ae[0],u.hasCompoundNodes=!0)}}}if(h.length>0){for(var pe=h.length===i.length?i:new $s(a,h),ge=0;ge<pe.length;ge++){var de=pe[ge];de.isNode()||(de.parallelEdges().clearTraversalCache(),de.source().clearTraversalCache(),de.target().clearTraversalCache())}var Se;u.hasCompoundNodes?Se=a.collection().merge(pe).merge(pe.connectedNodes()).merge(pe.parent()):Se=pe,Se.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(r),r?pe.emitAndNotify("add"):t&&pe.emit("add")}return i},wi.removed=function(){var r=this[0];return r&&r._private.removed},wi.inside=function(){var r=this[0];return r&&!r._private.removed},wi.remove=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=this,a=[],u={},c=i._private.cy;function l(X){for(var ne=X._private.edges,ae=0;ae<ne.length;ae++)v(ne[ae])}function h(X){for(var ne=X._private.children,ae=0;ae<ne.length;ae++)v(ne[ae])}function v(X){var ne=u[X.id()];t&&X.removed()||ne||(u[X.id()]=!0,X.isNode()?(a.push(X),l(X),h(X)):a.unshift(X))}for(var p=0,g=i.length;p<g;p++){var w=i[p];v(w)}function _(X,ne){var ae=X._private.edges;Sd(ae,ne),X.clearTraversalCache()}function E(X){X.clearTraversalCache()}var k=[];k.ids={};function I(X,ne){ne=ne[0],X=X[0];var ae=X._private.children,oe=X.id();Sd(ae,ne),ne._private.parent=null,k.ids[oe]||(k.ids[oe]=!0,k.push(X))}i.dirtyCompoundBoundsCache(),t&&c.removeFromPool(a);for(var C=0;C<a.length;C++){var P=a[C];if(P.isEdge()){var A=P.source()[0],L=P.target()[0];_(A,P),_(L,P);for(var O=P.parallelEdges(),M=0;M<O.length;M++){var B=O[M];E(B),B.isBundledBezier()&&B.dirtyBoundingBoxCache()}}else{var F=P.parent();F.length!==0&&I(F,P)}t&&(P._private.removed=!0)}var q=c._private.elements;c._private.hasCompoundNodes=!1;for(var $=0;$<q.length;$++){var Y=q[$];if(Y.isParent()){c._private.hasCompoundNodes=!0;break}}var V=new $s(this.cy(),a);V.size()>0&&(r?V.emitAndNotify("remove"):t&&V.emit("remove"));for(var U=0;U<k.length;U++){var G=k[U];(!t||!G.removed())&&G.updateStyle()}return V},wi.move=function(r){var t=this._private.cy,i=this,a=!1,u=!1,c=function(k){return k==null?k:""+k};if(r.source!==void 0||r.target!==void 0){var l=c(r.source),h=c(r.target),v=l!=null&&t.hasElementWithId(l),p=h!=null&&t.hasElementWithId(h);(v||p)&&(t.batch(function(){i.remove(a,u),i.emitAndNotify("moveout");for(var E=0;E<i.length;E++){var k=i[E],I=k._private.data;k.isEdge()&&(v&&(I.source=l),p&&(I.target=h))}i.restore(a,u)}),i.emitAndNotify("move"))}else if(r.parent!==void 0){var g=c(r.parent),w=g===null||t.hasElementWithId(g);if(w){var _=g===null?void 0:g;t.batch(function(){var E=i.remove(a,u);E.emitAndNotify("moveout");for(var k=0;k<i.length;k++){var I=i[k],C=I._private.data;I.isNode()&&(C.parent=_)}E.restore(a,u)}),i.emitAndNotify("move")}}return this},[D8,Wye,Jx,Ld,yb,l0e,Qx,T0e,vG,pG,P0e,r2,i2,Fs,Md,eo].forEach(function(r){yn(wi,r)});var B0e={add:function(t){var i,a=this;if(Pu(t)){var u=t;if(u._private.cy===a)i=u.restore();else{for(var c=[],l=0;l<u.length;l++){var h=u[l];c.push(h.json())}i=new $s(a,c)}}else if(di(t)){var v=t;i=new $s(a,v)}else if(Sr(t)&&(di(t.nodes)||di(t.edges))){for(var p=t,g=[],w=["nodes","edges"],_=0,E=w.length;_<E;_++){var k=w[_],I=p[k];if(di(I))for(var C=0,P=I.length;C<P;C++){var A=yn({group:k},I[C]);g.push(A)}}i=new $s(a,g)}else{var L=t;i=new Ox(a,L).collection()}return i},remove:function(t){if(!Pu(t)){if(hn(t)){var i=t;t=this.$(i)}}return t.remove()}};/*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */function q0e(r,t,i,a){var u=4,c=.001,l=1e-7,h=10,v=11,p=1/(v-1),g=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;r=Math.min(r,1),i=Math.min(i,1),r=Math.max(r,0),i=Math.max(i,0);var _=g?new Float32Array(v):new Array(v);function E(Y,V){return 1-3*V+3*Y}function k(Y,V){return 3*V-6*Y}function I(Y){return 3*Y}function C(Y,V,U){return((E(V,U)*Y+k(V,U))*Y+I(V))*Y}function P(Y,V,U){return 3*E(V,U)*Y*Y+2*k(V,U)*Y+I(V)}function A(Y,V){for(var U=0;U<u;++U){var G=P(V,r,i);if(G===0)return V;var X=C(V,r,i)-Y;V-=X/G}return V}function L(){for(var Y=0;Y<v;++Y)_[Y]=C(Y*p,r,i)}function O(Y,V,U){var G,X,ne=0;do X=V+(U-V)/2,G=C(X,r,i)-Y,G>0?U=X:V=X;while(Math.abs(G)>l&&++ne<h);return X}function M(Y){for(var V=0,U=1,G=v-1;U!==G&&_[U]<=Y;++U)V+=p;--U;var X=(Y-_[U])/(_[U+1]-_[U]),ne=V+X*p,ae=P(ne,r,i);return ae>=c?A(Y,ne):ae===0?ne:O(Y,V,V+p)}var B=!1;function F(){B=!0,(r!==t||i!==a)&&L()}var q=function(V){return B||F(),r===t&&i===a?V:V===0?0:V===1?1:C(M(V),t,a)};q.getControlPoints=function(){return[{x:r,y:t},{x:i,y:a}]};var $="generateBezier("+[r,t,i,a]+")";return q.toString=function(){return $},q}/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */var F0e=function(){function r(a){return-a.tension*a.x-a.friction*a.v}function t(a,u,c){var l={x:a.x+c.dx*u,v:a.v+c.dv*u,tension:a.tension,friction:a.friction};return{dx:l.v,dv:r(l)}}function i(a,u){var c={dx:a.v,dv:r(a)},l=t(a,u*.5,c),h=t(a,u*.5,l),v=t(a,u,h),p=1/6*(c.dx+2*(l.dx+h.dx)+v.dx),g=1/6*(c.dv+2*(l.dv+h.dv)+v.dv);return a.x=a.x+p*u,a.v=a.v+g*u,a}return function a(u,c,l){var h={x:-1,v:0,tension:null,friction:null},v=[0],p=0,g=1/1e4,w=16/1e3,_,E,k;for(u=parseFloat(u)||500,c=parseFloat(c)||20,l=l||null,h.tension=u,h.friction=c,_=l!==null,_?(p=a(u,c),E=p/l*w):E=w;k=i(k||h,E),v.push(1+k.x),p+=16,Math.abs(k.x)>g&&Math.abs(k.v)>g;);return _?function(I){return v[I*(v.length-1)|0]}:p}}(),_i=function(t,i,a,u){var c=q0e(t,i,a,u);return function(l,h,v){return l+(h-l)*c(v)}},o2={linear:function(t,i,a){return t+(i-t)*a},ease:_i(.25,.1,.25,1),"ease-in":_i(.42,0,1,1),"ease-out":_i(0,0,.58,1),"ease-in-out":_i(.42,0,.58,1),"ease-in-sine":_i(.47,0,.745,.715),"ease-out-sine":_i(.39,.575,.565,1),"ease-in-out-sine":_i(.445,.05,.55,.95),"ease-in-quad":_i(.55,.085,.68,.53),"ease-out-quad":_i(.25,.46,.45,.94),"ease-in-out-quad":_i(.455,.03,.515,.955),"ease-in-cubic":_i(.55,.055,.675,.19),"ease-out-cubic":_i(.215,.61,.355,1),"ease-in-out-cubic":_i(.645,.045,.355,1),"ease-in-quart":_i(.895,.03,.685,.22),"ease-out-quart":_i(.165,.84,.44,1),"ease-in-out-quart":_i(.77,0,.175,1),"ease-in-quint":_i(.755,.05,.855,.06),"ease-out-quint":_i(.23,1,.32,1),"ease-in-out-quint":_i(.86,0,.07,1),"ease-in-expo":_i(.95,.05,.795,.035),"ease-out-expo":_i(.19,1,.22,1),"ease-in-out-expo":_i(1,0,0,1),"ease-in-circ":_i(.6,.04,.98,.335),"ease-out-circ":_i(.075,.82,.165,1),"ease-in-out-circ":_i(.785,.135,.15,.86),spring:function(t,i,a){if(a===0)return o2.linear;var u=F0e(t,i,a);return function(c,l,h){return c+(l-c)*u(h)}},"cubic-bezier":_i};function SG(r,t,i,a,u){if(a===1||t===i)return i;var c=u(t,i,a);return r==null||((r.roundValue||r.color)&&(c=Math.round(c)),r.min!==void 0&&(c=Math.max(c,r.min)),r.max!==void 0&&(c=Math.min(c,r.max))),c}function TG(r,t){return r.pfValue!=null||r.value!=null?r.pfValue!=null&&(t==null||t.type.units!=="%")?r.pfValue:r.value:r}function Eb(r,t,i,a,u){var c=u!=null?u.type:null;i<0?i=0:i>1&&(i=1);var l=TG(r,u),h=TG(t,u);if(Ft(l)&&Ft(h))return SG(c,l,h,i,a);if(di(l)&&di(h)){for(var v=[],p=0;p<h.length;p++){var g=l[p],w=h[p];if(g!=null&&w!=null){var _=SG(c,g,w,i,a);v.push(_)}else v.push(w)}return v}}function $0e(r,t,i,a){var u=!a,c=r._private,l=t._private,h=l.easing,v=l.startTime,p=a?r:r.cy(),g=p.style();if(!l.easingImpl)if(h==null)l.easingImpl=o2.linear;else{var w;if(hn(h)){var _=g.parse("transition-timing-function",h);w=_.value}else w=h;var E,k;hn(w)?(E=w,k=[]):(E=w[1],k=w.slice(2).map(function(pe){return+pe})),k.length>0?(E==="spring"&&k.push(l.duration),l.easingImpl=o2[E].apply(null,k)):l.easingImpl=o2[E]}var I=l.easingImpl,C;if(l.duration===0?C=1:C=(i-v)/l.duration,l.applying&&(C=l.progress),C<0?C=0:C>1&&(C=1),l.delay==null){var P=l.startPosition,A=l.position;if(A&&u&&!r.locked()){var L={};R1(P.x,A.x)&&(L.x=Eb(P.x,A.x,C,I)),R1(P.y,A.y)&&(L.y=Eb(P.y,A.y,C,I)),r.position(L)}var O=l.startPan,M=l.pan,B=c.pan,F=M!=null&&a;F&&(R1(O.x,M.x)&&(B.x=Eb(O.x,M.x,C,I)),R1(O.y,M.y)&&(B.y=Eb(O.y,M.y,C,I)),r.emit("pan"));var q=l.startZoom,$=l.zoom,Y=$!=null&&a;Y&&(R1(q,$)&&(c.zoom=b1(c.minZoom,Eb(q,$,C,I),c.maxZoom)),r.emit("zoom")),(F||Y)&&r.emit("viewport");var V=l.style;if(V&&V.length>0&&u){for(var U=0;U<V.length;U++){var G=V[U],X=G.name,ne=G,ae=l.startStyle[X],oe=g.properties[ae.name],le=Eb(ae,ne,C,I,oe);g.overrideBypass(r,X,le)}r.emit("style")}}return l.progress=C,C}function R1(r,t){return r==null||t==null?!1:Ft(r)&&Ft(t)?!0:!!(r&&t)}function G0e(r,t,i,a){var u=t._private;u.started=!0,u.startTime=i-u.progress*u.duration}function RG(r,t){var i=t._private.aniEles,a=[];function u(g,w){var _=g._private,E=_.animation.current,k=_.animation.queue,I=!1;if(E.length===0){var C=k.shift();C&&E.push(C)}for(var P=function(B){for(var F=B.length-1;F>=0;F--){var q=B[F];q()}B.splice(0,B.length)},A=E.length-1;A>=0;A--){var L=E[A],O=L._private;if(O.stopped){E.splice(A,1),O.hooked=!1,O.playing=!1,O.started=!1,P(O.frames);continue}!O.playing&&!O.applying||(O.playing&&O.applying&&(O.applying=!1),O.started||G0e(g,L,r),$0e(g,L,r,w),O.applying&&(O.applying=!1),P(O.frames),O.step!=null&&O.step(r),L.completed()&&(E.splice(A,1),O.hooked=!1,O.playing=!1,O.started=!1,P(O.completes)),I=!0)}return!w&&E.length===0&&k.length===0&&a.push(g),I}for(var c=!1,l=0;l<i.length;l++){var h=i[l],v=u(h);c=c||v}var p=u(t,!0);(c||p)&&(i.length>0?t.notify("draw",i):t.notify("draw")),i.unmerge(a),t.emit("step")}var H0e={animate:zr.animate(),animation:zr.animation(),animated:zr.animated(),clearQueue:zr.clearQueue(),delay:zr.delay(),delayAnimation:zr.delayAnimation(),stop:zr.stop(),addToAnimationPool:function(t){var i=this;i.styleEnabled()&&i._private.aniEles.merge(t)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var t=this;if(t._private.animationsRunning=!0,!t.styleEnabled())return;function i(){t._private.animationsRunning&&Px(function(c){RG(c,t),i()})}var a=t.renderer();a&&a.beforeRender?a.beforeRender(function(c,l){RG(l,t)},a.beforeRenderPriorities.animations):i()}},z0e={qualifierCompare:function(t,i){return t==null||i==null?t==null&&i==null:t.sameText(i)},eventMatches:function(t,i,a){var u=i.qualifier;return u!=null?t!==a.target&&u1(a.target)&&u.matches(a.target):!0},addEventFields:function(t,i){i.cy=t,i.target=t},callbackContext:function(t,i,a){return i.qualifier!=null?a.target:t}},u2=function(t){return hn(t)?new Ad(t):t},IG={createEmitter:function(){var t=this._private;return t.emitter||(t.emitter=new t2(z0e,this)),this},emitter:function(){return this._private.emitter},on:function(t,i,a){return this.emitter().on(t,u2(i),a),this},removeListener:function(t,i,a){return this.emitter().removeListener(t,u2(i),a),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(t,i,a){return this.emitter().one(t,u2(i),a),this},once:function(t,i,a){return this.emitter().one(t,u2(i),a),this},emit:function(t,i){return this.emitter().emit(t,i),this},emitAndNotify:function(t,i){return this.emit(t),this.notify(t,i),this}};zr.eventAliasesOn(IG);var WA={png:function(t){var i=this._private.renderer;return t=t||{},i.png(t)},jpg:function(t){var i=this._private.renderer;return t=t||{},t.bg=t.bg||"#fff",i.jpg(t)}};WA.jpeg=WA.jpg;var c2={layout:function(t){var i=this;if(t==null){qi("Layout options must be specified to make a layout");return}if(t.name==null){qi("A `name` must be specified to make a layout");return}var a=t.name,u=i.extension("layout",a);if(u==null){qi("No such layout `"+a+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var c;hn(t.eles)?c=i.$(t.eles):c=t.eles!=null?t.eles:i.$();var l=new u(yn({},t,{cy:i,eles:c}));return l}};c2.createLayout=c2.makeLayout=c2.layout;var V0e={notify:function(t,i){var a=this._private;if(this.batching()){a.batchNotifications=a.batchNotifications||{};var u=a.batchNotifications[t]=a.batchNotifications[t]||this.collection();i!=null&&u.merge(i);return}if(a.notificationsEnabled){var c=this.renderer();this.destroyed()||!c||c.notify(t,i)}},notifications:function(t){var i=this._private;return t===void 0?i.notificationsEnabled:(i.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 i=this.renderer();Object.keys(t.batchNotifications).forEach(function(a){var u=t.batchNotifications[a];u.empty()?i.notify(a):i.notify(a,u)})}return this},batch:function(t){return this.startBatch(),t(),this.endBatch(),this},batchData:function(t){var i=this;return this.batch(function(){for(var a=Object.keys(t),u=0;u<a.length;u++){var c=a[u],l=t[c],h=i.getElementById(c);h.data(l)}})}},U0e=qs({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]}),KA={renderTo:function(t,i,a,u){var c=this._private.renderer;return c.renderTo(t,i,a,u),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 i=this,a=i.extension("renderer",t.name);if(a==null){qi("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&&Hr("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 u=U0e(t);u.cy=i,i._private.renderer=new a(u),this.notify("init")},destroyRenderer:function(){var t=this;t.notify("destroy");var i=t.container();if(i)for(i._cyreg=null;i.childNodes.length>0;)i.removeChild(i.childNodes[0]);t._private.renderer=null,t.mutableElements().forEach(function(a){var u=a._private;u.rscratch={},u.rstyle={},u.animation.current=[],u.animation.queue=[]})},onRender:function(t){return this.on("render",t)},offRender:function(t){return this.off("render",t)}};KA.invalidateDimensions=KA.resize;var l2={collection:function(t,i){return hn(t)?this.$(t):Pu(t)?t.collection():di(t)?(i||(i={}),new $s(this,t,i.unique,i.removed)):new $s(this)},nodes:function(t){var i=this.$(function(a){return a.isNode()});return t?i.filter(t):i},edges:function(t){var i=this.$(function(a){return a.isEdge()});return t?i.filter(t):i},$:function(t){var i=this._private.elements;return t?i.filter(t):i.spawnSelf()},mutableElements:function(){return this._private.elements}};l2.elements=l2.filter=l2.$;var ws={},I1="t",Y0e="f";ws.apply=function(r){for(var t=this,i=t._private,a=i.cy,u=a.collection(),c=0;c<r.length;c++){var l=r[c],h=t.getContextMeta(l);if(!h.empty){var v=t.getContextStyle(h),p=t.applyContextStyle(h,v,l);l._private.appliedInitStyle?t.updateTransitions(l,p.diffProps):l._private.appliedInitStyle=!0;var g=t.updateStyleHints(l);g&&u.push(l)}}return u},ws.getPropertiesDiff=function(r,t){var i=this,a=i._private.propDiffs=i._private.propDiffs||{},u=r+"-"+t,c=a[u];if(c)return c;for(var l=[],h={},v=0;v<i.length;v++){var p=i[v],g=r[v]===I1,w=t[v]===I1,_=g!==w,E=p.mappedProperties.length>0;if(_||w&&E){var k=void 0;_&&E||_?k=p.properties:E&&(k=p.mappedProperties);for(var I=0;I<k.length;I++){for(var C=k[I],P=C.name,A=!1,L=v+1;L<i.length;L++){var O=i[L],M=t[L]===I1;if(M&&(A=O.properties[C.name]!=null,A))break}!h[P]&&!A&&(h[P]=!0,l.push(P))}}}return a[u]=l,l},ws.getContextMeta=function(r){for(var t=this,i="",a,u=r._private.styleCxtKey||"",c=0;c<t.length;c++){var l=t[c],h=l.selector&&l.selector.matches(r);h?i+=I1:i+=Y0e}return a=t.getPropertiesDiff(u,i),r._private.styleCxtKey=i,{key:i,diffPropNames:a,empty:a.length===0}},ws.getContextStyle=function(r){var t=r.key,i=this,a=this._private.contextStyles=this._private.contextStyles||{};if(a[t])return a[t];for(var u={_private:{key:t}},c=0;c<i.length;c++){var l=i[c],h=t[c]===I1;if(h)for(var v=0;v<l.properties.length;v++){var p=l.properties[v];u[p.name]=p}}return a[t]=u,u},ws.applyContextStyle=function(r,t,i){for(var a=this,u=r.diffPropNames,c={},l=a.types,h=0;h<u.length;h++){var v=u[h],p=t[v],g=i.pstyle(v);if(!p)if(g)g.bypass?p={name:v,deleteBypassed:!0}:p={name:v,delete:!0};else continue;if(g!==p){if(p.mapped===l.fn&&g!=null&&g.mapping!=null&&g.mapping.value===p.value){var w=g.mapping,_=w.fnValue=p.value(i);if(_===w.prevFnValue)continue}var E=c[v]={prev:g};a.applyParsedProperty(i,p),E.next=i.pstyle(v),E.next&&E.next.bypass&&(E.next=E.next.bypassed)}}return{diffProps:c}},ws.updateStyleHints=function(r){var t=r._private,i=this,a=i.propertyGroupNames,u=i.propertyGroupKeys,c=function(Be,ve,ke){return i.getPropertiesHash(Be,ve,ke)},l=t.styleKey;if(r.removed())return!1;var h=t.group==="nodes",v=r._private.style;a=Object.keys(v);for(var p=0;p<u.length;p++){var g=u[p];t.styleKeys[g]=[ip,ub]}for(var w=function(Be,ve){return t.styleKeys[ve][0]=d1(Be,t.styleKeys[ve][0])},_=function(Be,ve){return t.styleKeys[ve][1]=v1(Be,t.styleKeys[ve][1])},E=function(Be,ve){w(Be,ve),_(Be,ve)},k=function(Be,ve){for(var ke=0;ke<Be.length;ke++){var je=Be.charCodeAt(ke);w(je,ve),_(je,ve)}},I=2e9,C=function(Be){return-128<Be&&Be<128&&Math.floor(Be)!==Be?I-(Be*1024|0):Be},P=0;P<a.length;P++){var A=a[P],L=v[A];if(L!=null){var O=this.properties[A],M=O.type,B=O.groupKey,F=void 0;O.hashOverride!=null?F=O.hashOverride(r,L):L.pfValue!=null&&(F=L.pfValue);var q=O.enums==null?L.value:null,$=F!=null,Y=q!=null,V=$||Y,U=L.units;if(M.number&&V&&!M.multiple){var G=$?F:q;E(C(G),B),!$&&U!=null&&k(U,B)}else k(L.strValue,B)}}for(var X=[ip,ub],ne=0;ne<u.length;ne++){var ae=u[ne],oe=t.styleKeys[ae];X[0]=d1(oe[0],X[0]),X[1]=v1(oe[1],X[1])}t.styleKey=cge(X[0],X[1]);var le=t.styleKeys;t.labelDimsKey=kd(le.labelDimensions);var pe=c(r,["label"],le.labelDimensions);if(t.labelKey=kd(pe),t.labelStyleKey=kd(Lx(le.commonLabel,pe)),!h){var ge=c(r,["source-label"],le.labelDimensions);t.sourceLabelKey=kd(ge),t.sourceLabelStyleKey=kd(Lx(le.commonLabel,ge));var de=c(r,["target-label"],le.labelDimensions);t.targetLabelKey=kd(de),t.targetLabelStyleKey=kd(Lx(le.commonLabel,de))}if(h){var Se=t.styleKeys,Ne=Se.nodeBody,ye=Se.nodeBorder,we=Se.nodeOutline,Pe=Se.backgroundImage,Fe=Se.compound,Ue=Se.pie,He=Se.stripe,De=[Ne,ye,we,Pe,Fe,Ue,He].filter(function(Ce){return Ce!=null}).reduce(Lx,[ip,ub]);t.nodeKey=kd(De),t.hasPie=Ue!=null&&Ue[0]!==ip&&Ue[1]!==ub,t.hasStripe=He!=null&&He[0]!==ip&&He[1]!==ub}return l!==t.styleKey},ws.clearStyleHints=function(r){var t=r._private;t.styleCxtKey="",t.styleKeys={},t.styleKey=null,t.labelKey=null,t.labelStyleKey=null,t.sourceLabelKey=null,t.sourceLabelStyleKey=null,t.targetLabelKey=null,t.targetLabelStyleKey=null,t.nodeKey=null,t.hasPie=null,t.hasStripe=null},ws.applyParsedProperty=function(r,t){var i=this,a=t,u=r._private.style,c,l=i.types,h=i.properties[a.name].type,v=a.bypass,p=u[a.name],g=p&&p.bypass,w=r._private,_="mapping",E=function(Ne){return Ne==null?null:Ne.pfValue!=null?Ne.pfValue:Ne.value},k=function(){var Ne=E(p),ye=E(a);i.checkTriggers(r,a.name,Ne,ye)};if(t.name==="curve-style"&&r.isEdge()&&(t.value!=="bezier"&&r.isLoop()||t.value==="haystack"&&(r.source().isParent()||r.target().isParent()))&&(a=t=this.parse(t.name,"bezier",v)),a.delete)return u[a.name]=void 0,k(),!0;if(a.deleteBypassed)return p?p.bypass?(p.bypassed=void 0,k(),!0):!1:(k(),!0);if(a.deleteBypass)return p?p.bypass?(u[a.name]=p.bypassed,k(),!0):!1:(k(),!0);var I=function(){Hr("Do not assign mappings to elements without corresponding data (i.e. ele `"+r.id()+"` has no mapping for property `"+a.name+"` with data field `"+a.field+"`); try a `["+a.field+"]` selector to limit scope to elements with `"+a.field+"` defined")};switch(a.mapped){case l.mapData:{for(var C=a.field.split("."),P=w.data,A=0;A<C.length&&P;A++){var L=C[A];P=P[L]}if(P==null)return I(),!1;var O;if(Ft(P)){var M=a.fieldMax-a.fieldMin;M===0?O=0:O=(P-a.fieldMin)/M}else return Hr("Do not use continuous mappers without specifying numeric data (i.e. `"+a.field+": "+P+"` for `"+r.id()+"` is non-numeric)"),!1;if(O<0?O=0:O>1&&(O=1),h.color){var B=a.valueMin[0],F=a.valueMax[0],q=a.valueMin[1],$=a.valueMax[1],Y=a.valueMin[2],V=a.valueMax[2],U=a.valueMin[3]==null?1:a.valueMin[3],G=a.valueMax[3]==null?1:a.valueMax[3],X=[Math.round(B+(F-B)*O),Math.round(q+($-q)*O),Math.round(Y+(V-Y)*O),Math.round(U+(G-U)*O)];c={bypass:a.bypass,name:a.name,value:X,strValue:"rgb("+X[0]+", "+X[1]+", "+X[2]+")"}}else if(h.number){var ne=a.valueMin+(a.valueMax-a.valueMin)*O;c=this.parse(a.name,ne,a.bypass,_)}else return!1;if(!c)return I(),!1;c.mapping=a,a=c;break}case l.data:{for(var ae=a.field.split("."),oe=w.data,le=0;le<ae.length&&oe;le++){var pe=ae[le];oe=oe[pe]}if(oe!=null&&(c=this.parse(a.name,oe,a.bypass,_)),!c)return I(),!1;c.mapping=a,a=c;break}case l.fn:{var ge=a.value,de=a.fnValue!=null?a.fnValue:ge(r);if(a.prevFnValue=de,de==null)return Hr("Custom function mappers may not return null (i.e. `"+a.name+"` for ele `"+r.id()+"` is null)"),!1;if(c=this.parse(a.name,de,a.bypass,_),!c)return Hr("Custom function mappers may not return invalid values for the property type (i.e. `"+a.name+"` for ele `"+r.id()+"` is invalid)"),!1;c.mapping=zl(a),a=c;break}case void 0:break;default:return!1}return v?(g?a.bypassed=p.bypassed:a.bypassed=p,u[a.name]=a):g?p.bypassed=a:u[a.name]=a,k(),!0},ws.cleanElements=function(r,t){for(var i=0;i<r.length;i++){var a=r[i];if(this.clearStyleHints(a),a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),!t)a._private.style={};else for(var u=a._private.style,c=Object.keys(u),l=0;l<c.length;l++){var h=c[l],v=u[h];v!=null&&(v.bypass?v.bypassed=null:u[h]=null)}}},ws.update=function(){var r=this._private.cy,t=r.mutableElements();t.updateStyle()},ws.updateTransitions=function(r,t){var i=this,a=r._private,u=r.pstyle("transition-property").value,c=r.pstyle("transition-duration").pfValue,l=r.pstyle("transition-delay").pfValue;if(u.length>0&&c>0){for(var h={},v=!1,p=0;p<u.length;p++){var g=u[p],w=r.pstyle(g),_=t[g];if(_){var E=_.prev,k=E,I=_.next!=null?_.next:w,C=!1,P=void 0,A=1e-6;k&&(Ft(k.pfValue)&&Ft(I.pfValue)?(C=I.pfValue-k.pfValue,P=k.pfValue+A*C):Ft(k.value)&&Ft(I.value)?(C=I.value-k.value,P=k.value+A*C):di(k.value)&&di(I.value)&&(C=k.value[0]!==I.value[0]||k.value[1]!==I.value[1]||k.value[2]!==I.value[2],P=k.strValue),C&&(h[g]=I.strValue,this.applyBypass(r,g,P),v=!0))}}if(!v)return;a.transitioning=!0,new gb(function(L){l>0?r.delayAnimation(l).play().promise().then(L):L()}).then(function(){return r.animation({style:h,duration:c,easing:r.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){i.removeBypasses(r,u),r.emitAndNotify("style"),a.transitioning=!1})}else a.transitioning&&(this.removeBypasses(r,u),r.emitAndNotify("style"),a.transitioning=!1)},ws.checkTrigger=function(r,t,i,a,u,c){var l=this.properties[t],h=u(l);r.removed()||h!=null&&h(i,a,r)&&c(l)},ws.checkZOrderTrigger=function(r,t,i,a){var u=this;this.checkTrigger(r,t,i,a,function(c){return c.triggersZOrder},function(){u._private.cy.notify("zorder",r)})},ws.checkBoundsTrigger=function(r,t,i,a){this.checkTrigger(r,t,i,a,function(u){return u.triggersBounds},function(u){r.dirtyCompoundBoundsCache(),r.dirtyBoundingBoxCache()})},ws.checkConnectedEdgesBoundsTrigger=function(r,t,i,a){this.checkTrigger(r,t,i,a,function(u){return u.triggersBoundsOfConnectedEdges},function(u){r.connectedEdges().forEach(function(c){c.dirtyBoundingBoxCache()})})},ws.checkParallelEdgesBoundsTrigger=function(r,t,i,a){this.checkTrigger(r,t,i,a,function(u){return u.triggersBoundsOfParallelEdges},function(u){r.parallelEdges().forEach(function(c){c.dirtyBoundingBoxCache()})})},ws.checkTriggers=function(r,t,i,a){r.dirtyStyleCache(),this.checkZOrderTrigger(r,t,i,a),this.checkBoundsTrigger(r,t,i,a),this.checkConnectedEdgesBoundsTrigger(r,t,i,a),this.checkParallelEdgesBoundsTrigger(r,t,i,a)};var C1={};C1.applyBypass=function(r,t,i,a){var u=this,c=[],l=!0;if(t==="*"||t==="**"){if(i!==void 0)for(var h=0;h<u.properties.length;h++){var v=u.properties[h],p=v.name,g=this.parse(p,i,!0);g&&c.push(g)}}else if(hn(t)){var w=this.parse(t,i,!0);w&&c.push(w)}else if(Sr(t)){var _=t;a=i;for(var E=Object.keys(_),k=0;k<E.length;k++){var I=E[k],C=_[I];if(C===void 0&&(C=_[Ix(I)]),C!==void 0){var P=this.parse(I,C,!0);P&&c.push(P)}}}else return!1;if(c.length===0)return!1;for(var A=!1,L=0;L<r.length;L++){for(var O=r[L],M={},B=void 0,F=0;F<c.length;F++){var q=c[F];if(a){var $=O.pstyle(q.name);B=M[q.name]={prev:$}}A=this.applyParsedProperty(O,zl(q))||A,a&&(B.next=O.pstyle(q.name))}A&&this.updateStyleHints(O),a&&this.updateTransitions(O,M,l)}return A},C1.overrideBypass=function(r,t,i){t=iC(t);for(var a=0;a<r.length;a++){var u=r[a],c=u._private.style[t],l=this.properties[t].type,h=l.color,v=l.mutiple,p=c?c.pfValue!=null?c.pfValue:c.value:null;!c||!c.bypass?this.applyBypass(u,t,i):(c.value=i,c.pfValue!=null&&(c.pfValue=i),h?c.strValue="rgb("+i.join(",")+")":v?c.strValue=i.join(" "):c.strValue=""+i,this.updateStyleHints(u)),this.checkTriggers(u,t,p,i)}},C1.removeAllBypasses=function(r,t){return this.removeBypasses(r,this.propertyNames,t)},C1.removeBypasses=function(r,t,i){for(var a=!0,u=0;u<r.length;u++){for(var c=r[u],l={},h=0;h<t.length;h++){var v=t[h],p=this.properties[v],g=c.pstyle(p.name);if(!(!g||!g.bypass)){var w="",_=this.parse(v,w,!0),E=l[p.name]={prev:g};this.applyParsedProperty(c,_),E.next=c.pstyle(p.name)}}this.updateStyleHints(c),i&&this.updateTransitions(c,l,a)}};var XA={};XA.getEmSizeInPixels=function(){var r=this.containerCss("font-size");return r!=null?parseFloat(r):1},XA.containerCss=function(r){var t=this._private.cy,i=t.container(),a=t.window();if(a&&i&&a.getComputedStyle)return a.getComputedStyle(i).getPropertyValue(r)};var Vl={};Vl.getRenderedStyle=function(r,t){return t?this.getStylePropertyValue(r,t,!0):this.getRawStyle(r,!0)},Vl.getRawStyle=function(r,t){var i=this;if(r=r[0],r){for(var a={},u=0;u<i.properties.length;u++){var c=i.properties[u],l=i.getStylePropertyValue(r,c.name,t);l!=null&&(a[c.name]=l,a[Ix(c.name)]=l)}return a}},Vl.getIndexedStyle=function(r,t,i,a){var u=r.pstyle(t)[i][a];return u??r.cy().style().getDefaultProperty(t)[i][0]},Vl.getStylePropertyValue=function(r,t,i){var a=this;if(r=r[0],r){var u=a.properties[t];u.alias&&(u=u.pointsTo);var c=u.type,l=r.pstyle(u.name);if(l){var h=l.value,v=l.units,p=l.strValue;if(i&&c.number&&h!=null&&Ft(h)){var g=r.cy().zoom(),w=function(C){return C*g},_=function(C,P){return w(C)+P},E=di(h),k=E?v.every(function(I){return I!=null}):v!=null;return k?E?h.map(function(I,C){return _(I,v[C])}).join(" "):_(h,v):E?h.map(function(I){return hn(I)?I:""+w(I)}).join(" "):""+w(h)}else if(p!=null)return p}return null}},Vl.getAnimationStartStyle=function(r,t){for(var i={},a=0;a<t.length;a++){var u=t[a],c=u.name,l=r.pstyle(c);l!==void 0&&(Sr(l)?l=this.parse(c,l.strValue):l=this.parse(c,l)),l&&(i[c]=l)}return i},Vl.getPropsList=function(r){var t=this,i=[],a=r,u=t.properties;if(a)for(var c=Object.keys(a),l=0;l<c.length;l++){var h=c[l],v=a[h],p=u[h]||u[iC(h)],g=this.parse(p.name,v);g&&i.push(g)}return i},Vl.getNonDefaultPropertiesHash=function(r,t,i){var a=i.slice(),u,c,l,h,v,p;for(v=0;v<t.length;v++)if(u=t[v],c=r.pstyle(u,!1),c!=null)if(c.pfValue!=null)a[0]=d1(h,a[0]),a[1]=v1(h,a[1]);else for(l=c.strValue,p=0;p<l.length;p++)h=l.charCodeAt(p),a[0]=d1(h,a[0]),a[1]=v1(h,a[1]);return a},Vl.getPropertiesHash=Vl.getNonDefaultPropertiesHash;var f2={};f2.appendFromJson=function(r){for(var t=this,i=0;i<r.length;i++){var a=r[i],u=a.selector,c=a.style||a.css,l=Object.keys(c);t.selector(u);for(var h=0;h<l.length;h++){var v=l[h],p=c[v];t.css(v,p)}}return t},f2.fromJson=function(r){var t=this;return t.resetToDefault(),t.appendFromJson(r),t},f2.json=function(){for(var r=[],t=this.defaultLength;t<this.length;t++){for(var i=this[t],a=i.selector,u=i.properties,c={},l=0;l<u.length;l++){var h=u[l];c[h.name]=h.strValue}r.push({selector:a?a.toString():"core",style:c})}return r};var JA={};JA.appendFromString=function(r){var t=this,i=this,a=""+r,u,c,l;a=a.replace(/[/][*](\s|.)+?[*][/]/g,"");function h(){a.length>u.length?a=a.substr(u.length):a=""}function v(){c.length>l.length?c=c.substr(l.length):c=""}for(;;){var p=a.match(/^\s*$/);if(p)break;var g=a.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!g){Hr("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+a);break}u=g[0];var w=g[1];if(w!=="core"){var _=new Ad(w);if(_.invalid){Hr("Skipping parsing of block: Invalid selector found in string stylesheet: "+w),h();continue}}var E=g[2],k=!1;c=E;for(var I=[];;){var C=c.match(/^\s*$/);if(C)break;var P=c.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!P){Hr("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+E),k=!0;break}l=P[0];var A=P[1],L=P[2],O=t.properties[A];if(!O){Hr("Skipping property: Invalid property name in: "+l),v();continue}var M=i.parse(A,L);if(!M){Hr("Skipping property: Invalid property definition in: "+l),v();continue}I.push({name:A,val:L}),v()}if(k){h();break}i.selector(w);for(var B=0;B<I.length;B++){var F=I[B];i.css(F.name,F.val)}h()}return i},JA.fromString=function(r){var t=this;return t.resetToDefault(),t.appendFromString(r),t};var Ba={};(function(){var r=ns,t=$pe,i=Hpe,a=zpe,u=Vpe,c=function(Ce){return"^"+Ce+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},l=function(Ce){var Be=r+"|\\w+|"+t+"|"+i+"|"+a+"|"+u;return"^"+Ce+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+r+")\\s*\\,\\s*("+r+")\\s*,\\s*("+Be+")\\s*\\,\\s*("+Be+")\\)$"},h=[`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`,"^(none)$","^(.+)$"];Ba.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:c("data")},layoutData:{mapping:!0,regex:c("layoutData")},scratch:{mapping:!0,regex:c("scratch")},mapData:{mapping:!0,regex:l("mapData")},mapLayoutData:{mapping:!0,regex:l("mapLayoutData")},mapScratch:{mapping:!0,regex:l("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:h,singleRegexMatchValue:!0},urls:{regexes:h,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(Ce,Be){switch(Ce.length){case 2:return Be[0]!=="deg"&&Be[0]!=="rad"&&Be[1]!=="deg"&&Be[1]!=="rad";case 1:return hn(Ce[0])||Be[0]==="deg"||Be[0]==="rad";default:return!1}}},easing:{regexes:["^(spring)\\s*\\(\\s*("+r+")\\s*,\\s*("+r+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+r+")\\s*,\\s*("+r+")\\s*,\\s*("+r+")\\s*,\\s*("+r+")\\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(Ce){var Be=Ce.length;return Be===1||Be===2||Be===4}}};var v={zeroNonZero:function(Ce,Be){return(Ce==null||Be==null)&&Ce!==Be||Ce==0&&Be!=0?!0:Ce!=0&&Be==0},any:function(Ce,Be){return Ce!=Be},emptyNonEmpty:function(Ce,Be){var ve=xd(Ce),ke=xd(Be);return ve&&!ke||!ve&&ke}},p=Ba.types,g=[{name:"label",type:p.text,triggersBounds:v.any,triggersZOrder:v.emptyNonEmpty},{name:"text-rotation",type:p.textRotation,triggersBounds:v.any},{name:"text-margin-x",type:p.bidirectionalSize,triggersBounds:v.any},{name:"text-margin-y",type:p.bidirectionalSize,triggersBounds:v.any}],w=[{name:"source-label",type:p.text,triggersBounds:v.any},{name:"source-text-rotation",type:p.textRotation,triggersBounds:v.any},{name:"source-text-margin-x",type:p.bidirectionalSize,triggersBounds:v.any},{name:"source-text-margin-y",type:p.bidirectionalSize,triggersBounds:v.any},{name:"source-text-offset",type:p.size,triggersBounds:v.any}],_=[{name:"target-label",type:p.text,triggersBounds:v.any},{name:"target-text-rotation",type:p.textRotation,triggersBounds:v.any},{name:"target-text-margin-x",type:p.bidirectionalSize,triggersBounds:v.any},{name:"target-text-margin-y",type:p.bidirectionalSize,triggersBounds:v.any},{name:"target-text-offset",type:p.size,triggersBounds:v.any}],E=[{name:"font-family",type:p.fontFamily,triggersBounds:v.any},{name:"font-style",type:p.fontStyle,triggersBounds:v.any},{name:"font-weight",type:p.fontWeight,triggersBounds:v.any},{name:"font-size",type:p.size,triggersBounds:v.any},{name:"text-transform",type:p.textTransform,triggersBounds:v.any},{name:"text-wrap",type:p.textWrap,triggersBounds:v.any},{name:"text-overflow-wrap",type:p.textOverflowWrap,triggersBounds:v.any},{name:"text-max-width",type:p.size,triggersBounds:v.any},{name:"text-outline-width",type:p.size,triggersBounds:v.any},{name:"line-height",type:p.positiveNumber,triggersBounds:v.any}],k=[{name:"text-valign",type:p.valign,triggersBounds:v.any},{name:"text-halign",type:p.halign,triggersBounds:v.any},{name:"color",type:p.color},{name:"text-outline-color",type:p.color},{name:"text-outline-opacity",type:p.zeroOneNumber},{name:"text-background-color",type:p.color},{name:"text-background-opacity",type:p.zeroOneNumber},{name:"text-background-padding",type:p.size,triggersBounds:v.any},{name:"text-border-opacity",type:p.zeroOneNumber},{name:"text-border-color",type:p.color},{name:"text-border-width",type:p.size,triggersBounds:v.any},{name:"text-border-style",type:p.borderStyle,triggersBounds:v.any},{name:"text-background-shape",type:p.textBackgroundShape,triggersBounds:v.any},{name:"text-justification",type:p.justification},{name:"box-select-labels",type:p.bool,triggersBounds:v.any}],I=[{name:"events",type:p.bool,triggersZOrder:v.any},{name:"text-events",type:p.bool,triggersZOrder:v.any},{name:"box-selection",type:p.boxSelection,triggersZOrder:v.any}],C=[{name:"display",type:p.display,triggersZOrder:v.any,triggersBounds:v.any,triggersBoundsOfConnectedEdges:v.any,triggersBoundsOfParallelEdges:function(Ce,Be,ve){return Ce===Be?!1:ve.pstyle("curve-style").value==="bezier"}},{name:"visibility",type:p.visibility,triggersZOrder:v.any},{name:"opacity",type:p.zeroOneNumber,triggersZOrder:v.zeroNonZero},{name:"text-opacity",type:p.zeroOneNumber},{name:"min-zoomed-font-size",type:p.size},{name:"z-compound-depth",type:p.zCompoundDepth,triggersZOrder:v.any},{name:"z-index-compare",type:p.zIndexCompare,triggersZOrder:v.any},{name:"z-index",type:p.number,triggersZOrder:v.any}],P=[{name:"overlay-padding",type:p.size,triggersBounds:v.any},{name:"overlay-color",type:p.color},{name:"overlay-opacity",type:p.zeroOneNumber,triggersBounds:v.zeroNonZero},{name:"overlay-shape",type:p.overlayShape,triggersBounds:v.any},{name:"overlay-corner-radius",type:p.cornerRadius}],A=[{name:"underlay-padding",type:p.size,triggersBounds:v.any},{name:"underlay-color",type:p.color},{name:"underlay-opacity",type:p.zeroOneNumber,triggersBounds:v.zeroNonZero},{name:"underlay-shape",type:p.overlayShape,triggersBounds:v.any},{name:"underlay-corner-radius",type:p.cornerRadius}],L=[{name:"transition-property",type:p.propList},{name:"transition-duration",type:p.time},{name:"transition-delay",type:p.time},{name:"transition-timing-function",type:p.easing}],O=function(Ce,Be){return Be.value==="label"?-Ce.poolIndex():Be.pfValue},M=[{name:"height",type:p.nodeSize,triggersBounds:v.any,hashOverride:O},{name:"width",type:p.nodeSize,triggersBounds:v.any,hashOverride:O},{name:"shape",type:p.nodeShape,triggersBounds:v.any},{name:"shape-polygon-points",type:p.polygonPointList,triggersBounds:v.any},{name:"corner-radius",type:p.cornerRadius},{name:"background-color",type:p.color},{name:"background-fill",type:p.fill},{name:"background-opacity",type:p.zeroOneNumber},{name:"background-blacken",type:p.nOneOneNumber},{name:"background-gradient-stop-colors",type:p.colors},{name:"background-gradient-stop-positions",type:p.percentages},{name:"background-gradient-direction",type:p.gradientDirection},{name:"padding",type:p.sizeMaybePercent,triggersBounds:v.any},{name:"padding-relative-to",type:p.paddingRelativeTo,triggersBounds:v.any},{name:"bounds-expansion",type:p.boundsExpansion,triggersBounds:v.any}],B=[{name:"border-color",type:p.color},{name:"border-opacity",type:p.zeroOneNumber},{name:"border-width",type:p.size,triggersBounds:v.any},{name:"border-style",type:p.borderStyle},{name:"border-cap",type:p.lineCap},{name:"border-join",type:p.lineJoin},{name:"border-dash-pattern",type:p.numbers},{name:"border-dash-offset",type:p.number},{name:"border-position",type:p.linePosition}],F=[{name:"outline-color",type:p.color},{name:"outline-opacity",type:p.zeroOneNumber},{name:"outline-width",type:p.size,triggersBounds:v.any},{name:"outline-style",type:p.borderStyle},{name:"outline-offset",type:p.size,triggersBounds:v.any}],q=[{name:"background-image",type:p.urls},{name:"background-image-crossorigin",type:p.bgCrossOrigin},{name:"background-image-opacity",type:p.zeroOneNumbers},{name:"background-image-containment",type:p.bgContainment},{name:"background-image-smoothing",type:p.bools},{name:"background-position-x",type:p.bgPos},{name:"background-position-y",type:p.bgPos},{name:"background-width-relative-to",type:p.bgRelativeTo},{name:"background-height-relative-to",type:p.bgRelativeTo},{name:"background-repeat",type:p.bgRepeat},{name:"background-fit",type:p.bgFit},{name:"background-clip",type:p.bgClip},{name:"background-width",type:p.bgWH},{name:"background-height",type:p.bgWH},{name:"background-offset-x",type:p.bgPos},{name:"background-offset-y",type:p.bgPos}],$=[{name:"position",type:p.position,triggersBounds:v.any},{name:"compound-sizing-wrt-labels",type:p.compoundIncludeLabels,triggersBounds:v.any},{name:"min-width",type:p.size,triggersBounds:v.any},{name:"min-width-bias-left",type:p.sizeMaybePercent,triggersBounds:v.any},{name:"min-width-bias-right",type:p.sizeMaybePercent,triggersBounds:v.any},{name:"min-height",type:p.size,triggersBounds:v.any},{name:"min-height-bias-top",type:p.sizeMaybePercent,triggersBounds:v.any},{name:"min-height-bias-bottom",type:p.sizeMaybePercent,triggersBounds:v.any}],Y=[{name:"line-style",type:p.lineStyle},{name:"line-color",type:p.color},{name:"line-fill",type:p.fill},{name:"line-cap",type:p.lineCap},{name:"line-opacity",type:p.zeroOneNumber},{name:"line-dash-pattern",type:p.numbers},{name:"line-dash-offset",type:p.number},{name:"line-outline-width",type:p.size},{name:"line-outline-color",type:p.color},{name:"line-gradient-stop-colors",type:p.colors},{name:"line-gradient-stop-positions",type:p.percentages},{name:"curve-style",type:p.curveStyle,triggersBounds:v.any,triggersBoundsOfParallelEdges:function(Ce,Be){return Ce===Be?!1:Ce==="bezier"||Be==="bezier"}},{name:"haystack-radius",type:p.zeroOneNumber,triggersBounds:v.any},{name:"source-endpoint",type:p.edgeEndpoint,triggersBounds:v.any},{name:"target-endpoint",type:p.edgeEndpoint,triggersBounds:v.any},{name:"control-point-step-size",type:p.size,triggersBounds:v.any},{name:"control-point-distances",type:p.bidirectionalSizes,triggersBounds:v.any},{name:"control-point-weights",type:p.numbers,triggersBounds:v.any},{name:"segment-distances",type:p.bidirectionalSizes,triggersBounds:v.any},{name:"segment-weights",type:p.numbers,triggersBounds:v.any},{name:"segment-radii",type:p.numbers,triggersBounds:v.any},{name:"radius-type",type:p.radiusType,triggersBounds:v.any},{name:"taxi-turn",type:p.bidirectionalSizeMaybePercent,triggersBounds:v.any},{name:"taxi-turn-min-distance",type:p.size,triggersBounds:v.any},{name:"taxi-direction",type:p.axisDirection,triggersBounds:v.any},{name:"taxi-radius",type:p.number,triggersBounds:v.any},{name:"edge-distances",type:p.edgeDistances,triggersBounds:v.any},{name:"arrow-scale",type:p.positiveNumber,triggersBounds:v.any},{name:"loop-direction",type:p.angle,triggersBounds:v.any},{name:"loop-sweep",type:p.angle,triggersBounds:v.any},{name:"source-distance-from-node",type:p.size,triggersBounds:v.any},{name:"target-distance-from-node",type:p.size,triggersBounds:v.any}],V=[{name:"ghost",type:p.bool,triggersBounds:v.any},{name:"ghost-offset-x",type:p.bidirectionalSize,triggersBounds:v.any},{name:"ghost-offset-y",type:p.bidirectionalSize,triggersBounds:v.any},{name:"ghost-opacity",type:p.zeroOneNumber}],U=[{name:"selection-box-color",type:p.color},{name:"selection-box-opacity",type:p.zeroOneNumber},{name:"selection-box-border-color",type:p.color},{name:"selection-box-border-width",type:p.size},{name:"active-bg-color",type:p.color},{name:"active-bg-opacity",type:p.zeroOneNumber},{name:"active-bg-size",type:p.size},{name:"outside-texture-bg-color",type:p.color},{name:"outside-texture-bg-opacity",type:p.zeroOneNumber}],G=[];Ba.pieBackgroundN=16,G.push({name:"pie-size",type:p.sizeMaybePercent}),G.push({name:"pie-hole",type:p.sizeMaybePercent}),G.push({name:"pie-start-angle",type:p.angle});for(var X=1;X<=Ba.pieBackgroundN;X++)G.push({name:"pie-"+X+"-background-color",type:p.color}),G.push({name:"pie-"+X+"-background-size",type:p.percent}),G.push({name:"pie-"+X+"-background-opacity",type:p.zeroOneNumber});var ne=[];Ba.stripeBackgroundN=16,ne.push({name:"stripe-size",type:p.sizeMaybePercent}),ne.push({name:"stripe-direction",type:p.axisDirectionPrimary});for(var ae=1;ae<=Ba.stripeBackgroundN;ae++)ne.push({name:"stripe-"+ae+"-background-color",type:p.color}),ne.push({name:"stripe-"+ae+"-background-size",type:p.percent}),ne.push({name:"stripe-"+ae+"-background-opacity",type:p.zeroOneNumber});var oe=[],le=Ba.arrowPrefixes=["source","mid-source","target","mid-target"];[{name:"arrow-shape",type:p.arrowShape,triggersBounds:v.any},{name:"arrow-color",type:p.color},{name:"arrow-fill",type:p.arrowFill},{name:"arrow-width",type:p.arrowWidth}].forEach(function(De){le.forEach(function(Ce){var Be=Ce+"-"+De.name,ve=De.type,ke=De.triggersBounds;oe.push({name:Be,type:ve,triggersBounds:ke})})},{});var pe=Ba.properties=[].concat(I,L,C,P,A,V,k,E,g,w,_,M,B,F,q,G,ne,$,Y,oe,U),ge=Ba.propertyGroups={behavior:I,transition:L,visibility:C,overlay:P,underlay:A,ghost:V,commonLabel:k,labelDimensions:E,mainLabel:g,sourceLabel:w,targetLabel:_,nodeBody:M,nodeBorder:B,nodeOutline:F,backgroundImage:q,pie:G,stripe:ne,compound:$,edgeLine:Y,edgeArrow:oe,core:U},de=Ba.propertyGroupNames={},Se=Ba.propertyGroupKeys=Object.keys(ge);Se.forEach(function(De){de[De]=ge[De].map(function(Ce){return Ce.name}),ge[De].forEach(function(Ce){return Ce.groupKey=De})});var Ne=Ba.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"}];Ba.propertyNames=pe.map(function(De){return De.name});for(var ye=0;ye<pe.length;ye++){var we=pe[ye];pe[we.name]=we}for(var Pe=0;Pe<Ne.length;Pe++){var Fe=Ne[Pe],Ue=pe[Fe.pointsTo],He={name:Fe.name,alias:!0,pointsTo:Ue};pe.push(He),pe[Fe.name]=He}})(),Ba.getDefaultProperty=function(r){return this.getDefaultProperties()[r]},Ba.getDefaultProperties=function(){var r=this._private;if(r.defaultProperties!=null)return r.defaultProperties;for(var t=yn({"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(v,p){for(var g=1;g<=Ba.pieBackgroundN;g++){var w=p.name.replace("{{i}}",g),_=p.value;v[w]=_}return v},{}),{"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(v,p){for(var g=1;g<=Ba.stripeBackgroundN;g++){var w=p.name.replace("{{i}}",g),_=p.value;v[w]=_}return v},{}),{"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(v,p){return Ba.arrowPrefixes.forEach(function(g){var w=g+"-"+p.name,_=p.value;v[w]=_}),v},{})),i={},a=0;a<this.properties.length;a++){var u=this.properties[a];if(!u.pointsTo){var c=u.name,l=t[c],h=this.parse(c,l);i[c]=h}}return r.defaultProperties=i,r.defaultProperties},Ba.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 h2={};h2.parse=function(r,t,i,a){var u=this;if(Ji(t))return u.parseImplWarn(r,t,i,a);var c=a==="mapping"||a===!0||a===!1||a==null?"dontcare":a,l=i?"t":"f",h=""+t,v=t8(r,h,l,c),p=u.propCache=u.propCache||[],g;return(g=p[v])||(g=p[v]=u.parseImplWarn(r,t,i,a)),(i||a==="mapping")&&(g=zl(g),g&&(g.value=zl(g.value))),g},h2.parseImplWarn=function(r,t,i,a){var u=this.parseImpl(r,t,i,a);return!u&&t!=null&&Hr("The style property `".concat(r,": ").concat(t,"` is invalid")),u&&(u.name==="width"||u.name==="height")&&t==="label"&&Hr("The style value of `label` is deprecated for `"+u.name+"`"),u},h2.parseImpl=function(r,t,i,a){var u=this;r=iC(r);var c=u.properties[r],l=t,h=u.types;if(!c||t===void 0)return null;c.alias&&(c=c.pointsTo,r=c.name);var v=hn(t);v&&(t=t.trim());var p=c.type;if(!p)return null;if(i&&(t===""||t===null))return{name:r,value:t,bypass:!0,deleteBypass:!0};if(Ji(t))return{name:r,value:t,strValue:"fn",mapped:h.fn,bypass:i};var g,w;if(!(!v||a||t.length<7||t[1]!=="a")){if(t.length>=7&&t[0]==="d"&&(g=new RegExp(h.data.regex).exec(t))){if(i)return!1;var _=h.data;return{name:r,value:g,strValue:""+t,mapped:_,field:g[1],bypass:i}}else if(t.length>=10&&t[0]==="m"&&(w=new RegExp(h.mapData.regex).exec(t))){if(i||p.multiple)return!1;var E=h.mapData;if(!(p.color||p.number))return!1;var k=this.parse(r,w[4]);if(!k||k.mapped)return!1;var I=this.parse(r,w[5]);if(!I||I.mapped)return!1;if(k.pfValue===I.pfValue||k.strValue===I.strValue)return Hr("`"+r+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+r+": "+k.strValue+"`"),this.parse(r,k.strValue);if(p.color){var C=k.value,P=I.value,A=C[0]===P[0]&&C[1]===P[1]&&C[2]===P[2]&&(C[3]===P[3]||(C[3]==null||C[3]===1)&&(P[3]==null||P[3]===1));if(A)return!1}return{name:r,value:w,strValue:""+t,mapped:E,field:w[1],fieldMin:parseFloat(w[2]),fieldMax:parseFloat(w[3]),valueMin:k.value,valueMax:I.value,bypass:i}}}if(p.multiple&&a!=="multiple"){var L;if(v?L=t.split(/\s+/):di(t)?L=t:L=[t],p.evenMultiple&&L.length%2!==0)return null;for(var O=[],M=[],B=[],F="",q=!1,$=0;$<L.length;$++){var Y=u.parse(r,L[$],i,"multiple");q=q||hn(Y.value),O.push(Y.value),B.push(Y.pfValue!=null?Y.pfValue:Y.value),M.push(Y.units),F+=($>0?" ":"")+Y.strValue}return p.validate&&!p.validate(O,M)?null:p.singleEnum&&q?O.length===1&&hn(O[0])?{name:r,value:O[0],strValue:O[0],bypass:i}:null:{name:r,value:O,pfValue:B,strValue:F,bypass:i,units:M}}var V=function(){for(var He=0;He<p.enums.length;He++){var De=p.enums[He];if(De===t)return{name:r,value:t,strValue:""+t,bypass:i}}return null};if(p.number){var U,G="px";if(p.units&&(U=p.units),p.implicitUnits&&(G=p.implicitUnits),!p.unitless)if(v){var X="px|em"+(p.allowPercent?"|\\%":"");U&&(X=U);var ne=t.match("^("+ns+")("+X+")?$");ne&&(t=ne[1],U=ne[2]||G)}else(!U||p.implicitUnits)&&(U=G);if(t=parseFloat(t),isNaN(t)&&p.enums===void 0)return null;if(isNaN(t)&&p.enums!==void 0)return t=l,V();if(p.integer&&!Ope(t)||p.min!==void 0&&(t<p.min||p.strictMin&&t===p.min)||p.max!==void 0&&(t>p.max||p.strictMax&&t===p.max))return null;var ae={name:r,value:t,strValue:""+t+(U||""),units:U,bypass:i};return p.unitless||U!=="px"&&U!=="em"?ae.pfValue=t:ae.pfValue=U==="px"||!U?t:this.getEmSizeInPixels()*t,(U==="ms"||U==="s")&&(ae.pfValue=U==="ms"?t:1e3*t),(U==="deg"||U==="rad")&&(ae.pfValue=U==="rad"?t:zge(t)),U==="%"&&(ae.pfValue=t/100),ae}else if(p.propList){var oe=[],le=""+t;if(le!=="none"){for(var pe=le.split(/\s*,\s*|\s+/),ge=0;ge<pe.length;ge++){var de=pe[ge].trim();u.properties[de]?oe.push(de):Hr("`"+de+"` is not a valid property name")}if(oe.length===0)return null}return{name:r,value:oe,strValue:oe.length===0?"none":oe.join(" "),bypass:i}}else if(p.color){var Se=N$(t);return Se?{name:r,value:Se,pfValue:Se,strValue:"rgb("+Se[0]+","+Se[1]+","+Se[2]+")",bypass:i}:null}else if(p.regex||p.regexes){if(p.enums){var Ne=V();if(Ne)return Ne}for(var ye=p.regexes?p.regexes:[p.regex],we=0;we<ye.length;we++){var Pe=new RegExp(ye[we]),Fe=Pe.exec(t);if(Fe)return{name:r,value:p.singleRegexMatchValue?Fe[1]:Fe,strValue:""+t,bypass:i}}return null}else return p.string?{name:r,value:""+t,strValue:""+t,bypass:i}:p.enums?V():null};var _s=function(t){if(!(this instanceof _s))return new _s(t);if(!rC(t)){qi("A style must have a core reference");return}this._private={cy:t,coreStyle:{}},this.length=0,this.resetToDefault()},to=_s.prototype;to.instanceString=function(){return"style"},to.clear=function(){for(var r=this._private,t=r.cy,i=t.elements(),a=0;a<this.length;a++)this[a]=void 0;return this.length=0,r.contextStyles={},r.propDiffs={},this.cleanElements(i,!0),i.forEach(function(u){var c=u[0]._private;c.styleDirty=!0,c.appliedInitStyle=!1}),this},to.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},to.core=function(r){return this._private.coreStyle[r]||this.getDefaultProperty(r)},to.selector=function(r){var t=r==="core"?null:new Ad(r),i=this.length++;return this[i]={selector:t,properties:[],mappedProperties:[],index:i},this},to.css=function(){var r=this,t=arguments;if(t.length===1)for(var i=t[0],a=0;a<r.properties.length;a++){var u=r.properties[a],c=i[u.name];c===void 0&&(c=i[Ix(u.name)]),c!==void 0&&this.cssRule(u.name,c)}else t.length===2&&this.cssRule(t[0],t[1]);return this},to.style=to.css,to.cssRule=function(r,t){var i=this.parse(r,t);if(i){var a=this.length-1;this[a].properties.push(i),this[a].properties[i.name]=i,i.name.match(/pie-(\d+)-background-size/)&&i.value&&(this._private.hasPie=!0),i.name.match(/stripe-(\d+)-background-size/)&&i.value&&(this._private.hasStripe=!0),i.mapped&&this[a].mappedProperties.push(i);var u=!this[a].selector;u&&(this._private.coreStyle[i.name]=i)}return this},to.append=function(r){return C$(r)?r.appendToStyle(this):di(r)?this.appendFromJson(r):hn(r)&&this.appendFromString(r),this},_s.fromJson=function(r,t){var i=new _s(r);return i.fromJson(t),i},_s.fromString=function(r,t){return new _s(r).fromString(t)},[ws,C1,XA,Vl,f2,JA,Ba,h2].forEach(function(r){yn(to,r)}),_s.types=to.types,_s.properties=to.properties,_s.propertyGroups=to.propertyGroups,_s.propertyGroupNames=to.propertyGroupNames,_s.propertyGroupKeys=to.propertyGroupKeys;var W0e={style:function(t){if(t){var i=this.setStyle(t);i.update()}return this._private.style},setStyle:function(t){var i=this._private;return C$(t)?i.style=t.generateStyle(this):di(t)?i.style=_s.fromJson(this,t):hn(t)?i.style=_s.fromString(this,t):i.style=_s(this),i.style},updateStyle:function(){this.mutableElements().updateStyle()}},K0e="single",lp={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 i=this._private;if(i.selectionType==null&&(i.selectionType=K0e),t!==void 0)(t==="additive"||t==="single")&&(i.selectionType=t);else return i.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,i=this._private.pan,a,u,c,l,h;switch(t.length){case 0:return i;case 1:if(hn(t[0]))return a=t[0],i[a];if(Sr(t[0])){if(!this._private.panningEnabled)return this;c=t[0],l=c.x,h=c.y,Ft(l)&&(i.x=l),Ft(h)&&(i.y=h),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;a=t[0],u=t[1],(a==="x"||a==="y")&&Ft(u)&&(i[a]=u),this.emit("pan viewport");break}return this.notify("viewport"),this},panBy:function(t,i){var a=arguments,u=this._private.pan,c,l,h,v,p;if(!this._private.panningEnabled)return this;switch(a.length){case 1:Sr(t)&&(h=a[0],v=h.x,p=h.y,Ft(v)&&(u.x+=v),Ft(p)&&(u.y+=p),this.emit("pan viewport"));break;case 2:c=t,l=i,(c==="x"||c==="y")&&Ft(l)&&(u[c]+=l),this.emit("pan viewport");break}return this.notify("viewport"),this},gc:function(){this.notify("gc")},fit:function(t,i){var a=this.getFitViewport(t,i);if(a){var u=this._private;u.zoom=a.zoom,u.pan=a.pan,this.emit("pan zoom viewport"),this.notify("viewport")}return this},getFitViewport:function(t,i){if(Ft(t)&&i===void 0&&(i=t,t=void 0),!(!this._private.panningEnabled||!this._private.zoomingEnabled)){var a;if(hn(t)){var u=t;t=this.$(u)}else if(jpe(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 Pu(t)||(t=this.mutableElements());if(!(Pu(t)&&t.empty())){a=a||t.boundingBox();var l=this.width(),h=this.height(),v;if(i=Ft(i)?i:0,!isNaN(l)&&!isNaN(h)&&l>0&&h>0&&!isNaN(a.w)&&!isNaN(a.h)&&a.w>0&&a.h>0){v=Math.min((l-2*i)/a.w,(h-2*i)/a.h),v=v>this._private.maxZoom?this._private.maxZoom:v,v=v<this._private.minZoom?this._private.minZoom:v;var p={x:(l-v*(a.x1+a.x2))/2,y:(h-v*(a.y1+a.y2))/2};return{zoom:v,pan:p}}}}},zoomRange:function(t,i){var a=this._private;if(i==null){var u=t;t=u.min,i=u.max}return Ft(t)&&Ft(i)&&t<=i?(a.minZoom=t,a.maxZoom=i):Ft(t)&&i===void 0&&t<=a.maxZoom?a.minZoom=t:Ft(i)&&t===void 0&&i>=a.minZoom&&(a.maxZoom=i),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 i=this._private,a=i.pan,u=i.zoom,c,l,h=!1;if(i.zoomingEnabled||(h=!0),Ft(t)?l=t:Sr(t)&&(l=t.level,t.position!=null?c=Mx(t.position,u,a):t.renderedPosition!=null&&(c=t.renderedPosition),c!=null&&!i.panningEnabled&&(h=!0)),l=l>i.maxZoom?i.maxZoom:l,l=l<i.minZoom?i.minZoom:l,h||!Ft(l)||l===u||c!=null&&(!Ft(c.x)||!Ft(c.y)))return null;if(c!=null){var v=a,p=u,g=l,w={x:-g/p*(c.x-v.x)+c.x,y:-g/p*(c.y-v.y)+c.y};return{zoomed:!0,panned:!0,zoom:g,pan:w}}else return{zoomed:!0,panned:!1,zoom:l,pan:a}},zoom:function(t){if(t===void 0)return this._private.zoom;var i=this.getZoomedViewport(t),a=this._private;return i==null||!i.zoomed?this:(a.zoom=i.zoom,i.panned&&(a.pan.x=i.pan.x,a.pan.y=i.pan.y),this.emit("zoom"+(i.panned?" pan":"")+" viewport"),this.notify("viewport"),this)},viewport:function(t){var i=this._private,a=!0,u=!0,c=[],l=!1,h=!1;if(!t)return this;if(Ft(t.zoom)||(a=!1),Sr(t.pan)||(u=!1),!a&&!u)return this;if(a){var v=t.zoom;v<i.minZoom||v>i.maxZoom||!i.zoomingEnabled?l=!0:(i.zoom=v,c.push("zoom"))}if(u&&(!l||!t.cancelOnFailedZoom)&&i.panningEnabled){var p=t.pan;Ft(p.x)&&(i.pan.x=p.x,h=!1),Ft(p.y)&&(i.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 i=this.getCenterPan(t);return i&&(this._private.pan=i,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(t,i){if(this._private.panningEnabled){if(hn(t)){var a=t;t=this.mutableElements().filter(a)}else Pu(t)||(t=this.mutableElements());if(t.length!==0){var u=t.boundingBox(),c=this.width(),l=this.height();i=i===void 0?this._private.zoom:i;var h={x:(c-i*(u.x1+u.x2))/2,y:(l-i*(u.y1+u.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,i=t.container,a=this;return t.sizeCache=t.sizeCache||(i?function(){var u=a.window().getComputedStyle(i),c=function(h){return parseFloat(u.getPropertyValue(h))};return{width:i.clientWidth-c("padding-left")-c("padding-right"),height:i.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,i=this._private.zoom,a=this.renderedExtent(),u={x1:(a.x1-t.x)/i,x2:(a.x2-t.x)/i,y1:(a.y1-t.y)/i,y2:(a.y2-t.y)/i};return u.w=u.x2-u.x1,u.h=u.y2-u.y1,u},renderedExtent:function(){var t=this.width(),i=this.height();return{x1:0,y1:0,x2:t,y2:i,w:t,h:i}},multiClickDebounceTime:function(t){if(t)this._private.multiClickDebounceTime=t;else return this._private.multiClickDebounceTime;return this}};lp.centre=lp.center,lp.autolockNodes=lp.autolock,lp.autoungrabifyNodes=lp.autoungrabify;var A1={data:zr.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:zr.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:zr.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:zr.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};A1.attr=A1.data,A1.removeAttr=A1.removeData;var P1=function(t){var i=this;t=yn({},t);var a=t.container;a&&!Rx(a)&&Rx(a[0])&&(a=a[0]);var u=a?a._cyreg:null;u=u||{},u&&u.cy&&(u.cy.destroy(),u={});var c=u.readies=u.readies||[];a&&(a._cyreg=u),u.cy=i;var l=ts!==void 0&&a!==void 0&&!t.headless,h=t;h.layout=yn({name:l?"grid":"null"},h.layout),h.renderer=yn({name:l?"canvas":"null"},h.renderer);var v=function(k,I,C){return I!==void 0?I:C!==void 0?C:k},p=this._private={container:a,ready:!1,options:h,elements:new $s(this),listeners:[],aniEles:new $s(this),data:h.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:v(!0,h.zoomingEnabled),userZoomingEnabled:v(!0,h.userZoomingEnabled),panningEnabled:v(!0,h.panningEnabled),userPanningEnabled:v(!0,h.userPanningEnabled),boxSelectionEnabled:v(!0,h.boxSelectionEnabled),autolock:v(!1,h.autolock,h.autolockNodes),autoungrabify:v(!1,h.autoungrabify,h.autoungrabifyNodes),autounselectify:v(!1,h.autounselectify),styleEnabled:h.styleEnabled===void 0?l:h.styleEnabled,zoom:Ft(h.zoom)?h.zoom:1,pan:{x:Sr(h.pan)&&Ft(h.pan.x)?h.pan.x:0,y:Sr(h.pan)&&Ft(h.pan.y)?h.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:v(250,h.multiClickDebounceTime)};this.createEmitter(),this.selectionType(h.selectionType),this.zoomRange({min:h.minZoom,max:h.maxZoom});var g=function(k,I){var C=k.some(Bpe);if(C)return gb.all(k).then(I);I(k)};p.styleEnabled&&i.setStyle([]);var w=yn({},h,h.renderer);i.initRenderer(w);var _=function(k,I,C){i.notifications(!1);var P=i.mutableElements();P.length>0&&P.remove(),k!=null&&(Sr(k)||di(k))&&i.add(k),i.one("layoutready",function(L){i.notifications(!0),i.emit(L),i.one("load",I),i.emitAndNotify("load")}).one("layoutstop",function(){i.one("done",C),i.emit("done")});var A=yn({},i._private.options.layout);A.eles=i.elements(),i.layout(A).run()};g([h.style,h.elements],function(E){var k=E[0],I=E[1];p.styleEnabled&&i.style().append(k),_(I,function(){i.startAnimationLoop(),p.ready=!0,Ji(h.ready)&&i.on("ready",h.ready);for(var C=0;C<c.length;C++){var P=c[C];i.on("ready",P)}u&&(u.readies=[]),i.emit("ready")},h.done)})},d2=P1.prototype;yn(d2,{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 ts;var i=this._private.container.ownerDocument;return i===void 0||i==null?ts:i.defaultView||ts},mount:function(t){if(t!=null){var i=this,a=i._private,u=a.options;return!Rx(t)&&Rx(t[0])&&(t=t[0]),i.stopAnimationLoop(),i.destroyRenderer(),a.container=t,a.styleEnabled=!0,i.invalidateSize(),i.initRenderer(yn({},u,u.renderer,{name:u.renderer.name==="null"?"canvas":u.renderer.name})),i.startAnimationLoop(),i.style(u.style),i.emit("mount"),i}},unmount:function(){var t=this;return t.stopAnimationLoop(),t.destroyRenderer(),t.initRenderer({name:"null"}),t.emit("unmount"),t},options:function(){return zl(this._private.options)},json:function(t){var i=this,a=i._private,u=i.mutableElements(),c=function(O){return i.getElementById(O.id())};if(Sr(t)){if(i.startBatch(),t.elements){var l={},h=function(O,M){for(var B=[],F=[],q=0;q<O.length;q++){var $=O[q];if(!$.data.id){Hr("cy.json() cannot handle elements without an ID attribute");continue}var Y=""+$.data.id,V=i.getElementById(Y);l[Y]=!0,V.length!==0?F.push({ele:V,json:$}):(M&&($.group=M),B.push($))}i.add(B);for(var U=0;U<F.length;U++){var G=F[U],X=G.ele,ne=G.json;X.json(ne)}};if(di(t.elements))h(t.elements);else for(var v=["nodes","edges"],p=0;p<v.length;p++){var g=v[p],w=t.elements[g];di(w)&&h(w,g)}var _=i.collection();u.filter(function(L){return!l[L.id()]}).forEach(function(L){L.isParent()?_.merge(L):L.remove()}),_.forEach(function(L){return L.children().move({parent:null})}),_.forEach(function(L){return c(L).remove()})}t.style&&i.style(t.style),t.zoom!=null&&t.zoom!==a.zoom&&i.zoom(t.zoom),t.pan&&(t.pan.x!==a.pan.x||t.pan.y!==a.pan.y)&&i.pan(t.pan),t.data&&i.data(t.data);for(var E=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],k=0;k<E.length;k++){var I=E[k];t[I]!=null&&i[I](t[I])}return i.endBatch(),this}else{var C=!!t,P={};C?P.elements=this.elements().map(function(L){return L.json()}):(P.elements={},u.forEach(function(L){var O=L.group();P.elements[O]||(P.elements[O]=[]),P.elements[O].push(L.json())})),this._private.styleEnabled&&(P.style=i.style().json()),P.data=zl(i.data());var A=a.options;return P.zoomingEnabled=a.zoomingEnabled,P.userZoomingEnabled=a.userZoomingEnabled,P.zoom=a.zoom,P.minZoom=a.minZoom,P.maxZoom=a.maxZoom,P.panningEnabled=a.panningEnabled,P.userPanningEnabled=a.userPanningEnabled,P.pan=zl(a.pan),P.boxSelectionEnabled=a.boxSelectionEnabled,P.renderer=zl(A.renderer),P.hideEdgesOnViewport=A.hideEdgesOnViewport,P.textureOnViewport=A.textureOnViewport,P.wheelSensitivity=A.wheelSensitivity,P.motionBlur=A.motionBlur,P.multiClickDebounceTime=A.multiClickDebounceTime,P}}}),d2.$id=d2.getElementById,[B0e,H0e,IG,WA,c2,V0e,KA,l2,W0e,lp,A1].forEach(function(r){yn(d2,r)});var X0e={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,i){return!0},ready:void 0,stop:void 0,transform:function(t,i){return i}},J0e={maximal:!1,acyclic:!1},kb=function(t){return t.scratch("breadthfirst")},CG=function(t,i){return t.scratch("breadthfirst",i)};function AG(r){this.options=yn({},X0e,J0e,r)}AG.prototype.run=function(){var r=this.options,t=r.cy,i=r.eles,a=i.nodes().filter(function(dt){return dt.isChildless()}),u=i,c=r.directed,l=r.acyclic||r.maximal||r.maximalAdjustments>0,h=!!r.boundingBox,v=wo(h?r.boundingBox:structuredClone(t.extent())),p;if(Pu(r.roots))p=r.roots;else if(di(r.roots)){for(var g=[],w=0;w<r.roots.length;w++){var _=r.roots[w],E=t.getElementById(_);g.push(E)}p=t.collection(g)}else if(hn(r.roots))p=t.$(r.roots);else if(c)p=a.roots();else{var k=i.components();p=t.collection();for(var I=function(){var pt=k[C],Lt=pt.maxDegree(!1),ut=pt.filter(function($t){return $t.degree(!1)===Lt});p=p.add(ut)},C=0;C<k.length;C++)I()}var P=[],A={},L=function(pt,Lt){P[Lt]==null&&(P[Lt]=[]);var ut=P[Lt].length;P[Lt].push(pt),CG(pt,{index:ut,depth:Lt})},O=function(pt,Lt){var ut=kb(pt),$t=ut.depth,Yt=ut.index;P[$t][Yt]=null,pt.isChildless()&&L(pt,Lt)};u.bfs({roots:p,directed:r.directed,visit:function(pt,Lt,ut,$t,Yt){var fn=pt[0],Yn=fn.id();fn.isChildless()&&L(fn,Yt),A[Yn]=!0}});for(var M=[],B=0;B<a.length;B++){var F=a[B];A[F.id()]||M.push(F)}var q=function(pt){for(var Lt=P[pt],ut=0;ut<Lt.length;ut++){var $t=Lt[ut];if($t==null){Lt.splice(ut,1),ut--;continue}CG($t,{depth:pt,index:ut})}},$=function(pt,Lt){for(var ut=kb(pt),$t=pt.incomers().filter(function(be){return be.isNode()&&i.has(be)}),Yt=-1,fn=pt.id(),Yn=0;Yn<$t.length;Yn++){var he=$t[Yn],J=kb(he);Yt=Math.max(Yt,J.depth)}if(ut.depth<=Yt){if(!r.acyclic&&Lt[fn])return null;var te=Yt+1;return O(pt,te),Lt[fn]=te,!0}return!1};if(c&&l){var Y=[],V={},U=function(pt){return Y.push(pt)},G=function(){return Y.shift()};for(a.forEach(function(dt){return Y.push(dt)});Y.length>0;){var X=G(),ne=$(X,V);if(ne)X.outgoers().filter(function(dt){return dt.isNode()&&i.has(dt)}).forEach(U);else if(ne===null){Hr("Detected double maximal shift for node `"+X.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var ae=0;if(r.avoidOverlap)for(var oe=0;oe<a.length;oe++){var le=a[oe],pe=le.layoutDimensions(r),ge=pe.w,de=pe.h;ae=Math.max(ae,ge,de)}var Se={},Ne=function(pt){if(Se[pt.id()])return Se[pt.id()];for(var Lt=kb(pt).depth,ut=pt.neighborhood(),$t=0,Yt=0,fn=0;fn<ut.length;fn++){var Yn=ut[fn];if(!(Yn.isEdge()||Yn.isParent()||!a.has(Yn))){var he=kb(Yn);if(he!=null){var J=he.index,te=he.depth;if(!(J==null||te==null)){var be=P[te].length;te<Lt&&($t+=J/be,Yt++)}}}}return Yt=Math.max(1,Yt),$t=$t/Yt,Yt===0&&($t=0),Se[pt.id()]=$t,$t},ye=function(pt,Lt){var ut=Ne(pt),$t=Ne(Lt),Yt=ut-$t;return Yt===0?L$(pt.id(),Lt.id()):Yt};r.depthSort!==void 0&&(ye=r.depthSort);for(var we=P.length,Pe=0;Pe<we;Pe++)P[Pe].sort(ye),q(Pe);for(var Fe=[],Ue=0;Ue<M.length;Ue++)Fe.push(M[Ue]);var He=function(){for(var pt=0;pt<we;pt++)q(pt)};Fe.length&&(P.unshift(Fe),we=P.length,He());for(var De=0,Ce=0;Ce<we;Ce++)De=Math.max(P[Ce].length,De);var Be={x:v.x1+v.w/2,y:v.y1+v.h/2},ve=a.reduce(function(dt,pt){return function(Lt){return{w:dt.w===-1?Lt.w:(dt.w+Lt.w)/2,h:dt.h===-1?Lt.h:(dt.h+Lt.h)/2}}(pt.boundingBox({includeLabels:r.nodeDimensionsIncludeLabels}))},{w:-1,h:-1}),ke=Math.max(we===1?0:h?(v.h-r.padding*2-ve.h)/(we-1):(v.h-r.padding*2-ve.h)/(we+1),ae),je=P.reduce(function(dt,pt){return Math.max(dt,pt.length)},0),qe=function(pt){var Lt=kb(pt),ut=Lt.depth,$t=Lt.index;if(r.circle){var Yt=Math.min(v.w/2/we,v.h/2/we);Yt=Math.max(Yt,ae);var fn=Yt*ut+Yt-(we>0&&P[0].length<=3?Yt/2:0),Yn=2*Math.PI/P[ut].length*$t;return ut===0&&P[0].length===1&&(fn=1),{x:Be.x+fn*Math.cos(Yn),y:Be.y+fn*Math.sin(Yn)}}else{var he=P[ut].length,J=Math.max(he===1?0:h?(v.w-r.padding*2-ve.w)/((r.grid?je:he)-1):(v.w-r.padding*2-ve.w)/((r.grid?je:he)+1),ae),te={x:Be.x+($t+1-(he+1)/2)*J,y:Be.y+(ut+1-(we+1)/2)*ke};return te}},Me={downward:0,leftward:90,upward:180,rightward:-90};Object.keys(Me).indexOf(r.direction)===-1&&qi("Invalid direction '".concat(r.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(Me).join(", ")));var ot=function(pt){return dge(qe(pt),v,Me[r.direction])};return i.nodes().layoutPositions(this,r,ot),this};var Q0e={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,i){return!0},ready:void 0,stop:void 0,transform:function(t,i){return i}};function PG(r){this.options=yn({},Q0e,r)}PG.prototype.run=function(){var r=this.options,t=r,i=r.cy,a=t.eles,u=t.counterclockwise!==void 0?!t.counterclockwise:t.clockwise,c=a.nodes().not(":parent");t.sort&&(c=c.sort(t.sort));for(var l=wo(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:i.width(),h:i.height()}),h={x:l.x1+l.w/2,y:l.y1+l.h/2},v=t.sweep===void 0?2*Math.PI-2*Math.PI/c.length:t.sweep,p=v/Math.max(1,c.length-1),g,w=0,_=0;_<c.length;_++){var E=c[_],k=E.layoutDimensions(t),I=k.w,C=k.h;w=Math.max(w,I,C)}if(Ft(t.radius)?g=t.radius:c.length<=1?g=0:g=Math.min(l.h,l.w)/2-w,c.length>1&&t.avoidOverlap){w*=1.75;var P=Math.cos(p)-Math.cos(0),A=Math.sin(p)-Math.sin(0),L=Math.sqrt(w*w/(P*P+A*A));g=Math.max(L,g)}var O=function(B,F){var q=t.startAngle+F*p*(u?1:-1),$=g*Math.cos(q),Y=g*Math.sin(q),V={x:h.x+$,y:h.y+Y};return V};return a.nodes().layoutPositions(this,t,O),this};var Z0e={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,i){return!0},ready:void 0,stop:void 0,transform:function(t,i){return i}};function LG(r){this.options=yn({},Z0e,r)}LG.prototype.run=function(){for(var r=this.options,t=r,i=t.counterclockwise!==void 0?!t.counterclockwise:t.clockwise,a=r.cy,u=t.eles,c=u.nodes().not(":parent"),l=wo(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:a.width(),h:a.height()}),h={x:l.x1+l.w/2,y:l.y1+l.h/2},v=[],p=0,g=0;g<c.length;g++){var w=c[g],_=void 0;_=t.concentric(w),v.push({value:_,node:w}),w._private.scratch.concentric=_}c.updateStyle();for(var E=0;E<c.length;E++){var k=c[E],I=k.layoutDimensions(t);p=Math.max(p,I.w,I.h)}v.sort(function(ke,je){return je.value-ke.value});for(var C=t.levelWidth(c),P=[[]],A=P[0],L=0;L<v.length;L++){var O=v[L];if(A.length>0){var M=Math.abs(A[0].value-O.value);M>=C&&(A=[],P.push(A))}A.push(O)}var B=p+t.minNodeSpacing;if(!t.avoidOverlap){var F=P.length>0&&P[0].length>1,q=Math.min(l.w,l.h)/2-B,$=q/(P.length+F?1:0);B=Math.min(B,$)}for(var Y=0,V=0;V<P.length;V++){var U=P[V],G=t.sweep===void 0?2*Math.PI-2*Math.PI/U.length:t.sweep,X=U.dTheta=G/Math.max(1,U.length-1);if(U.length>1&&t.avoidOverlap){var ne=Math.cos(X)-Math.cos(0),ae=Math.sin(X)-Math.sin(0),oe=Math.sqrt(B*B/(ne*ne+ae*ae));Y=Math.max(oe,Y)}U.r=Y,Y+=B}if(t.equidistant){for(var le=0,pe=0,ge=0;ge<P.length;ge++){var de=P[ge],Se=de.r-pe;le=Math.max(le,Se)}pe=0;for(var Ne=0;Ne<P.length;Ne++){var ye=P[Ne];Ne===0&&(pe=ye.r),ye.r=pe,pe+=le}}for(var we={},Pe=0;Pe<P.length;Pe++)for(var Fe=P[Pe],Ue=Fe.dTheta,He=Fe.r,De=0;De<Fe.length;De++){var Ce=Fe[De],Be=t.startAngle+(i?1:-1)*Ue*De,ve={x:h.x+He*Math.cos(Be),y:h.y+He*Math.sin(Be)};we[Ce.node.id()]=ve}return u.nodes().layoutPositions(this,t,function(ke){var je=ke.id();return we[je]}),this};var QA,e1e={ready:function(){},stop:function(){},animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:function(t,i){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 v2(r){this.options=yn({},e1e,r),this.options.layout=this;var t=this.options.eles.nodes(),i=this.options.eles.edges(),a=i.filter(function(u){var c=u.source().data("id"),l=u.target().data("id"),h=t.some(function(p){return p.data("id")===c}),v=t.some(function(p){return p.data("id")===l});return!h||!v});this.options.eles=this.options.eles.not(a)}v2.prototype.run=function(){var r=this.options,t=r.cy,i=this;i.stopped=!1,(r.animate===!0||r.animate===!1)&&i.emit({type:"layoutstart",layout:i}),r.debug===!0?QA=!0:QA=!1;var a=t1e(t,i,r);QA&&r1e(a),r.randomize&&i1e(a);var u=ih(),c=function(){a1e(a,t,r),r.fit===!0&&t.fit(r.padding)},l=function(_){return!(i.stopped||_>=r.numIter||(s1e(a,r),a.temperature=a.temperature*r.coolingFactor,a.temperature<r.minTemp))},h=function(){if(r.animate===!0||r.animate===!1)c(),i.one("layoutstop",r.stop),i.emit({type:"layoutstop",layout:i});else{var _=r.eles.nodes(),E=OG(a,r,_);_.layoutPositions(i,r,E)}},v=0,p=!0;if(r.animate===!0){var g=function(){for(var _=0;p&&_<r.refresh;)p=l(v),v++,_++;if(!p)jG(a,r),h();else{var E=ih();E-u>=r.animationThreshold&&c(),Px(g)}};g()}else{for(;p;)p=l(v),v++;jG(a,r),h()}return this},v2.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},v2.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var t1e=function(t,i,a){for(var u=a.eles.edges(),c=a.eles.nodes(),l=wo(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:u.size(),temperature:a.initialTemp,clientWidth:l.w,clientHeight:l.h,boundingBox:l},v=a.eles.components(),p={},g=0;g<v.length;g++)for(var w=v[g],_=0;_<w.length;_++){var E=w[_];p[E.id()]=g}for(var g=0;g<h.nodeSize;g++){var k=c[g],I=k.layoutDimensions(a),C={};C.isLocked=k.locked(),C.id=k.data("id"),C.parentId=k.data("parent"),C.cmptId=p[k.id()],C.children=[],C.positionX=k.position("x"),C.positionY=k.position("y"),C.offsetX=0,C.offsetY=0,C.height=I.w,C.width=I.h,C.maxX=C.positionX+C.width/2,C.minX=C.positionX-C.width/2,C.maxY=C.positionY+C.height/2,C.minY=C.positionY-C.height/2,C.padLeft=parseFloat(k.style("padding")),C.padRight=parseFloat(k.style("padding")),C.padTop=parseFloat(k.style("padding")),C.padBottom=parseFloat(k.style("padding")),C.nodeRepulsion=Ji(a.nodeRepulsion)?a.nodeRepulsion(k):a.nodeRepulsion,h.layoutNodes.push(C),h.idToIndex[C.id]=g}for(var P=[],A=0,L=-1,O=[],g=0;g<h.nodeSize;g++){var k=h.layoutNodes[g],M=k.parentId;M!=null?h.layoutNodes[h.idToIndex[M]].children.push(k.id):(P[++L]=k.id,O.push(k.id))}for(h.graphSet.push(O);A<=L;){var B=P[A++],F=h.idToIndex[B],E=h.layoutNodes[F],q=E.children;if(q.length>0){h.graphSet.push(q);for(var g=0;g<q.length;g++)P[++L]=q[g]}}for(var g=0;g<h.graphSet.length;g++)for(var $=h.graphSet[g],_=0;_<$.length;_++){var Y=h.idToIndex[$[_]];h.indexToGraph[Y]=g}for(var g=0;g<h.edgeSize;g++){var V=u[g],U={};U.id=V.data("id"),U.sourceId=V.data("source"),U.targetId=V.data("target");var G=Ji(a.idealEdgeLength)?a.idealEdgeLength(V):a.idealEdgeLength,X=Ji(a.edgeElasticity)?a.edgeElasticity(V):a.edgeElasticity,ne=h.idToIndex[U.sourceId],ae=h.idToIndex[U.targetId],oe=h.indexToGraph[ne],le=h.indexToGraph[ae];if(oe!=le){for(var pe=n1e(U.sourceId,U.targetId,h),ge=h.graphSet[pe],de=0,C=h.layoutNodes[ne];ge.indexOf(C.id)===-1;)C=h.layoutNodes[h.idToIndex[C.parentId]],de++;for(C=h.layoutNodes[ae];ge.indexOf(C.id)===-1;)C=h.layoutNodes[h.idToIndex[C.parentId]],de++;G*=de*a.nestingFactor}U.idealLength=G,U.elasticity=X,h.layoutEdges.push(U)}return h},n1e=function(t,i,a){var u=NG(t,i,0,a);return 2>u.count?0:u.graph},NG=function(t,i,a,u){var c=u.graphSet[a];if(-1<c.indexOf(t)&&-1<c.indexOf(i))return{count:2,graph:a};for(var l=0,h=0;h<c.length;h++){var v=c[h],p=u.idToIndex[v],g=u.layoutNodes[p].children;if(g.length!==0){var w=u.indexToGraph[u.idToIndex[g[0]]],_=NG(t,i,w,u);if(_.count!==0)if(_.count===1){if(l++,l===2)break}else return _}}return{count:l,graph:a}},r1e,i1e=function(t,i){for(var a=t.clientWidth,u=t.clientHeight,c=0;c<t.nodeSize;c++){var l=t.layoutNodes[c];l.children.length===0&&!l.isLocked&&(l.positionX=Math.random()*a,l.positionY=Math.random()*u)}},OG=function(t,i,a){var u=t.boundingBox,c={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return i.boundingBox&&(a.forEach(function(l){var h=t.layoutNodes[t.idToIndex[l.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(l,h){var v=t.layoutNodes[t.idToIndex[l.data("id")]];if(i.boundingBox){var p=c.w===0?.5:(v.positionX-c.x1)/c.w,g=c.h===0?.5:(v.positionY-c.y1)/c.h;return{x:u.x1+p*u.w,y:u.y1+g*u.h}}else return{x:v.positionX,y:v.positionY}}},a1e=function(t,i,a){var u=a.layout,c=a.eles.nodes(),l=OG(t,a,c);c.positions(l),t.ready!==!0&&(t.ready=!0,u.one("layoutready",a.ready),u.emit({type:"layoutready",layout:this}))},s1e=function(t,i,a){o1e(t,i),l1e(t),f1e(t,i),h1e(t),d1e(t)},o1e=function(t,i){for(var a=0;a<t.graphSet.length;a++)for(var u=t.graphSet[a],c=u.length,l=0;l<c;l++)for(var h=t.layoutNodes[t.idToIndex[u[l]]],v=l+1;v<c;v++){var p=t.layoutNodes[t.idToIndex[u[v]]];u1e(h,p,t,i)}},DG=function(t){return-1+2*t*Math.random()},u1e=function(t,i,a,u){var c=t.cmptId,l=i.cmptId;if(!(c!==l&&!a.isCompound)){var h=i.positionX-t.positionX,v=i.positionY-t.positionY,p=1;h===0&&v===0&&(h=DG(p),v=DG(p));var g=c1e(t,i,h,v);if(g>0)var w=u.nodeOverlap*g,_=Math.sqrt(h*h+v*v),E=w*h/_,k=w*v/_;else var I=p2(t,h,v),C=p2(i,-1*h,-1*v),P=C.x-I.x,A=C.y-I.y,L=P*P+A*A,_=Math.sqrt(L),w=(t.nodeRepulsion+i.nodeRepulsion)/L,E=w*P/_,k=w*A/_;t.isLocked||(t.offsetX-=E,t.offsetY-=k),i.isLocked||(i.offsetX+=E,i.offsetY+=k)}},c1e=function(t,i,a,u){if(a>0)var c=t.maxX-i.minX;else var c=i.maxX-t.minX;if(u>0)var l=t.maxY-i.minY;else var l=i.maxY-t.minY;return c>=0&&l>=0?Math.sqrt(c*c+l*l):0},p2=function(t,i,a){var u=t.positionX,c=t.positionY,l=t.height||1,h=t.width||1,v=a/i,p=l/h,g={};return i===0&&0<a||i===0&&0>a?(g.x=u,g.y=c+l/2,g):0<i&&-1*p<=v&&v<=p?(g.x=u+h/2,g.y=c+h*a/2/i,g):0>i&&-1*p<=v&&v<=p?(g.x=u-h/2,g.y=c-h*a/2/i,g):0<a&&(v<=-1*p||v>=p)?(g.x=u+l*i/2/a,g.y=c+l/2,g):(0>a&&(v<=-1*p||v>=p)&&(g.x=u-l*i/2/a,g.y=c-l/2),g)},l1e=function(t,i){for(var a=0;a<t.edgeSize;a++){var u=t.layoutEdges[a],c=t.idToIndex[u.sourceId],l=t.layoutNodes[c],h=t.idToIndex[u.targetId],v=t.layoutNodes[h],p=v.positionX-l.positionX,g=v.positionY-l.positionY;if(!(p===0&&g===0)){var w=p2(l,p,g),_=p2(v,-1*p,-1*g),E=_.x-w.x,k=_.y-w.y,I=Math.sqrt(E*E+k*k),C=Math.pow(u.idealLength-I,2)/u.elasticity;if(I!==0)var P=C*E/I,A=C*k/I;else var P=0,A=0;l.isLocked||(l.offsetX+=P,l.offsetY+=A),v.isLocked||(v.offsetX-=P,v.offsetY-=A)}}},f1e=function(t,i){if(i.gravity!==0)for(var a=1,u=0;u<t.graphSet.length;u++){var c=t.graphSet[u],l=c.length;if(u===0)var h=t.clientHeight/2,v=t.clientWidth/2;else var p=t.layoutNodes[t.idToIndex[c[0]]],g=t.layoutNodes[t.idToIndex[p.parentId]],h=g.positionX,v=g.positionY;for(var w=0;w<l;w++){var _=t.layoutNodes[t.idToIndex[c[w]]];if(!_.isLocked){var E=h-_.positionX,k=v-_.positionY,I=Math.sqrt(E*E+k*k);if(I>a){var C=i.gravity*E/I,P=i.gravity*k/I;_.offsetX+=C,_.offsetY+=P}}}}},h1e=function(t,i){var a=[],u=0,c=-1;for(a.push.apply(a,t.graphSet[0]),c+=t.graphSet[0].length;u<=c;){var l=a[u++],h=t.idToIndex[l],v=t.layoutNodes[h],p=v.children;if(0<p.length&&!v.isLocked){for(var g=v.offsetX,w=v.offsetY,_=0;_<p.length;_++){var E=t.layoutNodes[t.idToIndex[p[_]]];E.offsetX+=g,E.offsetY+=w,a[++c]=p[_]}v.offsetX=0,v.offsetY=0}}},d1e=function(t,i){for(var a=0;a<t.nodeSize;a++){var u=t.layoutNodes[a];0<u.children.length&&(u.maxX=void 0,u.minX=void 0,u.maxY=void 0,u.minY=void 0)}for(var a=0;a<t.nodeSize;a++){var u=t.layoutNodes[a];if(!(0<u.children.length||u.isLocked)){var c=v1e(u.offsetX,u.offsetY,t.temperature);u.positionX+=c.x,u.positionY+=c.y,u.offsetX=0,u.offsetY=0,u.minX=u.positionX-u.width,u.maxX=u.positionX+u.width,u.minY=u.positionY-u.height,u.maxY=u.positionY+u.height,MG(u,t)}}for(var a=0;a<t.nodeSize;a++){var u=t.layoutNodes[a];0<u.children.length&&!u.isLocked&&(u.positionX=(u.maxX+u.minX)/2,u.positionY=(u.maxY+u.minY)/2,u.width=u.maxX-u.minX,u.height=u.maxY-u.minY)}},v1e=function(t,i,a){var u=Math.sqrt(t*t+i*i);if(u>a)var c={x:a*t/u,y:a*i/u};else var c={x:t,y:i};return c},MG=function(t,i){var a=t.parentId;if(a!=null){var u=i.layoutNodes[i.idToIndex[a]],c=!1;if((u.maxX==null||t.maxX+u.padRight>u.maxX)&&(u.maxX=t.maxX+u.padRight,c=!0),(u.minX==null||t.minX-u.padLeft<u.minX)&&(u.minX=t.minX-u.padLeft,c=!0),(u.maxY==null||t.maxY+u.padBottom>u.maxY)&&(u.maxY=t.maxY+u.padBottom,c=!0),(u.minY==null||t.minY-u.padTop<u.minY)&&(u.minY=t.minY-u.padTop,c=!0),c)return MG(u,i)}},jG=function(t,i){for(var a=t.layoutNodes,u=[],c=0;c<a.length;c++){var l=a[c],h=l.cmptId,v=u[h]=u[h]||[];v.push(l)}for(var p=0,c=0;c<u.length;c++){var g=u[c];if(g){g.x1=1/0,g.x2=-1/0,g.y1=1/0,g.y2=-1/0;for(var w=0;w<g.length;w++){var _=g[w];g.x1=Math.min(g.x1,_.positionX-_.width/2),g.x2=Math.max(g.x2,_.positionX+_.width/2),g.y1=Math.min(g.y1,_.positionY-_.height/2),g.y2=Math.max(g.y2,_.positionY+_.height/2)}g.w=g.x2-g.x1,g.h=g.y2-g.y1,p+=g.w*g.h}}u.sort(function(A,L){return L.w*L.h-A.w*A.h});for(var E=0,k=0,I=0,C=0,P=Math.sqrt(p)*t.clientWidth/t.clientHeight,c=0;c<u.length;c++){var g=u[c];if(g){for(var w=0;w<g.length;w++){var _=g[w];_.isLocked||(_.positionX+=E-g.x1,_.positionY+=k-g.y1)}E+=g.w+i.componentSpacing,I+=g.w+i.componentSpacing,C=Math.max(C,g.h),I>P&&(k+=C+i.componentSpacing,E=0,I=0,C=0)}}},p1e={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,i){return!0},ready:void 0,stop:void 0,transform:function(t,i){return i}};function BG(r){this.options=yn({},p1e,r)}BG.prototype.run=function(){var r=this.options,t=r,i=r.cy,a=t.eles,u=a.nodes().not(":parent");t.sort&&(u=u.sort(t.sort));var c=wo(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:i.width(),h:i.height()});if(c.h===0||c.w===0)a.nodes().layoutPositions(this,t,function(Ne){return{x:c.x1,y:c.y1}});else{var l=u.size(),h=Math.sqrt(l*c.h/c.w),v=Math.round(h),p=Math.round(c.w/c.h*h),g=function(ye){if(ye==null)return Math.min(v,p);var we=Math.min(v,p);we==v?v=ye:p=ye},w=function(ye){if(ye==null)return Math.max(v,p);var we=Math.max(v,p);we==v?v=ye:p=ye},_=t.rows,E=t.cols!=null?t.cols:t.columns;if(_!=null&&E!=null)v=_,p=E;else if(_!=null&&E==null)v=_,p=Math.ceil(l/v);else if(_==null&&E!=null)p=E,v=Math.ceil(l/p);else if(p*v>l){var k=g(),I=w();(k-1)*I>=l?g(k-1):(I-1)*k>=l&&w(I-1)}else for(;p*v<l;){var C=g(),P=w();(P+1)*C>=l?w(P+1):g(C+1)}var A=c.w/p,L=c.h/v;if(t.condense&&(A=0,L=0),t.avoidOverlap)for(var O=0;O<u.length;O++){var M=u[O],B=M._private.position;(B.x==null||B.y==null)&&(B.x=0,B.y=0);var F=M.layoutDimensions(t),q=t.avoidOverlapPadding,$=F.w+q,Y=F.h+q;A=Math.max(A,$),L=Math.max(L,Y)}for(var V={},U=function(ye,we){return!!V["c-"+ye+"-"+we]},G=function(ye,we){V["c-"+ye+"-"+we]=!0},X=0,ne=0,ae=function(){ne++,ne>=p&&(ne=0,X++)},oe={},le=0;le<u.length;le++){var pe=u[le],ge=t.position(pe);if(ge&&(ge.row!==void 0||ge.col!==void 0)){var de={row:ge.row,col:ge.col};if(de.col===void 0)for(de.col=0;U(de.row,de.col);)de.col++;else if(de.row===void 0)for(de.row=0;U(de.row,de.col);)de.row++;oe[pe.id()]=de,G(de.row,de.col)}}var Se=function(ye,we){var Pe,Fe;if(ye.locked()||ye.isParent())return!1;var Ue=oe[ye.id()];if(Ue)Pe=Ue.col*A+A/2+c.x1,Fe=Ue.row*L+L/2+c.y1;else{for(;U(X,ne);)ae();Pe=ne*A+A/2+c.x1,Fe=X*L+L/2+c.y1,G(X,ne),ae()}return{x:Pe,y:Fe}};u.layoutPositions(this,t,Se)}return this};var g1e={ready:function(){},stop:function(){}};function ZA(r){this.options=yn({},g1e,r)}ZA.prototype.run=function(){var r=this.options,t=r.eles,i=this;return r.cy,i.emit("layoutstart"),t.nodes().positions(function(){return{x:0,y:0}}),i.one("layoutready",r.ready),i.emit("layoutready"),i.one("layoutstop",r.stop),i.emit("layoutstop"),this},ZA.prototype.stop=function(){return this};var b1e={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,i){return!0},ready:void 0,stop:void 0,transform:function(t,i){return i}};function qG(r){this.options=yn({},b1e,r)}qG.prototype.run=function(){var r=this.options,t=r.eles,i=t.nodes(),a=Ji(r.positions);function u(c){if(r.positions==null)return qge(c.position());if(a)return r.positions(c);var l=r.positions[c._private.data.id];return l??null}return i.layoutPositions(this,r,function(c,l){var h=u(c);return c.locked()||h==null?!1:h}),this};var y1e={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,i){return!0},ready:void 0,stop:void 0,transform:function(t,i){return i}};function FG(r){this.options=yn({},y1e,r)}FG.prototype.run=function(){var r=this.options,t=r.cy,i=r.eles,a=wo(r.boundingBox?r.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),u=function(l,h){return{x:a.x1+Math.round(Math.random()*a.w),y:a.y1+Math.round(Math.random()*a.h)}};return i.nodes().layoutPositions(this,r,u),this};var m1e=[{name:"breadthfirst",impl:AG},{name:"circle",impl:PG},{name:"concentric",impl:LG},{name:"cose",impl:v2},{name:"grid",impl:BG},{name:"null",impl:ZA},{name:"preset",impl:qG},{name:"random",impl:FG}];function $G(r){this.options=r,this.notifications=0}var GG=function(){},HG=function(){throw new Error("A headless instance can not render images")};$G.prototype={recalculateRenderedStyle:GG,notify:function(){this.notifications++},init:GG,isHeadless:function(){return!0},png:HG,jpg:HG};var eP={};eP.arrowShapeWidth=.3,eP.registerArrowShapes=function(){var r=this.arrowShapes={},t=this,i=function(p,g,w,_,E,k,I){var C=E.x-w/2-I,P=E.x+w/2+I,A=E.y-w/2-I,L=E.y+w/2+I,O=C<=p&&p<=P&&A<=g&&g<=L;return O},a=function(p,g,w,_,E){var k=p*Math.cos(_)-g*Math.sin(_),I=p*Math.sin(_)+g*Math.cos(_),C=k*w,P=I*w,A=C+E.x,L=P+E.y;return{x:A,y:L}},u=function(p,g,w,_){for(var E=[],k=0;k<p.length;k+=2){var I=p[k],C=p[k+1];E.push(a(I,C,g,w,_))}return E},c=function(p){for(var g=[],w=0;w<p.length;w++){var _=p[w];g.push(_.x,_.y)}return g},l=function(p){return p.pstyle("width").pfValue*p.pstyle("arrow-scale").pfValue*2},h=function(p,g){hn(g)&&(g=r[g]),r[p]=yn({name:p,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:function(_,E,k,I,C,P){var A=c(u(this.points,k+2*P,I,C)),L=tu(_,E,A);return L},roughCollide:i,draw:function(_,E,k,I){var C=u(this.points,E,k,I);t.arrowShapeImpl("polygon")(_,C)},spacing:function(_){return 0},gap:l},g)};h("none",{collide:Nx,roughCollide:Nx,draw:xC,spacing:i8,gap:i8}),h("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),h("arrow","triangle"),h("triangle-backcurve",{points:r.triangle.points,controlPoint:[0,-.15],roughCollide:i,draw:function(p,g,w,_,E){var k=u(this.points,g,w,_),I=this.controlPoint,C=a(I[0],I[1],g,w,_);t.arrowShapeImpl(this.name)(p,k,C)},gap:function(p){return l(p)*.8}}),h("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:function(p,g,w,_,E,k,I){var C=c(u(this.points,w+2*I,_,E)),P=c(u(this.pointsTee,w+2*I,_,E)),A=tu(p,g,C)||tu(p,g,P);return A},draw:function(p,g,w,_,E){var k=u(this.points,g,w,_),I=u(this.pointsTee,g,w,_);t.arrowShapeImpl(this.name)(p,k,I)}}),h("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:function(p,g,w,_,E,k,I){var C=E,P=Math.pow(C.x-p,2)+Math.pow(C.y-g,2)<=Math.pow((w+2*I)*this.radius,2),A=c(u(this.points,w+2*I,_,E));return tu(p,g,A)||P},draw:function(p,g,w,_,E){var k=u(this.pointsTr,g,w,_);t.arrowShapeImpl(this.name)(p,k,_.x,_.y,this.radius*g)},spacing:function(p){return t.getArrowWidth(p.pstyle("width").pfValue,p.pstyle("arrow-scale").value)*this.radius}}),h("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:function(p,g){var w=this.baseCrossLinePts.slice(),_=g/p,E=3,k=5;return w[E]=w[E]-_,w[k]=w[k]-_,w},collide:function(p,g,w,_,E,k,I){var C=c(u(this.points,w+2*I,_,E)),P=c(u(this.crossLinePts(w,k),w+2*I,_,E)),A=tu(p,g,C)||tu(p,g,P);return A},draw:function(p,g,w,_,E){var k=u(this.points,g,w,_),I=u(this.crossLinePts(g,E),g,w,_);t.arrowShapeImpl(this.name)(p,k,I)}}),h("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:function(p){return l(p)*.525}}),h("circle",{radius:.15,collide:function(p,g,w,_,E,k,I){var C=E,P=Math.pow(C.x-p,2)+Math.pow(C.y-g,2)<=Math.pow((w+2*I)*this.radius,2);return P},draw:function(p,g,w,_,E){t.arrowShapeImpl(this.name)(p,_.x,_.y,this.radius*g)},spacing:function(p){return t.getArrowWidth(p.pstyle("width").pfValue,p.pstyle("arrow-scale").value)*this.radius}}),h("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:function(p){return 1},gap:function(p){return 1}}),h("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),h("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:function(p){return p.pstyle("width").pfValue*p.pstyle("arrow-scale").value}}),h("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 fp={};fp.projectIntoViewport=function(r,t){var i=this.cy,a=this.findContainerClientCoords(),u=a[0],c=a[1],l=a[4],h=i.pan(),v=i.zoom(),p=((r-u)/l-h.x)/v,g=((t-c)/l-h.y)/v;return[p,g]},fp.findContainerClientCoords=function(){if(this.containerBB)return this.containerBB;var r=this.container,t=r.getBoundingClientRect(),i=this.cy.window().getComputedStyle(r),a=function(P){return parseFloat(i.getPropertyValue(P))},u={left:a("padding-left"),right:a("padding-right"),top:a("padding-top"),bottom:a("padding-bottom")},c={left:a("border-left-width"),right:a("border-right-width"),top:a("border-top-width"),bottom:a("border-bottom-width")},l=r.clientWidth,h=r.clientHeight,v=u.left+u.right,p=u.top+u.bottom,g=c.left+c.right,w=t.width/(l+g),_=l-v,E=h-p,k=t.left+u.left+c.left,I=t.top+u.top+c.top;return this.containerBB=[k,I,_,E,w]},fp.invalidateContainerClientCoordsCache=function(){this.containerBB=null},fp.findNearestElement=function(r,t,i,a){return this.findNearestElements(r,t,i,a)[0]},fp.findNearestElements=function(r,t,i,a){var u=this,c=this,l=c.getCachedZSortedEles(),h=[],v=c.cy.zoom(),p=c.cy.hasCompoundNodes(),g=(a?24:8)/v,w=(a?8:2)/v,_=(a?8:2)/v,E=1/0,k,I;i&&(l=l.interactive);function C(F,q){if(F.isNode()){if(I)return;I=F,h.push(F)}if(F.isEdge()&&(q==null||q<E))if(k){if(k.pstyle("z-compound-depth").value===F.pstyle("z-compound-depth").value&&k.pstyle("z-compound-depth").value===F.pstyle("z-compound-depth").value){for(var $=0;$<h.length;$++)if(h[$].isEdge()){h[$]=F,k=F,E=q??E;break}}}else h.push(F),k=F,E=q??E}function P(F){var q=F.outerWidth()+2*w,$=F.outerHeight()+2*w,Y=q/2,V=$/2,U=F.position(),G=F.pstyle("corner-radius").value==="auto"?"auto":F.pstyle("corner-radius").pfValue,X=F._private.rscratch;if(U.x-Y<=r&&r<=U.x+Y&&U.y-V<=t&&t<=U.y+V){var ne=c.nodeShapes[u.getNodeShape(F)];if(ne.checkPoint(r,t,0,q,$,U.x,U.y,G,X))return C(F,0),!0}}function A(F){var q=F._private,$=q.rscratch,Y=F.pstyle("width").pfValue,V=F.pstyle("arrow-scale").value,U=Y/2+g,G=U*U,X=U*2,le=q.source,pe=q.target,ne;if($.edgeType==="segments"||$.edgeType==="straight"||$.edgeType==="haystack"){for(var ae=$.allpts,oe=0;oe+3<ae.length;oe+=2)if(Zge(r,t,ae[oe],ae[oe+1],ae[oe+2],ae[oe+3],X)&&G>(ne=ibe(r,t,ae[oe],ae[oe+1],ae[oe+2],ae[oe+3])))return C(F,ne),!0}else if($.edgeType==="bezier"||$.edgeType==="multibezier"||$.edgeType==="self"||$.edgeType==="compound"){for(var ae=$.allpts,oe=0;oe+5<$.allpts.length;oe+=4)if(ebe(r,t,ae[oe],ae[oe+1],ae[oe+2],ae[oe+3],ae[oe+4],ae[oe+5],X)&&G>(ne=rbe(r,t,ae[oe],ae[oe+1],ae[oe+2],ae[oe+3],ae[oe+4],ae[oe+5])))return C(F,ne),!0}for(var le=le||q.source,pe=pe||q.target,ge=u.getArrowWidth(Y,V),de=[{name:"source",x:$.arrowStartX,y:$.arrowStartY,angle:$.srcArrowAngle},{name:"target",x:$.arrowEndX,y:$.arrowEndY,angle:$.tgtArrowAngle},{name:"mid-source",x:$.midX,y:$.midY,angle:$.midsrcArrowAngle},{name:"mid-target",x:$.midX,y:$.midY,angle:$.midtgtArrowAngle}],oe=0;oe<de.length;oe++){var Se=de[oe],Ne=c.arrowShapes[F.pstyle(Se.name+"-arrow-shape").value],ye=F.pstyle("width").pfValue;if(Ne.roughCollide(r,t,ge,Se.angle,{x:Se.x,y:Se.y},ye,g)&&Ne.collide(r,t,ge,Se.angle,{x:Se.x,y:Se.y},ye,g))return C(F),!0}p&&h.length>0&&(P(le),P(pe))}function L(F,q,$){return eu(F,q,$)}function O(F,q){var $=F._private,Y=_,V;q?V=q+"-":V="",F.boundingBox();var U=$.labelBounds[q||"main"],G=F.pstyle(V+"label").value,X=F.pstyle("text-events").strValue==="yes";if(!(!X||!G)){var ne=L($.rscratch,"labelX",q),ae=L($.rscratch,"labelY",q),oe=L($.rscratch,"labelAngle",q),le=F.pstyle(V+"text-margin-x").pfValue,pe=F.pstyle(V+"text-margin-y").pfValue,ge=U.x1-Y-le,de=U.x2+Y-le,Se=U.y1-Y-pe,Ne=U.y2+Y-pe;if(oe){var ye=Math.cos(oe),we=Math.sin(oe),Pe=function(ve,ke){return ve=ve-ne,ke=ke-ae,{x:ve*ye-ke*we+ne,y:ve*we+ke*ye+ae}},Fe=Pe(ge,Se),Ue=Pe(ge,Ne),He=Pe(de,Se),De=Pe(de,Ne),Ce=[Fe.x+le,Fe.y+pe,He.x+le,He.y+pe,De.x+le,De.y+pe,Ue.x+le,Ue.y+pe];if(tu(r,t,Ce))return C(F),!0}else if(Td(U,r,t))return C(F),!0}}for(var M=l.length-1;M>=0;M--){var B=l[M];B.isNode()?P(B)||O(B):A(B)||O(B)||O(B,"source")||O(B,"target")}return h},fp.getAllInBox=function(r,t,i,a){var u=this.getCachedZSortedEles().interactive,c=this.cy.zoom(),l=2/c,h=[],v=Math.min(r,i),p=Math.max(r,i),g=Math.min(t,a),w=Math.max(t,a);r=v,i=p,t=g,a=w;var _=wo({x1:r,y1:t,x2:i,y2:a}),E=[{x:_.x1,y:_.y1},{x:_.x2,y:_.y1},{x:_.x2,y:_.y2},{x:_.x1,y:_.y2}],k=[[E[0],E[1]],[E[1],E[2]],[E[2],E[3]],[E[3],E[0]]];function I(ve,ke,je){return eu(ve,ke,je)}function C(ve,ke){var je=ve._private,qe=l,Me="";ve.boundingBox();var ot=je.labelBounds.main;if(!ot)return null;var dt=I(je.rscratch,"labelX",ke),pt=I(je.rscratch,"labelY",ke),Lt=I(je.rscratch,"labelAngle",ke),ut=ve.pstyle(Me+"text-margin-x").pfValue,$t=ve.pstyle(Me+"text-margin-y").pfValue,Yt=ot.x1-qe-ut,fn=ot.x2+qe-ut,Yn=ot.y1-qe-$t,he=ot.y2+qe-$t;if(Lt){var J=Math.cos(Lt),te=Math.sin(Lt),be=function(Te,ue){return Te=Te-dt,ue=ue-pt,{x:Te*J-ue*te+dt,y:Te*te+ue*J+pt}};return[be(Yt,Yn),be(fn,Yn),be(fn,he),be(Yt,he)]}else return[{x:Yt,y:Yn},{x:fn,y:Yn},{x:fn,y:he},{x:Yt,y:he}]}function P(ve,ke,je,qe){function Me(ot,dt,pt){return(pt.y-ot.y)*(dt.x-ot.x)>(dt.y-ot.y)*(pt.x-ot.x)}return Me(ve,je,qe)!==Me(ke,je,qe)&&Me(ve,ke,je)!==Me(ve,ke,qe)}for(var A=0;A<u.length;A++){var L=u[A];if(L.isNode()){var O=L,M=O.pstyle("text-events").strValue==="yes",B=O.pstyle("box-selection").strValue,F=O.pstyle("box-select-labels").strValue==="yes";if(B==="none")continue;var q=(B==="overlap"||F)&&M,$=O.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:q});if(B==="contain"){var Y=!1;if(F&&M){var V=C(O);V&&OC(V,E)&&(h.push(O),Y=!0)}!Y&&p8(_,$)&&h.push(O)}else if(B==="overlap"&&CC(_,$)){var U=O.boundingBox({includeNodes:!0,includeEdges:!0,includeLabels:!1,includeMainLabels:!1,includeSourceLabels:!1,includeTargetLabels:!1}),G=[{x:U.x1,y:U.y1},{x:U.x2,y:U.y1},{x:U.x2,y:U.y2},{x:U.x1,y:U.y2}];if(OC(G,E))h.push(O);else{var X=C(O);X&&OC(X,E)&&h.push(O)}}}else{var ne=L,ae=ne._private,oe=ae.rscratch,le=ne.pstyle("box-selection").strValue;if(le==="none")continue;if(le==="contain"){if(oe.startX!=null&&oe.startY!=null&&!Td(_,oe.startX,oe.startY)||oe.endX!=null&&oe.endY!=null&&!Td(_,oe.endX,oe.endY))continue;if(oe.edgeType==="bezier"||oe.edgeType==="multibezier"||oe.edgeType==="self"||oe.edgeType==="compound"||oe.edgeType==="segments"||oe.edgeType==="haystack"){for(var pe=ae.rstyle.bezierPts||ae.rstyle.linePts||ae.rstyle.haystackPts,ge=!0,de=0;de<pe.length;de++)if(!v8(_,pe[de])){ge=!1;break}ge&&h.push(ne)}else oe.edgeType==="straight"&&h.push(ne)}else if(le==="overlap"){var Se=!1;if(oe.startX!=null&&oe.startY!=null&&oe.endX!=null&&oe.endY!=null&&(Td(_,oe.startX,oe.startY)||Td(_,oe.endX,oe.endY)))h.push(ne),Se=!0;else if(!Se&&oe.edgeType==="haystack"){for(var Ne=ae.rstyle.haystackPts,ye=0;ye<Ne.length;ye++)if(v8(_,Ne[ye])){h.push(ne),Se=!0;break}}if(!Se){var we=ae.rstyle.bezierPts||ae.rstyle.linePts||ae.rstyle.haystackPts;if((!we||we.length<2)&&oe.edgeType==="straight"&&oe.startX!=null&&oe.startY!=null&&oe.endX!=null&&oe.endY!=null&&(we=[{x:oe.startX,y:oe.startY},{x:oe.endX,y:oe.endY}]),!we||we.length<2)continue;for(var Pe=0;Pe<we.length-1;Pe++){for(var Fe=we[Pe],Ue=we[Pe+1],He=0;He<k.length;He++){var De=ja(k[He],2),Ce=De[0],Be=De[1];if(P(Fe,Ue,Ce,Be)){h.push(ne),Se=!0;break}}if(Se)break}}}}}return h};var g2={};g2.calculateArrowAngles=function(r){var t=r._private.rscratch,i=t.edgeType==="haystack",a=t.edgeType==="bezier",u=t.edgeType==="multibezier",c=t.edgeType==="segments",l=t.edgeType==="compound",h=t.edgeType==="self",v,p,g,w,_,E,P,A;if(i?(g=t.haystackPts[0],w=t.haystackPts[1],_=t.haystackPts[2],E=t.haystackPts[3]):(g=t.arrowStartX,w=t.arrowStartY,_=t.arrowEndX,E=t.arrowEndY),P=t.midX,A=t.midY,c)v=g-t.segpts[0],p=w-t.segpts[1];else if(u||l||h||a){var k=t.allpts,I=ms(k[0],k[2],k[4],.1),C=ms(k[1],k[3],k[5],.1);v=g-I,p=w-C}else v=g-P,p=w-A;t.srcArrowAngle=jx(v,p);var P=t.midX,A=t.midY;if(i&&(P=(g+_)/2,A=(w+E)/2),v=_-g,p=E-w,c){var k=t.allpts;if(k.length/2%2===0){var L=k.length/2,O=L-2;v=k[L]-k[O],p=k[L+1]-k[O+1]}else if(t.isRound)v=t.midVector[1],p=-t.midVector[0];else{var L=k.length/2-1,O=L-2;v=k[L]-k[O],p=k[L+1]-k[O+1]}}else if(u||l||h){var k=t.allpts,M=t.ctrlpts,B,F,q,$;if(M.length/2%2===0){var Y=k.length/2-1,V=Y+2,U=V+2;B=ms(k[Y],k[V],k[U],0),F=ms(k[Y+1],k[V+1],k[U+1],0),q=ms(k[Y],k[V],k[U],1e-4),$=ms(k[Y+1],k[V+1],k[U+1],1e-4)}else{var V=k.length/2-1,Y=V-2,U=V+2;B=ms(k[Y],k[V],k[U],.4999),F=ms(k[Y+1],k[V+1],k[U+1],.4999),q=ms(k[Y],k[V],k[U],.5),$=ms(k[Y+1],k[V+1],k[U+1],.5)}v=q-B,p=$-F}if(t.midtgtArrowAngle=jx(v,p),t.midDispX=v,t.midDispY=p,v*=-1,p*=-1,c){var k=t.allpts;if(k.length/2%2!==0){if(!t.isRound){var L=k.length/2-1,G=L+2;v=-(k[G]-k[L]),p=-(k[G+1]-k[L+1])}}}if(t.midsrcArrowAngle=jx(v,p),c)v=_-t.segpts[t.segpts.length-2],p=E-t.segpts[t.segpts.length-1];else if(u||l||h||a){var k=t.allpts,X=k.length,I=ms(k[X-6],k[X-4],k[X-2],.9),C=ms(k[X-5],k[X-3],k[X-1],.9);v=_-I,p=E-C}else v=_-P,p=E-A;t.tgtArrowAngle=jx(v,p)},g2.getArrowWidth=g2.getArrowHeight=function(r,t){var i=this.arrowWidthCache=this.arrowWidthCache||{},a=i[r+", "+t];return a||(a=Math.max(Math.pow(r*13.37,.9),29)*t,i[r+", "+t]=a,a)};var tP,nP,Ul={},sc={},zG,VG,hp,b2,uh,dp,vp,Yl,Sb,y2,UG,YG,rP,iP,WG,KG=function(t,i,a){a.x=i.x-t.x,a.y=i.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)},w1e=function(t,i){i.x=t.x*-1,i.y=t.y*-1,i.nx=t.nx*-1,i.ny=t.ny*-1,i.ang=t.ang>0?-(Math.PI-t.ang):Math.PI+t.ang},_1e=function(t,i,a,u,c){if(t!==WG?KG(i,t,Ul):w1e(sc,Ul),KG(i,a,sc),zG=Ul.nx*sc.ny-Ul.ny*sc.nx,VG=Ul.nx*sc.nx-Ul.ny*-sc.ny,uh=Math.asin(Math.max(-1,Math.min(1,zG))),Math.abs(uh)<1e-6){tP=i.x,nP=i.y,vp=Sb=0;return}hp=1,b2=!1,VG<0?uh<0?uh=Math.PI+uh:(uh=Math.PI-uh,hp=-1,b2=!0):uh>0&&(hp=-1,b2=!0),i.radius!==void 0?Sb=i.radius:Sb=u,dp=uh/2,y2=Math.min(Ul.len/2,sc.len/2),c?(Yl=Math.abs(Math.cos(dp)*Sb/Math.sin(dp)),Yl>y2?(Yl=y2,vp=Math.abs(Yl*Math.sin(dp)/Math.cos(dp))):vp=Sb):(Yl=Math.min(y2,Sb),vp=Math.abs(Yl*Math.sin(dp)/Math.cos(dp))),rP=i.x+sc.nx*Yl,iP=i.y+sc.ny*Yl,tP=rP-sc.ny*vp*hp,nP=iP+sc.nx*vp*hp,UG=i.x+Ul.nx*Yl,YG=i.y+Ul.ny*Yl,WG=i};function XG(r,t){t.radius===0?r.lineTo(t.cx,t.cy):r.arc(t.cx,t.cy,t.radius,t.startAngle,t.endAngle,t.counterClockwise)}function aP(r,t,i,a){var u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return a===0||t.radius===0?{cx:t.x,cy:t.y,radius:0,startX:t.x,startY:t.y,stopX:t.x,stopY:t.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(_1e(r,t,i,a,u),{cx:tP,cy:nP,radius:vp,startX:UG,startY:YG,stopX:rP,stopY:iP,startAngle:Ul.ang+Math.PI/2*hp,endAngle:sc.ang-Math.PI/2*hp,counterClockwise:b2})}var L1=.01,x1e=Math.sqrt(2*L1),no={};no.findMidptPtsEtc=function(r,t){var i=t.posPts,a=t.intersectionPts,u=t.vectorNormInverse,c,l=r.pstyle("source-endpoint"),h=r.pstyle("target-endpoint"),v=l.units!=null&&h.units!=null,p=function(M,B,F,q){var $=q-B,Y=F-M,V=Math.sqrt(Y*Y+$*$);return{x:-$/V,y:Y/V}},g=r.pstyle("edge-distances").value;switch(g){case"node-position":c=i;break;case"intersection":c=a;break;case"endpoints":{if(v){var w=this.manualEndptToPx(r.source()[0],l),_=ja(w,2),E=_[0],k=_[1],I=this.manualEndptToPx(r.target()[0],h),C=ja(I,2),P=C[0],A=C[1],L={x1:E,y1:k,x2:P,y2:A};u=p(E,k,P,A),c=L}else Hr("Edge ".concat(r.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),c=a;break}}return{midptPts:c,vectorNormInverse:u}},no.findHaystackPoints=function(r){for(var t=0;t<r.length;t++){var i=r[t],a=i._private,u=a.rscratch;if(!u.haystack){var c=Math.random()*2*Math.PI;u.source={x:Math.cos(c),y:Math.sin(c)},c=Math.random()*2*Math.PI,u.target={x:Math.cos(c),y:Math.sin(c)}}var l=a.source,h=a.target,v=l.position(),p=h.position(),g=l.width(),w=h.width(),_=l.height(),E=h.height(),k=i.pstyle("haystack-radius").value,I=k/2;u.haystackPts=u.allpts=[u.source.x*g*I+v.x,u.source.y*_*I+v.y,u.target.x*w*I+p.x,u.target.y*E*I+p.y],u.midX=(u.allpts[0]+u.allpts[2])/2,u.midY=(u.allpts[1]+u.allpts[3])/2,u.edgeType="haystack",u.haystack=!0,this.storeEdgeProjections(i),this.calculateArrowAngles(i),this.recalculateEdgeLabelProjections(i),this.calculateLabelAngles(i)}},no.findSegmentsPoints=function(r,t){var i=r._private.rscratch,a=r.pstyle("segment-weights"),u=r.pstyle("segment-distances"),c=r.pstyle("segment-radii"),l=r.pstyle("radius-type"),h=Math.min(a.pfValue.length,u.pfValue.length),v=c.pfValue[c.pfValue.length-1],p=l.pfValue[l.pfValue.length-1];i.edgeType="segments",i.segpts=[],i.radii=[],i.isArcRadius=[];for(var g=0;g<h;g++){var w=a.pfValue[g],_=u.pfValue[g],E=1-w,k=w,I=this.findMidptPtsEtc(r,t),C=I.midptPts,P=I.vectorNormInverse,A={x:C.x1*E+C.x2*k,y:C.y1*E+C.y2*k};i.segpts.push(A.x+P.x*_,A.y+P.y*_),i.radii.push(c.pfValue[g]!==void 0?c.pfValue[g]:v),i.isArcRadius.push((l.pfValue[g]!==void 0?l.pfValue[g]:p)==="arc-radius")}},no.findLoopPoints=function(r,t,i,a){var u=r._private.rscratch,c=t.dirCounts,l=t.srcPos,h=r.pstyle("control-point-distances"),v=h?h.pfValue[0]:void 0,p=r.pstyle("loop-direction").pfValue,g=r.pstyle("loop-sweep").pfValue,w=r.pstyle("control-point-step-size").pfValue;u.edgeType="self";var _=i,E=w;a&&(_=0,E=v);var k=p-Math.PI/2,I=k-g/2,C=k+g/2,P=p+"_"+g;_=c[P]===void 0?c[P]=0:++c[P],u.ctrlpts=[l.x+Math.cos(I)*1.4*E*(_/3+1),l.y+Math.sin(I)*1.4*E*(_/3+1),l.x+Math.cos(C)*1.4*E*(_/3+1),l.y+Math.sin(C)*1.4*E*(_/3+1)]},no.findCompoundLoopPoints=function(r,t,i,a){var u=r._private.rscratch;u.edgeType="compound";var c=t.srcPos,l=t.tgtPos,h=t.srcW,v=t.srcH,p=t.tgtW,g=t.tgtH,w=r.pstyle("control-point-step-size").pfValue,_=r.pstyle("control-point-distances"),E=_?_.pfValue[0]:void 0,k=i,I=w;a&&(k=0,I=E);var C=50,P={x:c.x-h/2,y:c.y-v/2},A={x:l.x-p/2,y:l.y-g/2},L={x:Math.min(P.x,A.x),y:Math.min(P.y,A.y)},O=.5,M=Math.max(O,Math.log(h*L1)),B=Math.max(O,Math.log(p*L1));u.ctrlpts=[L.x,L.y-(1+Math.pow(C,1.12)/100)*I*(k/3+1)*M,L.x-(1+Math.pow(C,1.12)/100)*I*(k/3+1)*B,L.y]},no.findStraightEdgePoints=function(r){r._private.rscratch.edgeType="straight"},no.findBezierPoints=function(r,t,i,a,u){var c=r._private.rscratch,l=r.pstyle("control-point-step-size").pfValue,h=r.pstyle("control-point-distances"),v=r.pstyle("control-point-weights"),p=h&&v?Math.min(h.value.length,v.value.length):1,g=h?h.pfValue[0]:void 0,w=v.value[0],_=a;c.edgeType=_?"multibezier":"bezier",c.ctrlpts=[];for(var E=0;E<p;E++){var k=(.5-t.eles.length/2+i)*l*(u?-1:1),I=void 0,C=IC(k);_&&(g=h?h.pfValue[E]:l,w=v.value[E]),a?I=g:I=g!==void 0?C*g:void 0;var P=I!==void 0?I:k,A=1-w,L=w,O=this.findMidptPtsEtc(r,t),M=O.midptPts,B=O.vectorNormInverse,F={x:M.x1*A+M.x2*L,y:M.y1*A+M.y2*L};c.ctrlpts.push(F.x+B.x*P,F.y+B.y*P)}},no.findTaxiPoints=function(r,t){var i=r._private.rscratch;i.edgeType="segments";var a="vertical",u="horizontal",c="leftward",l="rightward",h="downward",v="upward",p="auto",g=t.posPts,w=t.srcW,_=t.srcH,E=t.tgtW,k=t.tgtH,I=r.pstyle("edge-distances").value,C=I!=="node-position",P=r.pstyle("taxi-direction").value,A=P,L=r.pstyle("taxi-turn"),O=L.units==="%",M=L.pfValue,B=M<0,F=r.pstyle("taxi-turn-min-distance").pfValue,q=C?(w+E)/2:0,$=C?(_+k)/2:0,Y=g.x2-g.x1,V=g.y2-g.y1,U=function(ue,$e){return ue>0?Math.max(ue-$e,0):Math.min(ue+$e,0)},G=U(Y,q),X=U(V,$),ne=!1;A===p?P=Math.abs(G)>Math.abs(X)?u:a:A===v||A===h?(P=a,ne=!0):(A===c||A===l)&&(P=u,ne=!0);var ae=P===a,oe=ae?X:G,le=ae?V:Y,pe=IC(le),ge=!1;!(ne&&(O||B))&&(A===h&&le<0||A===v&&le>0||A===c&&le>0||A===l&&le<0)&&(pe*=-1,oe=pe*Math.abs(oe),ge=!0);var de;if(O){var Se=M<0?1+M:M;de=Se*oe}else{var Ne=M<0?oe:0;de=Ne+M*pe}var ye=function(ue){return Math.abs(ue)<F||Math.abs(ue)>=Math.abs(oe)},we=ye(de),Pe=ye(Math.abs(oe)-Math.abs(de)),Fe=we||Pe;if(Fe&&!ge)if(ae){var Ue=Math.abs(le)<=_/2,He=Math.abs(Y)<=E/2;if(Ue){var De=(g.x1+g.x2)/2,Ce=g.y1,Be=g.y2;i.segpts=[De,Ce,De,Be]}else if(He){var ve=(g.y1+g.y2)/2,ke=g.x1,je=g.x2;i.segpts=[ke,ve,je,ve]}else i.segpts=[g.x1,g.y2]}else{var qe=Math.abs(le)<=w/2,Me=Math.abs(V)<=k/2;if(qe){var ot=(g.y1+g.y2)/2,dt=g.x1,pt=g.x2;i.segpts=[dt,ot,pt,ot]}else if(Me){var Lt=(g.x1+g.x2)/2,ut=g.y1,$t=g.y2;i.segpts=[Lt,ut,Lt,$t]}else i.segpts=[g.x2,g.y1]}else if(ae){var Yt=g.y1+de+(C?_/2*pe:0),fn=g.x1,Yn=g.x2;i.segpts=[fn,Yt,Yn,Yt]}else{var he=g.x1+de+(C?w/2*pe:0),J=g.y1,te=g.y2;i.segpts=[he,J,he,te]}if(i.isRound){var be=r.pstyle("taxi-radius").value,Le=r.pstyle("radius-type").value[0]==="arc-radius";i.radii=new Array(i.segpts.length/2).fill(be),i.isArcRadius=new Array(i.segpts.length/2).fill(Le)}},no.tryToCorrectInvalidPoints=function(r,t){var i=r._private.rscratch;if(i.edgeType==="bezier"){var a=t.srcPos,u=t.tgtPos,c=t.srcW,l=t.srcH,h=t.tgtW,v=t.tgtH,p=t.srcShape,g=t.tgtShape,w=t.srcCornerRadius,_=t.tgtCornerRadius,E=t.srcRs,k=t.tgtRs,I=!Ft(i.startX)||!Ft(i.startY),C=!Ft(i.arrowStartX)||!Ft(i.arrowStartY),P=!Ft(i.endX)||!Ft(i.endY),A=!Ft(i.arrowEndX)||!Ft(i.arrowEndY),L=3,O=this.getArrowWidth(r.pstyle("width").pfValue,r.pstyle("arrow-scale").value)*this.arrowShapeWidth,M=L*O,B=sp({x:i.ctrlpts[0],y:i.ctrlpts[1]},{x:i.startX,y:i.startY}),F=B<M,q=sp({x:i.ctrlpts[0],y:i.ctrlpts[1]},{x:i.endX,y:i.endY}),$=q<M,Y=!1;if(I||C||F){Y=!0;var V={x:i.ctrlpts[0]-a.x,y:i.ctrlpts[1]-a.y},U=Math.sqrt(V.x*V.x+V.y*V.y),G={x:V.x/U,y:V.y/U},X=Math.max(c,l),ne={x:i.ctrlpts[0]+G.x*2*X,y:i.ctrlpts[1]+G.y*2*X},ae=p.intersectLine(a.x,a.y,c,l,ne.x,ne.y,0,w,E);F?(i.ctrlpts[0]=i.ctrlpts[0]+G.x*(M-B),i.ctrlpts[1]=i.ctrlpts[1]+G.y*(M-B)):(i.ctrlpts[0]=ae[0]+G.x*M,i.ctrlpts[1]=ae[1]+G.y*M)}if(P||A||$){Y=!0;var oe={x:i.ctrlpts[0]-u.x,y:i.ctrlpts[1]-u.y},le=Math.sqrt(oe.x*oe.x+oe.y*oe.y),pe={x:oe.x/le,y:oe.y/le},ge=Math.max(c,l),de={x:i.ctrlpts[0]+pe.x*2*ge,y:i.ctrlpts[1]+pe.y*2*ge},Se=g.intersectLine(u.x,u.y,h,v,de.x,de.y,0,_,k);$?(i.ctrlpts[0]=i.ctrlpts[0]+pe.x*(M-q),i.ctrlpts[1]=i.ctrlpts[1]+pe.y*(M-q)):(i.ctrlpts[0]=Se[0]+pe.x*M,i.ctrlpts[1]=Se[1]+pe.y*M)}Y&&this.findEndpoints(r)}},no.storeAllpts=function(r){var t=r._private.rscratch;if(t.edgeType==="multibezier"||t.edgeType==="bezier"||t.edgeType==="self"||t.edgeType==="compound"){t.allpts=[],t.allpts.push(t.startX,t.startY);for(var i=0;i+1<t.ctrlpts.length;i+=2)t.allpts.push(t.ctrlpts[i],t.ctrlpts[i+1]),i+3<t.ctrlpts.length&&t.allpts.push((t.ctrlpts[i]+t.ctrlpts[i+2])/2,(t.ctrlpts[i+1]+t.ctrlpts[i+3])/2);t.allpts.push(t.endX,t.endY);var a,u;t.ctrlpts.length/2%2===0?(a=t.allpts.length/2-1,t.midX=t.allpts[a],t.midY=t.allpts[a+1]):(a=t.allpts.length/2-3,u=.5,t.midX=ms(t.allpts[a],t.allpts[a+2],t.allpts[a+4],u),t.midY=ms(t.allpts[a+1],t.allpts[a+3],t.allpts[a+5],u))}else if(t.edgeType==="straight")t.allpts=[t.startX,t.startY,t.endX,t.endY],t.midX=(t.startX+t.endX+t.arrowStartX+t.arrowEndX)/4,t.midY=(t.startY+t.endY+t.arrowStartY+t.arrowEndY)/4;else if(t.edgeType==="segments"){if(t.allpts=[],t.allpts.push(t.startX,t.startY),t.allpts.push.apply(t.allpts,t.segpts),t.allpts.push(t.endX,t.endY),t.isRound){t.roundCorners=[];for(var c=2;c+3<t.allpts.length;c+=2){var l=t.radii[c/2-1],h=t.isArcRadius[c/2-1];t.roundCorners.push(aP({x:t.allpts[c-2],y:t.allpts[c-1]},{x:t.allpts[c],y:t.allpts[c+1],radius:l},{x:t.allpts[c+2],y:t.allpts[c+3]},l,h))}}if(t.segpts.length%4===0){var v=t.segpts.length/2,p=v-2;t.midX=(t.segpts[p]+t.segpts[v])/2,t.midY=(t.segpts[p+1]+t.segpts[v+1])/2}else{var g=t.segpts.length/2-1;if(!t.isRound)t.midX=t.segpts[g],t.midY=t.segpts[g+1];else{var w={x:t.segpts[g],y:t.segpts[g+1]},_=t.roundCorners[g/2];if(_.radius===0){var E={x:t.segpts[g+2],y:t.segpts[g+3]};t.midX=w.x,t.midY=w.y,t.midVector=[w.y-E.y,E.x-w.x]}else{var k=[w.x-_.cx,w.y-_.cy],I=_.radius/Math.sqrt(Math.pow(k[0],2)+Math.pow(k[1],2));k=k.map(function(C){return C*I}),t.midX=_.cx+k[0],t.midY=_.cy+k[1],t.midVector=k}}}}},no.checkForInvalidEdgeWarning=function(r){var t=r[0]._private.rscratch;t.nodesOverlap||Ft(t.startX)&&Ft(t.startY)&&Ft(t.endX)&&Ft(t.endY)?t.loggedErr=!1:t.loggedErr||(t.loggedErr=!0,Hr("Edge `"+r.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."))},no.findEdgeControlPoints=function(r){var t=this;if(!(!r||r.length===0)){for(var i=this,a=i.cy,u=a.hasCompoundNodes(),c=new sh,l=function($,Y){return[].concat(Tx($),[Y?1:0]).join("-")},h=[],v=[],p=0;p<r.length;p++){var g=r[p],w=g._private,_=g.pstyle("curve-style").value;if(!(g.removed()||!g.takesUpSpace())){if(_==="haystack"){v.push(g);continue}var E=_==="unbundled-bezier"||Ed(_,"segments")||_==="straight"||_==="straight-triangle"||Ed(_,"taxi"),k=_==="unbundled-bezier"||_==="bezier",I=w.source,C=w.target,P=I.poolIndex(),A=C.poolIndex(),L=[P,A].sort(),O=l(L,E),M=c.get(O);M==null&&(M={eles:[]},h.push({pairId:L,edgeIsUnbundled:E}),c.set(O,M)),M.eles.push(g),E&&(M.hasUnbundled=!0),k&&(M.hasBezier=!0)}}for(var B=function(){var $=h[F],Y=$.pairId,V=$.edgeIsUnbundled,U=l(Y,V),G=c.get(U),X;if(!G.hasUnbundled){var ne=G.eles[0].parallelEdges().filter(function(Le){return Le.isBundledBezier()});EC(G.eles),ne.forEach(function(Le){return G.eles.push(Le)}),G.eles.sort(function(Le,Te){return Le.poolIndex()-Te.poolIndex()})}var ae=G.eles[0],oe=ae.source(),le=ae.target();if(oe.poolIndex()>le.poolIndex()){var pe=oe;oe=le,le=pe}var ge=G.srcPos=oe.position(),de=G.tgtPos=le.position(),Se=G.srcW=oe.outerWidth(),Ne=G.srcH=oe.outerHeight(),ye=G.tgtW=le.outerWidth(),we=G.tgtH=le.outerHeight(),Pe=G.srcShape=i.nodeShapes[t.getNodeShape(oe)],Fe=G.tgtShape=i.nodeShapes[t.getNodeShape(le)],Ue=G.srcCornerRadius=oe.pstyle("corner-radius").value==="auto"?"auto":oe.pstyle("corner-radius").pfValue,He=G.tgtCornerRadius=le.pstyle("corner-radius").value==="auto"?"auto":le.pstyle("corner-radius").pfValue,De=G.tgtRs=le._private.rscratch,Ce=G.srcRs=oe._private.rscratch;G.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var Be=0;Be<G.eles.length;Be++){var ve=G.eles[Be],ke=ve[0]._private.rscratch,je=ve.pstyle("curve-style").value,qe=je==="unbundled-bezier"||Ed(je,"segments")||Ed(je,"taxi"),Me=!oe.same(ve.source());if(!G.calculatedIntersection&&oe!==le&&(G.hasBezier||G.hasUnbundled)){G.calculatedIntersection=!0;var ot=Pe.intersectLine(ge.x,ge.y,Se,Ne,de.x,de.y,0,Ue,Ce),dt=G.srcIntn=ot,pt=Fe.intersectLine(de.x,de.y,ye,we,ge.x,ge.y,0,He,De),Lt=G.tgtIntn=pt,ut=G.intersectionPts={x1:ot[0],x2:pt[0],y1:ot[1],y2:pt[1]},$t=G.posPts={x1:ge.x,x2:de.x,y1:ge.y,y2:de.y},Yt=pt[1]-ot[1],fn=pt[0]-ot[0],Yn=Math.sqrt(fn*fn+Yt*Yt);Ft(Yn)&&Yn>=x1e||(Yn=Math.sqrt(Math.max(fn*fn,L1)+Math.max(Yt*Yt,L1)));var he=G.vector={x:fn,y:Yt},J=G.vectorNorm={x:he.x/Yn,y:he.y/Yn},te={x:-J.y,y:J.x};G.nodesOverlap=!Ft(Yn)||Fe.checkPoint(ot[0],ot[1],0,ye,we,de.x,de.y,He,De)||Pe.checkPoint(pt[0],pt[1],0,Se,Ne,ge.x,ge.y,Ue,Ce),G.vectorNormInverse=te,X={nodesOverlap:G.nodesOverlap,dirCounts:G.dirCounts,calculatedIntersection:!0,hasBezier:G.hasBezier,hasUnbundled:G.hasUnbundled,eles:G.eles,srcPos:de,srcRs:De,tgtPos:ge,tgtRs:Ce,srcW:ye,srcH:we,tgtW:Se,tgtH:Ne,srcIntn:Lt,tgtIntn:dt,srcShape:Fe,tgtShape:Pe,posPts:{x1:$t.x2,y1:$t.y2,x2:$t.x1,y2:$t.y1},intersectionPts:{x1:ut.x2,y1:ut.y2,x2:ut.x1,y2:ut.y1},vector:{x:-he.x,y:-he.y},vectorNorm:{x:-J.x,y:-J.y},vectorNormInverse:{x:-te.x,y:-te.y}}}var be=Me?X:G;ke.nodesOverlap=be.nodesOverlap,ke.srcIntn=be.srcIntn,ke.tgtIntn=be.tgtIntn,ke.isRound=je.startsWith("round"),u&&(oe.isParent()||oe.isChild()||le.isParent()||le.isChild())&&(oe.parents().anySame(le)||le.parents().anySame(oe)||oe.same(le)&&oe.isParent())?t.findCompoundLoopPoints(ve,be,Be,qe):oe===le?t.findLoopPoints(ve,be,Be,qe):je.endsWith("segments")?t.findSegmentsPoints(ve,be):je.endsWith("taxi")?t.findTaxiPoints(ve,be):je==="straight"||!qe&&G.eles.length%2===1&&Be===Math.floor(G.eles.length/2)?t.findStraightEdgePoints(ve):t.findBezierPoints(ve,be,Be,qe,Me),t.findEndpoints(ve),t.tryToCorrectInvalidPoints(ve,be),t.checkForInvalidEdgeWarning(ve),t.storeAllpts(ve),t.storeEdgeProjections(ve),t.calculateArrowAngles(ve),t.recalculateEdgeLabelProjections(ve),t.calculateLabelAngles(ve)}},F=0;F<h.length;F++)B();this.findHaystackPoints(v)}};function JG(r){var t=[];if(r!=null){for(var i=0;i<r.length;i+=2){var a=r[i],u=r[i+1];t.push({x:a,y:u})}return t}}no.getSegmentPoints=function(r){var t=r[0]._private.rscratch;this.recalculateRenderedStyle(r);var i=t.edgeType;if(i==="segments")return JG(t.segpts)},no.getControlPoints=function(r){var t=r[0]._private.rscratch;this.recalculateRenderedStyle(r);var i=t.edgeType;if(i==="bezier"||i==="multibezier"||i==="self"||i==="compound")return JG(t.ctrlpts)},no.getEdgeMidpoint=function(r){var t=r[0]._private.rscratch;return this.recalculateRenderedStyle(r),{x:t.midX,y:t.midY}};var N1={};N1.manualEndptToPx=function(r,t){var i=this,a=r.position(),u=r.outerWidth(),c=r.outerHeight(),l=r._private.rscratch;if(t.value.length===2){var h=[t.pfValue[0],t.pfValue[1]];return t.units[0]==="%"&&(h[0]=h[0]*u),t.units[1]==="%"&&(h[1]=h[1]*c),h[0]+=a.x,h[1]+=a.y,h}else{var v=t.pfValue[0];v=-Math.PI/2+v;var p=2*Math.max(u,c),g=[a.x+Math.cos(v)*p,a.y+Math.sin(v)*p];return i.nodeShapes[this.getNodeShape(r)].intersectLine(a.x,a.y,u,c,g[0],g[1],0,r.pstyle("corner-radius").value==="auto"?"auto":r.pstyle("corner-radius").pfValue,l)}},N1.findEndpoints=function(r){var t,i,a,u,c=this,l,h=r.source()[0],v=r.target()[0],p=h.position(),g=v.position(),w=r.pstyle("target-arrow-shape").value,_=r.pstyle("source-arrow-shape").value,E=r.pstyle("target-distance-from-node").pfValue,k=r.pstyle("source-distance-from-node").pfValue,I=h._private.rscratch,C=v._private.rscratch,P=r.pstyle("curve-style").value,A=r._private.rscratch,L=A.edgeType,O=Ed(P,"taxi"),M=L==="self"||L==="compound",B=L==="bezier"||L==="multibezier"||M,F=L!=="bezier",q=L==="straight"||L==="segments",$=L==="segments",Y=B||F||q,V=M||O,U=r.pstyle("source-endpoint"),G=V?"outside-to-node":U.value,X=h.pstyle("corner-radius").value==="auto"?"auto":h.pstyle("corner-radius").pfValue,ne=r.pstyle("target-endpoint"),ae=V?"outside-to-node":ne.value,oe=v.pstyle("corner-radius").value==="auto"?"auto":v.pstyle("corner-radius").pfValue;A.srcManEndpt=U,A.tgtManEndpt=ne;var le,pe,ge,de,Se=(t=(ne==null||(i=ne.pfValue)===null||i===void 0?void 0:i.length)===2?ne.pfValue:null)!==null&&t!==void 0?t:[0,0],Ne=(a=(U==null||(u=U.pfValue)===null||u===void 0?void 0:u.length)===2?U.pfValue:null)!==null&&a!==void 0?a:[0,0];if(B){var ye=[A.ctrlpts[0],A.ctrlpts[1]],we=F?[A.ctrlpts[A.ctrlpts.length-2],A.ctrlpts[A.ctrlpts.length-1]]:ye;le=we,pe=ye}else if(q){var Pe=$?A.segpts.slice(0,2):[g.x+Se[0],g.y+Se[1]],Fe=$?A.segpts.slice(A.segpts.length-2):[p.x+Ne[0],p.y+Ne[1]];le=Fe,pe=Pe}if(ae==="inside-to-node")l=[g.x,g.y];else if(ne.units)l=this.manualEndptToPx(v,ne);else if(ae==="outside-to-line")l=A.tgtIntn;else if(ae==="outside-to-node"||ae==="outside-to-node-or-label"?ge=le:(ae==="outside-to-line"||ae==="outside-to-line-or-label")&&(ge=[p.x,p.y]),l=c.nodeShapes[this.getNodeShape(v)].intersectLine(g.x,g.y,v.outerWidth(),v.outerHeight(),ge[0],ge[1],0,oe,C),ae==="outside-to-node-or-label"||ae==="outside-to-line-or-label"){var Ue=v._private.rscratch,He=Ue.labelWidth,De=Ue.labelHeight,Ce=Ue.labelX,Be=Ue.labelY,ve=He/2,ke=De/2,je=v.pstyle("text-valign").value;je==="top"?Be-=ke:je==="bottom"&&(Be+=ke);var qe=v.pstyle("text-halign").value;qe==="left"?Ce-=ve:qe==="right"&&(Ce+=ve);var Me=m1(ge[0],ge[1],[Ce-ve,Be-ke,Ce+ve,Be-ke,Ce+ve,Be+ke,Ce-ve,Be+ke],g.x,g.y);if(Me.length>0){var ot=p,dt=op(ot,lb(l)),pt=op(ot,lb(Me)),Lt=dt;if(pt<dt&&(l=Me,Lt=pt),Me.length>2){var ut=op(ot,{x:Me[2],y:Me[3]});ut<Lt&&(l=[Me[2],Me[3]])}}}var $t=Gx(l,le,c.arrowShapes[w].spacing(r)+E),Yt=Gx(l,le,c.arrowShapes[w].gap(r)+E);if(A.endX=Yt[0],A.endY=Yt[1],A.arrowEndX=$t[0],A.arrowEndY=$t[1],G==="inside-to-node")l=[p.x,p.y];else if(U.units)l=this.manualEndptToPx(h,U);else if(G==="outside-to-line")l=A.srcIntn;else if(G==="outside-to-node"||G==="outside-to-node-or-label"?de=pe:(G==="outside-to-line"||G==="outside-to-line-or-label")&&(de=[g.x,g.y]),l=c.nodeShapes[this.getNodeShape(h)].intersectLine(p.x,p.y,h.outerWidth(),h.outerHeight(),de[0],de[1],0,X,I),G==="outside-to-node-or-label"||G==="outside-to-line-or-label"){var fn=h._private.rscratch,Yn=fn.labelWidth,he=fn.labelHeight,J=fn.labelX,te=fn.labelY,be=Yn/2,Le=he/2,Te=h.pstyle("text-valign").value;Te==="top"?te-=Le:Te==="bottom"&&(te+=Le);var ue=h.pstyle("text-halign").value;ue==="left"?J-=be:ue==="right"&&(J+=be);var $e=m1(de[0],de[1],[J-be,te-Le,J+be,te-Le,J+be,te+Le,J-be,te+Le],p.x,p.y);if($e.length>0){var Ze=g,et=op(Ze,lb(l)),it=op(Ze,lb($e)),St=et;if(it<et&&(l=[$e[0],$e[1]],St=it),$e.length>2){var bt=op(Ze,{x:$e[2],y:$e[3]});bt<St&&(l=[$e[2],$e[3]])}}}var tn=Gx(l,pe,c.arrowShapes[_].spacing(r)+k),Wt=Gx(l,pe,c.arrowShapes[_].gap(r)+k);A.startX=Wt[0],A.startY=Wt[1],A.arrowStartX=tn[0],A.arrowStartY=tn[1],Y&&(!Ft(A.startX)||!Ft(A.startY)||!Ft(A.endX)||!Ft(A.endY)?A.badLine=!0:A.badLine=!1)},N1.getSourceEndpoint=function(r){var t=r[0]._private.rscratch;switch(this.recalculateRenderedStyle(r),t.edgeType){case"haystack":return{x:t.haystackPts[0],y:t.haystackPts[1]};default:return{x:t.arrowStartX,y:t.arrowStartY}}},N1.getTargetEndpoint=function(r){var t=r[0]._private.rscratch;switch(this.recalculateRenderedStyle(r),t.edgeType){case"haystack":return{x:t.haystackPts[2],y:t.haystackPts[3]};default:return{x:t.arrowEndX,y:t.arrowEndY}}};var sP={};function E1e(r,t,i){for(var a=function(p,g,w,_){return ms(p,g,w,_)},u=t._private,c=u.rstyle.bezierPts,l=0;l<r.bezierProjPcts.length;l++){var h=r.bezierProjPcts[l];c.push({x:a(i[0],i[2],i[4],h),y:a(i[1],i[3],i[5],h)})}}sP.storeEdgeProjections=function(r){var t=r._private,i=t.rscratch,a=i.edgeType;if(t.rstyle.bezierPts=null,t.rstyle.linePts=null,t.rstyle.haystackPts=null,a==="multibezier"||a==="bezier"||a==="self"||a==="compound"){t.rstyle.bezierPts=[];for(var u=0;u+5<i.allpts.length;u+=4)E1e(this,r,i.allpts.slice(u,u+6))}else if(a==="segments")for(var c=t.rstyle.linePts=[],u=0;u+1<i.allpts.length;u+=2)c.push({x:i.allpts[u],y:i.allpts[u+1]});else if(a==="haystack"){var l=i.haystackPts;t.rstyle.haystackPts=[{x:l[0],y:l[1]},{x:l[2],y:l[3]}]}t.rstyle.arrowWidth=this.getArrowWidth(r.pstyle("width").pfValue,r.pstyle("arrow-scale").value)*this.arrowShapeWidth},sP.recalculateEdgeProjections=function(r){this.findEdgeControlPoints(r)};var Wl={};Wl.recalculateNodeLabelProjection=function(r){var t=r.pstyle("label").strValue;if(!xd(t)){var i,a,u=r._private,c=r.width(),l=r.height(),h=r.padding(),v=r.position(),p=r.pstyle("text-halign").strValue,g=r.pstyle("text-valign").strValue,w=u.rscratch,_=u.rstyle;switch(p){case"left":i=v.x-c/2-h;break;case"right":i=v.x+c/2+h;break;default:i=v.x}switch(g){case"top":a=v.y-l/2-h;break;case"bottom":a=v.y+l/2+h;break;default:a=v.y}w.labelX=i,w.labelY=a,_.labelX=i,_.labelY=a,this.calculateLabelAngles(r),this.applyLabelDimensions(r)}};var QG=function(t,i){var a=Math.atan(i/t);return t===0&&a<0&&(a=a*-1),a},ZG=function(t,i){var a=i.x-t.x,u=i.y-t.y;return QG(a,u)},k1e=function(t,i,a,u){var c=b1(0,u-.001,1),l=b1(0,u+.001,1),h=fb(t,i,a,c),v=fb(t,i,a,l);return ZG(h,v)};Wl.recalculateEdgeLabelProjections=function(r){var t,i=r._private,a=i.rscratch,u=this,c={mid:r.pstyle("label").strValue,source:r.pstyle("source-label").strValue,target:r.pstyle("target-label").strValue};if(c.mid||c.source||c.target){t={x:a.midX,y:a.midY};var l=function(w,_,E){ah(i.rscratch,w,_,E),ah(i.rstyle,w,_,E)};l("labelX",null,t.x),l("labelY",null,t.y);var h=QG(a.midDispX,a.midDispY);l("labelAutoAngle",null,h);var v=function(){if(v.cache)return v.cache;for(var w=[],_=0;_+5<a.allpts.length;_+=4){var E={x:a.allpts[_],y:a.allpts[_+1]},k={x:a.allpts[_+2],y:a.allpts[_+3]},I={x:a.allpts[_+4],y:a.allpts[_+5]};w.push({p0:E,p1:k,p2:I,startDist:0,length:0,segments:[]})}var C=i.rstyle.bezierPts,P=u.bezierProjPcts.length;function A(F,q,$,Y,V){var U=sp(q,$),G=F.segments[F.segments.length-1],X={p0:q,p1:$,t0:Y,t1:V,startDist:G?G.startDist+G.length:0,length:U};F.segments.push(X),F.length+=U}for(var L=0;L<w.length;L++){var O=w[L],M=w[L-1];M&&(O.startDist=M.startDist+M.length),A(O,O.p0,C[L*P],0,u.bezierProjPcts[0]);for(var B=0;B<P-1;B++)A(O,C[L*P+B],C[L*P+B+1],u.bezierProjPcts[B],u.bezierProjPcts[B+1]);A(O,C[L*P+P-1],O.p2,u.bezierProjPcts[P-1],1)}return v.cache=w},p=function(w){var _,E=w==="source";if(c[w]){var k=r.pstyle(w+"-text-offset").pfValue;switch(a.edgeType){case"self":case"compound":case"bezier":case"multibezier":{for(var I=v(),C,P=0,A=0,L=0;L<I.length;L++){for(var O=I[E?L:I.length-1-L],M=0;M<O.segments.length;M++){var B=O.segments[E?M:O.segments.length-1-M],F=L===I.length-1&&M===O.segments.length-1;if(P=A,A+=B.length,A>=k||F){C={cp:O,segment:B};break}}if(C)break}var q=C.cp,$=C.segment,Y=(k-P)/$.length,V=$.t1-$.t0,U=E?$.t0+V*Y:$.t1-V*Y;U=b1(0,U,1),t=fb(q.p0,q.p1,q.p2,U),_=k1e(q.p0,q.p1,q.p2,U);break}case"straight":case"segments":case"haystack":{for(var G=0,X,ne,ae,oe,le=a.allpts.length,pe=0;pe+3<le&&(E?(ae={x:a.allpts[pe],y:a.allpts[pe+1]},oe={x:a.allpts[pe+2],y:a.allpts[pe+3]}):(ae={x:a.allpts[le-2-pe],y:a.allpts[le-1-pe]},oe={x:a.allpts[le-4-pe],y:a.allpts[le-3-pe]}),X=sp(ae,oe),ne=G,G+=X,!(G>=k));pe+=2);var ge=k-ne,de=ge/X;de=b1(0,de,1),t=Uge(ae,oe,de),_=ZG(ae,oe);break}}l("labelX",w,t.x),l("labelY",w,t.y),l("labelAutoAngle",w,_)}};p("source"),p("target"),this.applyLabelDimensions(r)}},Wl.applyLabelDimensions=function(r){this.applyPrefixedLabelDimensions(r),r.isEdge()&&(this.applyPrefixedLabelDimensions(r,"source"),this.applyPrefixedLabelDimensions(r,"target"))},Wl.applyPrefixedLabelDimensions=function(r,t){var i=r._private,a=this.getLabelText(r,t),u=ap(a,r._private.labelDimsKey);if(eu(i.rscratch,"prefixedLabelDimsKey",t)!==u){ah(i.rscratch,"prefixedLabelDimsKey",t,u);var c=this.calculateLabelDimensions(r,a),l=r.pstyle("line-height").pfValue,h=r.pstyle("text-wrap").strValue,v=eu(i.rscratch,"labelWrapCachedLines",t)||[],p=h!=="wrap"?1:Math.max(v.length,1),g=c.height/p,w=g*l,_=c.width,E=c.height+(p-1)*(l-1)*g;ah(i.rstyle,"labelWidth",t,_),ah(i.rscratch,"labelWidth",t,_),ah(i.rstyle,"labelHeight",t,E),ah(i.rscratch,"labelHeight",t,E),ah(i.rscratch,"labelLineHeight",t,w)}},Wl.getLabelText=function(r,t){var i=r._private,a=t?t+"-":"",u=r.pstyle(a+"label").strValue,c=r.pstyle("text-transform").value,l=function(Ne,ye){return ye?(ah(i.rscratch,Ne,t,ye),ye):eu(i.rscratch,Ne,t)};if(!u)return"";c=="none"||(c=="uppercase"?u=u.toUpperCase():c=="lowercase"&&(u=u.toLowerCase()));var h=r.pstyle("text-wrap").value;if(h==="wrap"){var v=l("labelKey");if(v!=null&&l("labelWrapKey")===v)return l("labelWrapCachedText");for(var p="​",g=u.split(`
15
+ `),w=r.pstyle("text-max-width").pfValue,_=r.pstyle("text-overflow-wrap").value,E=_==="anywhere",k=[],I=/[\s\u200b]+|$/g,C=0;C<g.length;C++){var P=g[C],A=this.calculateLabelDimensions(r,P),L=A.width;if(E){var O=P.split("").join(p);P=O}if(L>w){var M=P.matchAll(I),B="",F=0,q=Zo(M),$;try{for(q.s();!($=q.n()).done;){var Y=$.value,V=Y[0],U=P.substring(F,Y.index);F=Y.index+V.length;var G=B.length===0?U:B+U+V,X=this.calculateLabelDimensions(r,G),ne=X.width;ne<=w?B+=U+V:(B&&k.push(B),B=U+V)}}catch(Se){q.e(Se)}finally{q.f()}B.match(/^[\s\u200b]+$/)||k.push(B)}else k.push(P)}l("labelWrapCachedLines",k),u=l("labelWrapCachedText",k.join(`
16
+ `)),l("labelWrapKey",v)}else if(h==="ellipsis"){var ae=r.pstyle("text-max-width").pfValue,oe="",le="…",pe=!1;if(this.calculateLabelDimensions(r,u).width<ae)return u;for(var ge=0;ge<u.length;ge++){var de=this.calculateLabelDimensions(r,oe+u[ge]+le).width;if(de>ae)break;oe+=u[ge],ge===u.length-1&&(pe=!0)}return pe||(oe+=le),oe}return u},Wl.getLabelJustification=function(r){var t=r.pstyle("text-justification").strValue,i=r.pstyle("text-halign").strValue;if(t==="auto")if(r.isNode())switch(i){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return t},Wl.calculateLabelDimensions=function(r,t){var i=this,a=i.cy.window(),u=a.document,c=0,l=r.pstyle("font-style").strValue,h=r.pstyle("font-size").pfValue,v=r.pstyle("font-family").strValue,p=r.pstyle("font-weight").strValue,g=this.labelCalcCanvas,w=this.labelCalcCanvasContext;if(!g){g=this.labelCalcCanvas=u.createElement("canvas"),w=this.labelCalcCanvasContext=g.getContext("2d");var _=g.style;_.position="absolute",_.left="-9999px",_.top="-9999px",_.zIndex="-1",_.visibility="hidden",_.pointerEvents="none"}w.font="".concat(l," ").concat(p," ").concat(h,"px ").concat(v);for(var E=0,k=0,I=t.split(`
17
+ `),C=0;C<I.length;C++){var P=I[C],A=w.measureText(P),L=Math.ceil(A.width),O=h;E=Math.max(L,E),k+=O}return E+=c,k+=c,{width:E,height:k}},Wl.calculateLabelAngle=function(r,t){var i=r._private,a=i.rscratch,u=r.isEdge(),c=t?t+"-":"",l=r.pstyle(c+"text-rotation"),h=l.strValue;return h==="none"?0:u&&h==="autorotate"?a.labelAutoAngle:h==="autorotate"?0:l.pfValue},Wl.calculateLabelAngles=function(r){var t=this,i=r.isEdge(),a=r._private,u=a.rscratch;u.labelAngle=t.calculateLabelAngle(r),i&&(u.sourceLabelAngle=t.calculateLabelAngle(r,"source"),u.targetLabelAngle=t.calculateLabelAngle(r,"target"))};var eH={},tH=28,nH=!1;eH.getNodeShape=function(r){var t=this,i=r.pstyle("shape").value;if(i==="cutrectangle"&&(r.width()<tH||r.height()<tH))return nH||(Hr("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),nH=!0),"rectangle";if(r.isParent())return i==="rectangle"||i==="roundrectangle"||i==="round-rectangle"||i==="cutrectangle"||i==="cut-rectangle"||i==="barrel"?i:"rectangle";if(i==="polygon"){var a=r.pstyle("shape-polygon-points").value;return t.nodeShapes.makePolygon(a).name}return i};var m2={};m2.registerCalculationListeners=function(){var r=this.cy,t=r.collection(),i=this,a=function(l){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(t.merge(l),h)for(var v=0;v<l.length;v++){var p=l[v],g=p._private,w=g.rstyle;w.clean=!1,w.cleanConnected=!1}};i.binder(r).on("bounds.* dirty.*",function(l){var h=l.target;a(h)}).on("style.* background.*",function(l){var h=l.target;a(h,!1)});var u=function(l){if(l){var h=i.onUpdateEleCalcsFns;t.cleanStyle();for(var v=0;v<t.length;v++){var p=t[v],g=p._private.rstyle;p.isNode()&&!g.cleanConnected&&(a(p.connectedEdges()),g.cleanConnected=!0)}if(h)for(var w=0;w<h.length;w++){var _=h[w];_(l,t)}i.recalculateRenderedStyle(t),t=r.collection()}};i.flushRenderedStyleQueue=function(){u(!0)},i.beforeRender(u,i.beforeRenderPriorities.eleCalcs)},m2.onUpdateEleCalcs=function(r){var t=this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[];t.push(r)},m2.recalculateRenderedStyle=function(r,t){var i=function(O){return O._private.rstyle.cleanConnected};if(r.length!==0){var a=[],u=[];if(!this.destroyed){t===void 0&&(t=!0);for(var c=0;c<r.length;c++){var l=r[c],h=l._private,v=h.rstyle;l.isEdge()&&(!i(l.source())||!i(l.target()))&&(v.clean=!1),l.isEdge()&&l.isBundledBezier()&&l.parallelEdges().some(function(L){return!L._private.rstyle.clean&&L.isBundledBezier()})&&(v.clean=!1),!(t&&v.clean||l.removed())&&l.pstyle("display").value!=="none"&&(h.group==="nodes"?u.push(l):a.push(l),v.clean=!0)}for(var p=0;p<u.length;p++){var g=u[p],w=g._private,_=w.rstyle,E=g.position();this.recalculateNodeLabelProjection(g),_.nodeX=E.x,_.nodeY=E.y,_.nodeW=g.pstyle("width").pfValue,_.nodeH=g.pstyle("height").pfValue}this.recalculateEdgeProjections(a);for(var k=0;k<a.length;k++){var I=a[k],C=I._private,P=C.rstyle,A=C.rscratch;P.srcX=A.arrowStartX,P.srcY=A.arrowStartY,P.tgtX=A.arrowEndX,P.tgtY=A.arrowEndY,P.midX=A.midX,P.midY=A.midY,P.labelAngle=A.labelAngle,P.sourceLabelAngle=A.sourceLabelAngle,P.targetLabelAngle=A.targetLabelAngle}}}};var w2={};w2.updateCachedGrabbedEles=function(){var r=this.cachedZSortedEles;if(r){r.drag=[],r.nondrag=[];for(var t=[],i=0;i<r.length;i++){var a=r[i],u=a._private.rscratch;a.grabbed()&&!a.isParent()?t.push(a):u.inDragLayer?r.drag.push(a):r.nondrag.push(a)}for(var i=0;i<t.length;i++){var a=t[i];r.drag.push(a)}}},w2.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null},w2.getCachedZSortedEles=function(r){if(r||!this.cachedZSortedEles){var t=this.cy.mutableElements().toArray();t.sort(gG),t.interactive=t.filter(function(i){return i.interactive()}),this.cachedZSortedEles=t,this.updateCachedGrabbedEles()}else t=this.cachedZSortedEles;return t};var rH={};[fp,g2,no,N1,sP,Wl,eH,m2,w2].forEach(function(r){yn(rH,r)});var iH={};iH.getCachedImage=function(r,t,i){var a=this,u=a.imageCache=a.imageCache||{},c=u[r];if(c)return c.image.complete||c.image.addEventListener("load",i),c.image;c=u[r]=u[r]||{};var l=c.image=new Image;l.addEventListener("load",i),l.addEventListener("error",function(){l.error=!0});var h="data:",v=r.substring(0,h.length).toLowerCase()===h;return v||(t=t==="null"?null:t,l.crossOrigin=t),l.src=r,l};var Tb={};Tb.registerBinding=function(r,t,i,a){var u=Array.prototype.slice.apply(arguments,[1]);if(Array.isArray(r)){for(var c=[],l=0;l<r.length;l++){var h=r[l];if(h!==void 0){var v=this.binder(h);c.push(v.on.apply(v,u))}}return c}var v=this.binder(r);return v.on.apply(v,u)},Tb.binder=function(r){var t=this,i=t.cy.window(),a=r===i||r===i.document||r===i.document.body||Mpe(r);if(t.supportsPassiveEvents==null){var u=!1;try{var c=Object.defineProperty({},"passive",{get:function(){return u=!0,!0}});i.addEventListener("test",null,c)}catch{}t.supportsPassiveEvents=u}var l=function(v,p,g){var w=Array.prototype.slice.call(arguments);return a&&t.supportsPassiveEvents&&(w[2]={capture:g??!1,passive:!1,once:!1}),t.bindings.push({target:r,args:w}),(r.addEventListener||r.on).apply(r,w),this};return{on:l,addEventListener:l,addListener:l,bind:l}},Tb.nodeIsDraggable=function(r){return r&&r.isNode()&&!r.locked()&&r.grabbable()},Tb.nodeIsGrabbable=function(r){return this.nodeIsDraggable(r)&&r.interactive()},Tb.load=function(){var r=this,t=r.cy.window(),i=function(ue){return ue.selected()},a=function(ue){var $e=ue.getRootNode();if($e&&$e.nodeType===11&&$e.host!==void 0)return $e},u=function(ue,$e,Ze,et){ue==null&&(ue=r.cy);for(var it=0;it<$e.length;it++){var St=$e[it];ue.emit({originalEvent:Ze,type:St,position:et})}},c=function(ue){return ue.shiftKey||ue.metaKey||ue.ctrlKey},l=function(ue,$e){var Ze=!0;if(r.cy.hasCompoundNodes()&&ue&&ue.pannable())for(var et=0;$e&&et<$e.length;et++){var ue=$e[et];if(ue.isNode()&&ue.isParent()&&!ue.pannable()){Ze=!1;break}}else Ze=!0;return Ze},h=function(ue){ue[0]._private.grabbed=!0},v=function(ue){ue[0]._private.grabbed=!1},p=function(ue){ue[0]._private.rscratch.inDragLayer=!0},g=function(ue){ue[0]._private.rscratch.inDragLayer=!1},w=function(ue){ue[0]._private.rscratch.isGrabTarget=!0},_=function(ue){ue[0]._private.rscratch.isGrabTarget=!1},E=function(ue,$e){var Ze=$e.addToList,et=Ze.has(ue);!et&&ue.grabbable()&&!ue.locked()&&(Ze.merge(ue),h(ue))},k=function(ue,$e){if(ue.cy().hasCompoundNodes()&&!($e.inDragLayer==null&&$e.addToList==null)){var Ze=ue.descendants();$e.inDragLayer&&(Ze.forEach(p),Ze.connectedEdges().forEach(p)),$e.addToList&&E(Ze,$e)}},I=function(ue,$e){$e=$e||{};var Ze=ue.cy().hasCompoundNodes();$e.inDragLayer&&(ue.forEach(p),ue.neighborhood().stdFilter(function(et){return!Ze||et.isEdge()}).forEach(p)),$e.addToList&&ue.forEach(function(et){E(et,$e)}),k(ue,$e),A(ue,{inDragLayer:$e.inDragLayer}),r.updateCachedGrabbedEles()},C=I,P=function(ue){ue&&(r.getCachedZSortedEles().forEach(function($e){v($e),g($e),_($e)}),r.updateCachedGrabbedEles())},A=function(ue,$e){if(!($e.inDragLayer==null&&$e.addToList==null)&&ue.cy().hasCompoundNodes()){var Ze=ue.ancestors().orphans();if(!Ze.same(ue)){var et=Ze.descendants().spawnSelf().merge(Ze).unmerge(ue).unmerge(ue.descendants()),it=et.connectedEdges();$e.inDragLayer&&(it.forEach(p),et.forEach(p)),$e.addToList&&et.forEach(function(St){E(St,$e)})}}},L=function(){document.activeElement!=null&&document.activeElement.blur!=null&&document.activeElement.blur()},O=typeof MutationObserver<"u",M=typeof ResizeObserver<"u";O?(r.removeObserver=new MutationObserver(function(Te){for(var ue=0;ue<Te.length;ue++){var $e=Te[ue],Ze=$e.removedNodes;if(Ze)for(var et=0;et<Ze.length;et++){var it=Ze[et];if(it===r.container){r.destroy();break}}}}),r.container.parentNode&&r.removeObserver.observe(r.container.parentNode,{childList:!0})):r.registerBinding(r.container,"DOMNodeRemoved",function(Te){r.destroy()});var B=h1(function(){r.cy.resize()},100);O&&(r.styleObserver=new MutationObserver(B),r.styleObserver.observe(r.container,{attributes:!0})),r.registerBinding(t,"resize",B),M&&(r.resizeObserver=new ResizeObserver(B),r.resizeObserver.observe(r.container));var F=function(ue,$e){for(;ue!=null;)$e(ue),ue=ue.parentNode},q=function(){r.invalidateContainerClientCoordsCache()};F(r.container,function(Te){r.registerBinding(Te,"transitionend",q),r.registerBinding(Te,"animationend",q),r.registerBinding(Te,"scroll",q)}),r.registerBinding(r.container,"contextmenu",function(Te){Te.preventDefault()});var $=function(){return r.selection[4]!==0},Y=function(ue){for(var $e=r.findContainerClientCoords(),Ze=$e[0],et=$e[1],it=$e[2],St=$e[3],bt=ue.touches?ue.touches:[ue],tn=!1,Wt=0;Wt<bt.length;Wt++){var cn=bt[Wt];if(Ze<=cn.clientX&&cn.clientX<=Ze+it&&et<=cn.clientY&&cn.clientY<=et+St){tn=!0;break}}if(!tn)return!1;for(var Wn=r.container,Fn=ue.target,Qt=Fn.parentNode,Kn=!1;Qt;){if(Qt===Wn){Kn=!0;break}Qt=Qt.parentNode}return!!Kn};r.registerBinding(r.container,"mousedown",function(ue){if(Y(ue)&&!(r.hoverData.which===1&&ue.which!==1)){ue.preventDefault(),L(),r.hoverData.capture=!0,r.hoverData.which=ue.which;var $e=r.cy,Ze=[ue.clientX,ue.clientY],et=r.projectIntoViewport(Ze[0],Ze[1]),it=r.selection,St=r.findNearestElements(et[0],et[1],!0,!1),bt=St[0],tn=r.dragData.possibleDragElements;r.hoverData.mdownPos=et,r.hoverData.mdownGPos=Ze;var Wt=function(me){return{originalEvent:ue,type:me,position:{x:et[0],y:et[1]}}},cn=function(){r.hoverData.tapholdCancelled=!1,clearTimeout(r.hoverData.tapholdTimeout),r.hoverData.tapholdTimeout=setTimeout(function(){if(!r.hoverData.tapholdCancelled){var me=r.hoverData.down;me?me.emit(Wt("taphold")):$e.emit(Wt("taphold"))}},r.tapholdDuration)};if(ue.which==3){r.hoverData.cxtStarted=!0;var Wn={originalEvent:ue,type:"cxttapstart",position:{x:et[0],y:et[1]}};bt?(bt.activate(),bt.emit(Wn),r.hoverData.down=bt):$e.emit(Wn),r.hoverData.downTime=new Date().getTime(),r.hoverData.cxtDragged=!1}else if(ue.which==1){bt&&bt.activate();{if(bt!=null&&r.nodeIsGrabbable(bt)){var Fn=function(me){me.emit(Wt("grab"))};if(w(bt),!bt.selected())tn=r.dragData.possibleDragElements=$e.collection(),C(bt,{addToList:tn}),bt.emit(Wt("grabon")).emit(Wt("grab"));else{tn=r.dragData.possibleDragElements=$e.collection();var Qt=$e.$(function(Kn){return Kn.isNode()&&Kn.selected()&&r.nodeIsGrabbable(Kn)});I(Qt,{addToList:tn}),bt.emit(Wt("grabon")),Qt.forEach(Fn)}r.redrawHint("eles",!0),r.redrawHint("drag",!0)}r.hoverData.down=bt,r.hoverData.downs=St,r.hoverData.downTime=new Date().getTime()}u(bt,["mousedown","tapstart","vmousedown"],ue,{x:et[0],y:et[1]}),bt==null?(it[4]=1,r.data.bgActivePosistion={x:et[0],y:et[1]},r.redrawHint("select",!0),r.redraw()):bt.pannable()&&(it[4]=1),cn()}it[0]=it[2]=et[0],it[1]=it[3]=et[1]}},!1);var V=a(r.container);r.registerBinding([t,V],"mousemove",function(ue){var $e=r.hoverData.capture;if(!(!$e&&!Y(ue))){var Ze=!1,et=r.cy,it=et.zoom(),St=[ue.clientX,ue.clientY],bt=r.projectIntoViewport(St[0],St[1]),tn=r.hoverData.mdownPos,Wt=r.hoverData.mdownGPos,cn=r.selection,Wn=null;!r.hoverData.draggingEles&&!r.hoverData.dragging&&!r.hoverData.selecting&&(Wn=r.findNearestElement(bt[0],bt[1],!0,!1));var Fn=r.hoverData.last,Qt=r.hoverData.down,Kn=[bt[0]-cn[2],bt[1]-cn[3]],me=r.dragData.possibleDragElements,Ie;if(Wt){var _t=St[0]-Wt[0],kt=_t*_t,Ot=St[1]-Wt[1],lr=Ot*Ot,xr=kt+lr;r.hoverData.isOverThresholdDrag=Ie=xr>=r.desktopTapThreshold2}var Zi=c(ue);Ie&&(r.hoverData.tapholdCancelled=!0);var is=function(){var Io=r.hoverData.dragDelta=r.hoverData.dragDelta||[];Io.length===0?(Io.push(Kn[0]),Io.push(Kn[1])):(Io[0]+=Kn[0],Io[1]+=Kn[1])};Ze=!0,u(Wn,["mousemove","vmousemove","tapdrag"],ue,{x:bt[0],y:bt[1]});var xi=function(Io){return{originalEvent:ue,type:Io,position:{x:bt[0],y:bt[1]}}},ou=function(){r.data.bgActivePosistion=void 0,r.hoverData.selecting||et.emit(xi("boxstart")),cn[4]=1,r.hoverData.selecting=!0,r.redrawHint("select",!0),r.redraw()};if(r.hoverData.which===3){if(Ie){var Ro=xi("cxtdrag");Qt?Qt.emit(Ro):et.emit(Ro),r.hoverData.cxtDragged=!0,(!r.hoverData.cxtOver||Wn!==r.hoverData.cxtOver)&&(r.hoverData.cxtOver&&r.hoverData.cxtOver.emit(xi("cxtdragout")),r.hoverData.cxtOver=Wn,Wn&&Wn.emit(xi("cxtdragover")))}}else if(r.hoverData.dragging){if(Ze=!0,et.panningEnabled()&&et.userPanningEnabled()){var _c;if(r.hoverData.justStartedPan){var nl=r.hoverData.mdownPos;_c={x:(bt[0]-nl[0])*it,y:(bt[1]-nl[1])*it},r.hoverData.justStartedPan=!1}else _c={x:Kn[0]*it,y:Kn[1]*it};et.panBy(_c),et.emit(xi("dragpan")),r.hoverData.dragged=!0}bt=r.projectIntoViewport(ue.clientX,ue.clientY)}else if(cn[4]==1&&(Qt==null||Qt.pannable())){if(Ie){if(!r.hoverData.dragging&&et.boxSelectionEnabled()&&(Zi||!et.panningEnabled()||!et.userPanningEnabled()))ou();else if(!r.hoverData.selecting&&et.panningEnabled()&&et.userPanningEnabled()){var uu=l(Qt,r.hoverData.downs);uu&&(r.hoverData.dragging=!0,r.hoverData.justStartedPan=!0,cn[4]=0,r.data.bgActivePosistion=lb(tn),r.redrawHint("select",!0),r.redraw())}Qt&&Qt.pannable()&&Qt.active()&&Qt.unactivate()}}else{if(Qt&&Qt.pannable()&&Qt.active()&&Qt.unactivate(),(!Qt||!Qt.grabbed())&&Wn!=Fn&&(Fn&&u(Fn,["mouseout","tapdragout"],ue,{x:bt[0],y:bt[1]}),Wn&&u(Wn,["mouseover","tapdragover"],ue,{x:bt[0],y:bt[1]}),r.hoverData.last=Wn),Qt)if(Ie){if(et.boxSelectionEnabled()&&Zi)Qt&&Qt.grabbed()&&(P(me),Qt.emit(xi("freeon")),me.emit(xi("free")),r.dragData.didDrag&&(Qt.emit(xi("dragfreeon")),me.emit(xi("dragfree")))),ou();else if(Qt&&Qt.grabbed()&&r.nodeIsDraggable(Qt)){var Aa=!r.dragData.didDrag;Aa&&r.redrawHint("eles",!0),r.dragData.didDrag=!0,r.hoverData.draggingEles||I(me,{inDragLayer:!0});var Li={x:0,y:0};if(Ft(Kn[0])&&Ft(Kn[1])&&(Li.x+=Kn[0],Li.y+=Kn[1],Aa)){var Ni=r.hoverData.dragDelta;Ni&&Ft(Ni[0])&&Ft(Ni[1])&&(Li.x+=Ni[0],Li.y+=Ni[1])}r.hoverData.draggingEles=!0,me.silentShift(Li).emit(xi("position")).emit(xi("drag")),r.redrawHint("drag",!0),r.redraw()}}else is();Ze=!0}if(cn[2]=bt[0],cn[3]=bt[1],Ze)return ue.stopPropagation&&ue.stopPropagation(),ue.preventDefault&&ue.preventDefault(),!1}},!1);var U,G,X;r.registerBinding(t,"mouseup",function(ue){if(!(r.hoverData.which===1&&ue.which!==1&&r.hoverData.capture)){var $e=r.hoverData.capture;if($e){r.hoverData.capture=!1;var Ze=r.cy,et=r.projectIntoViewport(ue.clientX,ue.clientY),it=r.selection,St=r.findNearestElement(et[0],et[1],!0,!1),bt=r.dragData.possibleDragElements,tn=r.hoverData.down,Wt=c(ue);r.data.bgActivePosistion&&(r.redrawHint("select",!0),r.redraw()),r.hoverData.tapholdCancelled=!0,r.data.bgActivePosistion=void 0,tn&&tn.unactivate();var cn=function(_t){return{originalEvent:ue,type:_t,position:{x:et[0],y:et[1]}}};if(r.hoverData.which===3){var Wn=cn("cxttapend");if(tn?tn.emit(Wn):Ze.emit(Wn),!r.hoverData.cxtDragged){var Fn=cn("cxttap");tn?tn.emit(Fn):Ze.emit(Fn)}r.hoverData.cxtDragged=!1,r.hoverData.which=null}else if(r.hoverData.which===1){if(u(St,["mouseup","tapend","vmouseup"],ue,{x:et[0],y:et[1]}),!r.dragData.didDrag&&!r.hoverData.dragged&&!r.hoverData.selecting&&!r.hoverData.isOverThresholdDrag&&(u(tn,["click","tap","vclick"],ue,{x:et[0],y:et[1]}),G=!1,ue.timeStamp-X<=Ze.multiClickDebounceTime()?(U&&clearTimeout(U),G=!0,X=null,u(tn,["dblclick","dbltap","vdblclick"],ue,{x:et[0],y:et[1]})):(U=setTimeout(function(){G||u(tn,["oneclick","onetap","voneclick"],ue,{x:et[0],y:et[1]})},Ze.multiClickDebounceTime()),X=ue.timeStamp)),tn==null&&!r.dragData.didDrag&&!r.hoverData.selecting&&!r.hoverData.dragged&&!c(ue)&&(Ze.$(i).unselect(["tapunselect"]),bt.length>0&&r.redrawHint("eles",!0),r.dragData.possibleDragElements=bt=Ze.collection()),St==tn&&!r.dragData.didDrag&&!r.hoverData.selecting&&St!=null&&St._private.selectable&&(r.hoverData.dragging||(Ze.selectionType()==="additive"||Wt?St.selected()?St.unselect(["tapunselect"]):St.select(["tapselect"]):Wt||(Ze.$(i).unmerge(St).unselect(["tapunselect"]),St.select(["tapselect"]))),r.redrawHint("eles",!0)),r.hoverData.selecting){var Qt=Ze.collection(r.getAllInBox(it[0],it[1],it[2],it[3]));r.redrawHint("select",!0),Qt.length>0&&r.redrawHint("eles",!0),Ze.emit(cn("boxend"));var Kn=function(_t){return _t.selectable()&&!_t.selected()};Ze.selectionType()==="additive"||Wt||Ze.$(i).unmerge(Qt).unselect(),Qt.emit(cn("box")).stdFilter(Kn).select().emit(cn("boxselect")),r.redraw()}if(r.hoverData.dragging&&(r.hoverData.dragging=!1,r.redrawHint("select",!0),r.redrawHint("eles",!0),r.redraw()),!it[4]){r.redrawHint("drag",!0),r.redrawHint("eles",!0);var me=tn&&tn.grabbed();P(bt),me&&(tn.emit(cn("freeon")),bt.emit(cn("free")),r.dragData.didDrag&&(tn.emit(cn("dragfreeon")),bt.emit(cn("dragfree"))))}}it[4]=0,r.hoverData.down=null,r.hoverData.cxtStarted=!1,r.hoverData.draggingEles=!1,r.hoverData.selecting=!1,r.hoverData.isOverThresholdDrag=!1,r.dragData.didDrag=!1,r.hoverData.dragged=!1,r.hoverData.dragDelta=[],r.hoverData.mdownPos=null,r.hoverData.mdownGPos=null,r.hoverData.which=null}}},!1);var ne=[],ae=4,oe,le=1e5,pe=function(ue,$e){for(var Ze=0;Ze<ue.length;Ze++)if(ue[Ze]%$e!==0)return!1;return!0},ge=function(ue){for(var $e=Math.abs(ue[0]),Ze=1;Ze<ue.length;Ze++)if(Math.abs(ue[Ze])!==$e)return!1;return!0},de=function(ue){var $e=!1,Ze=ue.deltaY;if(Ze==null&&(ue.wheelDeltaY!=null?Ze=ue.wheelDeltaY/4:ue.wheelDelta!=null&&(Ze=ue.wheelDelta/4)),Ze!==0){if(oe==null)if(ne.length>=ae){var et=ne;if(oe=pe(et,5),!oe){var it=Math.abs(et[0]);oe=ge(et)&&it>5}if(oe)for(var St=0;St<et.length;St++)le=Math.min(Math.abs(et[St]),le)}else ne.push(Ze),$e=!0;else oe&&(le=Math.min(Math.abs(Ze),le));if(!r.scrollingPage){var bt=r.cy,tn=bt.zoom(),Wt=bt.pan(),cn=r.projectIntoViewport(ue.clientX,ue.clientY),Wn=[cn[0]*tn+Wt.x,cn[1]*tn+Wt.y];if(r.hoverData.draggingEles||r.hoverData.dragging||r.hoverData.cxtStarted||$()){ue.preventDefault();return}if(bt.panningEnabled()&&bt.userPanningEnabled()&&bt.zoomingEnabled()&&bt.userZoomingEnabled()){ue.preventDefault(),r.data.wheelZooming=!0,clearTimeout(r.data.wheelTimeout),r.data.wheelTimeout=setTimeout(function(){r.data.wheelZooming=!1,r.redrawHint("eles",!0),r.redraw()},150);var Fn;$e&&Math.abs(Ze)>5&&(Ze=IC(Ze)*5),Fn=Ze/-250,oe&&(Fn/=le,Fn*=3),Fn=Fn*r.wheelSensitivity;var Qt=ue.deltaMode===1;Qt&&(Fn*=33);var Kn=bt.zoom()*Math.pow(10,Fn);ue.type==="gesturechange"&&(Kn=r.gestureStartZoom*ue.scale),bt.zoom({level:Kn,renderedPosition:{x:Wn[0],y:Wn[1]}}),bt.emit({type:ue.type==="gesturechange"?"pinchzoom":"scrollzoom",originalEvent:ue,position:{x:cn[0],y:cn[1]}})}}}};r.registerBinding(r.container,"wheel",de,!0),r.registerBinding(t,"scroll",function(ue){r.scrollingPage=!0,clearTimeout(r.scrollingPageTimeout),r.scrollingPageTimeout=setTimeout(function(){r.scrollingPage=!1},250)},!0),r.registerBinding(r.container,"gesturestart",function(ue){r.gestureStartZoom=r.cy.zoom(),r.hasTouchStarted||ue.preventDefault()},!0),r.registerBinding(r.container,"gesturechange",function(Te){r.hasTouchStarted||de(Te)},!0),r.registerBinding(r.container,"mouseout",function(ue){var $e=r.projectIntoViewport(ue.clientX,ue.clientY);r.cy.emit({originalEvent:ue,type:"mouseout",position:{x:$e[0],y:$e[1]}})},!1),r.registerBinding(r.container,"mouseover",function(ue){var $e=r.projectIntoViewport(ue.clientX,ue.clientY);r.cy.emit({originalEvent:ue,type:"mouseover",position:{x:$e[0],y:$e[1]}})},!1);var Se,Ne,ye,we,Pe,Fe,Ue,He,De,Ce,Be,ve,ke,je=function(ue,$e,Ze,et){return Math.sqrt((Ze-ue)*(Ze-ue)+(et-$e)*(et-$e))},qe=function(ue,$e,Ze,et){return(Ze-ue)*(Ze-ue)+(et-$e)*(et-$e)},Me;r.registerBinding(r.container,"touchstart",Me=function(ue){if(r.hasTouchStarted=!0,!!Y(ue)){L(),r.touchData.capture=!0,r.data.bgActivePosistion=void 0;var $e=r.cy,Ze=r.touchData.now,et=r.touchData.earlier;if(ue.touches[0]){var it=r.projectIntoViewport(ue.touches[0].clientX,ue.touches[0].clientY);Ze[0]=it[0],Ze[1]=it[1]}if(ue.touches[1]){var it=r.projectIntoViewport(ue.touches[1].clientX,ue.touches[1].clientY);Ze[2]=it[0],Ze[3]=it[1]}if(ue.touches[2]){var it=r.projectIntoViewport(ue.touches[2].clientX,ue.touches[2].clientY);Ze[4]=it[0],Ze[5]=it[1]}var St=function(Zi){return{originalEvent:ue,type:Zi,position:{x:Ze[0],y:Ze[1]}}};if(ue.touches[1]){r.touchData.singleTouchMoved=!0,P(r.dragData.touchDragEles);var bt=r.findContainerClientCoords();De=bt[0],Ce=bt[1],Be=bt[2],ve=bt[3],Se=ue.touches[0].clientX-De,Ne=ue.touches[0].clientY-Ce,ye=ue.touches[1].clientX-De,we=ue.touches[1].clientY-Ce,ke=0<=Se&&Se<=Be&&0<=ye&&ye<=Be&&0<=Ne&&Ne<=ve&&0<=we&&we<=ve;var tn=$e.pan(),Wt=$e.zoom();Pe=je(Se,Ne,ye,we),Fe=qe(Se,Ne,ye,we),Ue=[(Se+ye)/2,(Ne+we)/2],He=[(Ue[0]-tn.x)/Wt,(Ue[1]-tn.y)/Wt];var cn=200,Wn=cn*cn;if(Fe<Wn&&!ue.touches[2]){var Fn=r.findNearestElement(Ze[0],Ze[1],!0,!0),Qt=r.findNearestElement(Ze[2],Ze[3],!0,!0);Fn&&Fn.isNode()?(Fn.activate().emit(St("cxttapstart")),r.touchData.start=Fn):Qt&&Qt.isNode()?(Qt.activate().emit(St("cxttapstart")),r.touchData.start=Qt):$e.emit(St("cxttapstart")),r.touchData.start&&(r.touchData.start._private.grabbed=!1),r.touchData.cxt=!0,r.touchData.cxtDragged=!1,r.data.bgActivePosistion=void 0,r.redraw();return}}if(ue.touches[2])$e.boxSelectionEnabled()&&ue.preventDefault();else if(!ue.touches[1]){if(ue.touches[0]){var Kn=r.findNearestElements(Ze[0],Ze[1],!0,!0),me=Kn[0];if(me!=null&&(me.activate(),r.touchData.start=me,r.touchData.starts=Kn,r.nodeIsGrabbable(me))){var Ie=r.dragData.touchDragEles=$e.collection(),_t=null;r.redrawHint("eles",!0),r.redrawHint("drag",!0),me.selected()?(_t=$e.$(function(xr){return xr.selected()&&r.nodeIsGrabbable(xr)}),I(_t,{addToList:Ie})):C(me,{addToList:Ie}),w(me),me.emit(St("grabon")),_t?_t.forEach(function(xr){xr.emit(St("grab"))}):me.emit(St("grab"))}u(me,["touchstart","tapstart","vmousedown"],ue,{x:Ze[0],y:Ze[1]}),me==null&&(r.data.bgActivePosistion={x:it[0],y:it[1]},r.redrawHint("select",!0),r.redraw()),r.touchData.singleTouchMoved=!1,r.touchData.singleTouchStartTime=+new Date,clearTimeout(r.touchData.tapholdTimeout),r.touchData.tapholdTimeout=setTimeout(function(){r.touchData.singleTouchMoved===!1&&!r.pinching&&!r.touchData.selecting&&u(r.touchData.start,["taphold"],ue,{x:Ze[0],y:Ze[1]})},r.tapholdDuration)}}if(ue.touches.length>=1){for(var kt=r.touchData.startPosition=[null,null,null,null,null,null],Ot=0;Ot<Ze.length;Ot++)kt[Ot]=et[Ot]=Ze[Ot];var lr=ue.touches[0];r.touchData.startGPosition=[lr.clientX,lr.clientY]}}},!1);var ot;r.registerBinding(t,"touchmove",ot=function(ue){var $e=r.touchData.capture;if(!(!$e&&!Y(ue))){var Ze=r.selection,et=r.cy,it=r.touchData.now,St=r.touchData.earlier,bt=et.zoom();if(ue.touches[0]){var tn=r.projectIntoViewport(ue.touches[0].clientX,ue.touches[0].clientY);it[0]=tn[0],it[1]=tn[1]}if(ue.touches[1]){var tn=r.projectIntoViewport(ue.touches[1].clientX,ue.touches[1].clientY);it[2]=tn[0],it[3]=tn[1]}if(ue.touches[2]){var tn=r.projectIntoViewport(ue.touches[2].clientX,ue.touches[2].clientY);it[4]=tn[0],it[5]=tn[1]}var Wt=function(uy){return{originalEvent:ue,type:uy,position:{x:it[0],y:it[1]}}},cn=r.touchData.startGPosition,Wn;if($e&&ue.touches[0]&&cn){for(var Fn=[],Qt=0;Qt<it.length;Qt++)Fn[Qt]=it[Qt]-St[Qt];var Kn=ue.touches[0].clientX-cn[0],me=Kn*Kn,Ie=ue.touches[0].clientY-cn[1],_t=Ie*Ie,kt=me+_t;Wn=kt>=r.touchTapThreshold2}if($e&&r.touchData.cxt){ue.preventDefault();var Ot=ue.touches[0].clientX-De,lr=ue.touches[0].clientY-Ce,xr=ue.touches[1].clientX-De,Zi=ue.touches[1].clientY-Ce,is=qe(Ot,lr,xr,Zi),xi=is/Fe,ou=150,Ro=ou*ou,_c=1.5,nl=_c*_c;if(xi>=nl||is>=Ro){r.touchData.cxt=!1,r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var uu=Wt("cxttapend");r.touchData.start?(r.touchData.start.unactivate().emit(uu),r.touchData.start=null):et.emit(uu)}}if($e&&r.touchData.cxt){var uu=Wt("cxtdrag");r.data.bgActivePosistion=void 0,r.redrawHint("select",!0),r.touchData.start?r.touchData.start.emit(uu):et.emit(uu),r.touchData.start&&(r.touchData.start._private.grabbed=!1),r.touchData.cxtDragged=!0;var Aa=r.findNearestElement(it[0],it[1],!0,!0);(!r.touchData.cxtOver||Aa!==r.touchData.cxtOver)&&(r.touchData.cxtOver&&r.touchData.cxtOver.emit(Wt("cxtdragout")),r.touchData.cxtOver=Aa,Aa&&Aa.emit(Wt("cxtdragover")))}else if($e&&ue.touches[2]&&et.boxSelectionEnabled())ue.preventDefault(),r.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,r.touchData.selecting||et.emit(Wt("boxstart")),r.touchData.selecting=!0,r.touchData.didSelect=!0,Ze[4]=1,!Ze||Ze.length===0||Ze[0]===void 0?(Ze[0]=(it[0]+it[2]+it[4])/3,Ze[1]=(it[1]+it[3]+it[5])/3,Ze[2]=(it[0]+it[2]+it[4])/3+1,Ze[3]=(it[1]+it[3]+it[5])/3+1):(Ze[2]=(it[0]+it[2]+it[4])/3,Ze[3]=(it[1]+it[3]+it[5])/3),r.redrawHint("select",!0),r.redraw();else if($e&&ue.touches[1]&&!r.touchData.didSelect&&et.zoomingEnabled()&&et.panningEnabled()&&et.userZoomingEnabled()&&et.userPanningEnabled()){ue.preventDefault(),r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var Li=r.dragData.touchDragEles;if(Li){r.redrawHint("drag",!0);for(var Ni=0;Ni<Li.length;Ni++){var ks=Li[Ni]._private;ks.grabbed=!1,ks.rscratch.inDragLayer=!1}}var Io=r.touchData.start,Ot=ue.touches[0].clientX-De,lr=ue.touches[0].clientY-Ce,xr=ue.touches[1].clientX-De,Zi=ue.touches[1].clientY-Ce,Nm=je(Ot,lr,xr,Zi),zE=Nm/Pe;if(ke){var VE=Ot-Se,UE=lr-Ne,YE=xr-ye,Up=Zi-we,WE=(VE+YE)/2,KE=(UE+Up)/2,Yp=et.zoom(),sy=Yp*zE,Wp=et.pan(),Om=He[0]*Yp+Wp.x,Dm=He[1]*Yp+Wp.y,Mm={x:-sy/Yp*(Om-Wp.x-WE)+Om,y:-sy/Yp*(Dm-Wp.y-KE)+Dm};if(Io&&Io.active()){var Li=r.dragData.touchDragEles;P(Li),r.redrawHint("drag",!0),r.redrawHint("eles",!0),Io.unactivate().emit(Wt("freeon")),Li.emit(Wt("free")),r.dragData.didDrag&&(Io.emit(Wt("dragfreeon")),Li.emit(Wt("dragfree")))}et.viewport({zoom:sy,pan:Mm,cancelOnFailedZoom:!0}),et.emit(Wt("pinchzoom")),Pe=Nm,Se=Ot,Ne=lr,ye=xr,we=Zi,r.pinching=!0}if(ue.touches[0]){var tn=r.projectIntoViewport(ue.touches[0].clientX,ue.touches[0].clientY);it[0]=tn[0],it[1]=tn[1]}if(ue.touches[1]){var tn=r.projectIntoViewport(ue.touches[1].clientX,ue.touches[1].clientY);it[2]=tn[0],it[3]=tn[1]}if(ue.touches[2]){var tn=r.projectIntoViewport(ue.touches[2].clientX,ue.touches[2].clientY);it[4]=tn[0],it[5]=tn[1]}}else if(ue.touches[0]&&!r.touchData.didSelect){var cu=r.touchData.start,oy=r.touchData.last,Aa;if(!r.hoverData.draggingEles&&!r.swipePanning&&(Aa=r.findNearestElement(it[0],it[1],!0,!0)),$e&&cu!=null&&ue.preventDefault(),$e&&cu!=null&&r.nodeIsDraggable(cu))if(Wn){var Li=r.dragData.touchDragEles,jm=!r.dragData.didDrag;jm&&I(Li,{inDragLayer:!0}),r.dragData.didDrag=!0;var Qd={x:0,y:0};if(Ft(Fn[0])&&Ft(Fn[1])&&(Qd.x+=Fn[0],Qd.y+=Fn[1],jm)){r.redrawHint("eles",!0);var lu=r.touchData.dragDelta;lu&&Ft(lu[0])&&Ft(lu[1])&&(Qd.x+=lu[0],Qd.y+=lu[1])}r.hoverData.draggingEles=!0,Li.silentShift(Qd).emit(Wt("position")).emit(Wt("drag")),r.redrawHint("drag",!0),r.touchData.startPosition[0]==St[0]&&r.touchData.startPosition[1]==St[1]&&r.redrawHint("eles",!0),r.redraw()}else{var lu=r.touchData.dragDelta=r.touchData.dragDelta||[];lu.length===0?(lu.push(Fn[0]),lu.push(Fn[1])):(lu[0]+=Fn[0],lu[1]+=Fn[1])}if(u(cu||Aa,["touchmove","tapdrag","vmousemove"],ue,{x:it[0],y:it[1]}),(!cu||!cu.grabbed())&&Aa!=oy&&(oy&&oy.emit(Wt("tapdragout")),Aa&&Aa.emit(Wt("tapdragover"))),r.touchData.last=Aa,$e)for(var Ni=0;Ni<it.length;Ni++)it[Ni]&&r.touchData.startPosition[Ni]&&Wn&&(r.touchData.singleTouchMoved=!0);if($e&&(cu==null||cu.pannable())&&et.panningEnabled()&&et.userPanningEnabled()){var XE=l(cu,r.touchData.starts);XE&&(ue.preventDefault(),r.data.bgActivePosistion||(r.data.bgActivePosistion=lb(r.touchData.startPosition)),r.swipePanning?(et.panBy({x:Fn[0]*bt,y:Fn[1]*bt}),et.emit(Wt("dragpan"))):Wn&&(r.swipePanning=!0,et.panBy({x:Kn*bt,y:Ie*bt}),et.emit(Wt("dragpan")),cu&&(cu.unactivate(),r.redrawHint("select",!0),r.touchData.start=null)));var tn=r.projectIntoViewport(ue.touches[0].clientX,ue.touches[0].clientY);it[0]=tn[0],it[1]=tn[1]}}for(var Qt=0;Qt<it.length;Qt++)St[Qt]=it[Qt];$e&&ue.touches.length>0&&!r.hoverData.draggingEles&&!r.swipePanning&&r.data.bgActivePosistion!=null&&(r.data.bgActivePosistion=void 0,r.redrawHint("select",!0),r.redraw())}},!1);var dt;r.registerBinding(t,"touchcancel",dt=function(ue){var $e=r.touchData.start;r.touchData.capture=!1,$e&&$e.unactivate()});var pt,Lt,ut,$t;if(r.registerBinding(t,"touchend",pt=function(ue){var $e=r.touchData.start,Ze=r.touchData.capture;if(Ze)ue.touches.length===0&&(r.touchData.capture=!1),ue.preventDefault();else return;var et=r.selection;r.swipePanning=!1,r.hoverData.draggingEles=!1;var it=r.cy,St=it.zoom(),bt=r.touchData.now,tn=r.touchData.earlier;if(ue.touches[0]){var Wt=r.projectIntoViewport(ue.touches[0].clientX,ue.touches[0].clientY);bt[0]=Wt[0],bt[1]=Wt[1]}if(ue.touches[1]){var Wt=r.projectIntoViewport(ue.touches[1].clientX,ue.touches[1].clientY);bt[2]=Wt[0],bt[3]=Wt[1]}if(ue.touches[2]){var Wt=r.projectIntoViewport(ue.touches[2].clientX,ue.touches[2].clientY);bt[4]=Wt[0],bt[5]=Wt[1]}var cn=function(Ro){return{originalEvent:ue,type:Ro,position:{x:bt[0],y:bt[1]}}};$e&&$e.unactivate();var Wn;if(r.touchData.cxt){if(Wn=cn("cxttapend"),$e?$e.emit(Wn):it.emit(Wn),!r.touchData.cxtDragged){var Fn=cn("cxttap");$e?$e.emit(Fn):it.emit(Fn)}r.touchData.start&&(r.touchData.start._private.grabbed=!1),r.touchData.cxt=!1,r.touchData.start=null,r.redraw();return}if(!ue.touches[2]&&it.boxSelectionEnabled()&&r.touchData.selecting){r.touchData.selecting=!1;var Qt=it.collection(r.getAllInBox(et[0],et[1],et[2],et[3]));et[0]=void 0,et[1]=void 0,et[2]=void 0,et[3]=void 0,et[4]=0,r.redrawHint("select",!0),it.emit(cn("boxend"));var Kn=function(Ro){return Ro.selectable()&&!Ro.selected()};Qt.emit(cn("box")).stdFilter(Kn).select().emit(cn("boxselect")),Qt.nonempty()&&r.redrawHint("eles",!0),r.redraw()}if($e!=null&&$e.unactivate(),ue.touches[2])r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);else if(!ue.touches[1]){if(!ue.touches[0]){if(!ue.touches[0]){r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var me=r.dragData.touchDragEles;if($e!=null){var Ie=$e._private.grabbed;P(me),r.redrawHint("drag",!0),r.redrawHint("eles",!0),Ie&&($e.emit(cn("freeon")),me.emit(cn("free")),r.dragData.didDrag&&($e.emit(cn("dragfreeon")),me.emit(cn("dragfree")))),u($e,["touchend","tapend","vmouseup","tapdragout"],ue,{x:bt[0],y:bt[1]}),$e.unactivate(),r.touchData.start=null}else{var _t=r.findNearestElement(bt[0],bt[1],!0,!0);u(_t,["touchend","tapend","vmouseup","tapdragout"],ue,{x:bt[0],y:bt[1]})}var kt=r.touchData.startPosition[0]-bt[0],Ot=kt*kt,lr=r.touchData.startPosition[1]-bt[1],xr=lr*lr,Zi=Ot+xr,is=Zi*St*St;r.touchData.singleTouchMoved||($e||it.$(":selected").unselect(["tapunselect"]),u($e,["tap","vclick"],ue,{x:bt[0],y:bt[1]}),Lt=!1,ue.timeStamp-$t<=it.multiClickDebounceTime()?(ut&&clearTimeout(ut),Lt=!0,$t=null,u($e,["dbltap","vdblclick"],ue,{x:bt[0],y:bt[1]})):(ut=setTimeout(function(){Lt||u($e,["onetap","voneclick"],ue,{x:bt[0],y:bt[1]})},it.multiClickDebounceTime()),$t=ue.timeStamp)),$e!=null&&!r.dragData.didDrag&&$e._private.selectable&&is<r.touchTapThreshold2&&!r.pinching&&(it.selectionType()==="single"?(it.$(i).unmerge($e).unselect(["tapunselect"]),$e.select(["tapselect"])):$e.selected()?$e.unselect(["tapunselect"]):$e.select(["tapselect"]),r.redrawHint("eles",!0)),r.touchData.singleTouchMoved=!0}}}for(var xi=0;xi<bt.length;xi++)tn[xi]=bt[xi];r.dragData.didDrag=!1,ue.touches.length===0&&(r.touchData.dragDelta=[],r.touchData.startPosition=[null,null,null,null,null,null],r.touchData.startGPosition=null,r.touchData.didSelect=!1),ue.touches.length<2&&(ue.touches.length===1&&(r.touchData.startGPosition=[ue.touches[0].clientX,ue.touches[0].clientY]),r.pinching=!1,r.redrawHint("eles",!0),r.redraw())},!1),typeof TouchEvent>"u"){var Yt=[],fn=function(ue){return{clientX:ue.clientX,clientY:ue.clientY,force:1,identifier:ue.pointerId,pageX:ue.pageX,pageY:ue.pageY,radiusX:ue.width/2,radiusY:ue.height/2,screenX:ue.screenX,screenY:ue.screenY,target:ue.target}},Yn=function(ue){return{event:ue,touch:fn(ue)}},he=function(ue){Yt.push(Yn(ue))},J=function(ue){for(var $e=0;$e<Yt.length;$e++){var Ze=Yt[$e];if(Ze.event.pointerId===ue.pointerId){Yt.splice($e,1);return}}},te=function(ue){var $e=Yt.filter(function(Ze){return Ze.event.pointerId===ue.pointerId})[0];$e.event=ue,$e.touch=fn(ue)},be=function(ue){ue.touches=Yt.map(function($e){return $e.touch})},Le=function(ue){return ue.pointerType==="mouse"||ue.pointerType===4};r.registerBinding(r.container,"pointerdown",function(Te){Le(Te)||(Te.preventDefault(),he(Te),be(Te),Me(Te))}),r.registerBinding(r.container,"pointerup",function(Te){Le(Te)||(J(Te),be(Te),pt(Te))}),r.registerBinding(r.container,"pointercancel",function(Te){Le(Te)||(J(Te),be(Te),dt(Te))}),r.registerBinding(r.container,"pointermove",function(Te){Le(Te)||(Te.preventDefault(),te(Te),be(Te),ot(Te))})}};var ch={};ch.generatePolygon=function(r,t){return this.nodeShapes[r]={renderer:this,name:r,points:t,draw:function(a,u,c,l,h,v){this.renderer.nodeShapeImpl("polygon",a,u,c,l,h,this.points)},intersectLine:function(a,u,c,l,h,v,p,g){return m1(h,v,this.points,a,u,c/2,l/2,p)},checkPoint:function(a,u,c,l,h,v,p,g){return oh(a,u,this.points,v,p,l,h,[0,-1],c)},hasMiterBounds:r!=="rectangle",miterBounds:function(a,u,c,l,h,v){return Qge(this.points,a,u,c,l,h)}}},ch.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:function(t,i,a,u,c,l){this.renderer.nodeShapeImpl(this.name,t,i,a,u,c)},intersectLine:function(t,i,a,u,c,l,h,v){return sbe(c,l,t,i,a/2+h,u/2+h)},checkPoint:function(t,i,a,u,c,l,h,v){return up(t,i,u,c,l,h,a)}}},ch.generateRoundPolygon=function(r,t){return this.nodeShapes[r]={renderer:this,name:r,points:t,getOrCreateCorners:function(a,u,c,l,h,v,p){if(v[p]!==void 0&&v[p+"-cx"]===a&&v[p+"-cy"]===u)return v[p];v[p]=new Array(t.length/2),v[p+"-cx"]=a,v[p+"-cy"]=u;var g=c/2,w=l/2;h=h==="auto"?y8(c,l):h;for(var _=new Array(t.length/2),E=0;E<t.length/2;E++)_[E]={x:a+g*t[E*2],y:u+w*t[E*2+1]};var k,I,C,P,A=_.length;for(I=_[A-1],k=0;k<A;k++)C=_[k%A],P=_[(k+1)%A],v[p][k]=aP(I,C,P,h),I=C,C=P;return v[p]},draw:function(a,u,c,l,h,v,p){this.renderer.nodeShapeImpl("round-polygon",a,u,c,l,h,this.points,this.getOrCreateCorners(u,c,l,h,v,p,"drawCorners"))},intersectLine:function(a,u,c,l,h,v,p,g,w){return ube(h,v,this.points,a,u,c,l,p,this.getOrCreateCorners(a,u,c,l,g,w,"corners"))},checkPoint:function(a,u,c,l,h,v,p,g,w){return abe(a,u,this.points,v,p,l,h,this.getOrCreateCorners(v,p,l,h,g,w,"corners"))}}},ch.generateRoundRectangle=function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:_o(4,0),draw:function(t,i,a,u,c,l){this.renderer.nodeShapeImpl(this.name,t,i,a,u,c,this.points,l)},intersectLine:function(t,i,a,u,c,l,h,v){return g8(c,l,t,i,a,u,h,v)},checkPoint:function(t,i,a,u,c,l,h,v){var p=u/2,g=c/2;v=v==="auto"?Id(u,c):v,v=Math.min(p,g,v);var w=v*2;return!!(oh(t,i,this.points,l,h,u,c-w,[0,-1],a)||oh(t,i,this.points,l,h,u-w,c,[0,-1],a)||up(t,i,w,w,l-p+v,h-g+v,a)||up(t,i,w,w,l+p-v,h-g+v,a)||up(t,i,w,w,l+p-v,h+g-v,a)||up(t,i,w,w,l-p+v,h+g-v,a))}}},ch.generateCutRectangle=function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:LC(),points:_o(4,0),draw:function(t,i,a,u,c,l){this.renderer.nodeShapeImpl(this.name,t,i,a,u,c,null,l)},generateCutTrianglePts:function(t,i,a,u,c){var l=c==="auto"?this.cornerLength:c,h=i/2,v=t/2,p=a-v,g=a+v,w=u-h,_=u+h;return{topLeft:[p,w+l,p+l,w,p+l,w+l],topRight:[g-l,w,g,w+l,g-l,w+l],bottomRight:[g,_-l,g-l,_,g-l,_-l],bottomLeft:[p+l,_,p,_-l,p+l,_-l]}},intersectLine:function(t,i,a,u,c,l,h,v){var p=this.generateCutTrianglePts(a+2*h,u+2*h,t,i,v),g=[].concat.apply([],[p.topLeft.splice(0,4),p.topRight.splice(0,4),p.bottomRight.splice(0,4),p.bottomLeft.splice(0,4)]);return m1(c,l,g,t,i)},checkPoint:function(t,i,a,u,c,l,h,v){var p=v==="auto"?this.cornerLength:v;if(oh(t,i,this.points,l,h,u,c-2*p,[0,-1],a)||oh(t,i,this.points,l,h,u-2*p,c,[0,-1],a))return!0;var g=this.generateCutTrianglePts(u,c,l,h);return tu(t,i,g.topLeft)||tu(t,i,g.topRight)||tu(t,i,g.bottomRight)||tu(t,i,g.bottomLeft)}}},ch.generateBarrel=function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:_o(4,0),draw:function(t,i,a,u,c,l){this.renderer.nodeShapeImpl(this.name,t,i,a,u,c)},intersectLine:function(t,i,a,u,c,l,h,v){var p=.15,g=.5,w=.85,_=this.generateBarrelBezierPts(a+2*h,u+2*h,t,i),E=function(C){var P=fb({x:C[0],y:C[1]},{x:C[2],y:C[3]},{x:C[4],y:C[5]},p),A=fb({x:C[0],y:C[1]},{x:C[2],y:C[3]},{x:C[4],y:C[5]},g),L=fb({x:C[0],y:C[1]},{x:C[2],y:C[3]},{x:C[4],y:C[5]},w);return[C[0],C[1],P.x,P.y,A.x,A.y,L.x,L.y,C[4],C[5]]},k=[].concat(E(_.topLeft),E(_.topRight),E(_.bottomRight),E(_.bottomLeft));return m1(c,l,k,t,i)},generateBarrelBezierPts:function(t,i,a,u){var c=i/2,l=t/2,h=a-l,v=a+l,p=u-c,g=u+c,w=NC(t,i),_=w.heightOffset,E=w.widthOffset,k=w.ctrlPtOffsetPct*t,I={topLeft:[h,p+_,h+k,p,h+E,p],topRight:[v-E,p,v-k,p,v,p+_],bottomRight:[v,g-_,v-k,g,v-E,g],bottomLeft:[h+E,g,h+k,g,h,g-_]};return I.topLeft.isTop=!0,I.topRight.isTop=!0,I.bottomLeft.isBottom=!0,I.bottomRight.isBottom=!0,I},checkPoint:function(t,i,a,u,c,l,h,v){var p=NC(u,c),g=p.heightOffset,w=p.widthOffset;if(oh(t,i,this.points,l,h,u,c-2*g,[0,-1],a)||oh(t,i,this.points,l,h,u-2*w,c,[0,-1],a))return!0;for(var _=this.generateBarrelBezierPts(u,c,l,h),E=function(q,$,Y){var V=Y[4],U=Y[2],G=Y[0],X=Y[5],ne=Y[1],ae=Math.min(V,G),oe=Math.max(V,G),le=Math.min(X,ne),pe=Math.max(X,ne);if(ae<=q&&q<=oe&&le<=$&&$<=pe){var ge=cbe(V,U,G),de=tbe(ge[0],ge[1],ge[2],q),Se=de.filter(function(Ne){return 0<=Ne&&Ne<=1});if(Se.length>0)return Se[0]}return null},k=Object.keys(_),I=0;I<k.length;I++){var C=k[I],P=_[C],A=E(t,i,P);if(A!=null){var L=P[5],O=P[3],M=P[1],B=ms(L,O,M,A);if(P.isTop&&B<=i||P.isBottom&&i<=B)return!0}}return!1}}},ch.generateBottomRoundrectangle=function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:_o(4,0),draw:function(t,i,a,u,c,l){this.renderer.nodeShapeImpl(this.name,t,i,a,u,c,this.points,l)},intersectLine:function(t,i,a,u,c,l,h,v){var p=t-(a/2+h),g=i-(u/2+h),w=g,_=t+(a/2+h),E=Rd(c,l,t,i,p,g,_,w,!1);return E.length>0?E:g8(c,l,t,i,a,u,h,v)},checkPoint:function(t,i,a,u,c,l,h,v){v=v==="auto"?Id(u,c):v;var p=2*v;if(oh(t,i,this.points,l,h,u,c-p,[0,-1],a)||oh(t,i,this.points,l,h,u-p,c,[0,-1],a))return!0;var g=u/2+2*a,w=c/2+2*a,_=[l-g,h-w,l-g,h,l+g,h,l+g,h-w];return!!(tu(t,i,_)||up(t,i,p,p,l+u/2-v,h+c/2-v,a)||up(t,i,p,p,l-u/2+v,h+c/2-v,a))}}},ch.registerNodeShapes=function(){var r=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",_o(3,0)),this.generateRoundPolygon("round-triangle",_o(3,0)),this.generatePolygon("rectangle",_o(4,0)),r.square=r.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var i=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",i),this.generateRoundPolygon("round-diamond",i)}this.generatePolygon("pentagon",_o(5,0)),this.generateRoundPolygon("round-pentagon",_o(5,0)),this.generatePolygon("hexagon",_o(6,0)),this.generateRoundPolygon("round-hexagon",_o(6,0)),this.generatePolygon("heptagon",_o(7,0)),this.generateRoundPolygon("round-heptagon",_o(7,0)),this.generatePolygon("octagon",_o(8,0)),this.generateRoundPolygon("round-octagon",_o(8,0));var a=new Array(20);{var u=PC(5,0),c=PC(5,Math.PI/5),l=.5*(3-Math.sqrt(5));l*=1.57;for(var h=0;h<c.length/2;h++)c[h*2]*=l,c[h*2+1]*=l;for(var h=0;h<20/4;h++)a[h*4]=u[h*2],a[h*4+1]=u[h*2+1],a[h*4+2]=c[h*2],a[h*4+3]=c[h*2+1]}a=b8(a),this.generatePolygon("star",a),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 v=[-1,-1,.25,-1,1,0,.25,1,-1,1];this.generatePolygon("tag",v),this.generateRoundPolygon("round-tag",v)}r.makePolygon=function(p){var g=p.join("$"),w="polygon-"+g,_;return(_=this[w])?_:t.generatePolygon(w,p)}};var O1={};O1.timeToRender=function(){return this.redrawTotalTime/this.redrawCount},O1.redraw=function(r){r=r||o8();var t=this;t.averageRedrawTime===void 0&&(t.averageRedrawTime=0),t.lastRedrawTime===void 0&&(t.lastRedrawTime=0),t.lastDrawTime===void 0&&(t.lastDrawTime=0),t.requestedFrame=!0,t.renderOptions=r},O1.beforeRender=function(r,t){if(!this.destroyed){t==null&&qi("Priority is not optional for beforeRender");var i=this.beforeRenderCallbacks;i.push({fn:r,priority:t}),i.sort(function(a,u){return u.priority-a.priority})}};var aH=function(t,i,a){for(var u=t.beforeRenderCallbacks,c=0;c<u.length;c++)u[c].fn(i,a)};O1.startRenderLoop=function(){var r=this,t=r.cy;if(!r.renderLoopStarted){r.renderLoopStarted=!0;var i=function(u){if(!r.destroyed){if(!t.batching())if(r.requestedFrame&&!r.skipFrame){aH(r,!0,u);var c=ih();r.render(r.renderOptions);var l=r.lastDrawTime=ih();r.averageRedrawTime===void 0&&(r.averageRedrawTime=l-c),r.redrawCount===void 0&&(r.redrawCount=0),r.redrawCount++,r.redrawTotalTime===void 0&&(r.redrawTotalTime=0);var h=l-c;r.redrawTotalTime+=h,r.lastRedrawTime=h,r.averageRedrawTime=r.averageRedrawTime/2+h/2,r.requestedFrame=!1}else aH(r,!1,u);r.skipFrame=!1,Px(i)}};Px(i)}};var S1e=function(t){this.init(t)},sH=S1e,Rb=sH.prototype;Rb.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],Rb.init=function(r){var t=this;t.options=r,t.cy=r.cy;var i=t.container=r.cy.container(),a=t.cy.window();if(a){var u=a.document,c=u.head,l="__________cytoscape_stylesheet",h="__________cytoscape_container",v=u.getElementById(l)!=null;if(i.className.indexOf(h)<0&&(i.className=(i.className||"")+" "+h),!v){var p=u.createElement("style");p.id=l,p.textContent="."+h+" { position: relative; }",c.insertBefore(p,c.children[0])}var g=a.getComputedStyle(i),w=g.getPropertyValue("position");w==="static"&&Hr("A Cytoscape container has style position:static and so can not use UI extensions properly")}t.selection=[void 0,void 0,void 0,void 0,0],t.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],t.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},t.dragData={possibleDragElements:[]},t.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]},t.redraws=0,t.showFps=r.showFps,t.debug=r.debug,t.webgl=r.webgl,t.hideEdgesOnViewport=r.hideEdgesOnViewport,t.textureOnViewport=r.textureOnViewport,t.wheelSensitivity=r.wheelSensitivity,t.motionBlurEnabled=r.motionBlur,t.forcedPixelRatio=Ft(r.pixelRatio)?r.pixelRatio:null,t.motionBlur=r.motionBlur,t.motionBlurOpacity=r.motionBlurOpacity,t.motionBlurTransparency=1-t.motionBlurOpacity,t.motionBlurPxRatio=1,t.mbPxRBlurry=1,t.minMbLowQualFrames=4,t.fullQualityMb=!1,t.clearedForMotionBlur=[],t.desktopTapThreshold=r.desktopTapThreshold,t.desktopTapThreshold2=r.desktopTapThreshold*r.desktopTapThreshold,t.touchTapThreshold=r.touchTapThreshold,t.touchTapThreshold2=r.touchTapThreshold*r.touchTapThreshold,t.tapholdDuration=500,t.bindings=[],t.beforeRenderCallbacks=[],t.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},t.registerNodeShapes(),t.registerArrowShapes(),t.registerCalculationListeners()},Rb.notify=function(r,t){var i=this,a=i.cy;if(!this.destroyed){if(r==="init"){i.load();return}if(r==="destroy"){i.destroy();return}(r==="add"||r==="remove"||r==="move"&&a.hasCompoundNodes()||r==="load"||r==="zorder"||r==="mount")&&i.invalidateCachedZSortedEles(),r==="viewport"&&i.redrawHint("select",!0),r==="gc"&&i.redrawHint("gc",!0),(r==="load"||r==="resize"||r==="mount")&&(i.invalidateContainerClientCoordsCache(),i.matchCanvasSize(i.container)),i.redrawHint("eles",!0),i.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()}},Rb.destroy=function(){var r=this;r.destroyed=!0,r.cy.stopAnimationLoop();for(var t=0;t<r.bindings.length;t++){var i=r.bindings[t],a=i,u=a.target;(u.off||u.removeEventListener).apply(u,a.args)}if(r.bindings=[],r.beforeRenderCallbacks=[],r.onUpdateEleCalcsFns=[],r.removeObserver&&r.removeObserver.disconnect(),r.styleObserver&&r.styleObserver.disconnect(),r.resizeObserver&&r.resizeObserver.disconnect(),r.labelCalcDiv)try{document.body.removeChild(r.labelCalcDiv)}catch{}},Rb.isHeadless=function(){return!1},[eP,rH,iH,Tb,ch,O1].forEach(function(r){yn(Rb,r)});var oP=1e3/60,oH={setupDequeueing:function(t){return function(){var a=this,u=this.renderer;if(!a.dequeueingSetup){a.dequeueingSetup=!0;var c=h1(function(){u.redrawHint("eles",!0),u.redrawHint("drag",!0),u.redraw()},t.deqRedrawThreshold),l=function(p,g){var w=ih(),_=u.averageRedrawTime,E=u.lastRedrawTime,k=[],I=u.cy.extent(),C=u.getPixelRatio();for(p||u.flushRenderedStyleQueue();;){var P=ih(),A=P-w,L=P-g;if(E<oP){var O=oP-(p?_:0);if(L>=t.deqFastCost*O)break}else if(p){if(A>=t.deqCost*E||A>=t.deqAvgCost*_)break}else if(L>=t.deqNoDrawCost*oP)break;var M=t.deq(a,C,I);if(M.length>0)for(var B=0;B<M.length;B++)k.push(M[B]);else break}k.length>0&&(t.onDeqd(a,k),!p&&t.shouldRedraw(a,k,C,I)&&c())},h=t.priority||xC;u.beforeRender(l,h(a))}}}},T1e=function(){function r(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Nx;wd(this,r),this.idsByKey=new sh,this.keyForId=new sh,this.cachesByLvl=new sh,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=i}return _d(r,[{key:"getIdsFor",value:function(i){i==null&&qi("Can not get id list for null key");var a=this.idsByKey,u=this.idsByKey.get(i);return u||(u=new cb,a.set(i,u)),u}},{key:"addIdForKey",value:function(i,a){i!=null&&this.getIdsFor(i).add(a)}},{key:"deleteIdForKey",value:function(i,a){i!=null&&this.getIdsFor(i).delete(a)}},{key:"getNumberOfIdsForKey",value:function(i){return i==null?0:this.getIdsFor(i).size}},{key:"updateKeyMappingFor",value:function(i){var a=i.id(),u=this.keyForId.get(a),c=this.getKey(i);this.deleteIdForKey(u,a),this.addIdForKey(c,a),this.keyForId.set(a,c)}},{key:"deleteKeyMappingFor",value:function(i){var a=i.id(),u=this.keyForId.get(a);this.deleteIdForKey(u,a),this.keyForId.delete(a)}},{key:"keyHasChangedFor",value:function(i){var a=i.id(),u=this.keyForId.get(a),c=this.getKey(i);return u!==c}},{key:"isInvalid",value:function(i){return this.keyHasChangedFor(i)||this.doesEleInvalidateKey(i)}},{key:"getCachesAt",value:function(i){var a=this.cachesByLvl,u=this.lvls,c=a.get(i);return c||(c=new sh,a.set(i,c),u.push(i)),c}},{key:"getCache",value:function(i,a){return this.getCachesAt(a).get(i)}},{key:"get",value:function(i,a){var u=this.getKey(i),c=this.getCache(u,a);return c!=null&&this.updateKeyMappingFor(i),c}},{key:"getForCachedKey",value:function(i,a){var u=this.keyForId.get(i.id()),c=this.getCache(u,a);return c}},{key:"hasCache",value:function(i,a){return this.getCachesAt(a).has(i)}},{key:"has",value:function(i,a){var u=this.getKey(i);return this.hasCache(u,a)}},{key:"setCache",value:function(i,a,u){u.key=i,this.getCachesAt(a).set(i,u)}},{key:"set",value:function(i,a,u){var c=this.getKey(i);this.setCache(c,a,u),this.updateKeyMappingFor(i)}},{key:"deleteCache",value:function(i,a){this.getCachesAt(a).delete(i)}},{key:"delete",value:function(i,a){var u=this.getKey(i);this.deleteCache(u,a)}},{key:"invalidateKey",value:function(i){var a=this;this.lvls.forEach(function(u){return a.deleteCache(i,u)})}},{key:"invalidate",value:function(i){var a=i.id(),u=this.keyForId.get(a);this.deleteKeyMappingFor(i);var c=this.doesEleInvalidateKey(i);return c&&this.invalidateKey(u),c||this.getNumberOfIdsForKey(u)===0}}])}(),uH=25,_2=50,x2=-4,uP=3,cH=7.99,R1e=8,I1e=1024,C1e=1024,A1e=1024,P1e=.2,L1e=.8,N1e=10,O1e=.15,D1e=.1,M1e=.9,j1e=.9,B1e=100,q1e=1,Ib={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},F1e=qs({getKey:null,doesEleInvalidateKey:Nx,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:r8,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),D1=function(t,i){var a=this;a.renderer=t,a.onDequeues=[];var u=F1e(i);yn(a,u),a.lookup=new T1e(u.getKey,u.doesEleInvalidateKey),a.setupDequeueing()},rs=D1.prototype;rs.reasons=Ib,rs.getTextureQueue=function(r){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[r]=t.eleImgCaches[r]||[]},rs.getRetiredTextureQueue=function(r){var t=this,i=t.eleImgCaches.retired=t.eleImgCaches.retired||{},a=i[r]=i[r]||[];return a},rs.getElementQueue=function(){var r=this,t=r.eleCacheQueue=r.eleCacheQueue||new g1(function(i,a){return a.reqs-i.reqs});return t},rs.getElementKeyToQueue=function(){var r=this,t=r.eleKeyToCacheQueue=r.eleKeyToCacheQueue||{};return t},rs.getElement=function(r,t,i,a,u){var c=this,l=this.renderer,h=l.cy.zoom(),v=this.lookup;if(!t||t.w===0||t.h===0||isNaN(t.w)||isNaN(t.h)||!r.visible()||r.removed()||!c.allowEdgeTxrCaching&&r.isEdge()||!c.allowParentTxrCaching&&r.isParent())return null;if(a==null&&(a=Math.ceil(RC(h*i))),a<x2)a=x2;else if(h>=cH||a>uP)return null;var p=Math.pow(2,a),g=t.h*p,w=t.w*p,_=l.eleTextBiggerThanMin(r,p);if(!this.isVisible(r,_))return null;var E=v.get(r,a);if(E&&E.invalidated&&(E.invalidated=!1,E.texture.invalidatedWidth-=E.width),E)return E;var k;if(g<=uH?k=uH:g<=_2?k=_2:k=Math.ceil(g/_2)*_2,g>A1e||w>C1e)return null;var I=c.getTextureQueue(k),C=I[I.length-2],P=function(){return c.recycleTexture(k,w)||c.addTexture(k,w)};C||(C=I[I.length-1]),C||(C=P()),C.width-C.usedWidth<w&&(C=P());for(var A=function(ae){return ae&&ae.scaledLabelShown===_},L=u&&u===Ib.dequeue,O=u&&u===Ib.highQuality,M=u&&u===Ib.downscale,B,F=a+1;F<=uP;F++){var q=v.get(r,F);if(q){B=q;break}}var $=B&&B.level===a+1?B:null,Y=function(){C.context.drawImage($.texture.canvas,$.x,0,$.width,$.height,C.usedWidth,0,w,g)};if(C.context.setTransform(1,0,0,1,0,0),C.context.clearRect(C.usedWidth,0,w,k),A($))Y();else if(A(B))if(O){for(var V=B.level;V>a;V--)$=c.getElement(r,t,i,V,Ib.downscale);Y()}else return c.queueElement(r,B.level-1),B;else{var U;if(!L&&!O&&!M)for(var G=a-1;G>=x2;G--){var X=v.get(r,G);if(X){U=X;break}}if(A(U))return c.queueElement(r,a),U;C.context.translate(C.usedWidth,0),C.context.scale(p,p),this.drawElement(C.context,r,t,_,!1),C.context.scale(1/p,1/p),C.context.translate(-C.usedWidth,0)}return E={x:C.usedWidth,texture:C,level:a,scale:p,width:w,height:g,scaledLabelShown:_},C.usedWidth+=Math.ceil(w+R1e),C.eleCaches.push(E),v.set(r,a,E),c.checkTextureFullness(C),E},rs.invalidateElements=function(r){for(var t=0;t<r.length;t++)this.invalidateElement(r[t])},rs.invalidateElement=function(r){var t=this,i=t.lookup,a=[],u=i.isInvalid(r);if(u){for(var c=x2;c<=uP;c++){var l=i.getForCachedKey(r,c);l&&a.push(l)}var h=i.invalidate(r);if(h)for(var v=0;v<a.length;v++){var p=a[v],g=p.texture;g.invalidatedWidth+=p.width,p.invalidated=!0,t.checkTextureUtility(g)}t.removeFromQueue(r)}},rs.checkTextureUtility=function(r){r.invalidatedWidth>=P1e*r.width&&this.retireTexture(r)},rs.checkTextureFullness=function(r){var t=this,i=t.getTextureQueue(r.height);r.usedWidth/r.width>L1e&&r.fullnessChecks>=N1e?Sd(i,r):r.fullnessChecks++},rs.retireTexture=function(r){var t=this,i=r.height,a=t.getTextureQueue(i),u=this.lookup;Sd(a,r),r.retired=!0;for(var c=r.eleCaches,l=0;l<c.length;l++){var h=c[l];u.deleteCache(h.key,h.level)}EC(c);var v=t.getRetiredTextureQueue(i);v.push(r)},rs.addTexture=function(r,t){var i=this,a=i.getTextureQueue(r),u={};return a.push(u),u.eleCaches=[],u.height=r,u.width=Math.max(I1e,t),u.usedWidth=0,u.invalidatedWidth=0,u.fullnessChecks=0,u.canvas=i.renderer.makeOffscreenCanvas(u.width,u.height),u.context=u.canvas.getContext("2d"),u},rs.recycleTexture=function(r,t){for(var i=this,a=i.getTextureQueue(r),u=i.getRetiredTextureQueue(r),c=0;c<u.length;c++){var l=u[c];if(l.width>=t)return l.retired=!1,l.usedWidth=0,l.invalidatedWidth=0,l.fullnessChecks=0,EC(l.eleCaches),l.context.setTransform(1,0,0,1,0,0),l.context.clearRect(0,0,l.width,l.height),Sd(u,l),a.push(l),l}},rs.queueElement=function(r,t){var i=this,a=i.getElementQueue(),u=i.getElementKeyToQueue(),c=this.getKey(r),l=u[c];if(l)l.level=Math.max(l.level,t),l.eles.merge(r),l.reqs++,a.updateItem(l);else{var h={eles:r.spawn().merge(r),level:t,reqs:1,key:c};a.push(h),u[c]=h}},rs.dequeue=function(r){for(var t=this,i=t.getElementQueue(),a=t.getElementKeyToQueue(),u=[],c=t.lookup,l=0;l<q1e&&i.size()>0;l++){var h=i.pop(),v=h.key,p=h.eles[0],g=c.hasCache(p,h.level);if(a[v]=null,g)continue;u.push(h);var w=t.getBoundingBox(p);t.getElement(p,w,r,h.level,Ib.dequeue)}return u},rs.removeFromQueue=function(r){var t=this,i=t.getElementQueue(),a=t.getElementKeyToQueue(),u=this.getKey(r),c=a[u];c!=null&&(c.eles.length===1?(c.reqs=_C,i.updateItem(c),i.pop(),a[u]=null):c.eles.unmerge(r))},rs.onDequeue=function(r){this.onDequeues.push(r)},rs.offDequeue=function(r){Sd(this.onDequeues,r)},rs.setupDequeueing=oH.setupDequeueing({deqRedrawThreshold:B1e,deqCost:O1e,deqAvgCost:D1e,deqNoDrawCost:M1e,deqFastCost:j1e,deq:function(t,i,a){return t.dequeue(i,a)},onDeqd:function(t,i){for(var a=0;a<t.onDequeues.length;a++){var u=t.onDequeues[a];u(i)}},shouldRedraw:function(t,i,a,u){for(var c=0;c<i.length;c++)for(var l=i[c].eles,h=0;h<l.length;h++){var v=l[h].boundingBox();if(CC(v,u))return!0}return!1},priority:function(t){return t.renderer.beforeRenderPriorities.eleTxrDeq}});var $1e=1,M1=-4,E2=2,G1e=3.99,H1e=50,z1e=50,V1e=.15,U1e=.1,Y1e=.9,W1e=.9,K1e=1,lH=250,X1e=4e3*4e3,fH=32767,J1e=!0,hH=function(t){var i=this,a=i.renderer=t,u=a.cy;i.layersByLevel={},i.firstGet=!0,i.lastInvalidationTime=ih()-2*lH,i.skipping=!1,i.eleTxrDeqs=u.collection(),i.scheduleElementRefinement=h1(function(){i.refineElementTextures(i.eleTxrDeqs),i.eleTxrDeqs.unmerge(i.eleTxrDeqs)},z1e),a.beforeRender(function(l,h){h-i.lastInvalidationTime<=lH?i.skipping=!0:i.skipping=!1},a.beforeRenderPriorities.lyrTxrSkip);var c=function(h,v){return v.reqs-h.reqs};i.layersQueue=new g1(c),i.setupDequeueing()},Gs=hH.prototype,dH=0,Q1e=Math.pow(2,53)-1;Gs.makeLayer=function(r,t){var i=Math.pow(2,t),a=Math.ceil(r.w*i),u=Math.ceil(r.h*i),c=this.renderer.makeOffscreenCanvas(a,u),l={id:dH=++dH%Q1e,bb:r,level:t,width:a,height:u,canvas:c,context:c.getContext("2d"),eles:[],elesQueue:[],reqs:0},h=l.context,v=-l.bb.x1,p=-l.bb.y1;return h.scale(i,i),h.translate(v,p),l},Gs.getLayers=function(r,t,i){var a=this,u=a.renderer,c=u.cy,l=c.zoom(),h=a.firstGet;if(a.firstGet=!1,i==null){if(i=Math.ceil(RC(l*t)),i<M1)i=M1;else if(l>=G1e||i>E2)return null}a.validateLayersElesOrdering(i,r);var v=a.layersByLevel,p=Math.pow(2,i),g=v[i]=v[i]||[],w,_=a.levelIsComplete(i,r),E,k=function(){var Y=function(ne){if(a.validateLayersElesOrdering(ne,r),a.levelIsComplete(ne,r))return E=v[ne],!0},V=function(ne){if(!E)for(var ae=i+ne;M1<=ae&&ae<=E2&&!Y(ae);ae+=ne);};V(1),V(-1);for(var U=g.length-1;U>=0;U--){var G=g[U];G.invalid&&Sd(g,G)}};if(!_)k();else return g;var I=function(){if(!w){w=wo();for(var Y=0;Y<r.length;Y++)Kge(w,r[Y].boundingBox())}return w},C=function(Y){Y=Y||{};var V=Y.after;I();var U=Math.ceil(w.w*p),G=Math.ceil(w.h*p);if(U>fH||G>fH)return null;var X=U*G;if(X>X1e)return null;var ne=a.makeLayer(w,i);if(V!=null){var ae=g.indexOf(V)+1;g.splice(ae,0,ne)}else(Y.insert===void 0||Y.insert)&&g.unshift(ne);return ne};if(a.skipping&&!h)return null;for(var P=null,A=r.length/$1e,L=!h,O=0;O<r.length;O++){var M=r[O],B=M._private.rscratch,F=B.imgLayerCaches=B.imgLayerCaches||{},q=F[i];if(q){P=q;continue}if((!P||P.eles.length>=A||!p8(P.bb,M.boundingBox()))&&(P=C({insert:!0,after:P}),!P))return null;E||L?a.queueLayer(P,M):a.drawEleInLayer(P,M,i,t),P.eles.push(M),F[i]=P}return E||(L?null:g)},Gs.getEleLevelForLayerLevel=function(r,t){return r},Gs.drawEleInLayer=function(r,t,i,a){var u=this,c=this.renderer,l=r.context,h=t.boundingBox();h.w===0||h.h===0||!t.visible()||(i=u.getEleLevelForLayerLevel(i,a),c.setImgSmoothing(l,!1),c.drawCachedElement(l,t,null,null,i,J1e),c.setImgSmoothing(l,!0))},Gs.levelIsComplete=function(r,t){var i=this,a=i.layersByLevel[r];if(!a||a.length===0)return!1;for(var u=0,c=0;c<a.length;c++){var l=a[c];if(l.reqs>0||l.invalid)return!1;u+=l.eles.length}return u===t.length},Gs.validateLayersElesOrdering=function(r,t){var i=this.layersByLevel[r];if(i)for(var a=0;a<i.length;a++){for(var u=i[a],c=-1,l=0;l<t.length;l++)if(u.eles[0]===t[l]){c=l;break}if(c<0){this.invalidateLayer(u);continue}for(var h=c,l=0;l<u.eles.length;l++)if(u.eles[l]!==t[h+l]){this.invalidateLayer(u);break}}},Gs.updateElementsInLayers=function(r,t){for(var i=this,a=u1(r[0]),u=0;u<r.length;u++)for(var c=a?null:r[u],l=a?r[u]:r[u].ele,h=l._private.rscratch,v=h.imgLayerCaches=h.imgLayerCaches||{},p=M1;p<=E2;p++){var g=v[p];g&&(c&&i.getEleLevelForLayerLevel(g.level)!==c.level||t(g,l,c))}},Gs.haveLayers=function(){for(var r=this,t=!1,i=M1;i<=E2;i++){var a=r.layersByLevel[i];if(a&&a.length>0){t=!0;break}}return t},Gs.invalidateElements=function(r){var t=this;r.length!==0&&(t.lastInvalidationTime=ih(),!(r.length===0||!t.haveLayers())&&t.updateElementsInLayers(r,function(a,u,c){t.invalidateLayer(a)}))},Gs.invalidateLayer=function(r){if(this.lastInvalidationTime=ih(),!r.invalid){var t=r.level,i=r.eles,a=this.layersByLevel[t];Sd(a,r),r.elesQueue=[],r.invalid=!0,r.replacement&&(r.replacement.invalid=!0);for(var u=0;u<i.length;u++){var c=i[u]._private.rscratch.imgLayerCaches;c&&(c[t]=null)}}},Gs.refineElementTextures=function(r){var t=this;t.updateElementsInLayers(r,function(a,u,c){var l=a.replacement;if(l||(l=a.replacement=t.makeLayer(a.bb,a.level),l.replaces=a,l.eles=a.eles),!l.reqs)for(var h=0;h<l.eles.length;h++)t.queueLayer(l,l.eles[h])})},Gs.enqueueElementRefinement=function(r){this.eleTxrDeqs.merge(r),this.scheduleElementRefinement()},Gs.queueLayer=function(r,t){var i=this,a=i.layersQueue,u=r.elesQueue,c=u.hasId=u.hasId||{};if(!r.replacement){if(t){if(c[t.id()])return;u.push(t),c[t.id()]=!0}r.reqs?(r.reqs++,a.updateItem(r)):(r.reqs=1,a.push(r))}},Gs.dequeue=function(r){for(var t=this,i=t.layersQueue,a=[],u=0;u<K1e&&i.size()!==0;){var c=i.peek();if(c.replacement){i.pop();continue}if(c.replaces&&c!==c.replaces.replacement){i.pop();continue}if(c.invalid){i.pop();continue}var l=c.elesQueue.shift();l&&(t.drawEleInLayer(c,l,c.level,r),u++),a.length===0&&a.push(!0),c.elesQueue.length===0&&(i.pop(),c.reqs=0,c.replaces&&t.applyLayerReplacement(c),t.requestRedraw())}return a},Gs.applyLayerReplacement=function(r){var t=this,i=t.layersByLevel[r.level],a=r.replaces,u=i.indexOf(a);if(!(u<0||a.invalid)){i[u]=r;for(var c=0;c<r.eles.length;c++){var l=r.eles[c]._private,h=l.imgLayerCaches=l.imgLayerCaches||{};h&&(h[r.level]=r)}t.requestRedraw()}},Gs.requestRedraw=h1(function(){var r=this.renderer;r.redrawHint("eles",!0),r.redrawHint("drag",!0),r.redraw()},100),Gs.setupDequeueing=oH.setupDequeueing({deqRedrawThreshold:H1e,deqCost:V1e,deqAvgCost:U1e,deqNoDrawCost:Y1e,deqFastCost:W1e,deq:function(t,i){return t.dequeue(i)},onDeqd:xC,shouldRedraw:r8,priority:function(t){return t.renderer.beforeRenderPriorities.lyrTxrDeq}});var vH={},pH;function Z1e(r,t){for(var i=0;i<t.length;i++){var a=t[i];r.lineTo(a.x,a.y)}}function eme(r,t,i){for(var a,u=0;u<t.length;u++){var c=t[u];u===0&&(a=c),r.lineTo(c.x,c.y)}r.quadraticCurveTo(i.x,i.y,a.x,a.y)}function gH(r,t,i){r.beginPath&&r.beginPath();for(var a=t,u=0;u<a.length;u++){var c=a[u];r.lineTo(c.x,c.y)}var l=i,h=i[0];r.moveTo(h.x,h.y);for(var u=1;u<l.length;u++){var c=l[u];r.lineTo(c.x,c.y)}r.closePath&&r.closePath()}function tme(r,t,i,a,u){r.beginPath&&r.beginPath(),r.arc(i,a,u,0,Math.PI*2,!1);var c=t,l=c[0];r.moveTo(l.x,l.y);for(var h=0;h<c.length;h++){var v=c[h];r.lineTo(v.x,v.y)}r.closePath&&r.closePath()}function nme(r,t,i,a){r.arc(t,i,a,0,Math.PI*2,!1)}vH.arrowShapeImpl=function(r){return(pH||(pH={polygon:Z1e,"triangle-backcurve":eme,"triangle-tee":gH,"circle-triangle":tme,"triangle-cross":gH,circle:nme}))[r]};var Kl={};Kl.drawElement=function(r,t,i,a,u,c){var l=this;t.isNode()?l.drawNode(r,t,i,a,u,c):l.drawEdge(r,t,i,a,u,c)},Kl.drawElementOverlay=function(r,t){var i=this;t.isNode()?i.drawNodeOverlay(r,t):i.drawEdgeOverlay(r,t)},Kl.drawElementUnderlay=function(r,t){var i=this;t.isNode()?i.drawNodeUnderlay(r,t):i.drawEdgeUnderlay(r,t)},Kl.drawCachedElementPortion=function(r,t,i,a,u,c,l,h){var v=this,p=i.getBoundingBox(t);if(!(p.w===0||p.h===0)){var g=i.getElement(t,p,a,u,c);if(g!=null){var w=h(v,t);if(w===0)return;var _=l(v,t),E=p.x1,k=p.y1,I=p.w,C=p.h,P,A,L,O,M;if(_!==0){var B=i.getRotationPoint(t);L=B.x,O=B.y,r.translate(L,O),r.rotate(_),M=v.getImgSmoothing(r),M||v.setImgSmoothing(r,!0);var F=i.getRotationOffset(t);P=F.x,A=F.y}else P=E,A=k;var q;w!==1&&(q=r.globalAlpha,r.globalAlpha=q*w),r.drawImage(g.texture.canvas,g.x,0,g.width,g.height,P,A,I,C),w!==1&&(r.globalAlpha=q),_!==0&&(r.rotate(-_),r.translate(-L,-O),M||v.setImgSmoothing(r,!1))}else i.drawElement(r,t)}};var rme=function(){return 0},ime=function(t,i){return t.getTextAngle(i,null)},ame=function(t,i){return t.getTextAngle(i,"source")},sme=function(t,i){return t.getTextAngle(i,"target")},ome=function(t,i){return i.effectiveOpacity()},cP=function(t,i){return i.pstyle("text-opacity").pfValue*i.effectiveOpacity()};Kl.drawCachedElement=function(r,t,i,a,u,c){var l=this,h=l.data,v=h.eleTxrCache,p=h.lblTxrCache,g=h.slbTxrCache,w=h.tlbTxrCache,_=t.boundingBox(),E=c===!0?v.reasons.highQuality:null;if(!(_.w===0||_.h===0||!t.visible())&&(!a||CC(_,a))){var k=t.isEdge(),I=t.element()._private.rscratch.badLine;l.drawElementUnderlay(r,t),l.drawCachedElementPortion(r,t,v,i,u,E,rme,ome),(!k||!I)&&l.drawCachedElementPortion(r,t,p,i,u,E,ime,cP),k&&!I&&(l.drawCachedElementPortion(r,t,g,i,u,E,ame,cP),l.drawCachedElementPortion(r,t,w,i,u,E,sme,cP)),l.drawElementOverlay(r,t)}},Kl.drawElements=function(r,t){for(var i=this,a=0;a<t.length;a++){var u=t[a];i.drawElement(r,u)}},Kl.drawCachedElements=function(r,t,i,a){for(var u=this,c=0;c<t.length;c++){var l=t[c];u.drawCachedElement(r,l,i,a)}},Kl.drawCachedNodes=function(r,t,i,a){for(var u=this,c=0;c<t.length;c++){var l=t[c];l.isNode()&&u.drawCachedElement(r,l,i,a)}},Kl.drawLayeredElements=function(r,t,i,a){var u=this,c=u.data.lyrTxrCache.getLayers(t,i);if(c)for(var l=0;l<c.length;l++){var h=c[l],v=h.bb;v.w===0||v.h===0||r.drawImage(h.canvas,v.x1,v.y1,v.w,v.h)}else u.drawCachedElements(r,t,i,a)};var lh={};lh.drawEdge=function(r,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,l=this,h=t._private.rscratch;if(!(c&&!t.visible())&&!(h.badLine||h.allpts==null||isNaN(h.allpts[0]))){var v;i&&(v=i,r.translate(-v.x1,-v.y1));var p=c?t.pstyle("opacity").value:1,g=c?t.pstyle("line-opacity").value:1,w=t.pstyle("curve-style").value,_=t.pstyle("line-style").value,E=t.pstyle("width").pfValue,k=t.pstyle("line-cap").value,I=t.pstyle("line-outline-width").value,C=t.pstyle("line-outline-color").value,P=p*g,A=p*g,L=function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:P;w==="straight-triangle"?(l.eleStrokeStyle(r,t,ne),l.drawEdgeTrianglePath(t,r,h.allpts)):(r.lineWidth=E,r.lineCap=k,l.eleStrokeStyle(r,t,ne),l.drawEdgePath(t,r,h.allpts,_),r.lineCap="butt")},O=function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:P;if(r.lineWidth=E+I,r.lineCap=k,I>0)l.colorStrokeStyle(r,C[0],C[1],C[2],ne);else{r.lineCap="butt";return}w==="straight-triangle"?l.drawEdgeTrianglePath(t,r,h.allpts):(l.drawEdgePath(t,r,h.allpts,_),r.lineCap="butt")},M=function(){u&&l.drawEdgeOverlay(r,t)},B=function(){u&&l.drawEdgeUnderlay(r,t)},F=function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:A;l.drawArrowheads(r,t,ne)},q=function(){l.drawElementText(r,t,null,a)};r.lineJoin="round";var $=t.pstyle("ghost").value==="yes";if($){var Y=t.pstyle("ghost-offset-x").pfValue,V=t.pstyle("ghost-offset-y").pfValue,U=t.pstyle("ghost-opacity").value,G=P*U;r.translate(Y,V),L(G),F(G),r.translate(-Y,-V)}else O();B(),L(),F(),M(),q(),i&&r.translate(v.x1,v.y1)}};var bH=function(t){if(!["overlay","underlay"].includes(t))throw new Error("Invalid state");return function(i,a){if(a.visible()){var u=a.pstyle("".concat(t,"-opacity")).value;if(u!==0){var c=this,l=c.usePaths(),h=a._private.rscratch,v=a.pstyle("".concat(t,"-padding")).pfValue,p=2*v,g=a.pstyle("".concat(t,"-color")).value;i.lineWidth=p,h.edgeType==="self"&&!l?i.lineCap="butt":i.lineCap="round",c.colorStrokeStyle(i,g[0],g[1],g[2],u),c.drawEdgePath(a,i,h.allpts,"solid")}}}};lh.drawEdgeOverlay=bH("overlay"),lh.drawEdgeUnderlay=bH("underlay"),lh.drawEdgePath=function(r,t,i,a){var u=r._private.rscratch,c=t,l,h=!1,v=this.usePaths(),p=r.pstyle("line-dash-pattern").pfValue,g=r.pstyle("line-dash-offset").pfValue;if(v){var w=i.join("$"),_=u.pathCacheKey&&u.pathCacheKey===w;_?(l=t=u.pathCache,h=!0):(l=t=new Path2D,u.pathCacheKey=w,u.pathCache=l)}if(c.setLineDash)switch(a){case"dotted":c.setLineDash([1,1]);break;case"dashed":c.setLineDash(p),c.lineDashOffset=g;break;case"solid":c.setLineDash([]);break}if(!h&&!u.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(i[0],i[1]),u.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var E=2;E+3<i.length;E+=4)t.quadraticCurveTo(i[E],i[E+1],i[E+2],i[E+3]);break;case"straight":case"haystack":for(var k=2;k+1<i.length;k+=2)t.lineTo(i[k],i[k+1]);break;case"segments":if(u.isRound){var I=Zo(u.roundCorners),C;try{for(I.s();!(C=I.n()).done;){var P=C.value;XG(t,P)}}catch(L){I.e(L)}finally{I.f()}t.lineTo(i[i.length-2],i[i.length-1])}else for(var A=2;A+1<i.length;A+=2)t.lineTo(i[A],i[A+1]);break}t=c,v?t.stroke(l):t.stroke(),t.setLineDash&&t.setLineDash([])},lh.drawEdgeTrianglePath=function(r,t,i){t.fillStyle=t.strokeStyle;for(var a=r.pstyle("width").pfValue,u=0;u+1<i.length;u+=2){var c=[i[u+2]-i[u],i[u+3]-i[u+1]],l=Math.sqrt(c[0]*c[0]+c[1]*c[1]),h=[c[1]/l,-c[0]/l],v=[h[0]*a/2,h[1]*a/2];t.beginPath(),t.moveTo(i[u]-v[0],i[u+1]-v[1]),t.lineTo(i[u]+v[0],i[u+1]+v[1]),t.lineTo(i[u+2],i[u+3]),t.closePath(),t.fill()}},lh.drawArrowheads=function(r,t,i){var a=t._private.rscratch,u=a.edgeType==="haystack";u||this.drawArrowhead(r,t,"source",a.arrowStartX,a.arrowStartY,a.srcArrowAngle,i),this.drawArrowhead(r,t,"mid-target",a.midX,a.midY,a.midtgtArrowAngle,i),this.drawArrowhead(r,t,"mid-source",a.midX,a.midY,a.midsrcArrowAngle,i),u||this.drawArrowhead(r,t,"target",a.arrowEndX,a.arrowEndY,a.tgtArrowAngle,i)},lh.drawArrowhead=function(r,t,i,a,u,c,l){if(!(isNaN(a)||a==null||isNaN(u)||u==null||isNaN(c)||c==null)){var h=this,v=t.pstyle(i+"-arrow-shape").value;if(v!=="none"){var p=t.pstyle(i+"-arrow-fill").value==="hollow"?"both":"filled",g=t.pstyle(i+"-arrow-fill").value,w=t.pstyle("width").pfValue,_=t.pstyle(i+"-arrow-width"),E=_.value==="match-line"?w:_.pfValue;_.units==="%"&&(E*=w);var k=t.pstyle("opacity").value;l===void 0&&(l=k);var I=r.globalCompositeOperation;(l!==1||g==="hollow")&&(r.globalCompositeOperation="destination-out",h.colorFillStyle(r,255,255,255,1),h.colorStrokeStyle(r,255,255,255,1),h.drawArrowShape(t,r,p,w,v,E,a,u,c),r.globalCompositeOperation=I);var C=t.pstyle(i+"-arrow-color").value;h.colorFillStyle(r,C[0],C[1],C[2],l),h.colorStrokeStyle(r,C[0],C[1],C[2],l),h.drawArrowShape(t,r,g,w,v,E,a,u,c)}}},lh.drawArrowShape=function(r,t,i,a,u,c,l,h,v){var p=this,g=this.usePaths()&&u!=="triangle-cross",w=!1,_,E=t,k={x:l,y:h},I=r.pstyle("arrow-scale").value,C=this.getArrowWidth(a,I),P=p.arrowShapes[u];if(g){var A=p.arrowPathCache=p.arrowPathCache||[],L=ap(u),O=A[L];O!=null?(_=t=O,w=!0):(_=t=new Path2D,A[L]=_)}w||(t.beginPath&&t.beginPath(),g?P.draw(t,1,0,{x:0,y:0},1):P.draw(t,C,v,k,a),t.closePath&&t.closePath()),t=E,g&&(t.translate(l,h),t.rotate(v),t.scale(C,C)),(i==="filled"||i==="both")&&(g?t.fill(_):t.fill()),(i==="hollow"||i==="both")&&(t.lineWidth=c/(g?C:1),t.lineJoin="miter",g?t.stroke(_):t.stroke()),g&&(t.scale(1/C,1/C),t.rotate(-v),t.translate(-l,-h))};var lP={};lP.safeDrawImage=function(r,t,i,a,u,c,l,h,v,p){if(!(u<=0||c<=0||v<=0||p<=0))try{r.drawImage(t,i,a,u,c,l,h,v,p)}catch(g){Hr(g)}},lP.drawInscribedImage=function(r,t,i,a,u){var c=this,l=i.position(),h=l.x,v=l.y,p=i.cy().style(),g=p.getIndexedStyle.bind(p),w=g(i,"background-fit","value",a),_=g(i,"background-repeat","value",a),E=i.width(),k=i.height(),I=i.padding()*2,C=E+(g(i,"background-width-relative-to","value",a)==="inner"?0:I),P=k+(g(i,"background-height-relative-to","value",a)==="inner"?0:I),A=i._private.rscratch,L=g(i,"background-clip","value",a),O=L==="node",M=g(i,"background-image-opacity","value",a)*u,B=g(i,"background-image-smoothing","value",a),F=i.pstyle("corner-radius").value;F!=="auto"&&(F=i.pstyle("corner-radius").pfValue);var q=t.width||t.cachedW,$=t.height||t.cachedH;(q==null||$==null)&&(document.body.appendChild(t),q=t.cachedW=t.width||t.offsetWidth,$=t.cachedH=t.height||t.offsetHeight,document.body.removeChild(t));var Y=q,V=$;if(g(i,"background-width","value",a)!=="auto"&&(g(i,"background-width","units",a)==="%"?Y=g(i,"background-width","pfValue",a)*C:Y=g(i,"background-width","pfValue",a)),g(i,"background-height","value",a)!=="auto"&&(g(i,"background-height","units",a)==="%"?V=g(i,"background-height","pfValue",a)*P:V=g(i,"background-height","pfValue",a)),!(Y===0||V===0)){if(w==="contain"){var U=Math.min(C/Y,P/V);Y*=U,V*=U}else if(w==="cover"){var U=Math.max(C/Y,P/V);Y*=U,V*=U}var G=h-C/2,X=g(i,"background-position-x","units",a),ne=g(i,"background-position-x","pfValue",a);X==="%"?G+=(C-Y)*ne:G+=ne;var ae=g(i,"background-offset-x","units",a),oe=g(i,"background-offset-x","pfValue",a);ae==="%"?G+=(C-Y)*oe:G+=oe;var le=v-P/2,pe=g(i,"background-position-y","units",a),ge=g(i,"background-position-y","pfValue",a);pe==="%"?le+=(P-V)*ge:le+=ge;var de=g(i,"background-offset-y","units",a),Se=g(i,"background-offset-y","pfValue",a);de==="%"?le+=(P-V)*Se:le+=Se,A.pathCache&&(G-=h,le-=v,h=0,v=0);var Ne=r.globalAlpha;r.globalAlpha=M;var ye=c.getImgSmoothing(r),we=!1;if(B==="no"&&ye?(c.setImgSmoothing(r,!1),we=!0):B==="yes"&&!ye&&(c.setImgSmoothing(r,!0),we=!0),_==="no-repeat")O&&(r.save(),A.pathCache?r.clip(A.pathCache):(c.nodeShapes[c.getNodeShape(i)].draw(r,h,v,C,P,F,A),r.clip())),c.safeDrawImage(r,t,0,0,q,$,G,le,Y,V),O&&r.restore();else{var Pe=r.createPattern(t,_);r.fillStyle=Pe,c.nodeShapes[c.getNodeShape(i)].draw(r,h,v,C,P,F,A),r.translate(G,le),r.fill(),r.translate(-G,-le)}r.globalAlpha=Ne,we&&c.setImgSmoothing(r,ye)}};var pp={};pp.eleTextBiggerThanMin=function(r,t){if(!t){var i=r.cy().zoom(),a=this.getPixelRatio(),u=Math.ceil(RC(i*a));t=Math.pow(2,u)}var c=r.pstyle("font-size").pfValue*t,l=r.pstyle("min-zoomed-font-size").pfValue;return!(c<l)},pp.drawElementText=function(r,t,i,a,u){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,l=this;if(a==null){if(c&&!l.eleTextBiggerThanMin(t))return}else if(a===!1)return;if(t.isNode()){var h=t.pstyle("label");if(!h||!h.value)return;var v=l.getLabelJustification(t);r.textAlign=v,r.textBaseline="bottom"}else{var p=t.element()._private.rscratch.badLine,g=t.pstyle("label"),w=t.pstyle("source-label"),_=t.pstyle("target-label");if(p||(!g||!g.value)&&(!w||!w.value)&&(!_||!_.value))return;r.textAlign="center",r.textBaseline="bottom"}var E=!i,k;i&&(k=i,r.translate(-k.x1,-k.y1)),u==null?(l.drawText(r,t,null,E,c),t.isEdge()&&(l.drawText(r,t,"source",E,c),l.drawText(r,t,"target",E,c))):l.drawText(r,t,u,E,c),i&&r.translate(k.x1,k.y1)},pp.getFontCache=function(r){var t;this.fontCaches=this.fontCaches||[];for(var i=0;i<this.fontCaches.length;i++)if(t=this.fontCaches[i],t.context===r)return t;return t={context:r},this.fontCaches.push(t),t},pp.setupTextStyle=function(r,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=t.pstyle("font-style").strValue,u=t.pstyle("font-size").pfValue+"px",c=t.pstyle("font-family").strValue,l=t.pstyle("font-weight").strValue,h=i?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,v=t.pstyle("text-outline-opacity").value*h,p=t.pstyle("color").value,g=t.pstyle("text-outline-color").value;r.font=a+" "+l+" "+u+" "+c,r.lineJoin="round",this.colorFillStyle(r,p[0],p[1],p[2],h),this.colorStrokeStyle(r,g[0],g[1],g[2],v)};function ume(r,t,i,a,u){var c=Math.min(a,u),l=c/2,h=t+a/2,v=i+u/2;r.beginPath(),r.arc(h,v,l,0,Math.PI*2),r.closePath()}function yH(r,t,i,a,u){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,l=Math.min(c,a/2,u/2);r.beginPath(),r.moveTo(t+l,i),r.lineTo(t+a-l,i),r.quadraticCurveTo(t+a,i,t+a,i+l),r.lineTo(t+a,i+u-l),r.quadraticCurveTo(t+a,i+u,t+a-l,i+u),r.lineTo(t+l,i+u),r.quadraticCurveTo(t,i+u,t,i+u-l),r.lineTo(t,i+l),r.quadraticCurveTo(t,i,t+l,i),r.closePath()}pp.getTextAngle=function(r,t){var i,a=r._private,u=a.rscratch,c=t?t+"-":"",l=r.pstyle(c+"text-rotation");if(l.strValue==="autorotate"){var h=eu(u,"labelAngle",t);i=r.isEdge()?h:0}else l.strValue==="none"?i=0:i=l.pfValue;return i},pp.drawText=function(r,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,c=t._private,l=c.rscratch,h=u?t.effectiveOpacity():1;if(!(u&&(h===0||t.pstyle("text-opacity").value===0))){i==="main"&&(i=null);var v=eu(l,"labelX",i),p=eu(l,"labelY",i),g,w,_=this.getLabelText(t,i);if(_!=null&&_!==""&&!isNaN(v)&&!isNaN(p)){this.setupTextStyle(r,t,u);var E=i?i+"-":"",k=eu(l,"labelWidth",i),I=eu(l,"labelHeight",i),C=t.pstyle(E+"text-margin-x").pfValue,P=t.pstyle(E+"text-margin-y").pfValue,A=t.isEdge(),L=t.pstyle("text-halign").value,O=t.pstyle("text-valign").value;A&&(L="center",O="center"),v+=C,p+=P;var M;switch(a?M=this.getTextAngle(t,i):M=0,M!==0&&(g=v,w=p,r.translate(g,w),r.rotate(M),v=0,p=0),O){case"top":break;case"center":p+=I/2;break;case"bottom":p+=I;break}var B=t.pstyle("text-background-opacity").value,F=t.pstyle("text-border-opacity").value,q=t.pstyle("text-border-width").pfValue,$=t.pstyle("text-background-padding").pfValue,Y=t.pstyle("text-background-shape").strValue,V=Y==="round-rectangle"||Y==="roundrectangle",U=Y==="circle",G=2;if(B>0||q>0&&F>0){var X=r.fillStyle,ne=r.strokeStyle,ae=r.lineWidth,oe=t.pstyle("text-background-color").value,le=t.pstyle("text-border-color").value,pe=t.pstyle("text-border-style").value,ge=B>0,de=q>0&&F>0,Se=v-$;switch(L){case"left":Se-=k;break;case"center":Se-=k/2;break}var Ne=p-I-$,ye=k+2*$,we=I+2*$;if(ge&&(r.fillStyle="rgba(".concat(oe[0],",").concat(oe[1],",").concat(oe[2],",").concat(B*h,")")),de&&(r.strokeStyle="rgba(".concat(le[0],",").concat(le[1],",").concat(le[2],",").concat(F*h,")"),r.lineWidth=q,r.setLineDash))switch(pe){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash([4,2]);break;case"double":r.lineWidth=q/4,r.setLineDash([]);break;case"solid":default:r.setLineDash([]);break}if(V?(r.beginPath(),yH(r,Se,Ne,ye,we,G)):U?(r.beginPath(),ume(r,Se,Ne,ye,we)):(r.beginPath(),r.rect(Se,Ne,ye,we)),ge&&r.fill(),de&&r.stroke(),de&&pe==="double"){var Pe=q/2;r.beginPath(),V?yH(r,Se+Pe,Ne+Pe,ye-2*Pe,we-2*Pe,G):r.rect(Se+Pe,Ne+Pe,ye-2*Pe,we-2*Pe),r.stroke()}r.fillStyle=X,r.strokeStyle=ne,r.lineWidth=ae,r.setLineDash&&r.setLineDash([])}var Fe=2*t.pstyle("text-outline-width").pfValue;if(Fe>0&&(r.lineWidth=Fe),t.pstyle("text-wrap").value==="wrap"){var Ue=eu(l,"labelWrapCachedLines",i),He=eu(l,"labelLineHeight",i),De=k/2,Ce=this.getLabelJustification(t);switch(Ce==="auto"||(L==="left"?Ce==="left"?v+=-k:Ce==="center"&&(v+=-De):L==="center"?Ce==="left"?v+=-De:Ce==="right"&&(v+=De):L==="right"&&(Ce==="center"?v+=De:Ce==="right"&&(v+=k))),O){case"top":p-=(Ue.length-1)*He;break;case"center":case"bottom":p-=(Ue.length-1)*He;break}for(var Be=0;Be<Ue.length;Be++)Fe>0&&r.strokeText(Ue[Be],v,p),r.fillText(Ue[Be],v,p),p+=He}else Fe>0&&r.strokeText(_,v,p),r.fillText(_,v,p);M!==0&&(r.rotate(-M),r.translate(-g,-w))}}};var jd={};jd.drawNode=function(r,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,l=this,h,v,p=t._private,g=p.rscratch,w=t.position();if(!(!Ft(w.x)||!Ft(w.y))&&!(c&&!t.visible())){var _=c?t.effectiveOpacity():1,E=l.usePaths(),k,I=!1,C=t.padding();h=t.width()+2*C,v=t.height()+2*C;var P;i&&(P=i,r.translate(-P.x1,-P.y1));for(var A=t.pstyle("background-image"),L=A.value,O=new Array(L.length),M=new Array(L.length),B=0,F=0;F<L.length;F++){var q=L[F],$=O[F]=q!=null&&q!=="none";if($){var Y=t.cy().style().getIndexedStyle(t,"background-image-crossorigin","value",F);B++,M[F]=l.getCachedImage(q,Y,function(){p.backgroundTimestamp=Date.now(),t.emitAndNotify("background")})}}var V=t.pstyle("background-blacken").value,U=t.pstyle("border-width").pfValue,G=t.pstyle("background-opacity").value*_,X=t.pstyle("border-color").value,ne=t.pstyle("border-style").value,ae=t.pstyle("border-join").value,oe=t.pstyle("border-cap").value,le=t.pstyle("border-position").value,pe=t.pstyle("border-dash-pattern").pfValue,ge=t.pstyle("border-dash-offset").pfValue,de=t.pstyle("border-opacity").value*_,Se=t.pstyle("outline-width").pfValue,Ne=t.pstyle("outline-color").value,ye=t.pstyle("outline-style").value,we=t.pstyle("outline-opacity").value*_,Pe=t.pstyle("outline-offset").value,Fe=t.pstyle("corner-radius").value;Fe!=="auto"&&(Fe=t.pstyle("corner-radius").pfValue);var Ue=function(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:G;l.eleFillStyle(r,t,Le)},He=function(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:de;l.colorStrokeStyle(r,X[0],X[1],X[2],Le)},De=function(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:we;l.colorStrokeStyle(r,Ne[0],Ne[1],Ne[2],Le)},Ce=function(Le,Te,ue,$e){var Ze=l.nodePathCache=l.nodePathCache||[],et=t8(ue==="polygon"?ue+","+$e.join(","):ue,""+Te,""+Le,""+Fe),it=Ze[et],St,bt=!1;return it!=null?(St=it,bt=!0,g.pathCache=St):(St=new Path2D,Ze[et]=g.pathCache=St),{path:St,cacheHit:bt}},Be=t.pstyle("shape").strValue,ve=t.pstyle("shape-polygon-points").pfValue;if(E){r.translate(w.x,w.y);var ke=Ce(h,v,Be,ve);k=ke.path,I=ke.cacheHit}var je=function(){if(!I){var Le=w;E&&(Le={x:0,y:0}),l.nodeShapes[l.getNodeShape(t)].draw(k||r,Le.x,Le.y,h,v,Fe,g)}E?r.fill(k):r.fill()},qe=function(){for(var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_,Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,ue=p.backgrounding,$e=0,Ze=0;Ze<M.length;Ze++){var et=t.cy().style().getIndexedStyle(t,"background-image-containment","value",Ze);if(Te&&et==="over"||!Te&&et==="inside"){$e++;continue}O[Ze]&&M[Ze].complete&&!M[Ze].error&&($e++,l.drawInscribedImage(r,M[Ze],t,Ze,Le))}p.backgrounding=$e!==B,ue!==p.backgrounding&&t.updateStyle(!1)},Me=function(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_;l.hasPie(t)&&(l.drawPie(r,t,Te),Le&&(E||l.nodeShapes[l.getNodeShape(t)].draw(r,w.x,w.y,h,v,Fe,g)))},ot=function(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_;l.hasStripe(t)&&(r.save(),E?r.clip(g.pathCache):(l.nodeShapes[l.getNodeShape(t)].draw(r,w.x,w.y,h,v,Fe,g),r.clip()),l.drawStripe(r,t,Te),r.restore(),Le&&(E||l.nodeShapes[l.getNodeShape(t)].draw(r,w.x,w.y,h,v,Fe,g)))},dt=function(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_,Te=(V>0?V:-V)*Le,ue=V>0?0:255;V!==0&&(l.colorFillStyle(r,ue,ue,ue,Te),E?r.fill(k):r.fill())},pt=function(){if(U>0){if(r.lineWidth=U,r.lineCap=oe,r.lineJoin=ae,r.setLineDash)switch(ne){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash(pe),r.lineDashOffset=ge;break;case"solid":case"double":r.setLineDash([]);break}if(le!=="center"){if(r.save(),r.lineWidth*=2,le==="inside")E?r.clip(k):r.clip();else{var Le=new Path2D;Le.rect(-h/2-U,-v/2-U,h+2*U,v+2*U),Le.addPath(k),r.clip(Le,"evenodd")}E?r.stroke(k):r.stroke(),r.restore()}else E?r.stroke(k):r.stroke();if(ne==="double"){r.lineWidth=U/3;var Te=r.globalCompositeOperation;r.globalCompositeOperation="destination-out",E?r.stroke(k):r.stroke(),r.globalCompositeOperation=Te}r.setLineDash&&r.setLineDash([])}},Lt=function(){if(Se>0){if(r.lineWidth=Se,r.lineCap="butt",r.setLineDash)switch(ye){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash([4,2]);break;case"solid":case"double":r.setLineDash([]);break}var Le=w;E&&(Le={x:0,y:0});var Te=l.getNodeShape(t),ue=U;le==="inside"&&(ue=0),le==="outside"&&(ue*=2);var $e=(h+ue+(Se+Pe))/h,Ze=(v+ue+(Se+Pe))/v,et=h*$e,it=v*Ze,St=l.nodeShapes[Te].points,bt;if(E){var tn=Ce(et,it,Te,St);bt=tn.path}if(Te==="ellipse")l.drawEllipsePath(bt||r,Le.x,Le.y,et,it);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(Te)){var Wt=0,cn=0,Wn=0;Te==="round-diamond"?Wt=(ue+Pe+Se)*1.4:Te==="round-heptagon"?(Wt=(ue+Pe+Se)*1.075,Wn=-(ue/2+Pe+Se)/35):Te==="round-hexagon"?Wt=(ue+Pe+Se)*1.12:Te==="round-pentagon"?(Wt=(ue+Pe+Se)*1.13,Wn=-(ue/2+Pe+Se)/15):Te==="round-tag"?(Wt=(ue+Pe+Se)*1.12,cn=(ue/2+Se+Pe)*.07):Te==="round-triangle"&&(Wt=(ue+Pe+Se)*(Math.PI/2),Wn=-(ue+Pe/2+Se)/Math.PI),Wt!==0&&($e=(h+Wt)/h,et=h*$e,["round-hexagon","round-tag"].includes(Te)||(Ze=(v+Wt)/v,it=v*Ze)),Fe=Fe==="auto"?y8(et,it):Fe;for(var Fn=et/2,Qt=it/2,Kn=Fe+(ue+Se+Pe)/2,me=new Array(St.length/2),Ie=new Array(St.length/2),_t=0;_t<St.length/2;_t++)me[_t]={x:Le.x+cn+Fn*St[_t*2],y:Le.y+Wn+Qt*St[_t*2+1]};var kt,Ot,lr,xr,Zi=me.length;for(Ot=me[Zi-1],kt=0;kt<Zi;kt++)lr=me[kt%Zi],xr=me[(kt+1)%Zi],Ie[kt]=aP(Ot,lr,xr,Kn),Ot=lr,lr=xr;l.drawRoundPolygonPath(bt||r,Le.x+cn,Le.y+Wn,h*$e,v*Ze,St,Ie)}else if(["roundrectangle","round-rectangle"].includes(Te))Fe=Fe==="auto"?Id(et,it):Fe,l.drawRoundRectanglePath(bt||r,Le.x,Le.y,et,it,Fe+(ue+Se+Pe)/2);else if(["cutrectangle","cut-rectangle"].includes(Te))Fe=Fe==="auto"?LC():Fe,l.drawCutRectanglePath(bt||r,Le.x,Le.y,et,it,null,Fe+(ue+Se+Pe)/4);else if(["bottomroundrectangle","bottom-round-rectangle"].includes(Te))Fe=Fe==="auto"?Id(et,it):Fe,l.drawBottomRoundRectanglePath(bt||r,Le.x,Le.y,et,it,Fe+(ue+Se+Pe)/2);else if(Te==="barrel")l.drawBarrelPath(bt||r,Le.x,Le.y,et,it);else if(Te.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(Te)){var is=(ue+Se+Pe)/h;St=Fx($x(St,is)),l.drawPolygonPath(bt||r,Le.x,Le.y,h,v,St)}else{var xi=(ue+Se+Pe)/h;St=Fx($x(St,-xi)),l.drawPolygonPath(bt||r,Le.x,Le.y,h,v,St)}if(E?r.stroke(bt):r.stroke(),ye==="double"){r.lineWidth=ue/3;var ou=r.globalCompositeOperation;r.globalCompositeOperation="destination-out",E?r.stroke(bt):r.stroke(),r.globalCompositeOperation=ou}r.setLineDash&&r.setLineDash([])}},ut=function(){u&&l.drawNodeOverlay(r,t,w,h,v)},$t=function(){u&&l.drawNodeUnderlay(r,t,w,h,v)},Yt=function(){l.drawElementText(r,t,null,a)},fn=t.pstyle("ghost").value==="yes";if(fn){var Yn=t.pstyle("ghost-offset-x").pfValue,he=t.pstyle("ghost-offset-y").pfValue,J=t.pstyle("ghost-opacity").value,te=J*_;r.translate(Yn,he),De(),Lt(),Ue(J*G),je(),qe(te,!0),He(J*de),pt(),Me(V!==0||U!==0),ot(V!==0||U!==0),qe(te,!1),dt(te),r.translate(-Yn,-he)}E&&r.translate(-w.x,-w.y),$t(),E&&r.translate(w.x,w.y),De(),Lt(),Ue(),je(),qe(_,!0),He(),pt(),Me(V!==0||U!==0),ot(V!==0||U!==0),qe(_,!1),dt(),E&&r.translate(-w.x,-w.y),Yt(),ut(),i&&r.translate(P.x1,P.y1)}};var mH=function(t){if(!["overlay","underlay"].includes(t))throw new Error("Invalid state");return function(i,a,u,c,l){var h=this;if(a.visible()){var v=a.pstyle("".concat(t,"-padding")).pfValue,p=a.pstyle("".concat(t,"-opacity")).value,g=a.pstyle("".concat(t,"-color")).value,w=a.pstyle("".concat(t,"-shape")).value,_=a.pstyle("".concat(t,"-corner-radius")).value;if(p>0){if(u=u||a.position(),c==null||l==null){var E=a.padding();c=a.width()+2*E,l=a.height()+2*E}h.colorFillStyle(i,g[0],g[1],g[2],p),h.nodeShapes[w].draw(i,u.x,u.y,c+v*2,l+v*2,_),i.fill()}}}};jd.drawNodeOverlay=mH("overlay"),jd.drawNodeUnderlay=mH("underlay"),jd.hasPie=function(r){return r=r[0],r._private.hasPie},jd.hasStripe=function(r){return r=r[0],r._private.hasStripe},jd.drawPie=function(r,t,i,a){t=t[0],a=a||t.position();var u=t.cy().style(),c=t.pstyle("pie-size"),l=t.pstyle("pie-hole"),h=t.pstyle("pie-start-angle").pfValue,v=a.x,p=a.y,g=t.width(),w=t.height(),_=Math.min(g,w)/2,E,k=0,I=this.usePaths();if(I&&(v=0,p=0),c.units==="%"?_=_*c.pfValue:c.pfValue!==void 0&&(_=c.pfValue/2),l.units==="%"?E=_*l.pfValue:l.pfValue!==void 0&&(E=l.pfValue/2),!(E>=_))for(var C=1;C<=u.pieBackgroundN;C++){var P=t.pstyle("pie-"+C+"-background-size").value,A=t.pstyle("pie-"+C+"-background-color").value,L=t.pstyle("pie-"+C+"-background-opacity").value*i,O=P/100;O+k>1&&(O=1-k);var M=1.5*Math.PI+2*Math.PI*k;M+=h;var B=2*Math.PI*O,F=M+B;P===0||k>=1||k+O>1||(E===0?(r.beginPath(),r.moveTo(v,p),r.arc(v,p,_,M,F),r.closePath()):(r.beginPath(),r.arc(v,p,_,M,F),r.arc(v,p,E,F,M,!0),r.closePath()),this.colorFillStyle(r,A[0],A[1],A[2],L),r.fill(),k+=O)}},jd.drawStripe=function(r,t,i,a){t=t[0],a=a||t.position();var u=t.cy().style(),c=a.x,l=a.y,h=t.width(),v=t.height(),p=0,g=this.usePaths();r.save();var w=t.pstyle("stripe-direction").value,_=t.pstyle("stripe-size");switch(w){case"vertical":break;case"righward":r.rotate(-Math.PI/2);break}var E=h,k=v;_.units==="%"?(E=E*_.pfValue,k=k*_.pfValue):_.pfValue!==void 0&&(E=_.pfValue,k=_.pfValue),g&&(c=0,l=0),l-=E/2,c-=k/2;for(var I=1;I<=u.stripeBackgroundN;I++){var C=t.pstyle("stripe-"+I+"-background-size").value,P=t.pstyle("stripe-"+I+"-background-color").value,A=t.pstyle("stripe-"+I+"-background-opacity").value*i,L=C/100;L+p>1&&(L=1-p),!(C===0||p>=1||p+L>1)&&(r.beginPath(),r.rect(c,l+k*p,E,k*L),r.closePath(),this.colorFillStyle(r,P[0],P[1],P[2],A),r.fill(),p+=L)}r.restore()};var xo={},cme=100;xo.getPixelRatio=function(){var r=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var t=this.cy.window(),i=r.backingStorePixelRatio||r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1;return(t.devicePixelRatio||1)/i},xo.paintCache=function(r){for(var t=this.paintCaches=this.paintCaches||[],i=!0,a,u=0;u<t.length;u++)if(a=t[u],a.context===r){i=!1;break}return i&&(a={context:r},t.push(a)),a},xo.createGradientStyleFor=function(r,t,i,a,u){var c,l=this.usePaths(),h=i.pstyle(t+"-gradient-stop-colors").value,v=i.pstyle(t+"-gradient-stop-positions").pfValue;if(a==="radial-gradient")if(i.isEdge()){var p=i.sourceEndpoint(),g=i.targetEndpoint(),w=i.midpoint(),_=sp(p,w),E=sp(g,w);c=r.createRadialGradient(w.x,w.y,0,w.x,w.y,Math.max(_,E))}else{var k=l?{x:0,y:0}:i.position(),I=i.paddedWidth(),C=i.paddedHeight();c=r.createRadialGradient(k.x,k.y,0,k.x,k.y,Math.max(I,C))}else if(i.isEdge()){var P=i.sourceEndpoint(),A=i.targetEndpoint();c=r.createLinearGradient(P.x,P.y,A.x,A.y)}else{var L=l?{x:0,y:0}:i.position(),O=i.paddedWidth(),M=i.paddedHeight(),B=O/2,F=M/2,q=i.pstyle("background-gradient-direction").value;switch(q){case"to-bottom":c=r.createLinearGradient(L.x,L.y-F,L.x,L.y+F);break;case"to-top":c=r.createLinearGradient(L.x,L.y+F,L.x,L.y-F);break;case"to-left":c=r.createLinearGradient(L.x+B,L.y,L.x-B,L.y);break;case"to-right":c=r.createLinearGradient(L.x-B,L.y,L.x+B,L.y);break;case"to-bottom-right":case"to-right-bottom":c=r.createLinearGradient(L.x-B,L.y-F,L.x+B,L.y+F);break;case"to-top-right":case"to-right-top":c=r.createLinearGradient(L.x-B,L.y+F,L.x+B,L.y-F);break;case"to-bottom-left":case"to-left-bottom":c=r.createLinearGradient(L.x+B,L.y-F,L.x-B,L.y+F);break;case"to-top-left":case"to-left-top":c=r.createLinearGradient(L.x+B,L.y+F,L.x-B,L.y-F);break}}if(!c)return null;for(var $=v.length===h.length,Y=h.length,V=0;V<Y;V++)c.addColorStop($?v[V]:V/(Y-1),"rgba("+h[V][0]+","+h[V][1]+","+h[V][2]+","+u+")");return c},xo.gradientFillStyle=function(r,t,i,a){var u=this.createGradientStyleFor(r,"background",t,i,a);if(!u)return null;r.fillStyle=u},xo.colorFillStyle=function(r,t,i,a,u){r.fillStyle="rgba("+t+","+i+","+a+","+u+")"},xo.eleFillStyle=function(r,t,i){var a=t.pstyle("background-fill").value;if(a==="linear-gradient"||a==="radial-gradient")this.gradientFillStyle(r,t,a,i);else{var u=t.pstyle("background-color").value;this.colorFillStyle(r,u[0],u[1],u[2],i)}},xo.gradientStrokeStyle=function(r,t,i,a){var u=this.createGradientStyleFor(r,"line",t,i,a);if(!u)return null;r.strokeStyle=u},xo.colorStrokeStyle=function(r,t,i,a,u){r.strokeStyle="rgba("+t+","+i+","+a+","+u+")"},xo.eleStrokeStyle=function(r,t,i){var a=t.pstyle("line-fill").value;if(a==="linear-gradient"||a==="radial-gradient")this.gradientStrokeStyle(r,t,a,i);else{var u=t.pstyle("line-color").value;this.colorStrokeStyle(r,u[0],u[1],u[2],i)}},xo.matchCanvasSize=function(r){var t=this,i=t.data,a=t.findContainerClientCoords(),u=a[2],c=a[3],l=t.getPixelRatio(),h=t.motionBlurPxRatio;(r===t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE]||r===t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG])&&(l=h);var v=u*l,p=c*l,g;if(!(v===t.canvasWidth&&p===t.canvasHeight)){t.fontCaches=null;var w=i.canvasContainer;w.style.width=u+"px",w.style.height=c+"px";for(var _=0;_<t.CANVAS_LAYERS;_++)g=i.canvases[_],g.width=v,g.height=p,g.style.width=u+"px",g.style.height=c+"px";for(var _=0;_<t.BUFFER_COUNT;_++)g=i.bufferCanvases[_],g.width=v,g.height=p,g.style.width=u+"px",g.style.height=c+"px";t.textureMult=1,l<=1&&(g=i.bufferCanvases[t.TEXTURE_BUFFER],t.textureMult=2,g.width=v*t.textureMult,g.height=p*t.textureMult),t.canvasWidth=v,t.canvasHeight=p,t.pixelRatio=l}},xo.renderTo=function(r,t,i,a){this.render({forcedContext:r,forcedZoom:t,forcedPan:i,drawAllLayers:!0,forcedPxRatio:a})},xo.clearCanvas=function(){var r=this,t=r.data;function i(a){a.clearRect(0,0,r.canvasWidth,r.canvasHeight)}i(t.contexts[r.NODE]),i(t.contexts[r.DRAG])},xo.render=function(r){var t=this;r=r||o8();var i=t.cy,a=r.forcedContext,u=r.drawAllLayers,c=r.drawOnlyNodeLayer,l=r.forcedZoom,h=r.forcedPan,v=r.forcedPxRatio===void 0?this.getPixelRatio():r.forcedPxRatio,p=t.data,g=p.canvasNeedsRedraw,w=t.textureOnViewport&&!a&&(t.pinching||t.hoverData.dragging||t.swipePanning||t.data.wheelZooming),_=r.motionBlur!==void 0?r.motionBlur:t.motionBlur,E=t.motionBlurPxRatio,k=i.hasCompoundNodes(),I=t.hoverData.draggingEles,C=!!(t.hoverData.selecting||t.touchData.selecting);_=_&&!a&&t.motionBlurEnabled&&!C;var P=_;a||(t.prevPxRatio!==v&&(t.invalidateContainerClientCoordsCache(),t.matchCanvasSize(t.container),t.redrawHint("eles",!0),t.redrawHint("drag",!0)),t.prevPxRatio=v),!a&&t.motionBlurTimeout&&clearTimeout(t.motionBlurTimeout),_&&(t.mbFrames==null&&(t.mbFrames=0),t.mbFrames++,t.mbFrames<3&&(P=!1),t.mbFrames>t.minMbLowQualFrames&&(t.motionBlurPxRatio=t.mbPxRBlurry)),t.clearingMotionBlur&&(t.motionBlurPxRatio=1),t.textureDrawLastFrame&&!w&&(g[t.NODE]=!0,g[t.SELECT_BOX]=!0);var A=i.style(),L=i.zoom(),O=l!==void 0?l:L,M=i.pan(),B={x:M.x,y:M.y},F={zoom:L,pan:{x:M.x,y:M.y}},q=t.prevViewport,$=q===void 0||F.zoom!==q.zoom||F.pan.x!==q.pan.x||F.pan.y!==q.pan.y;!$&&!(I&&!k)&&(t.motionBlurPxRatio=1),h&&(B=h),O*=v,B.x*=v,B.y*=v;var Y=t.getCachedZSortedEles();function V(He,De,Ce,Be,ve){var ke=He.globalCompositeOperation;He.globalCompositeOperation="destination-out",t.colorFillStyle(He,255,255,255,t.motionBlurTransparency),He.fillRect(De,Ce,Be,ve),He.globalCompositeOperation=ke}function U(He,De){var Ce,Be,ve,ke;!t.clearingMotionBlur&&(He===p.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]||He===p.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG])?(Ce={x:M.x*E,y:M.y*E},Be=L*E,ve=t.canvasWidth*E,ke=t.canvasHeight*E):(Ce=B,Be=O,ve=t.canvasWidth,ke=t.canvasHeight),He.setTransform(1,0,0,1,0,0),De==="motionBlur"?V(He,0,0,ve,ke):!a&&(De===void 0||De)&&He.clearRect(0,0,ve,ke),u||(He.translate(Ce.x,Ce.y),He.scale(Be,Be)),h&&He.translate(h.x,h.y),l&&He.scale(l,l)}if(w||(t.textureDrawLastFrame=!1),w){if(t.textureDrawLastFrame=!0,!t.textureCache){t.textureCache={},t.textureCache.bb=i.mutableElements().boundingBox(),t.textureCache.texture=t.data.bufferCanvases[t.TEXTURE_BUFFER];var G=t.data.bufferContexts[t.TEXTURE_BUFFER];G.setTransform(1,0,0,1,0,0),G.clearRect(0,0,t.canvasWidth*t.textureMult,t.canvasHeight*t.textureMult),t.render({forcedContext:G,drawOnlyNodeLayer:!0,forcedPxRatio:v*t.textureMult});var F=t.textureCache.viewport={zoom:i.zoom(),pan:i.pan(),width:t.canvasWidth,height:t.canvasHeight};F.mpan={x:(0-F.pan.x)/F.zoom,y:(0-F.pan.y)/F.zoom}}g[t.DRAG]=!1,g[t.NODE]=!1;var X=p.contexts[t.NODE],ne=t.textureCache.texture,F=t.textureCache.viewport;X.setTransform(1,0,0,1,0,0),_?V(X,0,0,F.width,F.height):X.clearRect(0,0,F.width,F.height);var ae=A.core("outside-texture-bg-color").value,oe=A.core("outside-texture-bg-opacity").value;t.colorFillStyle(X,ae[0],ae[1],ae[2],oe),X.fillRect(0,0,F.width,F.height);var L=i.zoom();U(X,!1),X.clearRect(F.mpan.x,F.mpan.y,F.width/F.zoom/v,F.height/F.zoom/v),X.drawImage(ne,F.mpan.x,F.mpan.y,F.width/F.zoom/v,F.height/F.zoom/v)}else t.textureOnViewport&&!a&&(t.textureCache=null);var le=i.extent(),pe=t.pinching||t.hoverData.dragging||t.swipePanning||t.data.wheelZooming||t.hoverData.draggingEles||t.cy.animated(),ge=t.hideEdgesOnViewport&&pe,de=[];if(de[t.NODE]=!g[t.NODE]&&_&&!t.clearedForMotionBlur[t.NODE]||t.clearingMotionBlur,de[t.NODE]&&(t.clearedForMotionBlur[t.NODE]=!0),de[t.DRAG]=!g[t.DRAG]&&_&&!t.clearedForMotionBlur[t.DRAG]||t.clearingMotionBlur,de[t.DRAG]&&(t.clearedForMotionBlur[t.DRAG]=!0),g[t.NODE]||u||c||de[t.NODE]){var Se=_&&!de[t.NODE]&&E!==1,X=a||(Se?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]:p.contexts[t.NODE]),Ne=_&&!Se?"motionBlur":void 0;U(X,Ne),ge?t.drawCachedNodes(X,Y.nondrag,v,le):t.drawLayeredElements(X,Y.nondrag,v,le),t.debug&&t.drawDebugPoints(X,Y.nondrag),!u&&!_&&(g[t.NODE]=!1)}if(!c&&(g[t.DRAG]||u||de[t.DRAG])){var Se=_&&!de[t.DRAG]&&E!==1,X=a||(Se?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG]:p.contexts[t.DRAG]);U(X,_&&!Se?"motionBlur":void 0),ge?t.drawCachedNodes(X,Y.drag,v,le):t.drawCachedElements(X,Y.drag,v,le),t.debug&&t.drawDebugPoints(X,Y.drag),!u&&!_&&(g[t.DRAG]=!1)}if(this.drawSelectionRectangle(r,U),_&&E!==1){var ye=p.contexts[t.NODE],we=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE],Pe=p.contexts[t.DRAG],Fe=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG],Ue=function(De,Ce,Be){De.setTransform(1,0,0,1,0,0),Be||!P?De.clearRect(0,0,t.canvasWidth,t.canvasHeight):V(De,0,0,t.canvasWidth,t.canvasHeight);var ve=E;De.drawImage(Ce,0,0,t.canvasWidth*ve,t.canvasHeight*ve,0,0,t.canvasWidth,t.canvasHeight)};(g[t.NODE]||de[t.NODE])&&(Ue(ye,we,de[t.NODE]),g[t.NODE]=!1),(g[t.DRAG]||de[t.DRAG])&&(Ue(Pe,Fe,de[t.DRAG]),g[t.DRAG]=!1)}t.prevViewport=F,t.clearingMotionBlur&&(t.clearingMotionBlur=!1,t.motionBlurCleared=!0,t.motionBlur=!0),_&&(t.motionBlurTimeout=setTimeout(function(){t.motionBlurTimeout=null,t.clearedForMotionBlur[t.NODE]=!1,t.clearedForMotionBlur[t.DRAG]=!1,t.motionBlur=!1,t.clearingMotionBlur=!w,t.mbFrames=0,g[t.NODE]=!0,g[t.DRAG]=!0,t.redraw()},cme)),a||i.emit("render")};var j1;xo.drawSelectionRectangle=function(r,t){var i=this,a=i.cy,u=i.data,c=a.style(),l=r.drawOnlyNodeLayer,h=r.drawAllLayers,v=u.canvasNeedsRedraw,p=r.forcedContext;if(i.showFps||!l&&v[i.SELECT_BOX]&&!h){var g=p||u.contexts[i.SELECT_BOX];if(t(g),i.selection[4]==1&&(i.hoverData.selecting||i.touchData.selecting)){var w=i.cy.zoom(),_=c.core("selection-box-border-width").value/w;g.lineWidth=_,g.fillStyle="rgba("+c.core("selection-box-color").value[0]+","+c.core("selection-box-color").value[1]+","+c.core("selection-box-color").value[2]+","+c.core("selection-box-opacity").value+")",g.fillRect(i.selection[0],i.selection[1],i.selection[2]-i.selection[0],i.selection[3]-i.selection[1]),_>0&&(g.strokeStyle="rgba("+c.core("selection-box-border-color").value[0]+","+c.core("selection-box-border-color").value[1]+","+c.core("selection-box-border-color").value[2]+","+c.core("selection-box-opacity").value+")",g.strokeRect(i.selection[0],i.selection[1],i.selection[2]-i.selection[0],i.selection[3]-i.selection[1]))}if(u.bgActivePosistion&&!i.hoverData.selecting){var w=i.cy.zoom(),E=u.bgActivePosistion;g.fillStyle="rgba("+c.core("active-bg-color").value[0]+","+c.core("active-bg-color").value[1]+","+c.core("active-bg-color").value[2]+","+c.core("active-bg-opacity").value+")",g.beginPath(),g.arc(E.x,E.y,c.core("active-bg-size").pfValue/w,0,2*Math.PI),g.fill()}var k=i.lastRedrawTime;if(i.showFps&&k){k=Math.round(k);var I=Math.round(1e3/k),C="1 frame = "+k+" ms = "+I+" fps";if(g.setTransform(1,0,0,1,0,0),g.fillStyle="rgba(255, 0, 0, 0.75)",g.strokeStyle="rgba(255, 0, 0, 0.75)",g.font="30px Arial",!j1){var P=g.measureText(C);j1=P.actualBoundingBoxAscent}g.fillText(C,0,j1);var A=60;g.strokeRect(0,j1+10,250,20),g.fillRect(0,j1+10,250*Math.min(I/A,1),20)}h||(v[i.SELECT_BOX]=!1)}};function wH(r,t,i){var a=r.createShader(t);if(r.shaderSource(a,i),r.compileShader(a),!r.getShaderParameter(a,r.COMPILE_STATUS))throw new Error(r.getShaderInfoLog(a));return a}function lme(r,t,i){var a=wH(r,r.VERTEX_SHADER,t),u=wH(r,r.FRAGMENT_SHADER,i),c=r.createProgram();if(r.attachShader(c,a),r.attachShader(c,u),r.linkProgram(c),!r.getProgramParameter(c,r.LINK_STATUS))throw new Error("Could not initialize shaders");return c}function fme(r,t,i){i===void 0&&(i=t);var a=r.makeOffscreenCanvas(t,i),u=a.context=a.getContext("2d");return a.clear=function(){return u.clearRect(0,0,a.width,a.height)},a.clear(),a}function fP(r){var t=r.pixelRatio,i=r.cy.zoom(),a=r.cy.pan();return{zoom:i*t,pan:{x:a.x*t,y:a.y*t}}}function hme(r){var t=r.pixelRatio,i=r.cy.zoom();return i*t}function dme(r,t,i,a,u){var c=a*i+t.x,l=u*i+t.y;return l=Math.round(r.canvasHeight-l),[c,l]}function vme(r){return r.pstyle("background-fill").value!=="solid"||r.pstyle("background-image").strValue!=="none"?!1:r.pstyle("border-width").value===0||r.pstyle("border-opacity").value===0?!0:r.pstyle("border-style").value==="solid"}function pme(r,t){if(r.length!==t.length)return!1;for(var i=0;i<r.length;i++)if(r[i]!==t[i])return!1;return!0}function gp(r,t,i){var a=r[0]/255,u=r[1]/255,c=r[2]/255,l=t,h=i||new Array(4);return h[0]=a*l,h[1]=u*l,h[2]=c*l,h[3]=l,h}function Cb(r,t){var i=t||new Array(4);return i[0]=(r>>0&255)/255,i[1]=(r>>8&255)/255,i[2]=(r>>16&255)/255,i[3]=(r>>24&255)/255,i}function gme(r){return r[0]+(r[1]<<8)+(r[2]<<16)+(r[3]<<24)}function bme(r,t){var i=r.createTexture();return i.buffer=function(a){r.bindTexture(r.TEXTURE_2D,i),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR_MIPMAP_NEAREST),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,a),r.generateMipmap(r.TEXTURE_2D),r.bindTexture(r.TEXTURE_2D,null)},i.deleteTexture=function(){r.deleteTexture(i)},i}function _H(r,t){switch(t){case"float":return[1,r.FLOAT,4];case"vec2":return[2,r.FLOAT,4];case"vec3":return[3,r.FLOAT,4];case"vec4":return[4,r.FLOAT,4];case"int":return[1,r.INT,4];case"ivec2":return[2,r.INT,4]}}function xH(r,t,i){switch(t){case r.FLOAT:return new Float32Array(i);case r.INT:return new Int32Array(i)}}function yme(r,t,i,a,u,c){switch(t){case r.FLOAT:return new Float32Array(i.buffer,c*a,u);case r.INT:return new Int32Array(i.buffer,c*a,u)}}function mme(r,t,i,a){var u=_H(r,t),c=ja(u,2),l=c[0],h=c[1],v=xH(r,h,a),p=r.createBuffer();return r.bindBuffer(r.ARRAY_BUFFER,p),r.bufferData(r.ARRAY_BUFFER,v,r.STATIC_DRAW),h===r.FLOAT?r.vertexAttribPointer(i,l,h,!1,0,0):h===r.INT&&r.vertexAttribIPointer(i,l,h,0,0),r.enableVertexAttribArray(i),r.bindBuffer(r.ARRAY_BUFFER,null),p}function Xl(r,t,i,a){var u=_H(r,i),c=ja(u,3),l=c[0],h=c[1],v=c[2],p=xH(r,h,t*l),g=l*v,w=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,w),r.bufferData(r.ARRAY_BUFFER,t*g,r.DYNAMIC_DRAW),r.enableVertexAttribArray(a),h===r.FLOAT?r.vertexAttribPointer(a,l,h,!1,g,0):h===r.INT&&r.vertexAttribIPointer(a,l,h,g,0),r.vertexAttribDivisor(a,1),r.bindBuffer(r.ARRAY_BUFFER,null);for(var _=new Array(t),E=0;E<t;E++)_[E]=yme(r,h,p,g,l,E);return w.dataArray=p,w.stride=g,w.size=l,w.getView=function(k){return _[k]},w.setPoint=function(k,I,C){var P=_[k];P[0]=I,P[1]=C},w.bufferSubData=function(k){r.bindBuffer(r.ARRAY_BUFFER,w),k?r.bufferSubData(r.ARRAY_BUFFER,0,p,0,k*l):r.bufferSubData(r.ARRAY_BUFFER,0,p)},w}function wme(r,t,i){for(var a=9,u=new Float32Array(t*a),c=new Array(t),l=0;l<t;l++){var h=l*a*4;c[l]=new Float32Array(u.buffer,h,a)}var v=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,v),r.bufferData(r.ARRAY_BUFFER,u.byteLength,r.DYNAMIC_DRAW);for(var p=0;p<3;p++){var g=i+p;r.enableVertexAttribArray(g),r.vertexAttribPointer(g,3,r.FLOAT,!1,3*12,p*12),r.vertexAttribDivisor(g,1)}return r.bindBuffer(r.ARRAY_BUFFER,null),v.getMatrixView=function(w){return c[w]},v.setData=function(w,_){c[_].set(w,0)},v.bufferSubData=function(){r.bindBuffer(r.ARRAY_BUFFER,v),r.bufferSubData(r.ARRAY_BUFFER,0,u)},v}function _me(r){var t=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,t);var i=r.createTexture();return r.bindTexture(r.TEXTURE_2D,i),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),r.bindFramebuffer(r.FRAMEBUFFER,null),t.setFramebufferAttachmentSizes=function(a,u){r.bindTexture(r.TEXTURE_2D,i),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,a,u,0,r.RGBA,r.UNSIGNED_BYTE,null)},t}var EH=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var r=0,t=arguments.length;t--;)r+=arguments[t]*arguments[t];return Math.sqrt(r)});function hP(){var r=new EH(9);return EH!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[5]=0,r[6]=0,r[7]=0),r[0]=1,r[4]=1,r[8]=1,r}function kH(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=1,r[5]=0,r[6]=0,r[7]=0,r[8]=1,r}function xme(r,t,i){var a=t[0],u=t[1],c=t[2],l=t[3],h=t[4],v=t[5],p=t[6],g=t[7],w=t[8],_=i[0],E=i[1],k=i[2],I=i[3],C=i[4],P=i[5],A=i[6],L=i[7],O=i[8];return r[0]=_*a+E*l+k*p,r[1]=_*u+E*h+k*g,r[2]=_*c+E*v+k*w,r[3]=I*a+C*l+P*p,r[4]=I*u+C*h+P*g,r[5]=I*c+C*v+P*w,r[6]=A*a+L*l+O*p,r[7]=A*u+L*h+O*g,r[8]=A*c+L*v+O*w,r}function k2(r,t,i){var a=t[0],u=t[1],c=t[2],l=t[3],h=t[4],v=t[5],p=t[6],g=t[7],w=t[8],_=i[0],E=i[1];return r[0]=a,r[1]=u,r[2]=c,r[3]=l,r[4]=h,r[5]=v,r[6]=_*a+E*l+p,r[7]=_*u+E*h+g,r[8]=_*c+E*v+w,r}function SH(r,t,i){var a=t[0],u=t[1],c=t[2],l=t[3],h=t[4],v=t[5],p=t[6],g=t[7],w=t[8],_=Math.sin(i),E=Math.cos(i);return r[0]=E*a+_*l,r[1]=E*u+_*h,r[2]=E*c+_*v,r[3]=E*l-_*a,r[4]=E*h-_*u,r[5]=E*v-_*c,r[6]=p,r[7]=g,r[8]=w,r}function dP(r,t,i){var a=i[0],u=i[1];return r[0]=a*t[0],r[1]=a*t[1],r[2]=a*t[2],r[3]=u*t[3],r[4]=u*t[4],r[5]=u*t[5],r[6]=t[6],r[7]=t[7],r[8]=t[8],r}function Eme(r,t,i){return r[0]=2/t,r[1]=0,r[2]=0,r[3]=0,r[4]=-2/i,r[5]=0,r[6]=-1,r[7]=1,r[8]=1,r}var kme=function(){function r(t,i,a,u){wd(this,r),this.debugID=Math.floor(Math.random()*1e4),this.r=t,this.texSize=i,this.texRows=a,this.texHeight=Math.floor(i/a),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=u(t,i,i),this.scratch=u(t,i,this.texHeight,"scratch")}return _d(r,[{key:"lock",value:function(){this.locked=!0}},{key:"getKeys",value:function(){return new Set(this.keyToLocation.keys())}},{key:"getScale",value:function(i){var a=i.w,u=i.h,c=this.texHeight,l=this.texSize,h=c/u,v=a*h,p=u*h;return v>l&&(h=l/a,v=a*h,p=u*h),{scale:h,texW:v,texH:p}}},{key:"draw",value:function(i,a,u){var c=this;if(this.locked)throw new Error("can't draw, atlas is locked");var l=this.texSize,h=this.texRows,v=this.texHeight,p=this.getScale(a),g=p.scale,w=p.texW,_=p.texH,E=function(L,O){if(u&&O){var M=O.context,B=L.x,F=L.row,q=B,$=v*F;M.save(),M.translate(q,$),M.scale(g,g),u(M,a),M.restore()}},k=[null,null],I=function(){E(c.freePointer,c.canvas),k[0]={x:c.freePointer.x,y:c.freePointer.row*v,w,h:_},k[1]={x:c.freePointer.x+w,y:c.freePointer.row*v,w:0,h:_},c.freePointer.x+=w,c.freePointer.x==l&&(c.freePointer.x=0,c.freePointer.row++)},C=function(){var L=c.scratch,O=c.canvas;L.clear(),E({x:0,row:0},L);var M=l-c.freePointer.x,B=w-M,F=v;{var q=c.freePointer.x,$=c.freePointer.row*v,Y=M;O.context.drawImage(L,0,0,Y,F,q,$,Y,F),k[0]={x:q,y:$,w:Y,h:_}}{var V=M,U=(c.freePointer.row+1)*v,G=B;O&&O.context.drawImage(L,V,0,G,F,0,U,G,F),k[1]={x:0,y:U,w:G,h:_}}c.freePointer.x=B,c.freePointer.row++},P=function(){c.freePointer.x=0,c.freePointer.row++};if(this.freePointer.x+w<=l)I();else{if(this.freePointer.row>=h-1)return!1;this.freePointer.x===l?(P(),I()):this.enableWrapping?C():(P(),I())}return this.keyToLocation.set(i,k),this.needsBuffer=!0,k}},{key:"getOffsets",value:function(i){return this.keyToLocation.get(i)}},{key:"isEmpty",value:function(){return this.freePointer.x===0&&this.freePointer.row===0}},{key:"canFit",value:function(i){if(this.locked)return!1;var a=this.texSize,u=this.texRows,c=this.getScale(i),l=c.texW;return this.freePointer.x+l>a?this.freePointer.row<u-1:!0}},{key:"bufferIfNeeded",value:function(i){this.texture||(this.texture=bme(i,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}}])}(),Sme=function(){function r(t,i,a,u){wd(this,r),this.r=t,this.texSize=i,this.texRows=a,this.createTextureCanvas=u,this.atlases=[],this.styleKeyToAtlas=new Map,this.markedKeys=new Set}return _d(r,[{key:"getKeys",value:function(){return new Set(this.styleKeyToAtlas.keys())}},{key:"_createAtlas",value:function(){var i=this.r,a=this.texSize,u=this.texRows,c=this.createTextureCanvas;return new kme(i,a,u,c)}},{key:"_getScratchCanvas",value:function(){if(!this.scratch){var i=this.r,a=this.texSize,u=this.texRows,c=this.createTextureCanvas,l=Math.floor(a/u);this.scratch=c(i,a,l,"scratch")}return this.scratch}},{key:"draw",value:function(i,a,u){var c=this.styleKeyToAtlas.get(i);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(i,a,u),this.styleKeyToAtlas.set(i,c)),c}},{key:"getAtlas",value:function(i){return this.styleKeyToAtlas.get(i)}},{key:"hasAtlas",value:function(i){return this.styleKeyToAtlas.has(i)}},{key:"markKeyForGC",value:function(i){this.markedKeys.add(i)}},{key:"gc",value:function(){var i=this,a=this.markedKeys;if(a.size===0){console.log("nothing to garbage collect");return}var u=[],c=new Map,l=null,h=Zo(this.atlases),v;try{var p=function(){var w=v.value,_=w.getKeys(),E=Tme(a,_);if(E.size===0)return u.push(w),_.forEach(function(M){return c.set(M,w)}),1;l||(l=i._createAtlas(),u.push(l));var k=Zo(_),I;try{for(k.s();!(I=k.n()).done;){var C=I.value;if(!E.has(C)){var P=w.getOffsets(C),A=ja(P,2),L=A[0],O=A[1];l.canFit({w:L.w+O.w,h:L.h})||(l.lock(),l=i._createAtlas(),u.push(l)),w.canvas&&(i._copyTextureToNewAtlas(C,w,l),c.set(C,l))}}}catch(M){k.e(M)}finally{k.f()}w.dispose()};for(h.s();!(v=h.n()).done;)p()}catch(g){h.e(g)}finally{h.f()}this.atlases=u,this.styleKeyToAtlas=c,this.markedKeys=new Set}},{key:"_copyTextureToNewAtlas",value:function(i,a,u){var c=a.getOffsets(i),l=ja(c,2),h=l[0],v=l[1];if(v.w===0)u.draw(i,h,function(_){_.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,v.x,v.y,v.w,v.h,h.w,0,v.w,v.h);var g=h.w+v.w,w=h.h;u.draw(i,{w:g,h:w},function(_){_.drawImage(p,0,0,g,w,0,0,g,w)})}}},{key:"getCounts",value:function(){return{keyCount:this.styleKeyToAtlas.size,atlasCount:new Set(this.styleKeyToAtlas.values()).size}}}])}();function Tme(r,t){return r.intersection?r.intersection(t):new Set(Tx(r).filter(function(i){return t.has(i)}))}var Rme=function(){function r(t,i){wd(this,r),this.r=t,this.globalOptions=i,this.atlasSize=i.webglTexSize,this.maxAtlasesPerBatch=i.webglTexPerBatch,this.renderTypes=new Map,this.collections=new Map,this.typeAndIdToKey=new Map}return _d(r,[{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"addAtlasCollection",value:function(i,a){var u=this.globalOptions,c=u.webglTexSize,l=u.createTextureCanvas,h=a.texRows,v=this._cacheScratchCanvas(l),p=new Sme(this.r,c,h,v);this.collections.set(i,p)}},{key:"addRenderType",value:function(i,a){var u=a.collection;if(!this.collections.has(u))throw new Error("invalid atlas collection name '".concat(u,"'"));var c=this.collections.get(u),l=yn({type:i,atlasCollection:c},a);this.renderTypes.set(i,l)}},{key:"getRenderTypeOpts",value:function(i){return this.renderTypes.get(i)}},{key:"getAtlasCollection",value:function(i){return this.collections.get(i)}},{key:"_cacheScratchCanvas",value:function(i){var a=-1,u=-1,c=null;return function(l,h,v,p){return p?((!c||h!=a||v!=u)&&(a=h,u=v,c=i(l,h,v)),c):i(l,h,v)}}},{key:"_key",value:function(i,a){return"".concat(i,"-").concat(a)}},{key:"invalidate",value:function(i){var a=this,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=u.forceRedraw,l=c===void 0?!1:c,h=u.filterEle,v=h===void 0?function(){return!0}:h,p=u.filterType,g=p===void 0?function(){return!0}:p,w=!1,_=!1,E=Zo(i),k;try{for(E.s();!(k=E.n()).done;){var I=k.value;if(v(I)){var C=Zo(this.renderTypes.values()),P;try{var A=function(){var O=P.value,M=O.type;if(g(M)){var B=a.collections.get(O.collection),F=O.getKey(I),q=Array.isArray(F)?F:[F];if(l)q.forEach(function(U){return B.markKeyForGC(U)}),_=!0;else{var $=O.getID?O.getID(I):I.id(),Y=a._key(M,$),V=a.typeAndIdToKey.get(Y);V!==void 0&&!pme(q,V)&&(w=!0,a.typeAndIdToKey.delete(Y),V.forEach(function(U){return B.markKeyForGC(U)}))}}};for(C.s();!(P=C.n()).done;)A()}catch(L){C.e(L)}finally{C.f()}}}}catch(L){E.e(L)}finally{E.f()}return _&&(this.gc(),w=!1),w}},{key:"gc",value:function(){var i=Zo(this.collections.values()),a;try{for(i.s();!(a=i.n()).done;){var u=a.value;u.gc()}}catch(c){i.e(c)}finally{i.f()}}},{key:"getOrCreateAtlas",value:function(i,a,u,c){var l=this.renderTypes.get(a),h=this.collections.get(l.collection),v=!1,p=h.draw(c,u,function(_){l.drawClipped?(_.save(),_.beginPath(),_.rect(0,0,u.w,u.h),_.clip(),l.drawElement(_,i,u,!0,!0),_.restore()):l.drawElement(_,i,u,!0,!0),v=!0});if(v){var g=l.getID?l.getID(i):i.id(),w=this._key(a,g);this.typeAndIdToKey.has(w)?this.typeAndIdToKey.get(w).push(c):this.typeAndIdToKey.set(w,[c])}return p}},{key:"getAtlasInfo",value:function(i,a){var u=this,c=this.renderTypes.get(a),l=c.getKey(i),h=Array.isArray(l)?l:[l];return h.map(function(v){var p=c.getBoundingBox(i,v),g=u.getOrCreateAtlas(i,a,p,v),w=g.getOffsets(v),_=ja(w,2),E=_[0],k=_[1];return{atlas:g,tex:E,tex1:E,tex2:k,bb:p}})}},{key:"getDebugInfo",value:function(){var i=[],a=Zo(this.collections),u;try{for(a.s();!(u=a.n()).done;){var c=ja(u.value,2),l=c[0],h=c[1],v=h.getCounts(),p=v.keyCount,g=v.atlasCount;i.push({type:l,keyCount:p,atlasCount:g})}}catch(w){a.e(w)}finally{a.f()}return i}}])}(),Ime=function(){function r(t){wd(this,r),this.globalOptions=t,this.atlasSize=t.webglTexSize,this.maxAtlasesPerBatch=t.webglTexPerBatch,this.batchAtlases=[]}return _d(r,[{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(i,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(i){return this.batchAtlases.length===this.maxAtlasesPerBatch?this.batchAtlases.includes(i):!0}},{key:"getAtlasIndexForBatch",value:function(i){var a=this.batchAtlases.indexOf(i);if(a<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(i),a=this.batchAtlases.length-1}return a}}])}(),Cme=`
18
+ float circleSD(vec2 p, float r) {
19
+ return distance(vec2(0), p) - r; // signed distance
20
+ }
21
+ `,Ame=`
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
+ `,Pme=`
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
+ `,Lme=`
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
+ `,B1={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},S2={IGNORE:1,USE_BB:2},vP=0,TH=1,RH=2,pP=3,Ab=4,T2=5,q1=6,F1=7,Nme=function(){function r(t,i,a){wd(this,r),this.r=t,this.gl=i,this.maxInstances=a.webglBatchSize,this.atlasSize=a.webglTexSize,this.bgColor=a.bgColor,this.debug=a.webglDebug,this.batchDebugInfo=[],a.enableWrapping=!0,a.createTextureCanvas=fme,this.atlasManager=new Rme(t,a),this.batchManager=new Ime(a),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(B1.SCREEN),this.pickingProgram=this._createShaderProgram(B1.PICKING),this.vao=this._createVAO()}return _d(r,[{key:"addAtlasCollection",value:function(i,a){this.atlasManager.addAtlasCollection(i,a)}},{key:"addTextureAtlasRenderType",value:function(i,a){this.atlasManager.addRenderType(i,a)}},{key:"addSimpleShapeRenderType",value:function(i,a){this.simpleShapeOptions.set(i,a)}},{key:"invalidate",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=a.type,c=this.atlasManager;return u?c.invalidate(i,{filterType:function(h){return h===u},forceRedraw:!0}):c.invalidate(i)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(i){var a=this.gl,u=`#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(Ab," || aVertType == ").concat(F1,`
119
+ || aVertType == `).concat(T2," || aVertType == ").concat(q1,`) { // 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(TH,`) {
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(RH,`) {
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(pP,` && 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(),l=`#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(Cme,`
244
+ `).concat(Ame,`
245
+ `).concat(Pme,`
246
+ `).concat(Lme,`
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(pP,`) {
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(Ab,` && 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(Ab," || vVertType == ").concat(F1,`
276
+ || vVertType == `).concat(T2," || vVertType == ").concat(q1,`) { // 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(Ab,`) {
288
+ d = rectangleSD(p, b);
289
+ } else if(vVertType == `).concat(F1,` && w == h) {
290
+ d = circleSD(p, b.x); // faster than ellipse
291
+ } else if(vVertType == `).concat(F1,`) {
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(i.picking?`if(outColor.a == 0.0) discard;
329
+ else outColor = vIndex;`:"",`
330
+ }
331
+ `),h=lme(a,u,l);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 v=0;v<this.batchManager.getMaxAtlasesPerBatch();v++)h.uTextures.push(a.getUniformLocation(h,"uTexture".concat(v)));return h}},{key:"_createVAO",value:function(){var i=[0,0,1,0,1,1,0,0,1,1,0,1];this.vertexCount=i.length/2;var a=this.maxInstances,u=this.gl,c=this.program,l=u.createVertexArray();return u.bindVertexArray(l),mme(u,"vec2",c.aPosition,i),this.transformBuffer=wme(u,a,c.aTransform),this.indexBuffer=Xl(u,a,"vec4",c.aIndex),this.vertTypeBuffer=Xl(u,a,"int",c.aVertType),this.atlasIdBuffer=Xl(u,a,"int",c.aAtlasId),this.texBuffer=Xl(u,a,"vec4",c.aTex),this.pointAPointBBuffer=Xl(u,a,"vec4",c.aPointAPointB),this.pointCPointDBuffer=Xl(u,a,"vec4",c.aPointCPointD),this.lineWidthBuffer=Xl(u,a,"vec2",c.aLineWidth),this.colorBuffer=Xl(u,a,"vec4",c.aColor),this.cornerRadiusBuffer=Xl(u,a,"vec4",c.aCornerRadius),this.borderColorBuffer=Xl(u,a,"vec4",c.aBorderColor),u.bindVertexArray(null),l}},{key:"buffers",get:function(){var i=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(a){return Ed(a,"Buffer")}).map(function(a){return i[a]})),this._buffers}},{key:"startFrame",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:B1.SCREEN;this.panZoomMatrix=i,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(i,a){return i.visible()?a&&a.isVisible?a.isVisible(i):!0:!1}},{key:"drawTexture",value:function(i,a,u){var c=this.atlasManager,l=this.batchManager,h=c.getRenderTypeOpts(u);if(this._isVisible(i,h)&&!(i.isEdge()&&!this._isValidEdge(i))){if(this.renderTarget.picking&&h.getTexPickingMode){var v=h.getTexPickingMode(i);if(v===S2.IGNORE)return;if(v==S2.USE_BB){this.drawPickingRectangle(i,a,u);return}}var p=c.getAtlasInfo(i,u),g=Zo(p),w;try{for(g.s();!(w=g.n()).done;){var _=w.value,E=_.atlas,k=_.tex1,I=_.tex2;l.canAddToCurrentBatch(E)||this.endBatch();for(var C=l.getAtlasIndexForBatch(E),P=0,A=[[k,!0],[I,!1]];P<A.length;P++){var L=ja(A[P],2),O=L[0],M=L[1];if(O.w!=0){var B=this.instanceCount;this.vertTypeBuffer.getView(B)[0]=vP;var F=this.indexBuffer.getView(B);Cb(a,F);var q=this.atlasIdBuffer.getView(B);q[0]=C;var $=this.texBuffer.getView(B);$[0]=O.x,$[1]=O.y,$[2]=O.w,$[3]=O.h;var Y=this.transformBuffer.getMatrixView(B);this.setTransformMatrix(i,Y,h,_,M),this.instanceCount++,M||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(V){g.e(V)}finally{g.f()}}}},{key:"setTransformMatrix",value:function(i,a,u,c){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,h=0;if(u.shapeProps&&u.shapeProps.padding&&(h=i.pstyle(u.shapeProps.padding).pfValue),c){var v=c.bb,p=c.tex1,g=c.tex2,w=p.w/(p.w+g.w);l||(w=1-w);var _=this._getAdjustedBB(v,h,l,w);this._applyTransformMatrix(a,_,u,i)}else{var E=u.getBoundingBox(i),k=this._getAdjustedBB(E,h,!0,1);this._applyTransformMatrix(a,k,u,i)}}},{key:"_applyTransformMatrix",value:function(i,a,u,c){var l,h;kH(i);var v=u.getRotation?u.getRotation(c):0;if(v!==0){var p=u.getRotationPoint(c),g=p.x,w=p.y;k2(i,i,[g,w]),SH(i,i,v);var _=u.getRotationOffset(c);l=_.x+(a.xOffset||0),h=_.y+(a.yOffset||0)}else l=a.x1,h=a.y1;k2(i,i,[l,h]),dP(i,i,[a.w,a.h])}},{key:"_getAdjustedBB",value:function(i,a,u,c){var l=i.x1,h=i.y1,v=i.w,p=i.h,g=i.yOffset;a&&(l-=a,h-=a,v+=2*a,p+=2*a);var w=0,_=v*c;return u&&c<1?v=_:!u&&c<1&&(w=v-_,l+=w,v=_),{x1:l,y1:h,w:v,h:p,xOffset:w,yOffset:g}}},{key:"drawPickingRectangle",value:function(i,a,u){var c=this.atlasManager.getRenderTypeOpts(u),l=this.instanceCount;this.vertTypeBuffer.getView(l)[0]=Ab;var h=this.indexBuffer.getView(l);Cb(a,h);var v=this.colorBuffer.getView(l);gp([0,0,0],1,v);var p=this.transformBuffer.getMatrixView(l);this.setTransformMatrix(i,p,c),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(i,a,u){var c=this.simpleShapeOptions.get(u);if(this._isVisible(i,c)){var l=c.shapeProps,h=this._getVertTypeForShape(i,l.shape);if(h===void 0||c.isSimple&&!c.isSimple(i)){this.drawTexture(i,a,u);return}var v=this.instanceCount;if(this.vertTypeBuffer.getView(v)[0]=h,h===T2||h===q1){var p=c.getBoundingBox(i),g=this._getCornerRadius(i,l.radius,p),w=this.cornerRadiusBuffer.getView(v);w[0]=g,w[1]=g,w[2]=g,w[3]=g,h===q1&&(w[0]=0,w[2]=0)}var _=this.indexBuffer.getView(v);Cb(a,_);var E=i.pstyle(l.color).value,k=i.pstyle(l.opacity).value,I=this.colorBuffer.getView(v);gp(E,k,I);var C=this.lineWidthBuffer.getView(v);if(C[0]=0,C[1]=0,l.border){var P=i.pstyle("border-width").value;if(P>0){var A=i.pstyle("border-color").value,L=i.pstyle("border-opacity").value,O=this.borderColorBuffer.getView(v);gp(A,L,O);var M=i.pstyle("border-position").value;if(M==="inside")C[0]=0,C[1]=-P;else if(M==="outside")C[0]=P,C[1]=0;else{var B=P/2;C[0]=B,C[1]=-B}}}var F=this.transformBuffer.getMatrixView(v);this.setTransformMatrix(i,F,c),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"_getVertTypeForShape",value:function(i,a){var u=i.pstyle(a).value;switch(u){case"rectangle":return Ab;case"ellipse":return F1;case"roundrectangle":case"round-rectangle":return T2;case"bottom-round-rectangle":return q1;default:return}}},{key:"_getCornerRadius",value:function(i,a,u){var c=u.w,l=u.h;if(i.pstyle(a).value==="auto")return Id(c,l);var h=i.pstyle(a).pfValue,v=c/2,p=l/2;return Math.min(h,p,v)}},{key:"drawEdgeArrow",value:function(i,a,u){if(i.visible()){var c=i._private.rscratch,l,h,v;if(u==="source"?(l=c.arrowStartX,h=c.arrowStartY,v=c.srcArrowAngle):(l=c.arrowEndX,h=c.arrowEndY,v=c.tgtArrowAngle),!(isNaN(l)||l==null||isNaN(h)||h==null||isNaN(v)||v==null)){var p=i.pstyle(u+"-arrow-shape").value;if(p!=="none"){var g=i.pstyle(u+"-arrow-color").value,w=i.pstyle("opacity").value,_=i.pstyle("line-opacity").value,E=w*_,k=i.pstyle("width").pfValue,I=i.pstyle("arrow-scale").value,C=this.r.getArrowWidth(k,I),P=this.instanceCount,A=this.transformBuffer.getMatrixView(P);kH(A),k2(A,A,[l,h]),dP(A,A,[C,C]),SH(A,A,v),this.vertTypeBuffer.getView(P)[0]=pP;var L=this.indexBuffer.getView(P);Cb(a,L);var O=this.colorBuffer.getView(P);gp(g,E,O),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"drawEdgeLine",value:function(i,a){if(i.visible()){var u=this._getEdgePoints(i);if(u){var c=i.pstyle("opacity").value,l=i.pstyle("line-opacity").value,h=i.pstyle("width").pfValue,v=i.pstyle("line-color").value,p=c*l;if(u.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),u.length==4){var g=this.instanceCount;this.vertTypeBuffer.getView(g)[0]=TH;var w=this.indexBuffer.getView(g);Cb(a,w);var _=this.colorBuffer.getView(g);gp(v,p,_);var E=this.lineWidthBuffer.getView(g);E[0]=h;var k=this.pointAPointBBuffer.getView(g);k[0]=u[0],k[1]=u[1],k[2]=u[2],k[3]=u[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var I=0;I<u.length-2;I+=2){var C=this.instanceCount;this.vertTypeBuffer.getView(C)[0]=RH;var P=this.indexBuffer.getView(C);Cb(a,P);var A=this.colorBuffer.getView(C);gp(v,p,A);var L=this.lineWidthBuffer.getView(C);L[0]=h;var O=u[I-2],M=u[I-1],B=u[I],F=u[I+1],q=u[I+2],$=u[I+3],Y=u[I+4],V=u[I+5];I==0&&(O=2*B-q+.001,M=2*F-$+.001),I==u.length-4&&(Y=2*q-B+.001,V=2*$-F+.001);var U=this.pointAPointBBuffer.getView(C);U[0]=O,U[1]=M,U[2]=B,U[3]=F;var G=this.pointCPointDBuffer.getView(C);G[0]=q,G[1]=$,G[2]=Y,G[3]=V,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(i){var a=i._private.rscratch;return!(a.badLine||a.allpts==null||isNaN(a.allpts[0]))}},{key:"_getEdgePoints",value:function(i){var a=i._private.rscratch;if(this._isValidEdge(i)){var u=a.allpts;if(u.length==4)return u;var c=this._getNumSegments(i);return this._getCurveSegmentPoints(u,c)}}},{key:"_getNumSegments",value:function(i){var a=15;return Math.min(Math.max(a,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(i,a){if(i.length==4)return i;for(var u=Array((a+1)*2),c=0;c<=a;c++)if(c==0)u[0]=i[0],u[1]=i[1];else if(c==a)u[c*2]=i[i.length-2],u[c*2+1]=i[i.length-1];else{var l=c/a;this._setCurvePoint(i,l,u,c*2)}return u}},{key:"_setCurvePoint",value:function(i,a,u,c){if(i.length<=2)u[c]=i[0],u[c+1]=i[1];else{for(var l=Array(i.length-2),h=0;h<l.length;h+=2){var v=(1-a)*i[h]+a*i[h+2],p=(1-a)*i[h+1]+a*i[h+3];l[h]=v,l[h+1]=p}return this._setCurvePoint(l,a,u,c)}}},{key:"endBatch",value:function(){var i=this.gl,a=this.vao,u=this.vertexCount,c=this.instanceCount;if(c!==0){var l=this.renderTarget.picking?this.pickingProgram:this.program;i.useProgram(l),i.bindVertexArray(a);var h=Zo(this.buffers),v;try{for(h.s();!(v=h.n()).done;){var p=v.value;p.bufferSubData(c)}}catch(k){h.e(k)}finally{h.f()}for(var g=this.batchManager.getAtlases(),w=0;w<g.length;w++)g[w].bufferIfNeeded(i);for(var _=0;_<g.length;_++)i.activeTexture(i.TEXTURE0+_),i.bindTexture(i.TEXTURE_2D,g[_].texture),i.uniform1i(l.uTextures[_],_);i.uniform1f(l.uZoom,hme(this.r)),i.uniformMatrix3fv(l.uPanZoomMatrix,!1,this.panZoomMatrix),i.uniform1i(l.uAtlasSize,this.batchManager.getAtlasSize());var E=gp(this.bgColor,1);i.uniform4fv(l.uBGColor,E),i.drawArraysInstanced(i.TRIANGLES,0,u,c),i.bindVertexArray(null),i.bindTexture(i.TEXTURE_2D,null),this.debug&&this.batchDebugInfo.push({count:c,atlasCount:g.length}),this.startBatch()}}},{key:"getDebugInfo",value:function(){var i=this.atlasManager.getDebugInfo(),a=i.reduce(function(l,h){return l+h.atlasCount},0),u=this.batchDebugInfo,c=u.reduce(function(l,h){return l+h.count},0);return{atlasInfo:i,totalAtlases:a,wrappedCount:this.wrappedCount,simpleCount:this.simpleCount,batchCount:u.length,batchInfo:u,totalInstances:c}}}])}(),IH={};IH.initWebgl=function(r,t){var i=this,a=i.data.contexts[i.WEBGL];r.bgColor=Ome(i),r.webglTexSize=Math.min(r.webglTexSize,a.getParameter(a.MAX_TEXTURE_SIZE)),r.webglTexRows=Math.min(r.webglTexRows,54),r.webglTexRowsNodes=Math.min(r.webglTexRowsNodes,54),r.webglBatchSize=Math.min(r.webglBatchSize,16384),r.webglTexPerBatch=Math.min(r.webglTexPerBatch,a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS)),i.webglDebug=r.webglDebug,i.webglDebugShowAtlases=r.webglDebugShowAtlases,i.pickingFrameBuffer=_me(a),i.pickingFrameBuffer.needsDraw=!0,i.drawing=new Nme(i,a,r);var u=function(w){return function(_){return i.getTextAngle(_,w)}},c=function(w){return function(_){var E=_.pstyle(w);return E&&E.value}},l=function(w){return function(_){return _.pstyle("".concat(w,"-opacity")).value>0}},h=function(w){var _=w.pstyle("text-events").strValue==="yes";return _?S2.USE_BB:S2.IGNORE},v=function(w){var _=w.position(),E=_.x,k=_.y,I=w.outerWidth(),C=w.outerHeight();return{w:I,h:C,x1:E-I/2,y1:k-C/2}};i.drawing.addAtlasCollection("node",{texRows:r.webglTexRowsNodes}),i.drawing.addAtlasCollection("label",{texRows:r.webglTexRows}),i.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:t.getStyleKey,getBoundingBox:t.getElementBox,drawElement:t.drawElement}),i.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:v,isSimple:vme,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),i.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:v,isVisible:l("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),i.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:v,isVisible:l("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),i.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:h,getKey:gP(t.getLabelKey,null),getBoundingBox:bP(t.getLabelBox,null),drawClipped:!0,drawElement:t.drawLabel,getRotation:u(null),getRotationPoint:t.getLabelRotationPoint,getRotationOffset:t.getLabelRotationOffset,isVisible:c("label")}),i.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:h,getKey:gP(t.getSourceLabelKey,"source"),getBoundingBox:bP(t.getSourceLabelBox,"source"),drawClipped:!0,drawElement:t.drawSourceLabel,getRotation:u("source"),getRotationPoint:t.getSourceLabelRotationPoint,getRotationOffset:t.getSourceLabelRotationOffset,isVisible:c("source-label")}),i.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:h,getKey:gP(t.getTargetLabelKey,"target"),getBoundingBox:bP(t.getTargetLabelBox,"target"),drawClipped:!0,drawElement:t.drawTargetLabel,getRotation:u("target"),getRotationPoint:t.getTargetLabelRotationPoint,getRotationOffset:t.getTargetLabelRotationOffset,isVisible:c("target-label")});var p=h1(function(){console.log("garbage collect flag set"),i.data.gc=!0},1e4);i.onUpdateEleCalcs(function(g,w){var _=!1;w&&w.length>0&&(_|=i.drawing.invalidate(w)),_&&p()}),Dme(i)};function Ome(r){var t=r.cy.container(),i=t&&t.style&&t.style.backgroundColor||"white";return N$(i)}function CH(r,t){var i=r._private.rscratch;return eu(i,"labelWrapCachedLines",t)||[]}var gP=function(t,i){return function(a){var u=t(a),c=CH(a,i);return c.length>1?c.map(function(l,h){return"".concat(u,"_").concat(h)}):u}},bP=function(t,i){return function(a,u){var c=t(a);if(typeof u=="string"){var l=u.indexOf("_");if(l>0){var h=Number(u.substring(l+1)),v=CH(a,i),p=c.h/v.length,g=p*h,w=c.y1+g;return{x1:c.x1,w:c.w,y1:w,h:p,yOffset:g}}}return c}};function Dme(r){{var t=r.render;r.render=function(c){c=c||{};var l=r.cy;r.webgl&&(l.zoom()>cH?(Mme(r),t.call(r,c)):(jme(r),PH(r,c,B1.SCREEN)))}}{var i=r.matchCanvasSize;r.matchCanvasSize=function(c){i.call(r,c),r.pickingFrameBuffer.setFramebufferAttachmentSizes(r.canvasWidth,r.canvasHeight),r.pickingFrameBuffer.needsDraw=!0}}r.findNearestElements=function(c,l,h,v){return Hme(r,c,l)};{var a=r.invalidateCachedZSortedEles;r.invalidateCachedZSortedEles=function(){a.call(r),r.pickingFrameBuffer.needsDraw=!0}}{var u=r.notify;r.notify=function(c,l){u.call(r,c,l),c==="viewport"||c==="bounds"?r.pickingFrameBuffer.needsDraw=!0:c==="background"&&r.drawing.invalidate(l,{type:"node-body"})}}}function Mme(r){var t=r.data.contexts[r.WEBGL];t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}function jme(r){var t=function(a){a.save(),a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,r.canvasWidth,r.canvasHeight),a.restore()};t(r.data.contexts[r.NODE]),t(r.data.contexts[r.DRAG])}function Bme(r){var t=r.canvasWidth,i=r.canvasHeight,a=fP(r),u=a.pan,c=a.zoom,l=hP();k2(l,l,[u.x,u.y]),dP(l,l,[c,c]);var h=hP();Eme(h,t,i);var v=hP();return xme(v,h,l),v}function AH(r,t){var i=r.canvasWidth,a=r.canvasHeight,u=fP(r),c=u.pan,l=u.zoom;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,i,a),t.translate(c.x,c.y),t.scale(l,l)}function qme(r,t){r.drawSelectionRectangle(t,function(i){return AH(r,i)})}function Fme(r){var t=r.data.contexts[r.NODE];t.save(),AH(r,t),t.strokeStyle="rgba(0, 0, 0, 0.3)",t.beginPath(),t.moveTo(-1e3,0),t.lineTo(1e3,0),t.stroke(),t.beginPath(),t.moveTo(0,-1e3),t.lineTo(0,1e3),t.stroke(),t.restore()}function $me(r){var t=function(u,c,l){for(var h=u.atlasManager.getAtlasCollection(c),v=r.data.contexts[r.NODE],p=h.atlases,g=0;g<p.length;g++){var w=p[g],_=w.canvas;if(_){var E=_.width,k=_.height,I=E*g,C=_.height*l,P=.4;v.save(),v.scale(P,P),v.drawImage(_,I,C),v.strokeStyle="black",v.rect(I,C,E,k),v.stroke(),v.restore()}}},i=0;t(r.drawing,"node",i++),t(r.drawing,"label",i++)}function Gme(r,t,i,a,u){var c,l,h,v,p=fP(r),g=p.pan,w=p.zoom;{var _=dme(r,g,w,t,i),E=ja(_,2),k=E[0],I=E[1],C=6;c=k-C/2,l=I-C/2,h=C,v=C}if(h===0||v===0)return[];var P=r.data.contexts[r.WEBGL];P.bindFramebuffer(P.FRAMEBUFFER,r.pickingFrameBuffer),r.pickingFrameBuffer.needsDraw&&(P.viewport(0,0,P.canvas.width,P.canvas.height),PH(r,null,B1.PICKING),r.pickingFrameBuffer.needsDraw=!1);var A=h*v,L=new Uint8Array(A*4);P.readPixels(c,l,h,v,P.RGBA,P.UNSIGNED_BYTE,L),P.bindFramebuffer(P.FRAMEBUFFER,null);for(var O=new Set,M=0;M<A;M++){var B=L.slice(M*4,M*4+4),F=gme(B)-1;F>=0&&O.add(F)}return O}function Hme(r,t,i){var a=Gme(r,t,i),u=r.getCachedZSortedEles(),c,l,h=Zo(a),v;try{for(h.s();!(v=h.n()).done;){var p=v.value,g=u[p];if(!c&&g.isNode()&&(c=g),!l&&g.isEdge()&&(l=g),c&&l)break}}catch(w){h.e(w)}finally{h.f()}return[c,l].filter(Boolean)}function yP(r,t,i){var a=r.drawing;t+=1,i.isNode()?(a.drawNode(i,t,"node-underlay"),a.drawNode(i,t,"node-body"),a.drawTexture(i,t,"label"),a.drawNode(i,t,"node-overlay")):(a.drawEdgeLine(i,t),a.drawEdgeArrow(i,t,"source"),a.drawEdgeArrow(i,t,"target"),a.drawTexture(i,t,"label"),a.drawTexture(i,t,"edge-source-label"),a.drawTexture(i,t,"edge-target-label"))}function PH(r,t,i){var a;r.webglDebug&&(a=performance.now());var u=r.drawing,c=0;if(i.screen&&r.data.canvasNeedsRedraw[r.SELECT_BOX]&&qme(r,t),r.data.canvasNeedsRedraw[r.NODE]||i.picking){var l=r.data.contexts[r.WEBGL];i.screen?(l.clearColor(0,0,0,0),l.enable(l.BLEND),l.blendFunc(l.ONE,l.ONE_MINUS_SRC_ALPHA)):l.disable(l.BLEND),l.clear(l.COLOR_BUFFER_BIT|l.DEPTH_BUFFER_BIT),l.viewport(0,0,l.canvas.width,l.canvas.height);var h=Bme(r),v=r.getCachedZSortedEles();if(c=v.length,u.startFrame(h,i),i.screen){for(var p=0;p<v.nondrag.length;p++)yP(r,p,v.nondrag[p]);for(var g=0;g<v.drag.length;g++)yP(r,g,v.drag[g])}else if(i.picking)for(var w=0;w<v.length;w++)yP(r,w,v[w]);u.endFrame(),i.screen&&r.webglDebugShowAtlases&&(Fme(r),$me(r)),r.data.canvasNeedsRedraw[r.NODE]=!1,r.data.canvasNeedsRedraw[r.DRAG]=!1}if(r.webglDebug){var _=performance.now(),E=!1,k=Math.ceil(_-a),I=u.getDebugInfo(),C=["".concat(c," elements"),"".concat(I.totalInstances," instances"),"".concat(I.batchCount," batches"),"".concat(I.totalAtlases," atlases"),"".concat(I.wrappedCount," wrapped textures"),"".concat(I.simpleCount," simple shapes")].join(", ");if(E)console.log("WebGL (".concat(i.name,") - time ").concat(k,"ms, ").concat(C));else{console.log("WebGL (".concat(i.name,") - frame time ").concat(k,"ms")),console.log("Totals:"),console.log(" ".concat(C)),console.log("Texture Atlases Used:");var P=I.atlasInfo,A=Zo(P),L;try{for(A.s();!(L=A.n()).done;){var O=L.value;console.log(" ".concat(O.type,": ").concat(O.keyCount," keys, ").concat(O.atlasCount," atlases"))}}catch(M){A.e(M)}finally{A.f()}console.log("")}}r.data.gc&&(console.log("Garbage Collect!"),r.data.gc=!1,u.gc())}var Bd={};Bd.drawPolygonPath=function(r,t,i,a,u,c){var l=a/2,h=u/2;r.beginPath&&r.beginPath(),r.moveTo(t+l*c[0],i+h*c[1]);for(var v=1;v<c.length/2;v++)r.lineTo(t+l*c[v*2],i+h*c[v*2+1]);r.closePath()},Bd.drawRoundPolygonPath=function(r,t,i,a,u,c,l){l.forEach(function(h){return XG(r,h)}),r.closePath()},Bd.drawRoundRectanglePath=function(r,t,i,a,u,c){var l=a/2,h=u/2,v=c==="auto"?Id(a,u):Math.min(c,h,l);r.beginPath&&r.beginPath(),r.moveTo(t,i-h),r.arcTo(t+l,i-h,t+l,i,v),r.arcTo(t+l,i+h,t,i+h,v),r.arcTo(t-l,i+h,t-l,i,v),r.arcTo(t-l,i-h,t,i-h,v),r.lineTo(t,i-h),r.closePath()},Bd.drawBottomRoundRectanglePath=function(r,t,i,a,u,c){var l=a/2,h=u/2,v=c==="auto"?Id(a,u):c;r.beginPath&&r.beginPath(),r.moveTo(t,i-h),r.lineTo(t+l,i-h),r.lineTo(t+l,i),r.arcTo(t+l,i+h,t,i+h,v),r.arcTo(t-l,i+h,t-l,i,v),r.lineTo(t-l,i-h),r.lineTo(t,i-h),r.closePath()},Bd.drawCutRectanglePath=function(r,t,i,a,u,c,l){var h=a/2,v=u/2,p=l==="auto"?LC():l;r.beginPath&&r.beginPath(),r.moveTo(t-h+p,i-v),r.lineTo(t+h-p,i-v),r.lineTo(t+h,i-v+p),r.lineTo(t+h,i+v-p),r.lineTo(t+h-p,i+v),r.lineTo(t-h+p,i+v),r.lineTo(t-h,i+v-p),r.lineTo(t-h,i-v+p),r.closePath()},Bd.drawBarrelPath=function(r,t,i,a,u){var c=a/2,l=u/2,h=t-c,v=t+c,p=i-l,g=i+l,w=NC(a,u),_=w.widthOffset,E=w.heightOffset,k=w.ctrlPtOffsetPct*_;r.beginPath&&r.beginPath(),r.moveTo(h,p+E),r.lineTo(h,g-E),r.quadraticCurveTo(h+k,g,h+_,g),r.lineTo(v-_,g),r.quadraticCurveTo(v-k,g,v,g-E),r.lineTo(v,p+E),r.quadraticCurveTo(v-k,p,v-_,p),r.lineTo(h+_,p),r.quadraticCurveTo(h+k,p,h,p+E),r.closePath()};for(var LH=Math.sin(0),NH=Math.cos(0),mP={},wP={},OH=Math.PI/40,Pb=0*Math.PI;Pb<2*Math.PI;Pb+=OH)mP[Pb]=Math.sin(Pb),wP[Pb]=Math.cos(Pb);Bd.drawEllipsePath=function(r,t,i,a,u){if(r.beginPath&&r.beginPath(),r.ellipse)r.ellipse(t,i,a/2,u/2,0,0,2*Math.PI);else for(var c,l,h=a/2,v=u/2,p=0*Math.PI;p<2*Math.PI;p+=OH)c=t-h*mP[p]*LH+h*wP[p]*NH,l=i+v*wP[p]*LH+v*mP[p]*NH,p===0?r.moveTo(c,l):r.lineTo(c,l);r.closePath()};var $1={};$1.createBuffer=function(r,t){var i=document.createElement("canvas");return i.width=r,i.height=t,[i,i.getContext("2d")]},$1.bufferCanvasImage=function(r){var t=this.cy,i=t.mutableElements(),a=i.boundingBox(),u=this.findContainerClientCoords(),c=r.full?Math.ceil(a.w):u[2],l=r.full?Math.ceil(a.h):u[3],h=Ft(r.maxWidth)||Ft(r.maxHeight),v=this.getPixelRatio(),p=1;if(r.scale!==void 0)c*=r.scale,l*=r.scale,p=r.scale;else if(h){var g=1/0,w=1/0;Ft(r.maxWidth)&&(g=p*r.maxWidth/c),Ft(r.maxHeight)&&(w=p*r.maxHeight/l),p=Math.min(g,w),c*=p,l*=p}h||(c*=v,l*=v,p*=v);var _=document.createElement("canvas");_.width=c,_.height=l,_.style.width=c+"px",_.style.height=l+"px";var E=_.getContext("2d");if(c>0&&l>0){E.clearRect(0,0,c,l),E.globalCompositeOperation="source-over";var k=this.getCachedZSortedEles();if(r.full)E.translate(-a.x1*p,-a.y1*p),E.scale(p,p),this.drawElements(E,k),E.scale(1/p,1/p),E.translate(a.x1*p,a.y1*p);else{var I=t.pan(),C={x:I.x*p,y:I.y*p};p*=t.zoom(),E.translate(C.x,C.y),E.scale(p,p),this.drawElements(E,k),E.scale(1/p,1/p),E.translate(-C.x,-C.y)}r.bg&&(E.globalCompositeOperation="destination-over",E.fillStyle=r.bg,E.rect(0,0,c,l),E.fill())}return _};function zme(r,t){for(var i=atob(r),a=new ArrayBuffer(i.length),u=new Uint8Array(a),c=0;c<i.length;c++)u[c]=i.charCodeAt(c);return new Blob([a],{type:t})}function DH(r){var t=r.indexOf(",");return r.substr(t+1)}function MH(r,t,i){var a=function(){return t.toDataURL(i,r.quality)};switch(r.output){case"blob-promise":return new gb(function(u,c){try{t.toBlob(function(l){l!=null?u(l):c(new Error("`canvas.toBlob()` sent a null value in its callback"))},i,r.quality)}catch(l){c(l)}});case"blob":return zme(DH(a()),i);case"base64":return DH(a());case"base64uri":default:return a()}}$1.png=function(r){return MH(r,this.bufferCanvasImage(r),"image/png")},$1.jpg=function(r){return MH(r,this.bufferCanvasImage(r),"image/jpeg")};var jH={};jH.nodeShapeImpl=function(r,t,i,a,u,c,l,h){switch(r){case"ellipse":return this.drawEllipsePath(t,i,a,u,c);case"polygon":return this.drawPolygonPath(t,i,a,u,c,l);case"round-polygon":return this.drawRoundPolygonPath(t,i,a,u,c,l,h);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(t,i,a,u,c,h);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(t,i,a,u,c,l,h);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(t,i,a,u,c,h);case"barrel":return this.drawBarrelPath(t,i,a,u,c)}};var Vme=BH,ar=BH.prototype;ar.CANVAS_LAYERS=3,ar.SELECT_BOX=0,ar.DRAG=1,ar.NODE=2,ar.WEBGL=3,ar.CANVAS_TYPES=["2d","2d","2d","webgl2"],ar.BUFFER_COUNT=3,ar.TEXTURE_BUFFER=0,ar.MOTIONBLUR_BUFFER_NODE=1,ar.MOTIONBLUR_BUFFER_DRAG=2;function BH(r){var t=this,i=t.cy.window(),a=i.document;r.webgl&&(ar.CANVAS_LAYERS=t.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),t.data={canvases:new Array(ar.CANVAS_LAYERS),contexts:new Array(ar.CANVAS_LAYERS),canvasNeedsRedraw:new Array(ar.CANVAS_LAYERS),bufferCanvases:new Array(ar.BUFFER_COUNT),bufferContexts:new Array(ar.CANVAS_LAYERS)};var u="-webkit-tap-highlight-color",c="rgba(0,0,0,0)";t.data.canvasContainer=a.createElement("div");var l=t.data.canvasContainer.style;t.data.canvasContainer.style[u]=c,l.position="relative",l.zIndex="0",l.overflow="hidden";var h=r.cy.container();h.appendChild(t.data.canvasContainer),h.style[u]=c;var v={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};qpe()&&(v["-ms-touch-action"]="none",v["touch-action"]="none");for(var p=0;p<ar.CANVAS_LAYERS;p++){var g=t.data.canvases[p]=a.createElement("canvas"),w=ar.CANVAS_TYPES[p];t.data.contexts[p]=g.getContext(w),t.data.contexts[p]||qi("Could not create canvas of type "+w),Object.keys(v).forEach(function(He){g.style[He]=v[He]}),g.style.position="absolute",g.setAttribute("data-id","layer"+p),g.style.zIndex=String(ar.CANVAS_LAYERS-p),t.data.canvasContainer.appendChild(g),t.data.canvasNeedsRedraw[p]=!1}t.data.topCanvas=t.data.canvases[0],t.data.canvases[ar.NODE].setAttribute("data-id","layer"+ar.NODE+"-node"),t.data.canvases[ar.SELECT_BOX].setAttribute("data-id","layer"+ar.SELECT_BOX+"-selectbox"),t.data.canvases[ar.DRAG].setAttribute("data-id","layer"+ar.DRAG+"-drag"),t.data.canvases[ar.WEBGL]&&t.data.canvases[ar.WEBGL].setAttribute("data-id","layer"+ar.WEBGL+"-webgl");for(var p=0;p<ar.BUFFER_COUNT;p++)t.data.bufferCanvases[p]=a.createElement("canvas"),t.data.bufferContexts[p]=t.data.bufferCanvases[p].getContext("2d"),t.data.bufferCanvases[p].style.position="absolute",t.data.bufferCanvases[p].setAttribute("data-id","buffer"+p),t.data.bufferCanvases[p].style.zIndex=String(-p-1),t.data.bufferCanvases[p].style.visibility="hidden";t.pathsEnabled=!0;var _=wo(),E=function(De){return{x:(De.x1+De.x2)/2,y:(De.y1+De.y2)/2}},k=function(De){return{x:-De.w/2,y:-De.h/2}},I=function(De){var Ce=De[0]._private,Be=Ce.oldBackgroundTimestamp===Ce.backgroundTimestamp;return!Be},C=function(De){return De[0]._private.nodeKey},P=function(De){return De[0]._private.labelStyleKey},A=function(De){return De[0]._private.sourceLabelStyleKey},L=function(De){return De[0]._private.targetLabelStyleKey},O=function(De,Ce,Be,ve,ke){return t.drawElement(De,Ce,Be,!1,!1,ke)},M=function(De,Ce,Be,ve,ke){return t.drawElementText(De,Ce,Be,ve,"main",ke)},B=function(De,Ce,Be,ve,ke){return t.drawElementText(De,Ce,Be,ve,"source",ke)},F=function(De,Ce,Be,ve,ke){return t.drawElementText(De,Ce,Be,ve,"target",ke)},q=function(De){return De.boundingBox(),De[0]._private.bodyBounds},$=function(De){return De.boundingBox(),De[0]._private.labelBounds.main||_},Y=function(De){return De.boundingBox(),De[0]._private.labelBounds.source||_},V=function(De){return De.boundingBox(),De[0]._private.labelBounds.target||_},U=function(De,Ce){return Ce},G=function(De){return E(q(De))},X=function(De,Ce,Be){var ve=De?De+"-":"";return{x:Ce.x+Be.pstyle(ve+"text-margin-x").pfValue,y:Ce.y+Be.pstyle(ve+"text-margin-y").pfValue}},ne=function(De,Ce,Be){var ve=De[0]._private.rscratch;return{x:ve[Ce],y:ve[Be]}},ae=function(De){return X("",ne(De,"labelX","labelY"),De)},oe=function(De){return X("source",ne(De,"sourceLabelX","sourceLabelY"),De)},le=function(De){return X("target",ne(De,"targetLabelX","targetLabelY"),De)},pe=function(De){return k(q(De))},ge=function(De){return k(Y(De))},de=function(De){return k(V(De))},Se=function(De){var Ce=$(De),Be=k($(De));if(De.isNode()){switch(De.pstyle("text-halign").value){case"left":Be.x=-Ce.w-(Ce.leftPad||0);break;case"right":Be.x=-(Ce.rightPad||0);break}switch(De.pstyle("text-valign").value){case"top":Be.y=-Ce.h-(Ce.topPad||0);break;case"bottom":Be.y=-(Ce.botPad||0);break}}return Be},Ne=t.data.eleTxrCache=new D1(t,{getKey:C,doesEleInvalidateKey:I,drawElement:O,getBoundingBox:q,getRotationPoint:G,getRotationOffset:pe,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),ye=t.data.lblTxrCache=new D1(t,{getKey:P,drawElement:M,getBoundingBox:$,getRotationPoint:ae,getRotationOffset:Se,isVisible:U}),we=t.data.slbTxrCache=new D1(t,{getKey:A,drawElement:B,getBoundingBox:Y,getRotationPoint:oe,getRotationOffset:ge,isVisible:U}),Pe=t.data.tlbTxrCache=new D1(t,{getKey:L,drawElement:F,getBoundingBox:V,getRotationPoint:le,getRotationOffset:de,isVisible:U}),Fe=t.data.lyrTxrCache=new hH(t);t.onUpdateEleCalcs(function(De,Ce){Ne.invalidateElements(Ce),ye.invalidateElements(Ce),we.invalidateElements(Ce),Pe.invalidateElements(Ce),Fe.invalidateElements(Ce);for(var Be=0;Be<Ce.length;Be++){var ve=Ce[Be]._private;ve.oldBackgroundTimestamp=ve.backgroundTimestamp}});var Ue=function(De){for(var Ce=0;Ce<De.length;Ce++)Fe.enqueueElementRefinement(De[Ce].ele)};Ne.onDequeue(Ue),ye.onDequeue(Ue),we.onDequeue(Ue),Pe.onDequeue(Ue),r.webgl&&t.initWebgl(r,{getStyleKey:C,getLabelKey:P,getSourceLabelKey:A,getTargetLabelKey:L,drawElement:O,drawLabel:M,drawSourceLabel:B,drawTargetLabel:F,getElementBox:q,getLabelBox:$,getSourceLabelBox:Y,getTargetLabelBox:V,getElementRotationPoint:G,getElementRotationOffset:pe,getLabelRotationPoint:ae,getSourceLabelRotationPoint:oe,getTargetLabelRotationPoint:le,getLabelRotationOffset:Se,getSourceLabelRotationOffset:ge,getTargetLabelRotationOffset:de})}ar.redrawHint=function(r,t){var i=this;switch(r){case"eles":i.data.canvasNeedsRedraw[ar.NODE]=t;break;case"drag":i.data.canvasNeedsRedraw[ar.DRAG]=t;break;case"select":i.data.canvasNeedsRedraw[ar.SELECT_BOX]=t;break;case"gc":i.data.gc=!0;break}};var Ume=typeof Path2D<"u";ar.path2dEnabled=function(r){if(r===void 0)return this.pathsEnabled;this.pathsEnabled=!!r},ar.usePaths=function(){return Ume&&this.pathsEnabled},ar.setImgSmoothing=function(r,t){r.imageSmoothingEnabled!=null?r.imageSmoothingEnabled=t:(r.webkitImageSmoothingEnabled=t,r.mozImageSmoothingEnabled=t,r.msImageSmoothingEnabled=t)},ar.getImgSmoothing=function(r){return r.imageSmoothingEnabled!=null?r.imageSmoothingEnabled:r.webkitImageSmoothingEnabled||r.mozImageSmoothingEnabled||r.msImageSmoothingEnabled},ar.makeOffscreenCanvas=function(r,t){var i;if((typeof OffscreenCanvas>"u"?"undefined":es(OffscreenCanvas))!=="undefined")i=new OffscreenCanvas(r,t);else{var a=this.cy.window(),u=a.document;i=u.createElement("canvas"),i.width=r,i.height=t}return i},[vH,Kl,lh,lP,pp,jd,xo,IH,Bd,$1,jH].forEach(function(r){yn(ar,r)});var Yme=[{name:"null",impl:$G},{name:"base",impl:sH},{name:"canvas",impl:Vme}],Wme=[{type:"layout",extensions:m1e},{type:"renderer",extensions:Yme}],qH={},FH={};function $H(r,t,i){var a=i,u=function(q){Hr("Can not register `"+t+"` for `"+r+"` since `"+q+"` already exists in the prototype and can not be overridden")};if(r==="core"){if(P1.prototype[t])return u(t);P1.prototype[t]=i}else if(r==="collection"){if($s.prototype[t])return u(t);$s.prototype[t]=i}else if(r==="layout"){for(var c=function(q){this.options=q,i.call(this,q),Sr(this._private)||(this._private={}),this._private.cy=q.cy,this._private.listeners=[],this.createEmitter()},l=c.prototype=Object.create(i.prototype),h=[],v=0;v<h.length;v++){var p=h[v];l[p]=l[p]||function(){return this}}l.start&&!l.run?l.run=function(){return this.start(),this}:!l.start&&l.run&&(l.start=function(){return this.run(),this});var g=i.prototype.stop;l.stop=function(){var F=this.options;if(F&&F.animate){var q=this.animations;if(q)for(var $=0;$<q.length;$++)q[$].stop()}return g?g.call(this):this.emit("layoutstop"),this},l.destroy||(l.destroy=function(){return this}),l.cy=function(){return this._private.cy};var w=function(q){return q._private.cy},_={addEventFields:function(q,$){$.layout=q,$.cy=w(q),$.target=q},bubble:function(){return!0},parent:function(q){return w(q)}};yn(l,{createEmitter:function(){return this._private.emitter=new t2(_,this),this},emitter:function(){return this._private.emitter},on:function(q,$){return this.emitter().on(q,$),this},one:function(q,$){return this.emitter().one(q,$),this},once:function(q,$){return this.emitter().one(q,$),this},removeListener:function(q,$){return this.emitter().removeListener(q,$),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},emit:function(q,$){return this.emitter().emit(q,$),this}}),zr.eventAliasesOn(l),a=c}else if(r==="renderer"&&t!=="null"&&t!=="base"){var E=GH("renderer","base"),k=E.prototype,I=i,C=i.prototype,P=function(){E.apply(this,arguments),I.apply(this,arguments)},A=P.prototype;for(var L in k){var O=k[L],M=C[L]!=null;if(M)return u(L);A[L]=O}for(var B in C)A[B]=C[B];k.clientFunctions.forEach(function(F){A[F]=A[F]||function(){qi("Renderer does not implement `renderer."+F+"()` on its prototype")}}),a=P}else if(r==="__proto__"||r==="constructor"||r==="prototype")return qi(r+" is an illegal type to be registered, possibly lead to prototype pollutions");return O$({map:qH,keys:[r,t],value:a})}function GH(r,t){return D$({map:qH,keys:[r,t]})}function Kme(r,t,i,a,u){return O$({map:FH,keys:[r,t,i,a],value:u})}function Xme(r,t,i,a){return D$({map:FH,keys:[r,t,i,a]})}var _P=function(){if(arguments.length===2)return GH.apply(null,arguments);if(arguments.length===3)return $H.apply(null,arguments);if(arguments.length===4)return Xme.apply(null,arguments);if(arguments.length===5)return Kme.apply(null,arguments);qi("Invalid extension access syntax")};P1.prototype.extension=_P,Wme.forEach(function(r){r.extensions.forEach(function(t){$H(r.type,t.name,t.impl)})});var R2=function(){if(!(this instanceof R2))return new R2;this.length=0},bp=R2.prototype;bp.instanceString=function(){return"stylesheet"},bp.selector=function(r){var t=this.length++;return this[t]={selector:r,properties:[]},this},bp.css=function(r,t){var i=this.length-1;if(hn(r))this[i].properties.push({name:r,value:t});else if(Sr(r))for(var a=r,u=Object.keys(a),c=0;c<u.length;c++){var l=u[c],h=a[l];if(h!=null){var v=_s.properties[l]||_s.properties[Ix(l)];if(v!=null){var p=v.name,g=h;this[i].properties.push({name:p,value:g})}}}return this},bp.style=bp.css,bp.generateStyle=function(r){var t=new _s(r);return this.appendToStyle(t)},bp.appendToStyle=function(r){for(var t=0;t<this.length;t++){var i=this[t],a=i.selector,u=i.properties;r.selector(a);for(var c=0;c<u.length;c++){var l=u[c];r.css(l.name,l.value)}}return r};var Jme="3.33.1",oc=function(t){if(t===void 0&&(t={}),Sr(t))return new P1(t);if(hn(t))return _P.apply(_P,arguments)};oc.use=function(r){var t=Array.prototype.slice.call(arguments,1);return t.unshift(oc),r.apply(null,t),this},oc.warnings=function(r){return a8(r)},oc.version=Jme,oc.stylesheet=oc.Stylesheet=R2;var Lr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Lb(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Qme(r){if(r.__esModule)return r;var t=r.default;if(typeof t=="function"){var i=function a(){return this instanceof a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(r).forEach(function(a){var u=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(i,a,u.get?u:{enumerable:!0,get:function(){return r[a]}})}),i}var HH={exports:{}},xP,zH;function Zme(){if(zH)return xP;zH=1;var r="Expected a function",t="__lodash_hash_undefined__",i="[object Function]",a="[object GeneratorFunction]",u=/[\\^$.*+?()[\]{}|]/g,c=/^\[object .+?Constructor\]$/,l=typeof Lr=="object"&&Lr&&Lr.Object===Object&&Lr,h=typeof self=="object"&&self&&self.Object===Object&&self,v=l||h||Function("return this")();function p(qe,Me){return qe==null?void 0:qe[Me]}function g(qe){var Me=!1;if(qe!=null&&typeof qe.toString!="function")try{Me=!!(qe+"")}catch{}return Me}var w=Array.prototype,_=Function.prototype,E=Object.prototype,k=v["__core-js_shared__"],I=function(){var qe=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||"");return qe?"Symbol(src)_1."+qe:""}(),C=_.toString,P=E.hasOwnProperty,A=E.toString,L=RegExp("^"+C.call(P).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=w.splice,M=Ue(v,"Map"),B=Ue(Object,"create");function F(qe){var Me=-1,ot=qe?qe.length:0;for(this.clear();++Me<ot;){var dt=qe[Me];this.set(dt[0],dt[1])}}function q(){this.__data__=B?B(null):{}}function $(qe){return this.has(qe)&&delete this.__data__[qe]}function Y(qe){var Me=this.__data__;if(B){var ot=Me[qe];return ot===t?void 0:ot}return P.call(Me,qe)?Me[qe]:void 0}function V(qe){var Me=this.__data__;return B?Me[qe]!==void 0:P.call(Me,qe)}function U(qe,Me){var ot=this.__data__;return ot[qe]=B&&Me===void 0?t:Me,this}F.prototype.clear=q,F.prototype.delete=$,F.prototype.get=Y,F.prototype.has=V,F.prototype.set=U;function G(qe){var Me=-1,ot=qe?qe.length:0;for(this.clear();++Me<ot;){var dt=qe[Me];this.set(dt[0],dt[1])}}function X(){this.__data__=[]}function ne(qe){var Me=this.__data__,ot=we(Me,qe);if(ot<0)return!1;var dt=Me.length-1;return ot==dt?Me.pop():O.call(Me,ot,1),!0}function ae(qe){var Me=this.__data__,ot=we(Me,qe);return ot<0?void 0:Me[ot][1]}function oe(qe){return we(this.__data__,qe)>-1}function le(qe,Me){var ot=this.__data__,dt=we(ot,qe);return dt<0?ot.push([qe,Me]):ot[dt][1]=Me,this}G.prototype.clear=X,G.prototype.delete=ne,G.prototype.get=ae,G.prototype.has=oe,G.prototype.set=le;function pe(qe){var Me=-1,ot=qe?qe.length:0;for(this.clear();++Me<ot;){var dt=qe[Me];this.set(dt[0],dt[1])}}function ge(){this.__data__={hash:new F,map:new(M||G),string:new F}}function de(qe){return Fe(this,qe).delete(qe)}function Se(qe){return Fe(this,qe).get(qe)}function Ne(qe){return Fe(this,qe).has(qe)}function ye(qe,Me){return Fe(this,qe).set(qe,Me),this}pe.prototype.clear=ge,pe.prototype.delete=de,pe.prototype.get=Se,pe.prototype.has=Ne,pe.prototype.set=ye;function we(qe,Me){for(var ot=qe.length;ot--;)if(ve(qe[ot][0],Me))return ot;return-1}function Pe(qe){if(!je(qe)||De(qe))return!1;var Me=ke(qe)||g(qe)?L:c;return Me.test(Ce(qe))}function Fe(qe,Me){var ot=qe.__data__;return He(Me)?ot[typeof Me=="string"?"string":"hash"]:ot.map}function Ue(qe,Me){var ot=p(qe,Me);return Pe(ot)?ot:void 0}function He(qe){var Me=typeof qe;return Me=="string"||Me=="number"||Me=="symbol"||Me=="boolean"?qe!=="__proto__":qe===null}function De(qe){return!!I&&I in qe}function Ce(qe){if(qe!=null){try{return C.call(qe)}catch{}try{return qe+""}catch{}}return""}function Be(qe,Me){if(typeof qe!="function"||Me&&typeof Me!="function")throw new TypeError(r);var ot=function(){var dt=arguments,pt=Me?Me.apply(this,dt):dt[0],Lt=ot.cache;if(Lt.has(pt))return Lt.get(pt);var ut=qe.apply(this,dt);return ot.cache=Lt.set(pt,ut),ut};return ot.cache=new(Be.Cache||pe),ot}Be.Cache=pe;function ve(qe,Me){return qe===Me||qe!==qe&&Me!==Me}function ke(qe){var Me=je(qe)?A.call(qe):"";return Me==i||Me==a}function je(qe){var Me=typeof qe;return!!qe&&(Me=="object"||Me=="function")}return xP=Be,xP}var EP,VH;function ewe(){if(VH)return EP;VH=1;var r="Expected a function",t=NaN,i="[object Symbol]",a=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,l=/^0o[0-7]+$/i,h=parseInt,v=typeof Lr=="object"&&Lr&&Lr.Object===Object&&Lr,p=typeof self=="object"&&self&&self.Object===Object&&self,g=v||p||Function("return this")(),w=Object.prototype,_=w.toString,E=Math.max,k=Math.min,I=function(){return g.Date.now()};function C(B,F,q){var $,Y,V,U,G,X,ne=0,ae=!1,oe=!1,le=!0;if(typeof B!="function")throw new TypeError(r);F=M(F)||0,A(q)&&(ae=!!q.leading,oe="maxWait"in q,V=oe?E(M(q.maxWait)||0,F):V,le="trailing"in q?!!q.trailing:le);function pe(Ue){var He=$,De=Y;return $=Y=void 0,ne=Ue,U=B.apply(De,He),U}function ge(Ue){return ne=Ue,G=setTimeout(Ne,F),ae?pe(Ue):U}function de(Ue){var He=Ue-X,De=Ue-ne,Ce=F-He;return oe?k(Ce,V-De):Ce}function Se(Ue){var He=Ue-X,De=Ue-ne;return X===void 0||He>=F||He<0||oe&&De>=V}function Ne(){var Ue=I();if(Se(Ue))return ye(Ue);G=setTimeout(Ne,de(Ue))}function ye(Ue){return G=void 0,le&&$?pe(Ue):($=Y=void 0,U)}function we(){G!==void 0&&clearTimeout(G),ne=0,$=X=Y=G=void 0}function Pe(){return G===void 0?U:ye(I())}function Fe(){var Ue=I(),He=Se(Ue);if($=arguments,Y=this,X=Ue,He){if(G===void 0)return ge(X);if(oe)return G=setTimeout(Ne,F),pe(X)}return G===void 0&&(G=setTimeout(Ne,F)),U}return Fe.cancel=we,Fe.flush=Pe,Fe}function P(B,F,q){var $=!0,Y=!0;if(typeof B!="function")throw new TypeError(r);return A(q)&&($="leading"in q?!!q.leading:$,Y="trailing"in q?!!q.trailing:Y),C(B,F,{leading:$,maxWait:F,trailing:Y})}function A(B){var F=typeof B;return!!B&&(F=="object"||F=="function")}function L(B){return!!B&&typeof B=="object"}function O(B){return typeof B=="symbol"||L(B)&&_.call(B)==i}function M(B){if(typeof B=="number")return B;if(O(B))return t;if(A(B)){var F=typeof B.valueOf=="function"?B.valueOf():B;B=A(F)?F+"":F}if(typeof B!="string")return B===0?B:+B;B=B.replace(a,"");var q=c.test(B);return q||l.test(B)?h(B.slice(2),q?2:8):u.test(B)?t:+B}return EP=P,EP}(function(r,t){(function(a,u){r.exports=u(Zme(),ewe())})(Lr,function(i,a){return function(u){var c={};function l(h){if(c[h])return c[h].exports;var v=c[h]={i:h,l:!1,exports:{}};return u[h].call(v.exports,v,v.exports,l),v.l=!0,v.exports}return l.m=u,l.c=c,l.i=function(h){return h},l.d=function(h,v,p){l.o(h,v)||Object.defineProperty(h,v,{configurable:!1,enumerable:!0,get:p})},l.n=function(h){var v=h&&h.__esModule?function(){return h.default}:function(){return h};return l.d(v,"a",v),v},l.o=function(h,v){return Object.prototype.hasOwnProperty.call(h,v)},l.p="",l(l.s=12)}([function(u,c,l){u.exports=Object.assign!=null?Object.assign.bind(Object):function(h){for(var v=arguments.length,p=Array(v>1?v-1:0),g=1;g<v;g++)p[g-1]=arguments[g];return p.filter(function(w){return w!=null}).forEach(function(w){Object.keys(w).forEach(function(_){return h[_]=w[_]})}),h}},function(u,c,l){var h=l(10),v=l(0);u.exports=function(p){var g=this;return new h(v({cy:g},p))}},function(u,c,l){function h(){if(this.saveGestureState(),this.cy.zoomingEnabled(!1).panningEnabled(!1).boxSelectionEnabled(!1),this.options.disableBrowserGestures){var g=this.windowListenerOptions;window.addEventListener("touchstart",this.preventDefault,g),window.addEventListener("touchmove",this.preventDefault,g),window.addEventListener("wheel",this.preventDefault,g)}return this}function v(){if(this.cy.zoomingEnabled(this.lastZoomingEnabled).panningEnabled(this.lastPanningEnabled).boxSelectionEnabled(this.lastBoxSelectionEnabled),this.options.disableBrowserGestures){var g=this.windowListenerOptions;window.removeEventListener("touchstart",this.preventDefault,g),window.removeEventListener("touchmove",this.preventDefault,g),window.removeEventListener("wheel",this.preventDefault,g)}return this}function p(){var g=this.cy;return this.lastPanningEnabled=g.panningEnabled(),this.lastZoomingEnabled=g.zoomingEnabled(),this.lastBoxSelectionEnabled=g.boxSelectionEnabled(),this}u.exports={disableGestures:h,resetGestures:v,saveGestureState:p}},function(u,c,l){function h(){var v=this,p=this.cy,g=this.options;return this.addListener(p,"drag",function(){return v.grabbingNode=!0}),this.addListener(p,"free",function(){return v.grabbingNode=!1}),this.addListener(p,"tapstart","node",function(w){var _=w.target;v.drawMode&&v.start(_)}),this.addListener(p,"tapdrag",function(w){v.update(w.position)}),this.addListener(p,"tapdragover","node",function(w){g.snap||v.preview(w.target)}),this.addListener(p,"tapdragout","node",function(w){g.snap||v.unpreview(w.target)}),this.addListener(p,"tapend",function(){v.stop()}),this}u.exports={addCytoscapeListeners:h}},function(u,c,l){var h={canConnect:function(p,g){return!p.same(g)},edgeParams:function(p,g){return{}},hoverDelay:150,snap:!0,snapThreshold:50,snapFrequency:15,noEdgeEventsInDraw:!0,disableBrowserGestures:!0};u.exports=h},function(u,c,l){function h(g){var w=this.cy;return this.drawMode=g??!this.drawMode,this.drawMode?(this.prevUngrabifyState=w.autoungrabify(),w.autoungrabify(!0),this.emit("drawon")):(w.autoungrabify(this.prevUngrabifyState),this.emit("drawoff")),this}function v(){return this.toggleDrawMode(!0)}function p(){return this.toggleDrawMode(!1)}u.exports={toggleDrawMode:h,enableDrawMode:v,disableDrawMode:p}},function(u,c,l){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},v=l(0),p=function(A){return(typeof A>"u"?"undefined":h(A))===h("")},g=function(A){return(typeof A>"u"?"undefined":h(A))===h([])&&A.length!=null};function w(P,A,L){var O={};return v(O,A,P),v(O.data,A.data,P.data),p(A.classes)?O.classes=A.classes+" "+L:g(A.classes)?O.classes=A.classes.join(" ")+" "+L:O.classes=L,O}function _(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,A=this.cy;this.options;var L=this.presumptiveTargets,O=this.previewEles,M=this.active,B=this.sourceNode,F=this.targetNode,q=P?"eh-preview":"",$=A.collection(),Y=this.canConnect(F);if(M&&Y){if(!F||F.size()===0){O.remove(),this.emit("cancel",this.mp(),B,L);return}if(!P){O.removeClass("eh-preview").style("events",""),this.emit("complete",this.mp(),B,F,O);return}var V=A.add(w({group:"edges",data:{source:B.id(),target:F.id()}},this.edgeParams(F),q));return $=$.merge(V),P?(this.previewEles=$,$.style("events","no")):($.style("events",""),this.emit("complete",this.mp(),B,F,$)),this}}function E(){return this.makeEdges(!0),this}function k(){return this.previewEles.nonempty()&&this.previewEles.inside()}function I(){return this.previewShown()&&this.previewEles.remove(),this}function C(){var P=this,A=this.sourceNode,L=this.ghostNode,O=this.cy,M=this.mx,B=this.my,F=M,q=B,$=void 0,Y=void 0;if(A)return(!L||L.length===0||L.removed())&&(Y=this.ghostEles=O.collection(),O.batch(function(){L=P.ghostNode=O.add({group:"nodes",classes:"eh-ghost eh-ghost-node",position:{x:0,y:0}}),L.style({"background-color":"blue",width:1e-4,height:1e-4,opacity:0,events:"no"});var V={};$=O.add(v({},V,{group:"edges",data:v({},V.data,{source:A.id(),target:L.id()}),classes:"eh-ghost eh-ghost-edge"})),$.style({events:"no"})}),Y.merge(L).merge($)),L.position({x:F,y:q}),this}u.exports={makeEdges:_,makePreview:E,removePreview:I,previewShown:k,updateEdge:C}},function(u,c,l){function h(){return this.options.noEdgeEventsInDraw&&this.cy.edges().style("events","no"),this}function v(){return this.options.noEdgeEventsInDraw&&this.cy.edges().style("events",""),this}u.exports={disableEdgeEvents:h,enableEdgeEvents:v}},function(u,c,l){function h(){return this.enabled=!0,this.emit("enable"),this}function v(){return this.enabled=!1,this.emit("disable"),this}u.exports={enable:h,disable:v}},function(u,c,l){var h=l(13),v=Math.sqrt(2);function p(A){var L=this.previewEles,O=this.ghostEles,M=function(U){return L.anySame(U)},B=function(U){return O.anySame(U)},F=function(U){return M(U)||B(U)},q=this.enabled,$=this.active,Y=this.grabbingNode;return q&&!$&&!Y&&A!=null&&A.nonempty()&&!F(A)}function g(A){return this.canStartOn(A)&&this.drawMode}function w(A){return this.canStartOn(A)&&!this.drawMode}function _(A){var L=this;if(this.canStartOn(A)){this.active=!0,this.sourceNode=A,this.sourceNode.addClass("eh-source"),this.disableGestures(),this.disableEdgeEvents();var O=function(B){return B.id()};this.canConnect=h(function(M){return L.options.canConnect(L.sourceNode,M)},O),this.edgeParams=h(function(M){return L.options.edgeParams(L.sourceNode,M)},O),this.emit("start",this.hp(),A)}}function E(A){if(this.active){var L=A;return this.mx=L.x,this.my=L.y,this.updateEdge(),this.throttledSnap(),this}}function k(){if(!this.active||!this.options.snap)return!1;var A=this.cy,L=this.targetNode,O=this.options.snapThreshold,M=this.mp(),B=this.previewEles,F=this.ghostNode,q=function(we){return v*Math.max(we.outerWidth(),we.outerHeight())/2},$=function(we,Pe,Fe,Ue){var He=Fe-we,De=Ue-Pe;return He*He+De*De},Y=function(we,Pe){return $(we.x,we.y,Pe.x,Pe.y)},V=function(we){return Y(we.position(),M)},U=function(we){var Pe=q(we),Fe=Pe+O;return Fe*Fe},G=function(we){return V(we)<=U(we)},X=function(we){var Pe=we.position(),Fe=we.outerWidth()/2,Ue=we.outerHeight()/2,He=Pe.x,De=Pe.y,Ce=M.x,Be=M.y,ve=He-Fe,ke=He+Fe,je=De-Ue,qe=De+Ue,Me=ve<=Ce&&Ce<=ke,ot=je<=Be&&Be<=qe;if(Me&&ot)return 0;if(Me){var dt=Be-je,pt=Be-qe;return Math.min(dt*dt,pt*pt)}else if(ot){var Lt=Ce-ve,ut=Ce-ke;return Math.min(Lt*Lt,ut*ut)}else return Ce<ve&&Be<je?$(Ce,Be,ve,je):Ce>ke&&Be<je?$(Ce,Be,ke,je):Ce<ve&&Be>qe?$(Ce,Be,ve,qe):$(Ce,Be,ke,qe)},ne=function(we,Pe){return X(we)-X(Pe)},ae=ne,oe=!1,le=function(we){var Pe=M,Fe=we.outerWidth(),Ue=Fe/2,He=we.outerHeight(),De=He/2,Ce=we.position(),Be=Ce.x-Ue,ve=Ce.x+Ue,ke=Ce.y-De,je=Ce.y+De;return Be<=Pe.x&&Pe.x<=ve&&ke<=Pe.y&&Pe.y<=je},pe=function(we){return we.same(B)||we.same(F)},ge=A.nodes(function(ye){return!pe(ye)&&G(ye)}).sort(ae),de=!1;L.nonempty()&&!G(L)&&this.unpreview(L);for(var Se=0;Se<ge.length;Se++){var Ne=ge[Se];if(!(Ne.isParent()&&le(Ne))&&!(Ne.isChild()&&!le(Ne.parent()))&&(Ne.same(L)||this.preview(Ne,oe))){de=!0;break}}return de}function I(A){var L=this,O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,M=this.options,B=this.sourceNode,F=this.ghostNode,q=this.ghostEles,$=this.presumptiveTargets,Y=this.previewEles,V=this.active,U=B,G=A.same(F),X=!this.canConnect(A),ne=A.same(this.targetNode);if(!V||G||X||ne)return!1;this.targetNode.nonempty()&&this.unpreview(this.targetNode),clearTimeout(this.previewTimeout);var ae=function(){L.targetNode=A,$.merge(A),A.addClass("eh-presumptive-target"),A.addClass("eh-target"),L.emit("hoverover",L.mp(),U,A),A.addClass("eh-preview"),q.addClass("eh-preview-active"),B.addClass("eh-preview-active"),A.addClass("eh-preview-active"),L.makePreview(),L.emit("previewon",L.mp(),U,A,Y)};return O&&M.hoverDelay>0?this.previewTimeout=setTimeout(ae,M.hoverDelay):ae(),!0}function C(A){if(this.active){var L=this.previewTimeout,O=this.sourceNode,M=this.previewEles,B=this.ghostEles,F=this.cy;clearTimeout(L),this.previewTimeout=null;var q=O;return A.removeClass("eh-preview eh-target eh-presumptive-target eh-preview-active"),B.removeClass("eh-preview-active"),O.removeClass("eh-preview-active"),this.targetNode=F.collection(),this.removePreview(q,A),this.emit("hoverout",this.mp(),q,A),this.emit("previewoff",this.mp(),q,A,M),this}}function P(){if(this.active){var A=this.sourceNode,L=this.targetNode,O=this.ghostEles,M=this.presumptiveTargets;return clearTimeout(this.previewTimeout),A.removeClass("eh-source eh-preview-active"),L.removeClass("eh-target eh-preview eh-hover eh-preview-active"),M.removeClass("eh-presumptive-target"),this.makeEdges(),O.remove(),this.clearCollections(),this.resetGestures(),this.enableEdgeEvents(),this.active=!1,this.emit("stop",this.mp(),A),this}}u.exports={start:_,update:E,preview:I,unpreview:C,stop:P,snap:k,canStartOn:p,canStartDrawModeOn:g,canStartNonDrawModeOn:w}},function(u,c,l){var h=l(4),v=l(0),p=l(14),g=l(2),w=l(3),_=l(5),E=l(6),k=l(8),I=l(9),C=l(11),P=l(7);function A(M){var B=M.cy;this.cy=B,this.listeners=[],this.enabled=!0,this.drawMode=!1,this.active=!1,this.grabbingNode=!1,this.clearCollections(),this.mx=0,this.my=0,this.options=v({},h,M),this.saveGestureState(),this.addListeners(),this.throttledSnap=p(this.snap.bind(this),1e3/M.snapFrequency),this.preventDefault=function($){return $.preventDefault()},this.canConnect=function(){return!1};var F=!1;try{var q=Object.defineProperty({},"passive",{get:function(){F=!0}});window.addEventListener("test",null,q)}catch{}F?this.windowListenerOptions={capture:!0,passive:!1}:this.windowListenerOptions=!0}var L=A.prototype={},O=function(B){return v(L,B)};L.destroy=function(){this.removeListeners()},L.setOptions=function(M){v(this.options,M)},L.mp=function(){return{x:this.mx,y:this.my}},L.hp=function(){return{x:this.hx,y:this.hy}},L.clearCollections=function(){var M=this.cy;this.previewEles=M.collection(),this.ghostEles=M.collection(),this.ghostNode=M.collection(),this.sourceNode=M.collection(),this.targetNode=M.collection(),this.presumptiveTargets=M.collection()},[g,w,_,E,k,I,C,P].forEach(O),u.exports=A},function(u,c,l){var h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I};function v(){var I=this;return this.addCytoscapeListeners(),this.addListener(this.cy,"destroy",function(){return I.destroy()}),this}function p(){for(var I=this.listeners.length-1;I>=0;I--){var C=this.listeners[I];this.removeListener(C.target,C.event,C.selector,C.callback,C.options)}return this}function g(I,C,P,A,L){return(typeof P>"u"?"undefined":h(P))!==h("")&&(A=P,L=A,P=null),L==null&&(L=!1),{target:I,event:C,selector:P,callback:A,options:L}}function w(I){return I instanceof Element}function _(I,C,P,A,L){var O=g(I,C,P,A,L);return this.listeners.push(O),w(O.target)?O.target.addEventListener(O.event,O.callback,O.options):O.selector?O.target.addListener(O.event,O.selector,O.callback,O.options):O.target.addListener(O.event,O.callback,O.options),this}function E(I,C,P,A,L){for(var O=g(I,C,P,A,L),M=this.listeners.length-1;M>=0;M--){var B=this.listeners[M];if(O.target===B.target&&O.event===B.event&&(O.selector==null||O.selector===B.selector)&&(O.callback==null||O.callback===B.callback)){this.listeners.splice(M,1),w(O.target)?O.target.removeEventListener(O.event,O.callback,O.options):O.selector?O.target.removeListener(O.event,O.selector,O.callback,O.options):O.target.removeListener(O.event,O.callback,O.options);break}}return this}function k(I,C){for(var P=this.cy,A=arguments.length,L=Array(A>2?A-2:0),O=2;O<A;O++)L[O-2]=arguments[O];return P.emit({type:"eh"+I,position:C},L),this}u.exports={addListener:_,addListeners:v,removeListener:E,removeListeners:p,emit:k}},function(u,c,l){var h=l(1),v=function(g){g&&g("core","edgehandles",h)};typeof cytoscape<"u"&&v(cytoscape),u.exports=v},function(u,c){u.exports=i},function(u,c){u.exports=a}])})})(HH);var twe=HH.exports;const nwe=Lb(twe);var UH={exports:{}};function kP(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var SP,YH;function rwe(){if(YH)return SP;YH=1;function r(){this.__data__=[],this.size=0}return SP=r,SP}var TP,WH;function Nb(){if(WH)return TP;WH=1;function r(t,i){return t===i||t!==t&&i!==i}return TP=r,TP}var RP,KH;function I2(){if(KH)return RP;KH=1;var r=Nb();function t(i,a){for(var u=i.length;u--;)if(r(i[u][0],a))return u;return-1}return RP=t,RP}var IP,XH;function iwe(){if(XH)return IP;XH=1;var r=I2(),t=Array.prototype,i=t.splice;function a(u){var c=this.__data__,l=r(c,u);if(l<0)return!1;var h=c.length-1;return l==h?c.pop():i.call(c,l,1),--this.size,!0}return IP=a,IP}var CP,JH;function awe(){if(JH)return CP;JH=1;var r=I2();function t(i){var a=this.__data__,u=r(a,i);return u<0?void 0:a[u][1]}return CP=t,CP}var AP,QH;function swe(){if(QH)return AP;QH=1;var r=I2();function t(i){return r(this.__data__,i)>-1}return AP=t,AP}var PP,ZH;function owe(){if(ZH)return PP;ZH=1;var r=I2();function t(i,a){var u=this.__data__,c=r(u,i);return c<0?(++this.size,u.push([i,a])):u[c][1]=a,this}return PP=t,PP}var LP,ez;function C2(){if(ez)return LP;ez=1;var r=rwe(),t=iwe(),i=awe(),a=swe(),u=owe();function c(l){var h=-1,v=l==null?0:l.length;for(this.clear();++h<v;){var p=l[h];this.set(p[0],p[1])}}return c.prototype.clear=r,c.prototype.delete=t,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,LP=c,LP}var NP,tz;function uwe(){if(tz)return NP;tz=1;var r=C2();function t(){this.__data__=new r,this.size=0}return NP=t,NP}var OP,nz;function cwe(){if(nz)return OP;nz=1;function r(t){var i=this.__data__,a=i.delete(t);return this.size=i.size,a}return OP=r,OP}var DP,rz;function lwe(){if(rz)return DP;rz=1;function r(t){return this.__data__.get(t)}return DP=r,DP}var MP,iz;function fwe(){if(iz)return MP;iz=1;function r(t){return this.__data__.has(t)}return MP=r,MP}var jP,az;function sz(){if(az)return jP;az=1;var r=typeof Lr=="object"&&Lr&&Lr.Object===Object&&Lr;return jP=r,jP}var BP,oz;function Qc(){if(oz)return BP;oz=1;var r=sz(),t=typeof self=="object"&&self&&self.Object===Object&&self,i=r||t||Function("return this")();return BP=i,BP}var qP,uz;function Ob(){if(uz)return qP;uz=1;var r=Qc(),t=r.Symbol;return qP=t,qP}var FP,cz;function hwe(){if(cz)return FP;cz=1;var r=Ob(),t=Object.prototype,i=t.hasOwnProperty,a=t.toString,u=r?r.toStringTag:void 0;function c(l){var h=i.call(l,u),v=l[u];try{l[u]=void 0;var p=!0}catch{}var g=a.call(l);return p&&(h?l[u]=v:delete l[u]),g}return FP=c,FP}var $P,lz;function dwe(){if(lz)return $P;lz=1;var r=Object.prototype,t=r.toString;function i(a){return t.call(a)}return $P=i,$P}var GP,fz;function yp(){if(fz)return GP;fz=1;var r=Ob(),t=hwe(),i=dwe(),a="[object Null]",u="[object Undefined]",c=r?r.toStringTag:void 0;function l(h){return h==null?h===void 0?u:a:c&&c in Object(h)?t(h):i(h)}return GP=l,GP}var HP,hz;function uc(){if(hz)return HP;hz=1;function r(t){var i=typeof t;return t!=null&&(i=="object"||i=="function")}return HP=r,HP}var zP,dz;function G1(){if(dz)return zP;dz=1;var r=yp(),t=uc(),i="[object AsyncFunction]",a="[object Function]",u="[object GeneratorFunction]",c="[object Proxy]";function l(h){if(!t(h))return!1;var v=r(h);return v==a||v==u||v==i||v==c}return zP=l,zP}var VP,vz;function vwe(){if(vz)return VP;vz=1;var r=Qc(),t=r["__core-js_shared__"];return VP=t,VP}var UP,pz;function pwe(){if(pz)return UP;pz=1;var r=vwe(),t=function(){var a=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}();function i(a){return!!t&&t in a}return UP=i,UP}var YP,gz;function bz(){if(gz)return YP;gz=1;var r=Function.prototype,t=r.toString;function i(a){if(a!=null){try{return t.call(a)}catch{}try{return a+""}catch{}}return""}return YP=i,YP}var WP,yz;function gwe(){if(yz)return WP;yz=1;var r=G1(),t=pwe(),i=uc(),a=bz(),u=/[\\^$.*+?()[\]{}|]/g,c=/^\[object .+?Constructor\]$/,l=Function.prototype,h=Object.prototype,v=l.toString,p=h.hasOwnProperty,g=RegExp("^"+v.call(p).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function w(_){if(!i(_)||t(_))return!1;var E=r(_)?g:c;return E.test(a(_))}return WP=w,WP}var KP,mz;function bwe(){if(mz)return KP;mz=1;function r(t,i){return t==null?void 0:t[i]}return KP=r,KP}var XP,wz;function mp(){if(wz)return XP;wz=1;var r=gwe(),t=bwe();function i(a,u){var c=t(a,u);return r(c)?c:void 0}return XP=i,XP}var JP,_z;function QP(){if(_z)return JP;_z=1;var r=mp(),t=Qc(),i=r(t,"Map");return JP=i,JP}var ZP,xz;function A2(){if(xz)return ZP;xz=1;var r=mp(),t=r(Object,"create");return ZP=t,ZP}var eL,Ez;function ywe(){if(Ez)return eL;Ez=1;var r=A2();function t(){this.__data__=r?r(null):{},this.size=0}return eL=t,eL}var tL,kz;function mwe(){if(kz)return tL;kz=1;function r(t){var i=this.has(t)&&delete this.__data__[t];return this.size-=i?1:0,i}return tL=r,tL}var nL,Sz;function wwe(){if(Sz)return nL;Sz=1;var r=A2(),t="__lodash_hash_undefined__",i=Object.prototype,a=i.hasOwnProperty;function u(c){var l=this.__data__;if(r){var h=l[c];return h===t?void 0:h}return a.call(l,c)?l[c]:void 0}return nL=u,nL}var rL,Tz;function _we(){if(Tz)return rL;Tz=1;var r=A2(),t=Object.prototype,i=t.hasOwnProperty;function a(u){var c=this.__data__;return r?c[u]!==void 0:i.call(c,u)}return rL=a,rL}var iL,Rz;function xwe(){if(Rz)return iL;Rz=1;var r=A2(),t="__lodash_hash_undefined__";function i(a,u){var c=this.__data__;return this.size+=this.has(a)?0:1,c[a]=r&&u===void 0?t:u,this}return iL=i,iL}var aL,Iz;function Ewe(){if(Iz)return aL;Iz=1;var r=ywe(),t=mwe(),i=wwe(),a=_we(),u=xwe();function c(l){var h=-1,v=l==null?0:l.length;for(this.clear();++h<v;){var p=l[h];this.set(p[0],p[1])}}return c.prototype.clear=r,c.prototype.delete=t,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,aL=c,aL}var sL,Cz;function kwe(){if(Cz)return sL;Cz=1;var r=Ewe(),t=C2(),i=QP();function a(){this.size=0,this.__data__={hash:new r,map:new(i||t),string:new r}}return sL=a,sL}var oL,Az;function Swe(){if(Az)return oL;Az=1;function r(t){var i=typeof t;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?t!=="__proto__":t===null}return oL=r,oL}var uL,Pz;function P2(){if(Pz)return uL;Pz=1;var r=Swe();function t(i,a){var u=i.__data__;return r(a)?u[typeof a=="string"?"string":"hash"]:u.map}return uL=t,uL}var cL,Lz;function Twe(){if(Lz)return cL;Lz=1;var r=P2();function t(i){var a=r(this,i).delete(i);return this.size-=a?1:0,a}return cL=t,cL}var lL,Nz;function Rwe(){if(Nz)return lL;Nz=1;var r=P2();function t(i){return r(this,i).get(i)}return lL=t,lL}var fL,Oz;function Iwe(){if(Oz)return fL;Oz=1;var r=P2();function t(i){return r(this,i).has(i)}return fL=t,fL}var hL,Dz;function Cwe(){if(Dz)return hL;Dz=1;var r=P2();function t(i,a){var u=r(this,i),c=u.size;return u.set(i,a),this.size+=u.size==c?0:1,this}return hL=t,hL}var dL,Mz;function vL(){if(Mz)return dL;Mz=1;var r=kwe(),t=Twe(),i=Rwe(),a=Iwe(),u=Cwe();function c(l){var h=-1,v=l==null?0:l.length;for(this.clear();++h<v;){var p=l[h];this.set(p[0],p[1])}}return c.prototype.clear=r,c.prototype.delete=t,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,dL=c,dL}var pL,jz;function Awe(){if(jz)return pL;jz=1;var r=C2(),t=QP(),i=vL(),a=200;function u(c,l){var h=this.__data__;if(h instanceof r){var v=h.__data__;if(!t||v.length<a-1)return v.push([c,l]),this.size=++h.size,this;h=this.__data__=new i(v)}return h.set(c,l),this.size=h.size,this}return pL=u,pL}var gL,Bz;function L2(){if(Bz)return gL;Bz=1;var r=C2(),t=uwe(),i=cwe(),a=lwe(),u=fwe(),c=Awe();function l(h){var v=this.__data__=new r(h);this.size=v.size}return l.prototype.clear=t,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=u,l.prototype.set=c,gL=l,gL}var bL,qz;function yL(){if(qz)return bL;qz=1;function r(t,i){for(var a=-1,u=t==null?0:t.length;++a<u&&i(t[a],a,t)!==!1;);return t}return bL=r,bL}var mL,Fz;function $z(){if(Fz)return mL;Fz=1;var r=mp(),t=function(){try{var i=r(Object,"defineProperty");return i({},"",{}),i}catch{}}();return mL=t,mL}var wL,Gz;function N2(){if(Gz)return wL;Gz=1;var r=$z();function t(i,a,u){a=="__proto__"&&r?r(i,a,{configurable:!0,enumerable:!0,value:u,writable:!0}):i[a]=u}return wL=t,wL}var _L,Hz;function O2(){if(Hz)return _L;Hz=1;var r=N2(),t=Nb(),i=Object.prototype,a=i.hasOwnProperty;function u(c,l,h){var v=c[l];(!(a.call(c,l)&&t(v,h))||h===void 0&&!(l in c))&&r(c,l,h)}return _L=u,_L}var xL,zz;function H1(){if(zz)return xL;zz=1;var r=O2(),t=N2();function i(a,u,c,l){var h=!c;c||(c={});for(var v=-1,p=u.length;++v<p;){var g=u[v],w=l?l(c[g],a[g],g,c,a):void 0;w===void 0&&(w=a[g]),h?t(c,g,w):r(c,g,w)}return c}return xL=i,xL}var EL,Vz;function Pwe(){if(Vz)return EL;Vz=1;function r(t,i){for(var a=-1,u=Array(t);++a<t;)u[a]=i(a);return u}return EL=r,EL}var kL,Uz;function Jl(){if(Uz)return kL;Uz=1;function r(t){return t!=null&&typeof t=="object"}return kL=r,kL}var SL,Yz;function Lwe(){if(Yz)return SL;Yz=1;var r=yp(),t=Jl(),i="[object Arguments]";function a(u){return t(u)&&r(u)==i}return SL=a,SL}var TL,Wz;function z1(){if(Wz)return TL;Wz=1;var r=Lwe(),t=Jl(),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(l){return t(l)&&a.call(l,"callee")&&!u.call(l,"callee")};return TL=c,TL}var RL,Kz;function qa(){if(Kz)return RL;Kz=1;var r=Array.isArray;return RL=r,RL}var V1={exports:{}},IL,Xz;function Nwe(){if(Xz)return IL;Xz=1;function r(){return!1}return IL=r,IL}V1.exports;var Jz;function Db(){return Jz||(Jz=1,function(r,t){var i=Qc(),a=Nwe(),u=t&&!t.nodeType&&t,c=u&&!0&&r&&!r.nodeType&&r,l=c&&c.exports===u,h=l?i.Buffer:void 0,v=h?h.isBuffer:void 0,p=v||a;r.exports=p}(V1,V1.exports)),V1.exports}var CL,Qz;function D2(){if(Qz)return CL;Qz=1;var r=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function i(a,u){var c=typeof a;return u=u??r,!!u&&(c=="number"||c!="symbol"&&t.test(a))&&a>-1&&a%1==0&&a<u}return CL=i,CL}var AL,Zz;function PL(){if(Zz)return AL;Zz=1;var r=9007199254740991;function t(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=r}return AL=t,AL}var LL,eV;function Owe(){if(eV)return LL;eV=1;var r=yp(),t=PL(),i=Jl(),a="[object Arguments]",u="[object Array]",c="[object Boolean]",l="[object Date]",h="[object Error]",v="[object Function]",p="[object Map]",g="[object Number]",w="[object Object]",_="[object RegExp]",E="[object Set]",k="[object String]",I="[object WeakMap]",C="[object ArrayBuffer]",P="[object DataView]",A="[object Float32Array]",L="[object Float64Array]",O="[object Int8Array]",M="[object Int16Array]",B="[object Int32Array]",F="[object Uint8Array]",q="[object Uint8ClampedArray]",$="[object Uint16Array]",Y="[object Uint32Array]",V={};V[A]=V[L]=V[O]=V[M]=V[B]=V[F]=V[q]=V[$]=V[Y]=!0,V[a]=V[u]=V[C]=V[c]=V[P]=V[l]=V[h]=V[v]=V[p]=V[g]=V[w]=V[_]=V[E]=V[k]=V[I]=!1;function U(G){return i(G)&&t(G.length)&&!!V[r(G)]}return LL=U,LL}var NL,tV;function M2(){if(tV)return NL;tV=1;function r(t){return function(i){return t(i)}}return NL=r,NL}var U1={exports:{}};U1.exports;var nV;function OL(){return nV||(nV=1,function(r,t){var i=sz(),a=t&&!t.nodeType&&t,u=a&&!0&&r&&!r.nodeType&&r,c=u&&u.exports===a,l=c&&i.process,h=function(){try{var v=u&&u.require&&u.require("util").types;return v||l&&l.binding&&l.binding("util")}catch{}}();r.exports=h}(U1,U1.exports)),U1.exports}var DL,rV;function Y1(){if(rV)return DL;rV=1;var r=Owe(),t=M2(),i=OL(),a=i&&i.isTypedArray,u=a?t(a):r;return DL=u,DL}var ML,iV;function aV(){if(iV)return ML;iV=1;var r=Pwe(),t=z1(),i=qa(),a=Db(),u=D2(),c=Y1(),l=Object.prototype,h=l.hasOwnProperty;function v(p,g){var w=i(p),_=!w&&t(p),E=!w&&!_&&a(p),k=!w&&!_&&!E&&c(p),I=w||_||E||k,C=I?r(p.length,String):[],P=C.length;for(var A in p)(g||h.call(p,A))&&!(I&&(A=="length"||E&&(A=="offset"||A=="parent")||k&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||u(A,P)))&&C.push(A);return C}return ML=v,ML}var jL,sV;function j2(){if(sV)return jL;sV=1;var r=Object.prototype;function t(i){var a=i&&i.constructor,u=typeof a=="function"&&a.prototype||r;return i===u}return jL=t,jL}var BL,oV;function uV(){if(oV)return BL;oV=1;function r(t,i){return function(a){return t(i(a))}}return BL=r,BL}var qL,cV;function Dwe(){if(cV)return qL;cV=1;var r=uV(),t=r(Object.keys,Object);return qL=t,qL}var FL,lV;function $L(){if(lV)return FL;lV=1;var r=j2(),t=Dwe(),i=Object.prototype,a=i.hasOwnProperty;function u(c){if(!r(c))return t(c);var l=[];for(var h in Object(c))a.call(c,h)&&h!="constructor"&&l.push(h);return l}return FL=u,FL}var GL,fV;function fh(){if(fV)return GL;fV=1;var r=G1(),t=PL();function i(a){return a!=null&&t(a.length)&&!r(a)}return GL=i,GL}var HL,hV;function qd(){if(hV)return HL;hV=1;var r=aV(),t=$L(),i=fh();function a(u){return i(u)?r(u):t(u)}return HL=a,HL}var zL,dV;function Mwe(){if(dV)return zL;dV=1;var r=H1(),t=qd();function i(a,u){return a&&r(u,t(u),a)}return zL=i,zL}var VL,vV;function jwe(){if(vV)return VL;vV=1;function r(t){var i=[];if(t!=null)for(var a in Object(t))i.push(a);return i}return VL=r,VL}var UL,pV;function Bwe(){if(pV)return UL;pV=1;var r=uc(),t=j2(),i=jwe(),a=Object.prototype,u=a.hasOwnProperty;function c(l){if(!r(l))return i(l);var h=t(l),v=[];for(var p in l)p=="constructor"&&(h||!u.call(l,p))||v.push(p);return v}return UL=c,UL}var YL,gV;function wp(){if(gV)return YL;gV=1;var r=aV(),t=Bwe(),i=fh();function a(u){return i(u)?r(u,!0):t(u)}return YL=a,YL}var WL,bV;function qwe(){if(bV)return WL;bV=1;var r=H1(),t=wp();function i(a,u){return a&&r(u,t(u),a)}return WL=i,WL}var W1={exports:{}};W1.exports;var yV;function mV(){return yV||(yV=1,function(r,t){var i=Qc(),a=t&&!t.nodeType&&t,u=a&&!0&&r&&!r.nodeType&&r,c=u&&u.exports===a,l=c?i.Buffer:void 0,h=l?l.allocUnsafe:void 0;function v(p,g){if(g)return p.slice();var w=p.length,_=h?h(w):new p.constructor(w);return p.copy(_),_}r.exports=v}(W1,W1.exports)),W1.exports}var KL,wV;function _V(){if(wV)return KL;wV=1;function r(t,i){var a=-1,u=t.length;for(i||(i=Array(u));++a<u;)i[a]=t[a];return i}return KL=r,KL}var XL,xV;function EV(){if(xV)return XL;xV=1;function r(t,i){for(var a=-1,u=t==null?0:t.length,c=0,l=[];++a<u;){var h=t[a];i(h,a,t)&&(l[c++]=h)}return l}return XL=r,XL}var JL,kV;function SV(){if(kV)return JL;kV=1;function r(){return[]}return JL=r,JL}var QL,TV;function ZL(){if(TV)return QL;TV=1;var r=EV(),t=SV(),i=Object.prototype,a=i.propertyIsEnumerable,u=Object.getOwnPropertySymbols,c=u?function(l){return l==null?[]:(l=Object(l),r(u(l),function(h){return a.call(l,h)}))}:t;return QL=c,QL}var eN,RV;function Fwe(){if(RV)return eN;RV=1;var r=H1(),t=ZL();function i(a,u){return r(a,t(a),u)}return eN=i,eN}var tN,IV;function nN(){if(IV)return tN;IV=1;function r(t,i){for(var a=-1,u=i.length,c=t.length;++a<u;)t[c+a]=i[a];return t}return tN=r,tN}var rN,CV;function B2(){if(CV)return rN;CV=1;var r=uV(),t=r(Object.getPrototypeOf,Object);return rN=t,rN}var iN,AV;function PV(){if(AV)return iN;AV=1;var r=nN(),t=B2(),i=ZL(),a=SV(),u=Object.getOwnPropertySymbols,c=u?function(l){for(var h=[];l;)r(h,i(l)),l=t(l);return h}:a;return iN=c,iN}var aN,LV;function $we(){if(LV)return aN;LV=1;var r=H1(),t=PV();function i(a,u){return r(a,t(a),u)}return aN=i,aN}var sN,NV;function OV(){if(NV)return sN;NV=1;var r=nN(),t=qa();function i(a,u,c){var l=u(a);return t(a)?l:r(l,c(a))}return sN=i,sN}var oN,DV;function MV(){if(DV)return oN;DV=1;var r=OV(),t=ZL(),i=qd();function a(u){return r(u,i,t)}return oN=a,oN}var uN,jV;function Gwe(){if(jV)return uN;jV=1;var r=OV(),t=PV(),i=wp();function a(u){return r(u,i,t)}return uN=a,uN}var cN,BV;function Hwe(){if(BV)return cN;BV=1;var r=mp(),t=Qc(),i=r(t,"DataView");return cN=i,cN}var lN,qV;function zwe(){if(qV)return lN;qV=1;var r=mp(),t=Qc(),i=r(t,"Promise");return lN=i,lN}var fN,FV;function $V(){if(FV)return fN;FV=1;var r=mp(),t=Qc(),i=r(t,"Set");return fN=i,fN}var hN,GV;function Vwe(){if(GV)return hN;GV=1;var r=mp(),t=Qc(),i=r(t,"WeakMap");return hN=i,hN}var dN,HV;function Mb(){if(HV)return dN;HV=1;var r=Hwe(),t=QP(),i=zwe(),a=$V(),u=Vwe(),c=yp(),l=bz(),h="[object Map]",v="[object Object]",p="[object Promise]",g="[object Set]",w="[object WeakMap]",_="[object DataView]",E=l(r),k=l(t),I=l(i),C=l(a),P=l(u),A=c;return(r&&A(new r(new ArrayBuffer(1)))!=_||t&&A(new t)!=h||i&&A(i.resolve())!=p||a&&A(new a)!=g||u&&A(new u)!=w)&&(A=function(L){var O=c(L),M=O==v?L.constructor:void 0,B=M?l(M):"";if(B)switch(B){case E:return _;case k:return h;case I:return p;case C:return g;case P:return w}return O}),dN=A,dN}var vN,zV;function Uwe(){if(zV)return vN;zV=1;var r=Object.prototype,t=r.hasOwnProperty;function i(a){var u=a.length,c=new a.constructor(u);return u&&typeof a[0]=="string"&&t.call(a,"index")&&(c.index=a.index,c.input=a.input),c}return vN=i,vN}var pN,VV;function UV(){if(VV)return pN;VV=1;var r=Qc(),t=r.Uint8Array;return pN=t,pN}var gN,YV;function bN(){if(YV)return gN;YV=1;var r=UV();function t(i){var a=new i.constructor(i.byteLength);return new r(a).set(new r(i)),a}return gN=t,gN}var yN,WV;function Ywe(){if(WV)return yN;WV=1;var r=bN();function t(i,a){var u=a?r(i.buffer):i.buffer;return new i.constructor(u,i.byteOffset,i.byteLength)}return yN=t,yN}var mN,KV;function Wwe(){if(KV)return mN;KV=1;var r=/\w*$/;function t(i){var a=new i.constructor(i.source,r.exec(i));return a.lastIndex=i.lastIndex,a}return mN=t,mN}var wN,XV;function Kwe(){if(XV)return wN;XV=1;var r=Ob(),t=r?r.prototype:void 0,i=t?t.valueOf:void 0;function a(u){return i?Object(i.call(u)):{}}return wN=a,wN}var _N,JV;function QV(){if(JV)return _N;JV=1;var r=bN();function t(i,a){var u=a?r(i.buffer):i.buffer;return new i.constructor(u,i.byteOffset,i.length)}return _N=t,_N}var xN,ZV;function Xwe(){if(ZV)return xN;ZV=1;var r=bN(),t=Ywe(),i=Wwe(),a=Kwe(),u=QV(),c="[object Boolean]",l="[object Date]",h="[object Map]",v="[object Number]",p="[object RegExp]",g="[object Set]",w="[object String]",_="[object Symbol]",E="[object ArrayBuffer]",k="[object DataView]",I="[object Float32Array]",C="[object Float64Array]",P="[object Int8Array]",A="[object Int16Array]",L="[object Int32Array]",O="[object Uint8Array]",M="[object Uint8ClampedArray]",B="[object Uint16Array]",F="[object Uint32Array]";function q($,Y,V){var U=$.constructor;switch(Y){case E:return r($);case c:case l:return new U(+$);case k:return t($,V);case I:case C:case P:case A:case L:case O:case M:case B:case F:return u($,V);case h:return new U;case v:case w:return new U($);case p:return i($);case g:return new U;case _:return a($)}}return xN=q,xN}var EN,eU;function tU(){if(eU)return EN;eU=1;var r=uc(),t=Object.create,i=function(){function a(){}return function(u){if(!r(u))return{};if(t)return t(u);a.prototype=u;var c=new a;return a.prototype=void 0,c}}();return EN=i,EN}var kN,nU;function rU(){if(nU)return kN;nU=1;var r=tU(),t=B2(),i=j2();function a(u){return typeof u.constructor=="function"&&!i(u)?r(t(u)):{}}return kN=a,kN}var SN,iU;function Jwe(){if(iU)return SN;iU=1;var r=Mb(),t=Jl(),i="[object Map]";function a(u){return t(u)&&r(u)==i}return SN=a,SN}var TN,aU;function Qwe(){if(aU)return TN;aU=1;var r=Jwe(),t=M2(),i=OL(),a=i&&i.isMap,u=a?t(a):r;return TN=u,TN}var RN,sU;function Zwe(){if(sU)return RN;sU=1;var r=Mb(),t=Jl(),i="[object Set]";function a(u){return t(u)&&r(u)==i}return RN=a,RN}var IN,oU;function e_e(){if(oU)return IN;oU=1;var r=Zwe(),t=M2(),i=OL(),a=i&&i.isSet,u=a?t(a):r;return IN=u,IN}var CN,uU;function cU(){if(uU)return CN;uU=1;var r=L2(),t=yL(),i=O2(),a=Mwe(),u=qwe(),c=mV(),l=_V(),h=Fwe(),v=$we(),p=MV(),g=Gwe(),w=Mb(),_=Uwe(),E=Xwe(),k=rU(),I=qa(),C=Db(),P=Qwe(),A=uc(),L=e_e(),O=qd(),M=wp(),B=1,F=2,q=4,$="[object Arguments]",Y="[object Array]",V="[object Boolean]",U="[object Date]",G="[object Error]",X="[object Function]",ne="[object GeneratorFunction]",ae="[object Map]",oe="[object Number]",le="[object Object]",pe="[object RegExp]",ge="[object Set]",de="[object String]",Se="[object Symbol]",Ne="[object WeakMap]",ye="[object ArrayBuffer]",we="[object DataView]",Pe="[object Float32Array]",Fe="[object Float64Array]",Ue="[object Int8Array]",He="[object Int16Array]",De="[object Int32Array]",Ce="[object Uint8Array]",Be="[object Uint8ClampedArray]",ve="[object Uint16Array]",ke="[object Uint32Array]",je={};je[$]=je[Y]=je[ye]=je[we]=je[V]=je[U]=je[Pe]=je[Fe]=je[Ue]=je[He]=je[De]=je[ae]=je[oe]=je[le]=je[pe]=je[ge]=je[de]=je[Se]=je[Ce]=je[Be]=je[ve]=je[ke]=!0,je[G]=je[X]=je[Ne]=!1;function qe(Me,ot,dt,pt,Lt,ut){var $t,Yt=ot&B,fn=ot&F,Yn=ot&q;if(dt&&($t=Lt?dt(Me,pt,Lt,ut):dt(Me)),$t!==void 0)return $t;if(!A(Me))return Me;var he=I(Me);if(he){if($t=_(Me),!Yt)return l(Me,$t)}else{var J=w(Me),te=J==X||J==ne;if(C(Me))return c(Me,Yt);if(J==le||J==$||te&&!Lt){if($t=fn||te?{}:k(Me),!Yt)return fn?v(Me,u($t,Me)):h(Me,a($t,Me))}else{if(!je[J])return Lt?Me:{};$t=E(Me,J,Yt)}}ut||(ut=new r);var be=ut.get(Me);if(be)return be;ut.set(Me,$t),L(Me)?Me.forEach(function(ue){$t.add(qe(ue,ot,dt,ue,Me,ut))}):P(Me)&&Me.forEach(function(ue,$e){$t.set($e,qe(ue,ot,dt,$e,Me,ut))});var Le=Yn?fn?g:p:fn?M:O,Te=he?void 0:Le(Me);return t(Te||Me,function(ue,$e){Te&&($e=ue,ue=Me[$e]),i($t,$e,qe(ue,ot,dt,$e,Me,ut))}),$t}return CN=qe,CN}var AN,lU;function t_e(){if(lU)return AN;lU=1;var r=cU(),t=4;function i(a){return r(a,t)}return AN=i,AN}var PN,fU;function LN(){if(fU)return PN;fU=1;function r(t){return function(){return t}}return PN=r,PN}var NN,hU;function n_e(){if(hU)return NN;hU=1;function r(t){return function(i,a,u){for(var c=-1,l=Object(i),h=u(i),v=h.length;v--;){var p=h[t?v:++c];if(a(l[p],p,l)===!1)break}return i}}return NN=r,NN}var ON,dU;function DN(){if(dU)return ON;dU=1;var r=n_e(),t=r();return ON=t,ON}var MN,vU;function jN(){if(vU)return MN;vU=1;var r=DN(),t=qd();function i(a,u){return a&&r(a,u,t)}return MN=i,MN}var BN,pU;function r_e(){if(pU)return BN;pU=1;var r=fh();function t(i,a){return function(u,c){if(u==null)return u;if(!r(u))return i(u,c);for(var l=u.length,h=a?l:-1,v=Object(u);(a?h--:++h<l)&&c(v[h],h,v)!==!1;);return u}}return BN=t,BN}var qN,gU;function q2(){if(gU)return qN;gU=1;var r=jN(),t=r_e(),i=t(r);return qN=i,qN}var FN,bU;function _p(){if(bU)return FN;bU=1;function r(t){return t}return FN=r,FN}var $N,yU;function mU(){if(yU)return $N;yU=1;var r=_p();function t(i){return typeof i=="function"?i:r}return $N=t,$N}var GN,wU;function _U(){if(wU)return GN;wU=1;var r=yL(),t=q2(),i=mU(),a=qa();function u(c,l){var h=a(c)?r:t;return h(c,i(l))}return GN=u,GN}var HN,xU;function EU(){return xU||(xU=1,HN=_U()),HN}var zN,kU;function i_e(){if(kU)return zN;kU=1;var r=q2();function t(i,a){var u=[];return r(i,function(c,l,h){a(c,l,h)&&u.push(c)}),u}return zN=t,zN}var VN,SU;function a_e(){if(SU)return VN;SU=1;var r="__lodash_hash_undefined__";function t(i){return this.__data__.set(i,r),this}return VN=t,VN}var UN,TU;function s_e(){if(TU)return UN;TU=1;function r(t){return this.__data__.has(t)}return UN=r,UN}var YN,RU;function IU(){if(RU)return YN;RU=1;var r=vL(),t=a_e(),i=s_e();function a(u){var c=-1,l=u==null?0:u.length;for(this.__data__=new r;++c<l;)this.add(u[c])}return a.prototype.add=a.prototype.push=t,a.prototype.has=i,YN=a,YN}var WN,CU;function o_e(){if(CU)return WN;CU=1;function r(t,i){for(var a=-1,u=t==null?0:t.length;++a<u;)if(i(t[a],a,t))return!0;return!1}return WN=r,WN}var KN,AU;function PU(){if(AU)return KN;AU=1;function r(t,i){return t.has(i)}return KN=r,KN}var XN,LU;function NU(){if(LU)return XN;LU=1;var r=IU(),t=o_e(),i=PU(),a=1,u=2;function c(l,h,v,p,g,w){var _=v&a,E=l.length,k=h.length;if(E!=k&&!(_&&k>E))return!1;var I=w.get(l),C=w.get(h);if(I&&C)return I==h&&C==l;var P=-1,A=!0,L=v&u?new r:void 0;for(w.set(l,h),w.set(h,l);++P<E;){var O=l[P],M=h[P];if(p)var B=_?p(M,O,P,h,l,w):p(O,M,P,l,h,w);if(B!==void 0){if(B)continue;A=!1;break}if(L){if(!t(h,function(F,q){if(!i(L,q)&&(O===F||g(O,F,v,p,w)))return L.push(q)})){A=!1;break}}else if(!(O===M||g(O,M,v,p,w))){A=!1;break}}return w.delete(l),w.delete(h),A}return XN=c,XN}var JN,OU;function u_e(){if(OU)return JN;OU=1;function r(t){var i=-1,a=Array(t.size);return t.forEach(function(u,c){a[++i]=[c,u]}),a}return JN=r,JN}var QN,DU;function ZN(){if(DU)return QN;DU=1;function r(t){var i=-1,a=Array(t.size);return t.forEach(function(u){a[++i]=u}),a}return QN=r,QN}var eO,MU;function c_e(){if(MU)return eO;MU=1;var r=Ob(),t=UV(),i=Nb(),a=NU(),u=u_e(),c=ZN(),l=1,h=2,v="[object Boolean]",p="[object Date]",g="[object Error]",w="[object Map]",_="[object Number]",E="[object RegExp]",k="[object Set]",I="[object String]",C="[object Symbol]",P="[object ArrayBuffer]",A="[object DataView]",L=r?r.prototype:void 0,O=L?L.valueOf:void 0;function M(B,F,q,$,Y,V,U){switch(q){case A:if(B.byteLength!=F.byteLength||B.byteOffset!=F.byteOffset)return!1;B=B.buffer,F=F.buffer;case P:return!(B.byteLength!=F.byteLength||!V(new t(B),new t(F)));case v:case p:case _:return i(+B,+F);case g:return B.name==F.name&&B.message==F.message;case E:case I:return B==F+"";case w:var G=u;case k:var X=$&l;if(G||(G=c),B.size!=F.size&&!X)return!1;var ne=U.get(B);if(ne)return ne==F;$|=h,U.set(B,F);var ae=a(G(B),G(F),$,Y,V,U);return U.delete(B),ae;case C:if(O)return O.call(B)==O.call(F)}return!1}return eO=M,eO}var tO,jU;function l_e(){if(jU)return tO;jU=1;var r=MV(),t=1,i=Object.prototype,a=i.hasOwnProperty;function u(c,l,h,v,p,g){var w=h&t,_=r(c),E=_.length,k=r(l),I=k.length;if(E!=I&&!w)return!1;for(var C=E;C--;){var P=_[C];if(!(w?P in l:a.call(l,P)))return!1}var A=g.get(c),L=g.get(l);if(A&&L)return A==l&&L==c;var O=!0;g.set(c,l),g.set(l,c);for(var M=w;++C<E;){P=_[C];var B=c[P],F=l[P];if(v)var q=w?v(F,B,P,l,c,g):v(B,F,P,c,l,g);if(!(q===void 0?B===F||p(B,F,h,v,g):q)){O=!1;break}M||(M=P=="constructor")}if(O&&!M){var $=c.constructor,Y=l.constructor;$!=Y&&"constructor"in c&&"constructor"in l&&!(typeof $=="function"&&$ instanceof $&&typeof Y=="function"&&Y instanceof Y)&&(O=!1)}return g.delete(c),g.delete(l),O}return tO=u,tO}var nO,BU;function f_e(){if(BU)return nO;BU=1;var r=L2(),t=NU(),i=c_e(),a=l_e(),u=Mb(),c=qa(),l=Db(),h=Y1(),v=1,p="[object Arguments]",g="[object Array]",w="[object Object]",_=Object.prototype,E=_.hasOwnProperty;function k(I,C,P,A,L,O){var M=c(I),B=c(C),F=M?g:u(I),q=B?g:u(C);F=F==p?w:F,q=q==p?w:q;var $=F==w,Y=q==w,V=F==q;if(V&&l(I)){if(!l(C))return!1;M=!0,$=!1}if(V&&!$)return O||(O=new r),M||h(I)?t(I,C,P,A,L,O):i(I,C,F,P,A,L,O);if(!(P&v)){var U=$&&E.call(I,"__wrapped__"),G=Y&&E.call(C,"__wrapped__");if(U||G){var X=U?I.value():I,ne=G?C.value():C;return O||(O=new r),L(X,ne,P,A,O)}}return V?(O||(O=new r),a(I,C,P,A,L,O)):!1}return nO=k,nO}var rO,qU;function FU(){if(qU)return rO;qU=1;var r=f_e(),t=Jl();function i(a,u,c,l,h){return a===u?!0:a==null||u==null||!t(a)&&!t(u)?a!==a&&u!==u:r(a,u,c,l,i,h)}return rO=i,rO}var iO,$U;function h_e(){if($U)return iO;$U=1;var r=L2(),t=FU(),i=1,a=2;function u(c,l,h,v){var p=h.length,g=p,w=!v;if(c==null)return!g;for(c=Object(c);p--;){var _=h[p];if(w&&_[2]?_[1]!==c[_[0]]:!(_[0]in c))return!1}for(;++p<g;){_=h[p];var E=_[0],k=c[E],I=_[1];if(w&&_[2]){if(k===void 0&&!(E in c))return!1}else{var C=new r;if(v)var P=v(k,I,E,c,l,C);if(!(P===void 0?t(I,k,i|a,v,C):P))return!1}}return!0}return iO=u,iO}var aO,GU;function HU(){if(GU)return aO;GU=1;var r=uc();function t(i){return i===i&&!r(i)}return aO=t,aO}var sO,zU;function d_e(){if(zU)return sO;zU=1;var r=HU(),t=qd();function i(a){for(var u=t(a),c=u.length;c--;){var l=u[c],h=a[l];u[c]=[l,h,r(h)]}return u}return sO=i,sO}var oO,VU;function UU(){if(VU)return oO;VU=1;function r(t,i){return function(a){return a==null?!1:a[t]===i&&(i!==void 0||t in Object(a))}}return oO=r,oO}var uO,YU;function v_e(){if(YU)return uO;YU=1;var r=h_e(),t=d_e(),i=UU();function a(u){var c=t(u);return c.length==1&&c[0][2]?i(c[0][0],c[0][1]):function(l){return l===u||r(l,u,c)}}return uO=a,uO}var cO,WU;function jb(){if(WU)return cO;WU=1;var r=yp(),t=Jl(),i="[object Symbol]";function a(u){return typeof u=="symbol"||t(u)&&r(u)==i}return cO=a,cO}var lO,KU;function fO(){if(KU)return lO;KU=1;var r=qa(),t=jb(),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function u(c,l){if(r(c))return!1;var h=typeof c;return h=="number"||h=="symbol"||h=="boolean"||c==null||t(c)?!0:a.test(c)||!i.test(c)||l!=null&&c in Object(l)}return lO=u,lO}var hO,XU;function p_e(){if(XU)return hO;XU=1;var r=vL(),t="Expected a function";function i(a,u){if(typeof a!="function"||u!=null&&typeof u!="function")throw new TypeError(t);var c=function(){var l=arguments,h=u?u.apply(this,l):l[0],v=c.cache;if(v.has(h))return v.get(h);var p=a.apply(this,l);return c.cache=v.set(h,p)||v,p};return c.cache=new(i.Cache||r),c}return i.Cache=r,hO=i,hO}var dO,JU;function g_e(){if(JU)return dO;JU=1;var r=p_e(),t=500;function i(a){var u=r(a,function(l){return c.size===t&&c.clear(),l}),c=u.cache;return u}return dO=i,dO}var vO,QU;function b_e(){if(QU)return vO;QU=1;var r=g_e(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r(function(u){var c=[];return u.charCodeAt(0)===46&&c.push(""),u.replace(t,function(l,h,v,p){c.push(v?p.replace(i,"$1"):h||l)}),c});return vO=a,vO}var pO,ZU;function F2(){if(ZU)return pO;ZU=1;function r(t,i){for(var a=-1,u=t==null?0:t.length,c=Array(u);++a<u;)c[a]=i(t[a],a,t);return c}return pO=r,pO}var gO,eY;function y_e(){if(eY)return gO;eY=1;var r=Ob(),t=F2(),i=qa(),a=jb(),u=r?r.prototype:void 0,c=u?u.toString:void 0;function l(h){if(typeof h=="string")return h;if(i(h))return t(h,l)+"";if(a(h))return c?c.call(h):"";var v=h+"";return v=="0"&&1/h==-1/0?"-0":v}return gO=l,gO}var bO,tY;function nY(){if(tY)return bO;tY=1;var r=y_e();function t(i){return i==null?"":r(i)}return bO=t,bO}var yO,rY;function $2(){if(rY)return yO;rY=1;var r=qa(),t=fO(),i=b_e(),a=nY();function u(c,l){return r(c)?c:t(c,l)?[c]:i(a(c))}return yO=u,yO}var mO,iY;function K1(){if(iY)return mO;iY=1;var r=jb();function t(i){if(typeof i=="string"||r(i))return i;var a=i+"";return a=="0"&&1/i==-1/0?"-0":a}return mO=t,mO}var wO,aY;function G2(){if(aY)return wO;aY=1;var r=$2(),t=K1();function i(a,u){u=r(u,a);for(var c=0,l=u.length;a!=null&&c<l;)a=a[t(u[c++])];return c&&c==l?a:void 0}return wO=i,wO}var _O,sY;function m_e(){if(sY)return _O;sY=1;var r=G2();function t(i,a,u){var c=i==null?void 0:r(i,a);return c===void 0?u:c}return _O=t,_O}var xO,oY;function w_e(){if(oY)return xO;oY=1;function r(t,i){return t!=null&&i in Object(t)}return xO=r,xO}var EO,uY;function cY(){if(uY)return EO;uY=1;var r=$2(),t=z1(),i=qa(),a=D2(),u=PL(),c=K1();function l(h,v,p){v=r(v,h);for(var g=-1,w=v.length,_=!1;++g<w;){var E=c(v[g]);if(!(_=h!=null&&p(h,E)))break;h=h[E]}return _||++g!=w?_:(w=h==null?0:h.length,!!w&&u(w)&&a(E,w)&&(i(h)||t(h)))}return EO=l,EO}var kO,lY;function fY(){if(lY)return kO;lY=1;var r=w_e(),t=cY();function i(a,u){return a!=null&&t(a,u,r)}return kO=i,kO}var SO,hY;function __e(){if(hY)return SO;hY=1;var r=FU(),t=m_e(),i=fY(),a=fO(),u=HU(),c=UU(),l=K1(),h=1,v=2;function p(g,w){return a(g)&&u(w)?c(l(g),w):function(_){var E=t(_,g);return E===void 0&&E===w?i(_,g):r(w,E,h|v)}}return SO=p,SO}var TO,dY;function vY(){if(dY)return TO;dY=1;function r(t){return function(i){return i==null?void 0:i[t]}}return TO=r,TO}var RO,pY;function x_e(){if(pY)return RO;pY=1;var r=G2();function t(i){return function(a){return r(a,i)}}return RO=t,RO}var IO,gY;function E_e(){if(gY)return IO;gY=1;var r=vY(),t=x_e(),i=fO(),a=K1();function u(c){return i(c)?r(a(c)):t(c)}return IO=u,IO}var CO,bY;function hh(){if(bY)return CO;bY=1;var r=v_e(),t=__e(),i=_p(),a=qa(),u=E_e();function c(l){return typeof l=="function"?l:l==null?i:typeof l=="object"?a(l)?t(l[0],l[1]):r(l):u(l)}return CO=c,CO}var AO,yY;function mY(){if(yY)return AO;yY=1;var r=EV(),t=i_e(),i=hh(),a=qa();function u(c,l){var h=a(c)?r:t;return h(c,i(l,3))}return AO=u,AO}var PO,wY;function k_e(){if(wY)return PO;wY=1;var r=Object.prototype,t=r.hasOwnProperty;function i(a,u){return a!=null&&t.call(a,u)}return PO=i,PO}var LO,_Y;function xY(){if(_Y)return LO;_Y=1;var r=k_e(),t=cY();function i(a,u){return a!=null&&t(a,u,r)}return LO=i,LO}var NO,EY;function S_e(){if(EY)return NO;EY=1;var r=$L(),t=Mb(),i=z1(),a=qa(),u=fh(),c=Db(),l=j2(),h=Y1(),v="[object Map]",p="[object Set]",g=Object.prototype,w=g.hasOwnProperty;function _(E){if(E==null)return!0;if(u(E)&&(a(E)||typeof E=="string"||typeof E.splice=="function"||c(E)||h(E)||i(E)))return!E.length;var k=t(E);if(k==v||k==p)return!E.size;if(l(E))return!r(E).length;for(var I in E)if(w.call(E,I))return!1;return!0}return NO=_,NO}var OO,kY;function SY(){if(kY)return OO;kY=1;function r(t){return t===void 0}return OO=r,OO}var DO,TY;function RY(){if(TY)return DO;TY=1;var r=q2(),t=fh();function i(a,u){var c=-1,l=t(a)?Array(a.length):[];return r(a,function(h,v,p){l[++c]=u(h,v,p)}),l}return DO=i,DO}var MO,IY;function CY(){if(IY)return MO;IY=1;var r=F2(),t=hh(),i=RY(),a=qa();function u(c,l){var h=a(c)?r:i;return h(c,t(l,3))}return MO=u,MO}var jO,AY;function T_e(){if(AY)return jO;AY=1;function r(t,i,a,u){var c=-1,l=t==null?0:t.length;for(u&&l&&(a=t[++c]);++c<l;)a=i(a,t[c],c,t);return a}return jO=r,jO}var BO,PY;function R_e(){if(PY)return BO;PY=1;function r(t,i,a,u,c){return c(t,function(l,h,v){a=u?(u=!1,l):i(a,l,h,v)}),a}return BO=r,BO}var qO,LY;function NY(){if(LY)return qO;LY=1;var r=T_e(),t=q2(),i=hh(),a=R_e(),u=qa();function c(l,h,v){var p=u(l)?r:a,g=arguments.length<3;return p(l,i(h,4),v,g,t)}return qO=c,qO}var FO,OY;function I_e(){if(OY)return FO;OY=1;var r=yp(),t=qa(),i=Jl(),a="[object String]";function u(c){return typeof c=="string"||!t(c)&&i(c)&&r(c)==a}return FO=u,FO}var $O,DY;function C_e(){if(DY)return $O;DY=1;var r=vY(),t=r("length");return $O=t,$O}var GO,MY;function A_e(){if(MY)return GO;MY=1;var r="\\ud800-\\udfff",t="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",a="\\u20d0-\\u20ff",u=t+i+a,c="\\ufe0e\\ufe0f",l="\\u200d",h=RegExp("["+l+r+u+c+"]");function v(p){return h.test(p)}return GO=v,GO}var HO,jY;function P_e(){if(jY)return HO;jY=1;var r="\\ud800-\\udfff",t="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",a="\\u20d0-\\u20ff",u=t+i+a,c="\\ufe0e\\ufe0f",l="["+r+"]",h="["+u+"]",v="\\ud83c[\\udffb-\\udfff]",p="(?:"+h+"|"+v+")",g="[^"+r+"]",w="(?:\\ud83c[\\udde6-\\uddff]){2}",_="[\\ud800-\\udbff][\\udc00-\\udfff]",E="\\u200d",k=p+"?",I="["+c+"]?",C="(?:"+E+"(?:"+[g,w,_].join("|")+")"+I+k+")*",P=I+k+C,A="(?:"+[g+h+"?",h,w,_,l].join("|")+")",L=RegExp(v+"(?="+v+")|"+A+P,"g");function O(M){for(var B=L.lastIndex=0;L.test(M);)++B;return B}return HO=O,HO}var zO,BY;function L_e(){if(BY)return zO;BY=1;var r=C_e(),t=A_e(),i=P_e();function a(u){return t(u)?i(u):r(u)}return zO=a,zO}var VO,qY;function N_e(){if(qY)return VO;qY=1;var r=$L(),t=Mb(),i=fh(),a=I_e(),u=L_e(),c="[object Map]",l="[object Set]";function h(v){if(v==null)return 0;if(i(v))return a(v)?u(v):v.length;var p=t(v);return p==c||p==l?v.size:r(v).length}return VO=h,VO}var UO,FY;function O_e(){if(FY)return UO;FY=1;var r=yL(),t=tU(),i=jN(),a=hh(),u=B2(),c=qa(),l=Db(),h=G1(),v=uc(),p=Y1();function g(w,_,E){var k=c(w),I=k||l(w)||p(w);if(_=a(_,4),E==null){var C=w&&w.constructor;I?E=k?new C:[]:v(w)?E=h(C)?t(u(w)):{}:E={}}return(I?r:i)(w,function(P,A,L){return _(E,P,A,L)}),E}return UO=g,UO}var YO,$Y;function D_e(){if($Y)return YO;$Y=1;var r=Ob(),t=z1(),i=qa(),a=r?r.isConcatSpreadable:void 0;function u(c){return i(c)||t(c)||!!(a&&c&&c[a])}return YO=u,YO}var WO,GY;function KO(){if(GY)return WO;GY=1;var r=nN(),t=D_e();function i(a,u,c,l,h){var v=-1,p=a.length;for(c||(c=t),h||(h=[]);++v<p;){var g=a[v];u>0&&c(g)?u>1?i(g,u-1,c,l,h):r(h,g):l||(h[h.length]=g)}return h}return WO=i,WO}var XO,HY;function M_e(){if(HY)return XO;HY=1;function r(t,i,a){switch(a.length){case 0:return t.call(i);case 1:return t.call(i,a[0]);case 2:return t.call(i,a[0],a[1]);case 3:return t.call(i,a[0],a[1],a[2])}return t.apply(i,a)}return XO=r,XO}var JO,zY;function VY(){if(zY)return JO;zY=1;var r=M_e(),t=Math.max;function i(a,u,c){return u=t(u===void 0?a.length-1:u,0),function(){for(var l=arguments,h=-1,v=t(l.length-u,0),p=Array(v);++h<v;)p[h]=l[u+h];h=-1;for(var g=Array(u+1);++h<u;)g[h]=l[h];return g[u]=c(p),r(a,this,g)}}return JO=i,JO}var QO,UY;function j_e(){if(UY)return QO;UY=1;var r=LN(),t=$z(),i=_p(),a=t?function(u,c){return t(u,"toString",{configurable:!0,enumerable:!1,value:r(c),writable:!0})}:i;return QO=a,QO}var ZO,YY;function B_e(){if(YY)return ZO;YY=1;var r=800,t=16,i=Date.now;function a(u){var c=0,l=0;return function(){var h=i(),v=t-(h-l);if(l=h,v>0){if(++c>=r)return arguments[0]}else c=0;return u.apply(void 0,arguments)}}return ZO=a,ZO}var eD,WY;function KY(){if(WY)return eD;WY=1;var r=j_e(),t=B_e(),i=t(r);return eD=i,eD}var tD,XY;function H2(){if(XY)return tD;XY=1;var r=_p(),t=VY(),i=KY();function a(u,c){return i(t(u,c,r),u+"")}return tD=a,tD}var nD,JY;function QY(){if(JY)return nD;JY=1;function r(t,i,a,u){for(var c=t.length,l=a+(u?1:-1);u?l--:++l<c;)if(i(t[l],l,t))return l;return-1}return nD=r,nD}var rD,ZY;function q_e(){if(ZY)return rD;ZY=1;function r(t){return t!==t}return rD=r,rD}var iD,eW;function F_e(){if(eW)return iD;eW=1;function r(t,i,a){for(var u=a-1,c=t.length;++u<c;)if(t[u]===i)return u;return-1}return iD=r,iD}var aD,tW;function $_e(){if(tW)return aD;tW=1;var r=QY(),t=q_e(),i=F_e();function a(u,c,l){return c===c?i(u,c,l):r(u,t,l)}return aD=a,aD}var sD,nW;function G_e(){if(nW)return sD;nW=1;var r=$_e();function t(i,a){var u=i==null?0:i.length;return!!u&&r(i,a,0)>-1}return sD=t,sD}var oD,rW;function H_e(){if(rW)return oD;rW=1;function r(t,i,a){for(var u=-1,c=t==null?0:t.length;++u<c;)if(a(i,t[u]))return!0;return!1}return oD=r,oD}var uD,iW;function z_e(){if(iW)return uD;iW=1;function r(){}return uD=r,uD}var cD,aW;function V_e(){if(aW)return cD;aW=1;var r=$V(),t=z_e(),i=ZN(),a=1/0,u=r&&1/i(new r([,-0]))[1]==a?function(c){return new r(c)}:t;return cD=u,cD}var lD,sW;function U_e(){if(sW)return lD;sW=1;var r=IU(),t=G_e(),i=H_e(),a=PU(),u=V_e(),c=ZN(),l=200;function h(v,p,g){var w=-1,_=t,E=v.length,k=!0,I=[],C=I;if(g)k=!1,_=i;else if(E>=l){var P=p?null:u(v);if(P)return c(P);k=!1,_=a,C=new r}else C=p?[]:I;e:for(;++w<E;){var A=v[w],L=p?p(A):A;if(A=g||A!==0?A:0,k&&L===L){for(var O=C.length;O--;)if(C[O]===L)continue e;p&&C.push(L),I.push(A)}else _(C,L,g)||(C!==I&&C.push(L),I.push(A))}return I}return lD=h,lD}var fD,oW;function uW(){if(oW)return fD;oW=1;var r=fh(),t=Jl();function i(a){return t(a)&&r(a)}return fD=i,fD}var hD,cW;function Y_e(){if(cW)return hD;cW=1;var r=KO(),t=H2(),i=U_e(),a=uW(),u=t(function(c){return i(r(c,1,a,!0))});return hD=u,hD}var dD,lW;function W_e(){if(lW)return dD;lW=1;var r=F2();function t(i,a){return r(a,function(u){return i[u]})}return dD=t,dD}var vD,fW;function hW(){if(fW)return vD;fW=1;var r=W_e(),t=qd();function i(a){return a==null?[]:r(a,t(a))}return vD=i,vD}var pD,dW;function cc(){if(dW)return pD;dW=1;var r;if(typeof kP=="function")try{r={clone:t_e(),constant:LN(),each:EU(),filter:mY(),has:xY(),isArray:qa(),isEmpty:S_e(),isFunction:G1(),isUndefined:SY(),keys:qd(),map:CY(),reduce:NY(),size:N_e(),transform:O_e(),union:Y_e(),values:hW()}}catch{}return r||(r=window._),pD=r,pD}var gD,vW;function bD(){if(vW)return gD;vW=1;var r=cc();gD=u;var t="\0",i="\0",a="";function u(g){this._isDirected=r.has(g,"directed")?g.directed:!0,this._isMultigraph=r.has(g,"multigraph")?g.multigraph:!1,this._isCompound=r.has(g,"compound")?g.compound:!1,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[i]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}u.prototype._nodeCount=0,u.prototype._edgeCount=0,u.prototype.isDirected=function(){return this._isDirected},u.prototype.isMultigraph=function(){return this._isMultigraph},u.prototype.isCompound=function(){return this._isCompound},u.prototype.setGraph=function(g){return this._label=g,this},u.prototype.graph=function(){return this._label},u.prototype.setDefaultNodeLabel=function(g){return r.isFunction(g)||(g=r.constant(g)),this._defaultNodeLabelFn=g,this},u.prototype.nodeCount=function(){return this._nodeCount},u.prototype.nodes=function(){return r.keys(this._nodes)},u.prototype.sources=function(){var g=this;return r.filter(this.nodes(),function(w){return r.isEmpty(g._in[w])})},u.prototype.sinks=function(){var g=this;return r.filter(this.nodes(),function(w){return r.isEmpty(g._out[w])})},u.prototype.setNodes=function(g,w){var _=arguments,E=this;return r.each(g,function(k){_.length>1?E.setNode(k,w):E.setNode(k)}),this},u.prototype.setNode=function(g,w){return r.has(this._nodes,g)?(arguments.length>1&&(this._nodes[g]=w),this):(this._nodes[g]=arguments.length>1?w:this._defaultNodeLabelFn(g),this._isCompound&&(this._parent[g]=i,this._children[g]={},this._children[i][g]=!0),this._in[g]={},this._preds[g]={},this._out[g]={},this._sucs[g]={},++this._nodeCount,this)},u.prototype.node=function(g){return this._nodes[g]},u.prototype.hasNode=function(g){return r.has(this._nodes,g)},u.prototype.removeNode=function(g){var w=this;if(r.has(this._nodes,g)){var _=function(E){w.removeEdge(w._edgeObjs[E])};delete this._nodes[g],this._isCompound&&(this._removeFromParentsChildList(g),delete this._parent[g],r.each(this.children(g),function(E){w.setParent(E)}),delete this._children[g]),r.each(r.keys(this._in[g]),_),delete this._in[g],delete this._preds[g],r.each(r.keys(this._out[g]),_),delete this._out[g],delete this._sucs[g],--this._nodeCount}return this},u.prototype.setParent=function(g,w){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(w))w=i;else{w+="";for(var _=w;!r.isUndefined(_);_=this.parent(_))if(_===g)throw new Error("Setting "+w+" as parent of "+g+" would create a cycle");this.setNode(w)}return this.setNode(g),this._removeFromParentsChildList(g),this._parent[g]=w,this._children[w][g]=!0,this},u.prototype._removeFromParentsChildList=function(g){delete this._children[this._parent[g]][g]},u.prototype.parent=function(g){if(this._isCompound){var w=this._parent[g];if(w!==i)return w}},u.prototype.children=function(g){if(r.isUndefined(g)&&(g=i),this._isCompound){var w=this._children[g];if(w)return r.keys(w)}else{if(g===i)return this.nodes();if(this.hasNode(g))return[]}},u.prototype.predecessors=function(g){var w=this._preds[g];if(w)return r.keys(w)},u.prototype.successors=function(g){var w=this._sucs[g];if(w)return r.keys(w)},u.prototype.neighbors=function(g){var w=this.predecessors(g);if(w)return r.union(w,this.successors(g))},u.prototype.isLeaf=function(g){var w;return this.isDirected()?w=this.successors(g):w=this.neighbors(g),w.length===0},u.prototype.filterNodes=function(g){var w=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});w.setGraph(this.graph());var _=this;r.each(this._nodes,function(I,C){g(C)&&w.setNode(C,I)}),r.each(this._edgeObjs,function(I){w.hasNode(I.v)&&w.hasNode(I.w)&&w.setEdge(I,_.edge(I))});var E={};function k(I){var C=_.parent(I);return C===void 0||w.hasNode(C)?(E[I]=C,C):C in E?E[C]:k(C)}return this._isCompound&&r.each(w.nodes(),function(I){w.setParent(I,k(I))}),w},u.prototype.setDefaultEdgeLabel=function(g){return r.isFunction(g)||(g=r.constant(g)),this._defaultEdgeLabelFn=g,this},u.prototype.edgeCount=function(){return this._edgeCount},u.prototype.edges=function(){return r.values(this._edgeObjs)},u.prototype.setPath=function(g,w){var _=this,E=arguments;return r.reduce(g,function(k,I){return E.length>1?_.setEdge(k,I,w):_.setEdge(k,I),I}),this},u.prototype.setEdge=function(){var g,w,_,E,k=!1,I=arguments[0];typeof I=="object"&&I!==null&&"v"in I?(g=I.v,w=I.w,_=I.name,arguments.length===2&&(E=arguments[1],k=!0)):(g=I,w=arguments[1],_=arguments[3],arguments.length>2&&(E=arguments[2],k=!0)),g=""+g,w=""+w,r.isUndefined(_)||(_=""+_);var C=h(this._isDirected,g,w,_);if(r.has(this._edgeLabels,C))return k&&(this._edgeLabels[C]=E),this;if(!r.isUndefined(_)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(g),this.setNode(w),this._edgeLabels[C]=k?E:this._defaultEdgeLabelFn(g,w,_);var P=v(this._isDirected,g,w,_);return g=P.v,w=P.w,Object.freeze(P),this._edgeObjs[C]=P,c(this._preds[w],g),c(this._sucs[g],w),this._in[w][C]=P,this._out[g][C]=P,this._edgeCount++,this},u.prototype.edge=function(g,w,_){var E=arguments.length===1?p(this._isDirected,arguments[0]):h(this._isDirected,g,w,_);return this._edgeLabels[E]},u.prototype.hasEdge=function(g,w,_){var E=arguments.length===1?p(this._isDirected,arguments[0]):h(this._isDirected,g,w,_);return r.has(this._edgeLabels,E)},u.prototype.removeEdge=function(g,w,_){var E=arguments.length===1?p(this._isDirected,arguments[0]):h(this._isDirected,g,w,_),k=this._edgeObjs[E];return k&&(g=k.v,w=k.w,delete this._edgeLabels[E],delete this._edgeObjs[E],l(this._preds[w],g),l(this._sucs[g],w),delete this._in[w][E],delete this._out[g][E],this._edgeCount--),this},u.prototype.inEdges=function(g,w){var _=this._in[g];if(_){var E=r.values(_);return w?r.filter(E,function(k){return k.v===w}):E}},u.prototype.outEdges=function(g,w){var _=this._out[g];if(_){var E=r.values(_);return w?r.filter(E,function(k){return k.w===w}):E}},u.prototype.nodeEdges=function(g,w){var _=this.inEdges(g,w);if(_)return _.concat(this.outEdges(g,w))};function c(g,w){g[w]?g[w]++:g[w]=1}function l(g,w){--g[w]||delete g[w]}function h(g,w,_,E){var k=""+w,I=""+_;if(!g&&k>I){var C=k;k=I,I=C}return k+a+I+a+(r.isUndefined(E)?t:E)}function v(g,w,_,E){var k=""+w,I=""+_;if(!g&&k>I){var C=k;k=I,I=C}var P={v:k,w:I};return E&&(P.name=E),P}function p(g,w){return h(g,w.v,w.w,w.name)}return gD}var yD,pW;function K_e(){return pW||(pW=1,yD="2.1.8"),yD}var mD,gW;function X_e(){return gW||(gW=1,mD={Graph:bD(),version:K_e()}),mD}var wD,bW;function J_e(){if(bW)return wD;bW=1;var r=cc(),t=bD();wD={write:i,read:c};function i(l){var h={options:{directed:l.isDirected(),multigraph:l.isMultigraph(),compound:l.isCompound()},nodes:a(l),edges:u(l)};return r.isUndefined(l.graph())||(h.value=r.clone(l.graph())),h}function a(l){return r.map(l.nodes(),function(h){var v=l.node(h),p=l.parent(h),g={v:h};return r.isUndefined(v)||(g.value=v),r.isUndefined(p)||(g.parent=p),g})}function u(l){return r.map(l.edges(),function(h){var v=l.edge(h),p={v:h.v,w:h.w};return r.isUndefined(h.name)||(p.name=h.name),r.isUndefined(v)||(p.value=v),p})}function c(l){var h=new t(l.options).setGraph(l.value);return r.each(l.nodes,function(v){h.setNode(v.v,v.value),v.parent&&h.setParent(v.v,v.parent)}),r.each(l.edges,function(v){h.setEdge({v:v.v,w:v.w,name:v.name},v.value)}),h}return wD}var _D,yW;function Q_e(){if(yW)return _D;yW=1;var r=cc();_D=t;function t(i){var a={},u=[],c;function l(h){r.has(a,h)||(a[h]=!0,c.push(h),r.each(i.successors(h),l),r.each(i.predecessors(h),l))}return r.each(i.nodes(),function(h){c=[],l(h),c.length&&u.push(c)}),u}return _D}var xD,mW;function wW(){if(mW)return xD;mW=1;var r=cc();xD=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(i){return i.key})},t.prototype.has=function(i){return r.has(this._keyIndices,i)},t.prototype.priority=function(i){var a=this._keyIndices[i];if(a!==void 0)return this._arr[a].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(i,a){var u=this._keyIndices;if(i=String(i),!r.has(u,i)){var c=this._arr,l=c.length;return u[i]=l,c.push({key:i,priority:a}),this._decrease(l),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var i=this._arr.pop();return delete this._keyIndices[i.key],this._heapify(0),i.key},t.prototype.decrease=function(i,a){var u=this._keyIndices[i];if(a>this._arr[u].priority)throw new Error("New priority is greater than current priority. Key: "+i+" Old: "+this._arr[u].priority+" New: "+a);this._arr[u].priority=a,this._decrease(u)},t.prototype._heapify=function(i){var a=this._arr,u=2*i,c=u+1,l=i;u<a.length&&(l=a[u].priority<a[l].priority?u:l,c<a.length&&(l=a[c].priority<a[l].priority?c:l),l!==i&&(this._swap(i,l),this._heapify(l)))},t.prototype._decrease=function(i){for(var a=this._arr,u=a[i].priority,c;i!==0&&(c=i>>1,!(a[c].priority<u));)this._swap(i,c),i=c},t.prototype._swap=function(i,a){var u=this._arr,c=this._keyIndices,l=u[i],h=u[a];u[i]=h,u[a]=l,c[h.key]=i,c[l.key]=a},xD}var ED,_W;function xW(){if(_W)return ED;_W=1;var r=cc(),t=wW();ED=a;var i=r.constant(1);function a(c,l,h,v){return u(c,String(l),h||i,v||function(p){return c.outEdges(p)})}function u(c,l,h,v){var p={},g=new t,w,_,E=function(k){var I=k.v!==w?k.v:k.w,C=p[I],P=h(k),A=_.distance+P;if(P<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+k+" Weight: "+P);A<C.distance&&(C.distance=A,C.predecessor=w,g.decrease(I,A))};for(c.nodes().forEach(function(k){var I=k===l?0:Number.POSITIVE_INFINITY;p[k]={distance:I},g.add(k,I)});g.size()>0&&(w=g.removeMin(),_=p[w],_.distance!==Number.POSITIVE_INFINITY);)v(w).forEach(E);return p}return ED}var kD,EW;function Z_e(){if(EW)return kD;EW=1;var r=xW(),t=cc();kD=i;function i(a,u,c){return t.transform(a.nodes(),function(l,h){l[h]=r(a,h,u,c)},{})}return kD}var SD,kW;function SW(){if(kW)return SD;kW=1;var r=cc();SD=t;function t(i){var a=0,u=[],c={},l=[];function h(v){var p=c[v]={onStack:!0,lowlink:a,index:a++};if(u.push(v),i.successors(v).forEach(function(_){r.has(c,_)?c[_].onStack&&(p.lowlink=Math.min(p.lowlink,c[_].index)):(h(_),p.lowlink=Math.min(p.lowlink,c[_].lowlink))}),p.lowlink===p.index){var g=[],w;do w=u.pop(),c[w].onStack=!1,g.push(w);while(v!==w);l.push(g)}}return i.nodes().forEach(function(v){r.has(c,v)||h(v)}),l}return SD}var TD,TW;function exe(){if(TW)return TD;TW=1;var r=cc(),t=SW();TD=i;function i(a){return r.filter(t(a),function(u){return u.length>1||u.length===1&&a.hasEdge(u[0],u[0])})}return TD}var RD,RW;function txe(){if(RW)return RD;RW=1;var r=cc();RD=i;var t=r.constant(1);function i(u,c,l){return a(u,c||t,l||function(h){return u.outEdges(h)})}function a(u,c,l){var h={},v=u.nodes();return v.forEach(function(p){h[p]={},h[p][p]={distance:0},v.forEach(function(g){p!==g&&(h[p][g]={distance:Number.POSITIVE_INFINITY})}),l(p).forEach(function(g){var w=g.v===p?g.w:g.v,_=c(g);h[p][w]={distance:_,predecessor:p}})}),v.forEach(function(p){var g=h[p];v.forEach(function(w){var _=h[w];v.forEach(function(E){var k=_[p],I=g[E],C=_[E],P=k.distance+I.distance;P<C.distance&&(C.distance=P,C.predecessor=I.predecessor)})})}),h}return RD}var ID,IW;function CW(){if(IW)return ID;IW=1;var r=cc();ID=t,t.CycleException=i;function t(a){var u={},c={},l=[];function h(v){if(r.has(c,v))throw new i;r.has(u,v)||(c[v]=!0,u[v]=!0,r.each(a.predecessors(v),h),delete c[v],l.push(v))}if(r.each(a.sinks(),h),r.size(u)!==a.nodeCount())throw new i;return l}function i(){}return i.prototype=new Error,ID}var CD,AW;function nxe(){if(AW)return CD;AW=1;var r=CW();CD=t;function t(i){try{r(i)}catch(a){if(a instanceof r.CycleException)return!1;throw a}return!0}return CD}var AD,PW;function LW(){if(PW)return AD;PW=1;var r=cc();AD=t;function t(a,u,c){r.isArray(u)||(u=[u]);var l=(a.isDirected()?a.successors:a.neighbors).bind(a),h=[],v={};return r.each(u,function(p){if(!a.hasNode(p))throw new Error("Graph does not have node: "+p);i(a,p,c==="post",v,l,h)}),h}function i(a,u,c,l,h,v){r.has(l,u)||(l[u]=!0,c||v.push(u),r.each(h(u),function(p){i(a,p,c,l,h,v)}),c&&v.push(u))}return AD}var PD,NW;function rxe(){if(NW)return PD;NW=1;var r=LW();PD=t;function t(i,a){return r(i,a,"post")}return PD}var LD,OW;function ixe(){if(OW)return LD;OW=1;var r=LW();LD=t;function t(i,a){return r(i,a,"pre")}return LD}var ND,DW;function axe(){if(DW)return ND;DW=1;var r=cc(),t=bD(),i=wW();ND=a;function a(u,c){var l=new t,h={},v=new i,p;function g(_){var E=_.v===p?_.w:_.v,k=v.priority(E);if(k!==void 0){var I=c(_);I<k&&(h[E]=p,v.decrease(E,I))}}if(u.nodeCount()===0)return l;r.each(u.nodes(),function(_){v.add(_,Number.POSITIVE_INFINITY),l.setNode(_)}),v.decrease(u.nodes()[0],0);for(var w=!1;v.size()>0;){if(p=v.removeMin(),r.has(h,p))l.setEdge(p,h[p]);else{if(w)throw new Error("Input graph is not connected: "+u);w=!0}u.nodeEdges(p).forEach(g)}return l}return ND}var OD,MW;function sxe(){return MW||(MW=1,OD={components:Q_e(),dijkstra:xW(),dijkstraAll:Z_e(),findCycles:exe(),floydWarshall:txe(),isAcyclic:nxe(),postorder:rxe(),preorder:ixe(),prim:axe(),tarjan:SW(),topsort:CW()}),OD}var DD,jW;function oxe(){if(jW)return DD;jW=1;var r=X_e();return DD={Graph:r.Graph,json:J_e(),alg:sxe(),version:r.version},DD}var MD,BW;function Zc(){if(BW)return MD;BW=1;var r;if(typeof kP=="function")try{r=oxe()}catch{}return r||(r=window.graphlib),MD=r,MD}var jD,qW;function uxe(){if(qW)return jD;qW=1;var r=cU(),t=1,i=4;function a(u){return r(u,t|i)}return jD=a,jD}var BD,FW;function z2(){if(FW)return BD;FW=1;var r=Nb(),t=fh(),i=D2(),a=uc();function u(c,l,h){if(!a(h))return!1;var v=typeof l;return(v=="number"?t(h)&&i(l,h.length):v=="string"&&l in h)?r(h[l],c):!1}return BD=u,BD}var qD,$W;function cxe(){if($W)return qD;$W=1;var r=H2(),t=Nb(),i=z2(),a=wp(),u=Object.prototype,c=u.hasOwnProperty,l=r(function(h,v){h=Object(h);var p=-1,g=v.length,w=g>2?v[2]:void 0;for(w&&i(v[0],v[1],w)&&(g=1);++p<g;)for(var _=v[p],E=a(_),k=-1,I=E.length;++k<I;){var C=E[k],P=h[C];(P===void 0||t(P,u[C])&&!c.call(h,C))&&(h[C]=_[C])}return h});return qD=l,qD}var FD,GW;function lxe(){if(GW)return FD;GW=1;var r=hh(),t=fh(),i=qd();function a(u){return function(c,l,h){var v=Object(c);if(!t(c)){var p=r(l,3);c=i(c),l=function(w){return p(v[w],w,v)}}var g=u(c,l,h);return g>-1?v[p?c[g]:g]:void 0}}return FD=a,FD}var $D,HW;function fxe(){if(HW)return $D;HW=1;var r=/\s/;function t(i){for(var a=i.length;a--&&r.test(i.charAt(a)););return a}return $D=t,$D}var GD,zW;function hxe(){if(zW)return GD;zW=1;var r=fxe(),t=/^\s+/;function i(a){return a&&a.slice(0,r(a)+1).replace(t,"")}return GD=i,GD}var HD,VW;function dxe(){if(VW)return HD;VW=1;var r=hxe(),t=uc(),i=jb(),a=NaN,u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,l=/^0o[0-7]+$/i,h=parseInt;function v(p){if(typeof p=="number")return p;if(i(p))return a;if(t(p)){var g=typeof p.valueOf=="function"?p.valueOf():p;p=t(g)?g+"":g}if(typeof p!="string")return p===0?p:+p;p=r(p);var w=c.test(p);return w||l.test(p)?h(p.slice(2),w?2:8):u.test(p)?a:+p}return HD=v,HD}var zD,UW;function YW(){if(UW)return zD;UW=1;var r=dxe(),t=1/0,i=17976931348623157e292;function a(u){if(!u)return u===0?u:0;if(u=r(u),u===t||u===-t){var c=u<0?-1:1;return c*i}return u===u?u:0}return zD=a,zD}var VD,WW;function vxe(){if(WW)return VD;WW=1;var r=YW();function t(i){var a=r(i),u=a%1;return a===a?u?a-u:a:0}return VD=t,VD}var UD,KW;function pxe(){if(KW)return UD;KW=1;var r=QY(),t=hh(),i=vxe(),a=Math.max;function u(c,l,h){var v=c==null?0:c.length;if(!v)return-1;var p=h==null?0:i(h);return p<0&&(p=a(v+p,0)),r(c,t(l,3),p)}return UD=u,UD}var YD,XW;function gxe(){if(XW)return YD;XW=1;var r=lxe(),t=pxe(),i=r(t);return YD=i,YD}var WD,JW;function QW(){if(JW)return WD;JW=1;var r=KO();function t(i){var a=i==null?0:i.length;return a?r(i,1):[]}return WD=t,WD}var KD,ZW;function bxe(){if(ZW)return KD;ZW=1;var r=DN(),t=mU(),i=wp();function a(u,c){return u==null?u:r(u,t(c),i)}return KD=a,KD}var XD,eK;function yxe(){if(eK)return XD;eK=1;function r(t){var i=t==null?0:t.length;return i?t[i-1]:void 0}return XD=r,XD}var JD,tK;function mxe(){if(tK)return JD;tK=1;var r=N2(),t=jN(),i=hh();function a(u,c){var l={};return c=i(c,3),t(u,function(h,v,p){r(l,v,c(h,v,p))}),l}return JD=a,JD}var QD,nK;function ZD(){if(nK)return QD;nK=1;var r=jb();function t(i,a,u){for(var c=-1,l=i.length;++c<l;){var h=i[c],v=a(h);if(v!=null&&(p===void 0?v===v&&!r(v):u(v,p)))var p=v,g=h}return g}return QD=t,QD}var eM,rK;function wxe(){if(rK)return eM;rK=1;function r(t,i){return t>i}return eM=r,eM}var tM,iK;function _xe(){if(iK)return tM;iK=1;var r=ZD(),t=wxe(),i=_p();function a(u){return u&&u.length?r(u,i,t):void 0}return tM=a,tM}var nM,aK;function sK(){if(aK)return nM;aK=1;var r=N2(),t=Nb();function i(a,u,c){(c!==void 0&&!t(a[u],c)||c===void 0&&!(u in a))&&r(a,u,c)}return nM=i,nM}var rM,oK;function xxe(){if(oK)return rM;oK=1;var r=yp(),t=B2(),i=Jl(),a="[object Object]",u=Function.prototype,c=Object.prototype,l=u.toString,h=c.hasOwnProperty,v=l.call(Object);function p(g){if(!i(g)||r(g)!=a)return!1;var w=t(g);if(w===null)return!0;var _=h.call(w,"constructor")&&w.constructor;return typeof _=="function"&&_ instanceof _&&l.call(_)==v}return rM=p,rM}var iM,uK;function cK(){if(uK)return iM;uK=1;function r(t,i){if(!(i==="constructor"&&typeof t[i]=="function")&&i!="__proto__")return t[i]}return iM=r,iM}var aM,lK;function Exe(){if(lK)return aM;lK=1;var r=H1(),t=wp();function i(a){return r(a,t(a))}return aM=i,aM}var sM,fK;function kxe(){if(fK)return sM;fK=1;var r=sK(),t=mV(),i=QV(),a=_V(),u=rU(),c=z1(),l=qa(),h=uW(),v=Db(),p=G1(),g=uc(),w=xxe(),_=Y1(),E=cK(),k=Exe();function I(C,P,A,L,O,M,B){var F=E(C,A),q=E(P,A),$=B.get(q);if($){r(C,A,$);return}var Y=M?M(F,q,A+"",C,P,B):void 0,V=Y===void 0;if(V){var U=l(q),G=!U&&v(q),X=!U&&!G&&_(q);Y=q,U||G||X?l(F)?Y=F:h(F)?Y=a(F):G?(V=!1,Y=t(q,!0)):X?(V=!1,Y=i(q,!0)):Y=[]:w(q)||c(q)?(Y=F,c(F)?Y=k(F):(!g(F)||p(F))&&(Y=u(q))):V=!1}V&&(B.set(q,Y),O(Y,q,L,M,B),B.delete(q)),r(C,A,Y)}return sM=I,sM}var oM,hK;function Sxe(){if(hK)return oM;hK=1;var r=L2(),t=sK(),i=DN(),a=kxe(),u=uc(),c=wp(),l=cK();function h(v,p,g,w,_){v!==p&&i(p,function(E,k){if(_||(_=new r),u(E))a(v,p,k,g,h,w,_);else{var I=w?w(l(v,k),E,k+"",v,p,_):void 0;I===void 0&&(I=E),t(v,k,I)}},c)}return oM=h,oM}var uM,dK;function Txe(){if(dK)return uM;dK=1;var r=H2(),t=z2();function i(a){return r(function(u,c){var l=-1,h=c.length,v=h>1?c[h-1]:void 0,p=h>2?c[2]:void 0;for(v=a.length>3&&typeof v=="function"?(h--,v):void 0,p&&t(c[0],c[1],p)&&(v=h<3?void 0:v,h=1),u=Object(u);++l<h;){var g=c[l];g&&a(u,g,l,v)}return u})}return uM=i,uM}var cM,vK;function Rxe(){if(vK)return cM;vK=1;var r=Sxe(),t=Txe(),i=t(function(a,u,c){r(a,u,c)});return cM=i,cM}var lM,pK;function gK(){if(pK)return lM;pK=1;function r(t,i){return t<i}return lM=r,lM}var fM,bK;function Ixe(){if(bK)return fM;bK=1;var r=ZD(),t=gK(),i=_p();function a(u){return u&&u.length?r(u,i,t):void 0}return fM=a,fM}var hM,yK;function Cxe(){if(yK)return hM;yK=1;var r=ZD(),t=hh(),i=gK();function a(u,c){return u&&u.length?r(u,t(c,2),i):void 0}return hM=a,hM}var dM,mK;function Axe(){if(mK)return dM;mK=1;var r=Qc(),t=function(){return r.Date.now()};return dM=t,dM}var vM,wK;function Pxe(){if(wK)return vM;wK=1;var r=O2(),t=$2(),i=D2(),a=uc(),u=K1();function c(l,h,v,p){if(!a(l))return l;h=t(h,l);for(var g=-1,w=h.length,_=w-1,E=l;E!=null&&++g<w;){var k=u(h[g]),I=v;if(k==="__proto__"||k==="constructor"||k==="prototype")return l;if(g!=_){var C=E[k];I=p?p(C,k,E):void 0,I===void 0&&(I=a(C)?C:i(h[g+1])?[]:{})}r(E,k,I),E=E[k]}return l}return vM=c,vM}var pM,_K;function Lxe(){if(_K)return pM;_K=1;var r=G2(),t=Pxe(),i=$2();function a(u,c,l){for(var h=-1,v=c.length,p={};++h<v;){var g=c[h],w=r(u,g);l(w,g)&&t(p,i(g,u),w)}return p}return pM=a,pM}var gM,xK;function Nxe(){if(xK)return gM;xK=1;var r=Lxe(),t=fY();function i(a,u){return r(a,u,function(c,l){return t(a,l)})}return gM=i,gM}var bM,EK;function Oxe(){if(EK)return bM;EK=1;var r=QW(),t=VY(),i=KY();function a(u){return i(t(u,void 0,r),u+"")}return bM=a,bM}var yM,kK;function Dxe(){if(kK)return yM;kK=1;var r=Nxe(),t=Oxe(),i=t(function(a,u){return a==null?{}:r(a,u)});return yM=i,yM}var mM,SK;function Mxe(){if(SK)return mM;SK=1;var r=Math.ceil,t=Math.max;function i(a,u,c,l){for(var h=-1,v=t(r((u-a)/(c||1)),0),p=Array(v);v--;)p[l?v:++h]=a,a+=c;return p}return mM=i,mM}var wM,TK;function jxe(){if(TK)return wM;TK=1;var r=Mxe(),t=z2(),i=YW();function a(u){return function(c,l,h){return h&&typeof h!="number"&&t(c,l,h)&&(l=h=void 0),c=i(c),l===void 0?(l=c,c=0):l=i(l),h=h===void 0?c<l?1:-1:i(h),r(c,l,h,u)}}return wM=a,wM}var _M,RK;function Bxe(){if(RK)return _M;RK=1;var r=jxe(),t=r();return _M=t,_M}var xM,IK;function qxe(){if(IK)return xM;IK=1;function r(t,i){var a=t.length;for(t.sort(i);a--;)t[a]=t[a].value;return t}return xM=r,xM}var EM,CK;function Fxe(){if(CK)return EM;CK=1;var r=jb();function t(i,a){if(i!==a){var u=i!==void 0,c=i===null,l=i===i,h=r(i),v=a!==void 0,p=a===null,g=a===a,w=r(a);if(!p&&!w&&!h&&i>a||h&&v&&g&&!p&&!w||c&&v&&g||!u&&g||!l)return 1;if(!c&&!h&&!w&&i<a||w&&u&&l&&!c&&!h||p&&u&&l||!v&&l||!g)return-1}return 0}return EM=t,EM}var kM,AK;function $xe(){if(AK)return kM;AK=1;var r=Fxe();function t(i,a,u){for(var c=-1,l=i.criteria,h=a.criteria,v=l.length,p=u.length;++c<v;){var g=r(l[c],h[c]);if(g){if(c>=p)return g;var w=u[c];return g*(w=="desc"?-1:1)}}return i.index-a.index}return kM=t,kM}var SM,PK;function Gxe(){if(PK)return SM;PK=1;var r=F2(),t=G2(),i=hh(),a=RY(),u=qxe(),c=M2(),l=$xe(),h=_p(),v=qa();function p(g,w,_){w.length?w=r(w,function(I){return v(I)?function(C){return t(C,I.length===1?I[0]:I)}:I}):w=[h];var E=-1;w=r(w,c(i));var k=a(g,function(I,C,P){var A=r(w,function(L){return L(I)});return{criteria:A,index:++E,value:I}});return u(k,function(I,C){return l(I,C,_)})}return SM=p,SM}var TM,LK;function Hxe(){if(LK)return TM;LK=1;var r=KO(),t=Gxe(),i=H2(),a=z2(),u=i(function(c,l){if(c==null)return[];var h=l.length;return h>1&&a(c,l[0],l[1])?l=[]:h>2&&a(l[0],l[1],l[2])&&(l=[l[0]]),t(c,r(l,1),[])});return TM=u,TM}var RM,NK;function zxe(){if(NK)return RM;NK=1;var r=nY(),t=0;function i(a){var u=++t;return r(a)+u}return RM=i,RM}var IM,OK;function Vxe(){if(OK)return IM;OK=1;function r(t,i,a){for(var u=-1,c=t.length,l=i.length,h={};++u<c;){var v=u<l?i[u]:void 0;a(h,t[u],v)}return h}return IM=r,IM}var CM,DK;function Uxe(){if(DK)return CM;DK=1;var r=O2(),t=Vxe();function i(a,u){return t(a||[],u||[],r)}return CM=i,CM}var AM,MK;function Fi(){if(MK)return AM;MK=1;var r;if(typeof kP=="function")try{r={cloneDeep:uxe(),constant:LN(),defaults:cxe(),each:EU(),filter:mY(),find:gxe(),flatten:QW(),forEach:_U(),forIn:bxe(),has:xY(),isUndefined:SY(),last:yxe(),map:CY(),mapValues:mxe(),max:_xe(),merge:Rxe(),min:Ixe(),minBy:Cxe(),now:Axe(),pick:Dxe(),range:Bxe(),reduce:NY(),sortBy:Hxe(),uniqueId:zxe(),values:hW(),zipObject:Uxe()}}catch{}return r||(r=window._),AM=r,AM}var PM,jK;function Yxe(){if(jK)return PM;jK=1,PM=r;function r(){var a={};a._next=a._prev=a,this._sentinel=a}r.prototype.dequeue=function(){var a=this._sentinel,u=a._prev;if(u!==a)return t(u),u},r.prototype.enqueue=function(a){var u=this._sentinel;a._prev&&a._next&&t(a),a._next=u._next,u._next._prev=a,u._next=a,a._prev=u},r.prototype.toString=function(){for(var a=[],u=this._sentinel,c=u._prev;c!==u;)a.push(JSON.stringify(c,i)),c=c._prev;return"["+a.join(", ")+"]"};function t(a){a._prev._next=a._next,a._next._prev=a._prev,delete a._next,delete a._prev}function i(a,u){if(a!=="_next"&&a!=="_prev")return u}return PM}var LM,BK;function Wxe(){if(BK)return LM;BK=1;var r=Fi(),t=Zc().Graph,i=Yxe();LM=u;var a=r.constant(1);function u(p,g){if(p.nodeCount()<=1)return[];var w=h(p,g||a),_=c(w.graph,w.buckets,w.zeroIdx);return r.flatten(r.map(_,function(E){return p.outEdges(E.v,E.w)}),!0)}function c(p,g,w){for(var _=[],E=g[g.length-1],k=g[0],I;p.nodeCount();){for(;I=k.dequeue();)l(p,g,w,I);for(;I=E.dequeue();)l(p,g,w,I);if(p.nodeCount()){for(var C=g.length-2;C>0;--C)if(I=g[C].dequeue(),I){_=_.concat(l(p,g,w,I,!0));break}}}return _}function l(p,g,w,_,E){var k=E?[]:void 0;return r.forEach(p.inEdges(_.v),function(I){var C=p.edge(I),P=p.node(I.v);E&&k.push({v:I.v,w:I.w}),P.out-=C,v(g,w,P)}),r.forEach(p.outEdges(_.v),function(I){var C=p.edge(I),P=I.w,A=p.node(P);A.in-=C,v(g,w,A)}),p.removeNode(_.v),k}function h(p,g){var w=new t,_=0,E=0;r.forEach(p.nodes(),function(C){w.setNode(C,{v:C,in:0,out:0})}),r.forEach(p.edges(),function(C){var P=w.edge(C.v,C.w)||0,A=g(C),L=P+A;w.setEdge(C.v,C.w,L),E=Math.max(E,w.node(C.v).out+=A),_=Math.max(_,w.node(C.w).in+=A)});var k=r.range(E+_+3).map(function(){return new i}),I=_+1;return r.forEach(w.nodes(),function(C){v(k,I,w.node(C))}),{graph:w,buckets:k,zeroIdx:I}}function v(p,g,w){w.out?w.in?p[w.out-w.in+g].enqueue(w):p[p.length-1].enqueue(w):p[0].enqueue(w)}return LM}var NM,qK;function Kxe(){if(qK)return NM;qK=1;var r=Fi(),t=Wxe();NM={run:i,undo:u};function i(c){var l=c.graph().acyclicer==="greedy"?t(c,h(c)):a(c);r.forEach(l,function(v){var p=c.edge(v);c.removeEdge(v),p.forwardName=v.name,p.reversed=!0,c.setEdge(v.w,v.v,p,r.uniqueId("rev"))});function h(v){return function(p){return v.edge(p).weight}}}function a(c){var l=[],h={},v={};function p(g){r.has(v,g)||(v[g]=!0,h[g]=!0,r.forEach(c.outEdges(g),function(w){r.has(h,w.w)?l.push(w):p(w.w)}),delete h[g])}return r.forEach(c.nodes(),p),l}function u(c){r.forEach(c.edges(),function(l){var h=c.edge(l);if(h.reversed){c.removeEdge(l);var v=h.forwardName;delete h.reversed,delete h.forwardName,c.setEdge(l.w,l.v,h,v)}})}return NM}var OM,FK;function nu(){if(FK)return OM;FK=1;var r=Fi(),t=Zc().Graph;OM={addDummyNode:i,simplify:a,asNonCompoundGraph:u,successorWeights:c,predecessorWeights:l,intersectRect:h,buildLayerMatrix:v,normalizeRanks:p,removeEmptyRanks:g,addBorderNode:w,maxRank:_,partition:E,time:k,notime:I};function i(C,P,A,L){var O;do O=r.uniqueId(L);while(C.hasNode(O));return A.dummy=P,C.setNode(O,A),O}function a(C){var P=new t().setGraph(C.graph());return r.forEach(C.nodes(),function(A){P.setNode(A,C.node(A))}),r.forEach(C.edges(),function(A){var L=P.edge(A.v,A.w)||{weight:0,minlen:1},O=C.edge(A);P.setEdge(A.v,A.w,{weight:L.weight+O.weight,minlen:Math.max(L.minlen,O.minlen)})}),P}function u(C){var P=new t({multigraph:C.isMultigraph()}).setGraph(C.graph());return r.forEach(C.nodes(),function(A){C.children(A).length||P.setNode(A,C.node(A))}),r.forEach(C.edges(),function(A){P.setEdge(A,C.edge(A))}),P}function c(C){var P=r.map(C.nodes(),function(A){var L={};return r.forEach(C.outEdges(A),function(O){L[O.w]=(L[O.w]||0)+C.edge(O).weight}),L});return r.zipObject(C.nodes(),P)}function l(C){var P=r.map(C.nodes(),function(A){var L={};return r.forEach(C.inEdges(A),function(O){L[O.v]=(L[O.v]||0)+C.edge(O).weight}),L});return r.zipObject(C.nodes(),P)}function h(C,P){var A=C.x,L=C.y,O=P.x-A,M=P.y-L,B=C.width/2,F=C.height/2;if(!O&&!M)throw new Error("Not possible to find intersection inside of the rectangle");var q,$;return Math.abs(M)*B>Math.abs(O)*F?(M<0&&(F=-F),q=F*O/M,$=F):(O<0&&(B=-B),q=B,$=B*M/O),{x:A+q,y:L+$}}function v(C){var P=r.map(r.range(_(C)+1),function(){return[]});return r.forEach(C.nodes(),function(A){var L=C.node(A),O=L.rank;r.isUndefined(O)||(P[O][L.order]=A)}),P}function p(C){var P=r.min(r.map(C.nodes(),function(A){return C.node(A).rank}));r.forEach(C.nodes(),function(A){var L=C.node(A);r.has(L,"rank")&&(L.rank-=P)})}function g(C){var P=r.min(r.map(C.nodes(),function(M){return C.node(M).rank})),A=[];r.forEach(C.nodes(),function(M){var B=C.node(M).rank-P;A[B]||(A[B]=[]),A[B].push(M)});var L=0,O=C.graph().nodeRankFactor;r.forEach(A,function(M,B){r.isUndefined(M)&&B%O!==0?--L:L&&r.forEach(M,function(F){C.node(F).rank+=L})})}function w(C,P,A,L){var O={width:0,height:0};return arguments.length>=4&&(O.rank=A,O.order=L),i(C,"border",O,P)}function _(C){return r.max(r.map(C.nodes(),function(P){var A=C.node(P).rank;if(!r.isUndefined(A))return A}))}function E(C,P){var A={lhs:[],rhs:[]};return r.forEach(C,function(L){P(L)?A.lhs.push(L):A.rhs.push(L)}),A}function k(C,P){var A=r.now();try{return P()}finally{console.log(C+" time: "+(r.now()-A)+"ms")}}function I(C,P){return P()}return OM}var DM,$K;function Xxe(){if($K)return DM;$K=1;var r=Fi(),t=nu();DM={run:i,undo:u};function i(c){c.graph().dummyChains=[],r.forEach(c.edges(),function(l){a(c,l)})}function a(c,l){var h=l.v,v=c.node(h).rank,p=l.w,g=c.node(p).rank,w=l.name,_=c.edge(l),E=_.labelRank;if(g!==v+1){c.removeEdge(l);var k,I,C;for(C=0,++v;v<g;++C,++v)_.points=[],I={width:0,height:0,edgeLabel:_,edgeObj:l,rank:v},k=t.addDummyNode(c,"edge",I,"_d"),v===E&&(I.width=_.width,I.height=_.height,I.dummy="edge-label",I.labelpos=_.labelpos),c.setEdge(h,k,{weight:_.weight},w),C===0&&c.graph().dummyChains.push(k),h=k;c.setEdge(h,p,{weight:_.weight},w)}}function u(c){r.forEach(c.graph().dummyChains,function(l){var h=c.node(l),v=h.edgeLabel,p;for(c.setEdge(h.edgeObj,v);h.dummy;)p=c.successors(l)[0],c.removeNode(l),v.points.push({x:h.x,y:h.y}),h.dummy==="edge-label"&&(v.x=h.x,v.y=h.y,v.width=h.width,v.height=h.height),l=p,h=c.node(l)})}return DM}var MM,GK;function V2(){if(GK)return MM;GK=1;var r=Fi();MM={longestPath:t,slack:i};function t(a){var u={};function c(l){var h=a.node(l);if(r.has(u,l))return h.rank;u[l]=!0;var v=r.min(r.map(a.outEdges(l),function(p){return c(p.w)-a.edge(p).minlen}));return(v===Number.POSITIVE_INFINITY||v===void 0||v===null)&&(v=0),h.rank=v}r.forEach(a.sources(),c)}function i(a,u){return a.node(u.w).rank-a.node(u.v).rank-a.edge(u).minlen}return MM}var jM,HK;function zK(){if(HK)return jM;HK=1;var r=Fi(),t=Zc().Graph,i=V2().slack;jM=a;function a(h){var v=new t({directed:!1}),p=h.nodes()[0],g=h.nodeCount();v.setNode(p,{});for(var w,_;u(v,h)<g;)w=c(v,h),_=v.hasNode(w.v)?i(h,w):-i(h,w),l(v,h,_);return v}function u(h,v){function p(g){r.forEach(v.nodeEdges(g),function(w){var _=w.v,E=g===_?w.w:_;!h.hasNode(E)&&!i(v,w)&&(h.setNode(E,{}),h.setEdge(g,E,{}),p(E))})}return r.forEach(h.nodes(),p),h.nodeCount()}function c(h,v){return r.minBy(v.edges(),function(p){if(h.hasNode(p.v)!==h.hasNode(p.w))return i(v,p)})}function l(h,v,p){r.forEach(h.nodes(),function(g){v.node(g).rank+=p})}return jM}var BM,VK;function Jxe(){if(VK)return BM;VK=1;var r=Fi(),t=zK(),i=V2().slack,a=V2().longestPath,u=Zc().alg.preorder,c=Zc().alg.postorder,l=nu().simplify;BM=h,h.initLowLimValues=w,h.initCutValues=v,h.calcCutValue=g,h.leaveEdge=E,h.enterEdge=k,h.exchangeEdges=I;function h(L){L=l(L),a(L);var O=t(L);w(O),v(O,L);for(var M,B;M=E(O);)B=k(O,L,M),I(O,L,M,B)}function v(L,O){var M=c(L,L.nodes());M=M.slice(0,M.length-1),r.forEach(M,function(B){p(L,O,B)})}function p(L,O,M){var B=L.node(M),F=B.parent;L.edge(M,F).cutvalue=g(L,O,M)}function g(L,O,M){var B=L.node(M),F=B.parent,q=!0,$=O.edge(M,F),Y=0;return $||(q=!1,$=O.edge(F,M)),Y=$.weight,r.forEach(O.nodeEdges(M),function(V){var U=V.v===M,G=U?V.w:V.v;if(G!==F){var X=U===q,ne=O.edge(V).weight;if(Y+=X?ne:-ne,P(L,M,G)){var ae=L.edge(M,G).cutvalue;Y+=X?-ae:ae}}}),Y}function w(L,O){arguments.length<2&&(O=L.nodes()[0]),_(L,{},1,O)}function _(L,O,M,B,F){var q=M,$=L.node(B);return O[B]=!0,r.forEach(L.neighbors(B),function(Y){r.has(O,Y)||(M=_(L,O,M,Y,B))}),$.low=q,$.lim=M++,F?$.parent=F:delete $.parent,M}function E(L){return r.find(L.edges(),function(O){return L.edge(O).cutvalue<0})}function k(L,O,M){var B=M.v,F=M.w;O.hasEdge(B,F)||(B=M.w,F=M.v);var q=L.node(B),$=L.node(F),Y=q,V=!1;q.lim>$.lim&&(Y=$,V=!0);var U=r.filter(O.edges(),function(G){return V===A(L,L.node(G.v),Y)&&V!==A(L,L.node(G.w),Y)});return r.minBy(U,function(G){return i(O,G)})}function I(L,O,M,B){var F=M.v,q=M.w;L.removeEdge(F,q),L.setEdge(B.v,B.w,{}),w(L),v(L,O),C(L,O)}function C(L,O){var M=r.find(L.nodes(),function(F){return!O.node(F).parent}),B=u(L,M);B=B.slice(1),r.forEach(B,function(F){var q=L.node(F).parent,$=O.edge(F,q),Y=!1;$||($=O.edge(q,F),Y=!0),O.node(F).rank=O.node(q).rank+(Y?$.minlen:-$.minlen)})}function P(L,O,M){return L.hasEdge(O,M)}function A(L,O,M){return M.low<=O.lim&&O.lim<=M.lim}return BM}var qM,UK;function Qxe(){if(UK)return qM;UK=1;var r=V2(),t=r.longestPath,i=zK(),a=Jxe();qM=u;function u(v){switch(v.graph().ranker){case"network-simplex":h(v);break;case"tight-tree":l(v);break;case"longest-path":c(v);break;default:h(v)}}var c=t;function l(v){t(v),i(v)}function h(v){a(v)}return qM}var FM,YK;function Zxe(){if(YK)return FM;YK=1;var r=Fi();FM=t;function t(u){var c=a(u);r.forEach(u.graph().dummyChains,function(l){for(var h=u.node(l),v=h.edgeObj,p=i(u,c,v.v,v.w),g=p.path,w=p.lca,_=0,E=g[_],k=!0;l!==v.w;){if(h=u.node(l),k){for(;(E=g[_])!==w&&u.node(E).maxRank<h.rank;)_++;E===w&&(k=!1)}if(!k){for(;_<g.length-1&&u.node(E=g[_+1]).minRank<=h.rank;)_++;E=g[_]}u.setParent(l,E),l=u.successors(l)[0]}})}function i(u,c,l,h){var v=[],p=[],g=Math.min(c[l].low,c[h].low),w=Math.max(c[l].lim,c[h].lim),_,E;_=l;do _=u.parent(_),v.push(_);while(_&&(c[_].low>g||w>c[_].lim));for(E=_,_=h;(_=u.parent(_))!==E;)p.push(_);return{path:v.concat(p.reverse()),lca:E}}function a(u){var c={},l=0;function h(v){var p=l;r.forEach(u.children(v),h),c[v]={low:p,lim:l++}}return r.forEach(u.children(),h),c}return FM}var $M,WK;function e2e(){if(WK)return $M;WK=1;var r=Fi(),t=nu();$M={run:i,cleanup:l};function i(h){var v=t.addDummyNode(h,"root",{},"_root"),p=u(h),g=r.max(r.values(p))-1,w=2*g+1;h.graph().nestingRoot=v,r.forEach(h.edges(),function(E){h.edge(E).minlen*=w});var _=c(h)+1;r.forEach(h.children(),function(E){a(h,v,w,_,g,p,E)}),h.graph().nodeRankFactor=w}function a(h,v,p,g,w,_,E){var k=h.children(E);if(!k.length){E!==v&&h.setEdge(v,E,{weight:0,minlen:p});return}var I=t.addBorderNode(h,"_bt"),C=t.addBorderNode(h,"_bb"),P=h.node(E);h.setParent(I,E),P.borderTop=I,h.setParent(C,E),P.borderBottom=C,r.forEach(k,function(A){a(h,v,p,g,w,_,A);var L=h.node(A),O=L.borderTop?L.borderTop:A,M=L.borderBottom?L.borderBottom:A,B=L.borderTop?g:2*g,F=O!==M?1:w-_[E]+1;h.setEdge(I,O,{weight:B,minlen:F,nestingEdge:!0}),h.setEdge(M,C,{weight:B,minlen:F,nestingEdge:!0})}),h.parent(E)||h.setEdge(v,I,{weight:0,minlen:w+_[E]})}function u(h){var v={};function p(g,w){var _=h.children(g);_&&_.length&&r.forEach(_,function(E){p(E,w+1)}),v[g]=w}return r.forEach(h.children(),function(g){p(g,1)}),v}function c(h){return r.reduce(h.edges(),function(v,p){return v+h.edge(p).weight},0)}function l(h){var v=h.graph();h.removeNode(v.nestingRoot),delete v.nestingRoot,r.forEach(h.edges(),function(p){var g=h.edge(p);g.nestingEdge&&h.removeEdge(p)})}return $M}var GM,KK;function t2e(){if(KK)return GM;KK=1;var r=Fi(),t=nu();GM=i;function i(u){function c(l){var h=u.children(l),v=u.node(l);if(h.length&&r.forEach(h,c),r.has(v,"minRank")){v.borderLeft=[],v.borderRight=[];for(var p=v.minRank,g=v.maxRank+1;p<g;++p)a(u,"borderLeft","_bl",l,v,p),a(u,"borderRight","_br",l,v,p)}}r.forEach(u.children(),c)}function a(u,c,l,h,v,p){var g={width:0,height:0,rank:p,borderType:c},w=v[c][p-1],_=t.addDummyNode(u,"border",g,l);v[c][p]=_,u.setParent(_,h),w&&u.setEdge(w,_,{weight:1})}return GM}var HM,XK;function n2e(){if(XK)return HM;XK=1;var r=Fi();HM={adjust:t,undo:i};function t(p){var g=p.graph().rankdir.toLowerCase();(g==="lr"||g==="rl")&&a(p)}function i(p){var g=p.graph().rankdir.toLowerCase();(g==="bt"||g==="rl")&&c(p),(g==="lr"||g==="rl")&&(h(p),a(p))}function a(p){r.forEach(p.nodes(),function(g){u(p.node(g))}),r.forEach(p.edges(),function(g){u(p.edge(g))})}function u(p){var g=p.width;p.width=p.height,p.height=g}function c(p){r.forEach(p.nodes(),function(g){l(p.node(g))}),r.forEach(p.edges(),function(g){var w=p.edge(g);r.forEach(w.points,l),r.has(w,"y")&&l(w)})}function l(p){p.y=-p.y}function h(p){r.forEach(p.nodes(),function(g){v(p.node(g))}),r.forEach(p.edges(),function(g){var w=p.edge(g);r.forEach(w.points,v),r.has(w,"x")&&v(w)})}function v(p){var g=p.x;p.x=p.y,p.y=g}return HM}var zM,JK;function r2e(){if(JK)return zM;JK=1;var r=Fi();zM=t;function t(i){var a={},u=r.filter(i.nodes(),function(p){return!i.children(p).length}),c=r.max(r.map(u,function(p){return i.node(p).rank})),l=r.map(r.range(c+1),function(){return[]});function h(p){if(!r.has(a,p)){a[p]=!0;var g=i.node(p);l[g.rank].push(p),r.forEach(i.successors(p),h)}}var v=r.sortBy(u,function(p){return i.node(p).rank});return r.forEach(v,h),l}return zM}var VM,QK;function i2e(){if(QK)return VM;QK=1;var r=Fi();VM=t;function t(a,u){for(var c=0,l=1;l<u.length;++l)c+=i(a,u[l-1],u[l]);return c}function i(a,u,c){for(var l=r.zipObject(c,r.map(c,function(_,E){return E})),h=r.flatten(r.map(u,function(_){return r.sortBy(r.map(a.outEdges(_),function(E){return{pos:l[E.w],weight:a.edge(E).weight}}),"pos")}),!0),v=1;v<c.length;)v<<=1;var p=2*v-1;v-=1;var g=r.map(new Array(p),function(){return 0}),w=0;return r.forEach(h.forEach(function(_){var E=_.pos+v;g[E]+=_.weight;for(var k=0;E>0;)E%2&&(k+=g[E+1]),E=E-1>>1,g[E]+=_.weight;w+=_.weight*k})),w}return VM}var UM,ZK;function a2e(){if(ZK)return UM;ZK=1;var r=Fi();UM=t;function t(i,a){return r.map(a,function(u){var c=i.inEdges(u);if(c.length){var l=r.reduce(c,function(h,v){var p=i.edge(v),g=i.node(v.v);return{sum:h.sum+p.weight*g.order,weight:h.weight+p.weight}},{sum:0,weight:0});return{v:u,barycenter:l.sum/l.weight,weight:l.weight}}else return{v:u}})}return UM}var YM,eX;function s2e(){if(eX)return YM;eX=1;var r=Fi();YM=t;function t(u,c){var l={};r.forEach(u,function(v,p){var g=l[v.v]={indegree:0,in:[],out:[],vs:[v.v],i:p};r.isUndefined(v.barycenter)||(g.barycenter=v.barycenter,g.weight=v.weight)}),r.forEach(c.edges(),function(v){var p=l[v.v],g=l[v.w];!r.isUndefined(p)&&!r.isUndefined(g)&&(g.indegree++,p.out.push(l[v.w]))});var h=r.filter(l,function(v){return!v.indegree});return i(h)}function i(u){var c=[];function l(p){return function(g){g.merged||(r.isUndefined(g.barycenter)||r.isUndefined(p.barycenter)||g.barycenter>=p.barycenter)&&a(p,g)}}function h(p){return function(g){g.in.push(p),--g.indegree===0&&u.push(g)}}for(;u.length;){var v=u.pop();c.push(v),r.forEach(v.in.reverse(),l(v)),r.forEach(v.out,h(v))}return r.map(r.filter(c,function(p){return!p.merged}),function(p){return r.pick(p,["vs","i","barycenter","weight"])})}function a(u,c){var l=0,h=0;u.weight&&(l+=u.barycenter*u.weight,h+=u.weight),c.weight&&(l+=c.barycenter*c.weight,h+=c.weight),u.vs=c.vs.concat(u.vs),u.barycenter=l/h,u.weight=h,u.i=Math.min(c.i,u.i),c.merged=!0}return YM}var WM,tX;function o2e(){if(tX)return WM;tX=1;var r=Fi(),t=nu();WM=i;function i(c,l){var h=t.partition(c,function(I){return r.has(I,"barycenter")}),v=h.lhs,p=r.sortBy(h.rhs,function(I){return-I.i}),g=[],w=0,_=0,E=0;v.sort(u(!!l)),E=a(g,p,E),r.forEach(v,function(I){E+=I.vs.length,g.push(I.vs),w+=I.barycenter*I.weight,_+=I.weight,E=a(g,p,E)});var k={vs:r.flatten(g,!0)};return _&&(k.barycenter=w/_,k.weight=_),k}function a(c,l,h){for(var v;l.length&&(v=r.last(l)).i<=h;)l.pop(),c.push(v.vs),h++;return h}function u(c){return function(l,h){return l.barycenter<h.barycenter?-1:l.barycenter>h.barycenter?1:c?h.i-l.i:l.i-h.i}}return WM}var KM,nX;function u2e(){if(nX)return KM;nX=1;var r=Fi(),t=a2e(),i=s2e(),a=o2e();KM=u;function u(h,v,p,g){var w=h.children(v),_=h.node(v),E=_?_.borderLeft:void 0,k=_?_.borderRight:void 0,I={};E&&(w=r.filter(w,function(M){return M!==E&&M!==k}));var C=t(h,w);r.forEach(C,function(M){if(h.children(M.v).length){var B=u(h,M.v,p,g);I[M.v]=B,r.has(B,"barycenter")&&l(M,B)}});var P=i(C,p);c(P,I);var A=a(P,g);if(E&&(A.vs=r.flatten([E,A.vs,k],!0),h.predecessors(E).length)){var L=h.node(h.predecessors(E)[0]),O=h.node(h.predecessors(k)[0]);r.has(A,"barycenter")||(A.barycenter=0,A.weight=0),A.barycenter=(A.barycenter*A.weight+L.order+O.order)/(A.weight+2),A.weight+=2}return A}function c(h,v){r.forEach(h,function(p){p.vs=r.flatten(p.vs.map(function(g){return v[g]?v[g].vs:g}),!0)})}function l(h,v){r.isUndefined(h.barycenter)?(h.barycenter=v.barycenter,h.weight=v.weight):(h.barycenter=(h.barycenter*h.weight+v.barycenter*v.weight)/(h.weight+v.weight),h.weight+=v.weight)}return KM}var XM,rX;function c2e(){if(rX)return XM;rX=1;var r=Fi(),t=Zc().Graph;XM=i;function i(u,c,l){var h=a(u),v=new t({compound:!0}).setGraph({root:h}).setDefaultNodeLabel(function(p){return u.node(p)});return r.forEach(u.nodes(),function(p){var g=u.node(p),w=u.parent(p);(g.rank===c||g.minRank<=c&&c<=g.maxRank)&&(v.setNode(p),v.setParent(p,w||h),r.forEach(u[l](p),function(_){var E=_.v===p?_.w:_.v,k=v.edge(E,p),I=r.isUndefined(k)?0:k.weight;v.setEdge(E,p,{weight:u.edge(_).weight+I})}),r.has(g,"minRank")&&v.setNode(p,{borderLeft:g.borderLeft[c],borderRight:g.borderRight[c]}))}),v}function a(u){for(var c;u.hasNode(c=r.uniqueId("_root")););return c}return XM}var JM,iX;function l2e(){if(iX)return JM;iX=1;var r=Fi();JM=t;function t(i,a,u){var c={},l;r.forEach(u,function(h){for(var v=i.parent(h),p,g;v;){if(p=i.parent(v),p?(g=c[p],c[p]=v):(g=l,l=v),g&&g!==v){a.setEdge(g,v);return}v=p}})}return JM}var QM,aX;function f2e(){if(aX)return QM;aX=1;var r=Fi(),t=r2e(),i=i2e(),a=u2e(),u=c2e(),c=l2e(),l=Zc().Graph,h=nu();QM=v;function v(_){var E=h.maxRank(_),k=p(_,r.range(1,E+1),"inEdges"),I=p(_,r.range(E-1,-1,-1),"outEdges"),C=t(_);w(_,C);for(var P=Number.POSITIVE_INFINITY,A,L=0,O=0;O<4;++L,++O){g(L%2?k:I,L%4>=2),C=h.buildLayerMatrix(_);var M=i(_,C);M<P&&(O=0,A=r.cloneDeep(C),P=M)}w(_,A)}function p(_,E,k){return r.map(E,function(I){return u(_,I,k)})}function g(_,E){var k=new l;r.forEach(_,function(I){var C=I.graph().root,P=a(I,C,k,E);r.forEach(P.vs,function(A,L){I.node(A).order=L}),c(I,k,P.vs)})}function w(_,E){r.forEach(E,function(k){r.forEach(k,function(I,C){_.node(I).order=C})})}return QM}var ZM,sX;function h2e(){if(sX)return ZM;sX=1;var r=Fi(),t=Zc().Graph,i=nu();ZM={positionX:k,findType1Conflicts:a,findType2Conflicts:u,addConflict:l,hasConflict:h,verticalAlignment:v,horizontalCompaction:p,alignCoordinates:_,findSmallestWidthAlignment:w,balance:E};function a(P,A){var L={};function O(M,B){var F=0,q=0,$=M.length,Y=r.last(B);return r.forEach(B,function(V,U){var G=c(P,V),X=G?P.node(G).order:$;(G||V===Y)&&(r.forEach(B.slice(q,U+1),function(ne){r.forEach(P.predecessors(ne),function(ae){var oe=P.node(ae),le=oe.order;(le<F||X<le)&&!(oe.dummy&&P.node(ne).dummy)&&l(L,ae,ne)})}),q=U+1,F=X)}),B}return r.reduce(A,O),L}function u(P,A){var L={};function O(B,F,q,$,Y){var V;r.forEach(r.range(F,q),function(U){V=B[U],P.node(V).dummy&&r.forEach(P.predecessors(V),function(G){var X=P.node(G);X.dummy&&(X.order<$||X.order>Y)&&l(L,G,V)})})}function M(B,F){var q=-1,$,Y=0;return r.forEach(F,function(V,U){if(P.node(V).dummy==="border"){var G=P.predecessors(V);G.length&&($=P.node(G[0]).order,O(F,Y,U,q,$),Y=U,q=$)}O(F,Y,F.length,$,B.length)}),F}return r.reduce(A,M),L}function c(P,A){if(P.node(A).dummy)return r.find(P.predecessors(A),function(L){return P.node(L).dummy})}function l(P,A,L){if(A>L){var O=A;A=L,L=O}var M=P[A];M||(P[A]=M={}),M[L]=!0}function h(P,A,L){if(A>L){var O=A;A=L,L=O}return r.has(P[A],L)}function v(P,A,L,O){var M={},B={},F={};return r.forEach(A,function(q){r.forEach(q,function($,Y){M[$]=$,B[$]=$,F[$]=Y})}),r.forEach(A,function(q){var $=-1;r.forEach(q,function(Y){var V=O(Y);if(V.length){V=r.sortBy(V,function(ae){return F[ae]});for(var U=(V.length-1)/2,G=Math.floor(U),X=Math.ceil(U);G<=X;++G){var ne=V[G];B[Y]===Y&&$<F[ne]&&!h(L,Y,ne)&&(B[ne]=Y,B[Y]=M[Y]=M[ne],$=F[ne])}}})}),{root:M,align:B}}function p(P,A,L,O,M){var B={},F=g(P,A,L,M),q=M?"borderLeft":"borderRight";function $(U,G){for(var X=F.nodes(),ne=X.pop(),ae={};ne;)ae[ne]?U(ne):(ae[ne]=!0,X.push(ne),X=X.concat(G(ne))),ne=X.pop()}function Y(U){B[U]=F.inEdges(U).reduce(function(G,X){return Math.max(G,B[X.v]+F.edge(X))},0)}function V(U){var G=F.outEdges(U).reduce(function(ne,ae){return Math.min(ne,B[ae.w]-F.edge(ae))},Number.POSITIVE_INFINITY),X=P.node(U);G!==Number.POSITIVE_INFINITY&&X.borderType!==q&&(B[U]=Math.max(B[U],G))}return $(Y,F.predecessors.bind(F)),$(V,F.successors.bind(F)),r.forEach(O,function(U){B[U]=B[L[U]]}),B}function g(P,A,L,O){var M=new t,B=P.graph(),F=I(B.nodesep,B.edgesep,O);return r.forEach(A,function(q){var $;r.forEach(q,function(Y){var V=L[Y];if(M.setNode(V),$){var U=L[$],G=M.edge(U,V);M.setEdge(U,V,Math.max(F(P,Y,$),G||0))}$=Y})}),M}function w(P,A){return r.minBy(r.values(A),function(L){var O=Number.NEGATIVE_INFINITY,M=Number.POSITIVE_INFINITY;return r.forIn(L,function(B,F){var q=C(P,F)/2;O=Math.max(B+q,O),M=Math.min(B-q,M)}),O-M})}function _(P,A){var L=r.values(A),O=r.min(L),M=r.max(L);r.forEach(["u","d"],function(B){r.forEach(["l","r"],function(F){var q=B+F,$=P[q],Y;if($!==A){var V=r.values($);Y=F==="l"?O-r.min(V):M-r.max(V),Y&&(P[q]=r.mapValues($,function(U){return U+Y}))}})})}function E(P,A){return r.mapValues(P.ul,function(L,O){if(A)return P[A.toLowerCase()][O];var M=r.sortBy(r.map(P,O));return(M[1]+M[2])/2})}function k(P){var A=i.buildLayerMatrix(P),L=r.merge(a(P,A),u(P,A)),O={},M;r.forEach(["u","d"],function(F){M=F==="u"?A:r.values(A).reverse(),r.forEach(["l","r"],function(q){q==="r"&&(M=r.map(M,function(U){return r.values(U).reverse()}));var $=(F==="u"?P.predecessors:P.successors).bind(P),Y=v(P,M,L,$),V=p(P,M,Y.root,Y.align,q==="r");q==="r"&&(V=r.mapValues(V,function(U){return-U})),O[F+q]=V})});var B=w(P,O);return _(O,B),E(O,P.graph().align)}function I(P,A,L){return function(O,M,B){var F=O.node(M),q=O.node(B),$=0,Y;if($+=F.width/2,r.has(F,"labelpos"))switch(F.labelpos.toLowerCase()){case"l":Y=-F.width/2;break;case"r":Y=F.width/2;break}if(Y&&($+=L?Y:-Y),Y=0,$+=(F.dummy?A:P)/2,$+=(q.dummy?A:P)/2,$+=q.width/2,r.has(q,"labelpos"))switch(q.labelpos.toLowerCase()){case"l":Y=q.width/2;break;case"r":Y=-q.width/2;break}return Y&&($+=L?Y:-Y),Y=0,$}}function C(P,A){return P.node(A).width}return ZM}var e3,oX;function d2e(){if(oX)return e3;oX=1;var r=Fi(),t=nu(),i=h2e().positionX;e3=a;function a(c){c=t.asNonCompoundGraph(c),u(c),r.forEach(i(c),function(l,h){c.node(h).x=l})}function u(c){var l=t.buildLayerMatrix(c),h=c.graph().ranksep,v=0;r.forEach(l,function(p){var g=r.max(r.map(p,function(w){return c.node(w).height}));r.forEach(p,function(w){c.node(w).y=v+g/2}),v+=g+h})}return e3}var t3,uX;function v2e(){if(uX)return t3;uX=1;var r=Fi(),t=Kxe(),i=Xxe(),a=Qxe(),u=nu().normalizeRanks,c=Zxe(),l=nu().removeEmptyRanks,h=e2e(),v=t2e(),p=n2e(),g=f2e(),w=d2e(),_=nu(),E=Zc().Graph;t3=k;function k(ye,we){var Pe=we&&we.debugTiming?_.time:_.notime;Pe("layout",function(){var Fe=Pe(" buildLayoutGraph",function(){return $(ye)});Pe(" runLayout",function(){I(Fe,Pe)}),Pe(" updateInputGraph",function(){C(ye,Fe)})})}function I(ye,we){we(" makeSpaceForEdgeLabels",function(){Y(ye)}),we(" removeSelfEdges",function(){pe(ye)}),we(" acyclic",function(){t.run(ye)}),we(" nestingGraph.run",function(){h.run(ye)}),we(" rank",function(){a(_.asNonCompoundGraph(ye))}),we(" injectEdgeLabelProxies",function(){V(ye)}),we(" removeEmptyRanks",function(){l(ye)}),we(" nestingGraph.cleanup",function(){h.cleanup(ye)}),we(" normalizeRanks",function(){u(ye)}),we(" assignRankMinMax",function(){U(ye)}),we(" removeEdgeLabelProxies",function(){G(ye)}),we(" normalize.run",function(){i.run(ye)}),we(" parentDummyChains",function(){c(ye)}),we(" addBorderSegments",function(){v(ye)}),we(" order",function(){g(ye)}),we(" insertSelfEdges",function(){ge(ye)}),we(" adjustCoordinateSystem",function(){p.adjust(ye)}),we(" position",function(){w(ye)}),we(" positionSelfEdges",function(){de(ye)}),we(" removeBorderNodes",function(){le(ye)}),we(" normalize.undo",function(){i.undo(ye)}),we(" fixupEdgeLabelCoords",function(){ae(ye)}),we(" undoCoordinateSystem",function(){p.undo(ye)}),we(" translateGraph",function(){X(ye)}),we(" assignNodeIntersects",function(){ne(ye)}),we(" reversePoints",function(){oe(ye)}),we(" acyclic.undo",function(){t.undo(ye)})}function C(ye,we){r.forEach(ye.nodes(),function(Pe){var Fe=ye.node(Pe),Ue=we.node(Pe);Fe&&(Fe.x=Ue.x,Fe.y=Ue.y,we.children(Pe).length&&(Fe.width=Ue.width,Fe.height=Ue.height))}),r.forEach(ye.edges(),function(Pe){var Fe=ye.edge(Pe),Ue=we.edge(Pe);Fe.points=Ue.points,r.has(Ue,"x")&&(Fe.x=Ue.x,Fe.y=Ue.y)}),ye.graph().width=we.graph().width,ye.graph().height=we.graph().height}var P=["nodesep","edgesep","ranksep","marginx","marginy"],A={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},L=["acyclicer","ranker","rankdir","align"],O=["width","height"],M={width:0,height:0},B=["minlen","weight","width","height","labeloffset"],F={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},q=["labelpos"];function $(ye){var we=new E({multigraph:!0,compound:!0}),Pe=Ne(ye.graph());return we.setGraph(r.merge({},A,Se(Pe,P),r.pick(Pe,L))),r.forEach(ye.nodes(),function(Fe){var Ue=Ne(ye.node(Fe));we.setNode(Fe,r.defaults(Se(Ue,O),M)),we.setParent(Fe,ye.parent(Fe))}),r.forEach(ye.edges(),function(Fe){var Ue=Ne(ye.edge(Fe));we.setEdge(Fe,r.merge({},F,Se(Ue,B),r.pick(Ue,q)))}),we}function Y(ye){var we=ye.graph();we.ranksep/=2,r.forEach(ye.edges(),function(Pe){var Fe=ye.edge(Pe);Fe.minlen*=2,Fe.labelpos.toLowerCase()!=="c"&&(we.rankdir==="TB"||we.rankdir==="BT"?Fe.width+=Fe.labeloffset:Fe.height+=Fe.labeloffset)})}function V(ye){r.forEach(ye.edges(),function(we){var Pe=ye.edge(we);if(Pe.width&&Pe.height){var Fe=ye.node(we.v),Ue=ye.node(we.w),He={rank:(Ue.rank-Fe.rank)/2+Fe.rank,e:we};_.addDummyNode(ye,"edge-proxy",He,"_ep")}})}function U(ye){var we=0;r.forEach(ye.nodes(),function(Pe){var Fe=ye.node(Pe);Fe.borderTop&&(Fe.minRank=ye.node(Fe.borderTop).rank,Fe.maxRank=ye.node(Fe.borderBottom).rank,we=r.max(we,Fe.maxRank))}),ye.graph().maxRank=we}function G(ye){r.forEach(ye.nodes(),function(we){var Pe=ye.node(we);Pe.dummy==="edge-proxy"&&(ye.edge(Pe.e).labelRank=Pe.rank,ye.removeNode(we))})}function X(ye){var we=Number.POSITIVE_INFINITY,Pe=0,Fe=Number.POSITIVE_INFINITY,Ue=0,He=ye.graph(),De=He.marginx||0,Ce=He.marginy||0;function Be(ve){var ke=ve.x,je=ve.y,qe=ve.width,Me=ve.height;we=Math.min(we,ke-qe/2),Pe=Math.max(Pe,ke+qe/2),Fe=Math.min(Fe,je-Me/2),Ue=Math.max(Ue,je+Me/2)}r.forEach(ye.nodes(),function(ve){Be(ye.node(ve))}),r.forEach(ye.edges(),function(ve){var ke=ye.edge(ve);r.has(ke,"x")&&Be(ke)}),we-=De,Fe-=Ce,r.forEach(ye.nodes(),function(ve){var ke=ye.node(ve);ke.x-=we,ke.y-=Fe}),r.forEach(ye.edges(),function(ve){var ke=ye.edge(ve);r.forEach(ke.points,function(je){je.x-=we,je.y-=Fe}),r.has(ke,"x")&&(ke.x-=we),r.has(ke,"y")&&(ke.y-=Fe)}),He.width=Pe-we+De,He.height=Ue-Fe+Ce}function ne(ye){r.forEach(ye.edges(),function(we){var Pe=ye.edge(we),Fe=ye.node(we.v),Ue=ye.node(we.w),He,De;Pe.points?(He=Pe.points[0],De=Pe.points[Pe.points.length-1]):(Pe.points=[],He=Ue,De=Fe),Pe.points.unshift(_.intersectRect(Fe,He)),Pe.points.push(_.intersectRect(Ue,De))})}function ae(ye){r.forEach(ye.edges(),function(we){var Pe=ye.edge(we);if(r.has(Pe,"x"))switch((Pe.labelpos==="l"||Pe.labelpos==="r")&&(Pe.width-=Pe.labeloffset),Pe.labelpos){case"l":Pe.x-=Pe.width/2+Pe.labeloffset;break;case"r":Pe.x+=Pe.width/2+Pe.labeloffset;break}})}function oe(ye){r.forEach(ye.edges(),function(we){var Pe=ye.edge(we);Pe.reversed&&Pe.points.reverse()})}function le(ye){r.forEach(ye.nodes(),function(we){if(ye.children(we).length){var Pe=ye.node(we),Fe=ye.node(Pe.borderTop),Ue=ye.node(Pe.borderBottom),He=ye.node(r.last(Pe.borderLeft)),De=ye.node(r.last(Pe.borderRight));Pe.width=Math.abs(De.x-He.x),Pe.height=Math.abs(Ue.y-Fe.y),Pe.x=He.x+Pe.width/2,Pe.y=Fe.y+Pe.height/2}}),r.forEach(ye.nodes(),function(we){ye.node(we).dummy==="border"&&ye.removeNode(we)})}function pe(ye){r.forEach(ye.edges(),function(we){if(we.v===we.w){var Pe=ye.node(we.v);Pe.selfEdges||(Pe.selfEdges=[]),Pe.selfEdges.push({e:we,label:ye.edge(we)}),ye.removeEdge(we)}})}function ge(ye){var we=_.buildLayerMatrix(ye);r.forEach(we,function(Pe){var Fe=0;r.forEach(Pe,function(Ue,He){var De=ye.node(Ue);De.order=He+Fe,r.forEach(De.selfEdges,function(Ce){_.addDummyNode(ye,"selfedge",{width:Ce.label.width,height:Ce.label.height,rank:De.rank,order:He+ ++Fe,e:Ce.e,label:Ce.label},"_se")}),delete De.selfEdges})})}function de(ye){r.forEach(ye.nodes(),function(we){var Pe=ye.node(we);if(Pe.dummy==="selfedge"){var Fe=ye.node(Pe.e.v),Ue=Fe.x+Fe.width/2,He=Fe.y,De=Pe.x-Ue,Ce=Fe.height/2;ye.setEdge(Pe.e,Pe.label),ye.removeNode(we),Pe.label.points=[{x:Ue+2*De/3,y:He-Ce},{x:Ue+5*De/6,y:He-Ce},{x:Ue+De,y:He},{x:Ue+5*De/6,y:He+Ce},{x:Ue+2*De/3,y:He+Ce}],Pe.label.x=Pe.x,Pe.label.y=Pe.y}})}function Se(ye,we){return r.mapValues(r.pick(ye,we),Number)}function Ne(ye){var we={};return r.forEach(ye,function(Pe,Fe){we[Fe.toLowerCase()]=Pe}),we}return t3}var n3,cX;function p2e(){if(cX)return n3;cX=1;var r=Fi(),t=nu(),i=Zc().Graph;n3={debugOrdering:a};function a(u){var c=t.buildLayerMatrix(u),l=new i({compound:!0,multigraph:!0}).setGraph({});return r.forEach(u.nodes(),function(h){l.setNode(h,{label:h}),l.setParent(h,"layer"+u.node(h).rank)}),r.forEach(u.edges(),function(h){l.setEdge(h.v,h.w,{},h.name)}),r.forEach(c,function(h,v){var p="layer"+v;l.setNode(p,{rank:"same"}),r.reduce(h,function(g,w){return l.setEdge(g,w,{style:"invis"}),w})}),l}return n3}var r3,lX;function g2e(){return lX||(lX=1,r3="0.8.5"),r3}var i3,fX;function b2e(){return fX||(fX=1,i3={graphlib:Zc(),layout:v2e(),debug:p2e(),util:{time:nu().time,notime:nu().notime},version:g2e()}),i3}(function(r,t){(function(a,u){r.exports=u(b2e())})(Lr,function(i){return function(a){var u={};function c(l){if(u[l])return u[l].exports;var h=u[l]={i:l,l:!1,exports:{}};return a[l].call(h.exports,h,h.exports,c),h.l=!0,h.exports}return c.m=a,c.c=u,c.d=function(l,h,v){c.o(l,h)||Object.defineProperty(l,h,{enumerable:!0,get:v})},c.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})},c.t=function(l,h){if(h&1&&(l=c(l)),h&8||h&4&&typeof l=="object"&&l&&l.__esModule)return l;var v=Object.create(null);if(c.r(v),Object.defineProperty(v,"default",{enumerable:!0,value:l}),h&2&&typeof l!="string")for(var p in l)c.d(v,p,(function(g){return l[g]}).bind(null,p));return v},c.n=function(l){var h=l&&l.__esModule?function(){return l.default}:function(){return l};return c.d(h,"a",h),h},c.o=function(l,h){return Object.prototype.hasOwnProperty.call(l,h)},c.p="",c(c.s=0)}([function(a,u,c){var l=c(1),h=function(p){p&&p("layout","dagre",l)};typeof cytoscape<"u"&&h(cytoscape),a.exports=h},function(a,u,c){function l(_){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(k){return typeof k}:l=function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},l(_)}var h=function(E){return typeof E=="function"},v=c(2),p=c(3),g=c(4);function w(_){this.options=p({},v,_)}w.prototype.run=function(){var _=this.options,E=this,k=_.cy,I=_.eles,C=function(de,Se){return h(Se)?Se.apply(de,[de]):Se},P=_.boundingBox||{x1:0,y1:0,w:k.width(),h:k.height()};P.x2===void 0&&(P.x2=P.x1+P.w),P.w===void 0&&(P.w=P.x2-P.x1),P.y2===void 0&&(P.y2=P.y1+P.h),P.h===void 0&&(P.h=P.y2-P.y1);var A=new g.graphlib.Graph({multigraph:!0,compound:!0}),L={},O=function(de,Se){Se!=null&&(L[de]=Se)};O("nodesep",_.nodeSep),O("edgesep",_.edgeSep),O("ranksep",_.rankSep),O("rankdir",_.rankDir),O("align",_.align),O("ranker",_.ranker),O("acyclicer",_.acyclicer),A.setGraph(L),A.setDefaultEdgeLabel(function(){return{}}),A.setDefaultNodeLabel(function(){return{}});var M=I.nodes();h(_.sort)&&(M=M.sort(_.sort));for(var B=0;B<M.length;B++){var F=M[B],q=F.layoutDimensions(_);A.setNode(F.id(),{width:q.w,height:q.h,name:F.id()})}for(var $=0;$<M.length;$++){var Y=M[$];Y.isChild()&&A.setParent(Y.id(),Y.parent().id())}var V=I.edges().stdFilter(function(ge){return!ge.source().isParent()&&!ge.target().isParent()});h(_.sort)&&(V=V.sort(_.sort));for(var U=0;U<V.length;U++){var G=V[U];A.setEdge(G.source().id(),G.target().id(),{minlen:C(G,_.minLen),weight:C(G,_.edgeWeight),name:G.id()},G.id())}g.layout(A);for(var X=A.nodes(),ne=0;ne<X.length;ne++){var ae=X[ne],oe=A.node(ae);k.getElementById(ae).scratch().dagre=oe}var le;_.boundingBox?(le={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0},M.forEach(function(ge){var de=ge.scratch().dagre;le.x1=Math.min(le.x1,de.x),le.x2=Math.max(le.x2,de.x),le.y1=Math.min(le.y1,de.y),le.y2=Math.max(le.y2,de.y)}),le.w=le.x2-le.x1,le.h=le.y2-le.y1):le=P;var pe=function(de){if(_.boundingBox){var Se=le.w===0?0:(de.x-le.x1)/le.w,Ne=le.h===0?0:(de.y-le.y1)/le.h;return{x:P.x1+Se*P.w,y:P.y1+Ne*P.h}}else return de};return M.layoutPositions(E,_,function(ge){ge=l(ge)==="object"?ge:this;var de=ge.scratch().dagre;return pe({x:de.x,y:de.y})}),this},a.exports=w},function(a,u){var c={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,v){return!0},animationDuration:500,animationEasing:void 0,boundingBox:void 0,transform:function(h,v){return v},ready:function(){},sort:void 0,stop:function(){}};a.exports=c},function(a,u){a.exports=Object.assign!=null?Object.assign.bind(Object):function(c){for(var l=arguments.length,h=new Array(l>1?l-1:0),v=1;v<l;v++)h[v-1]=arguments[v];return h.forEach(function(p){Object.keys(p).forEach(function(g){return c[g]=p[g]})}),c}},function(a,u){a.exports=i}])})})(UH);var y2e=UH.exports;const m2e=Lb(y2e);var hX={exports:{}},a3={},X1={},s3={},dh={},dX;function vX(){if(dX)return dh;dX=1,Object.defineProperty(dh,"__esModule",{value:!0});var r=function(){function v(p,g,w){this.source=p,this.target=g,this.type=w}return v}();dh.PowerEdge=r;var t=function(){function v(p,g,w,_){var E=this;if(this.linkAccessor=w,this.modules=new Array(p),this.roots=[],_)this.initModulesFromGroup(_);else{this.roots.push(new c);for(var k=0;k<p;++k)this.roots[0].add(this.modules[k]=new a(k))}this.R=g.length,g.forEach(function(I){var C=E.modules[w.getSourceIndex(I)],P=E.modules[w.getTargetIndex(I)],A=w.getType(I);C.outgoing.add(A,P),P.incoming.add(A,C)})}return v.prototype.initModulesFromGroup=function(p){var g=new c;this.roots.push(g);for(var w=0;w<p.leaves.length;++w){var _=p.leaves[w],E=new a(_.id);this.modules[_.id]=E,g.add(E)}if(p.groups)for(var k=0;k<p.groups.length;++k){var I=p.groups[k],C={};for(var P in I)P!=="leaves"&&P!=="groups"&&I.hasOwnProperty(P)&&(C[P]=I[P]);g.add(new a(-1-k,new l,new l,this.initModulesFromGroup(I),C))}return g},v.prototype.merge=function(p,g,w){w===void 0&&(w=0);var _=p.incoming.intersection(g.incoming),E=p.outgoing.intersection(g.outgoing),k=new c;k.add(p),k.add(g);var I=new a(this.modules.length,E,_,k);this.modules.push(I);var C=function(P,A,L){P.forAll(function(O,M){O.forAll(function(B){var F=B[A];F.add(M,I),F.remove(M,p),F.remove(M,g),p[L].remove(M,B),g[L].remove(M,B)})})};return C(E,"incoming","outgoing"),C(_,"outgoing","incoming"),this.R-=_.count()+E.count(),this.roots[w].remove(p),this.roots[w].remove(g),this.roots[w].add(I),I},v.prototype.rootMerges=function(p){p===void 0&&(p=0);for(var g=this.roots[p].modules(),w=g.length,_=new Array(w*(w-1)),E=0,k=0,I=w-1;k<I;++k)for(var C=k+1;C<w;++C){var P=g[k],A=g[C];_[E]={id:E,nEdges:this.nEdges(P,A),a:P,b:A},E++}return _},v.prototype.greedyMerge=function(){for(var p=0;p<this.roots.length;++p)if(!(this.roots[p].modules().length<2)){var g=this.rootMerges(p).sort(function(_,E){return _.nEdges==E.nEdges?_.id-E.id:_.nEdges-E.nEdges}),w=g[0];if(!(w.nEdges>=this.R))return this.merge(w.a,w.b,p),!0}},v.prototype.nEdges=function(p,g){var w=p.incoming.intersection(g.incoming),_=p.outgoing.intersection(g.outgoing);return this.R-w.count()-_.count()},v.prototype.getGroupHierarchy=function(p){var g=this,w=[],_={};i(this.roots[0],_,w);var E=this.allEdges();return E.forEach(function(k){var I=g.modules[k.source],C=g.modules[k.target];p.push(new r(typeof I.gid>"u"?k.source:w[I.gid],typeof C.gid>"u"?k.target:w[C.gid],k.type))}),w},v.prototype.allEdges=function(){var p=[];return v.getEdges(this.roots[0],p),p},v.getEdges=function(p,g){p.forAll(function(w){w.getEdges(g),v.getEdges(w.children,g)})},v}();dh.Configuration=t;function i(v,p,g){v.forAll(function(w){if(w.isLeaf())p.leaves||(p.leaves=[]),p.leaves.push(w.id);else{var _=p;if(w.gid=g.length,!w.isIsland()||w.isPredefined()){if(_={id:w.gid},w.isPredefined())for(var E in w.definition)_[E]=w.definition[E];p.groups||(p.groups=[]),p.groups.push(w.gid),g.push(_)}i(w.children,_,g)}})}var a=function(){function v(p,g,w,_,E){g===void 0&&(g=new l),w===void 0&&(w=new l),_===void 0&&(_=new c),this.id=p,this.outgoing=g,this.incoming=w,this.children=_,this.definition=E}return v.prototype.getEdges=function(p){var g=this;this.outgoing.forAll(function(w,_){w.forAll(function(E){p.push(new r(g.id,E.id,_))})})},v.prototype.isLeaf=function(){return this.children.count()===0},v.prototype.isIsland=function(){return this.outgoing.count()===0&&this.incoming.count()===0},v.prototype.isPredefined=function(){return typeof this.definition<"u"},v}();dh.Module=a;function u(v,p){var g={};for(var w in v)w in p&&(g[w]=v[w]);return g}var c=function(){function v(){this.table={}}return v.prototype.count=function(){return Object.keys(this.table).length},v.prototype.intersection=function(p){var g=new v;return g.table=u(this.table,p.table),g},v.prototype.intersectionCount=function(p){return this.intersection(p).count()},v.prototype.contains=function(p){return p in this.table},v.prototype.add=function(p){this.table[p.id]=p},v.prototype.remove=function(p){delete this.table[p.id]},v.prototype.forAll=function(p){for(var g in this.table)p(this.table[g])},v.prototype.modules=function(){var p=[];return this.forAll(function(g){g.isPredefined()||p.push(g)}),p},v}();dh.ModuleSet=c;var l=function(){function v(){this.sets={},this.n=0}return v.prototype.count=function(){return this.n},v.prototype.contains=function(p){var g=!1;return this.forAllModules(function(w){!g&&w.id==p&&(g=!0)}),g},v.prototype.add=function(p,g){var w=p in this.sets?this.sets[p]:this.sets[p]=new c;w.add(g),++this.n},v.prototype.remove=function(p,g){var w=this.sets[p];w.remove(g),w.count()===0&&delete this.sets[p],--this.n},v.prototype.forAll=function(p){for(var g in this.sets)p(this.sets[g],Number(g))},v.prototype.forAllModules=function(p){this.forAll(function(g,w){return g.forAll(p)})},v.prototype.intersection=function(p){var g=new v;return this.forAll(function(w,_){if(_ in p.sets){var E=w.intersection(p.sets[_]),k=E.count();k>0&&(g.sets[_]=E,g.n+=k)}}),g},v}();dh.LinkSets=l;function h(v,p,g,w){for(var _=v.length,E=new t(_,p,g,w);E.greedyMerge(););var k=[],I=E.getGroupHierarchy(k);return k.forEach(function(C){var P=function(A){var L=C[A];typeof L=="number"&&(C[A]=v[L])};P("source"),P("target")}),{groups:I,powerEdges:k}}return dh.getGroups=h,dh}var xp={},pX;function o3(){if(pX)return xp;pX=1,Object.defineProperty(xp,"__esModule",{value:!0});function r(v,p){var g={};for(var w in v)g[w]={};for(var w in p)g[w]={};return Object.keys(g).length}function t(v,p){var g=0;for(var w in v)typeof p[w]<"u"&&++g;return g}function i(v,p){var g={},w=function(_,E){typeof g[_]>"u"&&(g[_]={}),g[_][E]={}};return v.forEach(function(_){var E=p.getSourceIndex(_),k=p.getTargetIndex(_);w(E,k),w(k,E)}),g}function a(v,p,g,w){var _=i(v,w);v.forEach(function(E){var k=_[w.getSourceIndex(E)],I=_[w.getTargetIndex(E)];w.setLength(E,1+p*g(k,I))})}function u(v,p,g){g===void 0&&(g=1),a(v,g,function(w,_){return Math.sqrt(r(w,_)-t(w,_))},p)}xp.symmetricDiffLinkLengths=u;function c(v,p,g){g===void 0&&(g=1),a(v,g,function(w,_){return Math.min(Object.keys(w).length,Object.keys(_).length)<1.1?0:t(w,_)/r(w,_)},p)}xp.jaccardLinkLengths=c;function l(v,p,g,w){var _=h(v,p,w),E={};_.forEach(function(I,C){return I.forEach(function(P){return E[P]=C})});var k=[];return p.forEach(function(I){var C=w.getSourceIndex(I),P=w.getTargetIndex(I),A=E[C],L=E[P];A!==L&&k.push({axis:g,left:C,right:P,gap:w.getMinSeparation(I)})}),k}xp.generateDirectedEdgeConstraints=l;function h(v,p,g){var w=[],_=0,E=[],k=[];function I($){$.index=$.lowlink=_++,E.push($),$.onStack=!0;for(var Y=0,V=$.out;Y<V.length;Y++){var U=V[Y];typeof U.index>"u"?(I(U),$.lowlink=Math.min($.lowlink,U.lowlink)):U.onStack&&($.lowlink=Math.min($.lowlink,U.index))}if($.lowlink===$.index){for(var G=[];E.length&&(U=E.pop(),U.onStack=!1,G.push(U),U!==$););k.push(G.map(function(X){return X.id}))}}for(var C=0;C<v;C++)w.push({id:C,out:[]});for(var P=0,A=p;P<A.length;P++){var L=A[P],O=w[g.getSourceIndex(L)],M=w[g.getTargetIndex(L)];O.out.push(M)}for(var B=0,F=w;B<F.length;B++){var q=F[B];typeof q.index>"u"&&I(q)}return k}return xp.stronglyConnectedComponents=h,xp}var Bb={},gX;function u3(){if(gX)return Bb;gX=1,Object.defineProperty(Bb,"__esModule",{value:!0});var r=function(){function a(){this.locks={}}return a.prototype.add=function(u,c){this.locks[u]=c},a.prototype.clear=function(){this.locks={}},a.prototype.isEmpty=function(){for(var u in this.locks)return!1;return!0},a.prototype.apply=function(u){for(var c in this.locks)u(Number(c),this.locks[c])},a}();Bb.Locks=r;var t=function(){function a(u,c,l){l===void 0&&(l=null),this.D=c,this.G=l,this.threshold=1e-4,this.numGridSnapNodes=0,this.snapGridSize=100,this.snapStrength=1e3,this.scaleSnapByMaxH=!1,this.random=new i,this.project=null,this.x=u,this.k=u.length;var h=this.n=u[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 r,this.minD=Number.MAX_VALUE;for(var v=h,p;v--;)for(p=h;--p>v;){var g=c[v][p];g>0&&g<this.minD&&(this.minD=g)}for(this.minD===Number.MAX_VALUE&&(this.minD=1),v=this.k;v--;){for(this.g[v]=new Array(h),this.H[v]=new Array(h),p=h;p--;)this.H[v][p]=new Array(h);this.Hd[v]=new Array(h),this.a[v]=new Array(h),this.b[v]=new Array(h),this.c[v]=new Array(h),this.d[v]=new Array(h),this.e[v]=new Array(h),this.ia[v]=new Array(h),this.ib[v]=new Array(h),this.xtmp[v]=new Array(h)}}return a.createSquareMatrix=function(u,c){for(var l=new Array(u),h=0;h<u;++h){l[h]=new Array(u);for(var v=0;v<u;++v)l[h][v]=c(h,v)}return l},a.prototype.offsetDir=function(){for(var u=this,c=new Array(this.k),l=0,h=0;h<this.k;++h){var v=c[h]=this.random.getNextBetween(.01,1)-.5;l+=v*v}return l=Math.sqrt(l),c.map(function(p){return p*=u.minD/l})},a.prototype.computeDerivatives=function(u){var c=this,l=this.n;if(!(l<1)){for(var h,v=new Array(this.k),p=new Array(this.k),g=new Array(this.k),w=0,_=0;_<l;++_){for(h=0;h<this.k;++h)g[h]=this.g[h][_]=0;for(var E=0;E<l;++E)if(_!==E){for(var k=l;k--;){var I=0;for(h=0;h<this.k;++h){var C=v[h]=u[h][_]-u[h][E];I+=p[h]=C*C}if(I>1e-9)break;var P=this.offsetDir();for(h=0;h<this.k;++h)u[h][E]+=P[h]}var A=Math.sqrt(I),L=this.D[_][E],O=this.G!=null?this.G[_][E]:1;if(O>1&&A>L||!isFinite(L)){for(h=0;h<this.k;++h)this.H[h][_][E]=0;continue}O>1&&(O=1);var M=L*L,B=2*O*(A-L)/(M*A),F=A*A*A,q=2*-O/(M*F);for(isFinite(B)||console.log(B),h=0;h<this.k;++h)this.g[h][_]+=v[h]*B,g[h]-=this.H[h][_][E]=q*(F+L*(p[h]-I)+A*I)}for(h=0;h<this.k;++h)w=Math.max(w,this.H[h][_][_]=g[h])}for(var $=this.snapGridSize/2,Y=this.snapGridSize,V=this.snapStrength,U=V/($*$),G=this.numGridSnapNodes,_=0;_<G;++_)for(h=0;h<this.k;++h){var X=this.x[h][_],ne=X/Y,ae=ne%1,oe=ne-ae,le=Math.abs(ae),C=le<=.5?X-oe*Y:X>0?X-(oe+1)*Y:X-(oe-1)*Y;-$<C&&C<=$&&(this.scaleSnapByMaxH?(this.g[h][_]+=w*U*C,this.H[h][_][_]+=w*U):(this.g[h][_]+=U*C,this.H[h][_][_]+=U))}this.locks.isEmpty()||this.locks.apply(function(pe,ge){for(h=0;h<c.k;++h)c.H[h][pe][pe]+=w,c.g[h][pe]-=w*(ge[h]-u[h][pe])})}},a.dotProd=function(u,c){for(var l=0,h=u.length;h--;)l+=u[h]*c[h];return l},a.rightMultiply=function(u,c,l){for(var h=u.length;h--;)l[h]=a.dotProd(u[h],c)},a.prototype.computeStepSize=function(u){for(var c=0,l=0,h=0;h<this.k;++h)c+=a.dotProd(this.g[h],u[h]),a.rightMultiply(this.H[h],u[h],this.Hd[h]),l+=a.dotProd(u[h],this.Hd[h]);return l===0||!isFinite(l)?0:1*c/l},a.prototype.reduceStress=function(){this.computeDerivatives(this.x);for(var u=this.computeStepSize(this.g),c=0;c<this.k;++c)this.takeDescentStep(this.x[c],this.g[c],u);return this.computeStress()},a.copy=function(u,c){for(var l=u.length,h=c[0].length,v=0;v<l;++v)for(var p=0;p<h;++p)c[v][p]=u[v][p]},a.prototype.stepAndProject=function(u,c,l,h){a.copy(u,c),this.takeDescentStep(c[0],l[0],h),this.project&&this.project[0](u[0],u[1],c[0]),this.takeDescentStep(c[1],l[1],h),this.project&&this.project[1](c[0],u[1],c[1]);for(var v=2;v<this.k;v++)this.takeDescentStep(c[v],l[v],h)},a.mApply=function(u,c,l){for(var h=u;h-- >0;)for(var v=c;v-- >0;)l(h,v)},a.prototype.matrixApply=function(u){a.mApply(this.k,this.n,u)},a.prototype.computeNextPosition=function(u,c){var l=this;this.computeDerivatives(u);var h=this.computeStepSize(this.g);if(this.stepAndProject(u,c,this.g,h),this.project){this.matrixApply(function(p,g){return l.e[p][g]=u[p][g]-c[p][g]});var v=this.computeStepSize(this.e);v=Math.max(.2,Math.min(v,1)),this.stepAndProject(u,c,this.e,v)}},a.prototype.run=function(u){for(var c=Number.MAX_VALUE,l=!1;!l&&u-- >0;){var h=this.rungeKutta();l=Math.abs(c/h-1)<this.threshold,c=h}return c},a.prototype.rungeKutta=function(){var u=this;this.computeNextPosition(this.x,this.a),a.mid(this.x,this.a,this.ia),this.computeNextPosition(this.ia,this.b),a.mid(this.x,this.b,this.ib),this.computeNextPosition(this.ib,this.c),this.computeNextPosition(this.c,this.d);var c=0;return this.matrixApply(function(l,h){var v=(u.a[l][h]+2*u.b[l][h]+2*u.c[l][h]+u.d[l][h])/6,p=u.x[l][h]-v;c+=p*p,u.x[l][h]=v}),c},a.mid=function(u,c,l){a.mApply(u.length,u[0].length,function(h,v){return l[h][v]=u[h][v]+(c[h][v]-u[h][v])/2})},a.prototype.takeDescentStep=function(u,c,l){for(var h=0;h<this.n;++h)u[h]=u[h]-l*c[h]},a.prototype.computeStress=function(){for(var u=0,c=0,l=this.n-1;c<l;++c)for(var h=c+1,v=this.n;h<v;++h){for(var p=0,g=0;g<this.k;++g){var w=this.x[g][c]-this.x[g][h];p+=w*w}p=Math.sqrt(p);var _=this.D[c][h];if(isFinite(_)){var E=_-p,k=_*_;u+=E*E/k}}return u},a.zeroDistance=1e-10,a}();Bb.Descent=t;var i=function(){function a(u){u===void 0&&(u=1),this.seed=u,this.a=214013,this.c=2531011,this.m=2147483648,this.range=32767}return a.prototype.getNext=function(){return this.seed=(this.seed*this.a+this.c)%this.m,(this.seed>>16)/this.range},a.prototype.getNextBetween=function(u,c){return u+this.getNext()*(c-u)},a}();return Bb.PseudoRandom=i,Bb}var ru={},Ql={},bX;function c3(){if(bX)return Ql;bX=1,Object.defineProperty(Ql,"__esModule",{value:!0});var r=function(){function h(v){this.scale=v,this.AB=0,this.AD=0,this.A2=0}return h.prototype.addVariable=function(v){var p=this.scale/v.scale,g=v.offset/v.scale,w=v.weight;this.AB+=w*p*g,this.AD+=w*p*v.desiredPosition,this.A2+=w*p*p},h.prototype.getPosn=function(){return(this.AD-this.AB)/this.A2},h}();Ql.PositionStats=r;var t=function(){function h(v,p,g,w){w===void 0&&(w=!1),this.left=v,this.right=p,this.gap=g,this.equality=w,this.active=!1,this.unsatisfiable=!1,this.left=v,this.right=p,this.gap=g,this.equality=w}return h.prototype.slack=function(){return this.unsatisfiable?Number.MAX_VALUE:this.right.scale*this.right.position()-this.gap-this.left.scale*this.left.position()},h}();Ql.Constraint=t;var i=function(){function h(v,p,g){p===void 0&&(p=1),g===void 0&&(g=1),this.desiredPosition=v,this.weight=p,this.scale=g,this.offset=0}return h.prototype.dfdv=function(){return 2*this.weight*(this.position()-this.desiredPosition)},h.prototype.position=function(){return(this.block.ps.scale*this.block.posn+this.offset)/this.scale},h.prototype.visitNeighbours=function(v,p){var g=function(w,_){return w.active&&v!==_&&p(w,_)};this.cOut.forEach(function(w){return g(w,w.right)}),this.cIn.forEach(function(w){return g(w,w.left)})},h}();Ql.Variable=i;var a=function(){function h(v){this.vars=[],v.offset=0,this.ps=new r(v.scale),this.addVariable(v)}return h.prototype.addVariable=function(v){v.block=this,this.vars.push(v),this.ps.addVariable(v),this.posn=this.ps.getPosn()},h.prototype.updateWeightedPosition=function(){this.ps.AB=this.ps.AD=this.ps.A2=0;for(var v=0,p=this.vars.length;v<p;++v)this.ps.addVariable(this.vars[v]);this.posn=this.ps.getPosn()},h.prototype.compute_lm=function(v,p,g){var w=this,_=v.dfdv();return v.visitNeighbours(p,function(E,k){var I=w.compute_lm(k,v,g);k===E.right?(_+=I*E.left.scale,E.lm=I):(_+=I*E.right.scale,E.lm=-I),g(E)}),_/v.scale},h.prototype.populateSplitBlock=function(v,p){var g=this;v.visitNeighbours(p,function(w,_){_.offset=v.offset+(_===w.right?w.gap:-w.gap),g.addVariable(_),g.populateSplitBlock(_,v)})},h.prototype.traverse=function(v,p,g,w){var _=this;g===void 0&&(g=this.vars[0]),w===void 0&&(w=null),g.visitNeighbours(w,function(E,k){p.push(v(E)),_.traverse(v,p,k,g)})},h.prototype.findMinLM=function(){var v=null;return this.compute_lm(this.vars[0],null,function(p){!p.equality&&(v===null||p.lm<v.lm)&&(v=p)}),v},h.prototype.findMinLMBetween=function(v,p){this.compute_lm(v,null,function(){});var g=null;return this.findPath(v,null,p,function(w,_){!w.equality&&w.right===_&&(g===null||w.lm<g.lm)&&(g=w)}),g},h.prototype.findPath=function(v,p,g,w){var _=this,E=!1;return v.visitNeighbours(p,function(k,I){!E&&(I===g||_.findPath(I,v,g,w))&&(E=!0,w(k,I))}),E},h.prototype.isActiveDirectedPathBetween=function(v,p){if(v===p)return!0;for(var g=v.cOut.length;g--;){var w=v.cOut[g];if(w.active&&this.isActiveDirectedPathBetween(w.right,p))return!0}return!1},h.split=function(v){return v.active=!1,[h.createSplitBlock(v.left),h.createSplitBlock(v.right)]},h.createSplitBlock=function(v){var p=new h(v);return p.populateSplitBlock(v,null),p},h.prototype.splitBetween=function(v,p){var g=this.findMinLMBetween(v,p);if(g!==null){var w=h.split(g);return{constraint:g,lb:w[0],rb:w[1]}}return null},h.prototype.mergeAcross=function(v,p,g){p.active=!0;for(var w=0,_=v.vars.length;w<_;++w){var E=v.vars[w];E.offset+=g,this.addVariable(E)}this.posn=this.ps.getPosn()},h.prototype.cost=function(){for(var v=0,p=this.vars.length;p--;){var g=this.vars[p],w=g.position()-g.desiredPosition;v+=w*w*g.weight}return v},h}();Ql.Block=a;var u=function(){function h(v){this.vs=v;var p=v.length;for(this.list=new Array(p);p--;){var g=new a(v[p]);this.list[p]=g,g.blockInd=p}}return h.prototype.cost=function(){for(var v=0,p=this.list.length;p--;)v+=this.list[p].cost();return v},h.prototype.insert=function(v){v.blockInd=this.list.length,this.list.push(v)},h.prototype.remove=function(v){var p=this.list.length-1,g=this.list[p];this.list.length=p,v!==g&&(this.list[v.blockInd]=g,g.blockInd=v.blockInd)},h.prototype.merge=function(v){var p=v.left.block,g=v.right.block,w=v.right.offset-v.left.offset-v.gap;p.vars.length<g.vars.length?(g.mergeAcross(p,v,w),this.remove(p)):(p.mergeAcross(g,v,-w),this.remove(g))},h.prototype.forEach=function(v){this.list.forEach(v)},h.prototype.updateBlockPositions=function(){this.list.forEach(function(v){return v.updateWeightedPosition()})},h.prototype.split=function(v){var p=this;this.updateBlockPositions(),this.list.forEach(function(g){var w=g.findMinLM();w!==null&&w.lm<c.LAGRANGIAN_TOLERANCE&&(g=w.left.block,a.split(w).forEach(function(_){return p.insert(_)}),p.remove(g),v.push(w))})},h}();Ql.Blocks=u;var c=function(){function h(v,p){this.vs=v,this.cs=p,this.vs=v,v.forEach(function(g){g.cIn=[],g.cOut=[]}),this.cs=p,p.forEach(function(g){g.left.cOut.push(g),g.right.cIn.push(g)}),this.inactive=p.map(function(g){return g.active=!1,g}),this.bs=null}return h.prototype.cost=function(){return this.bs.cost()},h.prototype.setStartingPositions=function(v){this.inactive=this.cs.map(function(p){return p.active=!1,p}),this.bs=new u(this.vs),this.bs.forEach(function(p,g){return p.posn=v[g]})},h.prototype.setDesiredPositions=function(v){this.vs.forEach(function(p,g){return p.desiredPosition=v[g]})},h.prototype.mostViolated=function(){for(var v=Number.MAX_VALUE,p=null,g=this.inactive,w=g.length,_=w,E=0;E<w;++E){var k=g[E];if(!k.unsatisfiable){var I=k.slack();if((k.equality||I<v)&&(v=I,p=k,_=E,k.equality))break}}return _!==w&&(v<h.ZERO_UPPERBOUND&&!p.active||p.equality)&&(g[_]=g[w-1],g.length=w-1),p},h.prototype.satisfy=function(){this.bs==null&&(this.bs=new u(this.vs)),this.bs.split(this.inactive);for(var v=null;(v=this.mostViolated())&&(v.equality||v.slack()<h.ZERO_UPPERBOUND&&!v.active);){var p=v.left.block,g=v.right.block;if(p!==g)this.bs.merge(v);else{if(p.isActiveDirectedPathBetween(v.right,v.left)){v.unsatisfiable=!0;continue}var w=p.splitBetween(v.left,v.right);if(w!==null)this.bs.insert(w.lb),this.bs.insert(w.rb),this.bs.remove(p),this.inactive.push(w.constraint);else{v.unsatisfiable=!0;continue}v.slack()>=0?this.inactive.push(v):this.bs.merge(v)}}},h.prototype.solve=function(){this.satisfy();for(var v=Number.MAX_VALUE,p=this.bs.cost();Math.abs(v-p)>1e-4;)this.satisfy(),v=p,p=this.bs.cost();return p},h.LAGRANGIAN_TOLERANCE=-1e-4,h.ZERO_UPPERBOUND=-1e-10,h}();Ql.Solver=c;function l(h,v,p){for(var g=h.map(function(F){return new i(F.desiredCenter)}),w=[],_=h.length,E=0;E<_-1;E++){var k=h[E],I=h[E+1];w.push(new t(g[E],g[E+1],(k.size+I.size)/2))}var C=g[0],P=g[_-1],A=h[0].size/2,L=h[_-1].size/2,O=null,M=null;v&&(O=new i(v,C.weight*1e3),g.push(O),w.push(new t(O,C,A))),p&&(M=new i(p,P.weight*1e3),g.push(M),w.push(new t(P,M,L)));var B=new c(g,w);return B.solve(),{newCenters:g.slice(0,h.length).map(function(F){return F.position()}),lowerBound:O?O.position():C.position()-A,upperBound:M?M.position():P.position()+L}}return Ql.removeOverlapInOneDimension=l,Ql}var qb={},yX;function mX(){if(yX)return qb;yX=1;var r=Lr&&Lr.__extends||function(){var c=function(l,h){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,p){v.__proto__=p}||function(v,p){for(var g in p)p.hasOwnProperty(g)&&(v[g]=p[g])},c(l,h)};return function(l,h){c(l,h);function v(){this.constructor=l}l.prototype=h===null?Object.create(h):(v.prototype=h.prototype,new v)}}();Object.defineProperty(qb,"__esModule",{value:!0});var t=function(){function c(){this.findIter=function(l){for(var h=this._root,v=this.iterator();h!==null;){var p=this._comparator(l,h.data);if(p===0)return v._cursor=h,v;v._ancestors.push(h),h=h.get_child(p>0)}return null}}return c.prototype.clear=function(){this._root=null,this.size=0},c.prototype.find=function(l){for(var h=this._root;h!==null;){var v=this._comparator(l,h.data);if(v===0)return h.data;h=h.get_child(v>0)}return null},c.prototype.lowerBound=function(l){return this._bound(l,this._comparator)},c.prototype.upperBound=function(l){var h=this._comparator;function v(p,g){return h(g,p)}return this._bound(l,v)},c.prototype.min=function(){var l=this._root;if(l===null)return null;for(;l.left!==null;)l=l.left;return l.data},c.prototype.max=function(){var l=this._root;if(l===null)return null;for(;l.right!==null;)l=l.right;return l.data},c.prototype.iterator=function(){return new i(this)},c.prototype.each=function(l){for(var h=this.iterator(),v;(v=h.next())!==null;)l(v)},c.prototype.reach=function(l){for(var h=this.iterator(),v;(v=h.prev())!==null;)l(v)},c.prototype._bound=function(l,h){for(var v=this._root,p=this.iterator();v!==null;){var g=this._comparator(l,v.data);if(g===0)return p._cursor=v,p;p._ancestors.push(v),v=v.get_child(g>0)}for(var w=p._ancestors.length-1;w>=0;--w)if(v=p._ancestors[w],h(l,v.data)>0)return p._cursor=v,p._ancestors.length=w,p;return p._ancestors.length=0,p},c}();qb.TreeBase=t;var i=function(){function c(l){this._tree=l,this._ancestors=[],this._cursor=null}return c.prototype.data=function(){return this._cursor!==null?this._cursor.data:null},c.prototype.next=function(){if(this._cursor===null){var l=this._tree._root;l!==null&&this._minNode(l)}else if(this._cursor.right===null){var h;do if(h=this._cursor,this._ancestors.length)this._cursor=this._ancestors.pop();else{this._cursor=null;break}while(this._cursor.right===h)}else this._ancestors.push(this._cursor),this._minNode(this._cursor.right);return this._cursor!==null?this._cursor.data:null},c.prototype.prev=function(){if(this._cursor===null){var l=this._tree._root;l!==null&&this._maxNode(l)}else if(this._cursor.left===null){var h;do if(h=this._cursor,this._ancestors.length)this._cursor=this._ancestors.pop();else{this._cursor=null;break}while(this._cursor.left===h)}else this._ancestors.push(this._cursor),this._maxNode(this._cursor.left);return this._cursor!==null?this._cursor.data:null},c.prototype._minNode=function(l){for(;l.left!==null;)this._ancestors.push(l),l=l.left;this._cursor=l},c.prototype._maxNode=function(l){for(;l.right!==null;)this._ancestors.push(l),l=l.right;this._cursor=l},c}();qb.Iterator=i;var a=function(){function c(l){this.data=l,this.left=null,this.right=null,this.red=!0}return c.prototype.get_child=function(l){return l?this.right:this.left},c.prototype.set_child=function(l,h){l?this.right=h:this.left=h},c}(),u=function(c){r(l,c);function l(h){var v=c.call(this)||this;return v._root=null,v._comparator=h,v.size=0,v}return l.prototype.insert=function(h){var v=!1;if(this._root===null)this._root=new a(h),v=!0,this.size++;else{var p=new a(void 0),g=!1,w=!1,_=null,E=p,k=null,I=this._root;for(E.right=this._root;;){if(I===null?(I=new a(h),k.set_child(g,I),v=!0,this.size++):l.is_red(I.left)&&l.is_red(I.right)&&(I.red=!0,I.left.red=!1,I.right.red=!1),l.is_red(I)&&l.is_red(k)){var C=E.right===_;I===k.get_child(w)?E.set_child(C,l.single_rotate(_,!w)):E.set_child(C,l.double_rotate(_,!w))}var P=this._comparator(I.data,h);if(P===0)break;w=g,g=P<0,_!==null&&(E=_),_=k,k=I,I=I.get_child(g)}this._root=p.right}return this._root.red=!1,v},l.prototype.remove=function(h){if(this._root===null)return!1;var v=new a(void 0),p=v;p.right=this._root;for(var g=null,w=null,_=null,E=!0;p.get_child(E)!==null;){var k=E;w=g,g=p,p=p.get_child(E);var I=this._comparator(h,p.data);if(E=I>0,I===0&&(_=p),!l.is_red(p)&&!l.is_red(p.get_child(E))){if(l.is_red(p.get_child(!E))){var C=l.single_rotate(p,E);g.set_child(k,C),g=C}else if(!l.is_red(p.get_child(!E))){var P=g.get_child(!k);if(P!==null)if(!l.is_red(P.get_child(!k))&&!l.is_red(P.get_child(k)))g.red=!1,P.red=!0,p.red=!0;else{var A=w.right===g;l.is_red(P.get_child(k))?w.set_child(A,l.double_rotate(g,k)):l.is_red(P.get_child(!k))&&w.set_child(A,l.single_rotate(g,k));var L=w.get_child(A);L.red=!0,p.red=!0,L.left.red=!1,L.right.red=!1}}}}return _!==null&&(_.data=p.data,g.set_child(g.right===p,p.get_child(p.left===null)),this.size--),this._root=v.right,this._root!==null&&(this._root.red=!1),_!==null},l.is_red=function(h){return h!==null&&h.red},l.single_rotate=function(h,v){var p=h.get_child(!v);return h.set_child(!v,p.get_child(v)),p.set_child(v,h),h.red=!0,p.red=!1,p},l.double_rotate=function(h,v){return h.set_child(!v,l.single_rotate(h.get_child(!v),!v)),l.single_rotate(h,v)},l}(t);return qb.RBTree=u,qb}var wX;function J1(){if(wX)return ru;wX=1;var r=Lr&&Lr.__extends||function(){var q=function($,Y){return q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(V,U){V.__proto__=U}||function(V,U){for(var G in U)U.hasOwnProperty(G)&&(V[G]=U[G])},q($,Y)};return function($,Y){q($,Y);function V(){this.constructor=$}$.prototype=Y===null?Object.create(Y):(V.prototype=Y.prototype,new V)}}();Object.defineProperty(ru,"__esModule",{value:!0});var t=c3(),i=mX();function a(q){return q.bounds=typeof q.leaves<"u"?q.leaves.reduce(function($,Y){return Y.bounds.union($)},u.empty()):u.empty(),typeof q.groups<"u"&&(q.bounds=q.groups.reduce(function($,Y){return a(Y).union($)},q.bounds)),q.bounds=q.bounds.inflate(q.padding),q.bounds}ru.computeGroupBounds=a;var u=function(){function q($,Y,V,U){this.x=$,this.X=Y,this.y=V,this.Y=U}return q.empty=function(){return new q(Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY)},q.prototype.cx=function(){return(this.x+this.X)/2},q.prototype.cy=function(){return(this.y+this.Y)/2},q.prototype.overlapX=function($){var Y=this.cx(),V=$.cx();return Y<=V&&$.x<this.X?this.X-$.x:V<=Y&&this.x<$.X?$.X-this.x:0},q.prototype.overlapY=function($){var Y=this.cy(),V=$.cy();return Y<=V&&$.y<this.Y?this.Y-$.y:V<=Y&&this.y<$.Y?$.Y-this.y:0},q.prototype.setXCentre=function($){var Y=$-this.cx();this.x+=Y,this.X+=Y},q.prototype.setYCentre=function($){var Y=$-this.cy();this.y+=Y,this.Y+=Y},q.prototype.width=function(){return this.X-this.x},q.prototype.height=function(){return this.Y-this.y},q.prototype.union=function($){return new q(Math.min(this.x,$.x),Math.max(this.X,$.X),Math.min(this.y,$.y),Math.max(this.Y,$.Y))},q.prototype.lineIntersections=function($,Y,V,U){for(var G=[[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]],X=[],ne=0;ne<4;++ne){var ae=q.lineIntersection($,Y,V,U,G[ne][0],G[ne][1],G[ne][2],G[ne][3]);ae!==null&&X.push({x:ae.x,y:ae.y})}return X},q.prototype.rayIntersection=function($,Y){var V=this.lineIntersections(this.cx(),this.cy(),$,Y);return V.length>0?V[0]:null},q.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}]},q.lineIntersection=function($,Y,V,U,G,X,ne,ae){var oe=V-$,le=ne-G,pe=U-Y,ge=ae-X,de=ge*oe-le*pe;if(de==0)return null;var Se=$-G,Ne=Y-X,ye=le*Ne-ge*Se,we=ye/de,Pe=oe*Ne-pe*Se,Fe=Pe/de;return we>=0&&we<=1&&Fe>=0&&Fe<=1?{x:$+we*oe,y:Y+we*pe}:null},q.prototype.inflate=function($){return new q(this.x-$,this.X+$,this.y-$,this.Y+$)},q}();ru.Rectangle=u;function c(q,$,Y){var V=q.rayIntersection($.cx(),$.cy())||{x:q.cx(),y:q.cy()},U=$.rayIntersection(q.cx(),q.cy())||{x:$.cx(),y:$.cy()},G=U.x-V.x,X=U.y-V.y,ne=Math.sqrt(G*G+X*X),ae=ne-Y;return{sourceIntersection:V,targetIntersection:U,arrowStart:{x:V.x+ae*G/ne,y:V.y+ae*X/ne}}}ru.makeEdgeBetween=c;function l(q,$,Y){var V=$.rayIntersection(q.x,q.y);V||(V={x:$.cx(),y:$.cy()});var U=V.x-q.x,G=V.y-q.y,X=Math.sqrt(U*U+G*G);return{x:V.x-Y*U/X,y:V.y-Y*G/X}}ru.makeEdgeTo=l;var h=function(){function q($,Y,V){this.v=$,this.r=Y,this.pos=V,this.prev=g(),this.next=g()}return q}(),v=function(){function q($,Y,V){this.isOpen=$,this.v=Y,this.pos=V}return q}();function p(q,$){return q.pos>$.pos?1:q.pos<$.pos||q.isOpen?-1:$.isOpen?1:0}function g(){return new i.RBTree(function(q,$){return q.pos-$.pos})}var w={getCentre:function(q){return q.cx()},getOpen:function(q){return q.y},getClose:function(q){return q.Y},getSize:function(q){return q.width()},makeRect:function(q,$,Y,V){return new u(Y-V/2,Y+V/2,q,$)},findNeighbours:I},_={getCentre:function(q){return q.cy()},getOpen:function(q){return q.x},getClose:function(q){return q.X},getSize:function(q){return q.height()},makeRect:function(q,$,Y,V){return new u(q,$,Y-V/2,Y+V/2)},findNeighbours:C};function E(q,$,Y,V){V===void 0&&(V=!1);var U=q.padding,G=typeof q.groups<"u"?q.groups.length:0,X=typeof q.leaves<"u"?q.leaves.length:0,ne=G?q.groups.reduce(function(He,De){return He.concat(E(De,$,Y,!0))},[]):[],ae=(V?2:0)+X+G,oe=new Array(ae),le=new Array(ae),pe=0,ge=function(He,De){le[pe]=He,oe[pe++]=De};if(V){var de=q.bounds,Se=$.getCentre(de),Ne=$.getSize(de)/2,ye=$.getOpen(de),we=$.getClose(de),Pe=Se-Ne+U/2,Fe=Se+Ne-U/2;q.minVar.desiredPosition=Pe,ge($.makeRect(ye,we,Pe,U),q.minVar),q.maxVar.desiredPosition=Fe,ge($.makeRect(ye,we,Fe,U),q.maxVar)}X&&q.leaves.forEach(function(He){return ge(He.bounds,He.variable)}),G&&q.groups.forEach(function(He){var De=He.bounds;ge($.makeRect($.getOpen(De),$.getClose(De),$.getCentre(De),$.getSize(De)),He.minVar)});var Ue=k(le,oe,$,Y);return G&&(oe.forEach(function(He){He.cOut=[],He.cIn=[]}),Ue.forEach(function(He){He.left.cOut.push(He),He.right.cIn.push(He)}),q.groups.forEach(function(He){var De=(He.padding-$.getSize(He.bounds))/2;He.minVar.cIn.forEach(function(Ce){return Ce.gap+=De}),He.minVar.cOut.forEach(function(Ce){Ce.left=He.maxVar,Ce.gap+=De})})),ne.concat(Ue)}function k(q,$,Y,V){var U,G=q.length,X=2*G;console.assert($.length>=G);var ne=new Array(X);for(U=0;U<G;++U){var ae=q[U],oe=new h($[U],ae,Y.getCentre(ae));ne[U]=new v(!0,oe,Y.getOpen(ae)),ne[U+G]=new v(!1,oe,Y.getClose(ae))}ne.sort(p);var le=new Array,pe=g();for(U=0;U<X;++U){var ge=ne[U],oe=ge.v;if(ge.isOpen)pe.insert(oe),Y.findNeighbours(oe,pe);else{pe.remove(oe);var de=function(ye,we){var Pe=(Y.getSize(ye.r)+Y.getSize(we.r))/2+V;le.push(new t.Constraint(ye.v,we.v,Pe))},Se=function(ye,we,Pe){for(var Fe,Ue=oe[ye].iterator();(Fe=Ue[ye]())!==null;)Pe(Fe,oe),Fe[we].remove(oe)};Se("prev","next",function(ye,we){return de(ye,we)}),Se("next","prev",function(ye,we){return de(we,ye)})}}return console.assert(pe.size===0),le}function I(q,$){var Y=function(V,U){for(var G=$.findIter(q),X;(X=G[V]())!==null;){var ne=X.r.overlapX(q.r);if((ne<=0||ne<=X.r.overlapY(q.r))&&(q[V].insert(X),X[U].insert(q)),ne<=0)break}};Y("next","prev"),Y("prev","next")}function C(q,$){var Y=function(V,U){var G=$.findIter(q)[V]();G!==null&&G.r.overlapX(q.r)>0&&(q[V].insert(G),G[U].insert(q))};Y("next","prev"),Y("prev","next")}function P(q,$){return k(q,$,w,1e-6)}ru.generateXConstraints=P;function A(q,$){return k(q,$,_,1e-6)}ru.generateYConstraints=A;function L(q){return E(q,w,1e-6)}ru.generateXGroupConstraints=L;function O(q){return E(q,_,1e-6)}ru.generateYGroupConstraints=O;function M(q){var $=q.map(function(U){return new t.Variable(U.cx())}),Y=P(q,$),V=new t.Solver($,Y);V.solve(),$.forEach(function(U,G){return q[G].setXCentre(U.position())}),$=q.map(function(U){return new t.Variable(U.cy())}),Y=A(q,$),V=new t.Solver($,Y),V.solve(),$.forEach(function(U,G){return q[G].setYCentre(U.position())})}ru.removeOverlaps=M;var B=function(q){r($,q);function $(Y,V){var U=q.call(this,0,V)||this;return U.index=Y,U}return $}(t.Variable);ru.IndexedVariable=B;var F=function(){function q($,Y,V,U,G){var X=this;if(V===void 0&&(V=null),U===void 0&&(U=null),G===void 0&&(G=!1),this.nodes=$,this.groups=Y,this.rootGroup=V,this.avoidOverlaps=G,this.variables=$.map(function(ae,oe){return ae.variable=new B(oe,1)}),U&&this.createConstraints(U),G&&V&&typeof V.groups<"u"){$.forEach(function(ae){if(!ae.width||!ae.height){ae.bounds=new u(ae.x,ae.x,ae.y,ae.y);return}var oe=ae.width/2,le=ae.height/2;ae.bounds=new u(ae.x-oe,ae.x+oe,ae.y-le,ae.y+le)}),a(V);var ne=$.length;Y.forEach(function(ae){X.variables[ne]=ae.minVar=new B(ne++,typeof ae.stiffness<"u"?ae.stiffness:.01),X.variables[ne]=ae.maxVar=new B(ne++,typeof ae.stiffness<"u"?ae.stiffness:.01)})}}return q.prototype.createSeparation=function($){return new t.Constraint(this.nodes[$.left].variable,this.nodes[$.right].variable,$.gap,typeof $.equality<"u"?$.equality:!1)},q.prototype.makeFeasible=function($){var Y=this;if(this.avoidOverlaps){var V="x",U="width";$.axis==="x"&&(V="y",U="height");var G=$.offsets.map(function(ne){return Y.nodes[ne.node]}).sort(function(ne,ae){return ne[V]-ae[V]}),X=null;G.forEach(function(ne){if(X){var ae=X[V]+X[U];ae>ne[V]&&(ne[V]=ae)}X=ne})}},q.prototype.createAlignment=function($){var Y=this,V=this.nodes[$.offsets[0].node].variable;this.makeFeasible($);var U=$.axis==="x"?this.xConstraints:this.yConstraints;$.offsets.slice(1).forEach(function(G){var X=Y.nodes[G.node].variable;U.push(new t.Constraint(V,X,G.offset,!0))})},q.prototype.createConstraints=function($){var Y=this,V=function(U){return typeof U.type>"u"||U.type==="separation"};this.xConstraints=$.filter(function(U){return U.axis==="x"&&V(U)}).map(function(U){return Y.createSeparation(U)}),this.yConstraints=$.filter(function(U){return U.axis==="y"&&V(U)}).map(function(U){return Y.createSeparation(U)}),$.filter(function(U){return U.type==="alignment"}).forEach(function(U){return Y.createAlignment(U)})},q.prototype.setupVariablesAndBounds=function($,Y,V,U){this.nodes.forEach(function(G,X){G.fixed?(G.variable.weight=G.fixedWeight?G.fixedWeight:1e3,V[X]=U(G)):G.variable.weight=1;var ne=(G.width||0)/2,ae=(G.height||0)/2,oe=$[X],le=Y[X];G.bounds=new u(oe-ne,oe+ne,le-ae,le+ae)})},q.prototype.xProject=function($,Y,V){!this.rootGroup&&!(this.avoidOverlaps||this.xConstraints)||this.project($,Y,$,V,function(U){return U.px},this.xConstraints,L,function(U){return U.bounds.setXCentre(V[U.variable.index]=U.variable.position())},function(U){var G=V[U.minVar.index]=U.minVar.position(),X=V[U.maxVar.index]=U.maxVar.position(),ne=U.padding/2;U.bounds.x=G-ne,U.bounds.X=X+ne})},q.prototype.yProject=function($,Y,V){!this.rootGroup&&!this.yConstraints||this.project($,Y,Y,V,function(U){return U.py},this.yConstraints,O,function(U){return U.bounds.setYCentre(V[U.variable.index]=U.variable.position())},function(U){var G=V[U.minVar.index]=U.minVar.position(),X=V[U.maxVar.index]=U.maxVar.position(),ne=U.padding/2;U.bounds.y=G-ne,U.bounds.Y=X+ne})},q.prototype.projectFunctions=function(){var $=this;return[function(Y,V,U){return $.xProject(Y,V,U)},function(Y,V,U){return $.yProject(Y,V,U)}]},q.prototype.project=function($,Y,V,U,G,X,ne,ae,oe){this.setupVariablesAndBounds($,Y,U,G),this.rootGroup&&this.avoidOverlaps&&(a(this.rootGroup),X=X.concat(ne(this.rootGroup))),this.solve(this.variables,X,V,U),this.nodes.forEach(ae),this.rootGroup&&this.avoidOverlaps&&(this.groups.forEach(oe),a(this.rootGroup))},q.prototype.solve=function($,Y,V,U){var G=new t.Solver($,Y);G.setStartingPositions(V),G.setDesiredPositions(U),G.solve()},q}();return ru.Projection=F,ru}var U2={},Q1={},_X;function xX(){if(_X)return Q1;_X=1,Object.defineProperty(Q1,"__esModule",{value:!0});var r=function(){function i(a){this.elem=a,this.subheaps=[]}return i.prototype.toString=function(a){for(var u="",c=!1,l=0;l<this.subheaps.length;++l){var h=this.subheaps[l];if(!h.elem){c=!1;continue}c&&(u=u+","),u=u+h.toString(a),c=!0}return u!==""&&(u="("+u+")"),(this.elem?a(this.elem):"")+u},i.prototype.forEach=function(a){this.empty()||(a(this.elem,this),this.subheaps.forEach(function(u){return u.forEach(a)}))},i.prototype.count=function(){return this.empty()?0:1+this.subheaps.reduce(function(a,u){return a+u.count()},0)},i.prototype.min=function(){return this.elem},i.prototype.empty=function(){return this.elem==null},i.prototype.contains=function(a){if(this===a)return!0;for(var u=0;u<this.subheaps.length;u++)if(this.subheaps[u].contains(a))return!0;return!1},i.prototype.isHeap=function(a){var u=this;return this.subheaps.every(function(c){return a(u.elem,c.elem)&&c.isHeap(a)})},i.prototype.insert=function(a,u){return this.merge(new i(a),u)},i.prototype.merge=function(a,u){return this.empty()?a:a.empty()?this:u(this.elem,a.elem)?(this.subheaps.push(a),this):(a.subheaps.push(this),a)},i.prototype.removeMin=function(a){return this.empty()?null:this.mergePairs(a)},i.prototype.mergePairs=function(a){if(this.subheaps.length==0)return new i(null);if(this.subheaps.length==1)return this.subheaps[0];var u=this.subheaps.pop().merge(this.subheaps.pop(),a),c=this.mergePairs(a);return u.merge(c,a)},i.prototype.decreaseKey=function(a,u,c,l){var h=a.removeMin(l);a.elem=h.elem,a.subheaps=h.subheaps,c!==null&&h.elem!==null&&c(a.elem,a);var v=new i(u);return c!==null&&c(u,v),this.merge(v,l)},i}();Q1.PairingHeap=r;var t=function(){function i(a){this.lessThan=a}return i.prototype.top=function(){return this.empty()?null:this.root.elem},i.prototype.push=function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];for(var c,l=0,h;h=a[l];++l)c=new r(h),this.root=this.empty()?c:this.root.merge(c,this.lessThan);return c},i.prototype.empty=function(){return!this.root||!this.root.elem},i.prototype.isHeap=function(){return this.root.isHeap(this.lessThan)},i.prototype.forEach=function(a){this.root.forEach(a)},i.prototype.pop=function(){if(this.empty())return null;var a=this.root.min();return this.root=this.root.removeMin(this.lessThan),a},i.prototype.reduceKey=function(a,u,c){c===void 0&&(c=null),this.root=this.root.decreaseKey(a,u,c,this.lessThan)},i.prototype.toString=function(a){return this.root.toString(a)},i.prototype.count=function(){return this.root.count()},i}();return Q1.PriorityQueue=t,Q1}var EX;function Y2(){if(EX)return U2;EX=1,Object.defineProperty(U2,"__esModule",{value:!0});var r=xX(),t=function(){function c(l,h){this.id=l,this.distance=h}return c}(),i=function(){function c(l){this.id=l,this.neighbours=[]}return c}(),a=function(){function c(l,h,v){this.node=l,this.prev=h,this.d=v}return c}(),u=function(){function c(l,h,v,p,g){this.n=l,this.es=h,this.neighbours=new Array(this.n);for(var w=this.n;w--;)this.neighbours[w]=new i(w);for(w=this.es.length;w--;){var _=this.es[w],E=v(_),k=p(_),I=g(_);this.neighbours[E].neighbours.push(new t(k,I)),this.neighbours[k].neighbours.push(new t(E,I))}}return c.prototype.DistanceMatrix=function(){for(var l=new Array(this.n),h=0;h<this.n;++h)l[h]=this.dijkstraNeighbours(h);return l},c.prototype.DistancesFromNode=function(l){return this.dijkstraNeighbours(l)},c.prototype.PathFromNodeToNode=function(l,h){return this.dijkstraNeighbours(l,h)},c.prototype.PathFromNodeToNodeWithPrevCost=function(l,h,v){var p=new r.PriorityQueue(function(O,M){return O.d<=M.d}),g=this.neighbours[l],w=new a(g,null,0),_={};for(p.push(w);!p.empty()&&(w=p.pop(),g=w.node,g.id!==h);)for(var E=g.neighbours.length;E--;){var k=g.neighbours[E],I=this.neighbours[k.id];if(!(w.prev&&I.id===w.prev.node.id)){var C=I.id+","+g.id;if(!(C in _&&_[C]<=w.d)){var P=w.prev?v(w.prev.node.id,g.id,I.id):0,A=w.d+k.distance+P;_[C]=A,p.push(new a(I,w,A))}}}for(var L=[];w.prev;)w=w.prev,L.push(w.node.id);return L},c.prototype.dijkstraNeighbours=function(l,h){h===void 0&&(h=-1);for(var v=new r.PriorityQueue(function(P,A){return P.d<=A.d}),p=this.neighbours.length,g=new Array(p);p--;){var w=this.neighbours[p];w.d=p===l?0:Number.POSITIVE_INFINITY,w.q=v.push(w)}for(;!v.empty();){var _=v.pop();if(g[_.id]=_.d,_.id===h){for(var E=[],k=_;typeof k.prev<"u";)E.push(k.prev.id),k=k.prev;return E}for(p=_.neighbours.length;p--;){var I=_.neighbours[p],k=this.neighbours[I.id],C=_.d+I.distance;_.d!==Number.MAX_VALUE&&k.d>C&&(k.d=C,k.prev=_,v.reduceKey(k.q,k,function(A,L){return A.q=L}))}}return g},c}();return U2.Calculator=u,U2}var pa={},kX;function SX(){if(kX)return pa;kX=1;var r=Lr&&Lr.__extends||function(){var G=function(X,ne){return G=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ae,oe){ae.__proto__=oe}||function(ae,oe){for(var le in oe)oe.hasOwnProperty(le)&&(ae[le]=oe[le])},G(X,ne)};return function(X,ne){G(X,ne);function ae(){this.constructor=X}X.prototype=ne===null?Object.create(ne):(ae.prototype=ne.prototype,new ae)}}();Object.defineProperty(pa,"__esModule",{value:!0});var t=J1(),i=function(){function G(){}return G}();pa.Point=i;var a=function(){function G(X,ne,ae,oe){this.x1=X,this.y1=ne,this.x2=ae,this.y2=oe}return G}();pa.LineSegment=a;var u=function(G){r(X,G);function X(){return G!==null&&G.apply(this,arguments)||this}return X}(i);pa.PolyPoint=u;function c(G,X,ne){return(X.x-G.x)*(ne.y-G.y)-(ne.x-G.x)*(X.y-G.y)}pa.isLeft=c;function l(G,X,ne){return c(G,X,ne)>0}function h(G,X,ne){return c(G,X,ne)<0}function v(G){var X=G.slice(0).sort(function(we,Pe){return we.x!==Pe.x?Pe.x-we.x:Pe.y-we.y}),ne=G.length,ae,oe=0,le=X[0].x;for(ae=1;ae<ne&&X[ae].x===le;++ae);var pe=ae-1,ge=[];if(ge.push(X[oe]),pe===ne-1)X[pe].y!==X[oe].y&&ge.push(X[pe]);else{var de,Se=ne-1,Ne=X[ne-1].x;for(ae=ne-2;ae>=0&&X[ae].x===Ne;ae--);for(de=ae+1,ae=pe;++ae<=de;)if(!(c(X[oe],X[de],X[ae])>=0&&ae<de)){for(;ge.length>1&&!(c(ge[ge.length-2],ge[ge.length-1],X[ae])>0);)ge.length-=1;ae!=oe&&ge.push(X[ae])}Se!=de&&ge.push(X[Se]);var ye=ge.length;for(ae=de;--ae>=pe;)if(!(c(X[Se],X[pe],X[ae])>=0&&ae>pe)){for(;ge.length>ye&&!(c(ge[ge.length-2],ge[ge.length-1],X[ae])>0);)ge.length-=1;ae!=oe&&ge.push(X[ae])}}return ge}pa.ConvexHull=v;function p(G,X,ne){X.slice(0).sort(function(ae,oe){return Math.atan2(ae.y-G.y,ae.x-G.x)-Math.atan2(oe.y-G.y,oe.x-G.x)}).forEach(ne)}pa.clockwiseRadialSweep=p;function g(G,X){var ne=X.slice(0);return ne.push(X[0]),{rtan:w(G,ne),ltan:_(G,ne)}}function w(G,X){var ne=X.length-1,ae,oe,le,pe,ge;if(h(G,X[1],X[0])&&!l(G,X[ne-1],X[0]))return 0;for(ae=0,oe=ne;;){if(oe-ae===1)return l(G,X[ae],X[oe])?ae:oe;if(le=Math.floor((ae+oe)/2),ge=h(G,X[le+1],X[le]),ge&&!l(G,X[le-1],X[le]))return le;pe=l(G,X[ae+1],X[ae]),pe?ge||l(G,X[ae],X[le])?oe=le:ae=le:ge&&h(G,X[ae],X[le])?oe=le:ae=le}}function _(G,X){var ne=X.length-1,ae,oe,le,pe,ge;if(l(G,X[ne-1],X[0])&&!h(G,X[1],X[0]))return 0;for(ae=0,oe=ne;;){if(oe-ae===1)return h(G,X[ae],X[oe])?ae:oe;if(le=Math.floor((ae+oe)/2),ge=h(G,X[le+1],X[le]),l(G,X[le-1],X[le])&&!ge)return le;pe=h(G,X[ae+1],X[ae]),pe?ge?h(G,X[ae],X[le])?oe=le:ae=le:oe=le:ge?ae=le:l(G,X[ae],X[le])?oe=le:ae=le}}function E(G,X,ne,ae,oe,le){var pe,ge;pe=ne(X[0],G),ge=ae(G[pe],X);for(var de=!1;!de;){for(de=!0;pe===G.length-1&&(pe=0),!oe(X[ge],G[pe],G[pe+1]);)++pe;for(;ge===0&&(ge=X.length-1),!le(G[pe],X[ge],X[ge-1]);)--ge,de=!1}return{t1:pe,t2:ge}}pa.tangent_PolyPolyC=E;function k(G,X){var ne=I(X,G);return{t1:ne.t2,t2:ne.t1}}pa.LRtangent_PolyPolyC=k;function I(G,X){return E(G,X,w,_,l,h)}pa.RLtangent_PolyPolyC=I;function C(G,X){return E(G,X,_,_,h,h)}pa.LLtangent_PolyPolyC=C;function P(G,X){return E(G,X,w,w,l,l)}pa.RRtangent_PolyPolyC=P;var A=function(){function G(X,ne){this.t1=X,this.t2=ne}return G}();pa.BiTangent=A;var L=function(){function G(){}return G}();pa.BiTangents=L;var O=function(G){r(X,G);function X(){return G!==null&&G.apply(this,arguments)||this}return X}(i);pa.TVGPoint=O;var M=function(){function G(X,ne,ae,oe){this.id=X,this.polyid=ne,this.polyvertid=ae,this.p=oe,oe.vv=this}return G}();pa.VisibilityVertex=M;var B=function(){function G(X,ne){this.source=X,this.target=ne}return G.prototype.length=function(){var X=this.source.p.x-this.target.p.x,ne=this.source.p.y-this.target.p.y;return Math.sqrt(X*X+ne*ne)},G}();pa.VisibilityEdge=B;var F=function(){function G(X,ne){if(this.P=X,this.V=[],this.E=[],ne)this.V=ne.V.slice(0),this.E=ne.E.slice(0);else{for(var ae=X.length,oe=0;oe<ae;oe++){for(var le=X[oe],pe=0;pe<le.length;++pe){var ge=le[pe],de=new M(this.V.length,oe,pe,ge);this.V.push(de),pe>0&&this.E.push(new B(le[pe-1].vv,de))}le.length>1&&this.E.push(new B(le[0].vv,le[le.length-1].vv))}for(var oe=0;oe<ae-1;oe++)for(var Se=X[oe],pe=oe+1;pe<ae;pe++){var Ne=X[pe],ye=$(Se,Ne);for(var we in ye){var Pe=ye[we],Fe=Se[Pe.t1],Ue=Ne[Pe.t2];this.addEdgeIfVisible(Fe,Ue,oe,pe)}}}}return G.prototype.addEdgeIfVisible=function(X,ne,ae,oe){this.intersectsPolys(new a(X.x,X.y,ne.x,ne.y),ae,oe)||this.E.push(new B(X.vv,ne.vv))},G.prototype.addPoint=function(X,ne){var ae=this.P.length;this.V.push(new M(this.V.length,ae,0,X));for(var oe=0;oe<ae;++oe)if(oe!==ne){var le=this.P[oe],pe=g(X,le);this.addEdgeIfVisible(X,le[pe.ltan],ne,oe),this.addEdgeIfVisible(X,le[pe.rtan],ne,oe)}return X.vv},G.prototype.intersectsPolys=function(X,ne,ae){for(var oe=0,le=this.P.length;oe<le;++oe)if(oe!=ne&&oe!=ae&&q(X,this.P[oe]).length>0)return!0;return!1},G}();pa.TangentVisibilityGraph=F;function q(G,X){for(var ne=[],ae=1,oe=X.length;ae<oe;++ae){var le=t.Rectangle.lineIntersection(G.x1,G.y1,G.x2,G.y2,X[ae-1].x,X[ae-1].y,X[ae].x,X[ae].y);le&&ne.push(le)}return ne}function $(G,X){for(var ne=G.length-1,ae=X.length-1,oe=new L,le=0;le<ne;++le)for(var pe=0;pe<ae;++pe){var ge=G[le==0?ne-1:le-1],de=G[le],Se=G[le+1],Ne=X[pe==0?ae-1:pe-1],ye=X[pe],we=X[pe+1],Pe=c(ge,de,ye),Fe=c(de,Ne,ye),Ue=c(de,ye,we),He=c(Ne,ye,de),De=c(ye,ge,de),Ce=c(ye,de,Se);Pe>=0&&Fe>=0&&Ue<0&&He>=0&&De>=0&&Ce<0?oe.ll=new A(le,pe):Pe<=0&&Fe<=0&&Ue>0&&He<=0&&De<=0&&Ce>0?oe.rr=new A(le,pe):Pe<=0&&Fe>0&&Ue<=0&&He>=0&&De<0&&Ce>=0?oe.rl=new A(le,pe):Pe>=0&&Fe<0&&Ue>=0&&He<=0&&De>0&&Ce<=0&&(oe.lr=new A(le,pe))}return oe}pa.tangents=$;function Y(G,X){for(var ne=1,ae=X.length;ne<ae;++ne)if(h(X[ne-1],X[ne],G))return!1;return!0}function V(G,X){return!G.every(function(ne){return!Y(ne,X)})}function U(G,X){if(V(G,X)||V(X,G))return!0;for(var ne=1,ae=G.length;ne<ae;++ne){var oe=G[ne],le=G[ne-1];if(q(new a(le.x,le.y,oe.x,oe.y),X).length>0)return!0}return!1}return pa.polysOverlap=U,pa}var Z1={},TX;function RX(){if(TX)return Z1;TX=1,Object.defineProperty(Z1,"__esModule",{value:!0});var r={PADDING:10,GOLDEN_SECTION:(1+Math.sqrt(5))/2,FLOAT_EPSILON:1e-4};function t(a,u,c,k,E,v){E===void 0&&(E=1),v===void 0&&(v=!0);var p=0,g=0,w=u,_=c,E=typeof E<"u"?E:1,k=typeof k<"u"?k:0,I=0,C=0,P=0,A=0,L=[];if(a.length==0)return;O(a),B(a),v&&M(a);function O(V){V.forEach(function(G){U(G)});function U(G){var X=Number.MAX_VALUE,ne=Number.MAX_VALUE,ae=0,oe=0;G.array.forEach(function(le){var pe=typeof le.width<"u"?le.width:k,ge=typeof le.height<"u"?le.height:k;pe/=2,ge/=2,ae=Math.max(le.x+pe,ae),X=Math.min(le.x-pe,X),oe=Math.max(le.y+ge,oe),ne=Math.min(le.y-ge,ne)}),G.width=ae-X,G.height=oe-ne}}function M(V){V.forEach(function(U){var G={x:0,y:0};U.array.forEach(function(ae){G.x+=ae.x,G.y+=ae.y}),G.x/=U.array.length,G.y/=U.array.length;var X={x:G.x-U.width/2,y:G.y-U.height/2},ne={x:U.x-X.x+w/2-I/2,y:U.y-X.y+_/2-C/2};U.array.forEach(function(ae){ae.x+=ne.x,ae.y+=ne.y})})}function B(V,U){var G=Number.POSITIVE_INFINITY,X=0;V.sort(function(we,Pe){return Pe.height-we.height}),P=V.reduce(function(we,Pe){return we.width<Pe.width?we.width:Pe.width});for(var ne=Ne=P,ae=ye=$(V),oe=0,le=Number.MAX_VALUE,pe=Number.MAX_VALUE,ge=-1,de=Number.MAX_VALUE,Se=Number.MAX_VALUE;de>P||Se>r.FLOAT_EPSILON;){if(ge!=1)var Ne=ae-(ae-ne)/r.GOLDEN_SECTION,le=F(V,Ne);if(ge!=0)var ye=ne+(ae-ne)/r.GOLDEN_SECTION,pe=F(V,ye);if(de=Math.abs(Ne-ye),Se=Math.abs(le-pe),le<G&&(G=le,X=Ne),pe<G&&(G=pe,X=ye),le>pe?(ne=Ne,Ne=ye,le=pe,ge=1):(ae=ye,ye=Ne,pe=le,ge=0),oe++>100)break}F(V,X)}function F(V,U){L=[],I=0,C=0,A=g;for(var G=0;G<V.length;G++){var X=V[G];q(X,U)}return Math.abs(Y()-E)}function q(V,U){for(var G=void 0,X=0;X<L.length;X++)if(L[X].space_left>=V.height&&L[X].x+L[X].width+V.width+r.PADDING-U<=r.FLOAT_EPSILON){G=L[X];break}L.push(V),G!==void 0?(V.x=G.x+G.width+r.PADDING,V.y=G.bottom,V.space_left=V.height,V.bottom=V.y,G.space_left-=V.height+r.PADDING,G.bottom+=V.height+r.PADDING):(V.y=A,A+=V.height+r.PADDING,V.x=p,V.bottom=V.y,V.space_left=V.height),V.y+V.height-C>-1e-4&&(C=V.y+V.height-g),V.x+V.width-I>-1e-4&&(I=V.x+V.width-p)}function $(V){var U=0;return V.forEach(function(G){return U+=G.width+r.PADDING}),U}function Y(){return I/C}}Z1.applyPacking=t;function i(a,u){for(var c={},l={},h=[],v=0,p=0;p<u.length;p++){var g=u[p],w=g.source,_=g.target;l[w.index]?l[w.index].push(_):l[w.index]=[_],l[_.index]?l[_.index].push(w):l[_.index]=[w]}for(var p=0;p<a.length;p++){var E=a[p];c[E.index]||k(E,!0)}function k(I,C){if(c[I.index]===void 0){C&&(v++,h.push({array:[]})),c[I.index]=v,h[v-1].array.push(I);var P=l[I.index];if(P)for(var A=0;A<P.length;A++)k(P[A],!1)}}return h}return Z1.separateGraphs=i,Z1}var IX;function em(){return IX||(IX=1,function(r){Object.defineProperty(r,"__esModule",{value:!0});var t=vX(),i=o3(),a=u3(),u=J1(),c=Y2(),l=SX(),h=RX(),v;(function(w){w[w.start=0]="start",w[w.tick=1]="tick",w[w.end=2]="end"})(v=r.EventType||(r.EventType={}));function p(w){return typeof w.leaves<"u"||typeof w.groups<"u"}var g=function(){function w(){var _=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(E){return typeof _._linkType=="function"?_._linkType(E):0}}}return w.prototype.on=function(_,E){return this.event||(this.event={}),typeof _=="string"?this.event[v[_]]=E:this.event[_]=E,this},w.prototype.trigger=function(_){this.event&&typeof this.event[_.type]<"u"&&this.event[_.type](_)},w.prototype.kick=function(){for(;!this.tick(););},w.prototype.tick=function(){if(this._alpha<this._threshold)return this._running=!1,this.trigger({type:v.end,alpha:this._alpha=0,stress:this._lastStress}),!0;var _=this._nodes.length;this._links.length;var E,k;for(this._descent.locks.clear(),k=0;k<_;++k)if(E=this._nodes[k],E.fixed){(typeof E.px>"u"||typeof E.py>"u")&&(E.px=E.x,E.py=E.y);var I=[E.px,E.py];this._descent.locks.add(k,I)}var C=this._descent.rungeKutta();return C===0?this._alpha=0:typeof this._lastStress<"u"&&(this._alpha=C),this._lastStress=C,this.updateNodePositions(),this.trigger({type:v.tick,alpha:this._alpha,stress:this._lastStress}),!1},w.prototype.updateNodePositions=function(){for(var _=this._descent.x[0],E=this._descent.x[1],k,I=this._nodes.length;I--;)k=this._nodes[I],k.x=_[I],k.y=E[I]},w.prototype.nodes=function(_){if(!_){if(this._nodes.length===0&&this._links.length>0){var E=0;this._links.forEach(function(I){E=Math.max(E,I.source,I.target)}),this._nodes=new Array(++E);for(var k=0;k<E;++k)this._nodes[k]={}}return this._nodes}return this._nodes=_,this},w.prototype.groups=function(_){var E=this;return _?(this._groups=_,this._rootGroup={},this._groups.forEach(function(k){typeof k.padding>"u"&&(k.padding=1),typeof k.leaves<"u"&&k.leaves.forEach(function(I,C){typeof I=="number"&&((k.leaves[C]=E._nodes[I]).parent=k)}),typeof k.groups<"u"&&k.groups.forEach(function(I,C){typeof I=="number"&&((k.groups[C]=E._groups[I]).parent=k)})}),this._rootGroup.leaves=this._nodes.filter(function(k){return typeof k.parent>"u"}),this._rootGroup.groups=this._groups.filter(function(k){return typeof k.parent>"u"}),this):this._groups},w.prototype.powerGraphGroups=function(_){var E=t.getGroups(this._nodes,this._links,this.linkAccessor,this._rootGroup);return this.groups(E.groups),_(E),this},w.prototype.avoidOverlaps=function(_){return arguments.length?(this._avoidOverlaps=_,this):this._avoidOverlaps},w.prototype.handleDisconnected=function(_){return arguments.length?(this._handleDisconnected=_,this):this._handleDisconnected},w.prototype.flowLayout=function(_,E){return arguments.length||(_="y"),this._directedLinkConstraints={axis:_,getMinSeparation:typeof E=="number"?function(){return E}:E},this},w.prototype.links=function(_){return arguments.length?(this._links=_,this):this._links},w.prototype.constraints=function(_){return arguments.length?(this._constraints=_,this):this._constraints},w.prototype.distanceMatrix=function(_){return arguments.length?(this._distanceMatrix=_,this):this._distanceMatrix},w.prototype.size=function(_){return _?(this._canvasSize=_,this):this._canvasSize},w.prototype.defaultNodeSize=function(_){return _?(this._defaultNodeSize=_,this):this._defaultNodeSize},w.prototype.groupCompactness=function(_){return _?(this._groupCompactness=_,this):this._groupCompactness},w.prototype.linkDistance=function(_){return _?(this._linkDistance=typeof _=="function"?_:+_,this._linkLengthCalculator=null,this):this._linkDistance},w.prototype.linkType=function(_){return this._linkType=_,this},w.prototype.convergenceThreshold=function(_){return _?(this._threshold=typeof _=="function"?_:+_,this):this._threshold},w.prototype.alpha=function(_){return arguments.length?(_=+_,this._alpha?_>0?this._alpha=_:this._alpha=0:_>0&&(this._running||(this._running=!0,this.trigger({type:v.start,alpha:this._alpha=_}),this.kick())),this):this._alpha},w.prototype.getLinkLength=function(_){return typeof this._linkDistance=="function"?+this._linkDistance(_):this._linkDistance},w.setLinkLength=function(_,E){_.length=E},w.prototype.getLinkType=function(_){return typeof this._linkType=="function"?this._linkType(_):0},w.prototype.symmetricDiffLinkLengths=function(_,E){var k=this;return E===void 0&&(E=1),this.linkDistance(function(I){return _*I.length}),this._linkLengthCalculator=function(){return i.symmetricDiffLinkLengths(k._links,k.linkAccessor,E)},this},w.prototype.jaccardLinkLengths=function(_,E){var k=this;return E===void 0&&(E=1),this.linkDistance(function(I){return _*I.length}),this._linkLengthCalculator=function(){return i.jaccardLinkLengths(k._links,k.linkAccessor,E)},this},w.prototype.start=function(_,E,k,I,C,P){var A=this;_===void 0&&(_=0),E===void 0&&(E=0),k===void 0&&(k=0),I===void 0&&(I=0),C===void 0&&(C=!0),P===void 0&&(P=!0);var L,O=this.nodes().length,M=O+2*this._groups.length;this._links.length;var B=this._canvasSize[0],F=this._canvasSize[1],q=new Array(M),$=new Array(M),Y=null,V=this._avoidOverlaps;this._nodes.forEach(function(pe,ge){pe.index=ge,typeof pe.x>"u"&&(pe.x=B/2,pe.y=F/2),q[ge]=pe.x,$[ge]=pe.y}),this._linkLengthCalculator&&this._linkLengthCalculator();var U;this._distanceMatrix?U=this._distanceMatrix:(U=new c.Calculator(M,this._links,w.getSourceIndex,w.getTargetIndex,function(pe){return A.getLinkLength(pe)}).DistanceMatrix(),Y=a.Descent.createSquareMatrix(M,function(){return 2}),this._links.forEach(function(pe){typeof pe.source=="number"&&(pe.source=A._nodes[pe.source]),typeof pe.target=="number"&&(pe.target=A._nodes[pe.target])}),this._links.forEach(function(pe){var ge=w.getSourceIndex(pe),de=w.getTargetIndex(pe);Y[ge][de]=Y[de][ge]=pe.weight||1}));var G=a.Descent.createSquareMatrix(M,function(pe,ge){return U[pe][ge]});if(this._rootGroup&&typeof this._rootGroup.groups<"u"){var L=O,X=function(ge,de,Se,Ne){Y[ge][de]=Y[de][ge]=Se,G[ge][de]=G[de][ge]=Ne};this._groups.forEach(function(ge){X(L,L+1,A._groupCompactness,.1),q[L]=0,$[L++]=0,q[L]=0,$[L++]=0})}else this._rootGroup={leaves:this._nodes,groups:[]};var ne=this._constraints||[];this._directedLinkConstraints&&(this.linkAccessor.getMinSeparation=this._directedLinkConstraints.getMinSeparation,ne=ne.concat(i.generateDirectedEdgeConstraints(O,this._links,this._directedLinkConstraints.axis,this.linkAccessor))),this.avoidOverlaps(!1),this._descent=new a.Descent([q,$],G),this._descent.locks.clear();for(var L=0;L<O;++L){var ae=this._nodes[L];if(ae.fixed){ae.px=ae.x,ae.py=ae.y;var oe=[ae.x,ae.y];this._descent.locks.add(L,oe)}}if(this._descent.threshold=this._threshold,this.initialLayout(_,q,$),ne.length>0&&(this._descent.project=new u.Projection(this._nodes,this._groups,this._rootGroup,ne).projectFunctions()),this._descent.run(E),this.separateOverlappingComponents(B,F,P),this.avoidOverlaps(V),V&&(this._nodes.forEach(function(pe,ge){pe.x=q[ge],pe.y=$[ge]}),this._descent.project=new u.Projection(this._nodes,this._groups,this._rootGroup,ne,!0).projectFunctions(),this._nodes.forEach(function(pe,ge){q[ge]=pe.x,$[ge]=pe.y})),this._descent.G=Y,this._descent.run(k),I){this._descent.snapStrength=1e3,this._descent.snapGridSize=this._nodes[0].width,this._descent.numGridSnapNodes=O,this._descent.scaleSnapByMaxH=O!=M;var le=a.Descent.createSquareMatrix(M,function(pe,ge){return pe>=O||ge>=O?Y[pe][ge]:0});this._descent.G=le,this._descent.run(I)}return this.updateNodePositions(),this.separateOverlappingComponents(B,F,P),C?this.resume():this},w.prototype.initialLayout=function(_,E,k){if(this._groups.length>0&&_>0){var I=this._nodes.length,C=this._links.map(function(A){return{source:A.source.index,target:A.target.index}}),P=this._nodes.map(function(A){return{index:A.index}});this._groups.forEach(function(A,L){P.push({index:A.index=I+L})}),this._groups.forEach(function(A,L){typeof A.leaves<"u"&&A.leaves.forEach(function(O){return C.push({source:A.index,target:O.index})}),typeof A.groups<"u"&&A.groups.forEach(function(O){return C.push({source:A.index,target:O.index})})}),new w().size(this.size()).nodes(P).links(C).avoidOverlaps(!1).linkDistance(this.linkDistance()).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(_,0,0,0,!1),this._nodes.forEach(function(A){E[A.index]=P[A.index].x,k[A.index]=P[A.index].y})}else this._descent.run(_)},w.prototype.separateOverlappingComponents=function(_,E,k){var I=this;if(k===void 0&&(k=!0),!this._distanceMatrix&&this._handleDisconnected){var C=this._descent.x[0],P=this._descent.x[1];this._nodes.forEach(function(L,O){L.x=C[O],L.y=P[O]});var A=h.separateGraphs(this._nodes,this._links);h.applyPacking(A,_,E,this._defaultNodeSize,1,k),this._nodes.forEach(function(L,O){I._descent.x[0][O]=L.x,I._descent.x[1][O]=L.y,L.bounds&&(L.bounds.setXCentre(L.x),L.bounds.setYCentre(L.y))})}},w.prototype.resume=function(){return this.alpha(.1)},w.prototype.stop=function(){return this.alpha(0)},w.prototype.prepareEdgeRouting=function(_){_===void 0&&(_=0),this._visibilityGraph=new l.TangentVisibilityGraph(this._nodes.map(function(E){return E.bounds.inflate(-_).vertices()}))},w.prototype.routeEdge=function(_,E,k){E===void 0&&(E=5);var I=[],C=new l.TangentVisibilityGraph(this._visibilityGraph.P,{V:this._visibilityGraph.V,E:this._visibilityGraph.E}),P={x:_.source.x,y:_.source.y},A={x:_.target.x,y:_.target.y},L=C.addPoint(P,_.source.index),O=C.addPoint(A,_.target.index);C.addEdgeIfVisible(P,A,_.source.index,_.target.index),typeof k<"u"&&k(C);var M=function(ne){return ne.source.id},B=function(ne){return ne.target.id},F=function(ne){return ne.length()},q=new c.Calculator(C.V.length,C.E,M,B,F),$=q.PathFromNodeToNode(L.id,O.id);if($.length===1||$.length===C.V.length){var Y=u.makeEdgeBetween(_.source.innerBounds,_.target.innerBounds,E);I=[Y.sourceIntersection,Y.arrowStart]}else{for(var V=$.length-2,U=C.V[$[V]].p,G=C.V[$[0]].p,I=[_.source.innerBounds.rayIntersection(U.x,U.y)],X=V;X>=0;--X)I.push(C.V[$[X]].p);I.push(u.makeEdgeTo(G,_.target.innerBounds,E))}return I},w.getSourceIndex=function(_){return typeof _.source=="number"?_.source:_.source.index},w.getTargetIndex=function(_){return typeof _.target=="number"?_.target:_.target.index},w.linkId=function(_){return w.getSourceIndex(_)+"-"+w.getTargetIndex(_)},w.dragStart=function(_){p(_)?w.storeOffset(_,w.dragOrigin(_)):(w.stopNode(_),_.fixed|=2)},w.stopNode=function(_){_.px=_.x,_.py=_.y},w.storeOffset=function(_,E){typeof _.leaves<"u"&&_.leaves.forEach(function(k){k.fixed|=2,w.stopNode(k),k._dragGroupOffsetX=k.x-E.x,k._dragGroupOffsetY=k.y-E.y}),typeof _.groups<"u"&&_.groups.forEach(function(k){return w.storeOffset(k,E)})},w.dragOrigin=function(_){return p(_)?{x:_.bounds.cx(),y:_.bounds.cy()}:_},w.drag=function(_,E){p(_)?(typeof _.leaves<"u"&&_.leaves.forEach(function(k){_.bounds.setXCentre(E.x),_.bounds.setYCentre(E.y),k.px=k._dragGroupOffsetX+E.x,k.py=k._dragGroupOffsetY+E.y}),typeof _.groups<"u"&&_.groups.forEach(function(k){return w.drag(k,E)})):(_.px=E.x,_.py=E.y)},w.dragEnd=function(_){p(_)?(typeof _.leaves<"u"&&_.leaves.forEach(function(E){w.dragEnd(E),delete E._dragGroupOffsetX,delete E._dragGroupOffsetY}),typeof _.groups<"u"&&_.groups.forEach(w.dragEnd)):_.fixed&=-7},w.mouseOver=function(_){_.fixed|=4,_.px=_.x,_.py=_.y},w.mouseOut=function(_){_.fixed&=-5},w}();r.Layout=g}(s3)),s3}var CX;function w2e(){if(CX)return X1;CX=1;var r=Lr&&Lr.__extends||function(){var u=function(c,l){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,v){h.__proto__=v}||function(h,v){for(var p in v)v.hasOwnProperty(p)&&(h[p]=v[p])},u(c,l)};return function(c,l){u(c,l);function h(){this.constructor=c}c.prototype=l===null?Object.create(l):(h.prototype=l.prototype,new h)}}();Object.defineProperty(X1,"__esModule",{value:!0});var t=em(),i=function(u){r(c,u);function c(l){var h=u.call(this)||this,v=l;return v.trigger&&(h.trigger=v.trigger),v.kick&&(h.kick=v.kick),v.drag&&(h.drag=v.drag),v.on&&(h.on=v.on),h.dragstart=h.dragStart=t.Layout.dragStart,h.dragend=h.dragEnd=t.Layout.dragEnd,h}return c.prototype.trigger=function(l){},c.prototype.kick=function(){},c.prototype.drag=function(){},c.prototype.on=function(l,h){return this},c}(t.Layout);X1.LayoutAdaptor=i;function a(u){return new i(u)}return X1.adaptor=a,X1}var W2={},tm={},AX;function _2e(){if(AX)return tm;AX=1;var r=Lr&&Lr.__extends||function(){var u=function(c,l){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,v){h.__proto__=v}||function(h,v){for(var p in v)v.hasOwnProperty(p)&&(h[p]=v[p])},u(c,l)};return function(c,l){u(c,l);function h(){this.constructor=c}c.prototype=l===null?Object.create(l):(h.prototype=l.prototype,new h)}}();Object.defineProperty(tm,"__esModule",{value:!0});var t=em(),i=function(u){r(c,u);function c(){var l=u.call(this)||this;l.event=d3.dispatch(t.EventType[t.EventType.start],t.EventType[t.EventType.tick],t.EventType[t.EventType.end]);var h=l;return l.drag=function(){if(!v)var v=d3.behavior.drag().origin(t.Layout.dragOrigin).on("dragstart.d3adaptor",t.Layout.dragStart).on("drag.d3adaptor",function(p){t.Layout.drag(p,d3.event),h.resume()}).on("dragend.d3adaptor",t.Layout.dragEnd);if(!arguments.length)return v;this.call(v)},l}return c.prototype.trigger=function(l){var h={type:t.EventType[l.type],alpha:l.alpha,stress:l.stress};this.event[h.type](h)},c.prototype.kick=function(){var l=this;d3.timer(function(){return u.prototype.tick.call(l)})},c.prototype.on=function(l,h){return typeof l=="string"?this.event.on(l,h):this.event.on(t.EventType[l],h),this},c}(t.Layout);tm.D3StyleLayoutAdaptor=i;function a(){return new i}return tm.d3adaptor=a,tm}var K2={},PX;function x2e(){if(PX)return K2;PX=1;var r=Lr&&Lr.__extends||function(){var a=function(u,c){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,h){l.__proto__=h}||function(l,h){for(var v in h)h.hasOwnProperty(v)&&(l[v]=h[v])},a(u,c)};return function(u,c){a(u,c);function l(){this.constructor=u}u.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}}();Object.defineProperty(K2,"__esModule",{value:!0});var t=em(),i=function(a){r(u,a);function u(c){var l=a.call(this)||this;l.d3Context=c,l.event=c.dispatch(t.EventType[t.EventType.start],t.EventType[t.EventType.tick],t.EventType[t.EventType.end]);var h=l;return l.drag=function(){if(!v)var v=c.drag().subject(t.Layout.dragOrigin).on("start.d3adaptor",t.Layout.dragStart).on("drag.d3adaptor",function(p){t.Layout.drag(p,c.event),h.resume()}).on("end.d3adaptor",t.Layout.dragEnd);if(!arguments.length)return v;arguments[0].call(v)},l}return u.prototype.trigger=function(c){var l={type:t.EventType[c.type],alpha:c.alpha,stress:c.stress};this.event.call(l.type,l)},u.prototype.kick=function(){var c=this,l=this.d3Context.timer(function(){return a.prototype.tick.call(c)&&l.stop()})},u.prototype.on=function(c,l){return typeof c=="string"?this.event.on(c,l):this.event.on(t.EventType[c],l),this},u}(t.Layout);return K2.D3StyleLayoutAdaptor=i,K2}var LX;function E2e(){if(LX)return W2;LX=1,Object.defineProperty(W2,"__esModule",{value:!0});var r=_2e(),t=x2e();function i(u){return!u||a(u)?new r.D3StyleLayoutAdaptor:new t.D3StyleLayoutAdaptor(u)}W2.d3adaptor=i;function a(u){var c=/^3\./;return u.version&&u.version.match(c)!==null}return W2}var Ep={},NX;function OX(){if(NX)return Ep;NX=1,Object.defineProperty(Ep,"__esModule",{value:!0});var r=J1(),t=c3(),i=Y2(),a=function(){function h(v,p,g){this.id=v,this.rect=p,this.children=g,this.leaf=typeof g>"u"||g.length===0}return h}();Ep.NodeWrapper=a;var u=function(){function h(v,p,g,w,_){w===void 0&&(w=null),_===void 0&&(_=null),this.id=v,this.x=p,this.y=g,this.node=w,this.line=_}return h}();Ep.Vert=u;var c=function(){function h(v,p){this.s=v,this.t=p;var g=h.findMatch(v,p),w=p.slice(0).reverse(),_=h.findMatch(v,w);g.length>=_.length?(this.length=g.length,this.si=g.si,this.ti=g.ti,this.reversed=!1):(this.length=_.length,this.si=_.si,this.ti=p.length-_.ti-_.length,this.reversed=!0)}return h.findMatch=function(v,p){for(var g=v.length,w=p.length,_={length:0,si:-1,ti:-1},E=new Array(g),k=0;k<g;k++){E[k]=new Array(w);for(var I=0;I<w;I++)if(v[k]===p[I]){var C=E[k][I]=k===0||I===0?1:E[k-1][I-1]+1;C>_.length&&(_.length=C,_.si=k-C+1,_.ti=I-C+1)}else E[k][I]=0}return _},h.prototype.getSequence=function(){return this.length>=0?this.s.slice(this.si,this.si+this.length):[]},h}();Ep.LongestCommonSubsequence=c;var l=function(){function h(v,p,g){var w=this;g===void 0&&(g=12),this.originalnodes=v,this.groupPadding=g,this.leaves=null,this.nodes=v.map(function(B,F){return new a(F,p.getBounds(B),p.getChildren(B))}),this.leaves=this.nodes.filter(function(B){return B.leaf}),this.groups=this.nodes.filter(function(B){return!B.leaf}),this.cols=this.getGridLines("x"),this.rows=this.getGridLines("y"),this.groups.forEach(function(B){return B.children.forEach(function(F){return w.nodes[F].parent=B})}),this.root={children:[]},this.nodes.forEach(function(B){typeof B.parent>"u"&&(B.parent=w.root,w.root.children.push(B.id)),B.ports=[]}),this.backToFront=this.nodes.slice(0),this.backToFront.sort(function(B,F){return w.getDepth(B)-w.getDepth(F)});var _=this.backToFront.slice(0).reverse().filter(function(B){return!B.leaf});_.forEach(function(B){var F=r.Rectangle.empty();B.children.forEach(function(q){return F=F.union(w.nodes[q].rect)}),B.rect=F.inflate(w.groupPadding)});var E=this.midPoints(this.cols.map(function(B){return B.pos})),k=this.midPoints(this.rows.map(function(B){return B.pos})),I=E[0],C=E[E.length-1],P=k[0],A=k[k.length-1],L=this.rows.map(function(B){return{x1:I,x2:C,y1:B.pos,y2:B.pos}}).concat(k.map(function(B){return{x1:I,x2:C,y1:B,y2:B}})),O=this.cols.map(function(B){return{x1:B.pos,x2:B.pos,y1:P,y2:A}}).concat(E.map(function(B){return{x1:B,x2:B,y1:P,y2:A}})),M=L.concat(O);M.forEach(function(B){return B.verts=[]}),this.verts=[],this.edges=[],L.forEach(function(B){return O.forEach(function(F){var q=new u(w.verts.length,F.x1,B.y1);B.verts.push(q),F.verts.push(q),w.verts.push(q);for(var $=w.backToFront.length;$-- >0;){var Y=w.backToFront[$],V=Y.rect,U=Math.abs(q.x-V.cx()),G=Math.abs(q.y-V.cy());if(U<V.width()/2&&G<V.height()/2){q.node=Y;break}}})}),M.forEach(function(B,F){w.nodes.forEach(function(G,X){G.rect.lineIntersections(B.x1,B.y1,B.x2,B.y2).forEach(function(ne,ae){var oe=new u(w.verts.length,ne.x,ne.y,G,B);w.verts.push(oe),B.verts.push(oe),G.ports.push(oe)})});var q=Math.abs(B.y1-B.y2)<.1,$=function(G,X){return q?X.x-G.x:X.y-G.y};B.verts.sort($);for(var Y=1;Y<B.verts.length;Y++){var V=B.verts[Y-1],U=B.verts[Y];V.node&&V.node===U.node&&V.node.leaf||w.edges.push({source:V.id,target:U.id,length:Math.abs($(V,U))})}})}return h.prototype.avg=function(v){return v.reduce(function(p,g){return p+g})/v.length},h.prototype.getGridLines=function(v){for(var p=[],g=this.leaves.slice(0,this.leaves.length);g.length>0;){var w=g.filter(function(E){return E.rect["overlap"+v.toUpperCase()](g[0].rect)}),_={nodes:w,pos:this.avg(w.map(function(E){return E.rect["c"+v]()}))};p.push(_),_.nodes.forEach(function(E){return g.splice(g.indexOf(E),1)})}return p.sort(function(E,k){return E.pos-k.pos}),p},h.prototype.getDepth=function(v){for(var p=0;v.parent!==this.root;)p++,v=v.parent;return p},h.prototype.midPoints=function(v){for(var p=v[1]-v[0],g=[v[0]-p/2],w=1;w<v.length;w++)g.push((v[w]+v[w-1])/2);return g.push(v[v.length-1]+p/2),g},h.prototype.findLineage=function(v){var p=[v];do v=v.parent,p.push(v);while(v!==this.root);return p.reverse()},h.prototype.findAncestorPathBetween=function(v,p){for(var g=this.findLineage(v),w=this.findLineage(p),_=0;g[_]===w[_];)_++;return{commonAncestor:g[_-1],lineages:g.slice(_).concat(w.slice(_))}},h.prototype.siblingObstacles=function(v,p){var g=this,w=this.findAncestorPathBetween(v,p),_={};w.lineages.forEach(function(k){return _[k.id]={}});var E=w.commonAncestor.children.filter(function(k){return!(k in _)});return w.lineages.filter(function(k){return k.parent!==w.commonAncestor}).forEach(function(k){return E=E.concat(k.parent.children.filter(function(I){return I!==k.id}))}),E.map(function(k){return g.nodes[k]})},h.getSegmentSets=function(v,p,g){for(var w=[],_=0;_<v.length;_++)for(var E=v[_],k=0;k<E.length;k++){var I=E[k];I.edgeid=_,I.i=k;var C=I[1][p]-I[0][p];Math.abs(C)<.1&&w.push(I)}w.sort(function(O,M){return O[0][p]-M[0][p]});for(var P=[],A=null,L=0;L<w.length;L++){var I=w[L];(!A||Math.abs(I[0][p]-A.pos)>.1)&&(A={pos:I[0][p],segments:[]},P.push(A)),A.segments.push(I)}return P},h.nudgeSegs=function(v,p,g,w,_,E){var k=w.length;if(!(k<=1)){for(var I=w.map(function(Y){return new t.Variable(Y[0][v])}),C=[],P=0;P<k;P++)for(var A=0;A<k;A++)if(P!==A){var L=w[P],O=w[A],M=L.edgeid,B=O.edgeid,F=-1,q=-1;v=="x"?_(M,B)&&(L[0][p]<L[1][p]?(F=A,q=P):(F=P,q=A)):_(M,B)&&(L[0][p]<L[1][p]?(F=P,q=A):(F=A,q=P)),F>=0&&C.push(new t.Constraint(I[F],I[q],E))}var $=new t.Solver(I,C);$.solve(),I.forEach(function(Y,V){var U=w[V],G=Y.position();U[0][v]=U[1][v]=G;var X=g[U.edgeid];U.i>0&&(X[U.i-1][1][v]=G),U.i<X.length-1&&(X[U.i+1][0][v]=G)})}},h.nudgeSegments=function(v,p,g,w,_){for(var E=h.getSegmentSets(v,p,g),k=0;k<E.length;k++){for(var I=E[k],C=[],P=0;P<I.segments.length;P++){var A=I.segments[P];C.push({type:0,s:A,pos:Math.min(A[0][g],A[1][g])}),C.push({type:1,s:A,pos:Math.max(A[0][g],A[1][g])})}C.sort(function(M,B){return M.pos-B.pos+M.type-B.type});var L=[],O=0;C.forEach(function(M){M.type===0?(L.push(M.s),O++):O--,O==0&&(h.nudgeSegs(p,g,v,L,w,_),L=[])})}},h.prototype.routeEdges=function(v,p,g,w){var _=this,E=v.map(function(C){return _.route(g(C),w(C))}),k=h.orderEdges(E),I=E.map(function(C){return h.makeSegments(C)});return h.nudgeSegments(I,"x","y",k,p),h.nudgeSegments(I,"y","x",k,p),h.unreverseEdges(I,E),I},h.unreverseEdges=function(v,p){v.forEach(function(g,w){var _=p[w];_.reversed&&(g.reverse(),g.forEach(function(E){E.reverse()}))})},h.angleBetween2Lines=function(v,p){var g=Math.atan2(v[0].y-v[1].y,v[0].x-v[1].x),w=Math.atan2(p[0].y-p[1].y,p[0].x-p[1].x),_=g-w;return(_>Math.PI||_<-Math.PI)&&(_=w-g),_},h.isLeft=function(v,p,g){return(p.x-v.x)*(g.y-v.y)-(p.y-v.y)*(g.x-v.x)<=0},h.getOrder=function(v){for(var p={},g=0;g<v.length;g++){var w=v[g];typeof p[w.l]>"u"&&(p[w.l]={}),p[w.l][w.r]=!0}return function(_,E){return typeof p[_]<"u"&&p[_][E]}},h.orderEdges=function(v){for(var p=[],g=0;g<v.length-1;g++)for(var w=g+1;w<v.length;w++){var _=v[g],E=v[w],k=new c(_,E),I,C,P;if(k.length!==0){if(k.reversed&&(E.reverse(),E.reversed=!0,k=new c(_,E)),(k.si<=0||k.ti<=0)&&(k.si+k.length>=_.length||k.ti+k.length>=E.length)){p.push({l:g,r:w});continue}k.si+k.length>=_.length||k.ti+k.length>=E.length?(I=_[k.si+1],P=_[k.si-1],C=E[k.ti-1]):(I=_[k.si+k.length-2],C=_[k.si+k.length],P=E[k.ti+k.length]),h.isLeft(I,C,P)?p.push({l:w,r:g}):p.push({l:g,r:w})}}return h.getOrder(p)},h.makeSegments=function(v){function p(C){return{x:C.x,y:C.y}}for(var g=function(C,P,A){return Math.abs((P.x-C.x)*(A.y-C.y)-(P.y-C.y)*(A.x-C.x))<.001},w=[],_=p(v[0]),E=1;E<v.length;E++){var k=p(v[E]),I=E<v.length-1?v[E+1]:null;(!I||!g(_,k,I))&&(w.push([_,k]),_=k)}return w},h.prototype.route=function(v,p){var g=this,w=this.nodes[v],_=this.nodes[p];this.obstacles=this.siblingObstacles(w,_);var E={};this.obstacles.forEach(function(q){return E[q.id]=q}),this.passableEdges=this.edges.filter(function(q){var $=g.verts[q.source],Y=g.verts[q.target];return!($.node&&$.node.id in E||Y.node&&Y.node.id in E)});for(var k=1;k<w.ports.length;k++){var I=w.ports[0].id,C=w.ports[k].id;this.passableEdges.push({source:I,target:C,length:0})}for(var k=1;k<_.ports.length;k++){var I=_.ports[0].id,C=_.ports[k].id;this.passableEdges.push({source:I,target:C,length:0})}var P=function(q){return q.source},A=function(q){return q.target},L=function(q){return q.length},O=new i.Calculator(this.verts.length,this.passableEdges,P,A,L),M=function(q,$,Y){var V=g.verts[q],U=g.verts[$],G=g.verts[Y],X=Math.abs(G.x-V.x),ne=Math.abs(G.y-V.y);return V.node===w&&V.node===U.node||U.node===_&&U.node===G.node?0:X>1&&ne>1?1e3:0},B=O.PathFromNodeToNodeWithPrevCost(w.ports[0].id,_.ports[0].id,M),F=B.reverse().map(function(q){return g.verts[q]});return F.push(this.nodes[_.id].ports[0]),F.filter(function(q,$){return!($<F.length-1&&F[$+1].node===w&&q.node===w||$>0&&q.node===_&&F[$-1].node===_)})},h.getRoutePath=function(v,p,g,w){var _={routepath:"M "+v[0][0].x+" "+v[0][0].y+" ",arrowpath:""};if(v.length>1)for(var E=0;E<v.length;E++){var k=v[E],I=k[1].x,C=k[1].y,P=I-k[0].x,A=C-k[0].y;if(E<v.length-1){Math.abs(P)>0?I-=P/Math.abs(P)*p:C-=A/Math.abs(A)*p,_.routepath+="L "+I+" "+C+" ";var L=v[E+1],O=L[0].x,M=L[0].y,B=L[1].x,F=L[1].y;P=B-O,A=F-M;var q=h.angleBetween2Lines(k,L)<0?1:0,$,Y;Math.abs(P)>0?($=O+P/Math.abs(P)*p,Y=M):($=O,Y=M+A/Math.abs(A)*p);var V=Math.abs($-I),U=Math.abs(Y-C);_.routepath+="A "+V+" "+U+" 0 0 "+q+" "+$+" "+Y+" "}else{var G=[I,C],X,ne;Math.abs(P)>0?(I-=P/Math.abs(P)*w,X=[I,C+g],ne=[I,C-g]):(C-=A/Math.abs(A)*w,X=[I+g,C],ne=[I-g,C]),_.routepath+="L "+I+" "+C+" ",w>0&&(_.arrowpath="M "+G[0]+" "+G[1]+" L "+X[0]+" "+X[1]+" L "+ne[0]+" "+ne[1])}}else{var k=v[0],I=k[1].x,C=k[1].y,P=I-k[0].x,A=C-k[0].y,G=[I,C],X,ne;Math.abs(P)>0?(I-=P/Math.abs(P)*w,X=[I,C+g],ne=[I,C-g]):(C-=A/Math.abs(A)*w,X=[I+g,C],ne=[I-g,C]),_.routepath+="L "+I+" "+C+" ",w>0&&(_.arrowpath="M "+G[0]+" "+G[1]+" L "+X[0]+" "+X[1]+" L "+ne[0]+" "+ne[1])}return _},h}();return Ep.GridRouter=l,Ep}var Fb={},DX;function k2e(){if(DX)return Fb;DX=1,Object.defineProperty(Fb,"__esModule",{value:!0});var r=Y2(),t=u3(),i=J1(),a=o3(),u=function(){function v(p,g){this.source=p,this.target=g}return v.prototype.actualLength=function(p){var g=this;return Math.sqrt(p.reduce(function(w,_){var E=_[g.target]-_[g.source];return w+E*E},0))},v}();Fb.Link3D=u;var c=function(){function v(p,g,w){p===void 0&&(p=0),g===void 0&&(g=0),w===void 0&&(w=0),this.x=p,this.y=g,this.z=w}return v}();Fb.Node3D=c;var l=function(){function v(p,g,w){var _=this;w===void 0&&(w=1),this.nodes=p,this.links=g,this.idealLinkLength=w,this.constraints=null,this.useJaccardLinkLengths=!0,this.result=new Array(v.k);for(var E=0;E<v.k;++E)this.result[E]=new Array(p.length);p.forEach(function(k,I){for(var C=0,P=v.dims;C<P.length;C++){var A=P[C];typeof k[A]>"u"&&(k[A]=Math.random())}_.result[0][I]=k.x,_.result[1][I]=k.y,_.result[2][I]=k.z})}return v.prototype.linkLength=function(p){return p.actualLength(this.result)},v.prototype.start=function(p){var g=this;p===void 0&&(p=100);var w=this.nodes.length,_=new h;this.useJaccardLinkLengths&&a.jaccardLinkLengths(this.links,_,1.5),this.links.forEach(function(A){return A.length*=g.idealLinkLength});var E=new r.Calculator(w,this.links,function(A){return A.source},function(A){return A.target},function(A){return A.length}).DistanceMatrix(),k=t.Descent.createSquareMatrix(w,function(A,L){return E[A][L]}),I=t.Descent.createSquareMatrix(w,function(){return 2});this.links.forEach(function(A){var L=A.source,O=A.target;return I[L][O]=I[O][L]=1}),this.descent=new t.Descent(this.result,k),this.descent.threshold=.001,this.descent.G=I,this.constraints&&(this.descent.project=new i.Projection(this.nodes,null,null,this.constraints).projectFunctions());for(var C=0;C<this.nodes.length;C++){var P=this.nodes[C];P.fixed&&this.descent.locks.add(C,[P.x,P.y,P.z])}return this.descent.run(p),this},v.prototype.tick=function(){this.descent.locks.clear();for(var p=0;p<this.nodes.length;p++){var g=this.nodes[p];g.fixed&&this.descent.locks.add(p,[g.x,g.y,g.z])}return this.descent.rungeKutta()},v.dims=["x","y","z"],v.k=v.dims.length,v}();Fb.Layout3D=l;var h=function(){function v(){}return v.prototype.getSourceIndex=function(p){return p.source},v.prototype.getTargetIndex=function(p){return p.target},v.prototype.getLength=function(p){return p.length},v.prototype.setLength=function(p,g){p.length=g},v}();return Fb}var nm={},MX;function S2e(){if(MX)return nm;MX=1,Object.defineProperty(nm,"__esModule",{value:!0});var r=em(),t=OX();function i(c,l,h,v){c.cola.start(0,0,0,10,!1);var p=a(c.cola.nodes(),c.cola.groups(),h,v);return p.routeEdges(c.powerGraph.powerEdges,l,function(g){return g.source.routerNode.id},function(g){return g.target.routerNode.id})}nm.gridify=i;function a(c,l,h,v){c.forEach(function(g){g.routerNode={name:g.name,bounds:g.bounds.inflate(-h)}}),l.forEach(function(g){g.routerNode={bounds:g.bounds.inflate(-v),children:(typeof g.groups<"u"?g.groups.map(function(w){return c.length+w.id}):[]).concat(typeof g.leaves<"u"?g.leaves.map(function(w){return w.index}):[])}});var p=c.concat(l).map(function(g,w){return g.routerNode.id=w,g.routerNode});return new t.GridRouter(p,{getChildren:function(g){return g.children},getBounds:function(g){return g.bounds}},h-v)}function u(c,l,h){var v;c.nodes.forEach(function(_,E){return _.index=E}),new r.Layout().avoidOverlaps(!1).nodes(c.nodes).links(c.links).powerGraphGroups(function(_){v=_,v.groups.forEach(function(E){return E.padding=h})});var p=c.nodes.length,g=[],w=c.nodes.slice(0);return w.forEach(function(_,E){return _.index=E}),v.groups.forEach(function(_){var E=_.index=_.id+p;w.push(_),typeof _.leaves<"u"&&_.leaves.forEach(function(k){return g.push({source:E,target:k.index})}),typeof _.groups<"u"&&_.groups.forEach(function(k){return g.push({source:E,target:k.id+p})})}),v.powerEdges.forEach(function(_){g.push({source:_.source.index,target:_.target.index})}),new r.Layout().size(l).nodes(w).links(g).avoidOverlaps(!1).linkDistance(30).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(100,0,0,0,!1),{cola:new r.Layout().convergenceThreshold(.001).size(l).avoidOverlaps(!0).nodes(c.nodes).links(c.links).groupCompactness(1e-4).linkDistance(30).symmetricDiffLinkLengths(5).powerGraphGroups(function(_){v=_,v.groups.forEach(function(E){E.padding=h})}).start(50,0,100,0,!1),powerGraph:v}}return nm.powerGraphGridLayout=u,nm}var jX;function T2e(){return jX||(jX=1,function(r){function t(i){for(var a in i)r.hasOwnProperty(a)||(r[a]=i[a])}Object.defineProperty(r,"__esModule",{value:!0}),t(w2e()),t(E2e()),t(u3()),t(SX()),t(OX()),t(RX()),t(em()),t(k2e()),t(o3()),t(vX()),t(xX()),t(mX()),t(J1()),t(Y2()),t(c3()),t(S2e())}(a3)),a3}(function(r,t){(function(a,u){r.exports=u(T2e())})(Lr,function(i){return function(a){var u={};function c(l){if(u[l])return u[l].exports;var h=u[l]={i:l,l:!1,exports:{}};return a[l].call(h.exports,h,h.exports,c),h.l=!0,h.exports}return c.m=a,c.c=u,c.i=function(l){return l},c.d=function(l,h,v){c.o(l,h)||Object.defineProperty(l,h,{configurable:!1,enumerable:!0,get:v})},c.n=function(l){var h=l&&l.__esModule?function(){return l.default}:function(){return l};return c.d(h,"a",h),h},c.o=function(l,h){return Object.prototype.hasOwnProperty.call(l,h)},c.p="",c(c.s=3)}([function(a,u,c){var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},h=c(1),v=c(2),p=c(5)||(typeof window<"u"?window.cola:null),g=c(4),w=function(L){return(typeof L>"u"?"undefined":l(L))===l("")},_=function(L){return(typeof L>"u"?"undefined":l(L))===l(0)},E=function(L){return L!=null&&(typeof L>"u"?"undefined":l(L))===l({})},k=function(L){return L!=null&&(typeof L>"u"?"undefined":l(L))===l(function(){})},I=function(){},C=function(L,O){if(k(L)){var M=L;return M.apply(O,[O])}else return L};function P(A){this.options=h({},v,A)}P.prototype.run=function(){var A=this,L=this.options;A.manuallyStopped=!1;var O=L.cy,M=L.eles,B=M.nodes(),F=M.edges(),q=!1,$=function(Be){return Be.isParent()},Y=B.filter($),V=B.subtract(Y),U=L.boundingBox||{x1:0,y1:0,w:O.width(),h:O.height()};U.x2===void 0&&(U.x2=U.x1+U.w),U.w===void 0&&(U.w=U.x2-U.x1),U.y2===void 0&&(U.y2=U.y1+U.h),U.h===void 0&&(U.h=U.y2-U.y1);var G=function(){for(var Be=0;Be<B.length;Be++){var ve=B[Be],ke=ve.layoutDimensions(L),je=ve.scratch("cola");if(!je.updatedDims){var qe=C(L.nodeSpacing,ve);je.width=ke.w+2*qe,je.height=ke.h+2*qe}}B.positions(function(Me){var ot=Me.scratch().cola,dt=void 0;return!Me.grabbed()&&V.contains(Me)&&(dt={x:U.x1+ot.x,y:U.y1+ot.y},(!_(dt.x)||!_(dt.y))&&(dt=void 0)),dt}),B.updateCompoundBounds(),q||(ne(),q=!0),L.fit&&O.fit(L.padding)},X=function(){L.ungrabifyWhileSimulating&&le.grabify(),O.off("destroy",pe),B.off("grab free position",ge),B.off("lock unlock",de),A.one("layoutstop",L.stop),A.trigger({type:"layoutstop",layout:A})},ne=function(){A.one("layoutready",L.ready),A.trigger({type:"layoutready",layout:A})},ae=L.refresh;L.refresh<0?ae=1:ae=Math.max(1,ae);var oe=A.adaptor=p.adaptor({trigger:function(Be){var ve=p.EventType?p.EventType.tick:null,ke=p.EventType?p.EventType.end:null;switch(Be.type){case"tick":case ve:L.animate&&G();break;case"end":case ke:G(),L.infinite||X();break}},kick:function(){var Be=!0,ve=function(){if(A.manuallyStopped)return X(),!0;var Me=oe.tick();return!L.infinite&&!Be&&oe.convergenceThreshold(L.convergenceThreshold),Be=!1,Me&&L.infinite&&oe.resume(),Me},ke=function(){for(var Me=void 0,ot=0;ot<ae&&!Me;ot++)Me=Me||ve();return Me};if(L.animate){var je=function qe(){ke()||g(qe)};g(je)}else for(;!ve(););},on:I,drag:I});A.adaptor=oe;var le=B.filter(":grabbable");L.ungrabifyWhileSimulating&&le.ungrabify();var pe=void 0;O.one("destroy",pe=function(){A.stop()});var ge=void 0;B.on("grab free position",ge=function(Be){var ve=this,ke=ve.scratch().cola,je=ve.position(),qe=Be.cyTarget===ve||Be.target===ve;if(qe)switch(Be.type){case"grab":oe.dragstart(ke);break;case"free":oe.dragend(ke);break;case"position":(ke.px!==je.x-U.x1||ke.py!==je.y-U.y1)&&(ke.px=je.x-U.x1,ke.py=je.y-U.y1);break}});var de=void 0;B.on("lock unlock",de=function(){var Be=this,ve=Be.scratch().cola;ve.fixed=Be.locked(),Be.locked()?oe.dragstart(ve):oe.dragend(ve)}),oe.nodes(V.map(function(Ce,Be){var ve=C(L.nodeSpacing,Ce),ke=Ce.position(),je=Ce.layoutDimensions(L),qe=Ce.scratch().cola={x:L.randomize&&!Ce.locked()||ke.x===void 0?Math.round(Math.random()*U.w):ke.x,y:L.randomize&&!Ce.locked()||ke.y===void 0?Math.round(Math.random()*U.h):ke.y,width:je.w+2*ve,height:je.h+2*ve,index:Be,fixed:Ce.locked()};return qe}));var Se=[];if(L.alignment){if(L.alignment.vertical){var Ne=L.alignment.vertical;Ne.forEach(function(Ce){var Be=[];Ce.forEach(function(ve){var ke=ve.node,je=ke.scratch().cola,qe=je.index;Be.push({node:qe,offset:ve.offset?ve.offset:0})}),Se.push({type:"alignment",axis:"x",offsets:Be})})}if(L.alignment.horizontal){var ye=L.alignment.horizontal;ye.forEach(function(Ce){var Be=[];Ce.forEach(function(ve){var ke=ve.node,je=ke.scratch().cola,qe=je.index;Be.push({node:qe,offset:ve.offset?ve.offset:0})}),Se.push({type:"alignment",axis:"y",offsets:Be})})}}L.gapInequalities&&L.gapInequalities.forEach(function(Ce){var Be=Ce.left.scratch().cola.index,ve=Ce.right.scratch().cola.index;Se.push({axis:Ce.axis,left:Be,right:ve,gap:Ce.gap,equality:Ce.equality})}),Se.length>0&&oe.constraints(Se),oe.groups(Y.map(function(Ce,Be){var ve=C(L.nodeSpacing,Ce),ke=function(pt){return parseFloat(Ce.style("padding-"+pt))},je=ke("left")+ve,qe=ke("right")+ve,Me=ke("top")+ve,ot=ke("bottom")+ve;return Ce.scratch().cola={index:Be,padding:Math.max(je,qe,Me,ot),leaves:Ce.children().intersection(V).map(function(dt){return dt[0].scratch().cola.index}),fixed:Ce.locked()},Ce}).map(function(Ce){return Ce.scratch().cola.groups=Ce.children().intersection(Y).map(function(Be){return Be.scratch().cola.index}),Ce.scratch().cola}));var we=void 0,Pe=void 0;L.edgeLength!=null?(we=L.edgeLength,Pe="linkDistance"):L.edgeSymDiffLength!=null?(we=L.edgeSymDiffLength,Pe="symmetricDiffLinkLengths"):L.edgeJaccardLength!=null?(we=L.edgeJaccardLength,Pe="jaccardLinkLengths"):(we=100,Pe="linkDistance");var Fe=function(Be){return Be.calcLength};if(oe.links(F.stdFilter(function(Ce){return V.contains(Ce.source())&&V.contains(Ce.target())}).map(function(Ce){var Be=Ce.scratch().cola={source:Ce.source()[0].scratch().cola.index,target:Ce.target()[0].scratch().cola.index};return we!=null&&(Be.calcLength=C(we,Ce)),Be})),oe.size([U.w,U.h]),we!=null&&oe[Pe](Fe),L.flow){var Ue=void 0,He="y",De=50;w(L.flow)?Ue={axis:L.flow,minSeparation:De}:_(L.flow)?Ue={axis:He,minSeparation:L.flow}:E(L.flow)?(Ue=L.flow,Ue.axis=Ue.axis||He,Ue.minSeparation=Ue.minSeparation!=null?Ue.minSeparation:De):Ue={axis:He,minSeparation:De},oe.flowLayout(Ue.axis,Ue.minSeparation)}return A.trigger({type:"layoutstart",layout:A}),oe.avoidOverlaps(L.avoidOverlap).handleDisconnected(L.handleDisconnected).start(L.unconstrIter,L.userConstIter,L.allConstIter,void 0,void 0,L.centerGraph),L.infinite||setTimeout(function(){A.manuallyStopped||oe.stop()},L.maxSimulationTime),this},P.prototype.stop=function(){return this.adaptor&&(this.manuallyStopped=!0,this.adaptor.stop()),this},a.exports=P},function(a,u,c){a.exports=Object.assign!=null?Object.assign.bind(Object):function(l){for(var h=arguments.length,v=Array(h>1?h-1:0),p=1;p<h;p++)v[p-1]=arguments[p];return v.filter(function(g){return g!=null}).forEach(function(g){Object.keys(g).forEach(function(w){return l[w]=g[w]})}),l}},function(a,u,c){var l={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(v){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};a.exports=l},function(a,u,c){var l=c(0),h=function(p){p&&p("layout","cola",l)};typeof cytoscape<"u"&&h(cytoscape),a.exports=h},function(a,u,c){var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},h=void 0;(typeof window>"u"?"undefined":l(window))!=="undefined"?h=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(v){return setTimeout(v,16)}:h=function(p){p()},a.exports=h},function(a,u){a.exports=i}])})})(hX);var R2e=hX.exports;const I2e=Lb(R2e);var BX={exports:{}},l3={exports:{}},qX;function C2e(){return qX||(qX=1,function(r){(function(){var t;typeof window<"u"?(t=window,t.document):t={Array:function(){}};function i(){}function a(){}function u(){}function c(){}function l(){}function h(){}function v(){}function p(){}function g(){}function w(){}function _(){}function E(){}function k(){}function I(){}function C(){}function P(){}function A(){}function L(){}function O(){}function M(){}function B(){}function F(){}function q(){}function $(){}function Y(){}function V(){}function U(){}function G(){}function X(){}function ne(){}function ae(){}function oe(){}function le(){}function pe(){}function ge(){}function de(){}function Se(){}function Ne(){}function ye(){}function we(){}function Pe(){}function Fe(){}function Ue(){}function He(){}function De(){}function Ce(){}function Be(){}function ve(){}function ke(){}function je(){}function qe(){}function Me(){}function ot(){}function dt(){}function pt(){}function Lt(){}function ut(){}function $t(){}function Yt(){}function fn(){}function Yn(){}function he(){}function J(){}function te(){}function be(){}function Le(){}function Te(){}function ue(){}function $e(){}function Ze(){}function et(){}function it(){}function St(){}function bt(){}function tn(){}function Wt(){}function cn(){}function Wn(){}function Fn(){}function Qt(){}function Kn(){}function me(){}function Ie(){}function _t(){}function kt(){}function Ot(){}function lr(){}function xr(){}function Zi(){}function is(){}function xi(){}function ou(){}function Ro(){}function _c(){}function nl(){}function uu(){}function Aa(){}function Li(){}function Ni(){}function ks(){}function Io(){}function Nm(){}function zE(){}function VE(){}function UE(){}function YE(){}function Up(){}function WE(){}function KE(){}function Yp(){}function sy(){}function Wp(){}function Om(){}function Dm(){}function Mm(){}function cu(){}function oy(){}function jm(){}function Qd(){}function lu(){}function XE(){}function Bm(){}function uy(){}function vee(){Aie()}function ZIe(){j3e()}function pee(){Joe()}function gee(){Wie()}function bee(){ZB()}function yee(){Qte()}function mee(){Zte()}function wee(){xne()}function _ee(){kae()}function xee(){Rie()}function Eee(){Due()}function kee(){Iie()}function See(){Cie()}function Tee(){Tce()}function Ree(){mq()}function lf(){Zk(this)}function Iee(){}function Xe(){Vk(this)}function JE(){}function Cee(e){this.a=e}function Aee(e){this.a=e}function qm(e){this.a=e}function Pee(e){this.a=e}function Lee(e){this.a=e}function Nee(e){this.a=e}function Oee(e){this.a=e}function QE(e){this.a=e}function Dee(e){this.a=e}function ZE(e){this.b=e}function e4(e){this.a=e}function Mee(e){this.a=e}function jee(e){this.a=e}function Bee(e){this.a=e}function qee(e){this.a=e}function Fee(e){this.a=e}function $ee(e){this.a=e}function Gee(e){this.a=e}function t4(e){this.a=e}function ek(e){this.a=e}function tk(e){this.a=e}function Hee(e){this.a=e}function zee(e){this.a=e}function n4(e){this.a=e}function Fm(e){this.a=e}function nk(e){this.e=e}function Kp(e){this.a=e}function Vee(e){this.a=e}function Zd(e){this.a=e}function r4(e){this.a=e}function Uee(e){this.a=e}function Yee(e){this.a=e}function rk(e){this.a=e}function Wee(e){this.a=e}function Kee(e){this.a=e}function Xee(e){this.a=e}function Jee(e){this.a=e}function Qee(e){this.a=e}function Zee(e){this.a=e}function Xp(e){this.a=e}function ete(e){this.a=e}function tte(e){this.a=e}function nte(e){this.a=e}function rte(e){this.a=e}function ite(e){this.a=e}function ate(e){this.a=e}function ste(e){this.a=e}function ote(e){this.c=e}function i4(e){this.a=e}function ute(e){this.a=e}function cte(e){this.a=e}function lte(e){this.a=e}function fte(e){this.a=e}function hte(e){this.a=e}function a4(e){this.a=e}function dte(e){this.a=e}function gn(e){this.a=e}function xc(e){this.a=e}function ev(e){this.d=e}function pn(e){this.a=e}function mn(e){this.a=e}function cy(e){this.a=e}function ly(e){this.a=e}function s4(e){this.b=e}function $m(e){this.a=e}function Gm(e){this.a=e}function W(e){this.c=e}function zs(e){this.a=e}function vte(e){this.a=e}function pte(e){this.a=e}function fy(e){this.b=e}function Jp(e){this.b=e}function o4(e){this.c=e}function u4(e){this.a=e}function c4(e){this.a=e}function Hm(e){this.a=e}function l4(){this.a=[]}function f4(e){this.a=e}function ik(e){this.a=e}function gte(e){e.b=e.a}function bte(e){e.c=e.d.d}function Ss(e,n){e.g=n}function h4(e,n){e.k=n}function eCe(e,n){e.a=n}function tCe(e,n){e.b=n}function nCe(e,n){e.e.k=n}function rCe(e){return e.a}function iCe(e){return e.a}function aCe(e){return e.a}function sCe(e){return e.a}function oCe(e){return e.a}function uCe(){return null}function cCe(){return null}function ak(){this.c=this}function d4(){Zk(this)}function ln(){Ws(this)}function yte(e){xMe(this,e)}function lCe(e){mre(),c4e(e)}function mte(e){e.a=new pi}function hy(e,n){e.a=n-e.a}function dy(e,n){e.b=n-e.b}function tv(){tv=a}function sk(){sk=a}function fCe(){throw new fr}function hCe(){throw new fr}function dCe(){throw new fr}function vCe(){throw new fr}function pCe(){throw new fr}function gCe(){throw new fr}function bCe(){throw new fr}function yCe(){throw new fr}function mCe(){throw new fr}function wte(){this.a=new Xe}function _te(){this.a=new Xe}function xte(){this.a=new Xe}function Ete(){this.a=new Xe}function ok(){this.a=new Xe}function Ih(){this.a=new Up}function Qp(){this.a=new ise}function kte(){this.b=new Xe}function ea(){pi.call(this)}function Ste(){Ok.call(this)}function v4(){Iee.call(this)}function zm(){Iee.call(this)}function p4(){Xe.call(this)}function Tte(){lf.call(this)}function Zp(){lf.call(this)}function g4(){lf.call(this)}function Rte(){lf.call(this)}function vy(){lf.call(this)}function eg(){lf.call(this)}function fr(){lf.call(this)}function b4(){this.f=new Xe}function Ite(){this.d=new Xe}function Cte(){this.a=new ci}function Ate(){throw new fr}function Pte(){throw new fr}function Lte(){throw new fr}function Nte(){throw new fr}function wCe(){throw new fr}function y4(){this.a=new Xe}function m4(){m4=a,B_=new u}function $n(){$n=a}function py(){py=a,fR=new c}function Ote(){Ote=a,nhe=new p}function Dte(){Dte=a,rhe=new hae}function w4(){w4=a,Q6=new h}function Mte(){Mte=a,ohe=new k}function _4(){_4=a,hde=new $}function jte(){jte=a,dde=new G}function x4(e){return Gu(e),e}function E4(e){Or(),this.a=e}function k4(e){os(),this.a=e}function Bte(e){os(),this.a=e}function qte(e){os(),this.a=e}function Fte(e,n){e.i=n,n.f=e}function _Ce(e,n){Dn(e.b,n)}function tg(){lf.call(this)}function $te(){lf.call(this)}function Ga(){lf.call(this)}function Gte(){Eae.call(this)}function Hte(){Eae.call(this)}function zte(){g4.call(this)}function Vte(){Zp.call(this)}function Bu(e){une.call(this,e)}function xCe(e){nie.call(this,e)}function ECe(e){nie.call(this,e)}function S4(e){zre.call(this,e)}function Ute(e){wie.call(this,e)}function T4(e){Pae.call(this,e)}function R4(e){B4.call(this,e)}function gy(e){ag.call(this,e)}function I4(e){zre.call(this,e)}function kCe(e,n){e.a.W().nb(n)}function Co(e,n){return e===n}function uk(e){return e?e.a:0}function fu(e){return e?e.d:0}function ck(e){return e?e.j:0}function Yte(e){Bu.call(this,e)}function Vm(e){Bu.call(this,e)}function so(e){Bu.call(this,e)}function lk(e){so.call(this,e)}function Ch(){tk.call(this,{})}function Wte(e){yte.call(this,e)}function Kte(e){yte.call(this,e)}function SCe(e,n,s){bNe(e,n.b,s)}function TCe(e,n,s){zPe(e.c,n,s)}function RCe(e,n,s){e.b.Fc(n,s)}function C4(e){rte.call(this,e)}function fk(e){rte.call(this,e)}function Xte(){this.a=(ur(),go)}function Jte(){this.a=(ur(),go)}function ci(){this.a=new ln}function A4(){this.a=new Wne}function P4(){P4=a,NF=new X}function Qte(){Qte=a,xde=new Ne}function Zte(){Zte=a,Tde=new $e}function Kt(e){return jn(),e}function ze(e){return Rr(e),e}function ICe(e){une.call(this,e)}function Ao(e){Bu.call(this,e)}function Rn(e){Bu.call(this,e)}function Um(e){this.c=bv(Dt(e))}function li(){this.a=0,this.b=0}function pi(){Nre(this),Fu(this)}function ene(){uR==null&&(uR=[])}function Ym(e){e.b=null,e.c=0}function CCe(e,n){return e.b=n,e}function tne(e,n){return e.c=n,e}function hk(e,n){return e.f=n,e}function nne(e,n){return e.g=n,e}function rne(e,n){return e.a=n,e}function ine(e,n){return e.f=n,e}function ACe(e,n){return e.k=n,e}function PCe(e,n){return e.e-n.e}function LCe(e,n){return e.d-n.d}function NCe(e){return e<0?-e:e}function ane(e){return isNaN(e)}function OCe(e){return new ek(e)}function DCe(e){return new mf(e)}function sne(e){Bu.call(this,e)}function rl(e){Bu.call(this,e)}function one(e){Bu.call(this,e)}function by(e){Bu.call(this,e)}function nv(e){Bu.call(this,e)}function une(e){this.f=e,Zk(this)}function cne(){this.b=0,this.a=0}function ng(){ng=a}function lne(){lne=a,vpe=KDe()}function MCe(e,n,s){e.set(n,s)}function jCe(e,n,s){e.set(n,s)}function fne(e,n){Eg(),G6.dc(e,n)}function Ee(e,n){return Mae(e,n)}function hne(e,n){return e.a.B(n)}function rv(e,n){return e.g[n.e]}function dk(e,n){return e.i[n.e]}function vk(e,n){return e.j[n.e]}function iv(e,n){return e.n[n.e]}function av(e,n){return e.o[n.e]}function BCe(e,n){return n in e.a}function qCe(e,n){return e.b-n.b}function FCe(e,n){return e.d-n.d}function $Ce(e,n){return e.i-n.i}function rt(e,n){return e>n?e:n}function dne(e,n){return e>n?e:n}function Ei(e,n){return e>n?e:n}function wn(e,n){return e<n?e:n}function GCe(e,n){return e<n?e:n}function il(e,n){return e<n?e:n}function al(e){return!!e&&e.b}function vne(e){ZAe(e,e.length)}function HCe(e){cPe(e,e.length)}function yy(e){lPe(e,e.length)}function zCe(e){Ao.call(this,e)}function rg(e){a4.call(this,e)}function VCe(e){ute.call(this,e)}function Wm(e){Rn.call(this,e)}function Ah(e){fy.call(this,e)}function pne(e){Ah.call(this,e)}function L4(e){bw.call(this,e)}function ig(){a4.call(this,"")}function pk(){a4.call(this,"")}function Km(e){return Dh(e),e.n}function gne(e){return Dh(e),e.j}function ga(e){return e.e&&e.e()}function bne(e,n){return e.a.sb(n)}function UCe(e,n){return e||Dt(n)}function yne(e,n){return ee(e.a,n)}function mne(e,n){return JAe(e.a,n)}function YCe(e,n){return nT(e,n)<0}function Xm(e){return $n(),""+e}function wne(e){return e?e.d:null}function sl(e){os(),this.a=Dt(e)}function _ne(){_se(),this.g=new Y4}function xne(){xne=a,Rde=(ya(),Ju)}function WCe(){$_!=0&&($_=0),G_=-1}function my(e){return jMe(e,e.d),e}function sv(e,n){return e.a.d=n,e}function ov(e,n){return e.a.a=n,e}function uv(e,n){return e.a.c=n,e}function cv(e,n){return e.a.f=n,e}function Ene(e,n){return e.a.f=n,e}function N4(e,n){return e.a.b=n,e}function O4(e,n,s){e.splice(n,s)}function KCe(e,n){return j5(n,e)}function kne(e,n){return e.b.t(n)}function Sne(e,n){return e.c.t(n)}function ff(e,n){return e.a.R(n)}function D4(e,n){return e.get(n)}function gk(e,n){return e.get(n)}function XCe(e,n){return e.test(n)}function ki(e){return e<=0?0-e:e}function Tne(e){return $n(),""+e}function JCe(e){return $n(),""+e}function bk(e){this.a=new Pk(e)}function Rne(e){this.a=new s5(e)}function Ine(e){this.a=y(Dt(e),19)}function yk(e){this.b=y(Dt(e),57)}function Cne(e){this.d=y(Dt(e),56)}function In(e,n){this.d=e,this.e=n}function mk(e,n){this.b=e,this.a=n}function Ane(e,n){this.b=e,this.a=n}function M4(e,n){this.b=e,this.c=n}function j4(e,n){this.a=e,this.b=n}function wk(e,n){this.a=e,this.b=n}function Pne(e,n){this.a=e,this.f=n}function _k(e,n){In.call(this,e,n)}function Lne(e,n){In.call(this,e,n)}function Nne(e,n){In.call(this,e,n)}function One(e,n){this.b=e,this.c=n}function Dne(e,n){this.e=e,this.c=n}function QCe(e,n){this.a=e,this.b=n}function Mne(e,n){this.a=e,this.b=n}function jne(e,n){In.call(this,e,n)}function Bne(e,n){this.a=e,this.b=n}function qne(e){this.a=y(Dt(e),20)}function ag(e){this.a=y(Dt(e),20)}function Fne(e){this.a=y(Dt(e),57)}function B4(e){this.b=y(Dt(e),35)}function Rt(e,n){this.a=e,this.b=n}function jr(e,n){this.a=e,this.b=n}function sg(e,n){In.call(this,e,n)}function q4(e,n){return kv(e.b,n)}function ZCe(e){return rae(),e?she:ahe}function Ph(e){return e==ps||e==_a}function xk(e){return e==Xu||e==Su}function $ne(e,n){Br(e,n,e.a,e.a.a)}function Ek(e,n){Br(e,n,e.c.b,e.c)}function wy(e,n){In.call(this,e,n)}function Jm(e,n){In.call(this,e,n)}function Qm(e,n){In.call(this,e,n)}function og(e,n){In.call(this,e,n)}function kk(e,n){In.call(this,e,n)}function hf(e,n){In.call(this,e,n)}function _y(e,n){In.call(this,e,n)}function ug(e,n){In.call(this,e,n)}function Sk(e,n){In.call(this,e,n)}function xy(e,n){In.call(this,e,n)}function Zm(e,n){In.call(this,e,n)}function ew(e,n){In.call(this,e,n)}function Tk(e,n){In.call(this,e,n)}function Rk(e,n){In.call(this,e,n)}function F4(e,n){this.b=e,this.a=n}function lv(e,n){this.c=e,this.d=n}function $4(e,n){this.a=e,this.c=n}function Gne(e,n){this.e=e,this.c=n}function Hne(e,n){this.e=e,this.d=n}function tw(e,n){In.call(this,e,n)}function cg(e,n){In.call(this,e,n)}function zne(e,n){this.a=e,this.b=n}function Vne(e,n){this.a=e,this.b=n}function Ik(e,n){In.call(this,e,n)}function En(e,n){In.call(this,e,n)}function Lh(e,n){In.call(this,e,n)}function G4(e,n){In.call(this,e,n)}function lg(e,n){In.call(this,e,n)}function H4(e,n){In.call(this,e,n)}function Ck(e,n){In.call(this,e,n)}function z4(e,n){In.call(this,e,n)}function eAe(e,n){return Do(e.c,n)}function Ak(e){return e.b<e.d.Y()}function nw(e){return e.d.c+e.e.c}function Une(e,n){return e.c.ab(n)}function tAe(e,n){return e.b.kb(n)}function nAe(e,n){return e.b.lb(n)}function rAe(e,n){return e.b.pb(n)}function V4(e,n){return e.b.kb(n)}function Yne(e,n){return e.b.lb(n)}function iAe(e){return e==Pl||e==Xf}function aAe(e){return e==Pl||e==Kf}function hu(e){return e!=yo&&e!=Il}function sAe(e){return hs(e),e.d.Y()}function fv(e){this.c=e,zse(this)}function Pk(e){qoe.call(this,e,0)}function Wne(){s5.call(this,null)}function Ey(){ECe.call(this,new ln)}function Kne(){Nne.call(this,"KEY",0)}function Lk(e){_v(),wie.call(this,e)}function oAe(e){t.clearTimeout(e)}function Xne(e){return e.Vb(e.b.H())}function U4(e){this.a=y(Dt(e),144)}function Y4(){this.b=(Qn(),new ln)}function Nh(){Nh=a,bd=new XE}function Nk(){Nk=a,QI=new oy}function Jne(){Jne=a,dpe=new lu}function rw(){rw=a,Xfe=new Um(",")}function Qne(){Qne=a}function Ok(){Is.call(this,0,0,0,0)}function W4(e,n){In.call(this,e,n)}function ky(e,n){In.call(this,e,n)}function K4(e,n){In.call(this,e,n)}function X4(e,n){In.call(this,e,n)}function Zne(e){vv(),br.call(this,e)}function J4(e,n){In.call(this,e,n)}function ere(e,n){this.c=e,this.b=n}function tre(e,n){this.a=e,this.b=n}function nre(e,n){this.b=e,this.d=n}function Q4(e,n){In.call(this,e,n)}function fg(e,n){In.call(this,e,n)}function Dk(e,n){In.call(this,e,n)}function Sy(e,n){In.call(this,e,n)}function hg(e,n){In.call(this,e,n)}function ol(e,n){In.call(this,e,n)}function Mk(e,n){In.call(this,e,n)}function Z4(e,n){In.call(this,e,n)}function Ty(e,n){In.call(this,e,n)}function jk(e,n){In.call(this,e,n)}function Bk(e,n){In.call(this,e,n)}function qk(e,n){In.call(this,e,n)}function Ry(e,n,s){e.splice(n,0,s)}function Iy(e,n,s){e.g[n.e][n.e]=s}function rre(e,n){e.a=n,e.g=0,e.f=0}function qu(e){return e.a=0,e.b=0,e}function Pa(e){return aa(e.b.c,e,0)}function iw(e){return Math.ceil(e)}function ire(e){return Math.sqrt(e)}function are(e,n){return gk(e.a,n)}function Fk(e,n){return!!K5(e,n)}function $k(e,n){aPe(e,e.length,n)}function aw(e,n){In.call(this,e,n)}function sw(e,n){this.b=e,this.a=n}function ow(e,n){this.d=e,this.e=n}function sre(){sS(),this.c=new ci}function ore(){d_(),this.a=new ci}function ure(){return lne(),new vpe}function hv(e){if(!e)throw new Zp}function uw(e){if(!e)throw new vy}function cw(e){if(!e)throw new Ga}function cre(){this.b=(Qn(),new ln)}function lre(){this.b=(Qn(),new ln)}function hr(e){this.a=e.a,this.b=e.b}function ft(e){return e??null}function Oi(e){return e?e.zb():null}function fre(e,n){return e.Nb().sb(n)}function hre(e,n){return e.a.a.a.U(n)}function Gk(e,n){return XNe(e.mb(),n)}function uAe(e,n){return qr(n.b,e.b)}function cAe(e,n){return qr(n.k,e.k)}function eB(e){return Math.floor(e)}function df(e,n){return e.a+=""+n,e}function ul(e,n){return e.a+=""+n,e}function Vs(e,n){return e.a+=""+n,e}function lw(e){return Ay(e==null),e}function tB(e){return e.d&&RT(e),e.a}function Hk(e){return e.d&&RT(e),e.b}function zk(e){return e.d&&RT(e),e.c}function dre(e,n){return tt(e.a,n),n}function vre(e){Ws(this),hoe(this,e)}function pre(e){this.c=e,this.e=!1}function gre(){Lne.call(this,"OPEN",0)}function bre(){jne.call(this,"SIZE",0)}function lAe(){ute.call(this,"UTF-8")}function yre(){yre=a,_$={},Ex={}}function mre(){mre=a,ud=new xt(xfe,0)}function as(e){return Dt(e),new dv(e)}function Cy(e){return $n(),e.length}function fAe(e,n){return qLe(e.a,n.a)}function hAe(e,n){return Ire(e.a,n.a)}function wre(e,n){return e==n?0:e?1:-1}function _re(e){return fu(e.e)-fu(e.g)}function Ts(e){return new Rt(e.a,e.b)}function dAe(e){return new Rt(e.d,e.e)}function Vk(e){e.c=Ge(yt,st,1,0,4,1)}function xre(){Nne.call(this,"VALUE",1)}function nB(e){vB.call(this),this.a=e}function Ere(e){this.a=new ole,this.b=e}function dv(e){this.a=e,ak.call(this)}function kre(e){this.a=e,ak.call(this)}function Sre(){Qoe(),this.d=(Ic(),xx)}function vAe(e){if(!e)throw new Rte}function Oh(e){if(!e)throw new vy}function Tre(e){if(!e)throw new Zp}function Ay(e){if(!e)throw new Tte}function Ct(e){if(!e)throw new Ga}function ba(){f4.call(this,new mg)}function Rre(){Lne.call(this,"CLOSED",1)}function Po(e){Pae.call(this,new T4(e))}function rB(e,n){return++e.d,Vr(e,n)}function pAe(e,n){return uS(e.a,0,n)}function gAe(e,n){return qr(e.a,n.a)}function dg(e){return Bh(e.b.mb(),e.a)}function Lo(e){return aS(e.a.mb(),e.b)}function Uk(e,n){return n==e.c?e.d:e.c}function bAe(e,n){return e<n?-1:e>n?1:0}function Ire(e,n){return e<n?-1:e>n?1:0}function Yk(e){return e!=null?qo(e):0}function Cre(e){this.a=ure(),this.b=e}function Are(e){this.a=ure(),this.b=e}function Pre(e){this.a=e,AB.call(this,e)}function Lre(){aB(),this.b=new ete(this)}function No(){No=a,U6=kAe(new Um(", "))}function oo(){oo=a,Ns=new gre,F_=new Rre}function sr(){sr=a,ehe=new _,Y6=new E}function fw(){fw=a,hR=new Kne,W6=new xre}function hw(){hw=a,dR=new bre,X6=new Gre}function vv(){vv=a,lhe=new C,fhe=new P}function iB(e){e.g=new Xe,e.b=new Xe}function Nre(e){e.a=new Bm,e.c=new Bm}function aB(){aB=a,Dde=new ks,Ode=new Die}function Ore(){_k.call(this,"IS_NULL",2)}function Dre(){aw.call(this,"Head",1)}function Mre(){aw.call(this,"Tail",3)}function sB(e,n){N5.call(this,e,n,null)}function oB(e,n){Pv(e,0,e.length,n)}function Py(e,n){return tt(n.a,e.a),e.a}function Oo(e,n){return e.a*=n,e.b*=n,e}function jre(e,n){Or(),this.a=e,this.b=n}function yAe(e,n){return e.a[n.d.k][n.k]}function ss(e,n){return e.a[n.d.k][n.k]}function mAe(e,n){return SS(e.b,n.mc())}function Bre(e,n){return wne(cOe(e.a,n))}function qre(e,n){return wne(lOe(e.a,n))}function Zr(e,n){return y(ds(e.a,n),20)}function Qe(e,n){return e!=null&&yT(e,n)}function vf(e){return e.a<e.c.c.length}function dw(e){return e.a<e.c.a.length}function wAe(e,n){return qr(e.i.a,n.i.a)}function _Ae(e,n){return e.i.b=(Rr(n),n)}function xAe(e,n){return e.i.b=(Rr(n),n)}function Wk(e,n){return e.a.eb(n)!=null}function Kk(e,n,s){return e.g[n.e][s.e]}function Fre(e){return jn(),$n(),""+e}function $re(){aw.call(this,"Range",2)}function Gre(){jne.call(this,"DISTINCT",1)}function Hre(){_k.call(this,"NOT_NULL",3)}function Qn(){Qn=a,the=new Zre((No(),U6))}function zre(e){this.d=(_n(),new o4(e))}function uB(e,n){return tue(e,new ig,n).a}function vw(e,n){return n==null?e.b:aae(n)}function EAe(e){return e==null?null:e.name}function pv(e){return typeof e=="number"}function uo(e){return typeof e=="string"}function cB(e,n){return new oae(e,e.Y(),n)}function lB(e,n){return new yce(e.a,e.b,n)}function kAe(e){return Dt(Vu),new Nie(e,e)}function pf(e){return Mi(e,qf),new sa(e)}function Vre(e,n){this.a=n,B4.call(this,e)}function Ure(e,n){this.a=n,B4.call(this,e)}function Yre(e,n){this.a=e,yk.call(this,n)}function Wre(e){this.c=e,this.a=yMe(this.c)}function Us(e){var n;n=e.a,e.a=e.b,e.b=n}function SAe(e,n){e.e.j.a=n.a,e.e.j.b=n.b}function TAe(e,n,s){e.a=n^1502,e.b=s^sR}function Ha(e,n,s){return e.a+=n,e.b+=s,e}function RAe(e,n,s){return e.a-=n,e.b-=s,e}function Xk(e){return e.a=-e.a,e.b=-e.b,e}function Jk(e){return Ct(e.b!=0),e.a.a.c}function pw(e){return Ct(e.b!=0),e.c.b.c}function Kre(e,n){e.a&&(DB(n),Oae(n))}function gw(e,n,s){var f;f=e.ub(n),f.J(s)}function IAe(e,n){return bAe(n.Yb(),e.Yb())}function Qk(e){return y(ht(e.a,e.b),128)}function Xre(e){return bS(e.c,e.c.length)}function CAe(e){return e.l+e.m*Zh+e.h*kl}function Gi(e){return e==Uv||e==Vo||e==Ti}function La(e){return typeof e=="number"}function Do(e,n){return!!n&&e.b[n.e]==n}function fB(e,n){var s;s=e[Hf],n[Hf]=s}function Ly(e,n){so.call(this,e),this.b=n}function bw(e){fy.call(this,e),this.a=e}function hB(e){Jp.call(this,e),this.a=e}function dB(e){Ah.call(this,e),this.a=e}function Jre(e){f4.call(this,new Ose(e))}function Ny(e){this.a=e,s4.call(this,e)}function Qre(e){this.c=e,this.a=1,this.b=1}function Zre(e){this.a=e,this.b=bv(Dt("="))}function eie(){this.a=new pi,this.e=new pi}function tie(){this.a=new _te,this.c=new de}function vB(){this.i=new li,this.j=new li}function nie(e){hv(e.d.c+e.e.c==0),this.b=e}function Zk(e){return e.g=null,fne(e,e.f),e}function pB(e){return sr(),Dt(e),new mie(e)}function rie(e){return Eg(),parseInt(e)||-1}function iie(e,n){return qy(e.a,n)!=null}function Oy(e,n){return!VNe(e,n)&&!boe(e,n)}function Ec(e){return e.$H||(e.$H=++QBe)}function AAe(e){return e.d!=null?e.d:""+e.e}function yw(e){return e.d!=null?e.d:""+e.e}function eS(e){return e.b=y(PPe(e.a),21)}function gv(e){return typeof e=="boolean"}function aie(e){e.b=new oie(e),e.c=new ln}function sie(){this.a=new Xe,this.d=new Xe}function oie(e){NB.call(this,e,null,null)}function uie(e,n,s,f){GB.call(this,e,n,s,f)}function cie(e,n,s,f){NS.call(this,e,n,s,f)}function Mo(e,n,s,f){NS.call(this,e,n,s,f)}function gB(e,n,s){Vy.call(this,e,n,s,null)}function bB(e,n,s){Vy.call(this,e,n,s,null)}function yB(e,n,s){e.i=n,n.f=e,n.i=s,s.f=n}function mB(e,n){mte(this),this.e=e,this.f=n}function PAe(e,n){this.d=e,bte(this),this.b=n}function tS(e){Nre(this),Fu(this),Na(this,e)}function Zt(e){return Ay(e==null||gv(e)),e}function nn(e){return Ay(e==null||pv(e)),e}function bv(e){return Ay(e==null||uo(e)),e}function On(e,n){return e.a+=n.a,e.b+=n.b,e}function kc(e,n){return e.a-=n.a,e.b-=n.b,e}function LAe(e,n){return e.i.a=(Rr(n),n+10)}function NAe(e,n){return e.i.a=(Rr(n),n+10)}function gf(e,n){return y(bn(e.k,n),24).a}function OAe(e,n){return oDe(e,n),new zae(e,n)}function wB(e,n){return y(e.b.sb(n),92).a}function lie(e){return y(e,7).b.c.length!=0}function fie(e){return y(e,7).e.c.length!=0}function hie(e){return e.d?aa(e.d.a,e,0):-1}function DAe(e){return e==null?null:e.message}function Dh(e){e.n==null&&QMe(e)}function MAe(e,n,s,f){return dse(e,n,s,f),e}function jAe(e,n){return $n(),e.indexOf(n)}function an(e,n){if(!n)throw new eg;e.g=n}function _B(e){if(e.e.c!=e.b)throw new tg}function mw(e){if(e.f.c!=e.b)throw new tg}function BAe(e,n){return Dt(e),Dt(n),j5(e,n)}function bf(e,n){this.a=e,this.c=n,this.b=2}function ww(){mte(this),this.e=-1,this.f=!0}function nS(){xCe.call(this,new ln),this.a=3}function die(e){NS.call(this,e.d,e.b,e.a,e.c)}function xB(e){NS.call(this,e.d,e.b,e.a,e.c)}function vie(e){nq.call(this,e),this.c=new Xe}function pie(){_k.call(this,"ALWAYS_TRUE",0)}function gie(){_k.call(this,"ALWAYS_FALSE",1)}function bie(e){Qle(),this.a=new nS,poe(this,e)}function qAe(e){return!e.e&&(e.e=new Xe),e.e}function EB(e){var n;return n=new WE,n.e=e,n}function rS(e){var n;n=e[Hf]|0,e[Hf]=n+1}function Sc(e,n){e.a.rb(e.b,n),++e.b,e.c=-1}function kB(e,n){Oh(e.c!=-1),e.a.wb(e.c,n)}function FAe(e,n){return jn(),e==n?0:e?1:-1}function iS(e,n,s){return e.g[n.e][s.e]*e.d}function $Ae(e,n,s){return e.apply(n,s)}function SB(e,n,s){return rPe(e,y(n,17),s)}function GAe(e,n){return n==(Ye(),vt)?e.c:e.d}function yie(e,n){return n!=null&&e.Nb().kb(n)}function HAe(e,n){this.e=n,this.f=e,Zk(this)}function mie(e){this.b=e,this.a=(sr(),sr(),Y6)}function wie(e){os(),this.a=(_n(),new Ah(e))}function os(){os=a,new k4((_n(),_n(),ql))}function _ie(){_ie=a,Fde=Hi(new Zn,(Kr(),nI))}function Dy(e){QNe.call(this,e,(T5(),w$))}function cl(e){Vk(this),LB(this.c,0,e.ob())}function xie(e,n,s){this.b=e,this.a=n,this.c=s}function TB(e,n,s){lv.call(this,e,n),this.b=s}function _w(e,n,s){this.b=e,this.a=n,this.c=s}function RB(e,n){var s;return s=e.e,e.e=n,s}function Eie(e){Ws(e.c),e.b.b=e.b,e.b.a=e.b}function xw(e){e.b?xw(e.b):Cn(e.f.b,e.e,e.d)}function IB(e){return Ct(e.b!=0),$u(e,e.a.a)}function zAe(e){return Ct(e.b!=0),$u(e,e.c.b)}function aS(e,n){return sr(),Dt(n),new Vre(e,n)}function VAe(e,n){return Qn(),new Ure(e.mb(),n)}function kie(e,n){return $n(),e.charCodeAt(n)}function vg(e,n,s){return $n(),e.substr(n,s)}function UAe(e){return $n(),e==null?Vu:Ya(e)}function My(e,n,s){return Kk(e,n.g,s.g)*e.d}function ll(e,n,s){return{l:e,m:n,h:s}}function Tc(e,n){return kg(e,new lv(n.a,n.b))}function Sie(e,n,s,f,d){e.d=n,e.e=s,e.c=f,e.b=d}function us(e,n,s,f,d){e.b=n,e.c=s,e.d=f,e.a=d}function kn(e,n){return Br(e,n,e.c.b,e.c),!0}function tt(e,n){return e.c[e.c.length]=n,!0}function xt(e,n){vv(),br.call(this,e),this.a=n}function Tie(){_ie(),this.e=new pi,this.d=new pi}function Mh(){Mh=a,hpe=new Mm,g$=new Mm}function Rie(){Rie=a,rve=jy(new Zn,(Kr(),Vg))}function Iie(){Iie=a,sve=jy(new Zn,(Kr(),Vg))}function Cie(){Cie=a,cve=jy(new Zn,(Kr(),Vg))}function sS(){sS=a,lve=jy(new Zn,(Kr(),Vg))}function Aie(){Aie=a,Error.stackTraceLimit=64}function CB(){us(this,!1,!1,!1,!1)}function Ew(e){var n;return n=new Xe,US(n,e),n}function za(e){var n;return n=new pi,$5(n,e),n}function kw(e){var n;return n=new Zn,Ur(n,e),n}function YAe(e){var n;return n=new Om,n.a=e,n}function y(e,n){return Ay(e==null||yT(e,n)),e}function Sw(e,n){if(e<0||e>=n)throw new zte}function co(e,n){return Dt(e),Dt(n),new Bie(e,n)}function du(e,n){return Dt(e),Dt(n),new qie(e,n)}function WAe(e,n){return $n(),e.lastIndexOf(n)}function oS(e,n,s){return e<n?s<=e:e<=s||e==n}function Pie(e,n,s){this.d=e,this.b=s,this.a=n}function Si(e,n,s){this.a=e,this.b=n,this.c=s}function Lie(e,n,s){this.a=e,this.b=n,this.c=s}function Nie(e,n){this.a=e,this.b=Vu,this.c=n.c}function Oie(e){this.c=e.c,this.a=e.e,this.b=e.b}function AB(e){this.d=e,bte(this),this.b=oPe(e.d)}function Die(){PB.call(this),this.a=new tte(this)}function PB(){this.c=new A,this.d=new wae(this)}function KAe(e){var n;return n=new ci,US(n,e),n}function Mie(e){lo(e.a),Pse(e.c,e.b),e.b=null}function jie(e){return e.c-y(ht(e.a,e.b),128).b}function XAe(e,n){return e.c<n.c?-1:e.c==n.c?0:1}function JAe(e,n){return Ph(e.b.d)?n.xc():n.wc()}function uS(e,n,s){return $n(),e.substr(n,s-n)}function LB(e,n,s){_T(s,0,e,n,s.length,!1)}function NB(e,n,s){this.c=e,ow.call(this,n,s)}function Bie(e,n){this.b=e,this.a=n,ak.call(this)}function qie(e,n){this.a=e,this.b=n,ak.call(this)}function Fie(e,n){this.b=e,this.a=n,Mi(n,"count")}function cS(e){this.b=e,this.a=wf(this.b.a).Kb()}function br(e){vv(),this.c=lhe,this.d=fhe,this.b=e}function $ie(e,n,s){ere.call(this,e,n),this.a=s}function Gie(e,n,s){ere.call(this,e,n),this.a=s}function ht(e,n){return Gn(n,e.c.length),e.c[n]}function Hi(e,n){return y(ht(e.a,5),18).ib(n),e}function fl(e,n){return y(ht(e.a,0),18).ib(n),e}function Tw(e,n){return y(ht(e.a,1),18).ib(n),e}function zi(e,n){return y(ht(e.a,2),18).ib(n),e}function cs(e,n){return y(ht(e.a,3),18).ib(n),e}function jy(e,n){return y(ht(e.a,4),18).ib(n),e}function QAe(e){return xu(e,(ur(),ps)),e.e=!0,e}function OB(e){Eg();var n;return n=G6.ec(e),hDe(n)}function Rw(e,n){var s;return s=wS(e,n),s.g=2,s}function ZAe(e,n){var s;for(s=0;s<n;++s)e[s]=0}function Hie(e,n){e.b=n.b,e.c=n.c,e.d=n.d,e.a=n.a}function DB(e){e.a.b=e.b,e.b.a=e.a,e.a=e.b=null}function zie(e){return e.b.c.length+e.e.c.length}function lS(e){return Array.isArray(e)&&e.ad===i}function Vie(e,n){return sr(),Doe(new W(e),n)!=-1}function fS(e,n,s,f,d,b){return Yue(e,n,s,f,d,0,b)}function Iw(e,n,s){vv(),Gw.call(this,e.b,n,s,e.d)}function Cw(e,n){vv(),Gw.call(this,e.b,n,e.c,e.d)}function yf(e,n,s){If(n,e.c.length),Ry(e.c,n,s)}function Uie(e,n){return Gn(n,e.a.length),e.a[n]}function ePe(e){e.sort(function(n,s){return n-s})}function Dt(e){if(e==null)throw new eg;return e}function mf(e){if(e==null)throw new eg;this.a=e}function Aw(e,n,s){if(e.a!=n)throw new tg;e.a=s}function MB(e,n){if(!e)throw new Rn(($n(),n))}function jB(e,n){if(!e)throw new sne(($n(),n))}function Rr(e){if(e==null)throw new eg;return e}function hS(e){f4.call(this,new mg),Na(this,e)}function BB(e){this.a=new Pk(e.Y()),Na(this,e)}function Pw(e){this.c=e,this.a=new fv(this.c.a)}function Rc(e){Or(),this.a=(_n(),new pte(Dt(e)))}function jn(){jn=a,er=(jn(),!1),Ii=!0}function Yie(){Yie=a,p$=Ge(cR,Xr,24,256,0,1)}function Wie(){Wie=a,$de=Hi(fl(new Zn,(Kr(),XR)),nI)}function dS(){dS=a,vde=new O,gde=new PB,pde=new M}function Kie(e){return e!=null&&mS(e)&&e.ad!==i}function vS(e){return!Array.isArray(e)&&e.ad===i}function jh(e,n){return uo(n)?yae(e,n):NT(e.d,n)}function qB(e,n){return Qe(n,17)&&Do(e,y(n,17))}function Xie(e,n){return Qe(n,17)&&INe(e,y(n,17))}function tPe(e,n){return gk(e.a,n)!==void 0}function dn(e,n){var s;return s=s_(e),Jy(s,n),s}function nPe(e,n){return!e&&(e=[]),e[e.length]=n,e}function rPe(e,n,s){return ji(e.a,n),yS(e,n.e,s)}function iPe(e,n,s){return $n(),e.lastIndexOf(n,s)}function Jie(e,n,s){if(!e)throw new Rn($3e(n,s))}function aPe(e,n,s){var f;for(f=0;f<n;++f)e[f]=s}function yv(e,n){var s;return s=e.a.Y(),DS(n,s),s-n}function pS(e){var n;return n=e.i,n||(e.i=e.T())}function FB(e){var n;return n=e.c,n||(e.c=e.gb())}function Qie(e){var n;return n=e.c,n||(e.c=e.Jb())}function wf(e){return e.e?e.e:e.e=e.Ob()}function Zie(e){return e.f?e.f:e.f=e.Pb()}function sPe(e,n){return ll(e.l&n.l,e.m&n.m,e.h&n.h)}function eae(e,n){return qr((Rr(e),e),(Rr(n),n))}function oPe(e){return Qe(e,20)?y(e,20).tb():e.mb()}function Lw(e){for(sr(),Dt(e);e.G();)e.H(),e.I()}function $B(e){var n;for(n=e;n.g;)n=n.g;return n}function uPe(e){return e.b.i.a+=e.a.f*(e.a.a-1),null}function pg(e){Oh(e.b!=-1),e.c.vb(e.a=e.b),e.b=-1}function tae(e){return Ct(e.b>0),e.a.sb(e.c=--e.b)}function Nw(e){e.b?Nw(e.b):e.d.V()&&jh(e.f.b,e.e)}function mv(e){if(hs(e.d),e.d.d!=e.c)throw new tg}function gS(e,n){if(n[Hf]!=e[Hf])throw new tg}function Bh(e,n){return sr(),Dt(e),Dt(n),new Ane(e,n)}function nae(e,n){Or(),QCe.call(this,e,n_(new zs(n)))}function GB(e,n,s,f){this.a=e,Vy.call(this,e,n,s,f)}function _f(e){this.a=Math.cos(e),this.b=Math.sin(e)}function vu(e,n,s){so.call(this,e),this.b=n,this.a=s}function HB(e){this.b=new Xe,this.a=new Xe,this.c=e}function xf(e){this.c=new li,this.a=new Xe,this.b=e}function rae(){rae=a,ahe=new t4(!1),she=new t4(!0)}function hl(e,n){return++e.d,e.c[e.c.length]=n,!0}function By(e,n){Br(e.d,n,e.b.b,e.b),++e.a,e.c=null}function Dn(e,n){var s;return s=e.a.db(n,e),s==null}function bS(e,n){var s;return s=e.slice(0,n),Uy(s,e)}function ta(e,n){var s;return s=new Array(n),Uy(s,e)}function yS(e,n,s){var f;return f=e.b[n],e.b[n]=s,f}function cPe(e,n){var s;for(s=0;s<n;++s)e[s]=null}function lPe(e,n){var s;for(s=0;s<n;++s)e[s]=!1}function fPe(e,n){return jn(),y(n.b,24).a<e?Ii:er}function hPe(e,n){return jn(),y(n.a,24).a<e?Ii:er}function dPe(e,n){return y(Qie(wf(e.a)).sb(n),21).yb()}function iae(e){return Qn(),aS(QPe(e.a).mb(),(fw(),hR))}function Xt(e){return sr(),new Po(Lo(du(e.a,new w)))}function mS(e){return typeof e===I_||typeof e===sfe}function vPe(e){t.setTimeout(function(){throw e},0)}function pPe(e,n){return e>0?new mB(e-1,n):new mB(e,n)}function aae(e){return Dt(e),Qe(e,345)?y(e,345):Ya(e)}function zB(e,n){return Moe(e.a,n,(jn(),er))==null}function VB(e,n){var s;return s=e.a.Y(),tLe(n,s),s-1-n}function sae(e,n,s){var f;return f=dl(e,n),zLe(e,n,s),f}function re(e,n,s){var f;return f=wS(e,n),Wse(s,f),f}function wS(e,n){var s;return s=new W5,s.i=e,s.d=n,s}function oae(e,n,s){this.a=e,DS(s,n),this.c=n,this.b=s}function Rs(e,n,s){return vAe(s==null||$Me(e,s)),e[n]=s}function UB(e){e.a=null,e.e=null,Ws(e.b),e.d=0,++e.c}function gPe(e){Rn.call(this,($n(),e??Vu))}function bPe(e){Rn.call(this,($n(),e??Vu))}function qh(e){var n;return n=e.f,n||(e.f=new U4(e))}function YB(e){var n;return n=e.k,n||(e.k=new Lee(e))}function uae(e){var n;return n=e.e,n||(e.e=new Fne(e))}function wv(e){var n;return n=e.e,!n&&(e.e=n=e.gb()),n}function _S(e){var n,s;return n=e.c.f.d,s=e.d.f.d,n==s}function WB(e,n){var s;return s=new zy(e),P5(s,n),s}function gg(e,n){return e.a+=String.fromCharCode(n),e}function na(e){return!e.a&&e.d?e.d.b:e.a}function xS(e){return La(e)?e|0:e.l|e.m<<22}function yPe(e){return Mi(e,k6),Sv(Yr(Yr(5,e),e/10|0))}function bn(e,n){return uo(n)?qw(e,n):Oi(Di(e.d,n))}function Fh(e){return Qe(e,19)?y(e,19).Y():jS(e.mb())}function KB(e){return e?new BB((No(),e)):KAe(null.mb())}function $h(e,n){return ft(e)===ft(n)||e!=null&&ho(e,n)}function cae(e,n){return P4(),qr(ze(nn(e)),ze(nn(n)))}function lae(e){return Qn(),aS(e.a.bb().mb(),(fw(),W6))}function Or(){Or=a,os(),R0=new mr((_n(),_n(),ql))}function _v(){_v=a,os(),Fg=new Lk((_n(),_n(),JI))}function fae(e,n){if(e==null)throw new by(($n(),n))}function mPe(e,n){return mq(),(e-n<=0?0-(e-n):e-n)<.2}function wPe(e,n){return e.i.b<n.i.b?-1:e.i.b==n.i.b?0:1}function jo(e,n,s,f){e.g[n.e][s.e]=f,e.g[s.e][n.e]=f}function lo(e){Oh(e.c!=-1),e.d.vb(e.c),e.b=e.c,e.c=-1}function ES(e){this.c=e,this.b=e.a.b.a,fB(e.a.c,this)}function kS(e){Zq.call(this,new zs(e)),this.a=new li}function hae(){S4.call(this,new I4(new ln)),this.a=this}function dae(){jse(),this.b=(Qn(),new ln),this.a=new ln}function _Pe(){return fw(),xe(Ee(K6,1),nt,188,0,[hR,W6])}function xPe(){return oo(),xe(Ee(V6,1),nt,159,0,[Ns,F_])}function EPe(){return hw(),xe(Ee(J6,1),nt,205,0,[dR,X6])}function vae(e){Dw(e.a),e.b=Ge(yt,st,1,e.b.length,4,1)}function pae(e){return!e.b&&(e.b=new Ah(e.c.W())),e.b}function qy(e,n){var s;return s=new uy,zle(e,n,s),s.d}function Ow(e,n){var s;return s=wS("",e),s.k=n,s.g=1,s}function Dw(e){var n;for(n=e.mb();n.G();)n.H(),n.I()}function XB(e,n){return Qe(n,79)&&Co(e.b,y(n,79).mc())}function kPe(){return Vw(),xe(Ee(Ade,1),nt,175,0,[y7,rI])}function SPe(){return Bw(),xe(Ee(Bde,1),nt,193,0,[iI,S7])}function TPe(){return Gy(),xe(Ee(Jde,1),nt,192,0,[oI,sI])}function Cn(e,n,s){return uo(n)?Fw(e,n,s):Oa(e.d,n,s)}function RPe(e,n,s){e.i=0,e.e=0,n!=s&&koe(e,n,s)}function IPe(e,n,s){e.i=0,e.e=0,n!=s&&Eoe(e,n,s)}function JB(e,n,s,f){this.d=e,this.b=n,this.a=s,this.c=f}function Is(e,n,s,f){this.d=e,this.e=n,this.c=s,this.b=f}function Mw(e,n,s,f){this.a=e,this.c=n,this.b=s,this.d=f}function ra(e,n,s,f){In.call(this,e,n),this.a=s,this.b=f}function CPe(e,n){var s;return s=D4(e.a,n),s??[]}function SS(e,n){return $n(),e==n?0:e<n?-1:1}function APe(e,n){var s;return s=ENe(e.f,n),On(Xk(s),e.f.d)}function xv(e,n){return qB(e.a,n)?e.b[y(n,17).e]:null}function Va(e,n){return ft(e)===ft(n)||e!=null&&ho(e,n)}function Jn(e,n){if(n==null)throw new eg;return ZOe(e,n)}function gae(e){return Ay(e==null||mS(e)&&e.ad!==i),e}function ls(e){return!e.a&&(e.a=new pne(e.c.bb())),e.a}function bae(e){return!e.d&&(e.d=new fy(e.c.fb())),e.d}function Fu(e){e.a.a=e.c,e.c.b=e.a,e.a.b=e.c.a=null,e.b=0}function PPe(e){return Ct(e.b<e.d.Y()),e.d.sb(e.c=e.b++)}function yae(e,n){return n==null?NT(e.d,null):Ioe(e.e,n)}function mae(e,n){this.g=e,this.d=xe(Ee($r,1),oa,9,0,[n])}function wae(e){this.c=e,this.b=new Rne(y(Dt(new B),56))}function pu(){this.a=new ea,this.b=(Mi(3,qf),new sa(3))}function _ae(e,n){this.a=e,PAe.call(this,e,y(e.d,20).ub(n))}function jw(e,n,s,f){this.a=e,this.c=n,this.b=s,this.d=f}function TS(e,n,s){this.a=d6,this.d=e,this.b=n,this.c=s}function xae(){this.d=0,this.b=0,this.a=0,this.c=0}function Eae(){this.b=new ci,this.d=new pi,this.e=new y4}function _n(){_n=a,ql=new cu,b$=new jm,JI=new Qd}function QB(){QB=a,Qfe=new pie,Jfe=new gie,z6=new Ore,Zfe=new Hre}function Bw(){Bw=a,iI=new H4("GREEDY",0),S7=new H4(nR,1)}function ZB(){ZB=a,LF=new Cw((Ke(),dF),(jn(),jn(),Ii))}function kae(){kae=a,Zde=Hi(cs(zi(new Zn,(Kr(),ZR)),JR),QR)}function Ev(e,n){var s;return s=BS(n),y(bn(e.c,s),24).a}function LPe(e,n){var s;return s=Wk(e.a,n),s&&(n.f=null),s}function Sae(e){var n;return n=e.b.ob(),vse(n,n.length),n}function RS(e){return e<0?-1:e>0?1:0}function NPe(){return ya(),xe(Ee(NBe,1),nt,171,0,[H0,Yo,Ju])}function OPe(){return i_(),xe(Ee(_he,1),nt,166,0,[_R,oF,uF])}function DPe(){return Rv(),xe(Ee(Ohe,1),nt,149,0,[q0,AR,CR])}function MPe(){return MS(),xe(Ee(LBe,1),nt,225,0,[Cl,Jv,Al])}function jPe(){return r_(),xe(Ee(jBe,1),nt,221,0,[BF,qF,jF])}function BPe(){return Kw(),xe(Ee(Gde,1),nt,173,0,[aI,R7,T7])}function Tae(e,n){return Xy(sPe(La(e)?bl(e):e,La(n)?bl(n):n))}function qPe(e){return e.b==0?null:(Ct(e.b!=0),$u(e,e.a.a))}function e5(e){e.d=e.d-15,e.b=e.b-15,e.c=e.c+15,e.a=e.a+15}function t5(e){this.b=e,this.c=e,e.e=null,e.c=null,this.a=1}function Rae(e,n,s){this.d=e,this.b=new Xe,this.c=n,this.a=s}function IS(e,n){eCe(this,new Rt(e.a,e.b)),tCe(this,za(n))}function FPe(e,n){return n===e?!0:(hs(e),e.d.t(n))}function $Pe(e){return e==mo||e==Wo}function GPe(e){vf(new W(r0(e.e)))&&(gBe(e),b3e(e))}function Iae(e,n){var s;s=y(S5(e.e,n),116),s&&(e.d=!0)}function n5(e,n){var s;return s=e.b.pb(n),vse(s,e.b.Y()),s}function HPe(e){var n;return n=Vce(e,(Ye(),vt)),n+=Vce(e,lt),n}function zPe(e,n,s){l0(e,n,s,(Ye(),lt),e.f),l0(e,n,s,vt,e.n)}function An(e,n){e.f&&Vr(e.f.f,e),e.f=n,e.f&&tt(e.f.f,e)}function ei(e,n){e.d&&Vr(e.d.a,e),e.d=n,e.d&&tt(e.d.a,e)}function Bn(e,n){e.d&&Vr(e.d.b,e),e.d=n,e.d&&tt(e.d.b,e)}function nr(e,n){e.c&&Vr(e.c.e,e),e.c=n,e.c&&tt(e.c.e,e)}function CS(e){var n;return n=za(e.b),Na(n,e.c),Na(n,e.i),n}function VPe(){x$==256&&(_$=Ex,Ex={},x$=0),++x$}function fo(){fo=a,Ll=new K4(Og,0),Ru=new K4(Ng,1)}function Ef(){Ef=a,Qu=new Q4(Ng,0),fd=new Q4(Og,1)}function UPe(){return Ef(),xe(Ee(zBe,1),nt,223,0,[Qu,fd])}function YPe(){return zw(),xe(Ee($Be,1),nt,242,0,[X0,K0])}function WPe(){return fo(),xe(Ee(GBe,1),nt,248,0,[Ll,Ru])}function KPe(){return Ys(),xe(Ee(HBe,1),nt,247,0,[qc,Ms])}function XPe(){return Yy(),xe(Ee(fve,1),nt,194,0,[cI,lI])}function JPe(){return Hw(),xe(Ee(Qve,1),nt,174,0,[II,U7])}function r5(e){return _n(),Qe(e,63)?new L4(e):new bw(e)}function QPe(e){var n;return n=e.g,y(n||(e.g=new e4(e)),20)}function Di(e,n){return $oe(e,n,CPe(e,n==null?0:e.b.Vc(n)))}function Cae(e){var n;return n=Uw(e),"n_"+(n??Xm(e.k))}function Aae(e){return Km(wg(e))+"@"+(qo(e)>>>0).toString(16)}function ZPe(e,n){return FAe(Kt((Rr(e),e)),Kt((Rr(n),n)))}function qw(e,n){return n==null?Oi(Di(e.d,null)):are(e.e,n)}function eLe(e,n,s){return new u5(e.c,Rle(e.b,bLe(e.d,n,s)),e.a)}function yr(e){return Math.max(Math.min(e,Fr),-2147483648)|0}function i5(e){this.e=e,this.b=this.e.a.entries(),this.a=[]}function a5(e){this.c=e,this.b=new Wh(new xc(this.c.a).a)}function Pae(e){this.b=(sr(),sr(),sr(),ehe),this.a=y(Dt(e),35)}function Gh(e,n,s){vv(),xt.call(this,e,n),s!=null&&(this.c=s)}function Lae(e,n,s){if(e<0||n<e||n>s)throw new Ao(kMe(e,n,s))}function tLe(e,n){if(e<0||e>=n)throw new Ao(TMe(e,n));return e}function AS(e,n){if(e==null)throw new by(($n(),n));return e}function Gt(e){if(!Vt(e))throw new Ga;return e.c=e.b,e.b.H()}function nLe(e){function n(){}return n.prototype=e||{},new n}function Nae(e){var n;return n=new bk(XS(e.length)),Jy(n,e),n}function Oae(e){var n;n=e.c.b.b,e.b=n,e.a=e.c.b,n.a=e.c.b.b=e}function s5(e){this.b=null,!e&&(e=(Nh(),Nh(),bd)),this.a=e}function o5(e){this.b=e,this.a=new Ln(this.b,this.b.c.length)}function Dae(e){return Or(),Dt(e),Pue(e||Ew(new W(null)))}function rLe(e,n){var s=vR[e.charCodeAt(0)];return s??e}function Mae(e,n){var s=e.a=e.a||[];return s[n]||(s[n]=e.Oc(n))}function jae(e,n,s){var f;vq(n,s,e.c.length),f=s-n,O4(e.c,n,f)}function u5(e,n,s){Cne.call(this,n.a),this.c=e,this.b=n,this.a=s}function PS(e){return cw(e.c),e.e=e.a=e.c,e.c=e.c.c,++e.d,e.a.f}function Bae(e){return cw(e.e),e.c=e.a=e.e,e.e=e.e.e,--e.d,e.a.f}function ia(e){return Pn(xe(Ee(un,1),on,10,0,[e.f.i,e.i,e.a]))}function iLe(){return mu(),xe(Ee(phe,1),nt,107,0,[bR,C0,zf,Hv])}function aLe(){return Cc(),xe(Ee(bhe,1),nt,122,0,[mR,tF,id,yR])}function sLe(){return Nv(),xe(Ee(MR,1),nt,139,0,[G0,DR,OR,NR])}function oLe(){return Pc(),xe(Ee(zg,1),nt,150,0,[LR,$0,PR,F0])}function uLe(){return QB(),xe(Ee(q_,1),nt,136,0,[Qfe,Jfe,z6,Zfe])}function cLe(){return Ky(),xe(Ee(DBe,1),nt,201,0,[Pl,Xf,Kf,cd])}function lLe(){return Ye(),xe(Ee(Qr,1),nt,32,0,[Ar,Et,lt,At,vt])}function fLe(){return ur(),xe(Ee(I0,1),nt,59,0,[go,_a,ps,Su,Xu])}function qae(){qae=a,qde=ti((Bw(),xe(Ee(Bde,1),nt,193,0,[iI,S7])))}function Fae(){Fae=a,Pde=ti((Vw(),xe(Ee(Ade,1),nt,175,0,[y7,rI])))}function $ae(){$ae=a,Qde=ti((Gy(),xe(Ee(Jde,1),nt,192,0,[oI,sI])))}function hLe(){return yu(),xe(Ee(UBe,1),nt,140,0,[vx,vd,Zv])}function dLe(){return Iv(),xe(Ee(VBe,1),nt,218,0,[N7,lx,J0])}function vLe(){return Ir(),xe(Ee(YBe,1),nt,219,0,[MI,fa,Ri])}function pLe(){return o_(),xe(Ee(spe,1),nt,153,0,[d$,XI,v$])}function gLe(){return Ic(),xe(Ee(upe,1),nt,172,0,[rb,n1,xx])}function Fw(e,n,s){return n==null?Oa(e.d,null,s):uT(e.e,n,s)}function bLe(e,n,s){return new w_(e,!1,null,(oo(),Ns),!0,n,s)}function c5(e,n){return Xie(e.a,n)?yS(e,y(n,17).e,null):null}function $w(e){return Dt(e),fq((sr(),new Po(Lo(du(e.a,new w)))))}function yLe(e){return _n(),e?new vte(e):(Jne(),dpe)}function Gae(e,n){var s,f;return f=yv(e,n),s=e.a.ub(f),new One(e,s)}function mLe(e,n){var s,f;for(f=e.Y(),s=0;s<f;s++)e.wb(s,n[s])}function Hae(e,n,s){var f;f=new sy,f.b=n,f.a=s,++n.b,tt(e.d,f)}function wLe(e,n,s){e.d&&Vr(e.d.b,e),e.d=n,e.d&&yf(e.d.b,s,e)}function LS(e,n,s){vq(n,s,e.Y()),this.c=e,this.a=n,this.b=s-n}function NS(e,n,s,f){this.d=e,this.b=n,this.a=s,this.c=f}function zae(e,n){S4.call(this,soe(Dt(e),Dt(n))),this.b=e,this.c=n}function Ln(e,n){this.a=e,ev.call(this,e),If(n,e.Y()),this.b=n}function Gw(e,n,s,f){vv(),Gh.call(this,e,n,s),f!=null&&(this.d=f)}function _Le(e,n,s){e.i=0,e.e=0,n!=s&&(koe(e,n,s),Eoe(e,n,s))}function K(e){return Ct(e.a<e.c.c.length),e.b=e.a++,e.c.c[e.b]}function Fy(e){return Ct(e.b.b!=e.d.a),e.c=e.b=e.b.b,--e.a,e.c.c}function Vae(e,n){var s;return s=1-n,e.a[s]=Zw(e.a[s],s),Zw(e,n)}function xLe(e){var n;return n=(Vi(),Vi(),Tve),e.d&&RT(e),fCe(),n}function ELe(e){var n;return La(e)?(n=e,n==-0?0:n):LDe(e)}function bg(e){var n;return n=(Dt(e),new cl((No(),e))),m_(n),n_(n)}function kLe(e){sr();for(var n;;)if(n=e.H(),!e.G())return n}function Uae(e){return mw(e),cw(e.c),e.e=e.a=e.c,e.c=e.c.b,++e.d,e.a}function Yae(e){return mw(e),cw(e.e),e.c=e.a=e.e,e.e=e.e.d,--e.d,e.a}function SLe(e){var n;n=e.Y(),n!=0&&(e.d.Q(),e.f.c-=n,Nw(e))}function TLe(e,n,s){var f;f=YOe();try{return $Ae(e,n,s)}finally{WLe(f)}}function RLe(e){return function(){return TLe(e,this,arguments)}}function $y(e){return Qe(e,19)?y(e,19).V():!e.mb().G()}function mr(e){Or(),this.a=(_n(),Qe(e,63)?new L4(e):new bw(e))}function Hw(){Hw=a,II=new Z4(N_,0),U7=new Z4("TOP_LEFT",1)}function Ys(){Ys=a,qc=new X4("DOWN",0),Ms=new X4("UP",1)}function Gy(){Gy=a,oI=new z4("LAYER_SWEEP",0),sI=new z4(nR,1)}function zw(){zw=a,X0=new W4("UPPER",0),K0=new W4("LOWER",1)}function ILe(e){if(e<0)throw new one("Negative array size: "+e)}function l5(e,n){return Qe(n,21)?wT(e.a,y(n,21)):!1}function Wae(e,n){return Qe(n,21)?wT(e.a,y(n,21)):!1}function Kae(e,n){return Qe(n,21)?wT(e.a,y(n,21)):!1}function OS(e){var n;return n=new pu,Ac(n,e),Ae(n,(Ke(),pr),null),n}function Xae(e,n){return n===e?"(this Map)":($n(),n==null?Vu:Ya(n))}function f5(e,n,s,f){return Qe(s,63)?new uie(e,n,s,f):new GB(e,n,s,f)}function CLe(){return ml(),xe(Ee(xF,1),nt,100,0,[sd,Tu,mF,wF,_F])}function ALe(){return rr(),xe(Ee(Lhe,1),nt,28,0,[Il,yo,B0,Uv,Vo,Ti])}function PLe(){return Fo(),xe(Ee(hhe,1),nt,103,0,[gR,V_,U_,Y_,H_,z_])}function LLe(){return y_(),xe(Ee(mhe,1),nt,133,0,[wR,iF,sF,nF,aF,rF])}function Jae(){Jae=a,Dhe=ti((Rv(),xe(Ee(Ohe,1),nt,149,0,[q0,AR,CR])))}function Qae(){Qae=a,xhe=ti((i_(),xe(Ee(_he,1),nt,166,0,[_R,oF,uF])))}function Zae(){Zae=a,Hde=ti((Kw(),xe(Ee(Gde,1),nt,173,0,[aI,R7,T7])))}function NLe(){return wt(),xe(Ee(OF,1),nt,132,0,[ir,Nn,Hn,_r,Ds,ua])}function OLe(){return Cg(),xe(Ee(Lde,1),nt,125,0,[W0,w7,E7,x7,_7,m7])}function DLe(e){return sr(),gg(tue((No(),U6),gg(new ig,91),e),93).a}function Cs(e,n){_n();var s;s=e.ob(),Pv(s,0,s.length,n),mLe(e,s)}function ese(e,n,s,f,d){this.c=e,this.e=n,this.d=s,this.b=f,this.a=d}function gu(e,n,s,f,d){In.call(this,e,n),this.a=s,this.b=f,this.c=d}function Hh(e,n,s,f,d){In.call(this,e,n),this.a=s,this.b=f,this.c=d}function tse(e,n,s){this.a=n,this.c=e,this.b=(Dt(s),new cl((No(),s)))}function nse(){Vk(this),this.b=new Rt(Wi,Wi),this.a=new Rt(ii,ii)}function Vw(){Vw=a,y7=new G4("QUADRATIC",0),rI=new G4("SCANLINE",1)}function MLe(){throw new nv("Add not supported on this collection")}function rse(e){var n,s;return s=UAe(e.Zb()),n=e.Yb(),n==1?s:s+" x "+n}function vn(e){return Ct(e.b!=e.d.c),e.c=e.b,e.b=e.b.a,++e.a,e.c.c}function jLe(e){if(e.Tc())return null;var n=e.k,s=j_[n];return s}function DS(e,n){if(e<0||e>n)throw new Ao(Iq(e,n,"index"));return e}function BLe(e,n){var s;return hs(e),s=e.d.nb(n),s&&(--e.f.c,Nw(e)),s}function Hy(e,n,s){var f;f=(Dt(e),new cl((No(),e))),xDe(new tse(f,n,s))}function qLe(e,n){return SS(($n(),e.toLowerCase()),n.toLowerCase())}function FLe(e,n){return SS(($n(),e.toLowerCase()),n.toLowerCase())}function $Le(){return T5(),xe(Ee(ZI,1),nt,138,0,[w$,ppe,gpe,bpe])}function GLe(e,n,s,f){Array.prototype.splice.apply(e,[n,s].concat(f))}function Br(e,n,s,f){var d;d=new Bm,d.c=n,d.b=s,d.a=f,f.b=s.a=d,++e.b}function h5(e,n){var s;return s=r5(Ew(new FS(e,n))),Lw(new FS(e,n)),s}function HLe(e,n,s){if(s){var f=s.gc();e.a[n]=f(s)}else delete e.a[n]}function zLe(e,n,s){if(s){var f=s.gc();s=f(s)}else s=void 0;e.a[n]=s}function zy(e){this.d=e.d,this.c=e.c,this.a=e.a,this.b=e.b}function ise(){this.g=new p4,this.c=new p4,this.a=new Xe,this.k=new Xe}function ase(){this.d=new dae,this.a=new tie,this.c=new cre,this.b=new yee}function d5(){this.i=new Xe,this.g=new li,this.n=new CB,this.q=new CB}function sse(e,n,s,f){this.e=e,this.b=new Xe,this.d=n,this.a=s,this.c=f}function yg(){yg=a,mde=new ne,wde=new ae,bde=new oe,yde=new le,_de=new pe}function MS(){MS=a,Cl=new Tk(Ng,0),Jv=new Tk(N_,1),Al=new Tk(Og,2)}function ose(){ose=a,ghe=ti((mu(),xe(Ee(phe,1),nt,107,0,[bR,C0,zf,Hv])))}function use(){use=a,yhe=ti((Cc(),xe(Ee(bhe,1),nt,122,0,[mR,tF,id,yR])))}function cse(){cse=a,Bhe=ti((Nv(),xe(Ee(MR,1),nt,139,0,[G0,DR,OR,NR])))}function lse(){lse=a,jhe=ti((Pc(),xe(Ee(zg,1),nt,150,0,[LR,$0,PR,F0])))}function fse(){fse=a,hve=ti((Yy(),xe(Ee(fve,1),nt,194,0,[cI,lI])))}function hse(){hse=a,Zve=ti((Hw(),xe(Ee(Qve,1),nt,174,0,[II,U7])))}function kf(e){return Dt(e),Qe(e,19)?new cl((No(),y(e,19))):Ew(e.mb())}function VLe(e){return Kt(ze(Zt(ee(e,(Oe(),jl)))))&&ee(e,Pt)!=null}function ULe(e){return Kt(ze(Zt(ee(e,(Oe(),jl)))))&&ee(e,Pt)!=null}function dse(e,n,s,f){n==null&&(n=Vu),e.a+=""+($n(),n.substr(s,f-s))}function vse(e,n){var s;for(s=0;s<n;++s)Rs(e,s,new c4(y(e[s],21)))}function YLe(e,n){var s,f;s=y(TDe(e.b,n),19),s&&(f=s.Y(),s.Q(),e.c-=f)}function Sf(e,n,s){var f;return f=(Gn(n,e.c.length),e.c[n]),e.c[n]=s,f}function Tf(e){return Ct(e.a<e.c.a.length),e.b=e.a,zse(e),e.c.b[e.b]}function jS(e){sr();var n;for(n=0;e.G();)e.H(),n=Yr(n,1);return Sv(n)}function v5(e){this.d=e,this.b=this.d.a.entries(),this.a=this.b.next()}function pse(e){this.g=e,this.f=new Xe,this.a=wn(this.g.c.c,this.g.d.c)}function gse(e){m4(),this.e=null,this.f=null,this.a="",this.b=e,this.a=""}function mg(){ln.call(this),aie(this),this.b.b=this.b,this.b.a=this.b}function WLe(e){e&&wNe((w4(),Q6)),--$_,e&&G_!=-1&&(oAe(G_),G_=-1)}function Rf(e){return!e.c||!e.d?!1:!!e.c.f&&e.c.f==e.d.f}function KLe(){return Date.now?Date.now():new Date().getTime()}function Uw(e){return e.c.c.length!=0?y(ht(e.c,0),33).a:null}function bse(e){return e.c.c.length!=0?y(ht(e.c,0),33).a:null}function XLe(e){return e.d=3,e.c=RNe(e),e.d!=2?(e.d=0,!0):!1}function Yw(e,n,s){this.a=e,this.b=n,this.c=s,tt(e.j,this),tt(n.d,this)}function As(e,n,s,f){var d;e.c?d=new ek(yr(f)):d=new ek(f),fs(n,s,d)}function Ww(e){var n,s;return Dt(e),n=yPe(e.length),s=new sa(n),Jy(s,e),s}function p5(e){var n,s,f;return n=e&Ls,s=e>>22&Ls,f=e<0?El:0,ll(n,s,f)}function JLe(){return h_(),xe(Ee(ove,1),nt,141,0,[P7,I7,C7,uI,A7])}function QLe(){return v_(),xe(Ee(Uve,1),nt,115,0,[fx,yI,wI,mI,_I])}function ZLe(){return ma(),xe(Ee(rpe,1),nt,85,0,[gd,e1,Bl,Zg,zc])}function yse(){yse=a,vhe=ti((ur(),xe(Ee(I0,1),nt,59,0,[go,_a,ps,Su,Xu])))}function mse(){mse=a,Mhe=ti((Ye(),xe(Ee(Qr,1),nt,32,0,[Ar,Et,lt,At,vt])))}function wse(){wse=a,Phe=ti((ml(),xe(Ee(xF,1),nt,100,0,[sd,Tu,mF,wF,_F])))}function _se(){_se=a,eve=Hi(cs(cs(cs(zi(new Zn,(Kr(),ZR)),s7),zF),JR),QR)}function xse(e,n){var s,f;for(f=n.mb();f.G();)s=y(f.H(),55),ple(e,s,0,0)}function bu(e,n,s){var f,d;for(d=e.mb();d.G();)f=y(d.H(),55),p0(f,n,s)}function g5(e,n,s){var f,d;for(f=0,d=0;d<n.length;d++)f+=e.Hc(n[d],f,s)}function zh(e,n){var s;return s=(Gn(n,e.c.length),e.c[n]),O4(e.c,n,1),s}function eNe(e){var n;for(Dt(e),n=0;n<0&&Vt(e);n++)Gt(e);return n}function Ws(e){var n;e.d=new Cre(e),e.e=new Are(e),n=e[Hf]|0,e[Hf]=n+1}function Ese(e){e.g=new ci,e.o=new ci,e.c=new ci,e.j=new Xe,e.d=new Xe}function If(e,n){if(e<0||e>n)throw new Ao("Index: "+e+", Size: "+n)}function Gn(e,n){if(e<0||e>=n)throw new Ao("Index: "+e+", Size: "+n)}function kse(e,n){var s,f;return s=n.yb(),f=K5(e,s),!!f&&Va(f.e,n.zb())}function tNe(e,n){var s;return s=e.d,n>0?y(ht(s.a,n-1),9):null}function Ge(e,n,s,f,d,b){var m;return m=$ue(d,f),d!=9&&xe(Ee(e,b),n,s,d,m),m}function Vh(e){var n;if(!vl(e))throw new Ga;return e.d=1,n=e.c,e.c=null,n}function Vy(e,n,s,f){this.f=e,this.e=n,this.d=s,this.b=f,this.c=f?f.d:null}function nNe(e,n){if(e&&typeof e==I_)try{e.__gwt$exception=n}catch{}}function rNe(e,n){e.a.$b(n.d,e.b)>0&&(tt(e.c,new TB(n.c,n.d,e.d)),e.b=n.d)}function iNe(e,n){var s;return s=qr(e.j,n.j),s==0?qr(e.k,n.k):s}function b5(e){var n,s;return s=y(ht(e.f,0),7),n=y(ee(s,(Oe(),Pt)),7),n}function BS(e){var n,s;return s=y(ht(e.f,0),7),n=y(ee(s,(Oe(),Pt)),7),n}function aNe(e,n){return qr(ze(nn(ee(e,(Oe(),Hc)))),ze(nn(ee(n,Hc))))}function Sse(){Sse=a,ope=ti((o_(),xe(Ee(spe,1),nt,153,0,[d$,XI,v$])))}function Tse(){Tse=a,cpe=ti((Ic(),xe(Ee(upe,1),nt,172,0,[rb,n1,xx])))}function Rse(){Rse=a,dhe=ti((Fo(),xe(Ee(hhe,1),nt,103,0,[gR,V_,U_,Y_,H_,z_])))}function Ise(){Ise=a,whe=ti((y_(),xe(Ee(mhe,1),nt,133,0,[wR,iF,sF,nF,aF,rF])))}function Cse(){Cse=a,Nhe=ti((rr(),xe(Ee(Lhe,1),nt,28,0,[Il,yo,B0,Uv,Vo,Ti])))}function Ase(){Ase=a,Nde=ti((Cg(),xe(Ee(Lde,1),nt,125,0,[W0,w7,E7,x7,_7,m7])))}function sNe(){return Of(),xe(Ee(Ide,1),nt,109,0,[ax,U0,Y0,p7,g7,v7,b7,sx])}function oNe(){return Nc(),xe(Ee(Un,1),nt,41,0,[xa,Os,ka,Ja,Xa,Ka,Ki,Sa,Ea])}function uNe(){return Rg(),xe(Ee(bI,1),nt,123,0,[gI,pI,vI,hI,fI,dI])}function cNe(){return s0(),xe(Ee(Wve,1),nt,124,0,[EI,D7,j7,O7,M7,xI])}function y5(){y5=a,eF=new xt("de.cau.cs.kieler.labels.labelManager",null)}function lNe(){return Date.now?Date.now():new Date().getTime()}function fNe(e){var n;return n=y(bS(e.b,e.b.length),11),new Si(e.a,n,e.c)}function hNe(e,n){var s;return s=($n(),n.length),Co(vg(e,e.length-s,s),n)}function Pse(e,n){var s;return s=new uy,s.c=!0,s.d=n.zb(),zle(e,n.yb(),s)}function dNe(e,n){var s;return s=n.yb(),Qn(),new j4(s,Sue(e.b,s,y(n.zb(),19)))}function Vr(e,n){var s;return s=aa(e,n,0),s==-1?!1:(e.vb(s),!0)}function Uy(e,n){return R5(n)!=9&&xe(wg(n),n._c,n.__elementTypeId$,R5(n),e),e}function m5(e){return gS(e.c.a.c,e),Ct(e.b!=e.c.a.b),e.a=e.b,e.b=e.b.a,e.a}function w5(e){Oh(!!e.c),gS(e.e,e),e.c.I(),e.c=null,e.b=q5(e),fB(e.e,e)}function vNe(e,n,s){e.a=n,e.c=s,e.b.a.Q(),Fu(e.d),e.e.a.c=Ge(yt,st,1,0,4,1)}function Lse(e,n,s){S4.call(this,soe(Dt(e),Dt(n))),this.b=e,this.c=n,this.a=s}function Nse(e,n,s,f){this.b=new ate(this),this.a=e,this.c=n,this.e=s,this.d=f}function Ose(e){qoe.call(this,e,0),aie(this),this.b.b=this.b,this.b.a=this.b}function qS(e,n){ow.call(this,e,n),this.a=Ge(JBe,st,183,2,0,1),this.b=!0}function kv(e,n){return uo(n)?n==null?!!Di(e.d,null):tPe(e.e,n):!!Di(e.d,n)}function _5(e,n){return ng(),(e-n>0?e-n:-(e-n))<=w0||e==n||isNaN(e)&&isNaN(n)}function Dse(e,n){return ng(),(e-n>0?e-n:-(e-n))<=w0||e==n||isNaN(e)&&isNaN(n)}function x5(e){var n,s;n=!0;do n?s=iue(e):s=lue(e),n=!n;while(s);F5(e,e.d)}function fs(e,n,s){var f;if(n==null)throw new eg;return f=Jn(e,n),HLe(e,n,s),f}function Ae(e,n,s){return!e.n&&(e.n=new ln),s==null?jh(e.n,n):Cn(e.n,n,s),e}function aa(e,n,s){for(;s<e.c.length;++s)if(Va(n,e.c[s]))return s;return-1}function pNe(e,n){for(;n>=e.a.c.length;)tt(e.a,new pi);return y(ht(e.a,n),20)}function gNe(e,n){var s;return s=y(t0(e.a,n),19),s?Sue(e.b,n,s):null}function bNe(e,n,s){var f;f=Jn(e,XT),f||(f=new Ch,fs(e,XT,f)),fs(f.kc(),n,s)}function rn(e,n,s,f,d){var b;return b=wS(e,n),Wse(s,b),b.g=d?8:0,b.f=f,b.e=d,b}function FS(e,n){var s;this.f=e,this.b=n,s=y(bn(e.b,n),126),this.c=s?s.b:null}function E5(e,n){var s,f,d;for(f=0,d=n.length;f<d;++f)s=n[f],Br(e,s,e.c.b,e.c)}function Mse(e,n,s,f,d,b){var m;m=OS(f),nr(m,d),Bn(m,b),Bt(e.a,f,new _w(m,n,s.f))}function k5(e,n,s){var f;return f=0,e.c[s]>0&&(f+=Z4e(n)),e.b[s]&&(f+=oBe(n)),f}function S5(e,n){var s;return s=y(jh(e.c,n),176),s?(DB(s),s.e):null}function Sv(e){return nT(e,Fr)>0?Fr:nT(e,Uu)<0?Uu:xS(e)}function yNe(e){return No(),Mi(e,"size"),xS(YCe(Xoe(e,8),x6)?Xoe(e,8):x6),new pk}function $S(e){HAe.call(this,($n(),e==null?Vu:Ya(e)),Qe(e,46)?y(e,46):null)}function sa(e){Vk(this),MB(e>=0,"Initial capacity must not be negative")}function jse(){jse=a,lde=jy(cs(cs(new Zn,(Kr(),n7)),JF),ZF),fde=zi(new Zn,QF)}function Ua(){Ua=a,MF=new we,DF=new Pe,HR=new Fe,GR=new Ue,zR=new He,VR=new De}function T5(){T5=a,w$=new aw("All",0),ppe=new Dre,gpe=new $re,bpe=new Mre}function Kw(){Kw=a,aI=new Ck(Bfe,0),R7=new Ck("LONGEST_PATH",1),T7=new Ck(nR,2)}function Xw(){Xw=a,uhe=ll(Ls,Ls,524287),che=ll(0,0,524288),p5(1),p5(2),Z6=p5(0)}function Bse(){Bse=a,Cde=ti((Of(),xe(Ee(Ide,1),nt,109,0,[ax,U0,Y0,p7,g7,v7,b7,sx])))}function qse(){qse=a,uve=ti((h_(),xe(Ee(ove,1),nt,141,0,[P7,I7,C7,uI,A7])))}function Fse(){Fse=a,Yve=ti((v_(),xe(Ee(Uve,1),nt,115,0,[fx,yI,wI,mI,_I])))}function $se(){$se=a,ipe=ti((ma(),xe(Ee(rpe,1),nt,85,0,[gd,e1,Bl,Zg,zc])))}function Gse(e){xq(),TAe(this,xS(Tae(Xy(GMe(La(e)?bl(e):e,24)),$6)),xS(Tae(e,$6)))}function wg(e){return uo(e)?lR:pv(e)?r1:gv(e)?WBe:vS(e)||lS(e)?e.$c:e.$c||PBe}function R5(e){return e.__elementTypeCategory$==null?9:e.__elementTypeCategory$}function mNe(e){var n,s;if(e.a){s=null;do n=e.a,e.a=null,s=fce(n,s);while(e.a);e.a=s}}function wNe(e){var n,s;if(e.b){s=null;do n=e.b,e.b=null,s=fce(n,s);while(e.b);e.b=s}}function Tv(e){Qne();var n,s;for(s=I6,n=0;n<e.length;n++)e[n]>s&&(s=e[n]);return s}function Jw(e,n){var s;return s=y(bn(e.b,n),106),s||(s=n.rc(),Cn(e.b,n,s)),s}function GS(e,n){var s;return s=y(bn(e.c,n),176),s?(Kre(e,s),s.e):null}function Hse(e,n,s,f){var d;d=y(GS(e.e,n),116),d.b+=s,d.a+=f,n0(e.e,n,d),e.d=!0}function zse(e){var n;for(++e.a,n=e.c.a.length;e.a<n;++e.a)if(e.c.b[e.a])return}function _Ne(e){var n,s,f;for(n=(e.g==null&&(e.g=OB(e)),e.g),s=0,f=n.length;s<f;++s);}function xNe(e,n){var s,f;return hs(e),f=e.d.V(),s=e.d.ib(n),s&&(++e.f.c,f&&xw(e)),s}function Mi(e,n){if(e<0)throw new Rn(n+" cannot be negative but was: "+e);return e}function I5(e){if(!e.a.G()&&(e.a=e.b.mb(),!e.a.G()))throw new Ga;return e.a.H()}function _g(e){sr();var n;return Dt(e),Qe(e,108)?(n=y(e,108),n):new Dee(e)}function dl(e,n){var s=e.a[n],f=(JS(),pR)[typeof s];return f?f(s):J5(typeof s)}function HS(e,n){var s,f;for(f=new W(e);f.a<f.c.c.length;)s=y(K(f),7),x_(s,n)}function zS(e,n){var s,f,d,b;for(f=e.d,d=0,b=f.length;d<b;++d)s=f[d],ss(e.g,s).a=n}function ENe(e,n){var s;return s=kc(Ts(y(bn(e.g,n),10)),dAe(y(bn(e.f,n),198).b)),s}function VS(e){var n;return!vl(Bh((n=new pn(e.b.a).a.bb().mb(),new mn(n)),e.a))}function C5(e){var n;Oh(!!e.c),n=e.c.a,$u(e.d,e.c),e.b==e.c?e.b=n:--e.a,e.c=null}function Vse(e){return e.c&&e.d?e.c.f+"("+e.c+")->"+e.d.f+"("+e.d+")":"e_"+Ec(e)}function kNe(e,n){return Ky(),e==Pl&&n==Xf||e==Xf&&n==Pl||e==cd&&n==Kf||e==Kf&&n==cd}function SNe(e,n){return Ky(),e==Pl&&n==Kf||e==Pl&&n==cd||e==Xf&&n==cd||e==Xf&&n==Kf}function TNe(){return g0(),xe(Ee(Xve,1),nt,110,0,[F7,RI,$7,z7,G7,V7,H7,TI])}function Use(){Use=a,Ahe=ti((Nc(),xe(Ee(Un,1),nt,41,0,[xa,Os,ka,Ja,Xa,Ka,Ki,Sa,Ea])))}function Rv(){Rv=a,q0=new Sk("OUTSIDE",0),AR=new Sk("INSIDE",1),CR=new Sk("FIXED",2)}function yu(){yu=a,vx=new Mk(Dg,0),vd=new Mk("TOP",1),Zv=new Mk("BOTTOM",2)}function Yy(){Yy=a,cI=new J4("CLASSIC",0),lI=new J4("IMPROVE_STRAIGHTNESS",1)}function A5(){this.e=new li,this.a=new xae,this.d=new li,this.b=new Xe,this.c=new Xe}function Qw(e,n,s){this.b=n,this.a=e,this.c=s,tt(this.a.e,this),tt(this.b.b,this)}function P5(e,n){e.d=wn(e.d,n.d),e.c=rt(e.c,n.c),e.a=rt(e.a,n.a),e.b=wn(e.b,n.b)}function $u(e,n){var s;return s=n.c,n.a.b=n.b,n.b.a=n.a,n.a=n.b=null,n.c=null,--e.b,s}function US(e,n){sr();var s;for(Dt(e),Dt(n),s=!1;n.G();)s=s|e.ib(n.H());return s}function xg(e){var n;return gS(e.e,e),Ct(e.b),e.c=e.a,n=y(e.a.H(),21),e.b=q5(e),n}function RNe(e){for(var n;e.b.G();)if(n=e.b.H(),e.a.D(n))return n;return e.d=2,null}function INe(e,n){return n&&e.b[n.e]==n?(Rs(e.b,n.e,null),--e.c,!0):!1}function CNe(e){return WT<e&&e<kl?e<0?Math.ceil(e):Math.floor(e):Xy(uje(e))}function Yse(e){if(e){if(e.V())throw new Ga;return e.sb(e.Y()-1)}return kLe(null.mb())}function ANe(e,n){var s;return s=e.d,n<s.a.c.length-1?y(ht(s.a,n+1),9):null}function Wse(e,n){if(e){n.k=e;var s=jLe(n);if(!s){j_[e]=[n];return}s.$c=n}}function Kse(e,n){var s,f;f=!1;do e.i?s=tOe(e,n):s=eOe(e,n),f=f|s;while(s);return f}function Xse(e,n,s){var f,d;f=n;do d=ze(e.n[f.k])+s,e.n[f.k]=d,f=e.a[f.k];while(f!=n)}function PNe(e){var n,s;for(s=new W(e.a.b);s.a<s.c.c.length;)n=y(K(s),25),n.vc()}function LNe(){ene();for(var e=uR,n=0;n<arguments.length;n++)e.push(arguments[n])}function NNe(e,n){var s,f;for(s=0,f=e.Y();s<f;++s)if(Va(n,e.sb(s)))return s;return-1}function L5(e,n){var s;return AS(e,"set1"),AS(n,"set2"),s=(rw(),new Ine(n)),new xie(e,s,n)}function ONe(e){var n=/function(?:\s+([\w$]+))?\s*\(/,s=n.exec(e);return s&&s[1]||zT}function DNe(e,n,s){en(s,Ife,3),Eue(e.c,n,Uh(s,1)),Oce(e,n,Uh(s,1)),ife(n,Uh(s,1)),zt(s)}function Jse(){Jse=a,Vve=ti((Rg(),xe(Ee(bI,1),nt,123,0,[gI,pI,vI,hI,fI,dI])))}function Qse(){Qse=a,Kve=ti((s0(),xe(Ee(Wve,1),nt,124,0,[EI,D7,j7,O7,M7,xI])))}function Zse(){Zse=a,lpe=xe(Ee(gr,1),vr,26,12,[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15])}function Ir(){Ir=a,MI=new jk(ed,0),fa=new jk("INPUT",1),Ri=new jk("OUTPUT",2)}function eoe(e){this.c=e,this.b=new Wh(new xc(e.b).a),this.a=null,this.d=(sr(),sr(),Y6)}function toe(e){this.e=e,this.d=new bk(XS(pS(this.e).Y())),this.c=this.e.a,this.b=this.e.c}function N5(e,n,s){this.c=e,d5.call(this),this.b=n,this.j=new Is(n.d,n.e,n.c,n.b),this.a=s}function noe(e,n){e.j>0&&e.c<e.j&&(e.c+=n,e.g&&e.g.d>0&&e.e!=0&&noe(e.g,n/e.j*e.g.d))}function roe(e){return e.b.d.f.g==(wt(),Hn)?y(ee(e.b.d.f,(Oe(),Pt)),7):e.b.d}function MNe(e){return e.b.c.f.g==(wt(),Hn)?y(ee(e.b.c.f,(Oe(),Pt)),7):e.b.c}function vl(e){switch(uw(e.d!=3),e.d){case 2:return!1;case 0:return!0}return XLe(e)}function ioe(e){switch(e.e){case 2:return Ye(),vt;case 4:return Ye(),lt;default:return e}}function aoe(e){switch(e.e){case 1:return Ye(),At;case 3:return Ye(),Et;default:return e}}function jNe(e){var n;return Qe(e,90)?(n=y(e,90),new T4(n.a)):(sr(),new ZE(e))}function soe(e,n){_n();var s;return s=new Pk(1),uo(e)?Fw(s,e,n):Oa(s.d,e,n),new o4(s)}function ooe(e,n){return e.g?(e.g=ooe(e.g,n),--e.a,e.j=yl(e.j,n.c),Lc(e)):e.e}function uoe(e,n){return e.e?(e.e=uoe(e.e,n),--e.a,e.j=yl(e.j,n.c),Lc(e)):e.g}function Na(e,n){var s,f,d;for(Rr(n),s=!1,d=n.mb();d.G();)f=d.H(),s=s|e.ib(f);return s}function BNe(e){var n,s,f;for(n=0,f=e.mb();f.G();)s=f.H(),n+=s!=null?qo(s):0,n=~~n;return n}function qNe(e){var n,s,f,d;for(s=e.a,f=0,d=s.length;f<d;++f)n=s[f],n.B(null);return null}function YS(e){var n,s,f;for(f=new ea,s=e.b.mb();s.G();)n=y(s.H(),92),kn(f,n.a);return f}function Wy(e){var n,s,f;for(n=0,f=e.mb();f.G();)s=nn(f.H()),n+=(Rr(s),s);return n/e.Y()}function coe(e,n){var s;return s=y(bn(e.c,n),200),s||(s=new Ite,s.c=n,Cn(e.c,s.c,s)),s}function ji(e,n){var s;return Rr(n),s=n.e,e.b[s]?!1:(Rs(e.b,s,n),++e.c,!0)}function Zw(e,n){var s,f;return s=1-n,f=e.a[s],e.a[s]=f.a[n],f.a[n]=e,e.b=!0,f.b=!1,f}function loe(e,n){var s;return Qe(n,10)?(s=y(n,10),e.a==s.a&&e.b==s.b):!1}function O5(e,n,s){return e.g=new e_(n,s),yB(e,e.g,e.i),e.d=Ei(2,e.d),++e.a,e.j=Yr(e.j,s),e}function D5(e,n,s){return e.e=new e_(n,s),yB(e.f,e.e,e),e.d=Ei(2,e.d),++e.a,e.j=Yr(e.j,s),e}function foe(e,n){var s=e.a,f=0;for(var d in s)s.hasOwnProperty(d)&&(n[f++]=d);return n}function hoe(e,n){var s,f;for(Rr(n),f=n.bb().mb();f.G();)s=y(f.H(),21),e.db(s.yb(),s.zb())}function FNe(e,n,s){var f;return f=e.a.e[y(n.a,9).k]-e.a.e[y(s.a,9).k],yr(f>0?1:f<0?-1:0)}function doe(e,n,s){this.g=e,this.d=n,this.e=s,this.a=new Xe,IMe(this),_n(),Cs(this.a,null)}function e_(e,n){hv(n>0),this.b=e,this.c=n,this.j=n,this.a=1,this.d=1,this.e=null,this.g=null}function $Ne(e){e.a=null,e.e=null,e.b.c=Ge(yt,st,1,0,4,1),e.f.c=Ge(yt,st,1,0,4,1),e.c=null}function GNe(){return Dr(),xe(Ee(q7,1),nt,113,0,[kI,Xo,hx,SI,hd,dd,dx,Yg,Wg,B7])}function HNe(e){return Jh(e,26)*14901161193847656e-24+Jh(e,27)*11102230246251565e-32}function WS(e){return Qe(e,87)?bg(y(e,87)):Qe(e,88)?y(e,88).a:Qe(e,63)?new gy(e):new ag(e)}function voe(e){var n;return n=y(ee(e,(Oe(),ai)),32),e.g==(wt(),Hn)&&(n==(Ye(),vt)||n==lt)}function poe(e,n){return ODe(e,n)?(Bt(e.a,y(ee(n,(Oe(),pd)),18),n),!0):!1}function Ur(e,n){var s;if(n)for(s=0;s<6;s++)y(ht(e.a,s),18).jb(y(ht(n.a,s),19));return e}function Uh(e,n){var s;return e.b?null:(s=pPe(e.e,e.f),kn(e.a,s),s.g=e,e.d=n,s)}function pl(e,n){var s,f;for(f=xn(e,0);f.b!=f.d.c;)s=y(vn(f),10),s.a+=n.a,s.b+=n.b;return e}function M5(e,n){var s,f;for(s=0;s<n.length;s++)for(f=0;f<n[s].length;f++)n[s][f]=e[s][f]}function zNe(e){var n,s;for(s=new W(e.b.f);s.a<s.c.c.length;)n=y(K(s),7),Iae(e.a,hT(n.g))}function Ky(){Ky=a,Pl=new tw("Q1",0),Xf=new tw("Q4",1),Kf=new tw("Q2",2),cd=new tw("Q3",3)}function mu(){mu=a,bR=new Jm(ed,0),C0=new Jm(N_,1),zf=new Jm("HEAD",2),Hv=new Jm("TAIL",3)}function Ic(){Ic=a,rb=new qk("AGGRESSIVE",0),n1=new qk("CAREFUL",1),xx=new qk("OFF",2)}function goe(){goe=a,Jve=ti((g0(),xe(Ee(Xve,1),nt,110,0,[F7,RI,$7,z7,G7,V7,H7,TI])))}function j5(e,n){return jn(),uo(e)?SS(e,bv(n)):pv(e)?eae(e,nn(n)):gv(e)?ZPe(e,Zt(n)):e.F(n)}function B5(e,n,s){var f;return f=n.$b(s,e.b),f<0?e.e?B5(e.e,n,s):0:f>0?e.g?B5(e.g,n,s):0:e.c}function VNe(e,n){var s,f;return e.b?(f=e.e,s=e.a.$b(n,f),s<0|s==0&e.d==(oo(),Ns)):!1}function boe(e,n){var s,f;return e.c?(f=e.g,s=e.a.$b(n,f),s>0|s==0&e.f==(oo(),Ns)):!1}function Xy(e){var n;return n=e.h,n==0?e.l+e.m*Zh:n==El?e.l+e.m*Zh-kl:e}function Pn(e){var n,s,f,d;for(n=new li,f=0,d=e.length;f<d;++f)s=e[f],n.a+=s.a,n.b+=s.b;return n}function UNe(e){var n,s,f,d;for(s=e.a,f=0,d=s.length;f<d;++f)n=s[f],Poe(e,n,(Ye(),At)),Poe(e,n,Et)}function YNe(e){var n,s,f;for(n=1,f=e.mb();f.G();)s=f.H(),n=31*n+(s==null?0:qo(s)),n=~~n;return n}function WNe(e){var n,s;return n=y(e.e&&e.e(),11),s=y(bS(n,n.length),11),new Si(n,s,n.length)}function yoe(e){this.e=ft(ee(na(e[0]),(Ke(),ad)))===ft((Cc(),id)),this.a=e,this.c=new ln,UNe(this)}function moe(e){_4(),this.g=(Qn(),new ln),this.f=new ln,this.b=new ln,this.c=new Ey,this.i=e}function woe(e){this.o=e,this.g=new Xe,this.j=new pi,this.n=new pi,this.e=new Xe,this.b=new Xe}function t_(e,n){if(Dn(e.a,n),n.f)throw new Bu("CNode belongs to another CGroup.");n.f=e}function KNe(e,n){typeof window===I_&&typeof window.$gwt===I_&&(window.$gwt[e]=n)}function _oe(e,n,s,f){var d,b;for(d=FOe(e,n,s,f),d<0&&(d=-d-1),b=s-1;b>=d;b--)e[b+1]=e[b];e[d]=f}function xoe(e,n,s,f){var d,b;for(d=JOe(e,n,s,f),d<0&&(d=-d-1),b=s-1;b>=d;b--)e[b+1]=e[b];e[d]=f}function gl(e,n){var s,f;for(Rr(n),f=n.mb();f.G();)if(s=f.H(),!e.kb(s))return!1;return!0}function XNe(e,n){sr();var s;for(Dt(n);e.G();)if(s=e.H(),!voe(y(s,9)))return!1;return!0}function JNe(e,n){var s,f,d;return s=n.k-e.k,s==0?(f=e.e.a*e.e.b,d=n.e.a*n.e.b,qr(f,d)):s}function bl(e){var n,s,f,d;return d=e,f=0,d<0&&(d+=kl,f=El),s=yr(d/Zh),n=yr(d-s*Zh),ll(n,s,f)}function KS(e,n){return e.c.c=Ge(yt,st,1,0,4,1),ace(e,e.e,n),ace(e,e.a,n),_n(),Cs(e.c,null),oOe(e)}function Eoe(e,n,s){e.g=TT(e,n,(Ye(),lt),e.b),e.d=TT(e,s,lt,e.b),!(e.g.c==0||e.d.c==0)&&Zue(e)}function koe(e,n,s){e.g=TT(e,n,(Ye(),vt),e.j),e.d=TT(e,s,vt,e.j),!(e.g.c==0||e.d.c==0)&&Zue(e)}function Soe(e,n,s){return new Is(wn(e.a,n.a)-s/2,wn(e.b,n.b)-s/2,ki(e.a-n.a)+s,ki(e.b-n.b)+s)}function q5(e){return e.a.G()?!0:e.a!=e.d?!1:(e.a=new i5(e.e.d),e.a.G())}function Vn(e,n){var s,f;return s=n.ob(),f=s.length,f==0?!1:(LB(e.c,e.c.length,s),!0)}function F5(e,n){var s,f;for(s=0;s<e.a.length;s++)for(f=0;f<e.a[s].length;f++)e.a[s][f]=n[s][f]}function Jy(e,n){_n();var s,f,d,b;for(b=!1,f=0,d=n.length;f<d;++f)s=n[f],b=b|e.ib(s);return b}function XS(e){return Qn(),e<3?(Mi(e,"expectedSize"),e+1):e<x6?yr(e/.75+1):Fr}function $5(e,n){var s;return Qe(n,19)?(s=(No(),y(n,19)),e.jb(s)):US(e,y(Dt(n),22).mb())}function Toe(e,n){var s,f;f=e.d.f,f.g!=(wt(),ir)&&(s=Xt(qn(f)),Vt(s)&&Cn(n,e,y(Gt(s),12)))}function G5(e,n){var s,f;return ILe(n),s=uue(e,0,n),f=Ge(gr,vr,26,n,12,1),_T(e,0,f,0,s,!0),f}function QNe(e,n){var s;this.c=e,s=new Xe,dq(e,s,n,e.b,null,!1,null),this.a=new Ln(s,0)}function Roe(e){return e.a?boe(e.c.b,e.a.b)?(e.a=null,!1):!0:!1}function Yh(e){if(!e)throw new rl(($n(),"no calls to next() since the last call to remove()"))}function JS(){JS=a,pR={boolean:ZCe,number:OCe,string:DCe,object:_ce,function:_ce,undefined:uCe}}function QS(){QS=a,qR=Nae(xe(Ee(I0,1),nt,59,0,[(ur(),ps),_a])),FR=Nae(xe(Ee(I0,1),nt,59,0,[Xu,Su]))}function H5(e){_n();var n,s,f;for(f=0,s=e.mb();s.G();)n=s.H(),f=f+(n!=null?qo(n):0),f=f|0;return f}function ZNe(e){tv();var n,s,f;for(f=0,s=wv(e).mb();s.G();)n=y(s.H(),83),f=Yr(f,n.Yb());return Sv(f)}function Gu(e){var n,s;for(s=new W(e.a.b);s.a<s.c.c.length;)n=y(K(s),25),n.i.Q();e.c.Dc(e),cle(e)}function Ioe(e,n){var s;return s=gk(e.a,n),s===void 0?++e.d:(e.a[aR](n),--e.c,rS(e.b)),s}function eOe(e,n){var s,f,d,b;for(s=!1,f=e.d[n].length,d=f-1;d>0;d--)b=d-1,s=s|gue(e,n,b,d);return s}function tOe(e,n){var s,f,d,b;for(s=!1,f=e.d[n].length,b=0;b<f-1;b++)d=b+1,s=s|gue(e,n,b,d);return s}function nOe(e,n){var s,f,d;return s=e.l+n.l,f=e.m+n.m+(s>>22),d=e.h+n.h+(f>>22),ll(s&Ls,f&Ls,d&El)}function rOe(e,n){var s,f,d;return s=e.l-n.l,f=e.m-n.m+(s>>22),d=e.h-n.h+(f>>22),ll(s&Ls,f&Ls,d&El)}function Coe(e,n){var s;for(s=0;s<($n(),n.length);s++)if(e==n.charCodeAt(s))return!0;return!1}function Aoe(e,n){var s;for(s=0;s<($n(),n.length);s++)if(e==n.charCodeAt(s))return!0;return!1}function ee(e,n){var s,f;return e.n&&(f=bn(e.n,n),f!=null)?f:(s=Zje(n),Qe(s,5)&&Ae(e,n,s),s)}function ZS(e){var n,s,f;for(n=new ea,f=xn(e,0);f.b!=f.d.c;)s=y(vn(f),10),gw(n,0,new hr(s));return n}function Poe(e,n,s){var f,d,b,m;for(m=new bf(n,s),b=0,d=Df(m);d.G();)f=y(d.H(),7),Cn(e.c,f,Mt(b++))}function iOe(e,n,s){if(Dt(n),s.G())for(df(n,e.C(s.H()));s.G();)df(n,e.c),df(n,e.C(s.H()));return n}function aOe(e,n,s,f,d){f?jDe(e,n):(BDe(e,n,d),R4e(e,n,s)),n.c.length>1&&(Cs(n,e.b),W3e(e.c,n))}function xe(e,n,s,f,d){return d.$c=e,d._c=n,d.ad=i,d.__elementTypeId$=s,d.__elementTypeCategory$=f,d}function Qy(e,n,s){switch(s.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 Loe(e,n,s){var f,d;return d=b5(s).g,f=zoe(e,n,d).a,f-NCe(y(bn(e.c,n),24).a-y(bn(e.c,s),24).a)}function qr(e,n){return e<n?-1:e>n?1:e==n?0:isNaN(e)?isNaN(n)?0:1:-1}function n_(e){switch(e.Y()){case 0:return R0;case 1:return new Rc(e.mb().H());default:return new mr(e)}}function Eg(){Eg=a;var e,n;n=!(Error.stackTraceLimit||"stack"in new Error),e=new vee,G6=n?new l:e}function z5(){z5=a,EF=new xt("intCoordinates",(jn(),jn(),er)),kF=new br("jsonObject"),BR=new Rt(0,0)}function r_(){r_=a,BF=new Ik("MIRROR_X",0),qF=new Ik("TRANSPOSE",1),jF=new Ik("MIRROR_AND_TRANSPOSE",2)}function Iv(){Iv=a,N7=new Dk(Dg,0),lx=new Dk("INCOMING_ONLY",1),J0=new Dk("OUTGOING_ONLY",2)}function V5(){return Vi(),xe(Ee(Ug,1),nt,60,0,[Iu,Nl,Fc,$c,Ko,Ml,Dl,mo,Wo,Ol,Gc,Qf,ld])}function Noe(){Noe=a;var e,n,s,f;for(Jf=new rq(Ug),n=V5(),s=0,f=n.length;s<f;++s)e=n[s],SB(Jf,e,null)}function Ooe(e){_n();var n,s,f;for(f=1,s=e.mb();s.G();)n=s.H(),f=31*f+(n!=null?qo(n):0),f=f|0;return f}function Doe(e,n){sr();var s,f;for(AS(n,"predicate"),f=0;e.G();f++)if(s=e.H(),n.D(s))return f;return-1}function U5(e,n){var s,f;return s=e.c.a,f=n.ac(s),e.b.b&&(f=yl(f,qq(e,n,s))),e.b.c&&(f=yl(f,Bq(e,n,s))),f}function Moe(e,n,s){var f,d;return f=new qS(n,s),d=new uy,e.b=ile(e,e.b,f,d),d.b||++e.c,e.b.b=!1,d.d}function eT(e,n,s){var f,d,b;for(f=new pi,b=xn(s,0);b.b!=b.d.c;)d=y(vn(b),10),kn(f,new hr(d));xOe(e,n,f)}function Y5(e,n){var s;return n===e?!0:Qe(n,144)?(s=y(n,144),e.P().t(s.P())):!1}function joe(e){var n;if(n=e.a.c.length,n>0)return Sw(n-1,e.a.c.length),zh(e.a,n-1);throw new $te}function Boe(e){e.b.c.length-e.e.c.length<0?(an(e,(Ye(),lt)),e.a.a=e.j.a):(an(e,(Ye(),vt)),e.a.a=0)}function qoe(e,n){MB(e>=0,"Negative initial capacity"),MB(n>=0,"Non-positive load factor"),Ws(this)}function Wh(e){var n;this.e=e,this.d=new v5(this.e.e),this.a=this.d,this.b=q5(this),n=e[Hf],this[Hf]=n}function W5(){this.n=null,this.j=null,this.i=null,this.d=null,this.b=null,this.k=null,this.a=null}function tT(e){var n,s,f,d;for(d=1,s=0,f=e.length;s<f;++s)n=e[s],d=31*d+(n!=null?qo(n):0),d=d|0;return d}function ti(e){var n,s,f,d;for(n={},f=0,d=e.length;f<d;++f)s=e[f],n[":"+(s.d!=null?s.d:""+s.e)]=s;return n}function Foe(e){HT();var n,s,f,d;for(s=iq(),f=0,d=s.length;f<d;++f)if(n=s[f],yie(n.a,e))return n;return jR}function $oe(e,n,s){var f,d,b;for(d=0,b=s.length;d<b;++d)if(f=s[d],e.b.Uc(n,f.yb()))return f;return null}function Goe(e,n,s){var f,d;for(d=s.mb();d.G();)if(f=y(d.H(),21),e.Uc(n,f.zb()))return!0;return!1}function K5(e,n){var s,f,d;for(d=e.b;d;){if(s=e.a.$b(n,d.d),s==0)return d;f=s<0?0:1,d=d.a[f]}return null}function sOe(e,n){var s,f;return s=y(jh(e.a,n),19),s?(f=e.b.Z(),f.jb(s),e.b.c-=s.Y(),s.Q(),f):null}function Hoe(e,n,s){var f;for(f=y(n.B(e),9);f.g==(wt(),Nn);)!f.n&&(f.n=new ln),jh(f.n,s),f=y(n.B(f),9)}function nT(e,n){var s;return La(e)&&La(n)&&(s=e-n,!isNaN(s))?s:Hue(La(e)?bl(e):e,La(n)?bl(n):n)}function gi(e){var n;return Qe(e,46)?e:(n=e&&e.__gwt$exception,n||(n=new gse(e),fne(n,e),nNe(e,n)),n)}function oOe(e){var n,s,f;for(n=0,f=new W(e.c);f.a<f.c.c.length;)s=y(K(f),226),n+=Jce(e,s.a,s.b);return n}function uOe(e){var n;return n=new pse(e),Hy(e.a,_de,new zs(xe(Ee(z0,1),st,160,0,[n]))),n.d&&tt(n.f,n.d),n.f}function zoe(e,n,s){switch(s.e){case 1:return y(bn(e.d,n),24);case 3:return y(bn(e.j,n),24)}return Mt(0)}function Voe(e,n,s){return e.d[n.k][s.k]||(lDe(e,n,s),e.d[n.k][s.k]=!0,e.d[s.k][n.k]=!0),e.a[n.k][s.k]}function X5(e,n,s){var f;return f=n.$b(s,e.b),f<0?e.e?y(UCe(X5(e.e,n,s),e),206):e:f==0?e:e.g?X5(e.g,n,s):null}function ho(e,n){return uo(e)?Co(e,n):pv(e)||gv(e)?(Rr(e),e===n):vS(e)?e.t(n):(lS(e),e===n)}function or(e,n){return Co(e.b,n)||hNe(e.b,n)&&($n(),n.length==Cy(e.b)||kie(e.b,Cy(e.b)-n.length-1)==46)}function rT(e,n){var s,f,d;for(s=0,d=wr(e,n).mb();d.G();)f=y(d.H(),7),s+=ee(f,(Oe(),Cu))!=null?1:0;return s}function cOe(e,n){var s,f,d;for(f=null,d=e.b;d;)s=e.a.$b(n,d.d),s>=0?d=d.a[1]:(f=d,d=d.a[0]);return f}function lOe(e,n){var s,f,d;for(f=null,d=e.b;d;)s=e.a.$b(n,d.d),s<=0?d=d.a[0]:(f=d,d=d.a[1]);return f}function fOe(e,n,s,f){var d,b;for(b=e.mb();b.G();)d=y(b.H(),33),d.i.a=n.a+(f.a-d.j.a)/2,d.i.b=n.b,n.b+=d.j.b+s}function Uoe(e,n){var s;e.c.length!=0&&(s=y(dr(e,Ge($r,oa,9,e.c.length,0,1)),51),oB(s,new $t),Que(s,n))}function Yoe(e,n){var s;e.c.length!=0&&(s=y(dr(e,Ge($r,oa,9,e.c.length,0,1)),51),oB(s,new Yt),Que(s,n))}function Woe(e){var n,s;return n=e.g,n==(wt(),Hn)?(s=y(ee(e,(Oe(),ai)),32),s==(Ye(),Et)||s==At):!1}function ni(e,n){var s;return Rr(n),s=e[":"+n],Jie(!!s,"Enum constant undefined: %s",xe(Ee(yt,1),st,1,4,[n])),s}function hOe(e,n,s){if(!e)throw new Rn(d0("lowerEndpoint (%s) > upperEndpoint (%s)",xe(Ee(yt,1),st,1,4,[n,s])))}function J5(e){throw JS(),new Yte("Unexpected typeof result '"+e+"'; please report this bug to the GWT team")}function iT(e){switch(e.e){case 1:return At;case 2:return vt;case 3:return Et;case 4:return lt;default:return Ar}}function Koe(e){switch(e.e){case 2:return _a;case 1:return ps;case 4:return Su;case 3:return Xu;default:return go}}function dOe(e){return e>=48&&e<58?e-48:e>=97&&e<97?e-97+10:e>=65&&e<65?e-65+10:-1}function vOe(e,n){var s,f;for(f=lae(uae(e.P()));f.b.G();)if(s=y(hne(f,f.b.H()),19),s.kb(n))return!0;return!1}function pOe(e){var n;if(!Roe(e))throw new Ga;return n=new Mne(e.c,e.a),e.b=n,e.a.i==e.c.a?e.a=null:e.a=e.a.i,n}function gOe(e,n){Qn();var s;return e===n?!0:Qe(n,57)?(s=y(n,57),pce(wf(e),s.bb())):!1}function bOe(e,n,s,f){return tv(),Mi(s,"oldCount"),Mi(f,"newCount"),e.Cb(n)==s?(e.Gb(n,f),!0):!1}function yOe(e,n,s,f,d){return Dt(s),Dt(d),eLe(new u5(e.c,Rle(e.b,new w_(e.d,!0,n,s,!1,null,(oo(),Ns))),e.a),f,d)}function Q5(e){switch(os(),e.Y()){case 0:return _v(),Fg;case 1:return new sl(e.mb().H());default:return new Lk(e)}}function Yr(e,n){var s;return La(e)&&La(n)&&(s=e+n,WT<s&&s<kl)?s:Xy(nOe(La(e)?bl(e):e,La(n)?bl(n):n))}function Xoe(e,n){var s;return La(e)&&La(n)&&(s=e*n,WT<s&&s<kl)?s:Xy(n4e(La(e)?bl(e):e,La(n)?bl(n):n))}function yl(e,n){var s;return La(e)&&La(n)&&(s=e-n,WT<s&&s<kl)?s:Xy(rOe(La(e)?bl(e):e,La(n)?bl(n):n))}function ur(){ur=a,go=new wy(ed,0),_a=new wy(Og,1),ps=new wy(Ng,2),Su=new wy("DOWN",3),Xu=new wy("UP",4)}function Cc(){Cc=a,mR=new Qm(ed,0),tF=new Qm("POLYLINE",1),id=new Qm("ORTHOGONAL",2),yR=new Qm("SPLINES",3)}function i_(){i_=a,_R=new kk("INHERIT",0),oF=new kk("INCLUDE_CHILDREN",1),uF=new kk("SEPARATE_CHILDREN",2)}function Joe(){Joe=a,zde=zi(fl(new Zn,(Kr(),KR)),nx),Vde=Hi(zi(Tw(new Zn,YR),UR),V0),Ude=Hi(cs(new Zn,WR),V0)}function Qoe(){Qoe=a,Yde=zi(fl(new Zn,(Kr(),KR)),nx),Wde=Hi(zi(Tw(new Zn,YR),UR),V0),Kde=Hi(cs(new Zn,WR),V0)}function Zoe(e){this.a=new ba,this.d=new ba,this.b=new ba,this.c=new ba,this.g=new ba,this.i=new ba,this.f=e}function eue(e,n,s,f,d,b){this.e=new Xe,this.f=(Ir(),MI),tt(this.e,e),this.d=n,this.a=s,this.b=f,this.f=d,this.c=b}function mOe(e,n,s,f,d,b,m,x){var S;for(S=s;b<m;)S>=f||n<s&&x.$b(e[n],e[S])<=0?Rs(d,b++,e[n++]):Rs(d,b++,e[S++])}function wOe(e,n,s,f,d){var b,m;for(m=e.mb();m.G();)b=y(m.H(),33),b.i.a=n.a,b.i.b=d?n.b:n.b+f.b-b.j.b,n.a+=b.j.a+s}function _Oe(e,n){sS();var s,f;for(f=Xt(o0(e));Vt(f);)if(s=y(Gt(f),12),s.d.f==n||s.c.f==n)return s;return null}function aT(e,n,s){var f,d,b;for(f=0,b=xn(e,0);b.b!=b.d.c&&(d=ze(nn(vn(b))),!(d>s));)d>=n&&++f;return f}function xOe(e,n,s){var f,d,b,m;for(Rr(s),m=!1,b=xn(e,n),d=xn(s,0);d.b!=d.d.c;)f=vn(d),By(b,f),m=!0;return m}function EOe(e,n){var s,f,d;return n.V()?!1:(d=e.Y(),s=e.d.jb(n),s&&(f=e.d.Y(),e.f.c+=f-d,d==0&&xw(e)),s)}function Ac(e,n){var s;return n&&(s=n.n?n.n:(_n(),_n(),b$),s.V()||(e.n?hoe(e.n,s):e.n=new vre(s))),e}function tue(e,n,s){var f;try{iOe(e,n,s)}catch(d){throw d=gi(d),Qe(d,181)?(f=d,new $S(f)):bi(d)}return n}function kOe(e,n,s){var f;try{AMe(e,n,s)}catch(d){throw d=gi(d),Qe(d,181)?(f=d,new $S(f)):bi(d)}return n}function bi(e){var n;return Qe(e,164)&&(n=y(e,164),ft(n.b)!==ft((m4(),B_)))?ft(n.b)===ft(B_)?null:n.b:e}function Cv(e,n){var s;for(s=y(ee(na(e),(Oe(),th)),9);s;){if(s==n)return!0;s=y(ee(na(s),th),9)}return!1}function SOe(e){switch(y(ee(e,(Oe(),Zu)),140).e){case 1:Ae(e,Zu,(yu(),Zv));break;case 2:Ae(e,Zu,(yu(),vd))}}function Bo(e){switch(os(),e.c){case 0:return _v(),Fg;case 1:return new sl(vce(new fv(e)));default:return new Ute(e)}}function Cr(e){Or();var n,s;for(n=0,s=e.length;n<s;n++)if(e[n]==null)throw new by("at index "+n);return new zs(e)}function TOe(e,n,s){return n.length==0||s.length==0?0:(e.e?e.b=new Wte(e.c):e.b=new Kte(e.c),e.b.Gc(n,s))}function zt(e){if(e.i==null)throw new rl("The task has not begun yet.");e.b||(e.c<e.j&&noe(e,e.j-e.c),e.b=!0)}function sT(e,n){var s,f;for(f=new W(n);f.a<f.c.c.length;)s=y(K(f),27),Vr(e.b.b,s.b),LPe(y(s.a,78),y(s.b,25))}function ROe(e,n){var s,f;for(f=new W(e.a);f.a<f.c.c.length;)if(s=y(K(f),222),poe(s,n))return;tt(e.a,new bie(n))}function IOe(e){var n,s,f;for(n=new Xe,f=new W(e.b);f.a<f.c.c.length;)s=y(K(f),251),Vn(n,y(s.Ac(),19));return n}function COe(e,n){var s,f,d;for(d=new Xe,f=wr(e,n).mb();f.G();)s=y(f.H(),7),d.c[d.c.length]=s;return Cs(d,new tn),d}function Wr(e){var n,s,f;for(n=new Xe,f=new W(e.f);f.a<f.c.c.length;)s=y(K(f),7),tt(n,s.b);return Dt(n),new dv(n)}function qn(e){var n,s,f;for(n=new Xe,f=new W(e.f);f.a<f.c.c.length;)s=y(K(f),7),tt(n,s.e);return Dt(n),new dv(n)}function Mt(e){var n,s;return e>-129&&e<128?(n=e+128,s=(Yie(),p$)[n],!s&&(s=p$[n]=new i4(e)),s):new i4(e)}function Z5(e){var n,s;for(n=xT(e.b,e.d),s=Fr;s>n;){if(F5(e,e.d),n==0){s=0;break}iue(e),lue(e),s=n,n=xT(e.b,e.d)}e.c=s}function nue(){xq();var e,n,s;s=XBe+++lNe(),e=yr(Math.floor(s*rR))&$6,n=yr(s-e*F6),this.a=e^1502,this.b=n^sR}function qo(e){return uo(e)?bT(e):pv(e)?yr((Rr(e),e)):gv(e)?Kt((Rr(e),e))?1231:1237:vS(e)?e.v():(lS(e),Ec(e))}function AOe(e,n,s){var f,d,b;d=new Mue,d.d=s,f=eMe(d,n),b=new ase,Kt(ze(Zt(ee(f,LF))))?DNe(b,f,new ww):kle(e,b,f),nfe(d,f)}function rue(e,n,s,f){var d,b,m,x;for(x=new bf(n,f),m=0,b=Df(x);b.G();)d=y(b.H(),7),Cn(e.i,d,Mt(m++));Cn(s,n,Mt(m))}function POe(e,n){var s,f,d,b,m;for(s=0,m=0,d=0,b=n.length;d<b;++d)f=n[d],s=Wce(e,s,f,(Ye(),lt),e.f),m=Wce(e,m,f,vt,e.n)}function LOe(e,n){var s,f,d,b;if(e.n)for(f=0,d=n.length;f<d;++f)s=n[f],b=bn(e.n,s),b!=null&&(s.nc(),s.oc())}function NOe(e,n){var s,f,d;for(f=new W(n);f.a<f.c.c.length;)s=y(K(f),75),d=O3e(e.a),Hse(e.a,d,s.k,s.j),Ig(s,d,!0)}function OOe(e,n){var s,f,d;for(f=new W(n);f.a<f.c.c.length;)s=y(K(f),75),d=p3e(e.a),Hse(e.a,d,s.k,s.j),Ig(s,d,!0)}function oT(e){var n,s;return s=y(ee(e,(Ke(),bo)),59),s==(ur(),go)?(n=y(ee(e,(Oe(),ep)),15).a,n>=1?_a:Su):s}function Vt(e){if(Dt(e.b),e.b.G())return!0;for(;e.a.G();)if(Dt(e.b=e.Wb(e.a.H())),e.b.G())return!0;return!1}function Kh(e){return(e.d!=e.c.d||e.i!=e.g.d)&&(e.a.c=Ge(yt,st,1,0,4,1),Vn(e.a,e.c),Vn(e.a,e.g),e.d=e.c.d,e.i=e.g.d),e.a}function hs(e){var n;if(e.b){if(hs(e.b),e.b.d!=e.c)throw new tg}else e.d.V()&&(n=y(bn(e.f.b,e.e),19),n&&(e.d=n))}function eq(e,n,s,f,d){var b,m,x,S;for(S=Ww(e),aOe(n,S,f,d,s),b=0,x=new W(S);x.a<x.c.c.length;)m=y(K(x),9),e[b++]=m}function DOe(e){var n,s,f;for(f=y(yne(e.a,(Ke(),zv)),15).a,s=new W(oce(e.a));s.a<s.c.c.length;)n=y(K(s),626),rBe(e,n,f)}function Zn(){var e,n;for(this.a=new sa(6),n=0;n<6;n++)tt(this.a,(e=y(ga(Sde),11),new Si(e,y(ta(e,e.length),11),0)))}function iue(e){var n,s,f;for(f=!1,s=0;s<e.d.length;s++)e.j=(n=new kq(e.e,e.d,s,0),new wq(s,e.d,n)),f=f|Kse(e,s);return f}function MOe(e,n,s){var f,d;for(d=e.a.c,f=d.c.length;f<s;f++)yf(d,0,new xf(e.a));ei(n,y(ht(d,d.c.length-s),16)),e.b[n.k]=s}function aue(e,n){var s,f;for(s=xn(e,0);s.b!=s.d.c;){if(f=ze(nn(vn(s))),f==n)return;if(f>n){Fy(s);break}}By(s,n)}function uT(e,n,s){var f;return f=gk(e.a,n),jCe(e.a,n,s===void 0?null:s),f===void 0?(++e.c,rS(e.b)):++e.d,f}function cT(e,n,s){return(n-e<=0?0-(n-e):n-e)<Sl||(s-e<=0?0-(s-e):s-e)<Sl?!0:n-e>Sl?e-s>Sl:s-e>Sl}function sue(e){switch(e.e){case 0:return yI;case 1:return fx;case 2:return mI;case 3:return wI;default:return _I}}function tq(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 a_(e){switch(Ye(),e.e){case 4:return Et;case 1:return lt;case 3:return At;case 2:return vt;default:return Ar}}function lT(e,n){if(n==e.c)return e.d;if(n==e.d)return e.c;throw new Rn("Node "+n+" not part of edge "+e)}function jOe(e,n){var s;return Do(e.a,n)?y(Do(e.a,n)?e.b[n.e]:null,62):(s=new Ste,ji(e.a,n),yS(e,n.e,s),s)}function oue(e,n){var s,f,d,b;for(b=e.g.tb(),s=0;b.G();){if(f=ze(nn(b.H())),d=f-n,d>Gf)return s;d>M_&&++s}return s}function s_(e){var n,s,f,d;return s=(n=y(ga((f=e.$c,d=f.f,d==Sn?f:d)),11),new Si(n,y(ta(n,n.length),11),0)),ji(s,e),s}function fT(e,n){var s,f;for(f=new W(n);f.a<f.c.c.length;)s=y(K(f),27),tt(e.b.b,y(s.b,25)),t_(y(s.a,78),y(s.b,25))}function BOe(e,n,s,f){var d,b,m;for(d=n+1;d<s;++d)for(b=d;b>n&&f.$b(e[b-1],e[b])>0;--b)m=e[b],Rs(e,b,e[b-1]),Rs(e,b-1,m)}function qOe(e){var n,s;if(!hu(y(ee(e,(Ke(),Nt)),28)))for(s=new W(e.f);s.a<s.c.c.length;)n=y(K(s),7),an(n,(Ye(),Ar))}function wu(e,n){switch(n.e){case 1:return co(e.f,(Ua(),DF));case 2:return co(e.f,(Ua(),MF));default:return _n(),_n(),ql}}function Er(e,n){return XB(n,(Ke(),yF))?ee(e.e,(Oe(),la)):XB(n,Vf)?ee(e.e,(Oe(),Jg)):ee(e.e,n)}function FOe(e,n,s,f){var d,b,m;for(b=n,d=s-1;b<=d;){if(m=(b+d)/2|0,e[m]==f)return m;e[m]<f?b=m+1:d=m-1}return-b-1}function Zy(e,n,s){var f,d;for(d=e.mb();d.G();)if(f=d.H(),ft(n)===ft(f)||n!=null&&ho(n,f))return s&&d.I(),!0;return!1}function uue(e,n,s){var f;return Jie(n<=s,"%s > %s",xe(Ee(yt,1),st,1,4,[Mt(n),Mt(s)])),f=e.length,s=s<f?s:f,vq(n,s,f),s-n}function cue(e,n){var s,f,d;s=e,d=0;do{if(s==n)return d;if(f=y(ee(s,(Oe(),th)),9),!f)throw new Zp;s=na(f),++d}while(!0)}function lue(e){var n,s,f;for(f=!1,s=e.d.length-1;s>=0;s--)e.j=(n=new kq(e.e,e.d,s,1),new wq(s,e.d,n)),f=f|Kse(e,s);return f}function nq(e){this.f=(Qn(),new ln),this.n=new ln,this.k=new ln,this.g=new ci,this.i=new Rue((Ote(),nhe)),this.j=e,POe(this,e)}function rq(e){var n;this.a=(n=y(e.e&&e.e(),11),new Si(n,y(ta(n,n.length),11),0)),this.b=Ge(yt,st,1,this.a.a.length,4,1)}function fue(e,n){var s;return n===e?!0:!Qe(n,18)||(s=y(n,18),s.Y()!=e.Y())?!1:e.lb(s)}function hT(e){switch(Vi(),e.e){case 1:return Iu;case 2:return Fc;case 3:return Ko;case 4:return Dl;default:return ld}}function hue(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 iq(){return HT(),xe(Ee(sde,1),nt,67,0,[ide,rde,ade,Khe,Whe,Xhe,Zhe,Qhe,Jhe,nde,tde,ede,Uhe,Vhe,Yhe,Hhe,Ghe,zhe,Fhe,qhe,$he,jR])}function ml(){ml=a,sd=new _y(ed,0),Tu=new _y("JUSTIFIED",1),mF=new _y("BEGIN",2),wF=new _y(N_,3),_F=new _y("END",4)}function Pc(){Pc=a,LR=new Zm("PORTS",0),$0=new Zm("PORT_LABELS",1),PR=new Zm("NODE_LABELS",2),F0=new Zm("MINIMUM_SIZE",3)}function ya(){ya=a,H0=new Rk("UNKNOWN",0),Yo=new Rk("ABOVE",1),Ju=new Rk("BELOW",2),ode=new xt("de.cau.cs.kieler.labelSide",H0)}function o_(){o_=a,d$=new Bk("EQUALLY_DISTRIBUTED",0),XI=new Bk("NORTH_STACKED",1),v$=new Bk("NORTH_SEQUENCE",2)}function $Oe(){j_={},!Array.isArray&&(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"})}function GOe(e,n){return ng(),ng(),((e-n>0?e-n:-(e-n))<=w0||e==n||isNaN(e)&&isNaN(n)?0:e<n?-1:e>n?1:wre(isNaN(e),isNaN(n)))>0}function aq(e,n){return ng(),ng(),((e-n>0?e-n:-(e-n))<=w0||e==n||isNaN(e)&&isNaN(n)?0:e<n?-1:e>n?1:wre(isNaN(e),isNaN(n)))<0}function dT(e){var n,s;for(e.d||z3e(e),s=new ea,n=e.b.mb(),n.H();n.G();)kn(s,y(n.H(),92).a);return Ct(s.b!=0),$u(s,s.c.b),s}function due(e){var n,s,f,d;for(d=new ba,n=new cl(e.c),m_(n),f=new W(n);f.a<f.c.c.length;)s=y(K(f),7),d.a.db(s,d);return d}function HOe(e,n){var s,f,d;for(Dt(n),f=(d=e.g,y(d||(e.g=new e4(e)),20)).mb();f.G();)s=y(f.H(),21),Bt(n,s.zb(),s.yb());return n}function vue(e,n){var s,f,d;return Qe(n,21)?(s=y(n,21),f=s.yb(),d=t0(e.qb(),f),$h(d,s.zb())&&(d!=null||e.qb().R(f))):!1}function sq(e,n){var s,f,d;for(d=e.g.tb();d.G();)if(s=ze(nn(d.H())),f=s-n<=0?0-(s-n):s-n,f<Gf)return d.L()-1;return e.g.Y()}function pue(e){var n,s;for(s=new W(e.a);s.a<s.c.c.length;)if(n=y(K(s),9),n.g==(wt(),ir)||n.g==ua)return!1;return!0}function en(e,n,s){if(e.b)throw new rl("The task is already done.");return e.i!=null?!1:(e.i=n,e.j=s,!0)}function zOe(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 VOe(e,n){if(n.c==e)return n.d;if(n.d==e)return n.c;throw new Rn("Input edge is not connected to the input port.")}function vT(e){var n;e.c!=0&&(n=y(ht(e.a,e.b),128),n.b==1?(++e.b,e.b<e.a.c.length&&gte(y(ht(e.a,e.b),128))):--n.b,--e.c)}function kg(e,n){return e.b.a=wn(e.b.a,n.c),e.b.b=wn(e.b.b,n.d),e.a.a=rt(e.a.a,n.c),e.a.b=rt(e.a.b,n.d),e.c[e.c.length]=n,!0}function UOe(e,n,s){var f,d;return f=ze(e.n[n.f.k])+ze(e.d[n.f.k])+n.i.b+n.a.b,d=ze(e.n[s.f.k])+ze(e.d[s.f.k])+s.i.b+s.a.b,d-f}function gue(e,n,s,f){var d,b,m;return d=!1,Tje(e.j,s,f)&&(TCe(e.j,e.d[n][s],e.d[n][f]),b=e.d[n],m=b[f],b[f]=b[s],b[s]=m,d=!0),d}function u_(e,n,s){var f,d,b,m,x;x=na(e),d=x.a,f=y(ee(x,(Oe(),Jo)),15).a,b=x.d,m=e.i,n&&(m.a=m.a-d.b-f-b.a),s&&(m.b=m.b-d.d-f-b.b)}function bue(e,n){var s,f,d;for(f=Xt(o0(e));Vt(f);)return s=y(Gt(f),12),d=y(n.B(s),9),new qm(Dt(d.i.b+d.j.b/2));return py(),py(),fR}function yue(e){var n,s,f,d,b;for(f=FT(e),n=$o,b=0,d=0;n>.5&&b<50;)d=Xce(f),s=Xh(f,d,!0),n=ki(s.b),++b;return Xh(e,d,!1)}function mue(e){var n,s,f,d,b;for(f=FT(e),n=$o,b=0,d=0;n>.5&&b<50;)d=Kce(f),s=Xh(f,d,!0),n=ki(s.a),++b;return Xh(e,d,!1)}function c_(e){var n,s,f;for(this.a=new ba,this.e=new ci,this.f=0,s=0,f=e.length;s<f;++s)n=e[s],!this.g&&(this.g=n),t_(this,n)}function wue(e){iB(this),this.c=e.c,this.f=e.f,this.e=e.e,this.k=e.k,this.d=e.d,this.g=za(e.g),this.j=e.j,this.i=e.i,this.b=za(e.b)}function pT(e){switch(e.e){case 1:return ur(),Xu;case 4:return ur(),ps;case 2:return ur(),_a;case 3:return ur(),Su}return ur(),go}function _ue(e,n){return SMe(e,n)?(Dn(e.g,n),!0):(n.g!=(Ye(),Ar)&&Dn(e.i,n),n.e.c.length==0?Dn(e.c,n):Dn(e.b,n),!1)}function xue(e,n){var s,f;return If(0,e.c.length),s=mT(n,Ge(yt,st,1,n.a.Y(),4,1)),f=s.length,f==0?!1:(LB(e.c,0,s),!0)}function gT(e,n){for(var s=0;!n[s]||n[s]=="";)s++;for(var f=n[s++];s<n.length;s++)!n[s]||n[s]==""||(f+=e+n[s]);return f}function YOe(){var e;return $_!=0&&(e=KLe(),e-ihe>2e3&&(ihe=e,G_=t.setTimeout(WCe,10))),$_++==0?(mNe((w4(),Q6)),!0):!1}function _u(e){var n,s;for(s=new W(e.a.b);s.a<s.c.c.length;)n=y(K(s),25),n.j.d=-n.j.d-n.j.c,n.o&&(n.g.a=-n.g.a+n.o.j.c);S_(e)}function e0(e,n){var s;for(s=e;n.b<n.d.Y()&&s==e;)s=(Ct(n.b<n.d.Y()),y(n.d.sb(n.c=n.b++),7)).g;s==e||(Ct(n.b>0),n.a.sb(n.c=--n.b))}function WOe(e){var n;Gi(y(ee(e,(Ke(),Nt)),28))&&(n=e.c,Hce((Gn(0,n.c.length),y(n.c[0],16))),Hce(y(ht(n,n.c.length-1),16)))}function Eue(e,n,s){en(s,"Compound graph preprocessor",1),e.a=new Ey,Cle(e,n,null),Uje(e,n),Ae(n,(Oe(),X7),e.a),e.a=null,Ws(e.b),zt(s)}function kue(e){var n,s;return n=y(Gt(Xt(Wr(e))),12),s=y(Gt(Xt(qn(e))),12),!Kt(ze(Zt(ee(n,(Oe(),ec)))))||!Kt(ze(Zt(ee(s,ec))))}function KOe(e,n,s){n.g==(wt(),ir)&&s.g==Nn&&(e.d=rT(n,(Ye(),At)),e.b=rT(n,Et)),s.g==ir&&n.g==Nn&&(e.d=rT(s,(Ye(),Et)),e.b=rT(s,At))}function XOe(e,n,s){var f,d,b,m;return b=n.g,m=s.g,b!=m?b.e-m.e:(f=e.a[n.k],d=e.a[s.k],!f&&!d?0:f?d?qr(f.a,d.a):1:-1)}function JOe(e,n,s,f){var d,b,m,x;for(b=n,d=s-1;b<=d;)if(m=b+d>>>1,x=e[m],x<f)b=m+1;else if(x>f)d=m-1;else return m;return-(b+1)}function QOe(e){return Qe(e,137)?(_n(),new dB(y(e,137))):Qe(e,18)?(_n(),new Ah(y(e,18))):Qe(e,20)?r5(y(e,20)):(_n(),new fy(e))}function Sue(e,n,s){return Qe(s,137)?new bB(e,n,y(s,137)):Qe(s,18)?new gB(e,n,y(s,18)):Qe(s,20)?f5(e,n,y(s,20),null):new Vy(e,n,s,null)}function Sg(e,n){var s;s=e.ub(n);try{return s.H()}catch(f){throw f=gi(f),Qe(f,74)?new Ao("Can't get element "+n):bi(f)}}function t0(e,n){Qn(),Dt(e);try{return e.cb(n)}catch(s){if(s=gi(s),Qe(s,119))return null;if(Qe(s,76))return null;throw bi(s)}}function ZOe(e,n){var s=e.a,f;n=String(n),s.hasOwnProperty(n)&&(f=s[n]);var d=(JS(),pR)[typeof f],b=d?d(f):J5(typeof f);return b}function Tue(e,n,s,f){n<s?(e.b=.5*(n+s),e.p=iR*e.b+.9*n,e.a=iR*e.b+.9*s):(e.b=.5*(n+f),e.p=iR*e.b+.9*f,e.a=iR*e.b+.9*n)}function Rue(e){Cne.call(this,e),this.b=new w_(e,!1,null,(oo(),Ns),!1,null,Ns),this.a=new e_(null,1),Fte(this.a,this.a),this.c=new g}function l_(e){switch(P4(),this.c=new Xe,this.d=e,e.e){case 0:case 2:this.a=yLe(NF),this.b=Wi;break;case 3:case 1:this.a=NF,this.b=ii}}function Fo(){Fo=a,gR=new sg("AUTOMATIC",0),V_=new sg(Ng,1),U_=new sg(Og,2),Y_=new sg("TOP",3),H_=new sg("BOTTOM",4),z_=new sg(N_,5)}function bT(e){yre();var n,s,f;return s=":"+e,f=Ex[s],f!==void 0?f:(f=_$[s],n=f===void 0?PMe(e):f,VPe(),Ex[s]=n,n)}function eDe(e,n,s,f,d,b,m){os();var x,S;return S=m.length+6,x=new sa(S),Jy(x,xe(Ee(yt,1),st,1,4,[e,n,s,f,d,b])),Jy(x,m),Gue(new W(x))}function tDe(e){var n;n=y(ee(e,(Ke(),Da)),18),!n.V()&&(n.kb((Nc(),xa))?(n.nb(xa),n.ib(ka)):n.kb(ka)&&(n.nb(ka),n.ib(xa)))}function nDe(e){var n;n=y(ee(e,(Ke(),Da)),18),!n.V()&&(n.kb((Nc(),Ja))?(n.nb(Ja),n.ib(Ka)):n.kb(Ka)&&(n.nb(Ka),n.ib(Ja)))}function rDe(e,n){var s,f,d,b;return d=e.g,s=ze(nn(ee(e,(Oe(),Hc)))),b=n.g,f=ze(nn(ee(n,Hc))),b!=(wt(),Hn)?-1:d!=Hn?1:s==f?0:s<f?-1:1}function iDe(e,n,s){var f,d;return f=il(gf(e,n.d),gf(e,n.c)),d=Ei(gf(e,n.d),gf(e,n.c)),Sv(U5(yOe(s,Mt(f),(oo(),Ns),Mt(d),Ns),(hw(),dR)))}function Iue(e,n){Qn(),Dt(e);try{return e.R(n)}catch(s){if(s=gi(s),Qe(s,119))return!1;if(Qe(s,76))return!1;throw bi(s)}}function Cue(e,n){No(),Dt(e);try{return l5(e,n)}catch(s){if(s=gi(s),Qe(s,119))return!1;if(Qe(s,76))return!1;throw bi(s)}}function aDe(e,n){return e.e<n.e?-1:e.e>n.e?1:e.f<n.f?-1:e.f>n.f?1:Ec(e)-Ec(n)}function Aue(e){switch(e.e){case 1:return Ye(),vt;case 4:return Ye(),Et;case 3:return Ye(),lt;case 2:return Ye(),At;default:return Ye(),Ar}}function Pue(e){var n,s;switch(n=bS(e.c,e.c.length),n.length){case 0:return R0;case 1:return s=new Rc(n[0]),s;default:return new mr(Cr(n))}}function sDe(e){var n,s,f,d;for(f=Ge(IBe,st,64,e.c.length,0,1),d=0,s=new W(e);s.a<s.c.c.length;)n=y(K(s),64),f[d++]=n;return new Uee(f)}function Lue(e){var n,s;if(!e.b)for(e.b=pf(e.a.b.c.length),s=new W(e.a.b);s.a<s.c.c.length;)n=y(K(s),33),tt(e.b,new nk(n));return e.b}function Av(e,n){var s,f,d;if(e.e)return 1;for(s=0,d=new W(n.f);d.a<d.c.c.length;)f=y(K(d),7),s+=f.b.c.length+f.e.c.length;return s}function Nue(e){var n,s,f,d;for(n=!1,d=!1,f=new W(e.f);f.a<f.c.c.length;)s=y(K(f),7),n=n|s.g==(Ye(),lt),d=d|s.g==vt;return n&&d}function Oue(e){var n,s;for(this.b=new Xe,this.c=e,this.a=!1,s=new W(e.b);s.a<s.c.c.length;)n=y(K(s),9),this.a=this.a|n.g==(wt(),ir)}function Ps(e){vB.call(this),this.g=(wt(),ir),this.f=(Mi(6,qf),new sa(6)),this.c=(Mi(2,qf),new sa(2)),this.e=new JE,this.b=new JE,this.a=e}function oq(e,n,s,f,d,b){iB(this),this.e=e,this.f=n,this.d=s,this.c=f,this.g=d,this.b=b,this.j=ze(nn(d.mb().H())),this.i=ze(nn(Yse(d)))}function oDe(e,n){if(e==null)throw new by("null key in entry: null="+n);if(n==null)throw new by("null value in entry: "+e+"=null")}function Due(){Due=a,ive=jy(new Zn,(Kr(),Vg)),ox=new xt("linearSegments.inputPrio",Mt(0)),ux=new xt("linearSegments.outputPrio",Mt(0))}function uq(e){var n,s,f,d;for(s=(d=new cy(e.b).a.bb().mb(),new ly(d));s.a.G();)n=(f=y(s.a.H(),21),y(f.zb(),19)),n.Q();Ws(e.b),e.c=0}function xn(e,n){var s,f;if(If(n,e.b),n>=e.b>>1)for(f=e.c,s=e.b;s>n;--s)f=f.b;else for(f=e.a.a,s=0;s<n;++s)f=f.a;return new Pie(e,n,f)}function Cf(e,n){var s,f,d;for(d=new li,f=e.mb();f.G();)s=y(f.H(),55),p0(s,d.a,0),d.a+=s.e.a+n,d.b=rt(d.b,s.e.b);return d.b>0&&(d.b+=n),d}function f_(e,n){var s,f,d;for(d=new li,f=e.mb();f.G();)s=y(f.H(),55),p0(s,0,d.b),d.b+=s.e.b+n,d.a=rt(d.a,s.e.a);return d.a>0&&(d.a+=n),d}function n0(e,n,s){var f,d,b;return d=y(bn(e.c,n),176),d?(b=RB(d,s),Kre(e,d),b):(f=new NB(e,n,s),Cn(e.c,n,f),Oae(f),null)}function uDe(e,n){return u3e(e.b).kb(n.c)?$Pe(e.b)?!(oS(n.d,e.c,e.a)&&oS(n.a,e.c,e.a)):oS(n.d,e.c,e.a)&&oS(n.a,e.c,e.a):!1}function cDe(e,n){return e.c<n.c||e.c==n.c&&_S(e.a)&&_S(n.a)&&gf(e.d,Uk(e.a,e.b))>gf(e.d,Uk(n.a,n.b))?-1:e.c==n.c&&Uk(e.a,e.b)==Uk(e.a,e.b)?0:1}function lDe(e,n,s){if(e.e)switch(e.b){case 1:IPe(e.c,n,s);break;case 0:RPe(e.c,n,s)}else _Le(e.c,n,s);e.a[n.k][s.k]=e.c.i,e.a[s.k][n.k]=e.c.e}function fDe(e,n,s){switch(s.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 cq(e){switch(e.e){case 8:return Ye(),Et;case 9:return Ye(),At;case 10:return Ye(),lt;case 11:return Ye(),vt;default:return Ye(),Ar}}function hDe(e){var n,s,f;for(n="Ot",f=il(e.length,5),s=0;s<f;s++)if(Co(e[s].d,n)){e.length>=s+1&&e.splice(0,s+1);break}return e}function yT(e,n){return uo(e)?!!Kfe[n]:e._c?!!e._c[n]:pv(e)?!!Wfe[n]:gv(e)?!!Yfe[n]:!1}function Mue(){z5(),this.i=(Qn(),new ln),this.a=new ln,this.k=new ln,this.j=new ln,this.b=new ln,this.n=new ln,this.f=new ln,this.e=new ln}function dDe(e,n){var s,f;n.a.R(e)||(f=y(ee(e,(Oe(),ai)),32),s=y(ht(e.f,0),7),f==(Ye(),Et)?an(s,At):f==At&&an(s,Et),n.a.db(e,n))}function jue(e){var n,s;return s=Ei(1,y(ee(e,(Oe(),js)),24).a),e.c.f.g==(wt(),ir)&&e.d.f.g==ir?n=1:e.c.f.g==ir||e.d.f.g==ir?n=2:n=8,s*n}function vDe(e){var n,s,f,d,b;for(b=y(ee(e,(Oe(),Pt)),7),n=y(dr(e.b,Ge(Ta,wa,12,e.b.c.length,0,1)),47),f=0,d=n.length;f<d;++f)s=n[f],Bn(s,b)}function pDe(e){var n,s,f,d,b;for(s=y(ee(e,(Oe(),Pt)),7),n=y(dr(e.e,Ge(Ta,wa,12,e.e.c.length,0,1)),47),d=0,b=n.length;d<b;++d)f=n[d],nr(f,s)}function Bue(e){var n,s;s=e.i,n=On(new Rt(s.a,s.b),e.j),this.d=wn(s.b,n.b),this.a=rt(s.b,n.b),this.b=wn(s.a,n.a),this.c=rt(s.a,n.a)}function Pv(e,n,s,f){var d,b,m,x;!f&&(f=(Nh(),Nh(),bd)),d=(b=uue(e,n,s),m=(x=new Array(s-n),Uy(x,e)),_T(e,n,m,0,b,!0),m),Cq(d,e,n,s,-n,f)}function dr(e,n){var s,f,d;for(d=e.c.length,n.length<d&&(n=(f=new Array(d),Uy(f,n))),s=0;s<d;++s)Rs(n,s,e.c[s]);return n.length>d&&Rs(n,d,null),n}function que(e,n){var s,f,d;for(d=e.a.length,n.length<d&&(n=(f=new Array(d),Uy(f,n))),s=0;s<d;++s)Rs(n,s,e.a[s]);return n.length>d&&Rs(n,d,null),n}function Ya(e){return uo(e)?e:pv(e)?Tne((Rr(e),e)):gv(e)?Fre(Kt((Rr(e),e))):vS(e)?e.w():lS(e)?Aae(e):e.toString?e.toString():"[JavaScriptObject]"}function gDe(e){var n,s,f,d,b;for(b=0,s=e.b,f=0,d=s.length;f<d;++f)n=s[f],n.g==(wt(),Nn)||Cn(e.c,n,Mt(b++)),rue(e,n,e.d,(Ye(),Et)),rue(e,n,e.j,At)}function h_(){h_=a,P7=new ky("SIMPLE",0),I7=new ky(nR,1),C7=new ky("LINEAR_SEGMENTS",2),uI=new ky("BRANDES_KOEPF",3),A7=new ky(Bfe,4)}function ma(){ma=a,gd=new Ty(Dg,0),e1=new Ty("FIRST",1),Bl=new Ty("FIRST_SEPARATE",2),Zg=new Ty("LAST",3),zc=new Ty("LAST_SEPARATE",4)}function d_(){d_=a,cx=new Dm,xve=zi(new Zn,(Kr(),Q_)),Eve=Hi(zi(new Zn,ix),rx),wve=Hi(cs(zi(Tw(new Zn,Z_),tx),Qv),ex),_ve=Hi(cs(new Zn,Qv),J_)}function bDe(e){var n,s,f,d;for(s=(d=new pn(e.d.a).a.bb().mb(),new mn(d));s.a.G();)n=(f=y(s.a.H(),21),y(f.yb(),12)),tt(n.c.e,n),tt(n.d.b,n)}function lq(e,n){var s,f;if(Tre(n>0),(n&-n)==n)return yr(n*Jh(e,31)*4656612873077393e-25);do s=Jh(e,31),f=s%n;while(s-f+(n-1)<0);return yr(f)}function yDe(e,n){if(e.c.f==n)return e.d.f;if(e.d.f==n)return e.c.f;throw new Rn("Node "+n+" is neither source nor target of edge "+e)}function mDe(e,n,s){return Tre(e>=0&&e<=1114111),e>=b0?(n[s++]=55296+(e-b0>>10&1023)&Eu,n[s]=56320+(e-b0&1023)&Eu,2):(n[s]=e&Eu,1)}function wDe(e,n){sr();for(var s,f;e.G();)if(!n.G()||(s=e.H(),f=n.H(),!(ft(s)===ft(f)||s!=null&&ho(s,f))))return!1;return!n.G()}function _De(e){var n,s,f;for(Ym(e.b.a),e.a=Ge(X_,st,25,e.c.b.a.b.c.length,0,1),n=0,f=new W(e.c.b.a.b);f.a<f.c.c.length;)s=y(K(f),25),s.k=n++}function xDe(e){var n,s,f,d;for(Cs(e.c,e.a),d=new W(e.c);d.a<d.c.c.length;)for(f=K(d),s=new W(e.b);s.a<s.c.c.length;)n=y(K(s),160),n.Ec(f)}function r0(e){var n,s;if(!e.a)for(e.a=pf(y(e.e,9).c.c.length),s=new W(y(e.e,9).c);s.a<s.c.c.length;)n=y(K(s),33),tt(e.a,new nk(n));return e.a}function i0(e){var n,s;if(!e.b)for(e.b=pf(y(e.e,7).c.c.length),s=new W(y(e.e,7).c);s.a<s.c.c.length;)n=y(K(s),33),tt(e.b,new nk(n));return e.b}function Fue(e){this.b=e,this.c=(Qn(),new ln),this.i=new ln,this.d=new ln,this.j=new ln,this.k=ft(ee(na(e[0]),(Ke(),ad)))===ft((Cc(),id)),gDe(this)}function Tg(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 fq(e){sr();var n;if(n=eNe(e),!Vt(e))throw new Ao("position (0) must be less than the number of elements that remained ("+n+")");return Gt(e)}function hq(e,n){var s,f;s=e.ub(n);try{return f=s.H(),s.I(),f}catch(d){throw d=gi(d),Qe(d,74)?new Ao("Can't remove element "+n):bi(d)}}function mT(e,n){var s,f,d,b;for(b=e.Y(),n.length<b&&(n=(d=new Array(b),Uy(d,n))),f=e.mb(),s=0;s<b;++s)Rs(n,s,f.H());return n.length>b&&Rs(n,b,null),n}function Lv(e,n,s){if(s&&(n<0||n>s.a.c.length))throw new Rn("index must be >= 0 and <= layer node count");e.d&&Vr(e.d.a,e),e.d=s,s&&yf(s.a,n,e)}function dq(e,n,s,f,d,b,m,x){var S,R;f&&(S=f.a[0],S&&dq(e,n,s,S,d,b,m),ADe(e,s,f.d,d,b,m)&&n.ib(f),R=f.a[1],R&&dq(e,n,s,R,d,b,m))}function vq(e,n,s){if(e<0)throw new Ao(cfe+e+" < 0");if(n>s)throw new Ao("toIndex: "+n+" > size "+s);if(e>n)throw new Rn(cfe+e+" > toIndex: "+n)}function wT(e,n){var s,f,d;return s=n.yb(),d=n.zb(),f=e.cb(s),!(!(ft(d)===ft(f)||d!=null&&ho(d,f))||f==null&&!e.R(s))}function EDe(e,n,s){var f;f=n.c.f,f.g==(wt(),Nn)?(Ae(e,(Oe(),ca),y(ee(f,ca),7)),Ae(e,Xi,y(ee(f,Xi),7))):(Ae(e,(Oe(),ca),n.c),Ae(e,Xi,s.d))}function kDe(e,n,s){var f;f=n.c.f,f.g==(wt(),Nn)?(Ae(e,(Oe(),ca),y(ee(f,ca),7)),Ae(e,Xi,y(ee(f,Xi),7))):(Ae(e,(Oe(),ca),n.c),Ae(e,Xi,s.d))}function pq(e,n,s){var f,d,b,m,x;for(_Ne(e),d=(e.i==null&&(e.i=Ge(RBe,Xr,46,0,0,1)),e.i),b=0,m=d.length;b<m;++b)f=d[b],pq(f);x=e.e,x&&pq(x)}function $ue(e,n){var s=new Array(n),f;switch(e){case 11:case 12:f=0;break;case 13:f=!1;break;default:return s}for(var d=0;d<n;++d)s[d]=f;return s}function SDe(e){var n,s,f,d;for(d=Ge($r,Xr,51,e.a.length,0,2),s=0;s<d.length;s++)f=e.a[s].length,n=Ge($r,oa,9,f,0,1),Dje(e.a[s],0,n,0,f),d[s]=n;return d}function wl(e){var n,s;if(!e.b)for(e.b=pf(y(e.e,9).f.c.length),s=new W(y(e.e,9).f);s.a<s.c.c.length;)n=y(K(s),7),tt(e.b,new Hne(n,e.c));return e.b}function TDe(e,n){Qn(),Dt(e);try{return uo(n)?yae(e,n):NT(e.d,n)}catch(s){if(s=gi(s),Qe(s,119))return null;if(Qe(s,76))return null;throw bi(s)}}function RDe(e){var n;return n=(Zse(),lpe),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 IDe(e,n,s){var f,d;return n.c==(Ir(),Ri)&&s.c==fa?-1:n.c==fa&&s.c==Ri?1:(f=cue(n.a,e.a),d=cue(s.a,e.a),n.c==Ri?d-f:f-d)}function CDe(e){var n,s,f,d,b;for(d=Fr,b=null,f=new W(e.d);f.a<f.c.c.length;)s=y(K(f),89),s.c.j^s.d.j&&(n=s.d.e-s.c.e-s.a,n<d&&(d=n,b=s));return b}function ADe(e,n,s,f,d,b,m){var x,S;return!(n.Xc()&&(S=e.a.$b(s,f),S<0||S==0)||n.Yc()&&(x=e.a.$b(s,b),x>0||x==0))}function Gue(e){os();var n,s;if(!e.G())return _v(),Fg;if(s=e.H(),!e.G())return new sl(s);n=new ba,Dn(n,Dt(s));do Dn(n,Dt(e.H()));while(e.G());return Q5(n)}function PDe(e,n,s){e.e=n,e.a=s,e.d=KS(e,(Ye(),lt)),e.d+=KS(e,vt),l0(e,n,s,lt,e.f),l0(e,n,s,vt,e.n),e.b=KS(e,lt),e.b+=KS(e,vt),l0(e,s,n,lt,e.f),l0(e,s,n,vt,e.n)}function Af(e){var n,s,f;for(s=($n(),e.length),f=0;f<s&&e.charCodeAt(f)<=32;)++f;for(n=s;n>f&&e.charCodeAt(n-1)<=32;)--n;return f>0||n<s?e.substr(f,n-f):e}function _T(e,n,s,f,d,b){var m,x,S;for(ft(e)===ft(s)&&(e=e.slice(n,n+d),n=0),x=n,S=n+d;x<S;)m=x+1e4<S?x+1e4:S,d=m-x,GLe(s,f,b?d:0,e.slice(x,m)),x=m,f+=d}function LDe(e){var n,s,f;return Hue(e,(Xw(),Z6))<0?-CAe((n=~e.l+1&Ls,s=~e.m+(n==0?1:0)&Ls,f=~e.h+(n==0&&s==0?1:0)&El,ll(n,s,f))):e.l+e.m*Zh+e.h*kl}function NDe(e,n){var s;switch(s=e.f,n.e){case 1:return-(e.i.b+e.j.b);case 2:return e.i.a-s.j.a;case 3:return e.i.b-s.j.b;case 4:return-(e.i.a+e.j.a)}return 0}function rr(){rr=a,Il=new ug(ed,0),yo=new ug("FREE",1),B0=new ug("FIXED_SIDE",2),Uv=new ug("FIXED_ORDER",3),Vo=new ug("FIXED_RATIO",4),Ti=new ug("FIXED_POS",5)}function ODe(e,n){var s,f,d,b;for(s=y(ee(n,(Oe(),pd)),18),b=y(ds(Ht,s),18),d=b.mb();d.G();)if(f=y(d.H(),18),!y(ds(e.a,f),20).V())return!1;return!0}function gq(e,n,s){this.b=new nS,this.i=new Xe,this.d=new Yee(this),this.g=e,this.a=n.c.length,this.c=n,this.e=y(ht(this.c,this.c.c.length-1),9),this.f=s,Pje(this)}function v_(){v_=a,fx=new Sy("ALWAYS_UP",0),yI=new Sy("ALWAYS_DOWN",1),wI=new Sy("DIRECTION_UP",2),mI=new Sy("DIRECTION_DOWN",3),_I=new Sy("SMART",4)}function Hue(e,n){var s,f,d,b,m,x,S,R;return S=e.h>>19,R=n.h>>19,S!=R?R-S:(d=e.h,x=n.h,d!=x?d-x:(f=e.m,m=n.m,f!=m?f-m:(s=e.l,b=n.l,s-b)))}function zue(e){var n,s,f,d;for(s=(d=new pn(e.p.a).a.bb().mb(),new mn(d));s.a.G();)if(n=(f=y(s.a.H(),21),y(f.yb(),89)),n.e&&e.b[n.b]<0)return n;return null}function a0(e,n){var s,f,d,b,m;f=wn(e.d,n.d),b=wn(e.e,n.e),d=rt(e.d+e.c,n.d+n.c),m=rt(e.e+e.b,n.e+n.b),d<f&&(s=f,f=d,d=s),m<b&&(s=b,b=m,m=s),Sie(e,f,b,d-f,m-b)}function p_(e,n){var s;if(XT in e.a){if(s=Jn(e,XT),!s.kc())throw new vu("The 'properties' property of a graph element must be an object.",s,e);ice(s.kc(),n,!0)}}function DDe(e,n){var s,f,d;if(f=e.b.j.e,e.a||(f+=e.b.j.b),d=n.b.j.e,n.a||(d+=n.b.j.b),s=qr(f,d),s==0){if(!e.a&&n.a)return-1;if(!n.a&&e.a)return 1}return s}function bq(e){var n,s;switch(y(ee(na(e),(sn(),zI)),174).e){case 0:return n=e.i,s=e.j,new Rt(n.a+s.a/2,n.b+s.b/2);case 1:return new hr(e.i);default:return null}}function cr(){Ua(),vB.call(this),this.g=(Ye(),Ar),this.a=new li,this.d=new JE,this.c=(Mi(2,qf),new sa(2)),this.b=(Mi(4,qf),new sa(4)),this.e=(Mi(4,qf),new sa(4))}function MDe(e,n,s){e.d=0,e.b=0,h3e(e,n,s),n.g==(wt(),_r)&&s.g==Nn?BS(n).g==(Ye(),Et)?e.d=1:e.b=1:s.g==_r&&n.g==Nn&&(BS(s).g==(Ye(),Et)?e.b=1:e.d=1),KOe(e,n,s)}function jDe(e,n){var s,f;for(f=new W(n);f.a<f.c.c.length;)s=y(K(f),9),e.a[s.d.k][s.k].a=HNe(e.e),e.a[s.d.k][s.k].d=ze(e.a[s.d.k][s.k].a),e.a[s.d.k][s.k].b=1}function BDe(e,n,s){var f,d,b;for(b=new W(n);b.a<b.c.c.length;)f=y(K(b),9),e.a[f.d.k][f.k].e=!1;for(d=new W(n);d.a<d.c.c.length;)f=y(K(d),9),l6(e,f,s)}function qDe(e,n){var s,f,d,b;for(s=0,f=0,b=new W(n.b);b.a<b.c.c.length;)d=y(K(b),33),s=rt(s,d.j.a),f+=d.j.b;Ae(n,(Oe(),npe),new Rt(s,f)),e.k<s&&(e.k=s),e.j+=f}function Vue(e,n){this.c=(Qn(),new ln),this.a=e,this.b=n,this.d=y(ee(e,(Oe(),nh)),134),ft(ee(e,(sn(),BI)))===ft((Yy(),lI))?this.e=new Hte:this.e=new Gte}function xT(e,n){var s,f,d,b;for(d=0,f=0;f<n.length;f++)s=n[f],f<n.length-1&&(b=n[f+1],d+=TOe(e,s,b)),d+=(e.d=new Fue(s),EMe(e.d)),d+=(e.a=new nq(s),HPe(e.a));return d}function yq(e){switch(e.c.e){case 1:return Ua(),HR;case 2:return Ua(),GR;case 3:return Ua(),zR;case 4:return Ua(),VR}throw new nv("Can't filter on undefined side")}function g_(e,n){var s;try{return s=e.c.a,!Oy(e.b,n)||!s?0:B5(s,e.d,n)}catch(f){if(f=gi(f),Qe(f,119))return 0;if(Qe(f,76))return 0;throw bi(f)}}function FDe(e){var n,s,f,d,b;for(f=new Wh(new xc(e.b).a);f.b;)s=xg(f),n=y(s.yb(),9),b=y(y(s.zb(),27).a,9),d=y(y(s.zb(),27).b,10),On(qu(n.i),On(Ts(b.i),d))}function $De(e,n,s){var f,d,b;if(f=qr(e.a[n.k],e.a[s.k]),f==0){if(d=y(ee(n,(Oe(),tp)),20),b=y(ee(s,tp),20),d.kb(s))return-1;if(b.kb(n))return 1}return f}function GDe(e,n){var s,f;switch(f=On(Ts(e.i),e.a),s=e.f.j,n.e){case 1:return-f.b;case 2:return-f.a+s.a;case 3:return-f.b+s.b;case 4:return-f.a;default:return 0}}function Uue(e,n){var s,f,d,b;for(d=0;d<n.length;d++)for(d+1<n.length&&g5(e,n[d+1],(Ir(),fa)),b=n[d],s=0,f=0;f<b.length;f++)EBe(e,b[f]),s+=e.Hc(b[f],s,(Ir(),Ri))}function mq(){mq=a,zve=cs(cs(fl(new Zn,(Kr(),l7)),c7),f7),Fve=Hi(cs(zi(Tw(new Zn,Z_),tx),Qv),ex),Gve=zi(new Zn,Q_),Hve=Hi(zi(new Zn,ix),rx),$ve=Hi(cs(new Zn,Qv),J_)}function HDe(e,n,s,f){ene();var d=uR;function b(){for(var m=0;m<d.length;m++)d[m]()}if(e)try{Sx(b)()}catch(m){e(n,m)}else Sx(b)()}function b_(e){if(H6==null&&(H6=/^\s*[+-]?(NaN|Infinity|((\d+\.?\d*)|(\.\d+))([eE][+-]?\d+)?[dDfF]?)\s*$/),!XCe(H6,e))throw new Wm(VT+e+'"');return parseFloat(e)}function s0(){s0=a,EI=new hg(Dg,0),D7=new hg("LEFTUP",1),j7=new hg("RIGHTUP",2),O7=new hg("LEFTDOWN",3),M7=new hg("RIGHTDOWN",4),xI=new hg("BALANCED",5)}function Rg(){Rg=a,gI=new fg("V_TOP",0),pI=new fg("V_CENTER",1),vI=new fg("V_BOTTOM",2),hI=new fg("H_LEFT",3),fI=new fg("H_CENTER",4),dI=new fg("H_RIGHT",5)}function y_(){y_=a,wR=new og(Dg,0),iF=new og("DIRECTED",1),sF=new og("UNDIRECTED",2),nF=new og("ASSOCIATION",3),aF=new og("GENERALIZATION",4),rF=new og("DEPENDENCY",5)}function wt(){wt=a,ir=new cg("NORMAL",0),Nn=new cg("LONG_EDGE",1),Hn=new cg("EXTERNAL_PORT",2),_r=new cg("NORTH_SOUTH_PORT",3),Ds=new cg("LABEL",4),ua=new cg("BIG_NODE",5)}function Yue(e,n,s,f,d,b,m){var x,S,R,N,D;if(N=d[b],R=b==m-1,x=R?f:0,D=$ue(x,N),f!=9&&xe(Ee(e,m-b),n[b],s[b],x,D),!R)for(++b,S=0;S<N;++S)D[S]=Yue(e,n,s,f,d,b,m);return D}function o0(e){var n,s,f;for(n=new Xe,f=new W(e.f);f.a<f.c.c.length;)s=y(K(f),7),tt(n,as((Or(),new mr(Cr(xe(Ee(yt,1),st,1,4,[s.b,s.e]))))));return Dt(n),new dv(n)}function wq(e,n,s){if(this.a=s,e>=n.length)throw new Ao("Greedy SwitchDecider: Free layer layer not in graph.");this.b=n[e],this.c=new vie(this.b),this.d=new yoe(this.b)}function Wue(e,n){var s;if(this.f=e,this.b=this.f.c,s=e.d,DS(n,s),n>=(s/2|0))for(this.e=e.e,this.d=s;n++<s;)Yae(this);else for(this.c=e.a;n-- >0;)Uae(this);this.a=null}function Pf(e){var n,s,f;for(s=new W(e.a.b);s.a<s.c.c.length;)n=y(K(s),25),f=n.j.d,n.j.d=n.j.e,n.j.e=f,f=n.j.c,n.j.c=n.j.b,n.j.b=f,f=n.g.a,n.g.a=n.g.b,n.g.b=f;S_(e)}function zDe(e,n){var s,f,d;for(f=new Ln(e.b,0);f.b<f.d.Y();)s=(Ct(f.b<f.d.Y()),y(f.d.sb(f.c=f.b++),33)),d=y(ee(s,(Ke(),Wa)),107),d==(mu(),zf)&&(lo(f),tt(n.b,s))}function VDe(e,n,s){var f,d,b,m;for(m=aa(e.f,n,0),b=new b4,b.b=s,f=new Ln(e.f,m);f.b<f.d.Y();)d=(Ct(f.b<f.d.Y()),y(f.d.sb(f.c=f.b++),9)),d.k=s,tt(b.f,d),lo(f);return b}function UDe(e,n){tv();var s,f,d;if(n.V())return!1;if(Qe(n,207))for(d=y(n,207),f=d.bb().mb();f.G();)s=y(f.H(),83),e.Bb(s.Zb(),s.Yb());else US(e,n.mb());return!0}function Nv(){Nv=a,G0=new ew("DEFAULT_MINIMUM_SIZE",0),DR=new ew("MINIMUM_SIZE_ACCOUNTS_FOR_INSETS",1),OR=new ew("COMPUTE_INSETS",2),NR=new ew("APPLY_ADDITIONAL_INSETS",3)}function Kue(e){var n,s,f,d;for(s=e.a.b+2,d=Ge(un,on,10,s,0,1),d[0]=Ts(ia(e.c)),f=xn(e.a,0);f.b!=f.d.c;)n=y(vn(f),10),d[f.a]=new Rt(n.a,n.b);return d[s-1]=Ts(ia(e.d)),d}function _q(e,n,s){var f,d,b;for(d=e.bb().mb();d.G();)if(f=y(d.H(),21),b=f.yb(),ft(n)===ft(b)||n!=null&&ho(n,b))return s&&(f=new ow(f.yb(),f.zb()),d.I()),f;return null}function YDe(e,n,s){var f,d;return f=e.a[n.d.k][n.k],d=e.a[s.d.k][s.k],f.a!=null&&d.a!=null?eae(f.a,d.a):f.a!=null?-1:d.a!=null?1:0}function WDe(e,n,s){var f,d,b;return d=n.c,b=n.d,f=s,Dn(e.a,n)?(_ue(e,d)&&(f=!0),_ue(e,b)&&(f=!0),f&&(Vr(n.c.e,n),Vr(n.d.b,n),Dn(e.d,n)),qDe(e,n),!0):!1}function Xh(e,n,s){var f,d;return d=oue(e,n),d==e.c?wB(e,sq(e,n)):s?(lce(e,n,e.c-d),wB(e,sq(e,n))):(f=new wue(e),lce(f,n,e.c-d),wB(f,sq(f,n)))}function KDe(){function e(){try{return new Map().entries().next().done}catch{return!1}}return typeof Map===sfe&&Map.prototype.entries&&e()?Map:K4e()}function ds(e,n){var s;return s=y(bn(e.b,n),19),!s&&(s=e.Z()),Qe(s,137)?new bB(e,n,y(s,137)):Qe(s,18)?new gB(e,n,y(s,18)):Qe(s,20)?f5(e,n,y(s,20),null):new Vy(e,n,s,null)}function Lc(e){switch(fu(e.e)-fu(e.g)){case-2:return _re(e.g)>0&&(e.g=nce(e.g)),tce(e);case 2:return _re(e.e)<0&&(e.e=tce(e.e)),nce(e);default:return e.d=1+Ei(fu(e.e),fu(e.g)),e}}function Xue(e,n){this.f=(Qn(),new ln),this.b=new ln,this.j=new ln,this.a=e,this.c=n,this.c>0&&xce(this,this.c-1,(Ye(),lt)),this.c<this.a.length-1&&xce(this,this.c+1,(Ye(),vt))}function XDe(e){var n;e.c==null&&(n=ft(e.b)===ft(B_)?null:e.b,e.d=n==null?Vu:Kie(n)?EAe(gae(n)):uo(n)?"String":Km(wg(n)),e.a=e.a+": "+(Kie(n)?DAe(gae(n)):n+""),e.c="("+e.d+") "+e.a)}function JDe(e){var n,s,f,d;for(s=new W(e.a.c);s.a<s.c.c.length;)for(n=y(K(s),9),d=xn(za(n.c),0);d.b!=d.d.c;)f=y(vn(d),33),ee(f,(Oe(),Pt))==null&&Vr(n.c,f);return null}function Lf(e,n){var s,f,d,b,m;for(m=new Xe,f=y(xv(Jf,e),20).mb();f.G();)s=y(f.H(),75),Vn(m,s.b);for(m_(m),HS(m,e.a),b=new W(m);b.a<b.c.c.length;)d=y(K(b),7),Sc(n,d)}function QDe(e){for(var n,s,f,d;e.o.a.c.length!=0;)s=y(joe(e.o),27),f=y(s.a,61),n=y(s.b,89),d=lT(n,f),n.d==f?(hl(d.g,n),f.e=d.e+n.a):(hl(d.c,n),f.e=d.e-n.a),tt(e.e.a,f)}function Jue(e,n,s){var f,d,b;return Mi(s,"count"),Oy(e.b,n)?(b=e.c.a,b?(d=Ge(gr,vr,26,1,12,1),f=Xq(b,e.d,n,s,d),Aw(e.c,b,f),d[0]):(s>0&&__(e,n,s),0)):(hv(s==0),0)}function Que(e,n){var s,f,d,b,m;for(d=y(ee(n,(Oe(),la)),15).a*y(ee(n,(sn(),tc)),15).a,m=e[0].i.a+e[0].j.a,b=1;b<e.length;b++)s=e[b].i,f=e[b].j,s.a<=m+d&&(s.a=m+d),m=s.a+f.a}function xq(){xq=a;var e,n,s,f;for(y$=Ge(Ra,Ui,26,25,12,1),m$=Ge(Ra,Ui,26,33,12,1),f=152587890625e-16,n=32;n>=0;n--)m$[n]=f,f*=.5;for(s=1,e=24;e>=0;e--)y$[e]=s,s*=.5}function Zue(e){for(;e.g.c!=0&&e.d.c!=0;)Qk(e.g).c>Qk(e.d).c?(e.i+=e.g.c,vT(e.d)):Qk(e.d).c>Qk(e.g).c?(e.e+=e.d.c,vT(e.g)):(e.i+=jie(e.g),e.e+=jie(e.d),vT(e.g),vT(e.d))}function ZDe(e){if(!e)throw new lk("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 eMe(e,n){var s,f;return Ws(e.i),Ws(e.a),Ws(e.k),Ws(e.j),Ws(e.b),Ws(e.n),Ws(e.f),Ws(e.e),e.d&&(f=Jn(e.d,EF.b),f&&f.ic()&&(e.c=f.ic().a)),s=Kle(e,n,null),mle(e,n),s}function tMe(e){var n,s,f,d,b,m;for(f=gle(FT(e)),n=$o,b=0,d=0;n>.5&&b<50;)d=Xce(f),s=Xh(f,d,!0),n=ki(s.b),++b;return m=nn(Sg(za(e.g),za(e.g).b-1)),Xh(e,(Rr(m),m-d),!1)}function nMe(e){var n,s,f,d,b,m;for(f=gle(FT(e)),n=$o,b=0,d=0;n>.5&&b<50;)d=Kce(f),s=Xh(f,d,!0),n=ki(s.a),++b;return m=nn(Sg(za(e.g),za(e.g).b-1)),Xh(e,(Rr(m),m-d),!1)}function _l(e){var n,s,f,d;for(d=new rg("["),n=!1,f=e.mb();f.G();)s=f.H(),n?d.a+=", ":n=!0,Vs(d,s===e?"(this Collection)":($n(),s==null?Vu:Ya(s)));return d.a+="]",d.a}function ece(e){var n,s,f,d;for(d=new rg("{"),n=!1,f=e.bb().mb();f.G();)s=y(f.H(),21),n?d.a+=", ":n=!0,Vs(d,Xae(e,s.yb())),d.a+="=",Vs(d,Xae(e,s.zb()));return d.a+="}",d.a}function tce(e){var n;return uw(!!e.g),n=e.g,e.g=n.e,n.e=e,n.j=e.j,n.a=e.a,e.a=1+uk(e.e)+uk(e.g),e.j=Yr(Yr(e.c,ck(e.e)),ck(e.g)),e.d=1+Ei(fu(e.e),fu(e.g)),n.d=1+Ei(fu(n.e),fu(n.g)),n}function nce(e){var n;return uw(!!e.e),n=e.e,e.e=n.g,n.g=e,n.j=e.j,n.a=e.a,e.a=1+uk(e.e)+uk(e.g),e.j=Yr(Yr(e.c,ck(e.e)),ck(e.g)),e.d=1+Ei(fu(e.e),fu(e.g)),n.d=1+Ei(fu(n.e),fu(n.g)),n}function rMe(e){var n;vf(new W(wl(e.e)))&&(n=y(Er(e.e,(Ke(),Nt)),28),n==(rr(),Ti)?I3e(e.e):n==Vo?k4e(e.e):Kt(ze(Zt(Er(e.e,L0))))||e.e.e.j.a==0&&e.e.e.j.b==0?y3e(e.e):b4e(e))}function Eq(e,n,s){var f,d,b;if(d=new W(e),d.a<d.c.c.length){for(b=y(K(d),33),f=Lle(b,n,s);d.a<d.c.c.length;)b=y(K(d),33),P5(f,Lle(b,n,s));return new zy(f)}else return null}function iMe(e,n){var s,f,d,b,m,x;for(d=0,f=new W(n.c);f.a<f.c.c.length;)for(s=y(K(f),16),m=new W(s.a);m.a<m.c.c.length;)b=y(K(m),9),x=b.j.a+b.e.c+b.e.b+e.b,d=d>x?d:x;return d}function aMe(e,n){yg();var s;if(e.c==n.c){if(e.b==n.b||kNe(e.b,n.b)){if(s=iAe(e.b)?1:-1,e.a&&!n.a)return s;if(!e.a&&n.a)return-s}return Ire(e.b.e,n.b.e)}else return qr(e.c,n.c)}function rce(e){var n,s;switch(s=Ts(Pn(xe(Ee(un,1),on,10,0,[e.f.i,e.i,e.a]))),n=e.f.e,e.g.e){case 1:s.b-=n.d;break;case 2:s.a+=n.c;break;case 3:s.b+=n.a;break;case 4:s.a-=n.b}return s}function sMe(e,n){var s;return s=0,n.g==(wt(),_r)?(b5(n).f!=e.a&&(rre(e,b5(n).f),e.e=!0),e.e?++e.g:s+=e.f):n.g==Nn?e.e?s+=e.g:++e.f:n.g==ir&&(rre(e,n),e.e=!1),s}function oMe(e,n,s,f,d){var b,m,x,S;for(S=null,x=new W(f);x.a<x.c.c.length;)if(m=y(K(x),187),m!=s&&aa(m.e,d,0)!=-1){S=m;break}b=OS(d),nr(b,s.b),Bn(b,S.b),Bt(e.a,d,new _w(b,n,s.f))}function uMe(e){switch(y(ee(e,(sn(),Gr)),85).e){case 1:Ae(e,Gr,(ma(),Zg));break;case 2:Ae(e,Gr,(ma(),zc));break;case 3:Ae(e,Gr,(ma(),e1));break;case 4:Ae(e,Gr,(ma(),Bl))}}function ice(e,n,s){var f,d,b,m;if(e)for(d=(b=foe(e,Ge(lR,Xr,2,0,5,1)),new ev(new zs(new Bne(e,b).b)));d.b<d.d.Y();)f=(Ct(d.b<d.d.Y()),bv(d.d.sb(d.c=d.b++))),m=Jn(e,f),TBe(n,f,m,s)}function cMe(e,n,s){var f,d,b,m,x,S;for(d=1;d<e;)d*=2;for(S=2*d-1,d-=1,x=Ge(gr,vr,26,S,12,1),f=0,m=0;m<n;m++)for(b=s[m]+d,++x[b];b>0;)b%2>0&&(f+=x[b+1]),b=(b-1)/2|0,++x[b];return f}function Ig(e,n,s){var f,d,b,m;if(e.e=n,s)for(d=(m=new pn(e.a.a).a.bb().mb(),new mn(m));d.a.G();)f=(b=y(d.a.H(),21),y(b.yb(),12)),Ae(f,(Oe(),Z0),e.e),an(f.c,n.a),an(f.d,n.b)}function Cg(){Cg=a,W0=new lg(Dg,0),w7=new lg(Ng,1),E7=new lg(Og,2),x7=new lg("LEFT_RIGHT_CONSTRAINT_LOCKING",3),_7=new lg("LEFT_RIGHT_CONNECTION_LOCKING",4),m7=new lg("EDGE_LENGTH",5)}function kq(e,n,s,f){var d;this.b=f,this.e=e.a,d=n[s],this.d=fS(i1,[Xr,k0],[227,26],13,[d.length,d.length],2),this.a=fS(gr,[Xr,vr],[52,26],12,[d.length,d.length],2),this.c=new Xue(n,s)}function lMe(e,n,s,f){var d,b;for(b=n,d=b.d==null||e.a.$b(s.d,b.d)>0?1:0;b.a[d]!=s;)b=b.a[d],d=e.a.$b(s.d,b.d)>0?1:0;b.a[d]=f,f.b=s.b,f.a[0]=s.a[0],f.a[1]=s.a[1],s.a[0]=null,s.a[1]=null}function fMe(e,n,s){var f,d,b,m;if(en(s,Ife,1),Ule(e.d,n),m=a4e(e.a,n),m.Y()==1)n6(y(m.sb(0),55),s);else for(b=1/m.Y(),d=m.mb();d.G();)f=y(d.H(),55),n6(f,Uh(s,b));RCe(e.a,m,n),Sle(n),zt(s)}function ace(e,n,s){var f,d,b,m,x;for(x=new bf(n,s),m=Df(x);m.G();)for(b=y(m.H(),7),d=Xt(as((Or(),new mr(Cr(xe(Ee(yt,1),st,1,4,[b.b,b.e]))))));Vt(d);)f=y(Gt(d),12),Rf(f)||bMe(e,n,b,f)}function sce(e,n){var s,f,d;for(d=wr(e,n),f=d.mb();f.G();)if(s=y(f.H(),7),ee(s,(Oe(),Cu))!=null||Vt(Xt(as((Or(),new mr(Cr(xe(Ee(yt,1),st,1,4,[s.b,s.e]))))))))return!0;return!1}function ET(e){var n,s;if($y(e))throw new Rn(Gfe);for(s=xn(e,0);s.b!=s.d.c;)n=y(vn(s),10),this.d=wn(this.d,n.b),this.c=rt(this.c,n.a),this.a=rt(this.a,n.b),this.b=wn(this.b,n.a)}function hMe(e,n,s){if(n<0||s<0)throw new Rn("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>s&&(e.b=s),e}function wr(e,n){switch(n.e){case 1:return co(e.f,(Ua(),HR));case 2:return co(e.f,(Ua(),GR));case 3:return co(e.f,(Ua(),zR));case 4:return co(e.f,(Ua(),VR));default:return _n(),_n(),ql}}function dMe(e){var n,s,f,d;for(d=(sr(),new Po(Lo(du(e.a,new w))));Vt(d);)for(f=y(Gt(d),9),f.g==(wt(),Ds)&&Ae(f,(Oe(),Js),(ya(),Ju)),s=Xt(qn(f));Vt(s);)n=y(Gt(s),12),OT(n,(ya(),Ju))}function vMe(e){var n,s,f,d;for(d=(sr(),new Po(Lo(du(e.a,new w))));Vt(d);)for(f=y(Gt(d),9),f.g==(wt(),Ds)&&Ae(f,(Oe(),Js),(ya(),Yo)),s=Xt(qn(f));Vt(s);)n=y(Gt(s),12),OT(n,(ya(),Yo))}function kT(e,n){switch(this.b=new ci,e){case 0:this.d=new hte(this);break;case 1:this.d=new lte(this);break;case 2:this.d=new fte(this);break;default:throw new Zp}this.c=n,this.a=.2*n}function oce(e){var n,s,f,d;if(!e.b)for(e.b=new Xe,s=new W(e.a.c);s.a<s.c.c.length;)for(n=y(K(s),16),d=new W(n.a);d.a<d.c.c.length;)f=y(K(d),9),tt(e.b,new Gne(f,e.c));return e.b}function pMe(e,n){var s,f,d;s=GAe(n,e.e),f=y(bn(e.g.f,s),24).a,d=e.a.c.length-1,e.a.c.length!=0&&y(ht(e.a,d),128).c==f?(++y(ht(e.a,d),128).a,++y(ht(e.a,d),128).b):tt(e.a,new Qre(f))}function Sq(e){$n();var n,s;return e>=b0?(n=55296+(e-b0>>10&1023)&Eu,s=56320+(e-b0&1023)&Eu,String.fromCharCode(n)+(""+String.fromCharCode(s))):String.fromCharCode(e&Eu)}function gMe(e,n,s,f){var d,b,m;switch(d=na(s),b=oT(d),m=new cr,An(m,s),f.e){case 1:an(m,iT(a_(b)));break;case 2:an(m,a_(b))}return Ae(m,(Oe(),Jg),y(ee(n,Jg),15)),Ae(n,Pt,m),Cn(e.b,m,n),m}function bMe(e,n,s,f){var d;tt(e.c,new JB(e,s,f,y(bn(e.k,s),24).a)),_S(f)&&(n==e.e?f.d.f!=e.a&&f.c.f!=e.a:f.d.f!=e.e&&f.c.f!=e.e)&&(d=s==f.c?f.d:f.c,tt(e.c,new JB(e,d,f,y(bn(e.k,d),24).a)))}function uce(e,n){var s,f,d;if(n===e)return!0;if(!Qe(n,57)||(d=y(n,57),e.Y()!=d.Y()))return!1;for(f=d.bb().mb();f.G();)if(s=y(f.H(),21),!e._(s))return!1;return!0}function cce(e,n){var s,f,d;return f=new Ps(e),Ac(f,n),Ae(f,(Oe(),gx),n),Ae(f,(Ke(),Nt),(rr(),Ti)),Ae(f,Xs,(Fo(),z_)),Ss(f,(wt(),Hn)),s=new cr,An(s,f),an(s,(Ye(),vt)),d=new cr,An(d,f),an(d,lt),f}function Tq(e,n){var s,f,d;for(d=Fr,f=new W(Kh(n));f.a<f.c.c.length;)s=y(K(f),89),s.e&&!e.c[s.b]&&(e.c[s.b]=!0,d=il(d,Tq(e,lT(s,n))));return e.i[n.b]=e.j,e.g[n.b]=il(d,e.j++),e.g[n.b]}function lce(e,n,s){var f,d,b,m;if(m=e.g.tb(),e.e)for(d=0;d<e.c;d++)m.H();else for(d=0;d<e.c-1;d++)m.H();for(b=e.b.tb(),f=ze(nn(m.H()));f-n<Gf;)f=ze(nn(m.H())),b.H();m.M(),sle(e,s,n,b,m)}function fce(e,n){var s,f,d,b;for(f=0,d=e.length;f<d;f++){b=e[f];try{b[1]?b[0].bd()&&(n=nPe(n,b)):b[0].bd()}catch(m){if(m=gi(m),Qe(m,46))s=m,vPe(Qe(s,164)?y(s,164).cc():s);else throw bi(m)}}return n}function yMe(e){var n,s,f;if(f=e.c.a,!f)return null;if(e.b.b){if(n=e.b.e,s=X5(e.c.a,e.d,n),!s)return null;e.b.d==(oo(),Ns)&&e.d.$b(n,s.b)==0&&(s=s.i)}else s=e.a.i;return s==e.a||!Oy(e.b,s.b)?null:s}function mMe(e,n){var s,f,d,b,m,x;for(b=0,f=new W(n.c);f.a<f.c.c.length;){for(s=y(K(f),16),d=0,x=new W(s.a);x.a<x.c.c.length;)m=y(K(x),9),d+=m.j.b+m.e.a+m.e.d+e.a;d-=e.a,b=b>d?b:d}return b}function wMe(e){var n,s,f,d,b;for(b=Fr,d=Fr,f=new W(Kh(e));f.a<f.c.c.length;)s=y(K(f),89),n=s.d.e-s.c.e,s.d==e&&n<d?d=n:n<b&&(b=n);return d==Fr&&(d=-1),b==Fr&&(b=-1),new jr(Mt(d),Mt(b))}function hce(e,n,s){var f,d,b,m,x;for(n.k=-1,x=wu(n,(Ir(),Ri)).mb();x.G();)for(m=y(x.H(),7),d=new W(m.e);d.a<d.c.c.length;)f=y(K(d),12),b=f.d.f,n!=b&&(b.k<0?s.ib(f):b.k>0&&hce(e,b,s));n.k=0}function dce(e,n){if(0>n)throw new Rn("Top must be smaller or equal to bottom.");if(0>e)throw new Rn("Left must be smaller or equal to right.");this.d=0,this.c=e,this.a=n,this.b=0}function ST(e){var n,s,f;if(e.length==0)throw new Rn(Gfe);for(s=0,f=e.length;s<f;++s)n=e[s],this.d=wn(this.d,n.b),this.c=rt(this.c,n.a),this.a=rt(this.a,n.b),this.b=wn(this.b,n.a)}function _Me(){return Kr(),xe(Ee(Sde,1),nt,37,0,[t7,HF,d7,$F,KR,l7,XR,a7,YR,Z_,i7,r7,nx,VF,UR,ZR,tI,tx,QF,Q_,u7,eI,ix,zF,s7,c7,o7,JR,KF,Qv,WR,JF,f7,n7,UF,Vg,ZF,V0,FF,XF,YF,QR,rx,ex,WF,nI,e7,GF,h7,J_])}function xMe(e,n){var s,f,d,b,m,x,S,R,N;for(N=0,f=0,d=n.length;f<d;++f)for(s=n[f],m=0,x=s.length;m<x;++m)for(b=s[m],R=new W(b.f);R.a<R.c.c.length;)S=y(K(R),7),S.k=N++;e.a=Ge(gr,vr,26,N,12,1)}function vce(e){sr();var n,s,f;if(n=e.H(),!e.G())return n;for(f=new ig,f.a+="expected one element but was: <"+n,s=0;s<4&&e.G();s++)Vs(f,", "+e.H());throw e.G()&&(f.a+=", ..."),f.a+=">",new Rn(f.a)}function EMe(e){var n,s,f,d,b;for(n=0,f=e.b,d=0,b=f.length;d<b;++d)s=f[d],n+=sMe(e,s),Gi(y(ee(s,(Ke(),Nt)),28))&&(wr(s,(Ye(),Et)).mb().G()&&(n+=hle(e,s,Et)),wr(s,At).mb().G()&&(n+=hle(e,s,At)));return n}function TT(e,n,s,f){var d,b,m,x,S;if(f.d.c+f.e.c==0)for(m=e.a[e.c],x=0,S=m.length;x<S;++x)b=m[x],Cn(f,b,new doe(e,b,s));return d=y(Oi(Di(f.d,n)),284),d.b=0,d.c=d.f,d.c==0||gte(y(ht(d.a,d.b),128)),d}function m_(e){var n;_n();var s,f,d,b,m,x;if(Qe(e,63))for(b=0,d=e.Y()-1;b<d;++b,--d)n=e.sb(b),e.wb(b,e.sb(d)),e.wb(d,n);else for(s=e.tb(),m=e.ub(e.Y());s.L()<m.N();)f=s.H(),x=m.M(),s.O(x),m.O(f)}function kMe(e,n,s){return e<0||e>s?Iq(e,s,"start index"):n<0||n>s?Iq(n,s,"end index"):d0("end index (%s) must not be less than start index (%s)",xe(Ee(yt,1),st,1,4,[Mt(n),Mt(e)]))}function Rq(e){if(!("id"in e.a))throw new Ly("Every graph element must specify an 'id' property.",e);if(!Jn(e,"id").lc())throw new Ly("Invalid format for 'id'. Must be a string, was "+Jn(e,"id").$c,e)}function Nf(e,n){var s,f,d,b,m,x,S;for(S=e.b,f=y(xv(Jf,e),20).mb();f.G();)for(s=y(f.H(),75),x=(b=new pn(s.c.a).a.bb().mb(),new mn(b));x.a.G();)m=(d=y(x.a.H(),21),y(d.yb(),7)),Sc(n,m),x_(m,S)}function SMe(e,n){var s,f,d;for(d=new W(n.e);d.a<d.c.c.length;)if(s=y(K(d),12),s.d.f!=e.f)return!0;for(f=new W(n.b);f.a<f.c.c.length;)if(s=y(K(f),12),s.c.f!=e.f)return!0;return!1}function RT(e){var n,s,f,d;for(Dw(e.c),Dw(e.b),Dw(e.a),d=(s=new pn(e.e).a.bb().mb(),new mn(s));d.a.G();)f=(n=y(d.a.H(),21),y(n.yb(),60)),f.c!=2&&(ji(e.a,f),f.c==0&&ji(e.c,f)),ji(e.b,f);e.d=!1}function pce(e,n){var s;if(e===n)return!0;if(Qe(n,18)){s=y(n,18);try{return e.Y()==s.Y()&&e.lb(s)}catch(f){if(f=gi(f),Qe(f,76))return!1;if(Qe(f,119))return!1;throw bi(f)}}return!1}function Oa(e,n,s){var f,d,b,m;if(m=n==null?0:e.b.Vc(n),d=(f=D4(e.a,m),f??[]),d.length==0)MCe(e.a,m,d);else if(b=$oe(e,n,d),b)return b.Ab(s);return Rs(d,d.length,new ow(n,s)),++e.c,rS(e.b),null}function Iq(e,n,s){if(e<0)return d0(lfe,xe(Ee(yt,1),st,1,4,[s,Mt(e)]));if(n<0)throw new Rn(ffe+n);return d0("%s (%s) must not be greater than size (%s)",xe(Ee(yt,1),st,1,4,[s,Mt(e),Mt(n)]))}function TMe(e,n){if(e<0)return d0(lfe,xe(Ee(yt,1),st,1,4,["index",Mt(e)]));if(n<0)throw new Rn(ffe+n);return d0("%s (%s) must be less than size (%s)",xe(Ee(yt,1),st,1,4,["index",Mt(e),Mt(n)]))}function gce(e){var n,s,f,d;for(d=Ge($r,Xr,51,e.c.c.length,0,2),f=new Ln(e.c,0);f.b<f.d.Y();)n=(Ct(f.b<f.d.Y()),y(f.d.sb(f.c=f.b++),16)),s=f.b-1,d[s]=y(dr(n.a,Ge($r,oa,9,n.a.c.length,0,1)),51);return d}function Ag(e,n,s,f,d){switch(this.c=d,this.d=n,this.a=s,d.e){case 4:this.b=ki(e.b);break;case 1:this.b=ki(e.d);break;case 2:this.b=ki(e.c-f.j.a);break;case 3:this.b=ki(e.a-f.j.b);break;default:this.b=0}}function bce(e,n,s,f,d){var b,m,x,S,R;if(n)for(x=n.mb();x.G();)for(m=y(x.H(),9),R=Hq(m,(Ir(),Ri),s).mb();R.G();)S=y(R.H(),7),b=y(Oi(Di(d.d,S)),80),b||(b=new woe(e),f.c[f.c.length]=b,nle(b,S,d))}function RMe(e,n){var s,f,d;if(s=e.c,s.a.Y()>1)throw new Rn("In straight hyperEdges there may be only one edge.");kn((d=new pn(s.a).a.bb().mb(),f=y(new mn(d).a.H(),21),y(f.yb(),12)).a,new Rt(n,e.b))}function yce(e,n,s){var f,d;if(this.f=e,f=y(bn(e.b,n),126),d=f?f.a:0,DS(s,d),s>=(d/2|0))for(this.e=f?f.c:null,this.d=d;s++<d;)Bae(this);else for(this.c=f?f.b:null;s-- >0;)PS(this);this.b=n,this.a=null}function u0(e,n){(typeof document!==_0||r.exports)&&Sx(e(n)),typeof document===_0&&typeof self!==_0&&self.postMessage(n)}function IT(e,n){var s,f,d,b;"x"in e.a&&(d=y(Jn(e,"x"),104),n.i.a=d.a),"y"in e.a&&(b=y(Jn(e,"y"),104),n.i.b=b.a),QT in e.a&&(f=y(Jn(e,QT),104),n.j.a=f.a),ZT in e.a&&(s=y(Jn(e,ZT),104),n.j.b=s.a)}function mce(e,n,s){var f,d;Ese(this),n==(Ef(),Qu)?Dn(this.g,e.c):Dn(this.o,e.c),s==Qu?Dn(this.g,e.d):Dn(this.o,e.d),Dn(this.c,e),f=ia(e.c).b,d=ia(e.d).b,Tue(this,f,d,d),this.f=mPe(ia(e.c).b,ia(e.d).b)}function IMe(e){var n,s,f,d,b,m;for(m=new bf(e.d,e.e),b=Df(m);b.G();)for(d=y(b.H(),7),f=e.e==(Ye(),vt)?d.b:d.e,s=new W(f);s.a<s.c.c.length;)n=y(K(s),12),!Rf(n)&&n.c.f.d!=n.d.f.d&&(pMe(e,n),++e.f,++e.c)}function c0(e,n,s){var f,d,b,m,x;for(m=(_n(),new Ah(y(ht(n.a,s),18))),x=new sa(m.b.Y()),d=new Jp(m.b.mb());d.b.G();)f=y(d.b.H(),37),b=y(bn(e.a,f),31),b||(b=yBe(f),Cn(e.a,f,b)),x.c[x.c.length]=b;return x}function CMe(e,n){var s,f,d,b;for(f=new Ln(e.f.c,0);f.b<f.d.Y();)for(s=(Ct(f.b<f.d.Y()),y(f.d.sb(f.c=f.b++),16)),b=n[f.b-1],d=new Ln(s.a,0);d.b<d.d.Y();)Ct(d.b<d.d.Y()),d.d.sb(d.c=d.b++),kB(d,b[d.b-1])}function wce(e){var n,s;if(hu(y(ee(e,(Ke(),Nt)),28)))for(s=new W(e.f);s.a<s.c.c.length;)n=y(K(s),7),n.g==(Ye(),Ar)&&Boe(n);else{for(s=new W(e.f);s.a<s.c.c.length;)n=y(K(s),7),Boe(n);Ae(e,Nt,(rr(),B0))}}function Cq(e,n,s,f,d,b){var m,x,S,R;if(m=f-s,m<7){BOe(n,s,f,b);return}if(S=s+d,x=f+d,R=S+(x-S>>1),Cq(n,e,S,R,-d,b),Cq(n,e,R,x,-d,b),b.$b(e[R-1],e[R])<=0){for(;s<f;)Rs(n,s++,e[S++]);return}mOe(e,S,R,x,n,s,f,b)}function _ce(e){if(!e)return Mte(),ohe;var n=e.valueOf?e.valueOf():e;if(n!==e){var s=pR[typeof n];return s?s(n):J5(typeof n)}else return e instanceof Array||e instanceof t.Array?new Gee(e):new tk(e)}function CT(e,n,s){var f,d;return f=s.c,d=s.d,e.g[f.b]<=e.i[n.b]&&e.i[n.b]<=e.i[f.b]&&e.g[d.b]<=e.i[n.b]&&e.i[n.b]<=e.i[d.b]?!(e.i[f.b]<e.i[d.b]):e.i[f.b]<e.i[d.b]}function xce(e,n,s){var f,d,b,m,x,S,R,N;for(R=0,d=e.a[n],b=0,m=d.length;b<m;++b){for(f=d[b],N=new bf(f,s),S=Df(N);S.G();)x=y(S.H(),7),Cn(e.f,x,Mt(R)),Gi(y(ee(f,(Ke(),Nt)),28))&&++R;Gi(y(ee(f,(Ke(),Nt)),28))||++R}}function AMe(e,n,s){var f,d;if(Dt(n),s.G())for(d=y(s.H(),21),df(n,vw(e.a,d.yb())),df(n,e.b),df(n,vw(e.a,d.zb()));s.G();)df(n,e.a.c),f=y(s.H(),21),df(n,vw(e.a,f.yb())),df(n,e.b),df(n,vw(e.a,f.zb()));return n}function AT(e,n){var s,f;return s=y(jh(e.b,n),19),s?(f=e.Z(),f.jb(s),e.c-=s.Y(),s.Q(),Qe(f,137)?(_n(),new dB(y(f,137))):Qe(f,18)?(_n(),new Ah(y(f,18))):Qe(f,20)?r5(y(f,20)):(_n(),new fy(f))):e.$()}function Ece(e,n){var s;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?(s=y(jh(e.b,n.a),126),s.a=0,++e.c):(s=y(bn(e.b,n.a),126),--s.a,n.e?n.e.c=n.c:s.b=n.c,n.c?n.c.e=n.e:s.c=n.e),--e.d}function Aq(e,n,s){switch(s.e){case 1:return new Rt(n.a,wn(e.d.b,n.b));case 2:return new Rt(rt(e.c.a,n.a),n.b);case 3:return new Rt(n.a,rt(e.c.b,n.b));case 4:return new Rt(wn(n.a,e.d.a),n.b)}return new Rt(n.a,n.b)}function PMe(e){var n,s,f,d;for(n=0,f=($n(),e.length),d=f-4,s=0;s<d;)n=e.charCodeAt(s+3)+31*(e.charCodeAt(s+2)+31*(e.charCodeAt(s+1)+31*(e.charCodeAt(s)+31*n))),n=n|0,s+=4;for(;s<f;)n=n*31+kie(e,s++);return n=n|0,n}function kce(e,n){var s,f,d;for(this.a=e,this.c=n,this.b=Ge(tve,Xr,673,e.length,0,2),s=0;s<e.length;++s)for(d=e[s].length,this.b[s]=Ge(tve,{673:1,3:1,5:1,6:1},102,d,0,1),f=0;f<d;++f)this.b[s][f]=new mae(this,e[s][f].c)}function w_(e,n,s,f,d,b,m){var x;this.a=y(Dt(e),56),this.b=n,this.c=d,this.e=s,this.d=y(Dt(f),159),this.g=b,this.f=y(Dt(m),159),n&&e.$b(s,s),d&&e.$b(b,b),n&&d&&(x=e.$b(s,b),hOe(x<=0,s,b),x==0&&hv(f!=(oo(),Ns)|m!=Ns))}function Sce(e){if(this.a=e,e.c.f.g==(wt(),Hn))this.c=e.c,this.d=y(ee(e.c.f,(Oe(),ai)),32);else if(e.d.f.g==Hn)this.c=e.d,this.d=y(ee(e.d.f,(Oe(),ai)),32);else throw new Rn("Edge "+e+" is not an external edge.")}function Tce(){Tce=a,gve=cs(new Zn,(Kr(),KF)),L7=zi(new Zn,Q_),yve=Hi(zi(new Zn,ix),rx),pve=Hi(cs(zi(new Zn,VF),UF),YF),mve=zi(new Zn,u7),bve=Hi(new Zn,XF),dve=Hi(cs(zi(Tw(new Zn,Z_),tx),Qv),ex),vve=Hi(cs(new Zn,Qv),J_)}function __(e,n,s){var f,d,b,m;return Mi(s,T6),s==0?g_(e,n):(hv(Oy(e.b,n)),m=e.c.a,m?(b=Ge(gr,vr,26,1,12,1),f=Yq(m,e.d,n,s,b),Aw(e.c,m,f),b[0]):(e.d.$b(n,n),d=new e_(n,s),yB(e.a,d,e.a),Aw(e.c,null,d),0))}function Rce(e,n,s){var f,d,b,m,x,S;for(f=0,S=s,n||(f=s*(e.c.length-1),S*=-1),b=new W(e);b.a<b.c.c.length;){for(d=y(K(b),9),Ae(d,(Ke(),Xs),(Fo(),z_)),d.j.a=f,x=wr(d,(Ye(),lt)).mb();x.G();)m=y(x.H(),7),m.i.a=f;f+=S}}function Bt(e,n,s){var f;if(f=y(bn(e.b,n),19),f)return f.ib(s)?(++e.c,!0):!1;if(f=e.Z(),f.ib(s))return++e.c,Cn(e.b,n,f),!0;throw new $S("New Collection violated the Collection spec")}function PT(e,n,s){var f,d,b;for(l3e(e,n,s),b=new Xe,d=new W(e.b.a.b);d.a<d.c.c.length;)f=y(K(d),25),n.D(f)&&(tt(b,new F4(f,!0)),tt(b,new F4(f,!1)));_De(e.d),Hy(b,e.c,new zs(xe(Ee(z0,1),st,160,0,[e.d]))),s3e(e,n,s)}function Ice(e,n){var s,f,d,b,m;for(e.c[n.k]=!0,tt(e.a,n),m=new W(n.f);m.a<m.c.c.length;)for(b=y(K(m),7),f=Xt(as((Or(),new mr(Cr(xe(Ee(yt,1),st,1,4,[b.b,b.e]))))));Vt(f);)s=y(Gt(f),12),d=VOe(b,s).f,e.c[d.k]||Ice(e,d)}function Pq(e,n,s,f){var d,b,m;if("labels"in n.a){if(m=Jn(n,"labels"),!m.hc())throw new vu("The 'labels' property of a node must be an array.",m,n);for(b=m.hc(),d=0;d<b.a.length;++d)Qe(dl(b,d),69)&&t4e(e,y(dl(b,d),69),s,f)}}function Cce(e,n,s){var f,d,b,m,x,S;b=y(ht(n.b,0),12).c,f=b.f,d=f.g,S=y(ht(s.e,0),12).d,m=S.f,x=m.g,d==(wt(),Nn)?Ae(e,(Oe(),ca),y(ee(f,ca),7)):Ae(e,(Oe(),ca),b),x==Nn?Ae(e,(Oe(),Xi),y(ee(m,Xi),7)):Ae(e,(Oe(),Xi),S)}function Nc(){Nc=a,xa=new hf("H_LEFT",0),Os=new hf("H_CENTER",1),ka=new hf("H_RIGHT",2),Ja=new hf("V_TOP",3),Xa=new hf("V_CENTER",4),Ka=new hf("V_BOTTOM",5),Ki=new hf("INSIDE",6),Sa=new hf("OUTSIDE",7),Ea=new hf("H_PRIORITY",8)}function Lq(e){dS();var n,s,f;for(this.b=vde,this.c=gde,this.d=(ur(),go),this.g=(jte(),dde),this.a=e,hk(this,new L),S_(this),f=new W(e.b);f.a<f.c.c.length;)s=y(K(f),25),s.f||(n=new c_(xe(Ee(X_,1),st,25,0,[s])),tt(e.a,n))}function Nq(e,n){var s,f,d,b;for(d=1,n.j=!0,f=new W(Kh(n));f.a<f.c.c.length;)s=y(K(f),89),e.c[s.b]||(e.c[s.b]=!0,b=lT(s,n),s.e?d+=Nq(e,b):!b.j&&s.a==s.d.e-s.c.e&&(s.e=!0,Dn(e.p,s),d+=Nq(e,b)));return d}function LT(e){var n,s,f,d,b,m,x,S;for(d=Wi,f=ii,s=new W(e.e.c);s.a<s.c.c.length;)for(n=y(K(s),16),m=new W(n.a);m.a<m.c.c.length;)b=y(K(m),9),S=ze(e.n[b.k]),x=S+ze(e.b[e.f[b.k].k]),d=d<S?d:S,f=f>x?f:x;return f-d}function Ace(e){var n;return n=new Ch,fs(n,"type",new mf((Dh(cde),cde.n))),fs(n,KT,new mf(e.f)),e.b&&fs(n,"value",e.b),e.a&&fs(n,"context",e.a),fs(n,Sfe,new mf(uB(new Um(`
332
+ `),new ev(new zs((e.g==null&&(e.g=OB(e)),e.g)))))),n}function LMe(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 Pce(e,n){var s,f,d,b,m;if(n===e)return!0;if(!Qe(n,20)||(m=y(n,20),e.Y()!=m.Y()))return!1;for(b=m.mb(),f=e.mb();f.G();)if(s=f.H(),d=b.H(),!(ft(s)===ft(d)||s!=null&&ho(s,d)))return!1;return!0}function Lce(e){!vR&&(vR=sBe());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(s){return rLe(s)});return'"'+n+'"'}function Nce(e,n){var s,f,d,b,m,x,S;for(d=n==1?FR:qR,f=(m=new pn(d.a).a.bb().mb(),new mn(m));f.a.G();)for(s=(b=y(f.a.H(),21),y(b.yb(),59)),S=y(ds(e.f.c,s),18).mb();S.G();)x=y(S.H(),27),Vr(e.b.b,x.b),Vr(e.b.a,y(x.b,25).f)}function Oce(e,n,s){var f,d,b,m;if(en(s,"Recursive layout",2),n.b.c.length!=0){for(m=1/n.b.c.length,b=new W(n.b);b.a<b.c.c.length;)d=y(K(b),9),f=y(ee(d,(Oe(),eh)),55),f&&(Oce(e,f,Uh(s,m)),mje(d,f));Ule(e.d,n),n6(n,s)}Sle(n),zt(s)}function Oq(e,n){d5.call(this),this.d=new ci,this.b=y(ee(n,(Oe(),la)),15).a*y(ee(n,(sn(),tc)),15).a,this.e=this.b*y(ee(n,eb),15).a,this.a=new ea,this.c=new ea,this.j=new Is(e.j,e.k,0,e.n-e.k),this.o=e.g,this.g.a=e.i,Ole(this,e)}function NT(e,n){var s,f,d,b,m;for(b=n==null?0:e.b.Vc(n),f=(s=D4(e.a,b),s??[]),m=0;m<f.length;m++)if(d=f[m],e.b.Uc(n,d.yb()))return f.length==1?(f.length=0,e.a[aR](b)):f.splice(m,1),--e.c,rS(e.b),d.zb();return null}function NMe(e,n,s){var f;f=null,n&&(f=n.e),kg(e,new lv(n.i.a-f.b+s.a,n.i.b-f.d+s.b)),kg(e,new lv(n.i.a-f.b+s.a,n.i.b+n.j.b+f.a+s.b)),kg(e,new lv(n.i.a+n.j.a+f.c+s.a,n.i.b-f.d+s.b)),kg(e,new lv(n.i.a+n.j.a+f.c+s.a,n.i.b+n.j.b+f.a+s.b))}function x_(e,n){switch(n.e){case 2:an(e,(Ye(),lt)),e.a.a=e.j.a,e.a.b=e.j.b/2;break;case 4:an(e,(Ye(),vt)),e.a.a=0,e.a.b=e.j.b/2;break;case 1:an(e,(Ye(),Et)),e.a.a=e.j.a/2,e.a.b=0;break;case 3:an(e,(Ye(),At)),e.a.a=e.j.a/2,e.a.b=e.j.b}}function OMe(e,n){tv();var s,f,d;if(n===e)return!0;if(Qe(n,207)){if(d=y(n,207),e.Y()!=d.Y()||wv(e).Y()!=d.bb().Y())return!1;for(f=d.bb().mb();f.G();)if(s=y(f.H(),83),e.Cb(s.Zb())!=s.Yb())return!1;return!0}return!1}function Jh(e,n){var s,f,d,b,m,x;return b=e.a*sR+e.b*1502,x=e.b*sR+11,s=Math.floor(x*rR),b+=s,x-=s*F6,b%=F6,e.a=b,e.b=x,n<=24?eB(e.a*y$[n]):(d=e.a*(1<<n-24),m=eB(e.b*m$[n]),f=d+m,f>=2147483648&&(f-=4294967296),f)}function Dq(e,n,s){var f,d,b;if(n!=s){f=n;do On(e,f.d),b=y(ee(f,(Oe(),th)),9),b&&(d=f.a,Ha(e,d.b,d.d),On(e,b.i),f=na(b));while(b);f=s;do kc(e,f.d),b=y(ee(f,(Oe(),th)),9),b&&(d=f.a,RAe(e,d.b,d.d),kc(e,b.i),f=na(b));while(b)}}function DMe(e,n){var s,f,d,b,m,x;for(s=new Xe,x=new Y4,d=(m=new pn(e.a).a.bb().mb(),new mn(m));d.a.G();)f=(b=y(d.a.H(),21),y(b.yb(),12)),BT(x,f.c,f,null),BT(x,f.d,f,null);for(;x.a;)tt(s,pje(x,n,Gi(y(ee(n,(Ke(),Nt)),28))));return s}function MMe(e,n){var s,f,d,b,m;for(b=new W(e.e.a);b.a<b.c.c.length;)if(d=y(K(b),61),d.c.c.length==d.g.c.length){for(f=d.e,m=wMe(d),s=d.e-y(m.a,24).a+1;s<d.e+y(m.b,24).a;s++)n[s]<n[f]&&(f=s);n[f]<n[d.e]&&(--n[d.e],++n[f],d.e=f)}}function Dce(e,n){var s,f,d,b,m,x,S;for(d=n==1?FR:qR,f=(m=new pn(d.a).a.bb().mb(),new mn(m));f.a.G();)for(s=(b=y(f.a.H(),21),y(b.yb(),59)),S=y(ds(e.f.c,s),18).mb();S.G();)x=y(S.H(),27),tt(e.b.b,y(x.b,25)),tt(e.b.a,y(x.b,25).f)}function Mce(e){sS();var n,s,f,d,b,m,x;for(s=(Qn(),new mg),d=new W(e.e.c);d.a<d.c.c.length;)for(f=y(K(d),16),m=new W(f.a);m.a<m.c.c.length;)b=y(K(m),9),x=e.f[b.k],n=y(GS(s,x),20),n||(n=new Xe,n0(s,x,n)),n.ib(b);return s}function jMe(e,n){var s,f,d,b;for(f=new W(e.a.a);f.a<f.c.c.length;)s=y(K(f),78),s.i=!0;for(b=new W(e.a.b);b.a<b.c.c.length;)d=y(K(b),25),d.p=Kt(ze(Zt(e.f.B(new jr(d,n))))),d.f.i=d.f.i&Kt(ze(Zt(e.f.B(new jr(d,n)))));return e}function jce(e,n){var s,f,d,b;for(d=za(qn(n)),f=xn(d,0);f.b!=f.d.c;)return s=y(vn(f),12),b=s.d.f,b.g==(wt(),ua)&&!(Kt(ze(Zt(ee(b,(Oe(),jl)))))&&ee(b,Pt)!=null)?(Vr(b.d.a,b),An(s.c,null),An(s.d,null),jce(e,b)):n;return n}function BMe(e,n){var s,f,d,b,m,x,S;if(!n.e)throw new Rn("The input edge is not a tree edge.");for(b=null,d=Fr,f=new W(e.d);f.a<f.c.c.length;)s=y(K(f),89),x=s.c,S=s.d,CT(e,x,n)&&!CT(e,S,n)&&(m=S.e-x.e-s.a,m<d&&(d=m,b=s));return b}function Bce(e,n){var s,f,d,b,m;return b=n.a,b.c.f==n.b?m=b.d:m=b.c,b.c.f==n.b?f=b.c:f=b.d,d=UOe(e.a,m,f),d>0&&d<$o?(s=KMe(e.a,f.f,d),Xse(e.a,f.f,-s),s>0):d<0&&-d<$o?(s=XMe(e.a,f.f,-d),Xse(e.a,f.f,s),s>0):!1}function qMe(e,n,s,f,d){var b,m;loe(Pn(xe(Ee(un,1),on,10,0,[d.f.i,d.i,d.a])),s)||(n.c==d?gw(n.a,0,new hr(s)):kn(n.a,new hr(s)),f&&!ff(e.a,s)&&(m=y(ee(n,(Ke(),pr)),44),m||(m=new ea,Ae(n,pr,m)),b=new hr(s),Br(m,b,m.c.b,m.c),Dn(e.a,b)))}function qce(e){var n,s,f,d,b,m,x;for(n=0,f=new W(e.a);f.a<f.c.c.length;)for(s=y(K(f),9),b=Xt(qn(s));Vt(b);)d=y(Gt(b),12),e==d.d.f.d&&d.c.g==(Ye(),vt)&&(m=ia(d.c).b,x=ia(d.d).b,n=n>(x-m<=0?0-(x-m):x-m)?n:x-m<=0?0-(x-m):x-m);return n}function FMe(e,n){var s,f,d;if(ft(n)===ft(Dt(e)))return!0;if(!Qe(n,20)||(f=y(n,20),d=e.Y(),d!=f.Y()))return!1;if(Qe(f,63)){for(s=0;s<d;s++)if(!$h(e.sb(s),f.sb(s)))return!1;return!0}else return wDe(e.mb(),f.mb())}function Fce(e,n){var s,f,d,b,m,x,S,R;if(d=e.b[n.k],d>=0)return d;for(b=1,x=new W(n.f);x.a<x.c.c.length;)for(m=y(K(x),7),f=new W(m.e);f.a<f.c.c.length;)s=y(K(f),12),R=s.d.f,n!=R&&(S=Fce(e,R),b=b>S+1?b:S+1);return MOe(e,n,b),b}function $ce(e,n,s){var f,d,b,m,x,S;if(f=0,e.b!=0&&n.b!=0){b=xn(e,0),m=xn(n,0),x=ze(nn(vn(b))),S=ze(nn(vn(m))),d=!0;do x>S-s&&x<S+s&&++f,x<=S&&b.b!=b.d.c?x=ze(nn(vn(b))):S<=x&&m.b!=m.d.c?S=ze(nn(vn(m))):d=!1;while(d)}return f}function $Me(e,n){switch(R5(e)){case 5:return uo(n);case 6:return pv(n);case 7:return gv(n);case 0:return yT(n,e.__elementTypeId$);case 2:return mS(n)&&n.ad!==i;case 1:return mS(n)&&n.ad!==i||yT(n,e.__elementTypeId$);default:return!0}}function GMe(e,n){var s,f,d,b,m;return n&=63,s=e.h,f=(s&524288)!=0,f&&(s|=-1048576),n<22?(m=s>>n,b=e.m>>n|s<<22-n,d=e.l>>n|e.m<<22-n):n<44?(m=f?El:0,b=s>>n-22,d=e.m>>n-22|s<<44-n):(m=f?El:0,b=f?Ls:0,d=s>>n-44),ll(d&Ls,b&Ls,m&El)}function Gce(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 Rn(j6)}return 0}function HMe(e,n,s){var f,d,b,m,x,S;f=new Xe,f.c[f.c.length]=n,S=n,x=0;do S=V4e(e,S),S&&(f.c[f.c.length]=S),++x;while(S);for(m=(s-(f.c.length-1)*e.d.d)/f.c.length,b=new W(f);b.a<b.c.c.length;)d=y(K(b),9),d.j.a=m;return new jr(Mt(x),m)}function zMe(e,n,s){var f,d,b,m,x,S;f=new Xe,f.c[f.c.length]=n,S=n,x=0;do S=P4e(e,S),S&&(f.c[f.c.length]=S),++x;while(S);for(m=(s-(f.c.length-1)*e.d.d)/f.c.length,b=new W(f);b.a<b.c.c.length;)d=y(K(b),9),d.j.a=m;return new jr(Mt(x),m)}function VMe(e){var n,s,f,d,b,m;for(d=y(ht(e.f,0),7),m=0,f=Xt(as((Or(),new mr(Cr(xe(Ee(yt,1),st,1,4,[new Kp(d),new Zd(d)]))))));Vt(f);)s=y(Gt(f),7),m+=s.f.i.a+s.i.a+s.a.a;n=y(ee(e,(Ke(),Mc)),10),b=n?n.a:0,e.i.a=m/(d.b.c.length+d.e.c.length)-b}function UMe(e,n){var s,f,d,b;if(n<2*e.c)throw new Rn("The knot vector must have at least two time the dimension elements.");for(e.j=0,e.i=1,f=0;f<e.c;f++)e.g.ib(0);for(b=n+1-2*e.c,d=1;d<b;d++)e.g.ib(d/b);if(e.e)for(s=0;s<e.c;s++)e.g.ib(1)}function Mq(e){var n,s;return s=e.c,e.c=0,Fte(e.f,e.i),e.e?e.g?e.e.d>=e.g.d?(n=e.f,n.e=ooe(e.e,n),n.g=e.g,n.a=e.a-1,n.j=yl(e.j,s),Lc(n)):(n=e.i,n.g=uoe(e.g,n),n.e=e.e,n.a=e.a-1,n.j=yl(e.j,s),Lc(n)):e.e:e.g}function YMe(e){var n,s,f,d,b,m;for(d=new W(e.a);d.a<d.c.c.length;)f=y(K(d),9),f.g==(wt(),_r)&&(b=y(ee(f,(Oe(),Zf)),9),s=f.f,n=(Gn(0,s.c.length),y(s.c[0],7)),m=y(ee(n,Pt),7),m.g==(Ye(),Et)&&f.k>b.k?an(m,At):m.g==At&&b.k>f.k&&an(m,Et))}function WMe(e,n,s){var f,d,b,m,x,S,R;for(R=e.b,m=0,b=new W(e.a.b);b.a<b.c.c.length;)d=y(K(b),33),m=rt(m,d.j.a);return S=G4e(e.a.c,e.a.d,n,s,m),Na(e.a.a,dT(S)),x=Eq(e.a.b,S.a,R),f=new zy((!S.k&&(S.k=new ET(YS(S))),S.k)),e5(f),x?WB(f,x):f}function KMe(e,n,s){var f,d,b,m,x,S,R;f=s,d=n;do d=e.a[d.k],m=(R=e.f[d.k],ze(e.n[R.k])+ze(e.d[d.k])-d.e.d),x=tNe(d,d.d?aa(d.d.a,d,0):-1),x&&(b=(S=e.f[x.k],ze(e.n[S.k])+ze(e.d[x.k])+x.j.b+x.e.a),f=wn(f,m-(b+My(e.j,d,x))));while(n!=d);return f}function XMe(e,n,s){var f,d,b,m,x,S,R;f=s,d=n;do d=e.a[d.k],b=(R=e.f[d.k],ze(e.n[R.k])+ze(e.d[d.k])+d.j.b+d.e.a),x=ANe(d,d.d?aa(d.d.a,d,0):-1),x&&(m=(S=e.f[x.k],ze(e.n[S.k])+ze(e.d[x.k])-x.e.d),f=wn(f,m-(b+My(e.j,d,x))));while(n!=d);return f}function jq(e,n,s){var f,d,b;if(Mi(s,T6),s==0)return g_(e,n);b=e.c.a,d=Ge(gr,vr,26,1,12,1);try{if(!Oy(e.b,n)||!b)return 0;f=Jq(b,e.d,n,s,d)}catch(m){if(m=gi(m),Qe(m,119))return 0;if(Qe(m,76))return 0;throw bi(m)}return Aw(e.c,b,f),d[0]}function JMe(e,n){var s,f,d,b,m;return e.b?(f=y(Er(e.e,(Ke(),A0)),65),d=f.b+f.c,s=f.d+f.a):(d=n*2,s=n*2),m=rt(e.o[1]>0?d+e.i[1]*n+e.n[1]:0,e.o[3]>0?d+e.i[3]*n+e.n[3]:0),b=rt(e.o[4]>0?s+e.i[4]*n+e.n[4]:0,e.o[2]>0?s+e.i[2]*n+e.n[2]:0),new Rt(m,b)}function Hce(e){var n,s,f,d,b,m;for(m=y(dr(e.a,Ge($r,oa,9,e.a.c.length,0,1)),51),oB(m,new pt),s=null,d=0,b=m.length;d<b&&(f=m[d],f.g==(wt(),Hn));++d)n=y(ee(f,(Oe(),ai)),32),!(n!=(Ye(),vt)&&n!=lt)&&(s&&y(ee(s,tp),20).ib(f),s=f)}function l0(e,n,s,f,d){var b,m,x,S;for(S=new bf(n,f),x=Df(S);x.G();)b=y(x.H(),7),Cn(e.k,b,Mt(y(bn(e.k,b),24).a+y(Oi(Di(d.d,s)),24).a));for(S=new bf(s,f),m=Df(S);m.G();)b=y(m.H(),7),Cn(e.k,b,Mt(y(bn(e.k,b),24).a-y(Oi(Di(d.d,n)),24).a))}function Q(e,n,s){var f=j_,d,b=f[e],m=b instanceof Array?b[0]:null;b&&!m?T=b:(T=(d=n&&n.prototype,!d&&(d=j_[n]),nLe(d)),T._c=s,T.constructor=T,!n&&(T.ad=i),f[e]=T);for(var x=3;x<arguments.length;++x)arguments[x].prototype=T;m&&(T.$c=m)}function QMe(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 s=e.i,f=e.d;f=f.split("/"),e.n=gT(".",[s,gT("$",f)]),e.b=gT(".",[s,gT(".",f)]),e.j=f[f.length-1]}function Bq(e,n,s){var f;if(!s)return 0;if(f=e.d.$b(e.b.g,s.b),f>0)return Bq(e,n,s.g);if(f==0)switch(e.b.f.e){case 0:return Yr(n._b(s),n.ac(s.g));case 1:return n.ac(s.g);default:throw new d4}else return Yr(Yr(n.ac(s.g),n._b(s)),Bq(e,n,s.e))}function qq(e,n,s){var f;if(!s)return 0;if(f=e.d.$b(e.b.e,s.b),f<0)return qq(e,n,s.e);if(f==0)switch(e.b.d.e){case 0:return Yr(n._b(s),n.ac(s.e));case 1:return n.ac(s.e);default:throw new d4}else return Yr(Yr(n.ac(s.e),n._b(s)),qq(e,n,s.g))}function zce(e,n,s,f){var d,b,m,x;return m=new Ps(e),Ss(m,(wt(),Nn)),Ae(m,(Oe(),Pt),n),Ae(m,(Ke(),Nt),(rr(),Ti)),Ae(m,ca,s),Ae(m,Xi,f),b=new cr,an(b,(Ye(),vt)),An(b,m),x=new cr,an(x,lt),An(x,m),Bn(n,b),d=new pu,Ac(d,n),Ae(d,pr,null),nr(d,x),Bn(d,f),m}function Vce(e,n){var s,f,d,b,m,x,S,R,N,D;for(s=0,m=e.j,x=0,S=m.length;x<S;++x)for(b=m[x],D=new bf(b,n),N=Df(D);N.G();)for(R=y(N.H(),7),d=Xt(as((Or(),new mr(Cr(xe(Ee(yt,1),st,1,4,[R.b,R.e]))))));Vt(d);)f=y(Gt(d),12),Rf(f)||(s+=Jce(e,f,R));return s}function ZMe(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?Ec(e.a)-Ec(n.a):e.d==(zw(),X0)&&n.d==K0?-1:e.d==K0&&n.d==X0?1:0}function e3e(e){var n,s,f,d,b,m;for(d=new pi,f=new W(e.d.a);f.a<f.c.c.length;)s=y(K(f),61),s.c.c.length==0&&Br(d,s,d.c.b,d.c);if(d.b>1)for(n=Py(N4(new Qp,e.b++),e.d),m=xn(d,0);m.b!=m.d.c;)b=y(vn(m),61),Ov(sv(uv(cv(ov(new Ih,1),0),n),b))}function t3e(e,n,s,f){var d,b,m,x,S,R;for(R=0,m=new W(e.a.b);m.a<m.c.c.length;)b=y(K(m),33),R=rt(R,b.j.a);return S=_4e(e.a.c,n,e.a.d,f,cq(e.b),s),Na(e.a.a,dT(S)),x=Eq(e.a.b,S.a,e.b),d=new zy((!S.k&&(S.k=new ET(YS(S))),S.k)),e5(d),x?WB(d,x):d}function OT(e,n){var s,f,d,b,m;for(f=new W(e.b);f.a<f.c.c.length;)s=y(K(f),33),Ae(s,(Oe(),Js),n);for(m=new W(e.c.c);m.a<m.c.c.length;)d=y(K(m),33),Ae(d,(Oe(),Js),n);for(b=new W(e.d.c);b.a<b.c.c.length;)d=y(K(b),33),Ae(d,(Oe(),Js),n)}function Of(){Of=a,ax=new Lh(Dg,0),U0=new Lh("NIKOLOV",1),Y0=new Lh("NIKOLOV_PIXEL",2),p7=new Lh("NIKOLOV_IMPROVED",3),g7=new Lh("NIKOLOV_IMPROVED_PIXEL",4),v7=new Lh("DUMMYNODE_PERCENTAGE",5),b7=new Lh("NODECOUNT_PERCENTAGE",6),sx=new Lh("NO_BOUNDARY",7)}function Uce(e,n){var s,f,d,b,m;if(b=0,m=y(Oi(Di(n.d,e)),24),!m)return 0;for(d=Xt(as((Or(),new mr(Cr(xe(Ee(yt,1),st,1,4,[e.b,e.e]))))));Vt(d);)f=y(Gt(d),12),f.c==e?s=y(bn(n,f.d),24):s=y(bn(n,f.c),24),s&&m.a>s.a&&(b=Ei(b,m.a-s.a-1));return b}function n3e(e){var n,s;switch(n=y(ee(e,(Ke(),Gg)),15).a,s=y(ee(e,Hg),15).a,Ae(e,Hg,new gn(n)),Ae(e,Gg,new gn(s)),y(ee(e,Xs),103).e){case 1:Ae(e,Xs,(Fo(),Y_));break;case 2:Ae(e,Xs,(Fo(),H_));break;case 3:Ae(e,Xs,(Fo(),V_));break;case 4:Ae(e,Xs,(Fo(),U_))}}function r3e(e){var n,s,f,d,b;for(d=(sr(),new Po(Lo(du(e.a,new w))));Vt(d);)for(f=y(Gt(d),9),f.g==(wt(),Ds)&&(b=kue(f)?(ya(),Ju):(ya(),Yo),Ae(f,(Oe(),Js),b)),s=Xt(qn(f));Vt(s);)n=y(Gt(s),12),b=Kt(ze(Zt(ee(n,(Oe(),ec)))))?(ya(),Yo):(ya(),Ju),OT(n,b)}function i3e(e){var n,s,f,d,b;for(d=(sr(),new Po(Lo(du(e.a,new w))));Vt(d);)for(f=y(Gt(d),9),f.g==(wt(),Ds)&&(b=kue(f)?(ya(),Yo):(ya(),Ju),Ae(f,(Oe(),Js),b)),s=Xt(qn(f));Vt(s);)n=y(Gt(s),12),b=Kt(ze(Zt(ee(n,(Oe(),ec)))))?(ya(),Ju):(ya(),Yo),OT(n,b)}function Fq(e,n,s){var f,d,b;for(b=new W(e.e);b.a<b.c.c.length;)f=y(K(b),118),f.b.d<0&&f.c>0&&(f.b.c-=f.c,f.b.c<=0&&f.b.f>0&&kn(n,f.b));for(d=new W(e.b);d.a<d.c.c.length;)f=y(K(d),118),f.a.d<0&&f.c>0&&(f.a.f-=f.c,f.a.f<=0&&f.a.c>0&&kn(s,f.a))}function $q(e,n,s){var f,d,b;for(b=new W(e.j);b.a<b.c.c.length;)f=y(K(b),117),f.b.i<0&&f.c>0&&(f.b.e-=f.c,f.b.e<=0&&f.b.k>0&&kn(n,f.b));for(d=new W(e.d);d.a<d.c.c.length;)f=y(K(d),117),f.a.i<0&&f.c>0&&(f.a.k-=f.c,f.a.k<=0&&f.a.e>0&&kn(s,f.a))}function a3e(e){var n,s,f,d,b;switch(b=e.d.c+e.e.c,b){case 0:return Dte(),rhe;case 1:return f=y(vce(new Wh(new xc(e).a)),21),OAe(f.yb(),f.zb());default:for(d=(Qn(),new mg),s=new Wh(new xc(e).a);s.b;)n=xg(s),n0(d,Dt(n.yb()),Dt(n.zb()));return new I4(d)}}function s3e(e,n,s){var f,d,b;for(d=new W(e.b.a.b);d.a<d.c.c.length;)f=y(K(d),25),n.D(f)&&(b=ze(nn(s.B(f))),b>0&&(!(Ph(e.b.d)&&f.q.d)&&!(xk(e.b.d)&&f.q.b)&&(f.j.e+=0>b/2-.5?0:b/2-.5),!(Ph(e.b.d)&&f.q.a)&&!(xk(e.b.d)&&f.q.c)&&(f.j.b-=b-1)))}function o3e(e,n){switch(e.e){case 1:switch(n.e){case 1:return B6;case 4:return .5;case 3:return q6;case 2:return qfe}break;case 2:switch(n.e){case 1:return B6;case 2:return .5;case 3:return q6;case 4:return qfe}break;default:throw new Rn(j6)}return 0}function DT(e,n){var s,f,d,b;for(b=new Ln(e,0),s=(Ct(b.b<b.d.Y()),y(b.d.sb(b.c=b.b++),48));b.b<b.d.Y();)f=(Ct(b.b<b.d.Y()),y(b.d.sb(b.c=b.b++),48)),d=new TB(f.c,s.d,n),Ct(b.b>0),b.a.sb(b.c=--b.b),Sc(b,d),Ct(b.b<b.d.Y()),b.d.sb(b.c=b.b++),d.a=!1,s=f}function Yce(e){var n,s,f,d,b,m;for(d=y(ee(e,(Oe(),px)),7),m=new W(e.f);m.a<m.c.c.length;){for(b=y(K(m),7),f=new W(b.e);f.a<f.c.c.length;)return n=y(K(f),12),Bn(n,d),b;for(s=new W(b.b);s.a<s.c.c.length;)return n=y(K(s),12),nr(n,d),b}return null}function Wce(e,n,s,f,d){var b,m,x,S,R,N;for(m=n,b=0,x=!1,N=new bf(s,f),R=Df(N);R.G();)S=y(R.H(),7),x=!0,Cn(e.k,S,Mt(m)),(Gi(y(ee(s,(Ke(),Nt)),28))||S.b.c.length+S.e.c.length>1)&&(++b,++m);return!Gi(y(ee(s,(Ke(),Nt)),28))&&x&&(++b,++m),Cn(d,s,Mt(b)),m}function Kce(e){var n,s,f,d,b,m,x,S,R,N,D,j;for(m=e.b.mb(),x=y(m.H(),92),N=x.a.a,R=N>Gf,S=N<M_;m.G();){if(s=x,b=N,d=R,f=S,x=y(m.H(),92),N=x.a.a,R=N>Gf,S=N<M_,!(R||S))return Wy(x.b);if(d&&S||f&&R)return n=b/(b-N),D=Wy(s.b),j=Wy(x.b),n*D+(1-n)*j}return 0}function Xce(e){var n,s,f,d,b,m,x,S,R,N,D,j;for(m=e.b.mb(),x=y(m.H(),92),N=x.a.b,R=N>Gf,S=N<M_;m.G();){if(s=x,b=N,d=R,f=S,x=y(m.H(),92),N=x.a.b,R=N>Gf,S=N<M_,!(R||S))return Wy(x.b);if(d&&S||f&&R)return n=b/(b-N),D=Wy(s.b),j=Wy(x.b),n*D+(1-n)*j}return 0}function Jce(e,n,s){var f,d;return f=0,_S(n)?ff(e.g,n)?(jq(e.i,Mt(gf(e,n.c)),1)>0,jq(e.i,Mt(gf(e,n.d)),1)>0,Wk(e.g,n),f+=iDe(e,n,e.i)):(Dn(e.g,n),__(e.i,Mt(gf(e,n.c)),1),__(e.i,Mt(gf(e,n.d)),1)):(d=g_(e.i,Mt(y(bn(e.k,s),24).a)),f+=e.g.a.Y()-d),f}function u3e(e){switch(e.e){case 0:return Pve;case 1:return Ive;case 2:return Rve;case 3:return Ove;case 4:return Nve;case 5:return qve;case 6:return Bve;case 7:return Lve;case 8:return Cve;case 9:return Ave;case 11:return Mve;case 10:return Dve;default:return jve}}function E_(e){switch(e.e){case 0:return mo;case 1:return Iu;case 2:return Nl;case 3:return Fc;case 4:return $c;case 5:return Ko;case 6:return Ml;case 7:return Dl;case 8:return Ol;case 9:return Wo;case 10:return Qf;case 11:return Gc;default:return ld}}function f0(e){switch(e.e){case 0:return Ko;case 1:return Ml;case 2:return Dl;case 3:return mo;case 4:return Iu;case 5:return Nl;case 6:return Fc;case 7:return $c;case 8:return Ol;case 9:return Wo;case 10:return Qf;case 11:return Gc;default:return ld}}function Gq(e){switch(e.e){case 0:return Nl;case 1:return Fc;case 2:return $c;case 3:return Ko;case 4:return Ml;case 5:return Dl;case 6:return mo;case 7:return Iu;case 8:return Ol;case 9:return Wo;case 10:return Qf;case 11:return Gc;default:return ld}}function c3e(e){var n,s,f,d,b,m,x,S;for(s=(Qn(),new mg),x=new hS((No(),new zs(e.f))),m=(d=new pn(x.a).a.bb().mb(),new mn(d));m.a.G();){if(b=(f=y(m.a.H(),21),y(f.yb(),9)),!b){Mh();break}S=e.i[b.k],n=y(GS(s,S),20),n||(n=new Xe,n0(s,S,n)),n.ib(b)}return s}function l3e(e,n,s){var f,d,b;for(d=new W(e.b.a.b);d.a<d.c.c.length;)f=y(K(d),25),n.D(f)&&(b=ze(nn(s.B(f))),b>0&&(!(Ph(e.b.d)&&f.q.d)&&!(xk(e.b.d)&&f.q.b)&&(f.j.e-=0>b/2-.5?0:b/2-.5),!(Ph(e.b.d)&&f.q.a)&&!(xk(e.b.d)&&f.q.c)&&(f.j.b+=0>b-1?0:b-1)))}function Df(e){var n,s,f;switch(f=e.a.f,e.b){case 0:return new W(e.a.f);case 1:return Bh((s=new o5(f),s),yq(e));case 2:switch(e.c.e){case 2:case 1:return Bh(new W(f),yq(e));case 3:case 4:return Bh((n=new o5(f),n),yq(e))}}throw new nv("PortOrder not implemented.")}function f3e(e,n){var s;e.d&&(n.c!=e.e.c||SNe(e.e.b,n.b))&&(tt(e.f,e.d),e.a=e.d.d+e.d.c,e.d=null,e.e=null),aAe(n.b)?e.c=n:e.b=n,(n.b==(Ky(),Pl)&&!n.a||n.b==Kf&&n.a||n.b==cd&&n.a||n.b==Xf&&!n.a)&&e.c&&e.b&&(s=new Is(e.a,e.c.d,n.c-e.a,e.b.d-e.c.d),e.d=s,e.e=n)}function Mf(e,n,s,f){this.e=e,this.j=y(ee(e,(Oe(),nh)),134),this.f=Ge($r,oa,9,n,0,1),this.b=Ge(r1,Xr,184,n,6,1),this.a=Ge($r,oa,9,n,0,1),this.d=Ge(r1,Xr,184,n,6,1),this.i=Ge($r,oa,9,n,0,1),this.g=Ge(r1,Xr,184,n,6,1),this.n=Ge(r1,Xr,184,n,6,1),this.k=s,this.c=f}function h3e(e,n,s){var f,d;if(n.g==(wt(),_r)&&s.g==_r){if(!Gi(y(ee(y(ee(n,(Oe(),Pt)),9),(Ke(),Nt)),28))||y(ee(n,Pt),9)!=y(ee(s,Pt),9))return;if(Nue(n)||Nue(s)){e.d=1,e.b=1;return}d=y(ht(n.f,0),7).g,f=y(ht(s.f,0),7).g,BS(n).g==(Ye(),Et)?Qce(e,n,s,d,f):Qce(e,s,n,f,d)}}function Ov(e){if(!e.a.c||!e.a.d)throw new rl((Dh(jde),jde.j+" must have a source and target "+(Dh(k7),k7.j)+" specified."));if(e.a.c==e.a.d)throw new rl("Network simplex does not support self-loops: "+e.a+" "+e.a.c+" "+e.a.d);return hl(e.a.c.g,e.a),hl(e.a.d.c,e.a),e.a}function Qce(e,n,s,f,d){f==(Ye(),lt)&&d==lt?Ev(e,n)>Ev(e,s)?e.d=Av(e,s):e.b=Av(e,n):f==vt&&d==vt?Ev(e,n)<Ev(e,s)?e.d=Av(e,s):e.b=Av(e,n):f==vt&&d==lt?Ev(e,n)>Ev(e,s)&&(e.d=Av(e,s),e.b=Av(e,n)):Ev(e,n)<Ev(e,s)&&(e.d=Av(e,s),e.b=Av(e,n))}function d3e(e){var n,s,f,d,b,m,x,S;for(S=e.f.c.length,s=0,n=S,d=2*S,x=new W(e.f);x.a<x.c.c.length;)switch(m=y(K(x),7),m.g.e){case 2:case 4:m.k=-1;break;case 1:case 3:f=m.b.c.length,b=m.e.c.length,f>0&&b>0?m.k=n++:f>0?m.k=s++:b>0?m.k=d++:m.k=s++}Cs(e.f,new Ot)}function v3e(e,n,s,f){var d,b,m,x,S;s.d.f!=n.f&&(d=new Ps(e),Ss(d,(wt(),Nn)),Ae(d,(Oe(),Pt),s),Ae(d,(Ke(),Nt),(rr(),Ti)),f.c[f.c.length]=d,m=new cr,An(m,d),an(m,(Ye(),vt)),x=new cr,An(x,d),an(x,lt),S=s.d,Bn(s,m),b=new pu,Ac(b,s),Ae(b,pr,null),nr(b,x),Bn(b,S),Cce(d,m,x))}function p3e(e){var n,s,f,d,b,m,x,S,R;for(m=$o,S=$o,x=null,s=new ES(new ik(e.e));s.b!=s.c.a.b;)if(n=m5(s),y(n.d,60).c==1&&(f=y(n.e,116).a,R=y(n.e,116).b,d=m-f>Sl,b=f-m<Sl&&S-R>Sl,(d||b)&&(S=y(n.e,116).b,m=y(n.e,116).a,x=y(n.d,60),S==0&&m==0)))return x;return x}function Zce(e,n){var s,f,d,b,m,x;return b=e.d,x=y(ee(e,(Ke(),zo)),15).a,x<0&&(x=0,Ae(e,zo,new gn(x))),n.j.b=x,m=Math.floor(x/2),f=new cr,an(f,(Ye(),vt)),An(f,n),f.i.b=m,d=new cr,an(d,lt),An(d,n),d.i.b=m,Bn(e,f),s=new pu,Ac(s,e),Ae(s,pr,null),nr(s,d),Bn(s,b),EDe(n,e,s),zDe(e,s),s}function g3e(e){var n,s;s=y(ee(e,(sn(),Gr)),85),n=y(ee(e,(Oe(),Zu)),140),s==(ma(),Bl)?(Ae(e,Gr,gd),Ae(e,Zu,(yu(),vd))):s==zc?(Ae(e,Gr,gd),Ae(e,Zu,(yu(),Zv))):n==(yu(),vd)?(Ae(e,Gr,Bl),Ae(e,Zu,vx)):n==Zv&&(Ae(e,Gr,zc),Ae(e,Zu,vx))}function b3e(e){var n,s,f,d,b;for(f=new W(r0(e.e));f.a<f.c.c.length;)s=y(K(f),129),b=new hr(s.e.i),d=iq()[s.e.k],n=y(xv(e.c,d),283),b.b=n.e+n.a,d.b==(MS(),Cl)?b.a=n.d:d.b==Jv?b.a=n.d+(n.c-s.e.j.a)/2:d.b==Al&&(b.a=n.d+n.c-s.e.j.a),s.e.i.a=b.a,s.e.i.b=b.b,n.a+=s.e.j.b+e.d}function y3e(e){var n,s,f;for(s=new W(wl(e));s.a<s.c.c.length;){switch(n=y(K(s),161),f=new hr(n.e.i),y(n.e,7).g.e){case 4:f.a=0,f.b=e.e.j.b/2;break;case 2:f.a=e.e.j.a,f.b=e.e.j.b/2;break;case 1:f.a=e.e.j.a/2,f.b=0;break;case 3:f.a=e.e.j.a/2,f.b=e.e.j.b}n.e.i.a=f.a,n.e.i.b=f.b}}function ele(){this.c=Ge(Ra,Ui,26,(Ye(),xe(Ee(Qr,1),nt,32,0,[Ar,Et,lt,At,vt])).length,12,1),this.b=Ge(Ra,Ui,26,xe(Ee(Qr,1),nt,32,0,[Ar,Et,lt,At,vt]).length,12,1),this.a=Ge(Ra,Ui,26,xe(Ee(Qr,1),nt,32,0,[Ar,Et,lt,At,vt]).length,12,1),$k(this.c,Wi),$k(this.b,ii),$k(this.a,ii)}function tle(e,n,s){var f,d,b,m,x,S,R,N;for(b=ze(nn(e.b.mb().H())),R=ze(nn(Yse(n.b))),f=Oo(Ts(e.a),R-s),d=Oo(Ts(n.a),s-b),N=On(f,d),Oo(N,1/(R-b)),this.a=N,this.b=new Xe,x=!0,m=e.b.mb(),m.H();m.G();)S=ze(nn(m.H())),x&&S-s>Gf&&(this.b.ib(s),x=!1),this.b.ib(S);x&&this.b.ib(s)}function m3e(e){var n,s,f,d;if(Y3e(e,e.n),e.d.c.length>0){for(yy(e.c);Nq(e,y(K(new W(e.e.a)),61))<e.e.a.c.length;){for(n=CDe(e),d=n.d.e-n.c.e-n.a,n.d.j&&(d=-d),f=new W(e.e.a);f.a<f.c.c.length;)s=y(K(f),61),s.j&&(s.e+=d);yy(e.c)}yy(e.c),Tq(e,y(K(new W(e.e.a)),61)),Gle(e)}}function w3e(e,n){var s,f,d,b,m,x,S;for(s=ii,x=(wt(),ir),d=new W(n.a);d.a<d.c.c.length;)f=y(K(d),9),b=f.g,b!=ir&&(m=nn(ee(f,(Oe(),t$))),m==null?(s=s>0?s:0,f.i.b=s+iS(e.a,b,x)):f.i.b=(Rr(m),m)),S=iS(e.a,b,x),f.i.b<s+S+f.e.d&&(f.i.b=s+S+f.e.d),s=f.i.b+f.j.b+f.e.a,x=b}function nle(e,n,s){var f,d,b;for(s.db(n,e),tt(e.g,n),b=e.o.d.Lc(n),ane(e.k)?e.k=b:e.k=wn(e.k,b),ane(e.a)?e.a=b:e.a=rt(e.a,b),n.g==e.o.d.Mc()?aue(e.j,b):aue(e.n,b),d=Xt(as((Or(),new mr(Cr(xe(Ee(yt,1),st,1,4,[new Kp(n),new Zd(n)]))))));Vt(d);)f=y(Gt(d),7),s.R(f)||nle(e,f,s)}function _3e(e){var n,s,f,d,b;for(f=($n(),e.length),d=f>0&&(e.charCodeAt(0)==45||e.charCodeAt(0)==43)?1:0,n=d;n<f;n++)if(dOe(e.charCodeAt(n))==-1)throw new Wm(VT+e+'"');if(b=parseInt(e,10),s=b<Uu,isNaN(b))throw new Wm(VT+e+'"');if(s||b>Fr)throw new Wm(VT+e+'"');return b}function x3e(e,n,s,f){var d,b,m,x;for(d=y(wr(n,(Ye(),vt)).mb().H(),7),b=y(wr(n,lt).mb().H(),7),x=new W(e.f);x.a<x.c.c.length;){for(m=y(K(x),7);m.b.c.length!=0;)Bn(y(ht(m.b,0),12),d);for(;m.e.c.length!=0;)nr(y(ht(m.e,0),12),b)}s||Ae(n,(Oe(),ca),null),f||Ae(n,(Oe(),Xi),null)}function E3e(e){var n,s,f,d,b,m,x;for(x=new nse,m=new W(e.b);m.a<m.c.c.length;)if(b=y(K(m),9),b.g!=(wt(),Hn)){for(NMe(x,b,new li),d=Xt(qn(b));Vt(d);)if(f=y(Gt(d),12),!(f.c.f.g==Hn||f.d.f.g==Hn))for(s=xn(f.a,0);s.b!=s.d.c;)n=y(vn(s),10),kg(x,new lv(n.a,n.b))}return x}function h0(e,n,s,f){var d,b,m;if(this.e=new ea,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),d=y(ee(f,(Ke(),pr)),44),d)for(m=xn(d,0);m.b!=m.d.c;)b=y(vn(m),10),_5(b.a,e.a)&&kn(this.e,b);this.g=s,this.g&&(this.i=this.j-s.j.d),this.f=f}function jf(e){os();var n,s,f,d,b,m;for(m=new ba,Jy(m,e),s=(b=new pn(m.a).a.bb().mb(),new mn(b));s.a.G();)n=(f=y(s.a.H(),21),f.yb()),Dt(n);switch(m.a.Y()){case 0:return _v(),Fg;case 1:return new sl((d=new pn(m.a).a.bb().mb(),f=y(new mn(d).a.H(),21),f.yb()));default:return new Lk(m)}}function k_(e,n,s,f){var d,b,m;As(e,s,"x",n.i.a+f.a),As(e,s,"y",n.i.b+f.b),As(e,s,QT,n.j.a),As(e,s,ZT,n.j.b),Qe(n,9)&&y(ee(n,(Ke(),j0)),86).kb((Nv(),OR))&&(d=y(n,9).b,m=Jn(s,eR),m||(m=new Ch,fs(s,eR,m)),b=m.kc(),As(e,b,"left",d.b),As(e,b,"top",d.d),As(e,b,"right",d.c),As(e,b,A6,d.a))}function rle(e,n){var s,f,d,b,m,x,S,R,N,D;for(m=n==1?FR:qR,b=(S=new pn(m.a).a.bb().mb(),new mn(S));b.a.G();)for(d=(x=y(b.a.H(),21),y(x.yb(),59)),N=y(ds(e.f.c,d),18).mb();N.G();)switch(R=y(N.H(),27),f=y(R.b,25),D=y(R.a,78),s=D.c,d.e){case 2:case 1:f.j.e+=s;break;case 4:case 3:f.j.d+=s}}function k3e(e,n){var s,f,d;n.a?(zB(e.b,n.b),e.a[n.b.k]=y(qre(e.b,n.b),25),s=y(Bre(e.b,n.b),25),s&&(e.a[s.k]=n.b)):(f=y(qre(e.b,n.b),25),f&&f==e.a[n.b.k]&&f.f&&f.f!=n.b.f&&f.i.ib(n.b),d=y(Bre(e.b,n.b),25),d&&e.a[d.k]==n.b&&d.f&&d.f!=n.b.f&&n.b.i.ib(d),iie(e.b,n.b))}function S3e(e,n){var s,f,d,b,m,x,S;for(d=new Xe,s=0;s<=e.i;s++)f=new xf(n),f.k=e.i-s,d.c[d.c.length]=f;for(x=new W(e.o);x.a<x.c.c.length;)m=y(K(x),9),ei(m,y(ht(d,e.i-e.f[m.k]),16));for(b=new W(d);b.a<b.c.c.length;)S=y(K(b),16),S.a.c.length==0&&pg(b);n.c.c=Ge(yt,st,1,0,4,1),Vn(n.c,d)}function T3e(e){var n,s,f,d;for(e.a.a.c=Ge(yt,st,1,0,4,1),f=new W(e.a.b);f.a<f.c.c.length;)n=y(K(f),25),n.f=null;for(d=new W(e.a.b);d.a<d.c.c.length;)n=y(K(d),25),!n.o&&tt(e.a.a,new c_(xe(Ee(X_,1),st,25,0,[n])));for(s=new W(e.a.b);s.a<s.c.c.length;)n=y(K(s),25),n.o&&t_(n.o.f,n)}function d0(e,n){var s,f,d,b;for(e=($n(),e??Vu),s=(e.length+16*n.length,new pk),b=0,f=0;f<n.length&&(d=e.indexOf("%s",b),d!=-1);)dse(s,e,b,d),ul(s,n[f++]),b=d+2;if(MAe(s,e,b,e.length),f<n.length){for(s.a+=" [",ul(s,n[f++]);f<n.length;)s.a+=", ",ul(s,n[f++]);s.a+="]"}return s.a}function ile(e,n,s,f){var d,b;if(n){if(d=e.a.$b(s.d,n.d),d==0)return f.d=RB(n,s.e),f.b=!0,n;b=d<0?0:1,n.a[b]=ile(e,n.a[b],s,f),al(n.a[b])&&(al(n.a[1-b])?(n.b=!0,n.a[0].b=!1,n.a[1].b=!1):al(n.a[b].a[b])?n=Zw(n,1-b):al(n.a[b].a[1-b])&&(n=Vae(n,1-b)))}else return s;return n}function R3e(e,n){var s,f,d,b,m,x,S,R,N,D;for(S=Cy(n.a),x=yr(iw(S/e.a)),D=n.a,m=0,R=x,b=0;b<e.a;++b)N=($n(),D.substr((0>m?0:m)<S?0>m?0:m:S,(0>(R<S?R:S)?0:R<S?R:S)-((0>m?0:m)<S?0>m?0:m:S))),m=R,R+=x,f=y(ht(e.c,b),9),s=new nB(N),s.j.b=n.j.b,Bt(e.b,n,s),tt(f.c,s);Vr(e.g.c,n),tt(e.i,(d=new Vne(e,n),d))}function ale(e,n,s){var f,d,b,m,x,S,R,N,D;for(n.k=1,b=n.d,D=wu(n,(Ir(),Ri)).mb();D.G();)for(N=y(D.H(),7),d=new W(N.e);d.a<d.c.c.length;)f=y(K(d),12),R=f.d.f,n!=R&&(m=R.d,m.k<=b.k&&(x=b.k+1,x==s.c.c.length?(S=new xf(s),S.k=x,tt(s.c,S),ei(R,S)):(S=y(ht(s.c,x),16),ei(R,S)),ale(e,R,s)))}function I3e(e){var n,s,f,d,b;for(n=e.e.j,f=new W(wl(e));f.a<f.c.c.length;){switch(s=y(K(f),161),d=y(Er(s,(Ke(),Vf)),15),!d&&(d=new gn(0)),b=new hr(s.e.i),y(s.e,7).g.e){case 4:b.a=-s.e.j.a-d.a;break;case 2:b.a=n.a+d.a;break;case 1:b.b=-s.e.j.b-d.a;break;case 3:b.b=n.b+d.a}s.e.i.a=b.a,s.e.i.b=b.b}}function C3e(e){var n,s,f;f=y(ee(e,(Ke(),Da)),18),!f.V()&&(s=(n=y(ga(Un),11),new Si(n,y(ta(n,n.length),11),0)),f.kb((Nc(),Ki))?ji(s,Ki):ji(s,Sa),f.kb(Ea)||ji(s,Ea),f.kb(xa)?ji(s,Ja):f.kb(Os)?ji(s,Xa):f.kb(ka)&&ji(s,Ka),f.kb(Ja)?ji(s,xa):f.kb(Xa)?ji(s,Os):f.kb(Ka)&&ji(s,ka),Ae(e,Da,s))}function sle(e,n,s,f,d){var b,m,x,S,R,N,D,j,H,z;for(j=oue(e,s),S=0;S<n;S++){for(d.J(s),H=new Xe,z=y(f.H(),92),N=j+S;N<e.c;N++)x=z,z=y(f.H(),92),tt(H,new tle(x,z,s));for(D=j+S;D<e.c;D++)f.M(),D>j+S&&f.I();for(m=new W(H);m.a<m.c.c.length;)b=y(K(m),92),f.J(b);if(S<n-1)for(R=j+S;R<e.c;R++)f.M()}}function A3e(e){var n,s,f,d;if(e.d&&y(e.e,7).f.g==(wt(),_r))return _n(),_n(),ql;if(!e.a){for(e.a=new Xe,f=new W(y(e.e,7).b);f.a<f.c.c.length;)n=y(K(f),12),tt(e.a,new Fm(n));if(e.d&&(d=y(ee(y(e.e,7),(Oe(),Cu)),9),d))for(s=Xt(Wr(d));Vt(s);)n=y(Gt(s),12),tt(e.a,new Fm(n))}return e.a}function P3e(e){var n,s,f,d;if(e.d&&y(e.e,7).f.g==(wt(),_r))return _n(),_n(),ql;if(!e.c){for(e.c=new Xe,f=new W(y(e.e,7).e);f.a<f.c.c.length;)n=y(K(f),12),tt(e.c,new Fm(n));if(e.d&&(d=y(ee(y(e.e,7),(Oe(),Cu)),9),d))for(s=Xt(qn(d));Vt(s);)n=y(Gt(s),12),tt(e.c,new Fm(n))}return e.c}function L3e(e,n){var s,f,d,b,m,x,S,R;for(x=y(ee(e,(Oe(),Pt)),7),S=Pn(xe(Ee(un,1),on,10,0,[x.f.i,x.i,x.a])).a,R=e.f.i.b,s=y(dr(e.b,Ge(Ta,wa,12,e.b.c.length,0,1)),47),d=0,b=s.length;d<b;++d)f=s[d],Bn(f,x),Ek(f.a,new Rt(S,R)),n&&(m=y(ee(f,(Ke(),pr)),44),m||(m=new ea,Ae(f,pr,m)),kn(m,new Rt(S,R)))}function N3e(e,n){var s,f,d,b,m,x,S,R;for(d=y(ee(e,(Oe(),Pt)),7),S=Pn(xe(Ee(un,1),on,10,0,[d.f.i,d.i,d.a])).a,R=e.f.i.b,s=y(dr(e.e,Ge(Ta,wa,12,e.e.c.length,0,1)),47),m=0,x=s.length;m<x;++m)b=s[m],nr(b,d),$ne(b.a,new Rt(S,R)),n&&(f=y(ee(b,(Ke(),pr)),44),f||(f=new ea,Ae(b,pr,f)),kn(f,new Rt(S,R)))}function O3e(e){var n,s,f,d,b,m,x,S,R;for(m=$o,S=$o,x=null,s=new ES(new ik(e.e));s.b!=s.c.a.b;)if(n=m5(s),(ft(n.d)===ft((Vi(),Wo))||ft(n.d)===ft(Ol))&&(f=y(n.e,116).a,R=y(n.e,116).b,d=m-f>Sl,b=f-m<Sl&&S-R>Sl,(d||b)&&(S=y(n.e,116).b,m=y(n.e,116).a,x=y(n.d,60),S==0&&m==0)))return x;return x}function D3e(e,n){var s,f,d,b,m;e.d=n,Ws(e.b),e.c=!1;e:for(f=new W(e.d.c);f.a<f.c.c.length;)for(s=y(K(f),16),b=new W(s.a);b.a<b.c.c.length;)if(d=y(K(b),9),!$y(o0(d))){e.c=!0;break e}return m=dn((ur(),go),xe(Ee(I0,1),nt,59,0,[ps,_a])),e.c||(ji(m,Xu),ji(m,Su)),e.a=new HB(m),kBe(e),e.a}function ole(){var e,n,s,f,d;for(this.e=(Qn(),new mg),this.b=(s=y(ga(Ug),11),new Si(s,y(ta(s,s.length),11),0)),this.c=(f=y(ga(Ug),11),new Si(f,y(ta(f,f.length),11),0)),this.a=(d=y(ga(Ug),11),new Si(d,y(ta(d,d.length),11),0)),n=(Vi(),Vi(),kve).mb();n.G();)e=y(n.H(),60),n0(this.e,e,new cne)}function M3e(e,n,s){var f,d,b,m,x,S;ki(e.k-e.a)<Dc||ki(n.k-n.a)<Dc||(f=$ce(e.n,n.j,s),d=$ce(n.n,e.j,s),b=aT(e.n,n.k,n.a)+aT(n.j,e.k,e.a),m=aT(n.n,e.k,e.a)+aT(e.j,n.k,n.a),x=16*f+b,S=16*d+m,x<S?new Qw(e,n,S-x):x>S?new Qw(n,e,x-S):x>0&&S>0&&(new Qw(e,n,0),new Qw(n,e,0)))}function Bf(e,n){var s,f,d,b,m,x,S,R,N;for(R=new Xe,N=null,f=y(xv(Jf,e),20).mb();f.G();){for(s=y(f.H(),75),S=(b=new pn(s.c.a).a.bb().mb(),new mn(b));S.a.G();)m=(d=y(S.a.H(),21),y(d.yb(),7)),Sc(n,m),x_(m,e.b);Vn(R,s.b),N=e.a}for(m_(R),HS(R,N),x=new W(R);x.a<x.c.c.length;)m=y(K(x),7),Sc(n,m)}function j3e(){var e={layout:function(n){Sx(T4e(n))}};typeof document!==_0&&(t.$klay=e),r.exports&&(r.exports=e),typeof document===_0&&typeof self!==_0&&self.addEventListener("message",function(n){e.layout(n.data)},!1)}function v0(e,n,s,f,d){var b,m,x;x=d?f.b:f.a,(x>s.k&&x<s.a||s.j.b!=0&&s.n.b!=0&&(ki(x-ze(nn(Jk(s.j))))<Dc&&ki(x-ze(nn(Jk(s.n))))<Dc||ki(x-ze(nn(pw(s.j))))<Dc&&ki(x-ze(nn(pw(s.n))))<Dc))&&(ff(e.b,f)||(m=y(ee(n,(Ke(),pr)),44),m||(m=new ea,Ae(n,pr,m)),b=new hr(f),Br(m,b,m.c.b,m.c),Dn(e.b,b)))}function B3e(e,n,s){var f,d,b,m,x,S,R,N,D;for(f=s.c,d=s.d,x=ia(n.c),S=ia(n.d),f==n.c?(x=Aq(e,x,d),S=rce(n.d)):(x=rce(n.c),S=Aq(e,S,d)),R=new tS(n.a),Br(R,x,R.a,R.a.a),Br(R,S,R.c.b,R.c),m=n.c==f,D=new Ete,b=0;b<R.b-1;++b)N=new jr(y(Sg(R,b),10),y(Sg(R,b+1),10)),m&&b==0||!m&&b==R.b-2?D.b=N:tt(D.a,N);return D}function q3e(e,n){var s,f,d,b;if(b=e.g.e-n.g.e,b!=0)return b;if(s=y(ee(e,(Ke(),jc)),24),f=y(ee(n,jc),24),s&&f&&(d=s.a-f.a,d!=0))return d;switch(e.g.e){case 1:return qr(e.i.a,n.i.a);case 2:return qr(e.i.b,n.i.b);case 3:return qr(n.i.a,e.i.a);case 4:return qr(n.i.b,e.i.b);default:throw new rl(Pfe)}}function F3e(e,n){var s,f,d,b,m;for(m=new li,b=new W(wl(e));b.a<b.c.c.length;)switch(d=y(K(b),161),y(d.e,7).g.e){case 4:case 2:m.b=rt(m.b,d.e.i.b+d.e.j.b+(n?(f=y(d.e,7).d,new Mo(f.d,f.b,f.a,f.c)).a:0));break;case 1:case 3:m.a=rt(m.a,d.e.i.a+d.e.j.a+(n?(s=y(d.e,7).d,new Mo(s.d,s.b,s.a,s.c)).c:0))}return m}function MT(e,n){var s,f,d,b,m,x,S;for(d=new Xe,S=new Xe,s=y(xv(Jf,e),20).mb();s.G();)f=y(s.H(),75),xue(d,f.b),xue(d,due(f)),s.G()&&(f=y(s.H(),75),Vn(S,due(f)),Vn(S,f.b));for(HS(d,e.b),HS(S,e.a),x=new W(d);x.a<x.c.c.length;)b=y(K(x),7),Sc(n,b);for(m=new W(S);m.a<m.c.c.length;)b=y(K(m),7),Sc(n,b)}function Dr(){Dr=a,kI=new ol("COMMENTS",0),Xo=new ol("EXTERNAL_PORTS",1),hx=new ol("HYPEREDGES",2),SI=new ol("HYPERNODES",3),hd=new ol("NON_FREE_PORTS",4),dd=new ol("NORTH_SOUTH_PORTS",5),dx=new ol("SELF_LOOPS",6),Yg=new ol("CENTER_LABELS",7),Wg=new ol("END_LABELS",8),B7=new ol("PARTITIONS",9)}function $3e(e,n){var s,f,d,b;for(e=($n(),e??Vu),s=(e.length+16*n.length,new pk),b=0,f=0;f<n.length&&(d=e.indexOf("%s",b),d!=-1);)Vs(s,e.substr(b,d-b)),ul(s,n[f++]),b=d+2;if(Vs(s,vg(e,b,e.length-b)),f<n.length){for(s.a+=" [",ul(s,n[f++]);f<n.length;)s.a+=", ",ul(s,n[f++]);s.a+="]"}return s.a}function Hq(e,n,s){var f,d;switch(d=null,n.e){case 1:d=(Ua(),DF);break;case 2:d=(Ua(),MF)}switch(f=null,s.e){case 1:f=(Ua(),HR);break;case 2:f=(Ua(),GR);break;case 3:f=(Ua(),zR);break;case 4:f=(Ua(),VR)}return d&&f?co(e.f,(rw(),new Cee(new zs(xe(Ee(CBe,1),st,68,0,[y(Dt(d),68),y(Dt(f),68)]))))):(_n(),_n(),ql)}function zq(e,n,s){var f,d,b,m,x,S,R;for(S=za(qn(n)),d=xn(S,0);d.b!=d.d.c;)f=y(vn(d),12),R=f.d.f,!(Kt(ze(Zt(ee(R,(Oe(),jl)))))&&ee(R,Pt)!=null)&&R.g==(wt(),ua)&&!Kt(ze(Zt(ee(f,ec))))&&f.d.g==(Ye(),vt)&&(b=Pa(R.d)-Pa(n.d),b>1&&(s?m=Pa(n.d)+1:m=Pa(R.d)-1,x=y(ht(e.a.c,m),16),ei(R,x)),zq(e,R,s));return n}function ule(e,n){var s,f,d,b;for(n.d?d=e.a.c==(fo(),Ll)?Wr(n.b):qn(n.b):d=e.a.c==(fo(),Ru)?Wr(n.b):qn(n.b),b=!1,f=(sr(),new Po(Lo(du(d.a,new w))));Vt(f);)if(s=y(Gt(f),12),e.c.a[s.c.f.d.k]!==e.c.a[s.d.f.d.k]&&(b=!0,ff(e.b,e.a.f[yDe(s,n.b).k])))return n.c=!0,n.a=s,n;return n.c=b,n.a=null,n}function G3e(e,n,s){var f,d,b,m;for(f=y(ee(e.d,(Ke(),lF)),15).a,b=new W(e.a.b);b.a<b.c.c.length;)if(d=y(K(b),25),Qe(d,93)&&(m=y(d,93).b,m.g==(wt(),Hn)))switch(y(ee(m,(Oe(),ai)),32).e){case 4:m.i.a=n.a-f;break;case 2:m.i.a=s.a+f-(m.j.a+m.e.c);break;case 1:m.i.b=n.b-f;break;case 3:m.i.b=s.b+f-(m.j.b+m.e.a)}}function H3e(){if(!Object.create||!Object.getOwnPropertyNames)return!1;var e="__proto__",n=Object.create(null);if(n[e]!==void 0)return!1;var s=Object.getOwnPropertyNames(n);return!(s.length!=0||(n[e]=42,n[e]!==42)||Object.getOwnPropertyNames(n).length==0)}function cle(e){var n,s,f,d,b,m,x,S,R;for(m=new W(e.a.a);m.a<m.c.c.length;)d=y(K(m),78),d.f=0,d.e.a.Q();for(b=new W(e.a.a);b.a<b.c.c.length;)for(d=y(K(b),78),s=(R=new pn(d.a.a).a.bb().mb(),new mn(R));s.a.G();)for(n=(f=y(s.a.H(),21),y(f.yb(),25)),S=n.i.mb();S.G();)x=y(S.H(),25),x.f!=d&&(Dn(d.e,x),++x.f.f)}function Vq(e,n,s,f){var d,b,m,x;if(n.g==(wt(),ua)){for(b=Xt(Wr(n));Vt(b);)if(d=y(Gt(b),12),m=d.c.f,(m.g==ua||Kt(ze(Zt(ee(m,(Oe(),jl))))))&&e.d.a[d.c.f.d.k]==f&&e.d.a[n.d.k]==s)return!0}if(n.g==Nn){for(b=Xt(Wr(n));Vt(b);)if(d=y(Gt(b),12),x=d.c.f.g,x==Nn&&e.d.a[d.c.f.d.k]==f&&e.d.a[n.d.k]==s)return!0}return!1}function z3e(e){var n,s,f,d,b,m;if(d=e.g.tb(),f=e.b.tb(),e.e)for(s=0;s<e.c;s++)d.H();else for(s=0;s<e.c-1;s++)d.H(),d.I();for(n=ze(nn(d.H()));e.i-n>Gf;){for(b=n,m=0;(n-b<=0?0-(n-b):n-b)<Gf;)++m,n=ze(nn(d.H())),f.H();m<e.c&&(d.M(),sle(e,e.c-m,b,f,d),d.H()),f.M()}if(!e.e)for(s=0;s<e.c-1;s++)d.H(),d.I();e.e=!0,e.d=!0}function V3e(e){var n,s,f,d;switch(zk(e.a).c){case 4:return Vi(),Ko;case 3:return y(xLe(e.a).mb().H(),60);case 2:return f=zk(e.a),s=new fv(f),n=y(Tf(s),60),d=y(Tf(s),60),f0(n)==d?Do(f,(Vi(),Ko))?Fc:Ko:E_(E_(n))==d?E_(n):Gq(n);case 1:return f=zk(e.a),f0(y(Tf(new fv(f)),60));case 0:return Vi(),$c;default:return null}}function lle(e,n){var s;d5.call(this),this.a=y(ee(n,(Oe(),la)),15).a,this.c=this.a*y(ee(n,(sn(),eb)),15).a,this.b=e,this.j=new Is(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),qu(this.g),s=Fh(Wr(e))-Fh(qn(e)),s<0?Qy(this.n,!0,(ur(),ps)):s>0&&Qy(this.n,!0,(ur(),_a)),e.g==(wt(),Hn)&&us(this.n,!1,!1,!1,!1)}function p0(e,n,s){var f,d,b,m,x,S,R,N,D,j;for(b=new Rt(n,s),N=new W(e.b);N.a<N.c.c.length;)for(R=y(K(N),9),On(R.i,b),j=new W(R.f);j.a<j.c.c.length;)for(D=y(K(j),7),d=new W(D.e);d.a<d.c.c.length;)for(f=y(K(d),12),pl(f.a,b),m=y(ee(f,(Ke(),pr)),44),m&&pl(m,b),S=new W(f.b);S.a<S.c.c.length;)x=y(K(S),33),On(x.i,b)}function U3e(e,n,s){var f,d,b,m,x,S,R,N,D,j;for(b=new Rt(n,s),N=new W(e.b);N.a<N.c.c.length;)for(R=y(K(N),9),On(R.i,b),j=new W(R.f);j.a<j.c.c.length;)for(D=y(K(j),7),d=new W(D.e);d.a<d.c.c.length;)for(f=y(K(d),12),pl(f.a,b),m=y(ee(f,(Ke(),pr)),44),m&&pl(m,b),S=new W(f.b);S.a<S.c.c.length;)x=y(K(S),33),On(x.i,b)}function fle(e,n){var s,f,d,b,m;for(m=new W(e.f);m.a<m.c.c.length;)if(b=y(K(m),7),n){if(b.b.c.length!=0)throw new Vm((d=Uw(e),O6+(d??Xm(e.k))+Dfe+Mfe+D6))}else for(f=new W(b.b);f.a<f.c.c.length;)if(s=y(K(f),12),ft(ee(s.c.f,(sn(),Gr)))!==ft((ma(),Bl)))throw new Vm((d=Uw(e),O6+(d??Xm(e.k))+Dfe+Mfe+D6))}function hle(e,n,s){var f,d,b,m,x,S,R;for(f=0,R=wr(n,s),S=R.mb();S.G();)x=y(S.H(),7),y(ee(x,(Oe(),Cu)),9)&&(m=y(ee(x,Cu),9),wr(m,(Ye(),lt)).mb().G()&&(f+=(b=e.k?1:zie(y(ht(m.f,0),7)),b*il(zoe(e,n,s).a-1-y(bn(e.i,x),24).a,Loe(e,n,m)))),wr(m,vt).mb().G()&&(f+=(d=e.k?1:zie(y(ht(m.f,0),7)),d*il(y(bn(e.i,x),24).a,Loe(e,n,m)))));return f}function Y3e(e,n){var s,f,d,b,m,x,S;for(d=Ge(gr,vr,26,e.e.a.c.length,12,1),m=new W(e.e.a);m.a<m.c.c.length;)b=y(K(m),61),d[b.b]+=b.c.c.length;for(x=za(n);x.b!=0;)for(b=y(x.b==0?null:(Ct(x.b!=0),$u(x,x.a.a)),61),f=new W(b.g);f.a<f.c.c.length;)s=y(K(f),89),S=s.d,S.e=Ei(S.e,b.e+s.a),--d[S.b],d[S.b]==0&&Br(x,S,x.c.b,x.c)}function dle(e,n,s,f,d,b,m){if(e.d=f.e.i.a,e.e=f.e.i.b,d&&(e.d+=d.e.i.a,e.e+=d.e.i.b),e.c=n.e.j.a,e.b=n.e.j.b,!d)s?e.d-=m+n.e.j.a:e.d+=f.e.j.a+m;else switch(y(d.e,7).g.e){case 0:case 2:e.d+=d.e.j.a+m+b.a+m;break;case 4:e.d-=m+b.a+m+n.e.j.a;break;case 1:e.d+=d.e.j.a+m,e.e-=m+b.b+m+n.e.j.b;break;case 3:e.d+=d.e.j.a+m,e.e+=d.e.j.b+m+b.b+m}}function W3e(e,n){var s,f,d,b,m,x,S,R,N;for(d=new Xe,S=new W(n);S.a<S.c.c.length;)b=y(K(S),9),tt(d,e.b[b.d.k][b.k]);for(jje(e,d);N=C4e(d);)kje(e,y(N.a,102),y(N.b,102),d);for(n.c=Ge(yt,st,1,0,4,1),f=new W(d);f.a<f.c.c.length;)for(s=y(K(f),102),m=s.d,x=0,R=m.length;x<R;++x)b=m[x],n.c[n.c.length]=b,e.a[b.d.k][b.k].a=ss(s.g,s.d[0]).a}function jT(e){var n,s,f,d,b,m,x;for(x=(Qn(),new ln),f=new W(e.a.b);f.a<f.c.c.length;)n=y(K(f),25),Cn(x,n,new Xe);for(d=new W(e.a.b);d.a<d.c.c.length;)for(n=y(K(d),25),n.r=ii,m=n.i.mb();m.G();)b=y(m.H(),25),y(Oi(Di(x.d,b)),20).ib(n);for(s=new W(e.a.b);s.a<s.c.c.length;)n=y(K(s),25),n.i.Q(),n.i=y(Oi(Di(x.d,n)),20);cle(e)}function K3e(e){var n,s,f,d,b;switch(d=y(ht(e.b,0),9),n=new Ps(e),tt(e.b,n),n.j.a=rt(1,d.j.a),n.j.b=rt(1,d.j.b),n.i.a=d.i.a,n.i.b=d.i.b,y(ee(d,(Oe(),ai)),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 f=new cr,An(f,n),s=new pu,b=y(ht(d.f,0),7),nr(s,b),Bn(s,f),On(qu(f.i),b.i),On(qu(f.a),b.a),n}function X3e(e){var n,s,f,d,b,m,x,S,R;for(R=(Qn(),new ln),n=0,s=new ok,x=e.mb();x.G();)b=y(x.H(),9),S=Py(Ene(N4(new Qp,n++),b),s),Oa(R.d,b,S);for(m=e.mb();m.G();)for(b=y(m.H(),9),d=Xt(qn(b));Vt(d);)f=y(Gt(d),12),!Rf(f)&&Ov(sv(uv(ov(cv(new Ih,Ei(1,y(ee(f,(Oe(),js)),24).a)),1),y(bn(R,f.c.f),61)),y(bn(R,f.d.f),61)));return s}function J3e(e){var n,s;if(!e.V()){for(s=y(e.sb(0),75).f,new Kq(e),n=new Ln(s.f,0),Lf((Vi(),mo),n),Nf(Qf,n),e0((Ye(),Et),n),MT(Iu,n),Nf(Gc,n),Bf(Nl,n),Lf(Wo,n),e0(lt,n),MT(Fc,n),Lf(Ol,n),Bf($c,n),Lf(Gc,n),e0(At,n),MT(Ko,n),Lf(Qf,n),Bf(Ml,n),Nf(Ol,n);n.b<n.d.Y();)Ct(n.b<n.d.Y()),n.d.sb(n.c=n.b++);MT(Dl,n),Nf(Wo,n),Nf(mo,n)}}function Q3e(e){var n,s;if(!e.V()){for(s=y(e.sb(0),75).f,new Kq(e),n=new Ln(s.f,0),Lf((Vi(),mo),n),Nf(Qf,n),e0((Ye(),Et),n),Bf(Iu,n),Nf(Gc,n),Bf(Nl,n),Lf(Wo,n),e0(lt,n),Bf(Fc,n),Lf(Ol,n),Bf($c,n),Lf(Gc,n),e0(At,n),Bf(Ko,n),Lf(Qf,n),Bf(Ml,n),Nf(Ol,n);n.b<n.d.Y();)Ct(n.b<n.d.Y()),n.d.sb(n.c=n.b++);Bf(Dl,n),Nf(Wo,n),Nf(mo,n)}}function vle(e){var n,s,f,d,b,m,x,S,R;for(d=Uu,m=Fr,R=new W(e.e.a);R.a<R.c.c.length;)x=y(K(R),61),m=il(m,x.e),d=Ei(d,x.e);for(b=0,f=Ge(gr,vr,26,d-m+1,12,1),S=new W(e.e.a);S.a<S.c.c.length;)x=y(K(S),61),x.e-=m,++f[x.e];if(e.k)for(s=new W(e.k.c);s.a<s.c.c.length&&(n=y(K(s),16),f[b++]+=n.a.c.length,f.length!=b););return f}function Z3e(e){var n,s,f,d;for(PNe(e),FDe(e),d=new Rt(Wi,Wi),n=new Rt(ii,ii),f=new W(e.a.b);f.a<f.c.c.length;)s=y(K(f),25),d.a=wn(d.a,s.j.d),d.b=wn(d.b,s.j.e),n.a=rt(n.a,s.j.d+s.j.c),n.b=rt(n.b,s.j.e+s.j.b);On(qu(e.d.d),Xk(new Rt(d.a,d.b))),On(qu(e.d.e),kc(new Rt(n.a,n.b),d)),G3e(e,d,n),e.a.a.c=Ge(yt,st,1,0,4,1),e.a.b.c=Ge(yt,st,1,0,4,1)}function eje(e,n){var s,f,d,b,m,x,S,R,N,D;if(m=e.e,N=y(ee(e,(Oe(),Qg)),20),D=0,N){for(S=0,b=N.mb();b.G();)d=y(b.H(),9),S=rt(S,d.j.b),D+=d.j.a;D+=n/2*(N.Y()-1),m.d+=S+n}if(s=y(ee(e,Kg),20),f=0,s){for(S=0,b=s.mb();b.G();)d=y(b.H(),9),S=rt(S,d.j.b),f+=d.j.a;f+=n/2*(s.Y()-1),m.a+=S+n}x=D>f?D:f,x>e.j.a&&(R=(x-e.j.a)/2,m.b=rt(m.b,R),m.c=rt(m.c,R))}function ple(e,n,s,f){var d,b,m,x,S,R,N,D,j,H;for(m=Ha(n.d,s,f),D=new W(n.b);D.a<D.c.c.length;){for(N=y(K(D),9),On(N.i,m),H=new W(N.f);H.a<H.c.c.length;)for(j=y(K(H),7),b=new W(j.e);b.a<b.c.c.length;)for(d=y(K(b),12),pl(d.a,m),x=y(ee(d,(Ke(),pr)),44),x&&pl(x,m),R=new W(d.b);R.a<R.c.c.length;)S=y(K(R),33),On(S.i,m);tt(e.b,N),N.a=e}}function tje(e,n){var s,f,d,b,m;for(e.c==null||e.c.length<n.c.length?e.c=Ge(i1,k0,26,n.c.length,13,1):yy(e.c),e.a=new Xe,f=0,m=new W(n);m.a<m.c.c.length;)d=y(K(m),9),d.k=f++;for(s=new pi,b=new W(n);b.a<b.c.c.length;)d=y(K(b),9),e.c[d.k]||(Ice(e,d),s.b==0||(Ct(s.b!=0),y(s.a.a.c,20)).Y()<e.a.c.length?$ne(s,e.a):Ek(s,e.a),e.a=new Xe);return s}function nje(e,n,s){var f,d,b,m,x,S,R,N,D;return f=Tg(e.g),R=On(Ts(e.i),e.a),N=On(Ts(n.i),n.a),d=On(new hr(R),Oo(new _f(f),s)),D=On(new hr(N),Oo(new _f(f),s)),m=Oo(kc(new hr(d),D),.5),S=On(On(new hr(D),m),Oo(new _f(f),ire(m.a*m.a+m.b*m.b))),x=new kS(xe(Ee(un,1),on,10,0,[R,d,S,D,N])),b=Xh(x,.5,!1),x.a=b,h4(x,new ST(xe(Ee(un,1),on,10,0,[b,R,N]))),x}function Uq(e,n){var s,f,d,b,m;if(en(n,"Network simplex",1),e.e.a.c.length<1){zt(n);return}for(b=new W(e.e.a);b.a<b.c.c.length;)d=y(K(b),61),d.e=0;for(m=e.e.a.c.length>=40,m&&bje(e),Yje(e),m3e(e),s=zue(e),f=0;s&&f<e.f;)rje(e,s,BMe(e,s)),s=zue(e),++f;m&&QDe(e),e.a?MMe(e,vle(e)):vle(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,zt(n)}function Dv(e){var n,s,f,d,b,m,x,S,R,N;for(R=new ci,d=(Qn(),new ln),x=0,S=e.length;x<S;++x)m=e[x],n=m.mc(),R.a.db(n,R),n==null?Oa(d.d,null,m):uT(d.e,n,m),N=uS(n,($n(),n.lastIndexOf(".")+1),n.length),ff(PF,N)||(R.a.db(N,R),N==null?Oa(d.d,null,m):uT(d.e,N,m),Dn(PF,N));return f=(os(),Gue((b=new pn(R.a).a.bb().mb(),new mn(b)))),s=a3e(d),new jr(f,s)}function rje(e,n,s){var f,d,b;if(!n.e)throw new Rn("Given leave edge is no tree edge.");if(s.e)throw new Rn("Given enter edge is a tree edge already.");for(n.e=!1,Wk(e.p,n),s.e=!0,Dn(e.p,s),f=s.d.e-s.c.e-s.a,CT(e,s.d,n)||(f=-f),b=new W(e.e.a);b.a<b.c.c.length;)d=y(K(b),61),CT(e,d,n)||(d.e+=f);e.j=1,yy(e.c),Tq(e,y(K(new W(e.e.a)),61)),Gle(e)}function ije(e,n){var s,f,d,b,m,x,S,R,N,D,j,H;if(e.V())return new li;for(R=0,D=0,d=e.mb();d.G();)f=y(d.H(),55),b=f.e,R=rt(R,b.a),D+=b.a*b.b;for(R=rt(R,Math.sqrt(D)*y(ee(y(e.mb().H(),55),(Oe(),ep)),15).a),j=0,H=0,S=0,s=n,x=e.mb();x.G();)m=y(x.H(),55),N=m.e,j+N.a>R&&(j=0,H+=S+n,S=0),p0(m,j,H),s=rt(s,j+N.a),S=rt(S,N.b),j+=N.a+n;return new Rt(s+n,H+S+n)}function BT(e,n,s,f){var d,b,m;return m=new Pne(n,s),e.a?f?(d=y(bn(e.b,n),126),++d.a,m.d=f.d,m.e=f.e,m.b=f,m.c=f,f.e?f.e.c=m:y(bn(e.b,n),126).b=m,f.d?f.d.b=m:e.a=m,f.d=m,f.e=m):(e.e.b=m,m.d=e.e,e.e=m,d=y(bn(e.b,n),126),d?(++d.a,b=d.c,b.c=m,m.e=b,d.c=m):(Cn(e.b,n,new t5(m)),++e.c)):(e.a=e.e=m,Cn(e.b,n,new t5(m)),++e.c),++e.d,m}function Hu(e){var n,s,f,d,b,m,x,S;if(e.e)throw new rl((Dh($R),"The "+$R.j+Cfe));for(e.d==(ur(),go)&&xu(e,ps),s=new W(e.a.a);s.a<s.c.c.length;)n=y(K(s),78),n.f=0;for(m=new W(e.a.b);m.a<m.c.c.length;)for(b=y(K(m),25),b.r=ii,d=b.i.mb();d.G();)f=y(d.H(),25),++f.f.f;for(e.b.Cc(e),S=new W(e.a.b);S.a<S.c.c.length;)x=y(K(S),25),x.p=!0;return e}function aje(e,n,s,f,d){var b,m,x,S;b=new Ps(e),Ss(b,(wt(),_r)),Ae(b,(Ke(),Nt),(rr(),Ti)),Ae(b,(Oe(),Pt),n.c.f),m=new cr,Ae(m,Pt,n.c),an(m,d),An(m,b),Ae(n.c,Cu,b),x=new Ps(e),Ss(x,_r),Ae(x,Nt,Ti),Ae(x,Pt,n.d.f),S=new cr,Ae(S,Pt,n.d),an(S,d),An(S,x),Ae(n.d,Cu,x),nr(n,m),Bn(n,S),If(0,s.c.length),Ry(s.c,0,b),f.c[f.c.length]=x,Ae(b,Xg,Mt(1)),Ae(x,Xg,Mt(1))}function sje(e,n){var s,f,d,b,m;if(m=y(ee(e.f,(Ke(),Nt)),28),b=e.g.e-n.g.e,b!=0||m==(rr(),B0))return b;if(m==(rr(),Uv)&&(s=y(ee(e,jc),24),f=y(ee(n,jc),24),s&&f&&(d=s.a-f.a,d!=0)))return d;switch(e.g.e){case 1:return qr(e.i.a,n.i.a);case 2:return qr(e.i.b,n.i.b);case 3:return qr(n.i.a,e.i.a);case 4:return qr(n.i.b,e.i.b);default:throw new rl(Pfe)}}function gle(e){var n,s,f,d,b,m,x,S,R,N,D;for(x=new Xe,b=ze(nn(e.g.sb(e.g.Y()-1))),D=e.g.mb();D.G();)N=nn(D.H()),yf(x,0,b-(Rr(N),N));for(m=ZS(YS(e)),R=new Xe,d=new W(x),S=new Xe,n=0;n<e.c-1;n++)tt(R,nn(K(d)));for(f=xn(m,0);f.b!=f.d.c;)s=y(vn(f),10),tt(R,nn(K(d))),tt(S,new IS(s,R)),Gn(0,R.c.length),R.c.splice(0,1);return new oq(e.e,e.f,e.d,e.c,x,S)}function Yq(e,n,s,f,d){var b,m,x,S,R;return b=n.$b(s,e.b),b<0?(x=e.e,x?(m=x.d,e.e=Yq(x,n,s,f,d),d[0]==0&&++e.a,e.j=Yr(e.j,f),e.e.d==m?e:Lc(e)):(d[0]=0,D5(e,s,f))):b>0?(S=e.g,S?(m=S.d,e.g=Yq(S,n,s,f,d),d[0]==0&&++e.a,e.j=Yr(e.j,f),e.g.d==m?e:Lc(e)):(d[0]=0,O5(e,s,f))):(d[0]=e.c,R=Yr(e.c,f),hv(nT(R,Fr)<=0),e.c+=f,e.j=Yr(e.j,f),e)}function oje(e,n){var s,f,d,b,m,x;d=T_(n,`,|;|\\(|\\)|\\[|\\]|\\{|\\}| | |
333
+ `),Fu(e);try{for(f=0,m=0,b=0,x=0;f<d.length;)d[f]!=null&&Cy(Af(d[f]))>0&&(m%2==0?b=b_(d[f]):x=b_(d[f]),m>0&&m%2!=0&&kn(e,new Rt(b,x)),++m),++f}catch(S){throw S=gi(S),Qe(S,130)?(s=S,new Rn("The given string does not match the expected format for vectors."+s)):bi(S)}}function ble(e,n,s){var f,d,b,m,x,S,R,N;for(d=!0,m=new W(n.c);m.a<m.c.c.length;){for(b=y(K(m),16),R=ii,S=new W(b.a);S.a<S.c.c.length;)if(x=y(K(S),9),N=ze(s.n[x.k])+ze(s.d[x.k])-x.e.d,f=ze(s.n[x.k])+ze(s.d[x.k])+x.j.b+x.e.a,N>R&&f>R)R=ze(s.n[x.k])+ze(s.d[x.k])+x.j.b+x.e.a;else{d=!1,e.a&&Mh();break}if(!d)break}return e.a&&Mh(),d}function uje(e){var n,s,f,d,b,m,x,S;return isNaN(e)?(Xw(),Z6):e<-9223372036854776e3?(Xw(),che):e>=9223372036854776e3?(Xw(),uhe):(d=!1,e<0&&(d=!0,e=-e),f=0,e>=kl&&(f=yr(e/kl),e-=f*kl),s=0,e>=Zh&&(s=yr(e/Zh),e-=s*Zh),n=yr(e),b=ll(n,s,f),d&&(m=~b.l+1&Ls,x=~b.m+(m==0?1:0)&Ls,S=~b.h+(m==0&&x==0?1:0)&El,b.l=m,b.m=x,b.h=S),b)}function cje(e){var n,s,f,d,b,m,x;if(d=i0(e),vf(new W(d))){for(x=new Is(0,0,e.e.j.a,e.e.j.b),s=new W(d);s.a<s.c.c.length;)n=y(K(s),129),f=new Is(n.e.i.a,n.e.i.b,n.e.j.a,n.e.j.b),a0(x,f);m=new xB((b=y(e.e,7).d,new Mo(b.d,b.b,b.a,b.c))),m.d=-x.e,m.a=x.e+x.b-e.e.j.b,m.b=-x.d,m.c=x.d+x.c-e.e.j.a,y(e.e,7).d.b=m.b,y(e.e,7).d.d=m.d,y(e.e,7).d.c=m.c,y(e.e,7).d.a=m.a}}function yle(e){var n,s,f,d,b;for(b=new W(e.f);b.a<b.c.c.length;)for(d=y(K(b),7),f=new W(d.e);f.a<f.c.c.length;)if(s=y(K(f),12),ft(ee(s.d.f,(sn(),Gr)))!==ft((ma(),zc)))throw new Vm((n=Uw(e),O6+(n??Xm(e.k))+"' has its layer constraint set to LAST or LAST_SEPARATE, but has at least one outgoing edge. Connections between nodes with these "+D6))}function lje(e,n,s,f){var d,b,m,x,S,R;for(b=new W(e);b.a<b.c.c.length;){if(d=y(K(b),12),m=d.c,n.a.R(m))x=(Ef(),Qu);else if(s.a.R(m))x=(Ef(),fd);else throw new Rn("Source port must be in one of the port sets.");if(S=d.d,n.a.R(S))R=(Ef(),Qu);else if(s.a.R(S))R=(Ef(),fd);else throw new Rn("Target port must be in one of the port sets.");tt(f,new mce(d,x,R))}}function mle(e,n){var s,f,d,b,m,x;if("edges"in n.a){if(x=Jn(n,"edges"),!x.hc())throw new vu("The 'edges' property of a node has to be an array.",x,n);for(b=x.hc(),m=0;m<b.a.length;++m){if(d=dl(b,m),!d.kc())throw new vu("All elements of the 'edges' property must be objects.",d,n);SBe(e,d.kc())}}if(jg in n.a)for(f=Jn(n,jg).hc(),m=0;m<f.a.length;++m)s=dl(f,m).kc(),mle(e,s)}function S_(e){var n,s,f,d,b,m,x,S;for(f=new W(e.a.a);f.a<f.c.c.length;){for(s=y(K(f),78),s.g=null,m=(S=new pn(s.a.a).a.bb().mb(),new mn(S));m.a.G();)d=(n=y(m.a.H(),21),y(n.yb(),25)),qu(d.g),(!s.g||d.j.d<s.g.j.d)&&(s.g=d);for(b=(x=new pn(s.a.a).a.bb().mb(),new mn(x));b.a.G();)d=(n=y(b.a.H(),21),y(n.yb(),25)),d.g.a=d.j.d-s.g.j.d,d.g.b=d.j.e-s.g.j.e}return e}function fje(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z;for(s=!1,H=w0*e.b.f*e.b.d,d=new W(n.c);d.a<d.c.c.length;)for(f=y(K(d),16),R=new W(f.a),b=y(K(R),9),N=$B(e.a[b.k]);R.a<R.c.c.length;)x=y(K(R),9),D=$B(e.a[x.k]),N!=D&&(j=My(e.b,b,x),m=b.i.b+b.j.b+b.e.a+N.a+j,S=x.i.b-x.e.d+D.a,m>S+H&&(z=N.i+D.i,D.a=(D.i*D.a+N.i*N.a)/z,D.i=z,N.g=D,s=!0)),b=x,N=D;return s}function hje(e){var n,s,f,d,b,m;if(ft(ee(e,(Ke(),Nt)))===ft((rr(),Vo))||ft(ee(e,Nt))===ft(Ti)){for(m=new W(e.f);m.a<m.c.c.length;)if(b=y(K(m),7),b.g==(Ye(),Et)||b.g==At)return!1}if(hu(y(ee(e,Nt),28))){for(d=wr(e,(Ye(),lt)).mb();d.G();)if(f=y(d.H(),7),f.b.c.length!=0)return!1}for(s=Xt(qn(e));Vt(s);)if(n=y(Gt(s),12),n.c.f==n.d.f)return!1;return!0}function wle(e,n){var s,f,d,b,m,x,S,R,N;if(d=e.f,m=d.j.a,b=d.j.b,m<=0&&b<=0)return Ye(),Ar;switch(R=e.i.a,N=e.i.b,x=e.j.a,s=e.j.b,n.e){case 2:case 1:if(R<0)return Ye(),vt;if(R+x>m)return Ye(),lt;break;case 4:case 3:if(N<0)return Ye(),Et;if(N+s>b)return Ye(),At}return S=(R+x/2)/m,f=(N+s/2)/b,S+f<=1&&S-f<=0?(Ye(),vt):S+f>=1&&S-f>=0?(Ye(),lt):f<.5?(Ye(),Et):(Ye(),At)}function _le(e,n,s,f,d,b,m){var x,S,R,N,D,j;for(j=new Ok,R=n.mb();R.G();)for(x=y(R.H(),627),D=new W(Lue(x));D.a<D.c.c.length;)N=y(K(D),129),ft(Er(N,(Ke(),Wa)))===ft((mu(),Hv))&&(dle(j,N,!1,f,d,b,m),a0(e,j));for(S=s.mb();S.G();)for(x=y(S.H(),627),D=new W(Lue(x));D.a<D.c.c.length;)N=y(K(D),129),ft(Er(N,(Ke(),Wa)))===ft((mu(),zf))&&(dle(j,N,!0,f,d,b,m),a0(e,j))}function Wq(e,n){var s,f,d,b,m,x,S,R;for(S=new W(n.f);S.a<S.c.c.length;)for(x=y(K(S),7),d=Xt(as((Or(),new mr(Cr(xe(Ee(yt,1),st,1,4,[x.b,x.e]))))));Vt(d);)f=y(Gt(d),12),s=f.c==x?f.d:f.c,b=s.f,n!=b&&(R=y(ee(f,(Oe(),js)),24).a,R<0&&(R=0),m=b.k,e.b[m]==0&&(f.d==s?(e.a[m]-=R+1,e.a[m]<=0&&e.c[m]>0&&kn(e.e,b)):(e.c[m]-=R+1,e.c[m]<=0&&e.a[m]>0&&kn(e.d,b))))}function dje(e,n){var s,f,d,b,m,x,S,R,N;for(m=new W(n.c);m.a<m.c.c.length;)for(b=y(K(m),16),R=new W(b.a);R.a<R.c.c.length;){for(S=y(K(R),9),N=new Xe,x=0,d=Xt(Wr(S));Vt(d);)s=y(Gt(d),12),y(ee(s,(Oe(),js)),24).a>x&&(x=y(ee(s,js),24).a);for(f=Xt(Wr(S));Vt(f);)s=y(Gt(f),12),S.d!=s.c.f.d&&y(ee(s,(Oe(),js)),24).a==x&&tt(N,new jr(s.c.f,s));Cs(N,e.c),yf(e.b,S.k,N)}}function vje(e,n){var s,f,d,b,m,x,S,R,N;for(m=new W(n.c);m.a<m.c.c.length;)for(b=y(K(m),16),R=new W(b.a);R.a<R.c.c.length;){for(S=y(K(R),9),N=new Xe,x=0,d=Xt(qn(S));Vt(d);)s=y(Gt(d),12),y(ee(s,(Oe(),js)),24).a>x&&(x=y(ee(s,js),24).a);for(f=Xt(qn(S));Vt(f);)s=y(Gt(f),12),S.d!=s.d.f.d&&y(ee(s,(Oe(),js)),24).a==x&&tt(N,new jr(s.d.f,s));Cs(N,e.c),yf(e.f,S.k,N)}}function Kq(e){Noe();var n,s,f,d,b,m,x,S,R,N;for(this.b=new Io,this.c=new Xe,this.a=new Xe,S=V5(),R=0,N=S.length;R<N;++R)x=S[R],SB(Jf,x,new Xe);for(s=e.mb();s.G();)n=y(s.H(),75),Vn(this.a,CS(n)),n.g.a.Y()==0?y(xv(Jf,n.e),20).ib(n):tt(this.c,n);for(b=(m=new cy(Jf).a.bb().mb(),new ly(m));b.a.G();)d=(f=y(b.a.H(),21),y(f.zb(),20)),Cs(d,this.b);m_(y(xv(Jf,(Vi(),mo)),20))}function xle(e,n){var s,f,d,b,m,x,S;if(S=y(ee(n,(Ke(),Nt)),28),S==(rr(),Vo)||S==Ti)for(b=(s=y(ee(n,(Oe(),Jo)),15).a,new Rt(n.e.a+n.a.b+n.a.c+2*s,n.e.b+n.a.d+n.a.a+2*s)).b,x=new W(e.a);x.a<x.c.c.length;)m=y(K(x),9),m.g==(wt(),Hn)&&(f=y(ee(m,ai),32),!(f!=(Ye(),lt)&&f!=vt)&&(d=ze(nn(ee(m,Hc))),S==Vo&&(d*=b),m.i.b=d-y(ee(m,Mc),10).b,u_(m,!1,!0)))}function Ele(e,n){var s,f,d,b,m,x,S,R;for(s=new Ps(e.d.c),Ss(s,(wt(),ua)),Ae(s,(Ke(),Nt),y(ee(n,Nt),28)),Ae(s,Da,y(ee(n,Da),86)),s.k=e.d.b++,tt(e.b,s),s.j.b=n.j.b,s.j.a=0,R=(Ye(),lt),b=kf(wr(n,R)),S=new W(b);S.a<S.c.c.length;)x=y(K(S),7),An(x,s);return m=new cr,an(m,R),An(m,n),m.i.a=s.j.a,m.i.b=s.j.b/2,d=new cr,an(d,iT(R)),An(d,s),d.i.b=s.j.b/2,d.i.a=-d.j.a,f=new pu,nr(f,m),Bn(f,d),s}function pje(e,n,s){var f,d,b,m,x,S,R,N,D,j,H,z;for(S=new nS,HOe(e,S),d=new Zoe(n),H=new Xe,tt(H,(z=e.j,y(Xne(iae(z||(e.j=new qee(e)))),7))),j=new Xe;H.c.length!=0;){for(x=y(K(new W(H)),7),j.c[j.c.length]=x,f=h5(e,x),m=new Jp(f.b.mb());m.b.G();)if(b=y(m.b.H(),12),WDe(d,b,s))for(D=y(AT(S,b),20),N=D.mb();N.G();)R=y(N.H(),7),aa(j,R,0)!=-1||(H.c[H.c.length]=R);Vr(H,x)}return d}function T_(e,n){var s,f,d,b,m,x,S;for(s=RegExp(n,"g"),x=Ge(lR,Xr,2,0,5,1),f=0,S=e,b=null;;)if(m=s.exec(S),m==null||S==""){x[f]=S;break}else x[f]=uS(S,0,m.index),S=uS(S,m.index+m[0].length,($n(),S.length)),s.lastIndex=0,b==S&&(x[f]=S.substr(0,1),S=vg(S,1,S.length-1)),b=S,++f;if($n(),e.length>0){for(d=x.length;d>0&&x[d-1]=="";)--d;d<x.length&&(x.length=d)}return x}function gje(e){var n,s,f,d,b,m;for(m=new W(wl(e.e));m.a<m.c.c.length;)switch(b=y(K(m),161),y(b.e,7).g.e){case 4:e.q.b=rt(e.q.b,(s=y(b.e,7).d,new Mo(s.d,s.b,s.a,s.c)).c);break;case 2:e.q.c=rt(e.q.c,(f=y(b.e,7).d,new Mo(f.d,f.b,f.a,f.c)).b);break;case 1:e.q.d=rt(e.q.d,(d=y(b.e,7).d,new Mo(d.d,d.b,d.a,d.c)).a);break;case 3:e.q.a=rt(e.q.a,(n=y(b.e,7).d,new Mo(n.d,n.b,n.a,n.c)).d)}}function Xq(e,n,s,f,d){var b,m,x;return b=n.$b(s,e.b),b<0?(m=e.e,m?(e.e=Xq(m,n,s,f,d),f==0&&d[0]!=0?--e.a:f>0&&d[0]==0&&++e.a,e.j=Yr(e.j,f-d[0]),Lc(e)):(d[0]=0,f>0?D5(e,s,f):e)):b>0?(x=e.g,x?(e.g=Xq(x,n,s,f,d),f==0&&d[0]!=0?--e.a:f>0&&d[0]==0&&++e.a,e.j=Yr(e.j,f-d[0]),Lc(e)):(d[0]=0,f>0?O5(e,s,f):e)):(d[0]=e.c,f==0?Mq(e):(e.j=Yr(e.j,f-e.c),e.c=f,e))}function bje(e){var n,s,f,d,b,m,x;for(e.o=new y4,f=new pi,m=new W(e.e.a);m.a<m.c.c.length;)b=y(K(m),61),Kh(b).c.length==1&&Br(f,b,f.c.b,f.c);for(;f.b!=0;)b=y(f.b==0?null:(Ct(f.b!=0),$u(f,f.a.a)),61),Kh(b).c.length!=0&&(n=y(ht(Kh(b),0),89),s=b.g.c.length>0,x=lT(n,b),rB(s?x.c:x.g,n),Kh(x).c.length==1&&Br(f,x,f.c.b,f.c),d=new jr(b,n),dre(e.o,d),Vr(e.e.a,b))}function Jq(e,n,s,f,d){var b,m,x;return b=n.$b(s,e.b),b<0?(m=e.e,m?(e.e=Jq(m,n,s,f,d),d[0]>0&&(f>=d[0]?(--e.a,e.j=yl(e.j,d[0])):e.j=yl(e.j,f)),d[0]==0?e:Lc(e)):(d[0]=0,e)):b>0?(x=e.g,x?(e.g=Jq(x,n,s,f,d),d[0]>0&&(f>=d[0]?(--e.a,e.j=yl(e.j,d[0])):e.j=yl(e.j,f)),Lc(e)):(d[0]=0,e)):(d[0]=e.c,f>=e.c?Mq(e):(e.c-=f,e.j=yl(e.j,f),e))}function kle(e,n,s){var f,d,b,m,x,S,R,N;for(S=new W(s.b);S.a<S.c.c.length;)x=y(K(S),9),m=y(ee(x,(Oe(),eh)),55),m&&(N=kle(e,n,m),x.j.a=(b=y(ee(N,Jo),15).a,new Rt(N.e.a+N.a.b+N.a.c+2*b,N.e.b+N.a.d+N.a.a+2*b)).a,x.j.b=(d=y(ee(N,Jo),15).a,new Rt(N.e.a+N.a.b+N.a.c+2*d,N.e.b+N.a.d+N.a.a+2*d)).b);return R=new ww,f=bv(ee(s,(Ke(),cF))),f!=null&&Co(f,"de.cau.cs.kieler.fixed")?xBe(s,R):fMe(n,s,R),s}function Sle(e){var n,s,f,d,b,m,x,S;x=y(ee(e,(Ke(),Rl)),18),S=y(ee(e,j0),18),f=y(ee(e,(Oe(),Jo)),15).a,e.d.a+=f,e.d.b+=f,e.e.a+=2*f,e.e.b+=2*f,Ae(e,Jo,new gn(0)),d=(s=y(ee(e,Jo),15).a,new Rt(e.e.a+e.a.b+e.a.c+2*s,e.e.b+e.a.d+e.a.a+2*s)),n=new hr(d),x.kb((Pc(),F0))&&(m=y(ee(e,Hg),15).a,b=y(ee(e,Gg),15).a,S.kb((Nv(),G0))&&(m<=0&&(m=20),b<=0&&(b=20)),n.a=rt(d.a,m),n.b=rt(d.b,b)),Mje(e,d,n)}function Tle(e,n,s){var f,d,b,m,x,S,R,N;if(n.k==0){for(n.k=1,m=s,s||(d=new Xe,b=(f=y(ga(Qr),11),new Si(f,y(ta(f,f.length),11),0)),m=new jr(d,b)),y(m.a,20).ib(n),n.g==(wt(),Hn)&&y(m.b,18).ib(y(ee(n,(Oe(),ai)),32)),S=new W(n.f);S.a<S.c.c.length;)for(x=y(K(S),7),N=Xt(as((Or(),new mr(Cr(xe(Ee(yt,1),st,1,4,[new Kp(x),new Zd(x)]))))));Vt(N);)R=y(Gt(N),7),Tle(e,R.f,m);return m}return null}function yje(e,n,s,f){var d,b,m,x,S;switch(S=new hr(n.i),S.a+=n.j.a/2,S.b+=n.j.b/2,x=y(ee(n,(Oe(),Jg)),15).a,b=e.e,m=e.a,d=e.d,y(ee(n,ai),32).e){case 1:S.a+=m.b+d.a-s/2,S.b=-f-x,n.i.b=-(m.d+x+d.b);break;case 2:S.a=b.a+m.b+m.c+x,S.b+=m.d+d.b-f/2,n.i.a=b.a+m.c+x-d.a;break;case 3:S.a+=m.b+d.a-s/2,S.b=b.b+m.d+m.a+x,n.i.b=b.b+m.a+x-d.b;break;case 4:S.a=-s-x,S.b+=m.d+d.b-f/2,n.i.a=-(m.b+x+d.a)}return S}function mje(e,n){var s,f,d,b,m,x,S;for(b=new W(n.b);b.a<b.c.c.length;)d=y(K(b),9),m=ee(d,(Oe(),Pt)),Qe(m,7)&&(x=y(m,7),S=yje(n,d,x.j.a,x.j.b),x.i.a=S.a,x.i.b=S.b,an(x,y(ee(d,ai),32)));s=(f=y(ee(n,(Oe(),Jo)),15).a,new Rt(n.e.a+n.a.b+n.a.c+2*f,n.e.b+n.a.d+n.a.a+2*f)),y(ee(n,hi),18).kb((Dr(),Xo))?(Ae(e,(Ke(),Nt),(rr(),Ti)),y(ee(na(e),hi),18).ib(hd),c6(e,s,!1)):c6(e,s,!0)}function Qq(e,n,s){var f,d,b,m,x;switch(x=null,n.e){case 1:for(d=new W(e.f);d.a<d.c.c.length;)if(f=y(K(d),7),Kt(ze(Zt(ee(f,(Oe(),PI))))))return f;x=new cr,Ae(x,(Oe(),PI),(jn(),jn(),Ii));break;case 2:for(m=new W(e.f);m.a<m.c.c.length;)if(b=y(K(m),7),Kt(ze(Zt(ee(b,(Oe(),LI))))))return b;x=new cr,Ae(x,(Oe(),LI),(jn(),jn(),Ii))}return x&&(An(x,e),an(x,s),fDe(x.i,e.j,s)),x}function Rle(e,n){var s,f,d,b,m,x,S;return Dt(n),hv(e.a.t(n.a)),f=e.b,b=e.e,m=e.d,e.b?n.b&&(s=e.a.$b(e.e,n.e),(s<0||s==0&&n.d==(oo(),Ns))&&(b=n.e,m=n.d)):(f=n.b,b=n.e,m=n.d),d=e.c,x=e.g,S=e.f,e.c?n.c&&(s=e.a.$b(e.g,n.g),(s>0||s==0&&n.f==(oo(),Ns))&&(x=n.g,S=n.f)):(d=n.c,x=n.g,S=n.f),f&&d&&(s=e.a.$b(b,x),(s>0||s==0&&m==(oo(),Ns)&&S==(oo(),Ns))&&(b=x,m=(oo(),Ns),S=F_)),new w_(e.a,f,b,m,d,x,S)}function wje(e,n,s,f){var d,b,m,x,S,R,N;if(s.c.f!=n.f)for(d=new Ps(e),Ss(d,(wt(),Nn)),Ae(d,(Oe(),Pt),s),Ae(d,(Ke(),Nt),(rr(),Ti)),f.c[f.c.length]=d,m=new cr,An(m,d),an(m,(Ye(),vt)),x=new cr,An(x,d),an(x,lt),Bn(s,m),b=new pu,Ac(b,s),Ae(b,pr,null),nr(b,x),Bn(b,n),Cce(d,m,x),R=new Ln(s.b,0);R.b<R.d.Y();)S=(Ct(R.b<R.d.Y()),y(R.d.sb(R.c=R.b++),33)),N=y(ee(S,Wa),107),N==(mu(),zf)&&(lo(R),tt(b.b,S))}function _je(e,n,s,f){var d,b,m,x,S,R,N,D,j,H,z,Z,ie;for(b=s+(n.n+1)*e.a,m=n.b,d=new Rt(b,m),S=(N=new pn(n.c.a).a.bb().mb(),new mn(N));S.a.G();)x=(R=y(S.a.H(),21),y(R.yb(),12)),z=ia(x.d),D=ia(x.c),H=new Rt(b,D.b),ie=new Rt(b,z.b),j=new Rt(s-10,D.b),Z=new Rt(f,z.b),z.a>=f&&D.a>=f&&(j.a=f),z.a<=s&&D.a<=s&&(Z.a=s-10),n.c.a.Y()==1?E5(x.a,xe(Ee(un,1),on,10,0,[j,H,ie,Z])):E5(x.a,xe(Ee(un,1),on,10,0,[j,H,d,ie,Z]))}function Oc(e,n){var s,f,d,b,m,x;for(b=e.c,m=e.d,nr(e,null),Bn(e,null),n&&Kt(ze(Zt(ee(m,(Oe(),PI)))))?nr(e,Qq(m.f,(Ir(),Ri),(Ye(),lt))):nr(e,m),n&&Kt(ze(Zt(ee(b,(Oe(),LI)))))?Bn(e,Qq(b.f,(Ir(),fa),(Ye(),vt))):Bn(e,b),f=new W(e.b);f.a<f.c.c.length;)s=y(K(f),33),d=y(ee(s,(Ke(),Wa)),107),d==(mu(),Hv)?Ae(s,Wa,zf):d==zf&&Ae(s,Wa,Hv);x=Kt(ze(Zt(ee(e,(Oe(),ec))))),Ae(e,ec,(jn(),x?er:Ii)),e.a=ZS(e.a)}function Zq(e){var n,s,f,d,b,m;for(iB(this),s=e.Y()-1;s<3;s++)e.rb(0,y(e.sb(0),10));if(e.Y()<4)throw new Rn("At (least dimension + 1) control points are necessary!");for(this.c=3,this.e=!0,this.f=!0,this.d=!1,UMe(this,e.Y()+this.c-1),m=new Xe,b=this.g.mb(),n=0;n<this.c-1;n++)tt(m,nn(b.H()));for(d=e.mb();d.G();)f=y(d.H(),10),tt(m,nn(b.H())),this.b.ib(new IS(f,m)),Gn(0,m.c.length),m.c.splice(0,1)}function xje(e){var n,s,f,d,b,m,x,S,R,N,D;for(D=new Wp,D.d=0,m=new W(e.c);m.a<m.c.c.length;)b=y(K(m),16),D.d+=b.a.c.length;for(f=0,d=0,D.a=Ge(gr,vr,26,e.c.c.length,12,1),R=0,D.e=Ge(gr,vr,26,D.d,12,1),s=new W(e.c);s.a<s.c.c.length;)for(n=y(K(s),16),n.k=f++,D.a[n.k]=d++,N=0,S=new W(n.a);S.a<S.c.c.length;)x=y(K(S),9),x.k=R++,D.e[x.k]=N++;return D.c=new cte(D),D.b=pf(D.d),dje(D,e),D.f=pf(D.d),vje(D,e),D}function Eje(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z;for(x=Ge(gr,vr,26,n.c.c.length,12,1),R=Ge(OF,nt,132,n.c.c.length,0,1),D=e.a,j=0,H=D.length;j<H;++j){for(N=D[j],Z=0,m=new W(N.f);m.a<m.c.c.length;)d=y(K(m),9),S=d.g,f=Pa(d.d),++x[f],z=e.b.a*e.b.d,x[f]>0&&R[f]&&(z=iS(e.b,R[f],S)),Z=rt(Z,d.d.c.b+z);for(b=new W(N.f);b.a<b.c.c.length;)d=y(K(b),9),d.i.b=Z+d.e.d,s=d.d,s.c.b=Z+d.e.d+d.j.b+d.e.a,R[aa(s.b.c,s,0)]=d.g}}function Ile(e){var n,s,f,d,b,m,x,S,R,N;for(S=new W(e.a);S.a<S.c.c.length;)if(x=y(K(S),9),x.g==(wt(),Hn)&&(d=y(ee(x,(Oe(),ai)),32),d==(Ye(),lt)||d==vt))for(f=Xt(o0(x));Vt(f);)s=y(Gt(f),12),n=s.a,n.b!=0&&(R=s.c,R.f==x&&(b=(Ct(n.b!=0),y(n.a.a.c,10)),b.b=Pn(xe(Ee(un,1),on,10,0,[R.f.i,R.i,R.a])).b),N=s.d,N.f==x&&(m=(Ct(n.b!=0),y(n.c.b.c,10)),m.b=Pn(xe(Ee(un,1),on,10,0,[N.f.i,N.i,N.a])).b))}function kje(e,n,s,f){var d,b,m,x,S,R;for(m=new qle(e,n,s),S=new Ln(f,0),d=!1;S.b<S.d.Y();)x=(Ct(S.b<S.d.Y()),y(S.d.sb(S.c=S.b++),102)),x==n||x==s?lo(S):!d&&ze(ss(x.g,x.d[0]).a)>ze(ss(m.g,m.d[0]).a)?(Ct(S.b>0),S.a.sb(S.c=--S.b),Sc(S,m),d=!0):x.e&&x.e.Y()>0&&(b=(!x.e&&(x.e=new Xe),x.e).nb(n),R=(!x.e&&(x.e=new Xe),x.e).nb(s),(b||R)&&((!x.e&&(x.e=new Xe),x.e).ib(m),++m.c));d||(f.c[f.c.length]=m)}function Sje(e,n,s,f){var d,b,m,x,S,R,N,D,j,H,z;s.d.f!=n.f&&(d=new Ps(e),Ss(d,(wt(),Nn)),Ae(d,(Oe(),Pt),s),Ae(d,(Ke(),Nt),(rr(),Ti)),f.c[f.c.length]=d,m=new cr,An(m,d),an(m,(Ye(),vt)),x=new cr,An(x,d),an(x,lt),S=s.d,Bn(s,m),b=new pu,Ac(b,s),Ae(b,pr,null),nr(b,x),Bn(b,S),R=y(ht(m.b,0),12).c,N=R.f,D=N.g,j=y(ht(x.e,0),12).d,H=j.f,z=H.g,D==Nn?Ae(d,ca,y(ee(N,ca),7)):Ae(d,ca,R),z==Nn?Ae(d,Xi,y(ee(H,Xi),7)):Ae(d,Xi,j))}function Tje(e,n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se;return x=e.b[n],S=e.b[s],R=y(ee(x,(Oe(),tp)),20),!!R&&R.Y()!=0&&R.kb(S)||(N=x.g!=(wt(),Nn)&&S.g!=Nn,D=y(ee(x,Zf),9),j=y(ee(S,Zf),9),H=!!D&&D!=x||!!j&&j!=S,z=D!=j,Z=sce(x,(Ye(),Et)),ie=sce(S,At),se=H&&z||Z||ie,N&&se)||x.g==(wt(),_r)&&S.g==ir||S.g==(wt(),_r)&&x.g==ir?!1:(m=e.b[n],f=e.b[s],PDe(e.c,m,f),MDe(e.d,m,f),b=Voe(e.a,m,f)+e.c.d+e.d.d,d=Voe(e.a,f,m)+e.c.b+e.d.b,b>d)}function Rje(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z;for(m=n,j=n.d,N=n.c.f,H=n.d.f,D=Pa(N.d),z=Pa(H.d),x=D;x<z;x++)d=new Ps(e),Ss(d,(wt(),Nn)),Ae(d,(Oe(),Pt),m),Ae(d,(Ke(),Nt),(rr(),Ti)),S=y(ht(e.c,x+1),16),ei(d,S),Z=y(ee(m,zo),15).a,Z<0&&(Z=0,Ae(m,zo,new gn(Z))),d.j.b=Z,R=Math.floor(Z/2),f=new cr,an(f,(Ye(),vt)),An(f,d),f.i.b=R,b=new cr,an(b,lt),An(b,d),b.i.b=R,Bn(m,f),s=new pu,Ac(s,m),Ae(s,pr,null),nr(s,b),Bn(s,j),kDe(d,m,s),m=s}function Ije(e,n){if(Vi(),e==n)return hT(e);switch(e.e){case 1:switch(n.e){case 4:return mo;case 1:return Iu;case 2:return Nl;case 3:return Gc}case 2:switch(n.e){case 1:return Nl;case 2:return Fc;case 3:return $c;case 4:return Wo}case 3:switch(n.e){case 2:return $c;case 3:return Ko;case 4:return Ml;case 1:return Gc}case 4:switch(n.e){case 3:return Ml;case 4:return Dl;case 1:return mo;case 2:return Wo}}return ld}function Cje(e){var n,s,f,d,b,m,x,S,R,N,D,j,H,z,Z;for(D=new ba,d=null,m=new W(e.c);m.a<m.c.c.length;){for(b=y(K(m),16),S=new W(b.a);S.a<S.c.c.length;)x=y(K(S),9),x.g==(wt(),Hn)&&(N=y(ee(x,(Oe(),gx)),9),N&&(dDe(N,D),j=new cr,An(j,x),H=y(ee(x,ai),32),an(j,H),z=y(ht(N.f,0),7),Z=new pu,nr(Z,j),Bn(Z,z)));d=b}for(s=(R=new pn(D.a).a.bb().mb(),new mn(R));s.a.G();)n=(f=y(s.a.H(),21),y(f.yb(),9)),ei(n,d);return D}function Cle(e,n,s){var f,d,b,m,x,S,R,N,D;for(d=new Xe,R=new W(n.b);R.a<R.c.c.length;)if(S=y(K(R),9),x=y(ee(S,(Oe(),eh)),55),x&&(f=Cle(e,x,S),Vn(d,f),w4e(e,x,S),y(ee(x,hi),18).kb((Dr(),Xo))))for(D=new W(S.f);D.a<D.c.c.length;)N=y(K(D),7),bn(e.b,N)==null&&(b=R_(N,(rr(),yo),N.g,-(N.b.c.length-N.e.c.length),N.j,y(ee(x,(Ke(),bo)),59),x),Ae(b,Pt,N),Cn(e.b,N,b),tt(x.b,b));return m=new Xe,E4e(e,n,s,d,m),s&&g4e(e,n,s,m),m}function Aje(e){var n,s,f,d,b,m,x,S,R,N,D,j;for(n=Mce(e),N=(x=new pn(n).a.bb().mb(),new mn(x));N.a.G();){for(R=(d=y(N.a.H(),21),y(d.yb(),9)),D=R.e.d,j=R.j.b+R.e.a,e.d[R.k]=0,s=R;(b=e.a[s.k])!=R;)f=_Oe(s,b),e.c==(fo(),Ru)?S=f.d.i.b+f.d.a.b-f.c.i.b-f.c.a.b:S=f.c.i.b+f.c.a.b-f.d.i.b-f.d.a.b,m=ze(e.d[s.k])+S,e.d[b.k]=m,D=rt(D,b.e.d-m),j=rt(j,m+b.j.b+b.e.a),s=b;s=R;do e.d[s.k]=ze(e.d[s.k])+D,s=e.a[s.k];while(s!=R);e.b[R.k]=D+j}}function qT(e,n,s){var f,d,b,m,x,S,R,N;return f=e.a.k==(Ys(),Ms)?Wi:ii,x=ule(e,new nre(n,s)),!x.a&&x.c?(kn(e.d,x),f):x.a?(d=x.a.c,S=x.a.d,s?(R=e.a.c==(fo(),Ll)?S:d,b=e.a.c==Ll?d:S,m=e.a.f[b.f.k],N=ze(e.a.n[m.k])+ze(e.a.d[b.f.k])+b.i.b+b.a.b-ze(e.a.d[R.f.k])-R.i.b-R.a.b):(R=e.a.c==(fo(),Ru)?S:d,b=e.a.c==Ru?d:S,N=ze(e.a.n[e.a.f[b.f.k].k])+ze(e.a.d[b.f.k])+b.i.b+b.a.b-ze(e.a.d[R.f.k])-R.i.b-R.a.b),N):f}function Pje(e){var n,s,f,d,b;for(Ae(e.g,(Oe(),W7),za(e.g.c)),n=1;n<e.c.c.length-1;++n)Ae(y(ht(e.c,n),9),(Ke(),Da),(Nc(),dn(Ki,xe(Ee(Un,1),nt,41,0,[Xa,Os]))));for(f=xn(za(e.g.c),0);f.b!=f.d.c;)s=y(vn(f),33),d=y(ee(e.g,(Ke(),Da)),86),gl(d,dn((Nc(),Sa),xe(Ee(Un,1),nt,41,0,[xa,Xa])))||(gl(d,dn(Sa,xe(Ee(Un,1),nt,41,0,[ka,Xa])))?(tt(e.e.c,s),Vr(e.g.c,s),b=new zne(e,s),Ae(e.g,CI,b)):(R3e(e,s),tt(e.i,e.d),Ae(e.g,CI,sDe(e.i))))}function Ale(e,n,s,f){var d,b,m,x,S,R,N;if(b=oT(f),x=Kt(ze(Zt(ee(f,(sn(),u$))))),(x||Kt(ze(Zt(ee(e,(Ke(),L0))))))&&!hu(y(ee(e,(Ke(),Nt)),28)))d=a_(b),S=Qq(e,s,s==(Ir(),Ri)?d:iT(d));else switch(S=new cr,An(S,e),N=S.i,N.a=n.a-e.i.a,N.b=n.b-e.i.b,hMe(N,e.j.a,e.j.b),an(S,wle(S,b)),m=y(ee(f,(Oe(),hi)),18),R=S.g,b.e){case 2:case 1:(R==(Ye(),Et)||R==At)&&m.ib((Dr(),dd));break;case 4:case 3:(R==(Ye(),lt)||R==vt)&&m.ib((Dr(),dd))}return S}function Lje(e){var n,s,f,d,b,m,x,S;for(f=pB(kf(e.a)),d=(n=y(ga(Ug),11),new Si(n,y(ta(n,n.length),11),0));f.a.G()||f.b.mb().G();)s=y(I5(f),12),x=s.c.g,S=s.d.g,x==(Ye(),Ar)?S!=Ar&&(m=hT(S),Ae(s,(Oe(),Z0),m),an(s.c,S),ji(d,m),f.a.I()):S==Ar?(m=hT(x),Ae(s,(Oe(),Z0),m),an(s.d,x),ji(d,m),f.a.I()):(m=Ije(x,S),Ae(s,(Oe(),Z0),m),ji(d,m),f.a.I());return d.c==1?b=y(Tf(new fv(d)),60):b=(Vi(),ld),Ig(e,b,!1),b}function Nje(e,n){var s,f,d,b;for(d=0;d<($n(),n.length)&&Coe(n.charCodeAt(d),dfe);)++d;for(s=n.length;s>0&&Coe(n.charCodeAt(s-1),vfe);)--s;if(d>=s)throw new Rn("The given string does not contain any numbers.");if(b=T_(n.substr(d,s-d),`,|;|\r|
334
+ `),b.length!=2)throw new Rn("Exactly two numbers are expected, "+b.length+" were found.");try{e.a=b_(Af(b[0])),e.b=b_(Af(b[1]))}catch(m){throw m=gi(m),Qe(m,130)?(f=m,new Rn(pfe+f)):bi(m)}}function Oje(e,n,s){var f,d,b,m,x,S,R,N,D;for(S=s+n.d.c.a,D=new W(n.f);D.a<D.c.c.length;){if(N=y(K(D),7),f=Pn(xe(Ee(un,1),on,10,0,[N.f.i,N.i,N.a])),b=new Rt(0,f.b),N.g==(Ye(),lt))b.a=S;else if(N.g==vt)b.a=s;else continue;if(f.a!=b.a)for(d=N.e.c.length+N.b.c.length>1,x=Xt(as((Or(),new mr(Cr(xe(Ee(yt,1),st,1,4,[N.b,N.e]))))));Vt(x);)m=y(Gt(x),12),R=m.c==N?m.d:m.c,ki(Pn(xe(Ee(un,1),on,10,0,[R.f.i,R.i,R.a])).b-b.b)>1&&qMe(e,m,b,d,N)}}function Ple(e,n){var s,f,d,b,m,x;for(m=new Wh(new xc(e.f.b).a);m.b;){if(b=xg(m),d=y(b.yb(),251),n==1){if(d.yc()!=(ur(),Xu)&&d.yc()!=Su)continue}else if(d.yc()!=(ur(),ps)&&d.yc()!=_a)continue;switch(f=y(y(b.zb(),27).b,25),x=y(y(b.zb(),27).a,78),s=x.c,d.yc().e){case 2:f.j.d=e.e.a,f.j.c=rt(1,f.j.c+s);break;case 1:f.j.d=f.j.d+s,f.j.c=rt(1,f.j.c-s);break;case 4:f.j.e=e.e.b,f.j.b=rt(1,f.j.b+s);break;case 3:f.j.e=f.j.e+s,f.j.b=rt(1,f.j.b-s)}}}function e6(e,n,s,f,d){var b,m,x,S,R,N,D,j,H;for(j=(Qn(),new ln),x=new Xe,bce(e,s,e.d.Mc(),x,j),bce(e,f,e.d.Nc(),x,j),S=new Ln(x,0);S.b<S.d.Y();)for(b=(Ct(S.b<S.d.Y()),y(S.d.sb(S.c=S.b++),80)),R=new Ln(x,S.b);R.b<R.d.Y();)m=(Ct(R.b<R.d.Y()),y(R.d.sb(R.c=R.b++),80)),M3e(b,m,e.a);for(bBe(x,y(ee(n,(Oe(),np)),154)),m4e(x),H=-1,D=new W(x);D.a<D.c.c.length;)N=y(K(D),80),!(ki(N.k-N.a)<Dc)&&(H=Ei(H,N.i),e.d.Kc(N,d));return e.b.a.Q(),H+1}function Lle(e,n,s){var f,d;switch(d=new hr(n),f=new hr(e.j),s.e){case 1:case 8:case 7:Ha(d,-f.a/2,-f.b),Ha(n,0,-(.5+f.b));break;case 3:case 4:case 5:Ha(d,-f.a/2,0),Ha(n,0,.5+f.b);break;case 0:Ha(d,-f.a/2,-f.b),Ha(n,0,-(.5+-f.b));break;case 10:case 2:Ha(d,0,-f.b/2),Ha(n,0,-(.5+f.b));break;case 6:Ha(d,-f.a,f.b/2),Ha(n,0,-(.5+f.b));break;case 9:Ha(d,-f.a/2,0),Ha(n,0,-(.5+f.b));break;case 11:Ha(d,-f.a,-f.b/2),Ha(n,0,-(.5+f.b))}return On(qu(e.i),d),new Bue(e)}function Dje(e,n,s,f,d){Mh();var b,m,x,S,R,N,D;if(fae(e,"src"),fae(s,"dest"),N=wg(e),x=wg(s),jB((N.g&4)!=0,"srcType is not an array"),jB((x.g&4)!=0,"destType is not an array"),R=N.c,b=x.c,jB(R.g&1?R==b:(b.g&1)==0,"Array types don't match"),D=e.length,S=s.length,n<0||f<0||d<0||n+d>D||f+d>S)throw new g4;if((!(R.g&1)||R.g&4)&&N!=x)if(e===s&&n<f)for(n+=d,m=f+d;m-- >f;)s[m]=e[--n];else for(m=f+d;f<m;)s[f++]=e[n++];else d>0&&_T(e,n,s,f,d,!0)}function Mje(e,n,s){var f,d,b,m,x;if(f=y(ee(e,(sn(),FI)),18),s.a>n.a&&(f.kb((Rg(),fI))?e.d.a+=(s.a-n.a)/2:f.kb(dI)&&(e.d.a+=s.a-n.a)),s.b>n.b&&(f.kb((Rg(),pI))?e.d.b+=(s.b-n.b)/2:f.kb(vI)&&(e.d.b+=s.b-n.b)),y(ee(e,(Oe(),hi)),18).kb((Dr(),Xo))&&(s.a>n.a||s.b>n.b))for(x=new W(e.b);x.a<x.c.c.length;)m=y(K(x),9),m.g==(wt(),Hn)&&(d=y(ee(m,ai),32),d==(Ye(),lt)?m.i.a+=s.a-n.a:d==At&&(m.i.b+=s.b-n.b));b=e.a,e.e.a=s.a-b.b-b.c,e.e.b=s.b-b.d-b.a}function t6(e,n,s,f,d,b){var m,x,S;if(m=n.$b(s,e.b),m<0)return x=e.e,x?(e.e=t6(x,n,s,f,d,b),b[0]==f&&(d==0&&b[0]!=0?--e.a:d>0&&b[0]==0&&++e.a,e.j=Yr(e.j,d-b[0])),Lc(e)):(b[0]=0,f==0&&d>0?D5(e,s,d):e);if(m>0)return S=e.g,S?(e.g=t6(S,n,s,f,d,b),b[0]==f&&(d==0&&b[0]!=0?--e.a:d>0&&b[0]==0&&++e.a,e.j=Yr(e.j,d-b[0])),Lc(e)):(b[0]=0,f==0&&d>0?O5(e,s,d):e);if(b[0]=e.c,f==e.c){if(d==0)return Mq(e);e.j=Yr(e.j,d-e.c),e.c=d}return e}function FT(e){var n,s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie;for(S=e.e,H=e.f,m=e.d,z=e.c,N=z-1,Z=e.g,D=za(e.g.xb(1,e.g.Y()-1)),R=new Xe,s=0;s<e.b.Y()-1;s++)x=Oo(kc(Ts(y(e.b.sb(s+1),92).a),y(e.b.sb(s),92).a),z/(ze(nn(Z.sb(s+z)))-ze(nn(Z.sb(s))))),R.c[R.c.length]=x;for(ie=new Xe,b=xn(D,0),j=new Xe,n=0;n<N-1;n++)tt(ie,nn(vn(b)));for(d=new W(R);d.a<d.c.c.length;)f=y(K(d),10),tt(ie,nn(vn(b))),tt(j,new IS(f,ie)),Gn(0,ie.c.length),ie.c.splice(0,1);return new oq(S,H,m,N,D,j)}function Nle(e){this.q=new v4,this.p=new v4,this.o=Ge(gr,vr,26,(Ye(),xe(Ee(Qr,1),nt,32,0,[Ar,Et,lt,At,vt])).length,12,1),this.i=Ge(gr,vr,26,xe(Ee(Qr,1),nt,32,0,[Ar,Et,lt,At,vt]).length,12,1),this.j=Ge(Ra,Ui,26,xe(Ee(Qr,1),nt,32,0,[Ar,Et,lt,At,vt]).length,12,1),this.n=Ge(Ra,Ui,26,xe(Ee(Qr,1),nt,32,0,[Ar,Et,lt,At,vt]).length,12,1),this.g=Ge(xF,nt,100,xe(Ee(Qr,1),nt,32,0,[Ar,Et,lt,At,vt]).length,0,1),this.c=new rq(sde),this.e=e,vne(this.o),vne(this.i),$k(this.n,0)}function n6(e,n){var s,f,d,b,m,x,S,R,N;if(m=n.i!=null&&!n.b,m||en(n,"Component Layout",1),s=y(ee(e,(Oe(),r$)),20),b=1/s.Y(),Kt(ze(Zt(ee(e,(Ke(),P0))))))for(N=s.mb();N.G();)R=y(N.H(),31),gne(wg(R)),R.sc(e,Uh(n,b));else for(N=s.mb();N.G();)R=y(N.H(),31),R.sc(e,Uh(n,b));for(d=new W(e.c);d.a<d.c.c.length;)f=y(K(d),16),Vn(e.b,f.a),f.a.c=Ge(yt,st,1,0,4,1);for(S=new W(e.b);S.a<S.c.c.length;)x=y(K(S),9),ei(x,null);e.c.c=Ge(yt,st,1,0,4,1),m||zt(n)}function jje(e,n){var s,f,d,b,m,x,S,R,N,D,j;for(m=new W(n);m.a<m.c.c.length;)d=y(K(m),102),d.e=null,d.c=0;for(x=null,b=new W(n);b.a<b.c.c.length;){for(d=y(K(b),102),N=d.d[0],j=y(ee(N,(Oe(),tp)),20).mb();j.G();)D=y(j.H(),9),(!d.e&&(d.e=new Xe),d.e).ib(e.b[D.d.k][D.k]),++e.b[D.d.k][D.k].c;if(N.g==(wt(),ir)){if(x)for(R=lB(new wk(e.c,x),0);R.c;)for(S=y(PS(R),9),f=lB(new wk(e.c,N),0);f.c;)s=y(PS(f),9),qAe(e.b[S.d.k][S.k]).ib(e.b[s.d.k][s.k]),++e.b[s.d.k][s.k].c;x=N}}}function Bje(e,n,s,f){var d,b,m,x,S,R;if(Rq(n),b=y(ee(f,(Oe(),hi)),18),x=(Ke(),O0).b,!(x in n.a&&Jn(n,x).ic().a))switch(S=new cr,Ae(S,Pt,n),An(S,s),m=y(Jn(n,"id"),97),Fw(e.k,m.a,S),Cn(e.n,S,n),IT(n,S),p_(n,S),Pq(e,n,S,f),an(S,y(ee(S,M0),32)),R=y(ee(s,Nt),28),R==(rr(),Il)&&(R=yo),d=y(ee(f,bo),59),d==(ur(),go)&&(d=_a),Qje(S,R,d,y(ee(S,Mc),10)),d.e){case 2:case 1:(S.g==(Ye(),Et)||S.g==At)&&b.ib((Dr(),dd));break;case 4:case 3:(S.g==(Ye(),lt)||S.g==vt)&&b.ib((Dr(),dd))}}function qje(e,n){var s,f,d,b,m,x,S,R;for(e.f=n,d=n.c.c.length,e.a=Ge($r,Xr,51,d,0,2),e.d=Ge($r,Xr,51,d,0,2),e.g=Ge($r,Xr,51,d,0,2),m=new Ln(n.c,0);m.b<m.d.Y();)for(f=(Ct(m.b<m.d.Y()),y(m.d.sb(m.c=m.b++),16)),x=f.a.c.length,b=m.b-1,e.a[b]=Ge($r,oa,9,x,0,1),e.d[b]=Ge($r,oa,9,x,0,1),e.g[b]=Ge($r,oa,9,x,0,1),R=new Ln(f.a,0),s=0;R.b<R.d.Y();)S=(Ct(R.b<R.d.Y()),y(R.d.sb(R.c=R.b++),9)),S.k=s++,e.d[b][R.b-1]=S,e.a[b][R.b-1]=S,e.g[b][R.b-1]=S;e.b=new pre(e.d),e.e.c&&(e.b.e=!0)}function Fje(e){var n,s,f,d,b,m;for(d=new Xe,m=new W(e.c.f);m.a<m.c.c.length;)b=y(K(m),7),b.g==(Ye(),lt)&&(d.c[d.c.length]=b);if(e.d.a==(ur(),_a)&&!hu(y(ee(e.c,(Ke(),Nt)),28)))for(f=Xt(qn(e.c));Vt(f);)s=y(Gt(f),12),tt(d,s.c);Ae(e.c,(Oe(),Q0),new gn(e.c.j.a)),Ae(e.c,jl,(jn(),jn(),Ii)),tt(e.b,e.c),n=null,e.e==1?n=r4e(e,e.c,Pa(e.c.d),e.c.j.a):e.e==0?n=i4e(e,e.c,Pa(e.c.d),e.c.j.a):e.e==3?n=zMe(e,e.c,e.c.j.a):e.e==2&&(n=HMe(e,e.c,e.c.j.a)),n&&new gq(e.c,e.b,ze(nn(n.b)))}function r6(e,n,s){var f,d,b,m,x,S,R,N;if(d=n.g,Kt(ze(Zt(ee(n,(Oe(),jl)))))&&(d=(wt(),ua)),n.k>=0)return!1;if(s.e&&d==(wt(),ua)&&d!=s.e)return!1;if(n.k=s.b,tt(s.f,n),s.e=d,d==(wt(),Nn)||d==_r||d==ua){for(m=new W(n.f);m.a<m.c.c.length;)for(b=y(K(m),7),N=(f=new W(new Zd(b).a.e),new r4(f));vf(N.a);)if(R=y(K(N.a),12).d,x=R.f,S=x.g,n.d!=x.d){if(d==ua){if(S==ua&&r6(e,x,s))return!0}else if((S==Nn||S==_r)&&r6(e,x,s))return!0}}return!0}function Ole(e,n){var s,f,d,b,m,x,S,R,N;for(E5(e.a,xe(Ee(un,1),on,10,0,[n.a,n.b])),Na(e.c,n.e),e.q.d=e.q.d|n.d,e.q.a=e.q.a|n.c,x=wn(e.j.e,n.k),S=rt(e.j.e+e.j.b,n.n),Sie(e.j,n.j,x,0,S-x),Dn(e.d,n.f),n.f.c.f==n.f.d.f&&us(e.n,!0,!0,!0,!0),m=new ci,R=new ci,d=(N=new pn(e.d.a).a.bb().mb(),new mn(N));d.a.G();)f=(b=y(d.a.H(),21),y(b.yb(),12)),Dn(m,f.c),Dn(R,f.d);s=m.a.Y()-R.a.Y(),s<0?(Qy(e.n,!0,(ur(),ps)),Qy(e.n,!1,_a)):s>0&&(Qy(e.n,!1,(ur(),ps)),Qy(e.n,!0,_a))}function $je(e,n){var s,f,d,b,m,x,S,R,N,D;for(m=0;m<($n(),n.length)&&Aoe(n.charCodeAt(m),dfe);)++m;for(s=n.length;s>0&&Aoe(n.charCodeAt(s-1),vfe);)--s;if(m<s){N=T_(n.substr(m,s-m),",|;");try{for(S=0,R=N.length;S<R;++S){if(x=N[S],b=T_(x,"="),b.length!=2)throw new Rn("Expecting a list of key-value pairs.");d=Af(b[0]),D=b_(Af(b[1])),Co(d,"top")?e.d=D:Co(d,"left")?e.b=D:Co(d,A6)?e.a=D:Co(d,"right")&&(e.c=D)}}catch(j){throw j=gi(j),Qe(j,130)?(f=j,new Rn(pfe+f)):bi(j)}}}function Gje(e,n){var s,f,d,b,m,x,S,R,N;for(N=new pi,x=(R=new cy(e.c).a.bb().mb(),new ly(R));x.a.G();)b=(d=y(x.a.H(),21),y(d.zb(),200)),b.b==0&&Br(N,b,N.c.b,N.c);for(;N.b!=0;)for(b=y(N.b==0?null:(Ct(N.b!=0),$u(N,N.a.a)),200),f=new W(b.d);f.a<f.c.c.length;)s=y(K(f),279),n.k==(Ys(),qc)?s.b.a=wn(s.b.a,b.a+s.a):s.b.a=rt(s.b.a,b.a+s.a),--s.b.b,s.b.b==0&&kn(N,s.b);for(m=(S=new cy(e.c).a.bb().mb(),new ly(S));m.a.G();)b=(d=y(m.a.H(),21),y(d.zb(),200)),n.g[b.c.k]=b.a}function Hje(e,n,s){var f,d,b,m;switch(b=e.i,d=Pn(xe(Ee(un,1),on,10,0,[n.i,n.f.i])),f=Pn(xe(Ee(un,1),on,10,0,[n.f.i,n.i,n.a])),m=n.d,n.g.e){case 4:b.a=wn(d.a,f.a)-m.b-e.j.a-s,b.b=Pn(xe(Ee(un,1),on,10,0,[n.f.i,n.i,n.a])).b+s;break;case 2:b.a=rt(d.a+n.j.a,f.a)+m.c+s,b.b=Pn(xe(Ee(un,1),on,10,0,[n.f.i,n.i,n.a])).b+s;break;case 1:b.a=Pn(xe(Ee(un,1),on,10,0,[n.f.i,n.i,n.a])).a+s,b.b=wn(d.b,f.b)-m.d-e.j.b-s;break;case 3:b.a=Pn(xe(Ee(un,1),on,10,0,[n.f.i,n.i,n.a])).a+s,b.b=rt(d.b+n.j.b,f.b)+m.a+s}}function zje(e,n,s){var f,d,b,m;switch(b=e.i,d=Pn(xe(Ee(un,1),on,10,0,[n.i,n.f.i])),f=Pn(xe(Ee(un,1),on,10,0,[n.f.i,n.i,n.a])),m=n.d,n.g.e){case 4:b.a=wn(d.a,f.a)-m.b-e.j.a-s,b.b=Pn(xe(Ee(un,1),on,10,0,[n.f.i,n.i,n.a])).b-e.j.b-s;break;case 2:b.a=rt(d.a+n.j.a,f.a)+m.c+s,b.b=Pn(xe(Ee(un,1),on,10,0,[n.f.i,n.i,n.a])).b-e.j.b-s;break;case 1:b.a=Pn(xe(Ee(un,1),on,10,0,[n.f.i,n.i,n.a])).a+s,b.b=wn(d.b,f.b)-m.d-e.j.b-s;break;case 3:b.a=Pn(xe(Ee(un,1),on,10,0,[n.f.i,n.i,n.a])).a+s,b.b=rt(d.b+n.j.b,f.b)+m.a+s}}function Vje(e){var n,s;switch(s=y(ee(e,(Oe(),hi)),18),n=kw(lde),Kt(ze(Zt(ee(e,(sn(),t1)))))?fl(n,(Kr(),tI)):zi(n,(Kr(),tI)),ee(e,(y5(),eF))!=null&&Ur(n,fde),y(ee(e,(Ke(),bo)),59).e){case 2:Hi(fl(n,(Kr(),t7)),e7);break;case 3:Hi(fl(n,(Kr(),HF)),GF);break;case 4:Hi(fl(n,(Kr(),d7)),h7)}return s.kb((Dr(),kI))&&Hi(fl(n,(Kr(),$F)),FF),ft(ee(e,wx))!==ft((Of(),ax))&&zi(n,(Kr(),r7)),ft(ee(e,_x))!==ft((Cg(),W0))&&ft(ee(e,Q7))===ft((Cc(),id))&&Hi(n,(Kr(),WF)),s.kb(B7)&&(fl(n,(Kr(),a7)),zi(n,i7)),n}function g0(){g0=a,F7=new Hh("ONE_SIDED",0,!0,!1,!1),RI=new Hh("TWO_SIDED",1,!1,!1,!1),$7=new Hh("ONE_SIDED_BEST_OF_UP_OR_DOWN",2,!0,!0,!1),z7=new Hh("TWO_SIDED_BEST_OF_UP_OR_DOWN",3,!1,!0,!1),G7=new Hh("ONE_SIDED_BEST_OF_UP_OR_DOWN_ORTHOGONAL_HYPEREDGES",4,!0,!0,!0),V7=new Hh("TWO_SIDED_BEST_OF_UP_OR_DOWN_ORTHOGONAL_HYPEREDGES",5,!1,!0,!0),H7=new Hh("ONE_SIDED_ORTHOGONAL_HYPEREDGES",6,!0,!1,!0),TI=new Hh("OFF",7,!1,!1,!1)}function $T(e,n,s,f,d,b,m){var x,S,R,N,D,j,H;return D=Kt(ze(Zt(ee(n,(sn(),c$))))),j=null,b==(Ir(),fa)&&f.c.f==s?j=f.c:b==Ri&&f.d.f==s&&(j=f.d),R=m,!m||!D||j?(N=(Ye(),Ar),j?N=j.g:hu(y(ee(s,(Ke(),Nt)),28))&&(N=b==fa?vt:lt),S=Xje(e,n,s,b,N,f),x=OS((na(s),f)),b==fa?(nr(x,y(ht(S.f,0),7)),Bn(x,d)):(nr(x,d),Bn(x,y(ht(S.f,0),7))),R=new eue(f,x,S,y(ee(S,(Oe(),Pt)),7),b,!j)):(tt(m.e,f),H=dne(y(ee(m.d,(Ke(),zo)),15).a,y(ee(f,zo),15).a),Ae(m.d,zo,new gn(H))),Bt(e.a,f,new _w(R.d,n,b)),R}function i6(e,n,s,f){var d,b,m,x,S,R,N,D;if(b=new Ps(e),Ss(b,(wt(),_r)),Ae(b,(Ke(),Nt),(rr(),Ti)),d=0,n){for(m=new cr,Ae(m,(Oe(),Pt),n),Ae(b,Pt,n.f),an(m,(Ye(),vt)),An(m,b),D=y(dr(n.b,Ge(Ta,wa,12,n.b.c.length,0,1)),47),R=0,N=D.length;R<N;++R)S=D[R],Bn(S,m);Ae(n,Cu,b),++d}if(s){for(x=new cr,Ae(b,(Oe(),Pt),s.f),Ae(x,Pt,s),an(x,(Ye(),lt)),An(x,b),D=y(dr(s.e,Ge(Ta,wa,12,s.e.c.length,0,1)),47),R=0,N=D.length;R<N;++R)S=D[R],nr(S,x);Ae(s,Cu,b),++d}return Ae(b,(Oe(),Xg),Mt(d)),f.c[f.c.length]=b,b}function Uje(e,n){var s,f,d,b,m,x,S;for(m=pS(e.a).mb();m.G();){if(b=y(m.H(),12),b.b.c.length>0)for(f=new cl(y(ds(e.a,b),18)),Cs(f,new n4(n)),d=new Ln(b.b,0);d.b<d.d.Y();){switch(s=(Ct(d.b<d.d.Y()),y(d.d.sb(d.c=d.b++),33)),x=-1,y(ee(s,(Ke(),Wa)),107).e){case 2:x=f.c.length-1;break;case 1:x=f.c.length/2|0;break;case 3:x=0}x!=-1&&(S=(Gn(x,f.c.length),y(f.c[x],114)),tt(S.b.b,s),y(ee(na(S.b.c.f),(Oe(),hi)),18).ib((Dr(),Wg)),y(ee(na(S.b.c.f),hi),18).ib(Yg),lo(d),Ae(s,n$,b))}nr(b,null),Bn(b,null)}}function Yje(e){var n,s,f,d,b,m,x,S,R,N,D;for(N=e.e.a.c.length,m=new W(e.e.a);m.a<m.c.c.length;)b=y(K(m),61),b.j=!1;for(e.i=Ge(gr,vr,26,N,12,1),e.g=Ge(gr,vr,26,N,12,1),e.n=new Xe,d=0,D=new Xe,S=new W(e.e.a);S.a<S.c.c.length;)x=y(K(S),61),x.b=d++,x.c.c.length==0&&tt(e.n,x),Vn(D,x.g);for(n=0,f=new W(D);f.a<f.c.c.length;)s=y(K(f),89),s.b=n++,s.e=!1;R=D.c.length,e.b==null||e.b.length<R?(e.b=Ge(Ra,Ui,26,R,12,1),e.c=Ge(i1,k0,26,R,13,1)):yy(e.c),e.d=D,e.p=new Jre(XS(e.d.c.length)),e.j=1}function Wje(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e;for(Z=e.d,ie=n.d,H=y(wu(e,(Ir(),fa)).mb().H(),7),fe=y(wu(e,Ri).mb().H(),7),z=y(wu(n,fa).mb().H(),7),_e=y(wu(n,Ri).mb().H(),7),D=y(dr(H.b,Ge(Ta,wa,12,1,0,1)),47),se=y(dr(fe.e,Ge(Ta,wa,12,1,0,1)),47),j=y(dr(z.b,Ge(Ta,wa,12,1,0,1)),47),ce=y(dr(_e.e,Ge(Ta,wa,12,1,0,1)),47),ei(e,ie),d=0,S=j.length;d<S;++d)s=j[d],Bn(s,H);for(b=0,R=ce.length;b<R;++b)s=ce[b],nr(s,fe);for(ei(n,Z),m=0,N=D.length;m<N;++m)s=D[m],Bn(s,z);for(f=0,x=se.length;f<x;++f)s=se[f],nr(s,_e)}function Kje(e){var n,s,f,d,b,m,x,S;for(b=new W(e.a.b);b.a<b.c.c.length;)d=y(K(b),25),d.vc();for(S=new Rt(Wi,Wi),n=new Rt(ii,ii),f=new W(e.a.b);f.a<f.c.c.length;)s=y(K(f),25),S.a=wn(S.a,s.j.d),S.b=wn(S.b,s.j.e),n.a=rt(n.a,s.j.d+s.j.c),n.b=rt(n.b,s.j.e+s.j.b);for(x=YB(e.c).mb();x.G();)m=y(x.H(),27),s=y(m.b,25),S.a=wn(S.a,s.j.d),S.b=wn(S.b,s.j.e),n.a=rt(n.a,s.j.d+s.j.c),n.b=rt(n.b,s.j.e+s.j.b);e.d=Xk(new Rt(S.a,S.b)),e.e=kc(new Rt(n.a,n.b),S),e.a.a.c=Ge(yt,st,1,0,4,1),e.a.b.c=Ge(yt,st,1,0,4,1)}function Dle(e){var n,s,f,d,b,m,x;if(x=y(ht(e.f,0),7),x.e.c.length!=0&&x.b.c.length!=0)throw new rl("Interactive layout does not support NORTH/SOUTH ports with incoming _and_ outgoing edges.");if(x.e.c.length!=0){for(b=Wi,s=new W(x.e);s.a<s.c.c.length;)n=y(K(s),12),m=n.d.f,f=y(ee(m,(Ke(),N0)),65),b=wn(b,m.i.a-f.b);return new qm(Dt(b))}if(x.b.c.length!=0){for(d=ii,s=new W(x.b);s.a<s.c.c.length;)n=y(K(s),12),m=n.c.f,f=y(ee(m,(Ke(),N0)),65),d=rt(d,m.i.a+m.j.a+f.c);return new qm(Dt(d))}return py(),py(),fR}function Xje(e,n,s,f,d,b){var m,x,S,R,N,D,j;return R=f==(Ir(),fa)?b.c:b.d,S=oT(n),R.f==s?(m=y(bn(e.b,R),9),m||(m=R_(R,y(ee(s,(Ke(),Nt)),28),d,f==fa?-1:1,R.j,S,n),Ae(m,(Oe(),Pt),R),Cn(e.b,R,m))):(N=y(ee(b,(Ke(),zo)),15).a,m=R_((D=new I,j=y(ee(n,(Oe(),la)),15).a*y(ee(n,(sn(),tc)),15).a/2,Ae(D,Jg,new gn(j)),D),y(ee(s,Nt),28),d,f==fa?-1:1,new Rt(N,N),S,n),x=gMe(e,m,s,f),Ae(m,Pt,x),Cn(e.b,x,m)),y(ee(n,(Oe(),hi)),18).ib((Dr(),Xo)),hu(y(ee(n,(Ke(),Nt)),28))?Ae(n,Nt,(rr(),B0)):Ae(n,Nt,(rr(),yo)),m}function Jje(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je;f=y(ee(n,(sn(),o$)),15).a,Re=y(ee(n,tb),24).a,j=4,d=3,We=20/Re,H=!1,S=0,m=Fr;do{for(b=S!=1,D=S!=0,Je=0,ie=e.a,ce=0,_e=ie.length;ce<_e;++ce)z=ie[ce],z.g=null,j4e(e,z,b,D,f),Je+=ki(z.a);do x=fje(e,n);while(x);for(Z=e.a,se=0,fe=Z.length;se<fe;++se)if(z=Z[se],s=$B(z).a,s!=0)for(N=new W(z.f);N.a<N.c.c.length;)R=y(K(N),9),R.i.b+=s;S==0||S==1?(--j,j<=0&&(Je<m||-j>Re)?(S=2,m=Fr):S==0?(S=1,m=Je):(S=0,m=Je)):(H=Je>=m||m-Je<We,m=Je,H&&--d)}while(!(H&&d<=0))}function a6(e,n,s){var f,d,b,m,x,S,R,N,D,j,H;for(D=y(dr(e.f,Ge(Ede,Ofe,7,e.f.c.length,0,1)),346),R=0,N=D.length;R<N;++R){if(S=D[R],s!=(Ir(),fa))for(x=y(dr(S.e,Ge(Ta,wa,12,S.e.c.length,0,1)),47),d=0,b=x.length;d<b;++d)f=x[d],H=y(ee(f.d.f,(sn(),Gr)),85),!Kt(ze(Zt(ee(f,(Oe(),ec)))))&&!(n==(ma(),Zg)&&H==zc)&&Oc(f,!0);if(s!=Ri)for(m=y(dr(S.b,Ge(Ta,wa,12,S.b.c.length,0,1)),47),d=0,b=m.length;d<b;++d)f=m[d],j=y(ee(f.c.f,(sn(),Gr)),85),!Kt(ze(Zt(ee(f,(Oe(),ec)))))&&!(n==(ma(),e1)&&j==Bl)&&Oc(f,!0)}}function Qje(e,n,s,f){var d,b,m,x,S;if(m=e.g,m==(Ye(),Ar)&&n!=(rr(),yo)&&n!=(rr(),Il)&&(m=wle(e,s),an(e,m),ee(e,(Ke(),Vf))==null&&m!=Ar&&(e.i.a!=0||e.i.b!=0)&&Ae(e,Vf,new gn(NDe(e,m)))),n==(rr(),Vo)){switch(S=0,m.e){case 1:case 3:b=e.f.j.a,b>0&&(S=e.i.a/b);break;case 2:case 4:d=e.f.j.b,d>0&&(S=e.i.b/d)}Ae(e,(Oe(),Hc),S)}if(x=e.j,f)e.a.a=f.a,e.a.b=f.b;else if(n!=yo&&n!=Il&&m!=Ar)switch(m.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 Zje(e){var n,s,f,d;if(Qe(e.a,10))return Ts(y(e.a,10));if(Qe(e.a,66))return fNe(y(e.a,86));if(Qe(e.a,50))return y(e.a,50).Wc();if(Qe(e.a,191)){for(n=new A4,d=(f=new Dy(new Ny(new $m(y(e.a,191).a).a).b),new Gm(f));Ak(d.a.a);)zB(n,(s=eS(d.a),s.yb()));return n}else{if(Qe(e.a,13))return new cl(y(e.a,13));if(Qe(e.a,44)){for(n=new ea,d=xn(y(e.a,44),0);d.b!=d.d.c;)kn(n,y(vn(d),10));return n}else if(Qe(e.a,58)){for(n=new pi,d=xn(y(e.a,58),0);d.b!=d.d.c;)kn(n,vn(d));return n}else return e.a}}function Mv(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z;x=0,z=0,S=G5(e.f,e.f.length),b=e.d,m=e.i,f=e.a,d=e.b;do{for(H=0,N=new W(e.p);N.a<N.c.c.length;)R=y(K(N),9),j=$le(e,R),s=!0,(e.q==(Of(),U0)||e.q==Y0)&&(s=Kt(ze(Zt(j.b)))),y(j.a,24).a<0&&s?(++H,S=G5(e.f,e.f.length),e.d=e.d+y(j.a,24).a,z+=b-e.d,b=e.d+y(j.a,24).a,m=e.i,f=kf(e.a),d=kf(e.b)):(e.f=G5(S,S.length),e.d=b,e.a=(Dt(f),f?new cl((No(),f)):Ew(new W(null))),e.b=(Dt(d),d?new cl((No(),d)):Ew(new W(null))),e.i=m);++x,D=H!=0&&Kt(ze(Zt(n.B(new jr(Mt(z),Mt(x))))))}while(D)}function e4e(e,n,s,f){var d,b,m,x,S,R,N;if(!vf(new W(r0(e))))return f;for(N=Foe(y(Er(e,(Ke(),Da)),86)),S=new W(r0(e));S.a<S.c.c.length;)x=y(K(S),129),R=Foe(y(Er(x,Da),86)),R==(HT(),jR)&&(R=N),nCe(x,R.e),d=jOe(s,R),d.c=rt(d.c,x.e.j.a),d.b+=x.e.j.b+n;for(m=new Pw(new Hm(s).a);dw(m.a);)switch(b=(m.b=Tf(m.a),new sw(m.c,m.b)),d=y(b.b.b[b.a.e],62),d.b-=n,y(b.a,67).e){case 12:case 13:case 14:f.d=rt(f.d,d.b+n);break;case 15:f.b=rt(f.b,d.c+n);break;case 17:f.c=rt(f.c,d.c+n);break;case 18:case 19:case 20:f.a=rt(f.a,d.b+n)}return f}function s6(e,n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z;for(Ese(this),s==(Ef(),Qu)?Dn(this.g,e):Dn(this.o,e),H=$o,j=5e-324,R=(m=new pn(n.a).a.bb().mb(),new mn(m));R.a.G();)x=(d=y(R.a.H(),21),y(d.yb(),27)),N=y(x.a,223),f=y(x.b,12),D=f.c,D==e&&(D=f.d),N==Qu?Dn(this.g,D):Dn(this.o,D),Z=Pn(xe(Ee(un,1),on,10,0,[D.f.i,D.i,D.a])).b,H=H<Z?H:Z,j=j>Z?j:Z;for(z=Pn(xe(Ee(un,1),on,10,0,[e.f.i,e.i,e.a])).b,Tue(this,z,H,j),S=(b=new pn(n.a).a.bb().mb(),new mn(b));S.a.G();)x=(d=y(S.a.H(),21),y(d.yb(),27)),Dn(this.c,y(x.b,12));this.f=!1}function t4e(e,n,s,f){var d,b,m,x,S,R;if(x=(Ke(),O0).b,!(x in n.a&&Jn(n,x).ic().a)){if(R=Jn(n,KT),R){if(!R.lc())throw new vu("A label's 'text' property must be a string.",R,n)}else throw new vu("Labels must have a property 'text'.",null,n);if(S=R.lc().a,b=new nB(S),Ae(b,(Oe(),Pt),n),Cn(e.f,b,n),IT(n,b),p_(n,b),Qe(s,9)?tt(y(s,9).c,b):Qe(s,12)?tt(y(s,12).b,b):Qe(s,7)&&tt(y(s,7).c,b),Qe(s,12))switch(m=y(ee(b,Wa),107),IT(n,b),Ae(b,Wa,m),d=y(ee(f,hi),18),m.e){case 2:case 3:d.ib((Dr(),Wg));case 1:case 0:d.ib((Dr(),Yg)),Ae(b,Wa,(mu(),C0))}}}function o6(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se;for(b=0,m=0,R=new W(e.a);R.a<R.c.c.length;)x=y(K(R),9),b=rt(b,x.e.b),m=rt(m,x.e.c);for(S=new W(e.a);S.a<S.c.c.length;){switch(x=y(K(S),9),s=y(ee(x,(Ke(),Xs)),103),s.e){case 1:z=0;break;case 2:z=1;break;case 5:z=.5;break;default:for(f=0,D=0,H=new W(x.f);H.a<H.c.c.length;)j=y(K(H),7),j.b.c.length==0||++f,j.e.c.length==0||++D;f+D==0?z=.5:z=D/(f+D)}ie=e.c,N=x.j.a,se=(ie.a-N)*z,z>.5?se-=m*2*(z-.5):z<.5&&(se+=b*2*(.5-z)),d=x.e.b,se<d&&(se=d),Z=x.e.c,se>ie.a-Z-N&&(se=ie.a-Z-N),x.i.a=n+se}}function n4e(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at,gt,mt,Tt;return s=e.l&8191,f=e.l>>13|(e.m&15)<<9,d=e.m>>4&8191,b=e.m>>17|(e.h&255)<<5,m=(e.h&1048320)>>8,x=n.l&8191,S=n.l>>13|(n.m&15)<<9,R=n.m>>4&8191,N=n.m>>17|(n.h&255)<<5,D=(n.h&1048320)>>8,Ve=s*x,at=f*x,gt=d*x,mt=b*x,Tt=m*x,S!=0&&(at+=s*S,gt+=f*S,mt+=d*S,Tt+=b*S),R!=0&&(gt+=s*R,mt+=f*R,Tt+=d*R),N!=0&&(mt+=s*N,Tt+=f*N),D!=0&&(Tt+=s*D),H=Ve&Ls,z=(at&511)<<13,j=H+z,ie=Ve>>22,se=at>>9,ce=(gt&262143)<<4,fe=(mt&31)<<17,Z=ie+se+ce+fe,Re=gt>>18,We=mt>>5,Je=(Tt&4095)<<8,_e=Re+We+Je,Z+=j>>22,j&=Ls,_e+=Z>>22,Z&=Ls,_e&=El,ll(j,Z,_e)}function r4e(e,n,s,f){var d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We;if(ie=e.d.c.c.c.length,s>=ie-1)return null;for(d=new Xe,d.c[d.c.length]=n,_e=n,m=s,z=-1,x=y(ht(e.d.c.c,s),16),H=0;H<x.a.c.length;++H)if(se=y(ht(x.a,H),9),se==n){z=H;break}if(Z=f6(e,1,z,s,ie,e.a),!Z)return null;for(Re=e.a,j=0,b=0;_e&&Re>1&&m<ie-1;)N=Ele(e,_e),D=y(ht(e.d.c.c,m+1),16),We=y(Z.sb(j++),24).a,ce=il(We,D.a.c.length),Lv(N,ce,D),_e&&(d.c[d.c.length]=_e),_e=N,--Re,++b,++m;for(fe=(f-(d.c.length-1)*e.d.d)/d.c.length,R=new W(d);R.a<R.c.c.length;)S=y(K(R),9),S.j.a=fe;return new jr(Mt(b),fe)}function i4e(e,n,s,f){var d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We;if(s<=0)return null;for(d=new Xe,d.c[d.c.length]=n,_e=n,m=s,z=-1,x=y(ht(e.d.c.c,s),16),H=0;H<x.a.c.length;++H)if(ie=y(ht(x.a,H),9),ie==n){z=H;break}if(Z=f6(e,0,z,s,e.d.c.c.c.length,e.a),!Z)return null;for(Re=e.a,j=0,b=0,fe=z;_e&&Re>1&&m>1;)N=Ele(e,_e),x=y(ht(e.d.c.c,m),16),D=y(ht(e.d.c.c,m-1),16),We=y(Z.sb(j++),24).a,se=il(We,D.a.c.length),Lv(_e,se,D),Lv(N,fe,x),fe=se,_e&&(d.c[d.c.length]=_e),_e=N,--Re,++b,--m;for(ce=(f-(d.c.length-1)*e.d.d)/d.c.length,R=new W(d);R.a<R.c.c.length;)S=y(K(R),9),S.j.a=ce;return new jr(Mt(b),ce)}function a4e(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z;if(e.b=e.c,z=Zt(ee(n,(Ke(),bF))),H=z==null||Kt((Rr(z),z)),b=y(ee(n,(Oe(),hi)),18).kb((Dr(),Xo)),d=y(ee(n,Nt),28),s=!(d==(rr(),Uv)||d==Vo||d==Ti),H&&(s||!b)){for(D=new W(n.b);D.a<D.c.c.length;)R=y(K(D),9),R.k=0;for(j=new Xe,N=new W(n.b);N.a<N.c.c.length;)if(R=y(K(N),9),f=Tle(e,R,null),f){for(S=new A5,Ac(S,n),Ae(S,pd,y(f.b,18)),Hie(S.a,n.a),x=y(f.a,20).mb();x.G();)m=y(x.H(),9),tt(S.b,m),m.a=S;j.ib(S)}b&&(e.b=e.a)}else j=new zs(xe(Ee(MBe,1),{38:1,39:1,42:1,3:1,8:1,5:1,6:1},55,0,[n]));return j}function s4e(e){var n,s,f,d,b,m,x,S,R;for(s=new W(e.a.a.b);s.a<s.c.c.length;)for(n=y(K(s),25),m=n.i.mb();m.G();)b=y(m.H(),25),n.f!=b.f&&(Ph(e.a.d)?S=e.a.g.tc(n,b):S=e.a.g.uc(n,b),f=n.g.a+n.j.c+S-b.g.a,f=Math.ceil(f),f=0>f?0:f,n.o&&b.o&&Qe(n,82)&&Qe(b,82)&&!VS(L5(y(n,82).d,y(b,82).d))?(d=Py(new Qp,e.d),x=yr(iw(b.g.a-n.g.a)),Ov(sv(uv(cv(ov(new Ih,0>x?0:x),1),d),e.c[n.f.d])),Ov(sv(uv(cv(ov(new Ih,0>-x?0:-x),1),d),e.c[b.f.d]))):(R=1,(Qe(n,82)&&Qe(b,93)||Qe(b,82)&&Qe(n,93))&&(R=2),Ov(sv(uv(cv(ov(new Ih,yr(f)),R),e.c[n.f.d]),e.c[b.f.d]))))}function Mle(){Mle=a,PF=new ci,AF=Dv(xe(Ee(rd,1),st,79,0,[(Ke(),cF),The])),CF=Dv(xe(Ee(rd,1),st,79,0,[vF,jc,(sn(),f$),Rhe,(Oe(),js),tb,l$])),SF=Dv(xe(Ee(rd,1),st,79,0,[Ehe,$g,O0,She,Ihe,dF,Che,IR,bF,L0,jI,s$,GI,u$,t1,c$,h$,YI,qI])),IF=Dv(xe(Ee(rd,1),st,79,0,[Hg,Gg,zv,zo,Vf,NI,Jo,ep,la,eb,tc,o$])),RF=Dv(xe(Ee(rd,1),st,79,0,[M0,Xs,bo,ad,Wa,fF,hF,ER,kR,SR,TR,RR,Nt,D0,BI,$I,VI,rp,yx,UI,wx,mx,HI,Gr,_x,WI,KI,nb,zI])),TF=Dv(xe(Ee(rd,1),st,79,0,[Da,Rl,j0,FI])),K_=Dv(xe(Ee(rd,1),st,79,0,[A0,xR,pr,N0,Mc,Vv])),ude=Dv(xe(Ee(rd,1),st,79,0,[(z5(),EF)]))}function jle(e){var n,s,f,d,b,m,x;for(n=0,b=new W(e.b.a);b.a<b.c.c.length;)f=y(K(b),78),f.b=0,f.c=0;for(Dce(e,0),fT(e,e.g),S_(e.c),x4(e.c),s=(ur(),ps),Hu(my(xu(Hu(my(xu(Hu(xu(e.c,s)),Koe(s)))),s))),xu(e.c,ps),sT(e,e.g),Nce(e,0),Ple(e,0),rle(e,1),Dce(e,1),fT(e,e.d),S_(e.c),m=new W(e.b.a);m.a<m.c.c.length;)f=y(K(m),78),n+=ki(f.c);for(x=new W(e.b.a);x.a<x.c.c.length;)f=y(K(x),78),f.b=0,f.c=0;for(s=Xu,Hu(my(xu(Hu(my(xu(Hu(x4(xu(e.c,s))),Koe(s)))),s))),xu(e.c,ps),sT(e,e.d),Nce(e,1),Ple(e,1),rle(e,0),x4(e.c),d=new W(e.b.a);d.a<d.c.c.length;)f=y(K(d),78),n+=ki(f.c);return n}function o4e(e){var n,s,f,d,b,m,x;for(n=new Xe,e.g=new Xe,e.d=new Xe,m=new Wh(new xc(e.f.b).a);m.b;)b=xg(m),tt(n,y(y(b.zb(),27).b,25)),Ph(y(b.yb(),251).yc())?tt(e.d,y(b.zb(),27)):tt(e.g,y(b.zb(),27));for(fT(e,e.d),fT(e,e.g),e.c=new Lq(e.b),nne(e.c,(_4(),hde)),sT(e,e.d),sT(e,e.g),Vn(n,e.c.a.b),e.e=new Rt(Wi,Wi),e.a=new Rt(ii,ii),f=new W(n);f.a<f.c.c.length;)s=y(K(f),25),e.e.a=wn(e.e.a,s.j.d),e.e.b=wn(e.e.b,s.j.e),e.a.a=rt(e.a.a,s.j.d+s.j.c),e.a.b=rt(e.a.b,s.j.e+s.j.b);hk(e.c,new V),x=0;do d=jle(e),++x;while((x<2||d>w0)&&x<10);hk(e.c,new U),jle(e),QAe(e.c),Kje(e.f)}function u4e(e){yg();var n,s,f,d,b,m,x;for(x=new wte,s=new W(e);s.a<s.c.c.length;)n=y(K(s),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 f=new l_((Ky(),Pl)),Hy(e,wde,new zs(xe(Ee(z0,1),st,160,0,[f]))),m=new l_(Xf),Hy(e,mde,new zs(xe(Ee(z0,1),st,160,0,[m]))),d=new l_(Kf),Hy(e,yde,new zs(xe(Ee(z0,1),st,160,0,[d]))),b=new l_(cd),Hy(e,bde,new zs(xe(Ee(z0,1),st,160,0,[b]))),DT(f.c,Pl),DT(d.c,Kf),DT(b.c,cd),DT(m.c,Xf),x.a.c=Ge(yt,st,1,0,4,1),Vn(x.a,f.c),Vn(x.a,WS(d.c)),Vn(x.a,b.c),Vn(x.a,WS(m.c)),x}function c4e(e){var n,s,f,d,b,m,x,S,R,N;for(d=y(yne(e,(Ke(),zv)),15).a,x=new W(oce(e));x.a<x.c.c.length;){for(m=y(K(x),626),s=new Nle(m),s.d=d,s.k=y(Er(m,pF),15).a,f=y(Er(m,D0),149),n=Kt(ze(Zt(ee(y(m.e,9),(Oe(),K7))))),N=new W(wl(m));N.a<N.c.c.length;)R=y(K(N),161),f==(Rv(),AR)?l4e(R,n,d):f==q0&&F4e(R,d),cje(R);X4e(s,y(Er(m,Rl),86).kb((Pc(),$0))),gje(s),e4e(s.e,s.d,s.c,s.p),L4e(s),rMe(s),GPe(s),S=new die((b=y(m.e,9).b,new cie(b.d,b.b,b.a,b.c))),S.b=s.p.b+s.q.b,S.c=s.p.c+s.q.c,S.d=s.p.d+s.q.d,S.a=s.p.a+s.q.a,y(m.e,9).b.b=S.b,y(m.e,9).b.d=S.d,y(m.e,9).b.c=S.c,y(m.e,9).b.a=S.a}}function Ble(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe;for(S=y(wr(e,(Ye(),vt)).mb().H(),7).b,H=y(wr(e,lt).mb().H(),7).e,x=S.c.length,fe=ia(y(ht(e.f,0),7));x-- >0;){for(Z=(Gn(0,S.c.length),y(S.c[0],12)),d=(Gn(0,H.c.length),y(H.c[0],12)),ce=d.d.b,b=aa(ce,d,0),wLe(Z,d.d,b),nr(d,null),Bn(d,null),z=Z.a,n&&kn(z,new hr(fe)),f=xn(d.a,0);f.b!=f.d.c;)s=y(vn(f),10),kn(z,new hr(s));for(se=Z.b,j=new W(d.b);j.a<j.c.c.length;)D=y(K(j),33),se.c[se.c.length]=D;if(ie=y(ee(Z,(Ke(),pr)),44),m=y(ee(d,pr),44),m)for(ie||(ie=new ea,Ae(Z,pr,ie)),N=xn(m,0);N.b!=N.d.c;)R=y(vn(N),10),kn(ie,new hr(R))}}function l4e(e,n,s){var f,d,b,m,x;if(b=Dae(i0(e)),!b.Nb().V()){switch(x=0,y(e.e,7).g.e){case 4:case 2:x=n&&Kt(ze(Zt(ee(y(e.e,7),(Oe(),tpe)))))?e.e.j.b:(e.e.j.b-y(b.Nb().sb(0),129).pc().b)/2-s;break;case 1:x=e.e.j.b;break;case 3:x=0}for(y(e.e,7).g==(Ye(),At)&&bg(b),d=new W(i0(e));d.a<d.c.c.length;){switch(f=y(K(d),129),m=new hr(e.e.i),y(e.e,7).g.e){case 4:m.a=e.e.j.a+s,m.b=x+s,x+=s+f.e.j.b;break;case 2:m.a=-f.e.j.a-s,m.b=x+s,x+=s+f.e.j.b;break;case 1:m.a=(e.e.j.a-f.e.j.a)/2,m.b=x+s,x+=s+f.e.j.b;break;case 3:m.a=(e.e.j.a-f.e.j.a)/2,m.b=x-s-f.e.j.b,x-=s+f.e.j.b}f.e.i.a=m.a,f.e.i.b=m.b}}}function f4e(e,n){var s,f,d,b,m,x,S,R,N,D;for(e.a=new HB(WNe(I0)),f=new W(n.a);f.a<f.c.c.length;){for(s=y(K(f),347),x=new c_(xe(Ee(X_,1),st,25,0,[])),tt(e.a.a,x),R=new W(s.d);R.a<R.c.c.length;)S=y(K(R),62),N=new sB(e,S),u6(N,y(ee(s.c,(Oe(),pd)),18)),kv(e.g,s)||(Cn(e.g,s,new Rt(S.d,S.e)),Cn(e.f,s,N)),tt(e.a.b,N),t_(x,N);for(m=new W(s.b);m.a<m.c.c.length;)b=y(K(m),251),N=new sB(e,b.Bc()),Cn(e.b,b,new jr(x,N)),u6(N,y(ee(s.c,(Oe(),pd)),18)),b.zc()&&(D=new N5(e,b.zc(),1),u6(D,y(ee(s.c,pd),18)),d=new c_(xe(Ee(X_,1),st,25,0,[])),t_(d,D),Bt(e.c,b.yc(),new jr(x,D)))}return e.a}function h4e(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe;if(Z=n.c.c.length,!(Z<3)){for(H=Ge(gr,vr,26,Z,12,1),D=0,N=new W(n.c);N.a<N.c.c.length;)R=y(K(N),16),H[D++]=R.a.c.length;for(j=new Ln(n.c,2),f=1;f<Z-1;f++)for(s=(Ct(j.b<j.d.Y()),y(j.d.sb(j.c=j.b++),16)),z=new W(s.a),b=0,x=0,S=0;S<H[f+1];S++)if(fe=y(K(z),9),S==H[f+1]-1||Vq(e,fe,f+1,f)){for(m=H[f]-1,Vq(e,fe,f+1,f)&&(m=e.d.e[y(y(y(ht(e.d.b,fe.k),20).sb(0),27).a,9).k]);x<=S;){if(ce=y(ht(s.a,x),9),!Vq(e,ce,f+1,f))for(se=y(ht(e.d.b,ce.k),20).mb();se.G();)ie=y(se.H(),27),d=e.d.e[y(ie.a,9).k],(d<b||d>m)&&Dn(e.c,y(ie.b,12));++x}b=m}}}function qle(e,n,s){var f,d,b,m,x,S;for(this.g=e,x=n.d.length,S=s.d.length,this.d=Ge($r,oa,9,x+S,0,1),m=0;m<x;m++)this.d[m]=n.d[m];for(b=0;b<S;b++)this.d[x+b]=s.d[b];if(n.e){if(this.e=za(n.e),this.e.nb(s),s.e)for(d=s.e.mb();d.G();)f=y(d.H(),102),f!=n&&(this.e.kb(f)?--f.c:this.e.ib(f))}else s.e&&(this.e=za(s.e),this.e.nb(n));this.f=n.f+s.f,this.a=n.a+s.a,this.a>0?zS(this,this.f/this.a):ss(n.g,n.d[0]).a!=null&&ss(s.g,s.d[0]).a!=null?zS(this,(ze(ss(n.g,n.d[0]).a)+ze(ss(s.g,s.d[0]).a))/2):ss(n.g,n.d[0]).a!=null?zS(this,ss(n.g,n.d[0]).a):ss(s.g,s.d[0]).a!=null&&zS(this,ss(s.g,s.d[0]).a)}function d4e(e,n){var s,f,d,b,m,x,S,R,N,D,j;switch(e.g.e){case 1:if(f=y(ee(e,(Oe(),Pt)),12),s=y(ee(f,e$),44),s?Kt(ze(Zt(ee(f,ec))))&&(s=ZS(s)):s=new ea,R=y(ee(e,ca),7),N=Pn(xe(Ee(un,1),on,10,0,[R.f.i,R.i,R.a])),n<=N.a)return N.b;if(Br(s,N,s.a,s.a.a),D=y(ee(e,Xi),7),j=Pn(xe(Ee(un,1),on,10,0,[D.f.i,D.i,D.a])),j.a<=n)return j.b;for(Br(s,j,s.c.b,s.c),S=xn(s,0),m=y(vn(S),10),x=y(vn(S),10);x.a<n&&S.b!=S.d.c;)m=x,x=y(vn(S),10);return m.b+(n-m.a)/(x.a-m.a)*(x.b-m.b);case 3:switch(b=y(ee(y(ht(e.f,0),7),(Oe(),Pt)),7),d=b.f,b.g.e){case 1:return d.i.b;case 3:return d.i.b+d.j.b}}return bq(e).b}function Fle(e){var n,s,f,d,b,m,x,S,R,N,D,j;if(N=ft(ee(e.c.f,(Oe(),eh)))===ft(ee(e.d.f,eh)),m=new li,s=y(ee(e,(Ke(),xR)),44),s&&s.b>=2)for(Fu(e.a),f=0,j=xn(s,0);j.b!=j.d.c;)D=y(vn(j),10),f==0?(n=kc(kc(new Rt(D.a,D.b),e.c.i),e.c.f.i),e.c.a.a=n.a,e.c.a.b=n.b):f==s.b-1?(n=kc(kc(new Rt(D.a,D.b),e.d.i),e.d.f.i),e.d.a.a=n.a,e.d.a.b=n.b):kn(e.a,D),++f;if(N)for(S=xn(e.a,0);S.b!=S.d.c;)x=y(vn(S),10),m.a=rt(m.a,x.a),m.b=rt(m.b,x.b);for(b=new W(e.b);b.a<b.c.c.length;)d=y(K(b),33),R=y(ee(d,Vv),10),R&&(d.i.a=R.a,d.i.b=R.b),N&&(m.a=rt(m.a,d.i.a+d.j.a),m.b=rt(m.b,d.i.b+d.j.b));return m}function v4e(e,n,s){var f,d,b,m,x,S,R;if(Rq(n),f=y(ee(s,(Oe(),hi)),18),m=new Ps(s),Ae(m,Pt,n),tt(s.b,m),b=y(Jn(n,"id"),97),Fw(e.i,b.a,m),Cn(e.j,m,n),IT(n,m),p_(n,m),"ports"in n.a){if(R=Jn(n,"ports"),!R.hc())throw new vu("The 'ports' property of the node must be an array.",R,n);for(S=R.hc(),d=0;d<S.a.length;++d)Qe(dl(S,d),69)&&Bje(e,y(dl(S,d),69),m,s)}return Pq(e,n,m,s),jg in n.a&&Jn(n,jg).hc().a.length>0&&Ae(m,K7,(jn(),jn(),Ii)),x=y(ee(m,(Ke(),Nt)),28),x==(rr(),Il)||x!=yo&&f.ib((Dr(),hd)),Kt(ze(Zt(ee(m,$g))))&&f.ib((Dr(),kI)),Kt(ze(Zt(ee(m,L0))))&&(f.ib((Dr(),SI)),f.ib(hx),Ae(m,Nt,yo)),m}function u6(e,n){n.V()&&us(e.n,!0,!0,!0,!0),n.t((Ye(),Wv))&&us(e.n,!0,!0,!0,!1),n.t(Yv)&&us(e.n,!1,!0,!0,!0),n.t(Kv)&&us(e.n,!0,!0,!1,!0),n.t(Xv)&&us(e.n,!0,!1,!0,!0),n.t(Yf)&&us(e.n,!1,!0,!0,!1),n.t(Uf)&&us(e.n,!1,!0,!1,!0),n.t(Wf)&&us(e.n,!0,!1,!1,!0),n.t(od)&&us(e.n,!0,!1,!0,!1),n.t(Uo)&&us(e.n,!0,!0,!0,!0),n.t(Bc)&&us(e.n,!0,!0,!0,!0),n.t(Uo)&&us(e.n,!0,!0,!0,!0),n.t(Qa)&&us(e.n,!0,!0,!0,!0),n.t(ys)&&us(e.n,!0,!0,!0,!0),n.t(bs)&&us(e.n,!0,!0,!0,!0),n.t(fi)&&us(e.n,!0,!0,!0,!0)}function $le(e,n){var s,f,d,b,m,x,S,R,N,D;for(S=!0,d=0,R=e.f[n.k],N=n.j.b+e.n,s=e.c[n.k][2],Sf(e.a,R,Mt(y(ht(e.a,R),24).a-1+s)),Sf(e.b,R,ze(nn(ht(e.b,R)))-N+s*e.e),++R,R>=e.i?(++e.i,tt(e.a,Mt(1)),tt(e.b,N)):(f=e.c[n.k][1],Sf(e.a,R,Mt(y(ht(e.a,R),24).a+1-f)),Sf(e.b,R,ze(nn(ht(e.b,R)))+N-f*e.e)),(e.q==(Of(),U0)&&(y(ht(e.a,R),24).a>e.j||y(ht(e.a,R-1),24).a>e.j)||e.q==Y0&&(ze(nn(ht(e.b,R)))>e.k||ze(nn(ht(e.b,R-1)))>e.k))&&(S=!1),m=Xt(Wr(n));Vt(m);)b=y(Gt(m),12),x=b.c.f,e.f[x.k]==R&&(D=$le(e,x),d=d+y(D.a,24).a,S=S&&Kt(ze(Zt(D.b))));return e.f[n.k]=R,d=d+e.c[n.k][0],new jr(Mt(d),(jn(),S?Ii:er))}function c6(e,n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se;if(j=new hr(e.j),se=n.a/j.a,x=n.b/j.b,Z=n.a-j.a,b=n.b-j.b,s)for(d=ft(ee(e,(Ke(),Nt)))===ft((rr(),Ti)),z=new W(e.f);z.a<z.c.c.length;)switch(H=y(K(z),7),H.g.e){case 1:d||(H.i.a*=se);break;case 2:H.i.a+=Z,d||(H.i.b*=x);break;case 3:d||(H.i.a*=se),H.i.b+=b;break;case 4:d||(H.i.b*=x)}for(R=new W(e.c);R.a<R.c.c.length;)S=y(K(R),33),N=S.i.a+S.j.a/2,D=S.i.b+S.j.b/2,ie=N/j.a,m=D/j.b,ie+m>=1&&(ie-m>0&&D>=0?(S.i.a+=Z,S.i.b+=b*m):ie-m<0&&N>=0&&(S.i.a+=Z*ie,S.i.b+=b));e.j.a=n.a,e.j.b=n.b,Ae(e,(Ke(),Rl),(Pc(),f=y(ga(zg),11),new Si(f,y(ta(f,f.length),11),0)))}function Gle(e){var n,s,f,d,b,m,x,S,R,N;for(f=new Xe,m=new W(e.e.a);m.a<m.c.c.length;){for(d=y(K(m),61),N=0,d.k.c=Ge(yt,st,1,0,4,1),s=new W(Kh(d));s.a<s.c.c.length;)n=y(K(s),89),n.e&&(tt(d.k,n),++N);N==1&&(f.c[f.c.length]=d)}for(b=new W(f);b.a<b.c.c.length;)for(d=y(K(b),61);d.k.c.length==1;){for(R=y(K(new W(d.k)),89),e.b[R.b]=R.f,x=R.c,S=R.d,s=new W(Kh(d));s.a<s.c.c.length;)n=y(K(s),89),n==R||(n.e?x==n.c||S==n.d?e.b[R.b]-=e.b[n.b]-n.f:e.b[R.b]+=e.b[n.b]-n.f:d==x?n.c==d?e.b[R.b]+=n.f:e.b[R.b]-=n.f:n.c==d?e.b[R.b]-=n.f:e.b[R.b]+=n.f);Vr(x.k,R),Vr(S.k,R),x==d?d=R.d:d=R.c}}function p4e(e){var n,s,f,d,b,m,x,S,R,N;for(R=new pi,x=new pi,b=new W(e);b.a<b.c.c.length;)f=y(K(b),77),f.e=f.d.c.length,f.k=f.j.c.length,f.e==0&&Br(R,f,R.c.b,R.c),f.k==0&&f.g.a.Y()==0&&Br(x,f,x.c.b,x.c);for(m=-1;R.b!=0;)for(f=y(hq(R,0),77),s=new W(f.j);s.a<s.c.c.length;)n=y(K(s),117),N=n.b,N.n=Ei(N.n,f.n+1),m=Ei(m,N.n),--N.e,N.e==0&&Br(R,N,R.c.b,R.c);if(m>-1){for(d=xn(x,0);d.b!=d.d.c;)f=y(vn(d),77),f.n=m;for(;x.b!=0;)for(f=y(hq(x,0),77),s=new W(f.d);s.a<s.c.c.length;)n=y(K(s),117),S=n.a,S.g.a.Y()==0&&(S.n=il(S.n,f.n-1),--S.k,S.k==0&&Br(x,S,x.c.b,x.c))}}function g4e(e,n,s,f){var d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re;for(S=new Xe,b=new W(n.b);b.a<b.c.c.length;)for(d=y(K(b),9),x=new W(d.f);x.a<x.c.c.length;){for(m=y(K(x),7),N=null,fe=y(dr(m.e,Ge(Ta,wa,12,0,0,1)),47),_e=0,Re=fe.length;_e<Re;++_e)ce=fe[_e],Cv(ce.d.f,s)||(se=$T(e,n,s,ce,ce.c,(Ir(),Ri),N),se!=N&&(S.c[S.c.length]=se),se.c&&(N=se));for(R=null,z=y(dr(m.b,Ge(Ta,wa,12,0,0,1)),47),Z=0,ie=z.length;Z<ie;++Z)H=z[Z],Cv(H.c.f,s)||(se=$T(e,n,s,H,H.d,(Ir(),fa),R),se!=R&&(S.c[S.c.length]=se),se.c&&(R=se))}for(j=new W(S);j.a<j.c.c.length;)D=y(K(j),187),aa(n.b,D.a,0)!=-1||tt(n.b,D.a),D.c&&(f.c[f.c.length]=D)}function b4e(e){var n,s,f,d,b,m,x,S,R;for(f=e.e.e.j,n=y(Er(e.e,(Ke(),Rl)),86).kb((Pc(),$0)),mBe(e),b=new W(wl(e.e));b.a<b.c.c.length;){switch(d=y(K(b),161),x=y(Er(d,Vf),15),!x&&(x=new gn(0)),S=d.e.j,m=(s=y(d.e,7).d,new Mo(s.d,s.b,s.a,s.c)),R=new hr(d.e.i),y(d.e,7).g.e){case 4:R.a=-S.a-x.a,R.b=e.s-S.b-(n?m.a:0),e.s-=vk(e,(Ye(),vt))+S.b+(n?m.d+m.a:0);break;case 2:R.a=f.a+x.a,R.b=e.a+(n?m.d:0),e.a+=vk(e,(Ye(),lt))+S.b+(n?m.d+m.a:0);break;case 1:R.a=e.f+(n?m.b:0),R.b=-d.e.j.b-x.a,e.f+=vk(e,(Ye(),Et))+S.a+(n?m.b+m.c:0);break;case 3:R.a=e.r-S.a-(n?m.c:0),R.b=f.b+x.a,e.r-=vk(e,(Ye(),At))+S.a+(n?m.b+m.c:0)}d.e.i.a=R.a,d.e.i.b=R.b}}function y4e(e,n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se;for(N=new ba,D=new ba,ie=new ba,se=new ba,R=y(ee(n,(Oe(),la)),15).a,b=R*y(ee(n,(sn(),tc)),15).a,Kt(ze(Zt(ee(n,(Ke(),P0))))),S=(j=new pn(s.a).a.bb().mb(),new mn(j));S.a.G();)if(x=(m=y(S.a.H(),21),y(m.yb(),9)),H=y(ee(x,ai),32),H==(Ye(),Et))for(D.a.db(x,D),d=Xt(Wr(x));Vt(d);)f=y(Gt(d),12),Dn(N,f.c.f);else if(H==At)for(se.a.db(x,se),d=Xt(Wr(x));Vt(d);)f=y(Gt(d),12),Dn(ie,f.c.f);N.a.Y()!=0&&(z=new kT(2,b),Z=e6(z,n,N,D,-R-n.d.b),Z>0&&(e.a=R+(Z-1)*b,n.d.b+=e.a,n.e.b+=e.a)),ie.a.Y()!=0&&(z=new kT(1,b),Z=e6(z,n,ie,se,n.e.b+R-n.d.b),Z>0&&(n.e.b+=R+(Z-1)*b))}function Hle(e,n){var s,f,d,b,m,x,S,R,N;return $n(),n.length==0?e.fc(d6,zT,-1,-1):(N=Af(n),Co(N.substr(0,3),"at ")&&(N=vg(N,3,N.length-3)),N=N.replace(/\[.*?\]/g,""),m=N.indexOf("("),m==-1?(m=N.indexOf("@"),m==-1?(R=N,N=""):(R=Af(vg(N,m+1,N.length-(m+1))),N=Af(N.substr(0,m)))):(s=N.indexOf(")",m),R=N.substr(m+1,s-(m+1)),N=Af(N.substr(0,m))),m=jAe(N,Sq(46)),m!=-1&&(N=vg(N,m+1,N.length-(m+1))),(N.length==0||Co(N,"Anonymous function"))&&(N=zT),x=WAe(R,Sq(58)),d=iPe(R,Sq(58),x-1),S=-1,f=-1,b=d6,x!=-1&&d!=-1&&(b=R.substr(0,d),S=rie(R.substr(d+1,x-(d+1))),f=rie(vg(R,x+1,R.length-(x+1)))),e.fc(b,N,S,f))}function m4e(e){var n,s,f,d,b,m,x,S,R,N;for(R=new Xe,x=new Xe,m=new W(e);m.a<m.c.c.length;)d=y(K(m),80),d.c=d.b.c.length,d.f=d.e.c.length,d.c==0&&(R.c[R.c.length]=d),d.f==0&&d.j.b==0&&(x.c[x.c.length]=d);for(f=-1;R.c.length!=0;)for(d=y(zh(R,0),80),s=new W(d.e);s.a<s.c.c.length;)n=y(K(s),118),N=n.b,N.i=Ei(N.i,d.i+1),f=Ei(f,N.i),--N.c,N.c==0&&(R.c[R.c.length]=N);if(f>-1){for(b=new W(x);b.a<b.c.c.length;)d=y(K(b),80),d.i=f;for(;x.c.length!=0;)for(d=y(zh(x,0),80),s=new W(d.b);s.a<s.c.c.length;)n=y(K(s),118),S=n.a,!(S.j.b>0)&&(S.i=il(S.i,d.i-1),--S.f,S.f==0&&(x.c[x.c.length]=S))}}function w4e(e,n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z;if(Kt(ze(Zt(ee(s,(Ke(),IR))))))for(x=new W(s.f);x.a<x.c.c.length;)for(m=y(K(x),7),D=y(dr(m.e,Ge(Ta,wa,12,m.e.c.length,0,1)),47),R=0,N=D.length;R<N;++R)S=D[R],b=S.d.f==s,d=b&&Kt(ze(Zt(ee(S,IR)))),d&&(H=S.c,j=y(bn(e.b,H),9),j||(j=R_(H,(rr(),yo),H.g,-1,H.j,y(ee(n,bo),59),n),Ae(j,(Oe(),Pt),H),Cn(e.b,H,j),tt(n.b,j)),Z=S.d,z=y(bn(e.b,Z),9),z||(z=R_(Z,(rr(),yo),Z.g,1,Z.j,y(ee(n,bo),59),n),Ae(z,(Oe(),Pt),Z),Cn(e.b,Z,z),tt(n.b,z)),f=OS(S),nr(f,y(ht(j.f,0),7)),Bn(f,y(ht(z.f,0),7)),Bt(e.a,S,new _w(f,n,(Ir(),Ri))),y(ee(n,(Oe(),hi)),18).ib((Dr(),Xo)))}function _4e(e,n,s,f,d,b){var m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe;switch(H=Tg(e.g),Z=Tg(s.g),z=On(Ts(e.i),e.a),ie=On(Ts(s.i),s.a),m=On(new hr(z),Oo(new _f(H),n)),x=On(new hr(ie),Oo(new _f(Z),f)),R=GDe(e,d),d==(Ye(),At)||d==lt?R+=b:R-=b,j=new li,se=new li,d.e){case 1:case 3:j.a=m.a,j.b=z.b+R,se.a=x.a,se.b=j.b;break;case 2:case 4:j.a=z.a+R,j.b=m.b,se.a=j.a,se.b=x.b;break;default:return null}switch(N=Oo(On(new Rt(j.a,j.b),se),.5),D=new kS(xe(Ee(un,1),on,10,0,[z,m,j,N,se,x,ie])),S=yue(D),fe=mue(D),d.e){case 1:case 3:D.a=S,ce=nMe(D);break;case 2:case 4:D.a=fe,ce=tMe(D);break;default:return null}return h4(D,new ST(xe(Ee(un,1),on,10,0,[S,fe,ce,z,ie]))),D}function x4e(e,n,s,f){var d,b,m,x,S,R,N,D,j,H;for(b=new Sce(n),D=B3e(e,n,b),H=rt(y(ee(n,(Ke(),zo)),15).a,1),N=new W(D.a);N.a<N.c.c.length;)R=y(K(N),27),S=Soe(y(R.a,10),y(R.b,10),H),o=!0,o=o&Tc(s,new Rt(S.d,S.e)),o=o&Tc(s,Ha(new Rt(S.d,S.e),S.c,0)),o=o&Tc(s,Ha(new Rt(S.d,S.e),0,S.b)),o&Tc(s,Ha(new Rt(S.d,S.e),S.c,S.b));switch(j=b.d,x=Soe(y(D.b.a,10),y(D.b.b,10),H),j==(Ye(),vt)||j==lt?(f.c[j.e]=wn(f.c[j.e],x.e),f.b[j.e]=rt(f.b[j.e],x.e+x.b)):(f.c[j.e]=wn(f.c[j.e],x.d),f.b[j.e]=rt(f.b[j.e],x.d+x.c)),d=ii,m=b.c.f.e,j.e){case 4:d=m.c;break;case 2:d=m.b;break;case 1:d=m.a;break;case 3:d=m.d}return f.a[j.e]=rt(f.a[j.e],d),b}function E4e(e,n,s,f,d){var b,m,x,S,R,N,D,j,H,z,Z,ie;for(b=new Xe,R=new W(f);R.a<R.c.c.length;)if(x=y(K(R),187),m=null,x.f==(Ir(),Ri))for(z=new W(x.e);z.a<z.c.c.length;)H=y(K(z),12),ie=H.d.f,na(ie)==n?Mse(e,n,x,H,x.b,H.d):!s||Cv(ie,s)?oMe(e,n,x,f,H):(j=$T(e,n,s,H,x.b,Ri,m),j!=m&&(b.c[b.c.length]=j),j.c&&(m=j));else for(D=new W(x.e);D.a<D.c.c.length;)if(N=y(K(D),12),Z=N.c.f,na(Z)==n)Mse(e,n,x,N,N.c,x.b);else{if(!s||Cv(Z,s))continue;j=$T(e,n,s,N,x.b,fa,m),j!=m&&(b.c[b.c.length]=j),j.c&&(m=j)}for(S=new W(b);S.a<S.c.c.length;)x=y(K(S),187),aa(n.b,x.a,0)!=-1||tt(n.b,x.a),x.c&&(d.c[d.c.length]=x)}function k4e(e){var n,s,f,d;for(n=e.e.j,f=new W(wl(e));f.a<f.c.c.length;){switch(s=y(K(f),161),d=y(Er(s,(Ke(),Vf)),15),!d&&(d=new gn(0)),y(s.e,7).g.e){case 4:s.e.i.b=n.b*ze(nn(Er(s,ud))),s.e.i.a=-s.e.j.a-d.a;break;case 2:s.e.i.b=n.b*ze(nn(Er(s,ud))),s.e.i.a=n.a+d.a;break;case 1:s.e.i.a=n.a*ze(nn(Er(s,ud))),s.e.i.b=-s.e.j.b-d.a;break;case 3:s.e.i.a=n.a*ze(nn(Er(s,ud))),s.e.i.b=n.b+d.a}switch(y(s.e,7).g.e){case 4:s.e.i.b=n.b*ze(nn(Er(s,ud))),s.e.i.a=-s.e.j.a-d.a;break;case 2:s.e.i.b=n.b*ze(nn(Er(s,ud))),s.e.i.a=n.a+d.a;break;case 1:s.e.i.a=n.a*ze(nn(Er(s,ud))),s.e.i.b=-s.e.j.b-d.a;break;case 3:s.e.i.a=n.a*ze(nn(Er(s,ud))),s.e.i.b=n.b+d.a}}}function S4e(e){var n,s,f,d,b,m,x,S,R;for(b=e.f,d=KB(CS(e)),R=xn(za(e.g),0);R.b!=R.d.c;)if(S=y(vn(R),7),S.e.c.length==0){for(s=new W(S.b);s.a<s.c.c.length;)if(n=y(K(s),12),f=n.c,d.a.R(f)){for(m=new Ln(b.f,0),x=(Ct(m.b<m.d.Y()),y(m.d.sb(m.c=m.b++),7));x!=S;)x=(Ct(m.b<m.d.Y()),y(m.d.sb(m.c=m.b++),7));Sc(m,f),By(R,f),x_(f,S.g),Fy(R),Fy(R),d.a.eb(f)!=null}}else for(s=new W(S.e);s.a<s.c.c.length;)if(n=y(K(s),12),f=n.d,d.a.R(f)){for(m=new Ln(b.f,0),x=(Ct(m.b<m.d.Y()),y(m.d.sb(m.c=m.b++),7));x!=S;)x=(Ct(m.b<m.d.Y()),y(m.d.sb(m.c=m.b++),7));Ct(m.b>0),m.a.sb(m.c=--m.b),Sc(m,f),By(R,f),x_(f,S.g),Fy(R),Fy(R),d.a.eb(f)!=null}}function T4e(e){var n,s,f,d,b,m,x,S,R;b=new tk(e),d=Jn(b,"graph"),S=Jn(b,"success"),f=Jn(b,"error"),m=Jn(b,"options");try{if(!d||!d.kc())throw new Vm("Mandatory parameter missing, 'graph' must be specified");AOe(new bee,d.kc(),m?m.kc():null),x=d.kc().a,S&&S.kc()?u0(S.kc().a,x):u0(null,x)}catch(N){if(N=gi(N),Qe(N,73))R=N,f&&f.kc()?u0(f.kc().a,Ace(R).a):u0(null,Ace(R).a);else if(Qe(N,54))n=N,s=new Ch,fs(s,"type",new mf(Km(n.$c))),n.bc()!=null?fs(s,KT,new mf(n.bc())):fs(s,KT,new mf("null (sic)")),fs(s,Sfe,new mf(uB(new Um(`
335
+ `),new ev(new zs((n.g==null&&(n.g=OB(n)),n.g)))))),f&&f.kc()?u0(f.kc().a,s.a):u0(null,s.a),pq(n,(Mh(),hpe));else throw bi(N)}}function R4e(e,n,s){var f,d,b,m,x,S,R,N,D,j;if(s)for(f=-1,N=new Ln(n,0);N.b<N.d.Y();){if(x=(Ct(N.b<N.d.Y()),y(N.d.sb(N.c=N.b++),9)),D=e.a[x.d.k][x.k].a,D==null){for(m=f+1,b=new Ln(n,N.b);b.b<b.d.Y();)if(j=yAe(e,(Ct(b.b<b.d.Y()),y(b.d.sb(b.c=b.b++),9))).a,j!=null){m=(Rr(j),j);break}D=(f+m)/2,e.a[x.d.k][x.k].a=D,e.a[x.d.k][x.k].d=(Rr(D),D),e.a[x.d.k][x.k].b=1}f=(Rr(D),D)}else{for(d=0,R=new W(n);R.a<R.c.c.length;)x=y(K(R),9),e.a[x.d.k][x.k].a!=null&&(d=rt(d,ze(e.a[x.d.k][x.k].a)));for(d+=2,S=new W(n);S.a<S.c.c.length;)x=y(K(S),9),e.a[x.d.k][x.k].a==null&&(D=Jh(e.e,24)*rR*d-1,e.a[x.d.k][x.k].a=D,e.a[x.d.k][x.k].d=D,e.a[x.d.k][x.k].b=1)}}function I4e(e,n,s){var f,d,b,m,x,S,R,N,D,j,H,z;for(S=0,R=0,z=0,H=0,m=0,j=0,D=0,N=0,b=new Pw(new Hm(e.c).a);dw(b.a);)switch(d=(b.b=Tf(b.a),new sw(b.c,b.b)),f=y(d.b.b[d.a.e],62),y(d.a,67).e){case 12:case 13:case 14:j+=f.c+n;break;case 15:case 16:case 17:D+=f.c+n,m=rt(m,f.b+n);break;case 18:case 19:case 20:N+=f.c+n;break;case 0:case 1:case 2:z+=f.c+n;break;case 3:case 4:case 5:H+=f.c+n;break;case 6:case 7:case 8:S+=f.b+n;break;case 9:case 10:case 11:R+=f.b+n}S-=n,R-=n,z-=n,H-=n,j+=j!=0?n:0,D+=D!=0?n:0,N+=N!=0?n:0,x=e.p.d+m+e.p.a,x+=x!=0?n:0,s.a=rt(s.a,z),s.a=rt(s.a,j),s.a=rt(s.a,D),s.a=rt(s.a,N),s.a=rt(s.a,H),s.b=rt(s.b,S),s.b=rt(s.b,x),s.b=rt(s.b,R)}function C4e(e){var n,s,f,d,b,m,x,S;for(n=null,f=new W(e);f.a<f.c.c.length;)s=y(K(f),102),ze(ss(s.g,s.d[0]).a),s.b=null,s.e&&s.e.Y()>0&&s.c==0&&(!n&&(n=new Xe),n.c[n.c.length]=s);if(n)for(;n.c.length!=0;){if(s=y(zh(n,0),102),s.b&&s.b.c.length>0){for(b=(!s.b&&(s.b=new Xe),new W(s.b));b.a<b.c.c.length;)if(d=y(K(b),102),ze(ss(d.g,d.d[0]).a)==ze(ss(s.g,s.d[0]).a)){if(aa(e,d,0)>aa(e,s,0))return new jr(d,s)}else if(ze(ss(d.g,d.d[0]).a)>ze(ss(s.g,s.d[0]).a))return new jr(d,s)}for(x=(!s.e&&(s.e=new Xe),s.e).mb();x.G();)m=y(x.H(),102),S=(!m.b&&(m.b=new Xe),m.b),If(0,S.c.length),Ry(S.c,0,s),m.c==S.c.length&&(n.c[n.c.length]=m)}return null}function A4e(e){var n,s,f,d,b,m,x,S,R,N,D,j,H,z,Z;for(D=(Qn(),new ln),N=(sr(),new Po(Lo(du(e.a,new w))));Vt(N);)for(R=y(Gt(N),9),d=COe(R,(Ye(),lt)),f=new W(d);f.a<f.c.c.length;)for(s=y(K(f),7),m=new W(s.e);m.a<m.c.c.length;){for(b=y(K(m),12),ya(),Z=b.d.f,(Z.g==(wt(),Nn)||Z.g==Ds)&&(Z=y(ee(Z,(Oe(),Xi)),7).f),Di(D.d,Z)?n=y(Oi(Di(D.d,Z)),171):(d.c.length==2?ft(s)===ft((Gn(0,d.c.length),d.c[0]))?n=Yo:n=Ju:n=Yo,Oa(D.d,Z,n)),S=new W(b.b);S.a<S.c.c.length;)x=y(K(S),33),Ae(x,(Oe(),Js),n);for(z=new W(b.c.c);z.a<z.c.c.length;)j=y(K(z),33),Ae(j,(Oe(),Js),n);for(H=new W(b.d.c);H.a<H.c.c.length;)j=y(K(H),33),Ae(j,(Oe(),Js),n)}}function P4e(e,n){var s,f,d,b,m,x,S,R,N;if(Fh(qn(n))!=1||y($w(qn(n)),12).d.f.g!=(wt(),Nn))return null;for(b=y($w(qn(n)),12),s=b.d.f,Ss(s,(wt(),ua)),Ae(s,(Oe(),ca),null),Ae(s,Xi,null),Ae(s,(Ke(),Nt),y(ee(n,Nt),28)),Ae(s,Da,y(ee(n,Da),86)),d=ee(b.c,Pt),m=null,R=wr(s,(Ye(),lt)).mb();R.G();)if(x=y(R.H(),7),x.e.c.length!=0){Ae(x,Pt,d),N=b.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,Vn(x.c,N.c),N.c.c=Ge(yt,st,1,0,4,1),m=x;break}if(Ae(b.c,Pt,null),!$y(wr(n,lt)))for(S=new W(kf(wr(n,lt)));S.a<S.c.c.length;)x=y(K(S),7),x.e.c.length==0?(f=new cr,an(f,lt),f.j.a=x.j.a,f.j.b=x.j.b,An(f,s),Ae(f,Pt,ee(x,Pt)),An(x,null)):An(m,s);return s.j.b=n.j.b,tt(e.b,s),s}function L4e(e){var n,s,f,d,b,m,x,S,R;if(b=e.e.e.j,m=new hr(b),S=y(Er(e.e,(Ke(),Rl)),86),R=y(Er(e.e,j0),86),x=y(Er(e.e,Nt),28),n=Do(S,(Pc(),$0)),S.c!=0){switch(b.a=0,b.b=0,f=null,x.e){case 1:case 2:case 3:f=JMe(e,e.k);break;case 4:f=new hr(m);break;case 5:f=F3e(e.e,n)}Do(S,LR)&&(f&&(b.a=rt(b.a,f.a),b.b=rt(b.b,f.b)),n&&(b.a=rt(b.a,e.q.b+e.q.c+e.k),b.b=rt(b.b,e.q.d+e.q.a+e.k))),Do(S,PR)&&vf(new W(r0(e.e)))&&I4e(e,e.d,b),Do(S,F0)&&(d=y(Er(e.e,Hg),15).a,s=y(Er(e.e,Gg),15).a,Do(R,(Nv(),G0))&&(d<=0&&(d=20),s<=0&&(s=20)),Do(R,DR)?(d>0&&(b.a=rt(b.a,d+e.q.b+e.q.c)),s>0&&(b.b=rt(b.b,s+e.q.d+e.q.a))):(d>0&&(b.a=rt(b.a,d)),s>0&&(b.b=rt(b.b,s)))),SAe(e.e,b)}}function zle(e,n,s){var f,d,b,m,x,S,R,N,D,j,H;if(!e.b)return!1;for(m=null,j=null,S=new qS(null,null),d=1,S.a[1]=e.b,D=S;D.a[d];)R=d,x=j,j=D,D=D.a[d],f=e.a.$b(n,D.d),d=f<0?0:1,f==0&&(!s.c||Va(D.e,s.d))&&(m=D),!(D&&D.b)&&!al(D.a[d])&&(al(D.a[1-d])?j=j.a[R]=Zw(D,d):al(D.a[1-d])||(H=j.a[1-R],H&&(!al(H.a[1-R])&&!al(H.a[R])?(j.b=!1,H.b=!0,D.b=!0):(b=x.a[1]==j?1:0,al(H.a[R])?x.a[b]=Vae(j,R):al(H.a[1-R])&&(x.a[b]=Zw(j,R)),D.b=x.a[b].b=!0,x.a[b].a[0].b=!1,x.a[b].a[1].b=!1))));return m&&(s.b=!0,s.d=m.e,D!=m&&(N=new qS(D.d,D.e),lMe(e,S,m,N),j==m&&(j=N)),j.a[j.a[1]==D?1:0]=D.a[D.a[0]?0:1],--e.c),e.b=S.a[1],e.b&&(e.b.b=!1),s.b}function N4e(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce;for(f=y(ee(e,(Ke(),Nt)),28),S=e.e,x=e.a,s=y(ee(e,(Oe(),Jo)),15).a,R=S.a+x.b+x.c+2*s,N=0-x.d-s-e.d.b,H=S.b+x.d+x.a+2*s-e.d.b,D=new Xe,z=new Xe,b=(j=new pn(n.a).a.bb().mb(),new mn(j));b.a.G();){switch(d=(m=y(b.a.H(),21),y(m.yb(),9)),f.e){case 1:case 2:case 3:VMe(d);break;case 4:Z=y(ee(d,Mc),10),ie=Z?Z.a:0,d.i.a=R*ze(nn(ee(d,Hc)))-ie,u_(d,!0,!1);break;case 5:se=y(ee(d,Mc),10),ce=se?se.a:0,d.i.a=ze(nn(ee(d,Hc)))-ce,u_(d,!0,!1),S.a=rt(S.a,d.i.a+d.j.a/2)}switch(y(ee(d,ai),32).e){case 1:d.i.b=N,D.c[D.c.length]=d;break;case 3:d.i.b=H,z.c[z.c.length]=d}}switch(f.e){case 1:case 2:Uoe(D,e),Uoe(z,e);break;case 3:Yoe(D,e),Yoe(z,e)}}function O4e(e){var n,s,f,d,b,m;return f=y(ee(e.a.g,(Ke(),Da)),86),fue(f,(Nc(),n=y(ga(Un),11),new Si(n,y(ta(n,n.length),11),0)))||(gl(f,s_(xa))?(s=y(y(ds(e.a.b,e.b),20).sb(0),33),e.b.i.a=s.i.a,e.b.i.b=s.i.b):gl(f,s_(ka))?(d=y(ht(e.a.c,e.a.c.c.length-1),9),b=y(y(ds(e.a.b,e.b),20).sb(y(ds(e.a.b,e.b),20).Y()-1),33),m=d.j.a-(b.i.a+b.j.a),e.b.i.a=e.a.g.j.a-m-e.b.j.a,e.b.i.b=b.i.b):gl(f,dn(Xa,xe(Ee(Un,1),nt,41,0,[Os])))?(s=y(y(ds(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=s.i.b):gl(f,s_(Xa))?(s=y(y(ds(e.a.b,e.b),20).sb(0),33),e.b.i.b=s.i.b):gl(f,s_(Os))&&(s=y(y(ds(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=s.i.b)),null}function Vle(e){var n,s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie;for(z=new W(e);z.a<z.c.c.length;){for(H=y(K(z),9),Us(H.i),Us(H.j),C3e(H),n3e(H),ie=new W(H.f);ie.a<ie.c.c.length;){for(Z=y(K(ie),7),Us(Z.i),Us(Z.a),Us(Z.j),an(Z,Aue(Z.g)),b=y(ee(Z,(Ke(),jc)),24),b&&Ae(Z,jc,Mt(-b.a)),d=new W(Z.e);d.a<d.c.c.length;){for(f=y(K(d),12),s=xn(f.a,0);s.b!=s.d.c;)n=y(vn(s),10),Us(n);if(S=y(ee(f,pr),44),S)for(x=xn(S,0);x.b!=x.d.c;)m=y(vn(x),10),Us(m);for(D=new W(f.b);D.a<D.c.c.length;)R=y(K(D),33),Us(R.i),Us(R.j)}for(j=new W(Z.c);j.a<j.c.c.length;)R=y(K(j),33),Us(R.i),Us(R.j)}for(H.g==(wt(),Hn)&&(Ae(H,(Oe(),ai),Aue(y(ee(H,ai),32))),g3e(H)),N=new W(H.c);N.a<N.c.c.length;)R=y(K(N),33),Us(R.j),Us(R.i)}}function D4e(e,n,s,f){var d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce;for(ZDe(s),Cv(n.d.f,n.c.f)?(N=n.c,D=Pn(xe(Ee(un,1),on,10,0,[N.i,N.a])),R=N.f.b,Ha(D,-R.b,-R.d),D.a-=f.a,D.b-=f.b):D=ia(n.c),D.a+=f.a,D.b+=f.b,j=new Ch,As(e,j,"x",D.a),As(e,j,"y",D.b),fs(s,"sourcePoint",j),H=ia(n.d),ee(n,(Oe(),DI))!=null&&On(H,y(ee(n,DI),10)),On(H,f),z=new Ch,As(e,z,"x",H.a),As(e,z,"y",H.b),fs(s,"targetPoint",z),d=new l4,ce=pl(n.a,f),b=0,se=xn(ce,0);se.b!=se.d.c;)Z=y(vn(se),10),S=new Ch,As(e,S,"x",Z.a),As(e,S,"y",Z.b),sae(d,b++,S);if(ce.b==0?fs(s,JT,null):fs(s,JT,d),m=y(ee(n,(Ke(),pr)),44),b=0,m){for(pl(m,f),x=new l4,ie=xn(m,0);ie.b!=ie.d.c;)Z=y(vn(ie),10),S=new Ch,As(e,S,"x",Z.a),As(e,S,"y",Z.b),sae(x,b++,S);fs(s,Tfe,x)}else fs(s,Tfe,null)}function M4e(e,n,s,f){var d,b,m,x,S,R,N,D,j,H,z,Z,ie,se;if(Z=e.i,ie=e.j,j=e.e,n){for(D=f/2*(n.Y()-1),H=0,R=n.mb();R.G();)x=y(R.H(),9),D+=x.j.a,H=rt(H,x.j.b);for(se=Z.a-(D-ie.a)/2,m=Z.b-j.d+H,d=ie.a/(n.Y()+1),b=d,S=n.mb();S.G();)x=y(S.H(),9),x.i.a=se,x.i.b=m-x.j.b,se+=x.j.a+f/2,N=Yce(x),N.i.a=x.j.a/2-N.a.a,N.i.b=x.j.b,z=y(ee(x,(Oe(),px)),7),z.b.c.length+z.e.c.length==1&&(z.i.a=b-z.a.a,z.i.b=0,An(z,e)),b+=d}if(s){for(D=f/2*(s.Y()-1),H=0,R=s.mb();R.G();)x=y(R.H(),9),D+=x.j.a,H=rt(H,x.j.b);for(se=Z.a-(D-ie.a)/2,m=Z.b+ie.b+j.a-H,d=ie.a/(s.Y()+1),b=d,S=s.mb();S.G();)x=y(S.H(),9),x.i.a=se,x.i.b=m,se+=x.j.a+f/2,N=Yce(x),N.i.a=x.j.a/2-N.a.a,N.i.b=0,z=y(ee(x,(Oe(),px)),7),z.b.c.length+z.e.c.length==1&&(z.i.a=b-z.a.a,z.i.b=ie.b,An(z,e)),b+=d}}function j4e(e,n,s,f,d){var b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We;for(We=0,H=0,D=new W(n.f);D.a<D.c.c.length;){for(N=y(K(D),9),j=0,x=0,S=s?y(ee(N,ox),24).a:Uu,se=f?y(ee(N,ux),24).a:Uu,R=S>se?S:se,fe=new W(N.f);fe.a<fe.c.c.length;){if(ce=y(K(fe),7),_e=N.i.b+ce.i.b+ce.a.b,f)for(m=new W(ce.e);m.a<m.c.c.length;)b=y(K(m),12),Z=b.d,z=Z.f,n!=e.a[z.k]&&(ie=Ei(y(ee(z,ox),24).a,y(ee(z,ux),24).a),Re=y(ee(b,(Oe(),js)),24).a,Re>=R&&Re>=ie&&(j+=z.i.b+Z.i.b+Z.a.b-_e,++x));if(s)for(m=new W(ce.b);m.a<m.c.c.length;)b=y(K(m),12),Z=b.c,z=Z.f,n!=e.a[z.k]&&(ie=Ei(y(ee(z,ox),24).a,y(ee(z,ux),24).a),Re=y(ee(b,(Oe(),js)),24).a,Re>=R&&Re>=ie&&(j+=z.i.b+Z.i.b+Z.a.b-_e,++x))}x>0&&(We+=j/x,++H)}H>0?(n.a=d*We/H,n.i=H):(n.a=0,n.i=0)}function B4e(e,n,s,f){var d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce;for(H=n.c.length,j=0,D=new W(e.c);D.a<D.c.c.length;)if(N=y(K(D),16),se=N.a,se.c.length!=0){for(ie=new W(se),R=0,ce=null,d=y(K(ie),9);d;){if(b=y(ht(n,d.k),111),b.c>=0){for(S=null,x=new Ln(N.a,R+1);x.b<x.d.Y()&&(m=(Ct(x.b<x.d.Y()),y(x.d.sb(x.c=x.b++),9)),S=y(ht(n,m.k),111),!(S.d==b.d&&S.c<b.c));)S=null;S&&(ce&&(Sf(f,d.k,Mt(y(ht(f,d.k),24).a-1)),y(ht(s,ce.k),20).nb(b)),b=VDe(b,d,H++),n.c[n.c.length]=b,tt(s,new Xe),ce?(y(ht(s,ce.k),20).ib(b),tt(f,Mt(1))):tt(f,Mt(0)))}z=null,ie.a<ie.c.c.length&&(z=y(K(ie),9),Z=y(ht(n,z.k),111),y(ht(s,d.k),20).ib(Z),Sf(f,z.k,Mt(y(ht(f,z.k),24).a+1))),b.d=j,b.c=R++,ce=d,d=z}++j}Kt(ze(Zt(ee(e,(Ke(),P0)))))}function xu(e,n){var s;if(e.e)throw new rl((Dh($R),"The "+$R.j+Cfe));if(!eAe(e.a,n))throw new Bu("The direction "+n+" is not supported by the CGraph instance.");if(n==e.d)return e;switch(s=e.d,e.d=n,s.e){case 0:switch(n.e){case 2:Gu(e);break;case 1:_u(e),Gu(e);break;case 4:Pf(e),Gu(e);break;case 3:Pf(e),_u(e),Gu(e)}break;case 2:switch(n.e){case 1:_u(e),jT(e);break;case 4:Pf(e),Gu(e);break;case 3:Pf(e),_u(e),Gu(e)}break;case 1:switch(n.e){case 2:_u(e),jT(e);break;case 4:_u(e),Pf(e),Gu(e);break;case 3:_u(e),Pf(e),_u(e),Gu(e)}break;case 4:switch(n.e){case 2:Pf(e),Gu(e);break;case 1:Pf(e),_u(e),Gu(e);break;case 3:_u(e),jT(e)}break;case 3:switch(n.e){case 2:_u(e),Pf(e),Gu(e);break;case 1:_u(e),Pf(e),_u(e),Gu(e);break;case 4:_u(e),jT(e)}}return e}function l6(e,n,s){var f,d,b,m,x,S,R,N,D;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 W(n.f);N.a<N.c.c.length;)for(R=y(K(N),7),D=s?new Kp(R):new Zd(R),S=D.mb();S.G();)x=y(S.H(),7),m=x.f,m.d==n.d?m!=n&&(l6(e,m,s),e.a[n.d.k][n.k].b+=e.a[m.d.k][m.k].b,e.a[n.d.k][n.k].d+=e.a[m.d.k][m.k].d):(e.a[n.d.k][n.k].d+=e.d[x.k],++e.a[n.d.k][n.k].b);if(b=y(ee(n,(Oe(),Y7)),20),b)for(d=b.mb();d.G();)f=y(d.H(),9),n.d==f.d&&(l6(e,f,s),e.a[n.d.k][n.k].b+=e.a[f.d.k][f.k].b,e.a[n.d.k][n.k].d+=e.a[f.d.k][f.k].d);e.a[n.d.k][n.k].b>0&&(e.a[n.d.k][n.k].d+=Jh(e.e,24)*rR*.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 q4e(e,n){var s,f,d,b,m,x,S,R,N,D,j;for(d=new W(e.a.c);d.a<d.c.c.length;)for(s=y(K(d),16),S=new W(s.a);S.a<S.c.c.length;)x=y(K(S),9),n.i[x.k]=x,n.g[x.k]=n.k==(Ys(),Ms)?ii:Wi;for(m=e.a.c,n.c==(fo(),Ru)&&(m=Qe(m,87)?bg(y(m,87)):Qe(m,88)?y(m,88).a:Qe(m,63)?new gy(m):new ag(m)),vNe(e.e,n,e.b),HCe(n.n),b=m.mb();b.G();)for(s=y(b.H(),16),R=s.a,n.k==(Ys(),Ms)&&(R=Qe(R,87)?bg(y(R,87)):Qe(R,88)?y(R,88).a:Qe(R,63)?new gy(R):new ag(R)),j=R.mb();j.G();)D=y(j.H(),9),n.f[D.k]==D&&Zle(e,D,n);for(Gje(e,n),f=m.mb();f.G();)for(s=y(f.H(),16),j=new W(s.a);j.a<j.c.c.length;)D=y(K(j),9),n.n[D.k]=n.n[n.f[D.k].k],D==n.f[D.k]&&(N=ze(n.g[n.i[D.k].k]),(n.k==(Ys(),Ms)&&N>ii||n.k==qc&&N<Wi)&&(n.n[D.k]=ze(n.n[D.k])+N));e.e.Jc()}function Ule(e,n){var s,f,d,b,m,x,S,R,N,D,j;LOe(n,xe(Ee(rd,1),st,79,0,[(Oe(),la),Jo,(sn(),tb),ep])),R=y(ee(n,la),15).a,y(ee(n,tc),15).a*R<2&&Ae(n,tc,new gn(2/R)),N=y(ee(n,(Ke(),bo)),59),N==(ur(),go)&&Ae(n,bo,oT(n)),D=y(ee(n,f$),24),D.a==0?Ae(n,np,new nue):Ae(n,np,new Gse(D.a)),j=new Wle(n),Ae(n,nh,j),d=Jw(e,y(ee(n,$I),180)),x=Jw(e,y(ee(n,VI),180)),f=Jw(e,y(ee(n,yx),180)),S=Jw(e,y(ee(n,UI),180)),b=Jw(e,YAe(y(ee(n,Q7),122))),m=new Zn,Ae(n,epe,m),Ur(Ur(Ur(Ur(Ur(Ur(m,d.qc(n)),x.qc(n)),f.qc(n)),S.qc(n)),b.qc(n)),Vje(n)),s=(Mi(30,qf),new sa(30)),Ae(n,r$,s),Vn(s,c0(e,m,0)),s.c[s.c.length]=d,Vn(s,c0(e,m,1)),s.c[s.c.length]=x,Vn(s,c0(e,m,2)),s.c[s.c.length]=f,Vn(s,c0(e,m,3)),s.c[s.c.length]=S,Vn(s,c0(e,m,4)),s.c[s.c.length]=b,Vn(s,c0(e,m,5))}function F4e(e,n){var s,f,d,b,m,x;if(b=Dae(i0(e)),!b.Nb().V()){switch(d=y(ee(y(y(y(b.Nb().sb(0),129),224).e,33),(ya(),ode)),171),d=d==H0?Ju:d,x=0,y(e.e,7).g.e){case 4:case 2:d==Ju&&(x=e.e.j.b);break;case 3:x=e.e.j.b}for((y(e.e,7).g==(Ye(),Et)||d==Yo)&&(b=bg(b)),f=_g(b.Nb().mb());f.G();){if(s=y(f.H(),129),m=new hr(s.e.i),d==Yo)switch(y(e.e,7).g.e){case 1:case 4:m.a=-s.e.j.a-n,m.b=x-n-s.e.j.b,x-=n+s.e.j.b;break;case 2:m.a=e.e.j.a+n,m.b=x-n-s.e.j.b,x-=n+s.e.j.b;break;case 3:m.a=-s.e.j.a-n,m.b=x+n,x+=n+s.e.j.b}else switch(y(e.e,7).g.e){case 4:m.a=-s.e.j.a-n,m.b=x+n,x+=n+s.e.j.b;break;case 2:m.a=e.e.j.a+n,m.b=x+n,x+=n+s.e.j.b;break;case 1:m.a=e.e.j.a+n,m.b=x-n-s.e.j.b,x-=n+s.e.j.b;break;case 3:m.a=e.e.j.a+n,m.b=x+n,x+=n+s.e.j.b}s.e.i.a=m.a,s.e.i.b=m.b}}}function $4e(e,n,s){var f,d,b,m,x,S,R,N,D,j,H;for(f=0,d=0,N=0;N<e.length;N++)if(S=e[N],Gi(y(ee(S,(Ke(),Nt)),28)))for(m=wr(S,(Ye(),lt)).mb();m.G();)b=y(m.H(),7),b.b.c.length+b.e.c.length>0&&(f+=b.b.c.length+b.e.c.length,Cn(n,b,Mt(f)));else{for(x=wr(S,(Ye(),lt)).mb();x.G();)b=y(x.H(),7),f+=b.b.c.length+b.e.c.length;for(m=wr(S,lt).mb();m.G();)b=y(m.H(),7),b.b.c.length+b.e.c.length>0&&Cn(n,b,Mt(f))}for(R=e.length-1;R>=0;R--)if(S=e[R],Gi(y(ee(S,(Ke(),Nt)),28)))for(j=wr(S,(Ye(),vt)).mb();j.G();)D=y(j.H(),7),D.b.c.length+D.e.c.length>0&&(d+=D.b.c.length+D.e.c.length,Cn(s,D,Mt(d)));else{for(H=wr(S,(Ye(),vt)).mb();H.G();)D=y(H.H(),7),d+=D.b.c.length+D.e.c.length;for(j=wr(S,vt).mb();j.G();)D=y(j.H(),7),D.b.c.length+D.e.c.length>0&&Cn(s,D,Mt(d))}}function G4e(e,n,s,f,d){var b,m,x,S,R,N,D,j,H,z,Z,ie,se;switch(j=Tg(e.g),z=Tg(n.g),H=On(Ts(e.i),e.a),Z=On(Ts(n.i),n.a),S=On(new Rt(H.a,H.b),Oo(new _f(j),1.3*s)),ie=On(new Rt(Z.a,Z.b),Oo(new _f(z),1.3*f)),x=ki(S.a-ie.a),x<d&&(e.g==(Ye(),vt)||e.g==lt?S.a<ie.a?S.a=ie.a-d:S.a=ie.a+d:S.a<ie.a?ie.a=S.a+d:ie.a=S.a-d),b=0,m=0,e.g.e){case 4:b=2*(H.a-s)-.5*(S.a+ie.a);break;case 2:b=2*(H.a+s)-.5*(S.a+ie.a);break;case 1:m=2*(H.b-s)-.5*(S.b+ie.b);break;case 3:m=2*(H.b+s)-.5*(S.b+ie.b)}switch(n.g.e){case 4:b=2*(Z.a-f)-.5*(ie.a+S.a);break;case 2:b=2*(Z.a+f)-.5*(ie.a+S.a);break;case 1:m=2*(Z.b-f)-.5*(ie.b+S.b);break;case 3:m=2*(Z.b+f)-.5*(ie.b+S.b)}return D=new Rt(b,m),N=new kS(xe(Ee(un,1),on,10,0,[H,S,D,ie,Z])),R=yue(N),se=mue(N),N.a=R,h4(N,new ST(xe(Ee(un,1),on,10,0,[R,se,H,Z]))),N}function Yle(e,n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie;for(S=s.a,d=y(ee(s,(Oe(),Jo)),15).a,z=s.d,x=(f=y(ee(s,Jo),15).a,new Rt(s.e.a+s.a.b+s.a.c+2*f,s.e.b+s.a.d+s.a.a+2*f)),R=x.b,j=new W(e.a);j.a<j.c.c.length;)if(N=y(K(j),9),N.g==(wt(),Hn)){switch(b=y(ee(N,ai),32),m=y(ee(N,Z7),10),H=N.i,b.e){case 2:H.a=s.e.a+d+S.c-z.a;break;case 4:H.a=-z.a-d-S.b}switch(ie=0,b.e){case 2:case 4:n==(rr(),Vo)?(Z=ze(nn(ee(N,Hc))),H.b=x.b*Z-y(ee(N,(Ke(),Mc)),10).b,ie=H.b+m.b,u_(N,!1,!0)):n==Ti&&(H.b=ze(nn(ee(N,Hc)))-y(ee(N,(Ke(),Mc)),10).b,ie=H.b+m.b,u_(N,!1,!0))}R=R>ie?R:ie}for(s.e.b+=R-x.b,D=new W(e.a);D.a<D.c.c.length;)if(N=y(K(D),9),N.g==(wt(),Hn))switch(b=y(ee(N,ai),32),H=N.i,b.e){case 1:H.b=-z.b-d-S.d;break;case 3:H.b=s.e.b+d+S.a-z.b}}function H4e(e){var n,s,f,d,b,m,x,S,R,N,D,j,H,z;for(d=new Xe,S=new W(e.d.f);S.a<S.c.c.length;)m=y(K(S),7),m.g==(Ye(),lt)&&(d.c[d.c.length]=m);if(e.e.a==(ur(),_a)&&!hu(y(ee(e.d,(Ke(),Nt)),28)))for(f=Xt(qn(e.d));Vt(f);)s=y(Gt(f),12),tt(d,s.c);for(b=e.d.j.a,Ae(e.d,(Oe(),Q0),new gn(e.d.j.a)),e.d.j.a=e.c,Ae(e.d,jl,(jn(),jn(),Ii)),tt(e.b,e.d),R=e.d,b-=e.c,N=e.a;N>1;)n=wn(b,e.c),R=(D=new Ps(e.e.c),Ss(D,(wt(),ua)),Ae(D,(Ke(),Nt),y(ee(R,Nt),28)),Ae(D,Da,y(ee(R,Da),86)),D.k=e.e.b++,tt(e.b,D),D.j.b=R.j.b,D.j.a=n,j=new cr,an(j,(Ye(),lt)),An(j,R),j.i.a=D.j.a,j.i.b=D.j.b/2,H=new cr,an(H,vt),An(H,D),H.i.b=D.j.b/2,H.i.a=-H.j.a,z=new pu,nr(z,j),Bn(z,H),D),tt(e.e.c.b,R),--N,b-=e.c+e.e.d;for(new gq(e.d,e.b,e.c),x=new W(d);x.a<x.c.c.length;)m=y(K(x),7),Vr(e.d.f,m),An(m,R)}function z4e(e,n){var s,f,d,b,m,x,S,R,N,D,j,H;if(!(e.p>n.a||n.p>e.a)){for(s=0,f=0,D=(m=new pn(e.o.a).a.bb().mb(),new mn(m));D.a.G();)R=(d=y(D.a.H(),21),y(d.yb(),7)),cT(Pn(xe(Ee(un,1),on,10,0,[R.f.i,R.i,R.a])).b,n.p,n.a)&&++s;for(j=(x=new pn(e.g.a).a.bb().mb(),new mn(x));j.a.G();)R=(d=y(j.a.H(),21),y(d.yb(),7)),cT(Pn(xe(Ee(un,1),on,10,0,[R.f.i,R.i,R.a])).b,n.p,n.a)&&--s;for(H=(S=new pn(n.o.a).a.bb().mb(),new mn(S));H.a.G();)R=(d=y(H.a.H(),21),y(d.yb(),7)),cT(Pn(xe(Ee(un,1),on,10,0,[R.f.i,R.i,R.a])).b,e.p,e.a)&&++f;for(N=(b=new pn(n.g.a).a.bb().mb(),new mn(b));N.a.G();)R=(d=y(N.a.H(),21),y(d.yb(),7)),cT(Pn(xe(Ee(un,1),on,10,0,[R.f.i,R.i,R.a])).b,e.p,e.a)&&--f;s<f?new Yw(e,n,f-s):f<s?new Yw(n,e,s-f):(new Yw(n,e,0),new Yw(e,n,0))}}function Wle(e){var n;this.f=y(ee(e,(Oe(),la)),15).a,this.d=y(ee(e,(sn(),eb)),15).a,this.a=this.f*y(ee(e,tc),15).a,this.b=this.f*y(ee(e,ape),15).a,y(ee(e,NI),15),this.c=y(ee(e,NI),15).a,this.e=y(ee(e,(Ke(),zv)),15).a,n=(wt(),xe(Ee(OF,1),nt,132,0,[ir,Nn,Hn,_r,Ds,ua])).length,this.g=fS(kx,[Xr,O_],[250,26],12,[n,n],2),Iy(this,ir,this.f),jo(this,ir,Nn,this.b),jo(this,ir,_r,this.b),jo(this,ir,Hn,this.c),jo(this,ir,Ds,this.b),jo(this,ir,ua,this.b),Iy(this,Nn,this.a),jo(this,Nn,_r,this.a),jo(this,Nn,Hn,this.c),jo(this,Nn,Ds,this.e),jo(this,Nn,ua,this.b),Iy(this,_r,this.a),jo(this,_r,Hn,this.c),jo(this,_r,Ds,this.e),jo(this,_r,ua,this.b),Iy(this,Hn,this.c),jo(this,Hn,Ds,this.c),jo(this,Hn,ua,this.c),Iy(this,Ds,this.e),jo(this,Ds,ua,this.e),Iy(this,ua,this.f)}function V4e(e,n){var s,f,d,b,m,x,S,R,N;if(Fh(Wr(n))!=1||y($w(Wr(n)),12).c.f.g!=(wt(),Nn))return null;for(s=y($w(Wr(n)),12),f=s.c.f,Ss(f,(wt(),ir)),Ae(f,(Oe(),ca),null),Ae(f,Xi,null),Ae(f,Q0,y(ee(n,Q0),15)),Ae(f,jl,(jn(),jn(),Ii)),Ae(f,Pt,ee(n,Pt)),f.j.b=n.j.b,b=ee(s.d,Pt),m=null,R=wr(f,(Ye(),vt)).mb();R.G();)if(x=y(R.H(),7),x.b.c.length!=0){Ae(x,Pt,b),N=s.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,Vn(x.c,N.c),N.c.c=Ge(yt,st,1,0,4,1),m=x;break}if(Ae(s.d,Pt,null),Fh(wr(n,vt))>1)for(S=xn(za(wr(n,vt)),0);S.b!=S.d.c;)x=y(vn(S),7),x.b.c.length==0?(d=new cr,an(d,vt),d.j.a=x.j.a,d.j.b=x.j.b,An(d,f),Ae(d,Pt,ee(x,Pt)),An(x,null)):An(m,f);return Ae(n,Pt,null),Ae(n,jl,er),Ss(n,ua),Ae(f,(Ke(),Nt),y(ee(n,Nt),28)),Ae(f,Da,y(ee(n,Da),86)),yf(e.b,0,f),f}function R_(e,n,s,f,d,b,m){var x,S,R,N,D,j;switch(D=s,R=new Ps(m),Ss(R,(wt(),Hn)),Ae(R,(Oe(),Z7),d),Ae(R,(Ke(),Nt),(rr(),Ti)),Ae(R,Jg,y(ee(e,Vf),15)),S=y(ee(e,Mc),10),!S&&(S=new Rt(d.a/2,d.b/2)),Ae(R,Mc,S),N=new cr,An(N,R),n!=yo&&n!=Il||(x=b!=(ur(),go)?b:_a,f>0?D=a_(x):D=iT(a_(x)),Ae(e,M0,D)),D.e){case 4:Ae(R,(sn(),Gr),(ma(),Bl)),Ae(R,AI,(Iv(),J0)),R.j.b=d.b,an(N,(Ye(),lt)),N.i.b=S.b;break;case 2:Ae(R,(sn(),Gr),(ma(),zc)),Ae(R,AI,(Iv(),lx)),R.j.b=d.b,an(N,(Ye(),vt)),N.i.b=S.b;break;case 1:Ae(R,Zu,(yu(),vd)),R.j.a=d.a,an(N,(Ye(),At)),N.i.a=S.a;break;case 3:Ae(R,Zu,(yu(),Zv)),R.j.a=d.a,an(N,(Ye(),Et)),N.i.a=S.a}if(n==Uv||n==Vo||n==Ti){switch(j=0,D.e){case 4:case 2:j=null.cd,n==Vo&&(j/=null.cd);break;case 1:case 3:j=null.cd,n==Vo&&(j/=null.cd)}Ae(R,Hc,j)}return Ae(R,ai,D),R}function U4e(e){var n,s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe;for(R=new ea,se=(Qn(),new ln),Cn(se,e,Kue(e)),f=(Mi(2,qf),new sa(2)),e.c&&tt(f,e.c),e.d&&tt(f,e.d),H=new W(f);H.a<H.c.c.length;)if(j=y(K(H),7),n=new pi,Na(n,kf(as((Or(),new mr(Cr(xe(Ee(yt,1),st,1,4,[j.b,j.e]))))))),Zy(n,e,!0),n.b!=0)for(fe=y(Oi(Di(se.d,e)),34),j==e.d?(z=fe[fe.length-1],ce=!0):(z=fe[0],ce=!1),S=1;S<fe.length;S++){for(ce?Z=fe[fe.length-1-S]:Z=fe[S],s=xn(n,0);s.b!=s.d.c;)N=y(vn(s),12),D=y(Oi(Di(se.d,N)),34),D==null&&(D=Kue(N),Oa(se.d,N,D)),D.length<=S?C5(s):(ce?ie=D[D.length-1-S]:ie=D[S],(Z.a!=ie.a||Z.b!=ie.b)&&(d=Z.a-z.a,m=Z.b-z.b,b=ie.a-z.a,x=ie.b-z.b,b*m==x*d&&RS(d)==RS(b)&&RS(m)==RS(x)?((d<=0?0-d:d)<(b<=0?0-b:b)||(m<=0?0-m:m)<(x<=0?0-x:x))&&Br(R,Z,R.c.b,R.c):S>1&&Br(R,z,R.c.b,R.c),C5(s)));z=Z}return R}function Y4e(e){var n,s,f,d,b,m,x,S,R,N,D,j,H,z,Z;for(e.n=y(ee(e.g,(Oe(),la)),15).a*y(ee(e.g,(sn(),eb)),15).a,e.e=e.n*y(ee(e.g,tc),15).a,e.i=e.g.c.c.length,x=e.i-1,j=0,e.j=0,e.k=0,e.a=Ww(Ge(cR,Xr,24,e.i,0,1)),e.b=Ww(Ge(r1,Xr,184,e.i,6,1)),m=new W(e.g.c);m.a<m.c.c.length;){for(d=y(K(m),16),d.k=x,D=new W(d.a);D.a<D.c.c.length;)N=y(K(D),9),N.k=j,++j;--x}for(e.f=Ge(gr,vr,26,j,12,1),e.c=fS(gr,[Xr,vr],[52,26],12,[j,3],2),e.o=new Xe,e.p=new Xe,n=0,e.d=0,b=new W(e.g.c);b.a<b.c.c.length;){for(d=y(K(b),16),x=d.k,f=0,Z=0,S=d.a.c.length,R=0,D=new W(d.a);D.a<D.c.c.length;)N=y(K(D),9),j=N.k,e.f[j]=N.d.k,R+=N.j.b+e.n,s=Fh(Wr(N)),z=Fh(qn(N)),e.c[j][0]=z-s,e.c[j][1]=s,e.c[j][2]=z,f+=s,Z+=z,s>0&&tt(e.p,N),tt(e.o,N);n-=f,H=S+n,R+=n*e.e,Sf(e.a,x,Mt(H)),Sf(e.b,x,R),e.j=Ei(e.j,H),e.k=rt(e.k,R),e.d+=n,n+=Z}}function Ye(){Ye=a;var e;Ar=new xy(ed,0),Et=new xy("NORTH",1),lt=new xy("EAST",2),At=new xy("SOUTH",3),vt=new xy("WEST",4),W_=(_n(),new Ah((e=y(ga(Qr),11),new Si(e,y(ta(e,e.length),11),0)))),Wv=Bo(dn(Et,xe(Ee(Qr,1),nt,32,0,[]))),Yv=Bo(dn(lt,xe(Ee(Qr,1),nt,32,0,[]))),Kv=Bo(dn(At,xe(Ee(Qr,1),nt,32,0,[]))),Xv=Bo(dn(vt,xe(Ee(Qr,1),nt,32,0,[]))),Uo=Bo(dn(Et,xe(Ee(Qr,1),nt,32,0,[At]))),Bc=Bo(dn(lt,xe(Ee(Qr,1),nt,32,0,[vt]))),od=Bo(dn(Et,xe(Ee(Qr,1),nt,32,0,[vt]))),Yf=Bo(dn(Et,xe(Ee(Qr,1),nt,32,0,[lt]))),Wf=Bo(dn(At,xe(Ee(Qr,1),nt,32,0,[vt]))),Uf=Bo(dn(lt,xe(Ee(Qr,1),nt,32,0,[At]))),bs=Bo(dn(Et,xe(Ee(Qr,1),nt,32,0,[lt,vt]))),Qa=Bo(dn(lt,xe(Ee(Qr,1),nt,32,0,[At,vt]))),ys=Bo(dn(Et,xe(Ee(Qr,1),nt,32,0,[At,vt]))),gs=Bo(dn(Et,xe(Ee(Qr,1),nt,32,0,[lt,At]))),fi=Bo(dn(Et,xe(Ee(Qr,1),nt,32,0,[lt,At,vt])))}function W4e(e){var n,s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at;for(_e=new Xe,j=new W(e.c);j.a<j.c.c.length;)for(D=y(K(j),16),Z=new W(D.a);Z.a<Z.c.c.length;)if(H=y(K(Z),9),H.g==(wt(),Hn)&&ee(H,(Oe(),gx))!=null){for(ie=null,ce=null,se=null,Je=new W(H.f);Je.a<Je.c.c.length;)switch(We=y(K(Je),7),We.g.e){case 4:ie=We;break;case 2:ce=We;break;default:se=We}for(fe=y(ht(se.e,0),12),S=new tS(fe.a),x=new hr(se.i),On(x,H.i),R=xn(S,0),By(R,x),Re=ZS(fe.a),N=new hr(se.i),On(N,H.i),Br(Re,N,Re.c.b,Re.c),Ve=y(ee(H,gx),9),at=y(ht(Ve.f,0),7),m=y(dr(ie.b,Ge(Ta,wa,12,0,0,1)),47),f=0,b=m.length;f<b;++f)n=m[f],Bn(n,at),eT(n.a,n.a.b,S);for(m=y(dr(ce.e,Ge(Ta,wa,12,ce.e.c.length,0,1)),47),s=0,d=m.length;s<d;++s)n=m[s],nr(n,at),eT(n.a,0,Re);nr(fe,null),Bn(fe,null),_e.c[_e.c.length]=H}for(z=new W(_e);z.a<z.c.c.length;)H=y(K(z),9),ei(H,null)}function K4e(){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,s){this.obj[n]=s},e.prototype[aR]=function(n){delete this.obj[n]},e.prototype.keys=function(){return Object.getOwnPropertyNames(this.obj)},e.prototype.entries=function(){var n=this.keys(),s=this,f=0;return{next:function(){if(f>=n.length)return{done:!0};var d=n[f++];return{value:[d,s.get(d)],done:!1}}}},H3e()||(e.prototype.createObject=function(){return{}},e.prototype.get=function(n){return this.obj[":"+n]},e.prototype.set=function(n,s){this.obj[":"+n]=s},e.prototype[aR]=function(n){delete this.obj[":"+n]},e.prototype.keys=function(){var n=[];for(var s in this.obj)s.charCodeAt(0)==58&&n.push(s.substring(1));return n}),e}function Kle(e,n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e;if(N=new A5,Ae(N,kF,n),Cn(e.e,n,N),Ae(N,(Oe(),th),s),e.d&&ice(e.d,N,!1),p_(n,N),eR in n.a&&(ie=N.a,se=y(Jn(n,eR),69),Z=y(Jn(se,"left"),104),Z&&(ie.b=Z.a),fe=y(Jn(se,"top"),104),fe&&(ie.d=fe.a),ce=y(Jn(se,"right"),104),ce&&(ie.c=ce.a),d=y(Jn(se,A6),104),d&&(ie.a=d.a)),D=(f=y(ga(q7),11),new Si(f,y(ta(f,f.length),11),0)),Ae(N,hi,D),e.g==null&&(e.g=Zt(ee(N,(ZB(),LF)))),jg in n.a){if(_e=Jn(n,jg),!_e.hc())throw new vu("The 'children' property of nodes must be an array.",_e,n);if(R=_e.hc(),R.a.length>0){for(s&&Ae(s,eh,N),x=Ge($r,oa,9,R.a.length,0,1),H=0;H<R.a.length;++H){if(S=dl(R,H),!S.kc())throw new vu("A 'children' array contains a non-object node element.",S,n);b=v4e(e,S.kc(),N),x[H]=b}for(j=0;j<R.a.length;++j)z=dl(R,j).kc(),m=x[j],jg in z.a&&!Kt(ze(Zt(ee(m,(Ke(),O0)))))&&Kle(e,z,m)}}return N}function X4e(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z;if(vf(new W(wl(e.e)))){for(x=new W(wl(e.e));x.a<x.c.c.length;)switch(m=y(K(x),161),R=y(m.e,7).g.e,++e.o[R],y(m.e,7).g.e){case 4:case 2:e.n[R]+=m.e.j.b+(n?(f=y(m.e,7).d,new Mo(f.d,f.b,f.a,f.c)).a+(d=y(m.e,7).d,new Mo(d.d,d.b,d.a,d.c)).d:0);break;case 1:case 3:e.n[R]+=m.e.j.a+(n?(b=y(m.e,7).d,new Mo(b.d,b.b,b.a,b.c)).b+(s=y(m.e,7).d,new Mo(s.d,s.b,s.a,s.c)).c:0)}for(S=y(Er(e.e,(Ke(),ER)),100),S=S==(ml(),sd)?Tu:S,e.g[1]=y(Er(e.e,SR),100),e.g[3]=y(Er(e.e,TR),100),e.g[4]=y(Er(e.e,RR),100),e.g[2]=y(Er(e.e,kR),100),D=(Ye(),xe(Ee(Qr,1),nt,32,0,[Ar,Et,lt,At,vt])),H=0,Z=D.length;H<Z;++H)R=D[H],e.g[R.e]=e.g[R.e]==sd?S:e.g[R.e];for(e.b=Er(e.e,A0)!=null,N=xe(Ee(Qr,1),nt,32,0,[Ar,Et,lt,At,vt]),j=0,z=N.length;j<z;++j)R=N[j],e.o[R.e]==1?e.i[R.e]=2:!e.b&&e.g[R.e]==Tu?e.i[R.e]=e.o[R.e]+1:e.i[R.e]=e.o[R.e]-1}}function J4e(e,n,s,f,d,b){var m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re;if(S=y(e.a,16),Z=y(e.b,16),R=y(n.a,18),ie=y(n.b,18),S)for(D=new W(S.a);D.a<D.c.c.length;)for(N=y(K(D),9),fe=wr(N,(Ye(),lt)).mb();fe.G();)for(ce=y(fe.H(),7),R.ib(ce),x=new W(ce.e);x.a<x.c.c.length;)m=y(K(x),12),!Rf(m)&&(s.c[s.c.length]=m,Toe(m,f),se=m.c.f.g,(se==(wt(),ir)||se==_r)&&(d.c[d.c.length]=m),Re=m.d,_e=Re.f.d,_e==Z?ie.ib(Re):_e==S?R.ib(Re):Vr(s,m));if(Z)for(D=new W(Z.a);D.a<D.c.c.length;){for(N=y(K(D),9),z=new W(N.f);z.a<z.c.c.length;)for(H=y(K(z),7),x=new W(H.e);x.a<x.c.c.length;)m=y(K(x),12),Rf(m)&&(j=b.a.db(m,b),j==null);for(fe=wr(N,(Ye(),vt)).mb();fe.G();)for(ce=y(fe.H(),7),ie.ib(ce),x=new W(ce.e);x.a<x.c.c.length;)m=y(K(x),12),!Rf(m)&&(s.c[s.c.length]=m,Toe(m,f),se=m.c.f.g,(se==(wt(),ir)||se==_r)&&(d.c[d.c.length]=m),Re=m.d,_e=Re.f.d,_e==Z?ie.ib(Re):_e==S?R.ib(Re):Vr(s,m))}}function Q4e(e,n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve;for(fe=n.c.length,d=new Mf(e.b,s,null,null),Ve=Ge(Ra,Ui,26,fe,12,1),Z=Ge(Ra,Ui,26,fe,12,1),z=Ge(Ra,Ui,26,fe,12,1),ie=0,x=0;x<fe;x++)Z[x]=Fr,z[x]=Uu;for(S=0;S<fe;S++)for(f=(Gn(S,n.c.length),y(n.c[S],81)),Ve[S]=LT(f),Ve[ie]>Ve[S]&&(ie=S),D=new W(e.b.c);D.a<D.c.c.length;)for(N=y(K(D),16),ce=new W(N.a);ce.a<ce.c.c.length;)se=y(K(ce),9),We=ze(f.n[se.k])+ze(f.d[se.k]),Z[S]=Z[S]<We?Z[S]:We,z[S]=rt(z[S],We+se.j.b);for(Je=Ge(Ra,Ui,26,fe,12,1),R=0;R<fe;R++)(Gn(R,n.c.length),y(n.c[R],81)).k==(Ys(),qc)?Je[R]=Z[ie]-Z[R]:Je[R]=z[ie]-z[R];for(b=Ge(Ra,Ui,26,fe,12,1),H=new W(e.b.c);H.a<H.c.c.length;)for(j=y(K(H),16),Re=new W(j.a);Re.a<Re.c.c.length;){for(_e=y(K(Re),9),m=0;m<fe;m++)b[m]=ze((Gn(m,n.c.length),y(n.c[m],81)).n[_e.k])+ze((Gn(m,n.c.length),y(n.c[m],81)).d[_e.k])+Je[m];ePe(b),d.n[_e.k]=(b[1]+b[2])/2,d.d[_e.k]=0}return d}function GT(e,n,s,f,d,b){var m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re;for(Z=null,s==(Ef(),Qu)?Z=e:s==fd&&(Z=n),se=(j=new pn(Z.a).a.bb().mb(),new mn(j));se.a.G();){for(ie=(N=y(se.a.H(),21),y(N.yb(),7)),ce=Pn(xe(Ee(un,1),on,10,0,[ie.f.i,ie.i,ie.a])).b,Re=new ci,m=new ci,S=Xt(as((Or(),new mr(Cr(xe(Ee(yt,1),st,1,4,[ie.b,ie.e]))))));Vt(S);)if(x=y(Gt(S),12),Kt(ze(Zt(ee(x,(Oe(),ec)))))==f&&aa(d,x,0)!=-1){if(x.d==ie?fe=x.c:fe=x.d,_e=Pn(xe(Ee(un,1),on,10,0,[fe.f.i,fe.i,fe.a])).b,(_e-ce<=0?0-(_e-ce):_e-ce)<.2)continue;_e<ce?e.a.R(fe)?Dn(Re,new jr(Qu,x)):Dn(Re,new jr(fd,x)):e.a.R(fe)?Dn(m,new jr(Qu,x)):Dn(m,new jr(fd,x))}if(Re.a.Y()>1)for(tt(b,new s6(ie,Re,s)),z=(D=new pn(Re.a).a.bb().mb(),new mn(D));z.a.G();)H=(R=y(z.a.H(),21),y(R.yb(),27)),Vr(d,H.b);if(m.a.Y()>1)for(tt(b,new s6(ie,m,s)),z=(D=new pn(m.a).a.bb().mb(),new mn(D));z.a.G();)H=(R=y(z.a.H(),21),y(R.yb(),27)),Vr(d,H.b)}}function Z4e(e){var n,s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je;for(d=0,ce=0,se=(Qn(),new ln),f=new ln,b=new ln,Je=new ln,$4e(e,b,Je),n=null,ie=0,We=0,fe=!0,S=!0,j=0,z=e.length;j<z;++j){for(N=e[j],Re=new W(N.f);Re.a<Re.c.c.length;)switch(_e=y(K(Re),7),_e.g.e){case 2:d+=Uce(_e,b);break;case 4:d+=Uce(_e,Je)}if(Z=N.g,S&&(Z==(wt(),ir)||Z==_r)){if(R=y(ee(N,(Oe(),Zf)),9),!R){S=!1;continue}n!=R&&(n&&Cn(se,n,new jr(Mt(ie),Mt(We))),n=R,ie=0,We=0,fe=!0),N==n&&(fe=!1),fe?(ie+=y(ee(N,Xg),24).a,Cn(f,N,Mt(ie))):(We+=y(ee(N,Xg),24).a,Cn(f,N,Mt(We)))}}if(n&&Cn(se,n,new jr(Mt(ie),Mt(We))),S)for(x=null,m=0,s=0,fe=!0,D=0,H=e.length;D<H;++D)switch(N=e[D],Z=N.g,Z.e){case 0:m=y(Oi(Di(f.d,N)),24).a,s=y(y(Oi(Di(se.d,N)),27).b,24).a,x=N,fe=!1;break;case 3:m=y(Oi(Di(f.d,N)),24).a,R=y(ee(N,(Oe(),Zf)),9),R!=x&&(s=y(y(Oi(Di(se.d,R)),27).a,24).a,x=R,fe=!0);break;default:ce+=fe?m:s-m}return d+ce}function eBe(e){var n,s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe;for(D=(Qn(),new ln),R=new Ey,f=new W(e.a.a.b);f.a<f.c.c.length;)if(n=y(K(f),25),Qe(n,93))N=y(n,93).b,Oa(D.d,N,n);else if(Qe(n,82))for(b=(z=new pn(y(n,82).d.a).a.bb().mb(),new mn(z));b.a.G();)d=(m=y(b.a.H(),21),y(m.yb(),12)),Bt(R,d,n);for(s=new W(e.a.a.b);s.a<s.c.c.length;)if(n=y(K(s),25),Qe(n,93)){for(N=y(n,93).b,S=Xt(qn(N));Vt(S);)if(x=y(Gt(S),12),!Rf(x)&&(ie=x.c,fe=x.d,!((Ye(),Uo).kb(x.c.g)&&Uo.kb(x.d.g)))){if(se=y(bn(D,x.d.f),25),Ov(sv(uv(cv(ov(new Ih,0),100),e.c[n.f.d]),e.c[se.f.d])),ie.g==vt&&fie((Ua(),ie))){for(H=y(ds(R,x),18).mb();H.G();)if(j=y(H.H(),25),j.j.d<n.j.d){if(Z=e.c[j.f.d],ce=e.c[n.f.d],Z==ce)continue;Ov(sv(uv(cv(ov(new Ih,1),100),Z),ce))}}if(fe.g==lt&&lie((Ua(),fe))){for(H=y(ds(R,x),18).mb();H.G();)if(j=y(H.H(),25),j.j.d>n.j.d){if(Z=e.c[n.f.d],ce=e.c[j.f.d],Z==ce)continue;Ov(sv(uv(cv(ov(new Ih,1),100),Z),ce))}}}}}function Xle(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z;switch(m=new Oie(e),x=kf(co(n,m)),Cs(x,new VE),d=e.b,d.c){case 2:S=new Xp(d.a),s=dg(co(x,S)),vl(s)?R=y(Vh(s),91).b:R=15,S=new Xp(cq(d)),s=dg(co(x,S)),vl(s)?b=y(Vh(s),91).b:b=15,S=new Xp(d.b),s=dg(co(x,S)),vl(s)?N=y(Vh(s),91).b:N=15,f=t3e(e,R,b,N),Dn(n,new Ag(f,e.c,e.e,e.a.c.f,d.a)),Dn(n,new Ag(f,e.c,e.e,e.a.c.f,cq(d))),Dn(n,new Ag(f,e.c,e.e,e.a.c.f,d.b));break;case 1:S=new Xp(d.a),s=dg(co(x,S)),vl(s)?R=y(Vh(s),91).b:R=15,S=new Xp(d.b),s=dg(co(x,S)),vl(s)?N=y(Vh(s),91).b:N=15,f=WMe(e,R,N),Dn(n,new Ag(f,e.c,e.e,e.a.c.f,d.a)),Dn(n,new Ag(f,e.c,e.e,e.a.c.f,d.b));break;case 0:S=new Xp(d.a),s=dg(co(x,S)),vl(s)?R=y(Vh(s),91).b:R=15,f=(D=e.b,j=nje(e.a.c,e.a.d,R),Na(e.a.a,dT(j)),H=Eq(e.a.b,j.a,D),z=new zy((!j.k&&(j.k=new ET(YS(j))),j.k)),e5(z),H?WB(z,H):z),Dn(n,new Ag(f,e.c,e.e,e.a.c.f,d.a));break;default:throw new Rn("The loopside must be defined.")}return f}function tBe(e,n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re;for(x=new W(e.a.c);x.a<x.c.c.length;)for(b=y(K(x),16),fe=new W(b.a);fe.a<fe.c.c.length;)ce=y(K(fe),9),n.f[ce.k]=ce,n.a[ce.k]=ce,n.d[ce.k]=0;for(S=e.a.c,n.c==(fo(),Ru)&&(S=Qe(S,87)?bg(y(S,87)):Qe(S,88)?y(S,88).a:Qe(S,63)?new gy(S):new ag(S)),m=S.mb();m.G();)for(b=y(m.H(),16),H=-1,j=b.a,n.k==(Ys(),Ms)&&(H=Fr,j=Qe(j,87)?bg(y(j,87)):Qe(j,88)?y(j,88).a:Qe(j,63)?new gy(j):new ag(j)),Re=j.mb();Re.G();)if(_e=y(Re.H(),9),n.c==Ru?D=y(ht(e.b.f,_e.k),20):D=y(ht(e.b.b,_e.k),20),D.Y()>0)if(f=D.Y(),R=yr(Math.floor((f+1)/2))-1,d=yr(Math.ceil((f+1)/2))-1,n.k==Ms)for(N=d;N>=R;N--)n.a[_e.k]==_e&&(Z=y(D.sb(N),27),z=y(Z.a,9),!ff(s,Z.b)&&H>e.b.e[z.k]&&(n.a[z.k]=_e,n.f[_e.k]=n.f[z.k],n.a[_e.k]=n.f[_e.k],H=e.b.e[z.k]));else for(N=R;N<=d;N++)n.a[_e.k]==_e&&(se=y(D.sb(N),27),ie=y(se.a,9),!ff(s,se.b)&&H<e.b.e[ie.k]&&(n.a[ie.k]=_e,n.f[_e.k]=n.f[ie.k],n.a[_e.k]=n.f[_e.k],H=e.b.e[ie.k]))}function Vi(){Vi=a,Iu=new gu("N",0,(Ye(),Et),Et,0),Nl=new gu("EN",1,lt,Et,1),Fc=new gu("E",2,lt,lt,0),$c=new gu("SE",3,At,lt,1),Ko=new gu("S",4,At,At,0),Ml=new gu("WS",5,vt,At,1),Dl=new gu("W",6,vt,vt,0),mo=new gu("NW",7,Et,vt,1),Wo=new gu("ENW",8,lt,vt,2),Ol=new gu("ESW",9,lt,vt,2),Gc=new gu("SEN",10,At,Et,2),Qf=new gu("SWN",11,At,Et,2),ld=new gu(ed,12,Ar,Ar,3),kve=eDe(Iu,Nl,Fc,$c,Ko,Ml,xe(Ee(Ug,1),nt,60,0,[Dl,mo,Wo,Ol,Gc,Qf])),Tve=(os(),jf(xe(Ee(yt,1),st,1,4,[Iu,Fc,Ko,Dl]))),Sve=jf(xe(Ee(yt,1),st,1,4,[Nl,$c,Ml,mo])),Pve=new sl(Et),Ive=jf(xe(Ee(yt,1),st,1,4,[lt,Et])),Rve=new sl(lt),Ove=jf(xe(Ee(yt,1),st,1,4,[At,lt])),Nve=new sl(At),qve=jf(xe(Ee(yt,1),st,1,4,[vt,At])),Bve=new sl(vt),Lve=jf(xe(Ee(yt,1),st,1,4,[Et,vt])),Cve=jf(xe(Ee(yt,1),st,1,4,[lt,Et,vt])),Ave=jf(xe(Ee(yt,1),st,1,4,[lt,At,vt])),Mve=jf(xe(Ee(yt,1),st,1,4,[At,vt,Et])),Dve=jf(xe(Ee(yt,1),st,1,4,[At,lt,Et])),jve=(_v(),Fg)}function Jle(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e;if(ce=0,n.e.a==0)for(ie=new W(e);ie.a<ie.c.c.length;)z=y(K(ie),9),ce=rt(ce,z.i.a+z.j.a+z.e.c);else ce=n.e.a-n.d.a;for(ce-=n.d.a,Z=new W(e);Z.a<Z.c.c.length;){switch(z=y(K(Z),9),hy(z.i,ce-z.j.a),tDe(z),y(ee(z,(Ke(),Xs)),103).e){case 1:Ae(z,Xs,(Fo(),U_));break;case 2:Ae(z,Xs,(Fo(),V_))}for(se=z.j,_e=new W(z.f);_e.a<_e.c.c.length;){for(fe=y(K(_e),7),hy(fe.i,se.a-fe.j.a),hy(fe.a,fe.j.a),an(fe,ioe(fe.g)),m=y(ee(fe,jc),24),m&&Ae(fe,jc,Mt(-m.a)),b=new W(fe.e);b.a<b.c.c.length;){for(d=y(K(b),12),f=xn(d.a,0);f.b!=f.d.c;)s=y(vn(f),10),s.a=ce-s.a;if(R=y(ee(d,pr),44),R)for(S=xn(R,0);S.b!=S.d.c;)x=y(vn(S),10),x.a=ce-x.a;for(j=new W(d.b);j.a<j.c.c.length;)N=y(K(j),33),hy(N.i,ce-N.j.a)}for(H=new W(fe.c);H.a<H.c.c.length;)N=y(K(H),33),hy(N.i,-N.j.a)}for(z.g==(wt(),Hn)&&(Ae(z,(Oe(),ai),ioe(y(ee(z,ai),32))),uMe(z)),D=new W(z.c);D.a<D.c.c.length;)N=y(K(D),33),hy(N.i,se.a-N.j.a)}}function nBe(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e;if(ce=0,n.e.b==0)for(ie=new W(e);ie.a<ie.c.c.length;)z=y(K(ie),9),ce=rt(ce,z.i.b+z.j.b+z.e.a);else ce=n.e.b-n.d.b;for(ce-=n.d.b,Z=new W(e);Z.a<Z.c.c.length;){switch(z=y(K(Z),9),dy(z.i,ce-z.j.b),nDe(z),y(ee(z,(Ke(),Xs)),103).e){case 3:Ae(z,Xs,(Fo(),H_));break;case 4:Ae(z,Xs,(Fo(),Y_))}for(se=z.j,_e=new W(z.f);_e.a<_e.c.c.length;){for(fe=y(K(_e),7),dy(fe.i,se.b-fe.j.b),dy(fe.a,fe.j.b),an(fe,aoe(fe.g)),m=y(ee(fe,jc),24),m&&Ae(fe,jc,Mt(-m.a)),b=new W(fe.e);b.a<b.c.c.length;){for(d=y(K(b),12),f=xn(d.a,0);f.b!=f.d.c;)s=y(vn(f),10),s.b=ce-s.b;if(R=y(ee(d,pr),44),R)for(S=xn(R,0);S.b!=S.d.c;)x=y(vn(S),10),x.b=ce-x.b;for(j=new W(d.b);j.a<j.c.c.length;)N=y(K(j),33),dy(N.i,ce-N.j.b)}for(H=new W(fe.c);H.a<H.c.c.length;)N=y(K(H),33),dy(N.i,-N.j.b)}for(z.g==(wt(),Hn)&&(Ae(z,(Oe(),ai),aoe(y(ee(z,ai),32))),SOe(z)),D=new W(z.c);D.a<D.c.c.length;)N=y(K(D),33),dy(N.i,se.b-N.j.b)}}function rBe(e,n,s){var f,d,b,m,x,S,R,N,D,j,H;if(f=new Is(n.e.i.a,n.e.i.b,n.e.j.a,n.e.j.b),d=new Ok,e.c)for(m=new W(r0(n));m.a<m.c.c.length;)b=y(K(m),129),d.d=b.e.i.a+n.e.i.a,d.e=b.e.i.b+n.e.i.b,d.c=b.e.j.a,d.b=b.e.j.b,a0(f,d);for(N=new W(wl(n));N.a<N.c.c.length;){if(R=y(K(N),161),D=R.e.i.a+n.e.i.a,j=R.e.i.b+n.e.i.b,e.e&&(d.d=D,d.e=j,d.c=R.e.j.a,d.b=R.e.j.b,a0(f,d)),e.d)for(m=new W(i0(R));m.a<m.c.c.length;)b=y(K(m),129),d.d=b.e.i.a+D,d.e=b.e.i.b+j,d.c=b.e.j.a,d.b=b.e.j.b,a0(f,d);if(e.b){if(H=new Rt(-s,-s),ft(Er(n,(Ke(),D0)))===ft((Rv(),q0)))for(m=new W(i0(R));m.a<m.c.c.length;)b=y(K(m),129),H.a+=b.e.j.a+s,H.b+=b.e.j.b+s;H.a=rt(H.a,0),H.b=rt(H.b,0),_le(f,P3e(R),A3e(R),n,R,H,s)}}e.b&&_le(f,(_n(),_n(),ql),ql,n,null,null,s),S=new xB((x=y(n.e,9).e,new Mo(x.d,x.b,x.a,x.c))),S.d=n.e.i.b-f.e,S.a=f.e+f.b-(n.e.i.b+n.e.j.b),S.b=n.e.i.a-f.d,S.c=f.d+f.c-(n.e.i.a+n.e.j.a),y(n.e,9).e.b=S.b,y(n.e,9).e.d=S.d,y(n.e,9).e.c=S.c,y(n.e,9).e.a=S.a}function Qle(){Qle=a,Ht=new Ey,Bt(Ht,(Ye(),W_),fi),Bt(Ht,Xv,ys),Bt(Ht,Xv,fi),Bt(Ht,Yv,gs),Bt(Ht,Yv,fi),Bt(Ht,Wv,bs),Bt(Ht,Wv,fi),Bt(Ht,Kv,Qa),Bt(Ht,Kv,fi),Bt(Ht,Uo,Bc),Bt(Ht,Uo,bs),Bt(Ht,Uo,Qa),Bt(Ht,Uo,fi),Bt(Ht,Bc,Uo),Bt(Ht,Bc,ys),Bt(Ht,Bc,gs),Bt(Ht,Bc,fi),Bt(Ht,od,od),Bt(Ht,od,bs),Bt(Ht,od,ys),Bt(Ht,Yf,Yf),Bt(Ht,Yf,bs),Bt(Ht,Yf,gs),Bt(Ht,Wf,Wf),Bt(Ht,Wf,Qa),Bt(Ht,Wf,ys),Bt(Ht,Uf,Uf),Bt(Ht,Uf,Qa),Bt(Ht,Uf,gs),Bt(Ht,bs,Wv),Bt(Ht,bs,Uo),Bt(Ht,bs,od),Bt(Ht,bs,Yf),Bt(Ht,bs,bs),Bt(Ht,bs,ys),Bt(Ht,bs,gs),Bt(Ht,bs,fi),Bt(Ht,Qa,Kv),Bt(Ht,Qa,Uo),Bt(Ht,Qa,Wf),Bt(Ht,Qa,Uf),Bt(Ht,Qa,Qa),Bt(Ht,Qa,ys),Bt(Ht,Qa,gs),Bt(Ht,Qa,fi),Bt(Ht,ys,Xv),Bt(Ht,ys,Bc),Bt(Ht,ys,od),Bt(Ht,ys,Wf),Bt(Ht,ys,bs),Bt(Ht,ys,Qa),Bt(Ht,ys,ys),Bt(Ht,ys,fi),Bt(Ht,gs,Yv),Bt(Ht,gs,Bc),Bt(Ht,gs,Yf),Bt(Ht,gs,Uf),Bt(Ht,gs,bs),Bt(Ht,gs,Qa),Bt(Ht,gs,gs),Bt(Ht,gs,fi),Bt(Ht,fi,W_),Bt(Ht,fi,Xv),Bt(Ht,fi,Yv),Bt(Ht,fi,Wv),Bt(Ht,fi,Kv),Bt(Ht,fi,Uo),Bt(Ht,fi,Bc),Bt(Ht,fi,bs),Bt(Ht,fi,Qa),Bt(Ht,fi,ys),Bt(Ht,fi,gs),Bt(Ht,fi,fi)}function Zle(e,n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se;if(s.n[n.k]==null){S=!0,s.n[n.k]=0,m=n,se=s.k==(Ys(),qc)?ii:Wi;do d=e.b.e[m.k],b=m.d.a.c.length,x=m.g,s.k==qc&&d>0||s.k==Ms&&d<b-1?(s.k==Ms?R=y(ht(m.d.a,d+1),9):R=y(ht(m.d.a,d-1),9),D=s.f[R.k],N=R.g,Zle(e,D,s),se=e.e.Ic(se,n,m),s.i[n.k]==n&&(s.i[n.k]=s.i[D.k]),s.i[n.k]==s.i[D.k]?(ie=iS(e.d,x,N),s.k==Ms?(f=ze(s.n[n.k]),H=ze(s.n[D.k])+ze(s.d[R.k])-R.e.d-ie-m.e.a-m.j.b-ze(s.d[m.k]),S?(S=!1,s.n[n.k]=H<se?H:se):s.n[n.k]=f<(H<se?H:se)?f:H<se?H:se):(f=ze(s.n[n.k]),H=ze(s.n[D.k])+ze(s.d[R.k])+R.j.b+R.e.a+ie+m.e.d-ze(s.d[m.k]),S?(S=!1,s.n[n.k]=H>se?H:se):s.n[n.k]=f>(H>se?H:se)?f:H>se?H:se)):(ie=e.d.f,Z=coe(e,s.i[n.k]),j=coe(e,s.i[D.k]),s.k==Ms?(z=ze(s.n[n.k])+ze(s.d[m.k])+m.j.b+m.e.a+ie-(ze(s.n[D.k])+ze(s.d[R.k])-R.e.d),Hae(Z,j,z)):(z=ze(s.n[n.k])+ze(s.d[m.k])-m.e.d-ze(s.n[D.k])-ze(s.d[R.k])-R.j.b-R.e.a-ie,Hae(Z,j,z)))):se=e.e.Ic(se,n,m),m=s.a[m.k];while(m!=n);_Ce(e.e,n)}}function iBe(e,n,s,f){var d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce;if(j=!1,D=!1,hu(y(ee(f,(Ke(),Nt)),28))){m=!1,x=!1;e:for(z=new W(f.f);z.a<z.c.c.length;)for(H=y(K(z),7),ie=Xt(as((Or(),new mr(Cr(xe(Ee(yt,1),st,1,4,[new Kp(H),new Zd(H)]))))));Vt(ie);)if(Z=y(Gt(ie),7),!Kt(ze(Zt(ee(Z.f,$g))))){if(H.g==(Ye(),Et)){m=!0;break e}if(H.g==At){x=!0;break e}}j=x&&!m,D=m&&!x}if(!j&&!D&&f.c.c.length!=0){for(N=0,R=new W(f.c);R.a<R.c.c.length;)S=y(K(R),33),N+=S.i.b+S.j.b/2;N/=f.c.c.length,ce=N>=f.j.b/2}else ce=!D;ce?(se=y(ee(f,(Oe(),Qg)),20),se?j?b=se:(d=y(ee(f,Kg),20),d?se.Y()<=d.Y()?b=se:b=d:(b=new Xe,Ae(f,Kg,b))):(b=new Xe,Ae(f,Qg,b))):(d=y(ee(f,(Oe(),Kg)),20),d?D?b=d:(se=y(ee(f,Qg),20),se?d.Y()<=se.Y()?b=d:b=se:(b=new Xe,Ae(f,Qg,b))):(b=new Xe,Ae(f,Kg,b))),b.ib(e),Ae(e,(Oe(),px),s),n.d==s?(Bn(n,null),s.b.c.length+s.e.c.length==0&&An(s,null)):(nr(n,null),s.b.c.length+s.e.c.length==0&&An(s,null)),Fu(n.a)}function aBe(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe;for(s=new Oue(n),s.a||K3e(n),R=E3e(n),S=new Ey,ie=new ele,Z=new W(n.b);Z.a<Z.c.c.length;)for(z=y(K(Z),9),d=Xt(qn(z));Vt(d);)f=y(Gt(d),12),(f.c.f.g==(wt(),Hn)||f.d.f.g==Hn)&&(N=x4e(e,f,R,ie),Bt(S,pT(N.d),N.a));for(m=new Xe,fe=y(ee(s.c,(Oe(),pd)),18).mb();fe.G();){switch(ce=y(fe.H(),32),H=ie.c[ce.e],j=ie.b[ce.e],x=ie.a[ce.e],b=null,se=null,ce.e){case 4:b=new Is(e.d.a,H,R.b.a-e.d.a,j-H),se=new Is(e.d.a,H,x,j-H),Tc(R,new Rt(b.d+b.c,b.e)),Tc(R,new Rt(b.d+b.c,b.e+b.b));break;case 2:b=new Is(R.a.a,H,e.c.a-R.a.a,j-H),se=new Is(e.c.a-x,H,x,j-H),Tc(R,new Rt(b.d,b.e)),Tc(R,new Rt(b.d,b.e+b.b));break;case 1:b=new Is(H,e.d.b,j-H,R.b.b-e.d.b),se=new Is(H,e.d.b,j-H,x),Tc(R,new Rt(b.d,b.e+b.b)),Tc(R,new Rt(b.d+b.c,b.e+b.b));break;case 3:b=new Is(H,R.a.b,j-H,e.c.b-R.a.b),se=new Is(H,e.c.b-x,j-H,x),Tc(R,new Rt(b.d,b.e)),Tc(R,new Rt(b.d+b.c,b.e))}b&&(D=new Cte,D.d=ce,D.b=b,D.c=se,D.a=KB(y(ds(S,pT(ce)),18)),m.c[m.c.length]=D)}return Vn(s.b,m),s.d=uOe(u4e(R)),s}function sBe(){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 oBe(e){var n,s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We;for(n=0,se=!0,We=null,f=0;f<e.length;f++)if(b=e[f],ie=b.g,ie==(wt(),ir))We=b,se=!1;else if(ie==_r){if(Qe(ee(b,(Oe(),Pt)),12)||(s=y(ee(b,Pt),9),We!=s&&(We=s,se=!0),!Gi(y(ee(s,(Ke(),Nt)),28))))continue;for(j=null,z=null,fe=new W(b.f);fe.a<fe.c.c.length;)ce=y(K(fe),7),ce.b.c.length==0?ce.e.c.length==0||(z=y(ee(ce,Pt),7)):j=y(ee(ce,Pt),7);for(d=f+1;d<e.length&&(m=e[d],D=m.g,D!=ir);d++)if(D==_r){if(ft(ee(m,Pt))!==ft(s))break;for(x=null,R=null,Re=new W(m.f);Re.a<Re.c.c.length;)_e=y(K(Re),7),_e.b.c.length==0?_e.e.c.length==0||(R=y(ee(_e,Pt),7)):x=y(ee(_e,Pt),7);se?(H=!1,Z=!1,z&&x&&z.k<x.k&&(++n,Z=!0),j&&R&&j.k>R.k&&(++n,H=!0),z&&R&&z.k>R.k&&(++n,Z=!0),j&&x&&j.k<x.k&&(++n,H=!0),H&&Z&&j==z&&--n):(S=!1,N=!1,j&&R&&j.k<R.k&&(++n,N=!0),z&&x&&z.k>x.k&&(++n,S=!0),j&&x&&j.k<x.k&&(++n,S=!0),z&&R&&z.k>R.k&&(++n,N=!0),S&&N&&x==R&&--n)}}return n}function uBe(e){var n,s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at,gt;for(fe=e.a,_e=0,Re=fe.length;_e<Re;++_e){for(ce=fe[_e],R=Fr,N=Fr,z=new W(ce.f);z.a<z.c.c.length;)j=y(K(z),9),m=j.d?aa(j.d.a,j,0):-1,m>0?(D=y(ht(j.d.a,m-1),9),Ve=My(e.b,j,D),ie=j.i.b-j.e.d-(D.i.b+D.j.b+D.e.a+Ve)):ie=j.i.b-j.e.d,R=ie<R?ie:R,m<j.d.a.c.length-1?(D=y(ht(j.d.a,m+1),9),Ve=My(e.b,j,D),se=D.i.b-D.e.d-(j.i.b+j.j.b+j.e.a+Ve)):se=2*j.i.b,N=se<N?se:N;for(S=Fr,b=!1,d=y(ht(ce.f,0),9),gt=new W(d.f);gt.a<gt.c.c.length;)for(at=y(K(gt),7),Z=d.i.b+at.i.b+at.a.b,f=new W(at.b);f.a<f.c.c.length;)s=y(K(f),12),We=s.c,n=We.f.i.b+We.i.b+We.a.b-Z,(n<=0?0-n:n)<(S<=0?0-S:S)&&(n<=0?0-n:n)<(n<0?R:N)&&(S=n,b=!0);for(x=y(ht(ce.f,ce.f.c.length-1),9),Je=new W(x.f);Je.a<Je.c.c.length;)for(We=y(K(Je),7),Z=x.i.b+We.i.b+We.a.b,f=new W(We.e);f.a<f.c.c.length;)s=y(K(f),12),at=s.d,n=at.f.i.b+at.i.b+at.a.b-Z,(n<=0?0-n:n)<(S<=0?0-S:S)&&(n<=0?0-n:n)<(n<0?R:N)&&(S=n,b=!0);if(b&&S!=0)for(H=new W(ce.f);H.a<H.c.c.length;)j=y(K(H),9),j.i.b+=S}}function cBe(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at,gt;return D=ije(Zr(e,(Ye(),W_)),n),z=Cf(Zr(e,Wv),n),_e=Cf(Zr(e,Kv),n),Ve=f_(Zr(e,Xv),n),j=f_(Zr(e,Yv),n),ce=Cf(Zr(e,od),n),Z=Cf(Zr(e,Yf),n),We=Cf(Zr(e,Wf),n),Re=Cf(Zr(e,Uf),n),at=f_(Zr(e,Bc),n),se=Cf(Zr(e,Uo),n),fe=Cf(Zr(e,bs),n),Je=Cf(Zr(e,Qa),n),gt=f_(Zr(e,ys),n),H=f_(Zr(e,gs),n),ie=Cf(Zr(e,fi),n),s=Tv(xe(Ee(Ra,1),Ui,26,12,[ce.a,Ve.a,We.a,gt.a])),f=Tv(xe(Ee(Ra,1),Ui,26,12,[z.a,D.a,_e.a,ie.a])),d=se.a,b=Tv(xe(Ee(Ra,1),Ui,26,12,[Z.a,j.a,Re.a,H.a])),R=Tv(xe(Ee(Ra,1),Ui,26,12,[ce.b,z.b,Z.b,fe.b])),S=Tv(xe(Ee(Ra,1),Ui,26,12,[Ve.b,D.b,j.b,ie.b])),N=at.b,x=Tv(xe(Ee(Ra,1),Ui,26,12,[We.b,_e.b,Re.b,Je.b])),bu(Zr(e,W_),s+d,R+N),bu(Zr(e,fi),s+d,R+N),bu(Zr(e,Wv),s+d,0),bu(Zr(e,Kv),s+d,R+N+S),bu(Zr(e,Xv),0,R+N),bu(Zr(e,Yv),s+d+f,R+N),bu(Zr(e,Yf),s+d+f,0),bu(Zr(e,Wf),0,R+N+S),bu(Zr(e,Uf),s+d+f,R+N+S),bu(Zr(e,Bc),0,R),bu(Zr(e,Uo),s,0),bu(Zr(e,Qa),0,R+N+S),bu(Zr(e,gs),s+d+f,0),m=new li,m.a=Tv(xe(Ee(Ra,1),Ui,26,12,[s+f+d+b,at.a,fe.a,Je.a])),m.b=Tv(xe(Ee(Ra,1),Ui,26,12,[R+S+N+x,se.b,gt.b,H.b])),m}function lBe(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z;if(f=new ea,R=null,z=e.c,H=z.f.g,H!=(wt(),ir)&&H!=_r)throw new Rn("The target node of the edge must be a normal node or a northSouthPort.");for(H==_r&&(j=y(ee(z,(Oe(),Pt)),7),R=new Rt(Pn(xe(Ee(un,1),on,10,0,[j.f.i,j.i,j.a])).a,Pn(xe(Ee(un,1),on,10,0,[z.f.i,z.i,z.a])).b),z=j),Ek(f,Pn(xe(Ee(un,1),on,10,0,[z.f.i,z.i,z.a]))),m=rt(5,hue(z.f,z.g)),D=new _f(Tg(z.g)),D.a*=m,D.b*=m,kn(f,On(D,Pn(xe(Ee(un,1),on,10,0,[z.f.i,z.i,z.a])))),R&&Br(f,R,f.c.b,f.c),b=e,S=e,x=null,s=!1;b;)d=b.a,d.b!=0&&(s?(kn(f,Oo(On(x,(Ct(d.b!=0),y(d.a.a.c,10))),.5)),s=!1):s=!0,x=Ts((Ct(d.b!=0),y(d.c.b.c,10))),Na(f,d),Fu(d)),S=b,b=y(Oi(Di(n.d,b)),12);Z=S.d,Z.f.g==_r&&(j=y(ee(Z,(Oe(),Pt)),7),kn(f,new Rt(Pn(xe(Ee(un,1),on,10,0,[j.f.i,j.i,j.a])).a,Pn(xe(Ee(un,1),on,10,0,[Z.f.i,Z.i,Z.a])).b)),Z=j),m=rt(5,hue(Z.f,Z.g)),D=new _f(Tg(Z.g)),Oo(D,m),kn(f,On(D,Pn(xe(Ee(un,1),on,10,0,[Z.f.i,Z.i,Z.a])))),Ek(f,Pn(xe(Ee(un,1),on,10,0,[Z.f.i,Z.i,Z.a]))),N=new Zq(f),Na(e.a,dT(N))}function fBe(e){var n,s,f,d,b,m,x,S,R,N,D,j,H,z;if(ft(ee(e.c,(Ke(),Nt)))===ft((rr(),Vo))||ft(ee(e.c,Nt))===ft(Ti)){for(N=new W(e.c.f);N.a<N.c.c.length;)if(R=y(K(N),7),R.g==(Ye(),Et)||R.g==At)return!1}for(f=Xt(qn(e.c));Vt(f);)if(s=y(Gt(f),12),s.c.f==s.d.f)return!1;if(hu(y(ee(e.c,Nt),28))){for(H=new Xe,S=wr(e.c,(Ye(),vt)).mb();S.G();)m=y(S.H(),7),tt(H,as((Or(),new mr(Cr(xe(Ee(yt,1),st,1,4,[m.b,m.e]))))));for(z=(Dt(H),new dv(H)),H=new Xe,x=wr(e.c,lt).mb();x.G();)m=y(x.H(),7),tt(H,as((Or(),new mr(Cr(xe(Ee(yt,1),st,1,4,[m.b,m.e]))))));n=(Dt(H),new dv(H))}else z=Wr(e.c),n=qn(e.c);return b=!$y(qn(e.c)),d=!$y(Wr(e.c)),!b&&!d?!1:b?d?jS((sr(),new Po(Lo(du(z.a,new w)))))==1&&(D=(Dt(z),y(fq(new Po(Lo(du(z.a,new w)))),12)).c.f,D.g==(wt(),Nn)&&y(ee(D,(Oe(),ca)),7).f!=e.c)?(e.e=2,!0):jS(new Po(Lo(du(n.a,new w))))==1&&(j=(Dt(n),y(fq(new Po(Lo(du(n.a,new w)))),12)).d.f,j.g==(wt(),Nn)&&y(ee(j,(Oe(),Xi)),7).f!=e.c)?(e.e=3,!0):!1:(e.e=0,!0):(e.e=1,!0)}function hBe(e,n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se;if(f=new Xe,d=Fr,b=Fr,m=Fr,s)for(d=e.e.a,Z=new W(n.f);Z.a<Z.c.c.length;)for(z=y(K(Z),7),S=new W(z.e);S.a<S.c.c.length;)x=y(K(S),12),x.a.b!=0&&(N=y(Jk(x.a),10),N.a<d&&(b=d-N.a,m=Fr,f.c=Ge(yt,st,1,0,4,1),d=N.a),N.a<=d&&(f.c[f.c.length]=x,x.a.b>1&&(m=wn(m,ki(y(Sg(x.a,1),10).b-N.b)))));else for(Z=new W(n.f);Z.a<Z.c.c.length;)for(z=y(K(Z),7),S=new W(z.b);S.a<S.c.c.length;)x=y(K(S),12),x.a.b!=0&&(j=y(pw(x.a),10),j.a>d&&(b=j.a-d,m=Fr,f.c=Ge(yt,st,1,0,4,1),d=j.a),j.a>=d&&(f.c[f.c.length]=x,x.a.b>1&&(m=wn(m,ki(y(Sg(x.a,x.a.b-2),10).b-j.b)))));if(f.c.length!=0&&b>n.j.a/2&&m>n.j.b/2){for(H=new cr,An(H,n),an(H,(Ye(),Et)),H.i.a=n.j.a/2,se=new cr,An(se,n),an(se,At),se.i.a=n.j.a/2,se.i.b=n.j.b,S=new W(f);S.a<S.c.c.length;)x=y(K(S),12),s?(R=y(IB(x.a),10),ie=x.a.b==0?ia(x.d):y(Jk(x.a),10),ie.b>=R.b?nr(x,se):nr(x,H)):(R=y(zAe(x.a),10),ie=x.a.b==0?ia(x.c):y(pw(x.a),10),ie.b>=R.b?Bn(x,se):Bn(x,H)),D=y(ee(x,(Ke(),pr)),44),D&&Zy(D,R,!0);n.i.a=d-n.j.a/2}}function dBe(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe;for(se=new Xe,ce=new Xe,fe=new Xe,b=new W(n);b.a<b.c.c.length;)d=y(K(b),75),d.k>50?se.c[se.c.length]=d:d.k>0?ce.c[ce.c.length]=d:fe.c[fe.c.length]=d;if(ce.c.length==1&&se.c.length==0&&(Vn(se,ce),ce.c=Ge(yt,st,1,0,4,1)),se.c.length!=0&&Do(Hk(e.a),(Vi(),Iu))&&Do(Hk(e.a),(Vi(),Ko))?NOe(e,se):Vn(ce,se),ce.c.length==0||OOe(e,ce),fe.c.length!=0){if(s=zk(e.a),s.c!=0)for(N=new W(fe),S=(Dt(s),pB(new kre(s).a));N.a<N.c.c.length;){for(d=y(K(N),75);N.a<N.c.c.length&&d.a.a.Y()<2;)d=y(K(N),75);d.a.a.Y()>1&&(Z=y(I5(S),60),Ig(d,Z,!0),pg(N),Iae(e.a,Z))}for(j=fe.c.length,f=V3e(e),H=new Xe,m=j/tB(e.a).c|0,x=0;x<m;x++)Vn(H,tB(e.a));switch(z=j%tB(e.a).c,z>3&&(Vn(H,(Vi(),Vi(),Sve)),z-=4),z){case 3:tt(H,f0(f));case 2:ie=E_(f0(f));do ie=E_(ie);while(!Do(Hk(e.a),ie));H.c[H.c.length]=ie,ie=Gq(f0(f));do ie=Gq(ie);while(!Do(Hk(e.a),ie));H.c[H.c.length]=ie;break;case 1:tt(H,f0(f))}for(D=new W(H),R=new W(fe);D.a<D.c.c.length&&R.a<R.c.c.length;)Ig(y(K(R),75),y(K(D),60),!0)}}function vBe(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We;for(N=n.c.c.length,e.a=Ge($r,Xr,51,N,0,2),e.b=Ge($r,Xr,51,N,0,2),e.k=Ge($r,Xr,51,N,0,2),S=Ge(gr,vr,26,N,12,1),m=Ge(i1,k0,26,N,13,1),e.c=Ge(i1,k0,26,N,13,1),e.d=Ge(i1,k0,26,N,13,1),se=0,Re=0,j=new Ln(n.c,0);j.b<j.d.Y();)for(R=(Ct(j.b<j.d.Y()),y(j.d.sb(j.c=j.b++),16)),D=j.b-1,H=R.a.c.length,e.a[D]=Ge($r,oa,9,H,0,1),e.k[D]=Ge($r,oa,9,H,0,1),e.b[D]=Ge($r,oa,9,H,0,1),S[D]=0,m[D]=!1,ce=new Ln(R.a,0);ce.b<ce.d.Y();){for(ie=(Ct(ce.b<ce.d.Y()),y(ce.d.sb(ce.c=ce.b++),9)),e.b[D][ce.b-1]=ie,ie.k=se++,z=y(ee(ie,(Oe(),Zf)),9),z&&BT(e.g,z,ie,null),_e=new W(ie.f);_e.a<_e.c.c.length;){for(fe=y(K(_e),7),fe.k=Re++,b=new W(fe.e);b.a<b.c.c.length;)d=y(K(b),12),d.d.f.d==R&&++S[D];fe.g==(Ye(),lt)?fe.e.c.length+fe.b.c.length>1&&(e.c[D]=!0):fe.g==vt&&fe.e.c.length+fe.b.c.length>1&&(e.d[D]=!0)}ie.g==(wt(),_r)&&(++S[D],m[D]=!0)}for(s=!0,Z=!0,x=0;x<e.d.length-1;x++)f=e.c[x]||e.d[x+1],s=s&f,Z=Z&!f;e.j=Ge(kx,O_,26,Re,12,1),We=Ge(gr,vr,26,Re,12,1),s||(e.i=new $ie(S,m,We),e.f=e.i),Z||(e.e=new Gie(S,m,We),e.f=e.e)}function efe(e,n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve;for(e.d=new Rt(Wi,Wi),e.c=new Rt(ii,ii),j=n.mb();j.G();)for(N=y(j.H(),55),fe=new W(N.b);fe.a<fe.c.c.length;)ce=y(K(fe),9),e.d.a=wn(e.d.a,ce.i.a-ce.e.b),e.d.b=wn(e.d.b,ce.i.b-ce.e.d),e.c.a=rt(e.c.a,ce.i.a+ce.j.a+ce.e.c),e.c.b=rt(e.c.b,ce.i.b+ce.j.b+ce.e.a);for(x=new xte,D=n.mb();D.G();)N=y(D.H(),55),f=aBe(e,N),tt(x.a,f),f.a=f.a|!y(ee(f.c,(Oe(),pd)),18).V();for(e.b=(QS(),Ve=new Y,Ve.f=new moe(s),Ve.b=f4e(Ve.f,x),Ve),o4e((z=e.b,new ww,z)),e.e=new li,e.a=e.b.f.e,m=new W(x.a);m.a<m.c.c.length;)for(d=y(K(m),347),_e=APe(e.b,d),U3e(d.c,_e.a,_e.b),ie=new W(d.c.b);ie.a<ie.c.c.length;)Z=y(K(ie),9),Z.g==(wt(),Hn)&&(se=Aq(e,Z.i,y(ee(Z,(Oe(),ai)),32)),On(qu(Z.i),se));for(b=new W(x.a);b.a<b.c.c.length;)for(d=y(K(b),347),R=new W(IOe(d));R.a<R.c.c.length;)for(S=y(K(R),12),Je=new tS(S.a),gw(Je,0,ia(S.c)),kn(Je,ia(S.d)),H=null,We=xn(Je,0);We.b!=We.d.c;){if(Re=y(vn(We),10),!H){H=Re;continue}Dse(H.a,Re.a)?(e.e.a=wn(e.e.a,H.a),e.a.a=rt(e.a.a,H.a)):Dse(H.b,Re.b)&&(e.e.b=wn(e.e.b,H.b),e.a.b=rt(e.a.b,H.b)),H=Re}Xk(e.e),On(e.a,e.e)}function tfe(e,n,s,f,d){var b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at,gt,mt;for(Z=new sa(n.b),_e=new sa(n.b),j=new sa(n.b),Ve=new sa(n.b),ie=new sa(n.b),Je=xn(n,0);Je.b!=Je.d.c;)for(Re=y(vn(Je),7),x=new W(Re.e);x.a<x.c.c.length;)if(b=y(K(x),12),b.c.f==b.d.f){if(Re.g==b.d.g){Ve.c[Ve.c.length]=b;continue}else if(Re.g==(Ye(),Et)&&b.d.g==At){ie.c[ie.c.length]=b;continue}}for(S=new W(ie);S.a<S.c.c.length;)b=y(K(S),12),aje(e,b,s,f,(Ye(),lt));for(m=new W(Ve);m.a<m.c.c.length;)b=y(K(m),12),at=new Ps(e),Ss(at,(wt(),_r)),Ae(at,(Ke(),Nt),(rr(),Ti)),Ae(at,(Oe(),Pt),b),gt=new cr,Ae(gt,Pt,b.d),an(gt,(Ye(),vt)),An(gt,at),mt=new cr,Ae(mt,Pt,b.c),an(mt,lt),An(mt,at),Ae(b.c,Cu,at),Ae(b.d,Cu,at),nr(b,null),Bn(b,null),s.c[s.c.length]=at,Ae(at,Xg,Mt(2));for(We=xn(n,0);We.b!=We.d.c;)Re=y(vn(We),7),R=Re.b.c.length>0,se=Re.e.c.length>0,R&&se?j.c[j.c.length]=Re:R?Z.c[Z.c.length]=Re:se&&(_e.c[_e.c.length]=Re);for(z=new W(Z);z.a<z.c.c.length;)H=y(K(z),7),tt(d,i6(e,H,null,s));for(fe=new W(_e);fe.a<fe.c.c.length;)ce=y(K(fe),7),tt(d,i6(e,null,ce,s));for(D=new W(j);D.a<D.c.c.length;)N=y(K(D),7),tt(d,i6(e,N,N,s))}function nfe(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je;for(_e=new hr(n.d),S=new Xe,fe=new W(n.b);fe.a<fe.c.c.length;)if(se=y(K(fe),9),H=y(bn(e.j,se),69),H){for(k_(e,se,H,_e),We=new W(se.f);We.a<We.c.c.length;)if(Re=y(K(We),7),z=y(bn(e.n,Re),69),z&&(k_(e,Re,z,BR),SCe(z,(Ke(),M0),new mf(AAe(Re.g)))),ft(ee(se,(Ke(),D0)))!==ft((Rv(),CR)))for(ie=new W(Re.c);ie.a<ie.c.c.length;)Z=y(K(ie),33),j=y(bn(e.f,Z),69),k_(e,Z,j,BR);if(y(ee(se,(Ke(),Da)),86).Y()!=0)for(ie=new W(se.c);ie.a<ie.c.c.length;)Z=y(K(ie),33),j=y(bn(e.f,Z),69),k_(e,Z,j,BR);for(x=Xt(qn(se));Vt(x);)b=y(Gt(x),12),Cv(b.d.f,se)||(S.c[S.c.length]=b)}if(Je=y(ee(n,(Oe(),th)),9),Je)for(x=Xt(qn(Je));Vt(x);)b=y(Gt(x),12),Cv(b.d.f,Je)&&(S.c[S.c.length]=b);for(m=new W(S);m.a<m.c.c.length;)for(b=y(K(m),12),D=y(bn(e.b,b),69),D4e(e,b,D,_e),ie=new W(b.b);ie.a<ie.c.c.length;)Z=y(K(ie),33),j=y(bn(e.f,Z),69),k_(e,Z,j,_e);for(s=(f=y(ee(n,Jo),15).a,new Rt(n.e.a+n.a.b+n.a.c+2*f,n.e.b+n.a.d+n.a.a+2*f)),N=y(ee(n,th),9),N&&(N.j.a=s.a,N.j.b=s.b),R=y(ee(n,kF),69),As(e,R,QT,s.a),As(e,R,ZT,s.b),ce=new W(n.b);ce.a<ce.c.c.length;)se=y(K(ce),9),d=y(ee(se,eh),55),d&&nfe(e,d)}function pBe(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at,gt,mt,Tt,It;for(mt=new pi,Ve=new pi,se=-1,S=new W(e);S.a<S.c.c.length;){for(m=y(K(S),77),m.i=se--,D=0,Re=0,b=new W(m.j);b.a<b.c.c.length;)f=y(K(b),117),Re+=f.c;for(d=new W(m.d);d.a<d.c.c.length;)f=y(K(d),117),D+=f.c;m.e=D,m.k=Re,Re==0?Br(Ve,m,Ve.c.b,Ve.c):D==0&&Br(mt,m,mt.c.b,mt.c)}for(It=new hS((No(),e)),j=e.c.length,ie=j+1,ce=j-1,z=new Xe;It.a.Y()!=0;){for(;Ve.b!=0;)Je=(Ct(Ve.b!=0),y($u(Ve,Ve.a.a),77)),It.a.eb(Je)!=null,Je.i=ce--,$q(Je,mt,Ve);for(;mt.b!=0;)at=(Ct(mt.b!=0),y($u(mt,mt.a.a),77)),It.a.eb(at)!=null,at.i=ie++,$q(at,mt,Ve);for(Z=Uu,R=(fe=new pn(It.a).a.bb().mb(),new mn(fe));R.a.G();)m=(N=y(R.a.H(),21),y(N.yb(),77)),_e=m.k-m.e,_e>=Z&&(_e>Z&&(z.c=Ge(yt,st,1,0,4,1),Z=_e),z.c[z.c.length]=m);z.c.length!=0&&(H=y(ht(z,lq(n,z.c.length)),77),It.a.eb(H)!=null,H.i=ie++,$q(H,mt,Ve),z.c=Ge(yt,st,1,0,4,1))}for(We=e.c.length+1,x=new W(e);x.a<x.c.c.length;)m=y(K(x),77),m.i<j&&(m.i+=We);for(gt=new W(e);gt.a<gt.c.c.length;)for(at=y(K(gt),77),s=new Ln(at.j,0);s.b<s.d.Y();)f=(Ct(s.b<s.d.Y()),y(s.d.sb(s.c=s.b++),117)),Tt=f.b,at.i>Tt.i&&(lo(s),Vr(Tt.d,f),f.c>0&&(f.a=Tt,tt(Tt.j,f),f.b=at,tt(at.d,f)))}function gBe(e){var n,s,f;for(f=new Pw(new Hm(e.c).a);dw(f.a);)switch(s=(f.b=Tf(f.a),new sw(f.c,f.b)),n=y(s.b.b[s.a.e],62),y(s.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 bBe(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at,gt,mt,Tt,It,Ut;for(mt=new pi,Ve=new pi,z=-1,ce=new W(e);ce.a<ce.c.c.length;){for(ie=y(K(ce),80),ie.d=z--,S=0,Re=0,b=new W(ie.e);b.a<b.c.c.length;)f=y(K(b),118),Re+=f.c;for(d=new W(ie.b);d.a<d.c.c.length;)f=y(K(d),118),S+=f.c;ie.c=S,ie.f=Re,Re==0?Br(Ve,ie,Ve.c.b,Ve.c):S==0&&Br(mt,ie,mt.c.b,mt.c)}for(It=(Ut=new A4,$5(Ut,e),Ut),R=e.c.length,Z=R-1,H=R+1,D=new Xe;It.a.c!=0;){for(;Ve.b!=0;)Je=(Ct(Ve.b!=0),y($u(Ve,Ve.a.a),80)),qy(It.a,Je)!=null,Je.d=Z--,Fq(Je,mt,Ve);for(;mt.b!=0;)at=(Ct(mt.b!=0),y($u(mt,mt.a.a),80)),qy(It.a,at)!=null,at.d=H++,Fq(at,mt,Ve);for(j=Uu,fe=(x=new Dy(new Ny(new $m(It.a).a).b),new Gm(x));Ak(fe.a.a);)ie=(m=eS(fe.a),y(m.yb(),80)),_e=ie.f-ie.c,_e>=j&&(_e>j&&(D.c=Ge(yt,st,1,0,4,1),j=_e),D.c[D.c.length]=ie);D.c.length!=0&&(N=y(ht(D,lq(n,D.c.length)),80),qy(It.a,N)!=null,N.d=H++,Fq(N,mt,Ve),D.c=Ge(yt,st,1,0,4,1))}for(We=e.c.length+1,se=new W(e);se.a<se.c.c.length;)ie=y(K(se),80),ie.d<R&&(ie.d+=We);for(gt=new W(e);gt.a<gt.c.c.length;)for(at=y(K(gt),80),s=new Ln(at.e,0);s.b<s.d.Y();)f=(Ct(s.b<s.d.Y()),y(s.d.sb(s.c=s.b++),118)),Tt=f.b,at.d>Tt.d&&(lo(s),Vr(Tt.b,f),f.c>0&&(f.a=Tt,tt(Tt.e,f),f.b=at,tt(at.b,f)))}function yBe(e){switch(e.e){case 14:return new Ce;case 37:return new ve;case 8:return new Xte;case 30:return new Jte;case 38:return new je;case 3:return new qe;case 47:case 1:return new rk((r_(),qF));case 4:return new Me;case 49:return new ot;case 23:return new YE;case 13:return new dt;case 34:return new Lt;case 40:return new ut;case 35:return new fn;case 44:return new Lre;case 28:return new Yn;case 39:return new he;case 27:return new J;case 6:return new te;case 31:return new ue;case 9:return new mee;case 43:return new Ze;case 17:return new et;case 18:return new bt;case 29:return new wee;case 11:return new me;case 12:return new Wt;case 36:return new cn;case 46:case 0:return new rk((r_(),BF));case 41:return new Fn;case 15:return new Qt;case 33:return new Kn;case 42:return new _t;case 22:return new kt;case 19:return new Te;case 10:return new Wn;case 7:return new lr;case 24:return new xr;case 21:return new Zi;case 16:return new xi;case 45:return new ou;case 26:return new Ro;case 20:return new _c;case 25:return new nl;case 5:return new Nm;case 32:return new zE;case 48:case 2:return new rk((r_(),jF));default:throw new Rn("No implementation is available for the layout processor "+(e.d!=null?e.d:""+e.e))}}function mBe(e){var n,s,f,d,b,m,x;if(s=e.e.e.j,e.b?n=y(Er(e.e,(Ke(),A0)),65):n=new Mo(e.k,e.k,e.k,e.k),d=s.a,(e.b||e.g[1]!=(ml(),Tu))&&(d-=n.b+n.c),b=s.a,(e.b||e.g[3]!=(ml(),Tu))&&(b-=n.b+n.c),m=s.b,(e.b||e.g[4]!=(ml(),Tu))&&(m-=n.d+n.a),f=s.b,(e.b||e.g[2]!=(ml(),Tu))&&(f-=n.d+n.a),rv(e,(Ye(),Et))==(ml(),Tu))e.j[1]=(d-iv(e,Et))/dk(e,Et),e.f=e.b?n.b+(av(e,Et)==1?e.j[1]:0):e.j[1];else switch(e.j[1]=e.k,x=iv(e,Et)+e.j[1]*(av(e,Et)-1),rv(e,Et).e){case 2:e.f=n.b;break;case 3:e.f=n.b+(d-x)/2;break;case 4:e.f=s.a-x-n.c}if(rv(e,At)==Tu)e.j[3]=(b-iv(e,At))/dk(e,At),e.r=s.a-(e.b?n.c+(av(e,At)==1?e.j[3]:0):e.j[3]);else switch(e.j[3]=e.k,x=iv(e,At)+e.j[3]*(av(e,At)-1),rv(e,At).e){case 2:e.r=x+n.b;break;case 3:e.r=s.a-(b-x)/2-n.c;break;case 4:e.r=s.a-n.c}if(rv(e,vt)==Tu)e.j[4]=(m-iv(e,vt))/dk(e,vt),e.s=s.b-(e.b?n.a+(av(e,vt)==1?e.j[4]:0):e.j[4]);else switch(e.j[4]=e.k,x=iv(e,vt)+e.j[4]*(av(e,vt)-1),rv(e,vt).e){case 2:e.s=x+n.d;break;case 3:e.s=s.b-(m-x)/2-n.a;break;case 4:e.s=s.b-n.a}if(rv(e,lt)==Tu)e.j[2]=(f-iv(e,lt))/dk(e,lt),e.a=e.b?n.d+(av(e,lt)==1?e.j[2]:0):e.j[2];else switch(e.j[2]=e.k,x=iv(e,lt)+e.j[2]*(av(e,lt)-1),rv(e,lt).e){case 2:e.a=n.d;break;case 3:e.a=n.d+(f-x)/2;break;case 4:e.a=s.b-x-n.a}}function rfe(e,n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at,gt,mt,Tt,It,Ut;for(Tt=0,m=0,D=n[0].d,Ve=s[0].d,z=0,ie=s.length;z<ie;++z)if(j=s[z],Gi(y(ee(j,(Ke(),Nt)),28))){for(ce=0,Re=new W(j.f);Re.a<Re.c.c.length&&(_e=y(K(Re),7),_e.g==(Ye(),Et));)for(b=new W(_e.b);b.a<b.c.c.length;)if(d=y(K(b),12),d.c.f.d==D){++ce;break}for(fe=0,Je=new Ln(j.f,j.f.c.length);Je.b>0;){for(_e=(Ct(Je.b>0),y(Je.a.sb(Je.c=--Je.b),7)),We=0,b=new W(_e.b);b.a<b.c.c.length;)d=y(K(b),12),d.c.f.d==D&&++We;We>0&&(_e.g==(Ye(),Et)?(e.a[_e.k]=Tt,++Tt):(e.a[_e.k]=Tt+ce+fe,++fe),m+=We)}Tt+=fe}else{for(se=0,Re=new W(j.f);Re.a<Re.c.c.length;){for(_e=y(K(Re),7),b=new W(_e.b);b.a<b.c.c.length;)d=y(K(b),12),d.c.f.d==D&&++se;e.a[_e.k]=Tt}se>0&&(++Tt,m+=se)}for(at=Ge(gr,vr,26,m,12,1),S=0,H=0,Z=n.length;H<Z;++H)if(j=n[H],Gi(y(ee(j,(Ke(),Nt)),28)))for(Re=new W(j.f);Re.a<Re.c.c.length;)for(_e=y(K(Re),7),gt=S,b=new W(_e.e);b.a<b.c.c.length;)d=y(K(b),12),mt=d.d,mt.f.d==Ve&&xoe(at,gt,S++,e.a[mt.k]);else for(gt=S,Re=new W(j.f);Re.a<Re.c.c.length;)for(_e=y(K(Re),7),b=new W(_e.e);b.a<b.c.c.length;)d=y(K(b),12),mt=d.d,mt.f.d==Ve&&xoe(at,gt,S++,e.a[mt.k]);for(x=1;x<Tt;)x*=2;for(Ut=2*x-1,x-=1,It=Ge(gr,vr,26,Ut,12,1),f=0,N=0;N<m;N++)for(R=at[N]+x,++It[R];R>0;)R%2>0&&(f+=It[R+1]),R=(R-1)/2|0,++It[R];return f}function ife(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at,gt,mt,Tt,It,Ut,zn;for(en(n,"Compound graph postprocessor",1),s=Kt(ze(Zt(ee(e,(sn(),jI))))),x=y(ee(e,(Oe(),X7)),144),D=new ci,We=x.W().mb();We.G();){for(Re=y(We.H(),12),m=new cl(x.U(Re)),Cs(m,new n4(e)),mt=MNe((Gn(0,m.c.length),y(m.c[0],114))),It=roe(y(ht(m,m.c.length-1),114)),Fu(Re.a),at=mt.f,Cv(It.f,at)?Ve=y(ee(at,eh),55):Ve=na(at),z=y(ee(Re,(Ke(),pr)),44),Vie(m,xde)?z?Fu(z):(z=new ea,Ae(Re,pr,z)):z&&Ae(Re,pr,null),ie=null,b=new W(m);b.a<b.c.c.length;){for(d=y(K(b),114),_e=new li,Dq(_e,d.a,Ve),se=d.b,f=new ea,eT(f,0,se.a),pl(f,_e),gt=new hr(ia(se.c)),Tt=new hr(ia(se.d)),gt.a+=_e.a,gt.b+=_e.b,Tt.a+=_e.a,Tt.b+=_e.b,ie&&(f.b==0?fe=Tt:fe=(Ct(f.b!=0),y(f.a.a.c,10)),Ut=ki(ie.a-fe.a)>Dc,zn=ki(ie.b-fe.b)>Dc,(!s&&Ut&&zn||s&&(Ut||zn))&&kn(Re.a,gt)),Na(Re.a,f),f.b==0?ie=gt:ie=(Ct(f.b!=0),y(f.c.b.c,10)),ce=y(ee(se,pr),44),ce&&(H=new ea,eT(H,0,ce),pl(H,_e),Na(z,H)),roe(d)==It&&(na(It.f)!=d.a&&(_e=new li,Dq(_e,na(It.f),Ve)),Ae(Re,DI,_e)),Z=new Ln(se.b,0);Z.b<Z.d.Y();)S=(Ct(Z.b<Z.d.Y()),y(Z.d.sb(Z.c=Z.b++),33)),ft(ee(S,n$))===ft(Re)&&(Dq(S.i,na(se.c.f),Ve),lo(Z),tt(Re.b,S));D.a.db(se,D)}nr(Re,mt),Bn(Re,It)}for(N=(Je=new pn(D.a).a.bb().mb(),new mn(Je));N.a.G();)R=(j=y(N.a.H(),21),y(j.yb(),12)),nr(R,null),Bn(R,null);zt(n)}function wBe(e){var n,s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at,gt,mt,Tt,It,Ut;if(at=y(ee(e,(Ke(),Nt)),28),at!=(rr(),yo)&&at!=Il){for(Z=e.c,z=Z.c.length,D=new sa((Mi(z+2,k6),Sv(Yr(Yr(5,z+2),(z+2)/10|0)))),ie=new sa((Mi(z+2,k6),Sv(Yr(Yr(5,z+2),(z+2)/10|0)))),tt(D,new ln),tt(D,new ln),tt(ie,new Xe),tt(ie,new Xe),Je=new ci,n=0;n<z;n++)for(s=(Gn(n,Z.c.length),y(Z.c[n],16)),gt=(Gn(n,D.c.length),y(D.c[n],57)),se=(Qn(),new ln),D.c[D.c.length]=se,Tt=(Gn(n,ie.c.length),y(ie.c[n],20)),fe=new Xe,ie.c[ie.c.length]=fe,d=new W(s.a);d.a<d.c.c.length;){for(f=y(K(d),9),R=Xt(Wr(f));Vt(R);)x=y(Gt(R),12),It=x.c.f,Woe(It)&&(Je.a.db(It,Je),mt=y(gt.cb(ee(It,(Oe(),Pt))),9),mt||(mt=cce(e,It),gt.db(ee(It,Pt),mt),Tt.ib(mt)),nr(x,y(ht(mt.f,1),7)));for(S=Xt(qn(f));Vt(S);)x=y(Gt(S),12),Ut=x.d.f,Woe(Ut)&&(Je.a.db(Ut,Je),ce=y(bn(se,ee(Ut,(Oe(),Pt))),9),ce||(ce=cce(e,Ut),Cn(se,ee(Ut,Pt),ce),fe.c[fe.c.length]=ce),Bn(x,y(ht(ce.f,0),7)))}for(j=0;j<ie.c.length;j++)if(_e=(Gn(j,ie.c.length),y(ie.c[j],20)),!_e.V())for(j==0?(H=new xf(e),If(0,Z.c.length),Ry(Z.c,0,H)):j==D.c.length-1?(H=new xf(e),Z.c[Z.c.length]=H):H=(Gn(j-1,Z.c.length),y(Z.c[j-1],16)),m=_e.mb();m.G();)b=y(m.H(),9),ei(b,H);for(We=(Ve=new pn(Je.a).a.bb().mb(),new mn(Ve));We.a.G();)Re=(N=y(We.a.H(),21),y(N.yb(),9)),ei(Re,null)}}function _Be(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at,gt,mt,Tt,It,Ut,zn,Xn;for(Ut=new Xe,z=new W(n.c);z.a<z.c.c.length;)for(j=y(K(z),16),Re=new W(j.a);Re.a<Re.c.c.length;){for(_e=y(K(Re),9),_e.k=-1,D=Uu,Ve=Uu,gt=new W(_e.f);gt.a<gt.c.c.length;){for(at=y(K(gt),7),d=new W(at.b);d.a<d.c.c.length;)s=y(K(d),12),mt=y(ee(s,(Oe(),js)),24).a,D=D>mt?D:mt;for(f=new W(at.e);f.a<f.c.c.length;)s=y(K(f),12),mt=y(ee(s,(Oe(),js)),24).a,Ve=Ve>mt?Ve:mt}Ae(_e,ox,Mt(D)),Ae(_e,ux,Mt(Ve))}for(se=0,H=new W(n.c);H.a<H.c.c.length;)for(j=y(K(H),16),Re=new W(j.a);Re.a<Re.c.c.length;)_e=y(K(Re),9),_e.k<0&&(It=new b4,It.b=se++,r6(e,_e,It),Ut.c[Ut.c.length]=It);for(Je=pf(Ut.c.length),N=pf(Ut.c.length),m=0;m<Ut.c.length;m++)tt(Je,new Xe),tt(N,Mt(0));for(B4e(n,Ut,Je,N),zn=y(dr(Ut,Ge(ave,$fe,111,Ut.c.length,0,1)),625),We=y(dr(Je,Ge(ABe,{3:1,5:1,6:1,672:1},20,Je.c.length,0,1)),672),R=Ge(gr,vr,26,N.c.length,12,1),x=0;x<R.length;x++)R[x]=(Gn(x,N.c.length),y(N.c[x],24)).a;for(ce=0,fe=new Xe,S=0;S<zn.length;S++)R[S]==0&&tt(fe,zn[S]);for(ie=Ge(gr,vr,26,zn.length,12,1);fe.c.length!=0;)for(It=y(zh(fe,0),111),ie[It.b]=ce++;!We[It.b].V();)Xn=y(We[It.b].vb(0),111),--R[Xn.b],R[Xn.b]==0&&(fe.c[fe.c.length]=Xn);for(e.a=Ge(ave,$fe,111,zn.length,0,1),b=0;b<zn.length;b++)for(Z=zn[b],Tt=ie[b],e.a[Tt]=Z,Z.b=Tt,Re=new W(Z.f);Re.a<Re.c.c.length;)_e=y(K(Re),9),_e.k=Tt;return e.a}function xBe(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at;for(en(n,"Fixed Layout",1),S=y(ee(e,(Ke(),ad)),122),Z=0,ie=0,fe=new W(e.b);fe.a<fe.c.c.length;){for(se=y(K(fe),9),Ve=y(ee(se,Vv),10),Ve&&(se.i.a=Ve.a,se.i.b=Ve.b,y(ee(se,Rl),86).kb((Pc(),F0))&&(at=y(ee(se,Hg),15).a,R=y(ee(se,Gg),15).a,at>0&&R>0&&c6(se,new Rt(at,R),!0))),Z=rt(Z,se.i.a+se.j.a),ie=rt(ie,se.i.b+se.j.b),H=new W(se.c);H.a<H.c.c.length;)D=y(K(H),33),Ve=y(ee(D,Vv),10),Ve&&(D.i.a=Ve.a,D.i.b=Ve.b),Z=rt(Z,se.i.a+D.i.a+D.j.a),ie=rt(ie,se.i.b+D.i.b+D.j.b);for(Re=new W(se.f);Re.a<Re.c.c.length;)for(_e=y(K(Re),7),Ve=y(ee(_e,Vv),10),Ve&&(_e.i.a=Ve.a,_e.i.b=Ve.b),We=se.i.a+_e.i.a,Je=se.i.b+_e.i.b,Z=rt(Z,We+_e.j.a),ie=rt(ie,Je+_e.j.b),j=new W(_e.c);j.a<j.c.c.length;)D=y(K(j),33),Ve=y(ee(D,Vv),10),Ve&&(D.i.a=Ve.a,D.i.b=Ve.b),Z=rt(Z,We+D.i.a+D.j.a),ie=rt(ie,Je+D.i.b+D.j.b);for(x=Xt(qn(se));Vt(x);)b=y(Gt(x),12),z=Fle(b),Z=rt(Z,z.a),ie=rt(ie,z.b);for(m=Xt(Wr(se));Vt(m);)b=y(Gt(m),12),ft(ee(b.c.f,(Oe(),eh)))!==ft(e)&&(z=Fle(b),Z=rt(Z,z.a),ie=rt(ie,z.b))}if(S==(Cc(),id))for(ce=new W(e.b);ce.a<ce.c.c.length;)for(se=y(K(ce),9),m=Xt(qn(se));Vt(m);)b=y(Gt(m),12),N=U4e(b),N.b==0?Ae(b,pr,null):Ae(b,pr,N);e.e.a=Z,e.e.b=ie,Ae(e,Rl,(Pc(),f=y(ga(zg),11),new Si(f,y(ta(f,f.length),11),0))),d=y(ee(e,(Oe(),th)),9),d&&Ae(d,Rl,(s=y(ga(zg),11),new Si(s,y(ta(s,s.length),11),0))),zt(n)}function EBe(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at,gt,mt,Tt;if(!Gi(y(ee(n,(Ke(),Nt)),28))){if(n.f.c.length>1){Je=Ge(KBe,Xr,15,e.a.length,0,1),R=pf(e.a.length),Z=0,z=0,s=2*n.d.a.c.length+1;e:for(We=new W(n.f);We.a<We.c.c.length;){if(Re=y(K(We),7),se=Re.g==(Ye(),Et)||Re.g==At,Tt=0,se){if(Ve=y(ee(Re,(Oe(),Cu)),9),!Ve)continue;for(j=!1,_e=!1,gt=new W(Ve.f);gt.a<gt.c.c.length;)at=y(K(gt),7),ft(ee(at,Pt))===ft(Re)&&(at.e.c.length==0?at.b.c.length==0||(j=!0):_e=!0);j&&!_e?Tt=Re.g==Et?-(Ve.d?aa(Ve.d.a,Ve,0):-1):s-(Ve.d?aa(Ve.d.a,Ve,0):-1):_e&&!j?Tt=(Ve.d?aa(Ve.d.a,Ve,0):-1)+1:j&&_e&&(Tt=Re.g==Et?0:s/2)}else{for(fe=new W(Re.e);fe.a<fe.c.c.length;)if(ce=y(K(fe),12),d=ce.d,d.f.d==n.d){R.c[R.c.length]=Re;continue e}else Tt+=e.a[d.k];for(D=new W(Re.b);D.a<D.c.c.length;)if(N=y(K(D),12),d=N.c,d.f.d==n.d){R.c[R.c.length]=Re;continue e}else Tt-=e.a[d.k]}Re.b.c.length+Re.e.c.length>0?(Je[Re.k]=new gn(Tt/(Re.b.c.length+Re.e.c.length)),Z=GCe(Z,Je[Re.k].a),z=dne(z,Je[Re.k].a)):se&&(Je[Re.k]=new gn(Tt))}for(ie=(n.d?aa(n.d.a,n,0):-1)+1,H=n.d.a.c.length+1,S=new W(R);S.a<S.c.c.length;){for(x=y(K(S),7),Tt=0,m=0,b=Xt(as((Or(),new mr(Cr(xe(Ee(yt,1),st,1,4,[new Kp(x),new Zd(x)]))))));Vt(b);)d=y(Gt(b),7),d.f.d==n.d&&(Tt+=hie(d.f)+1,++m);f=Tt/m,mt=x.g,mt==(Ye(),lt)?f<ie?Je[x.k]=new gn(Z-f):Je[x.k]=new gn(z+(H-f)):mt==vt&&(f<ie?Je[x.k]=new gn(z+f):Je[x.k]=new gn(Z-(H-f)))}Cs(n.f,new ite(Je))}Ae(n,Nt,(rr(),Uv))}}function kBe(e){var n,s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at;for(Ve=new Xe,e.a.b.c=Ge(yt,st,1,0,4,1),_e=(Qn(),new ln),se=new W(e.d.c);se.a<se.c.c.length;)for(Z=y(K(se),16),fe=new W(Z.a);fe.a<fe.c.c.length;){if(ce=y(K(fe),9),Kt(ze(Zt(ee(ce,(Ke(),$g)))))&&!$y(o0(ce))){x=y($w(o0(ce)),12),Re=x.c.f,Re==ce&&(Re=x.d.f),We=new jr(Re,kc(Ts(ce.i),Re.i)),Cn(e.b,ce,We);continue}b=new lle(ce,e.d),tt(e.a.b,b),Oa(_e.d,ce,b)}for(ie=new W(e.d.c);ie.a<ie.c.c.length;)for(Z=y(K(ie),16),fe=new W(Z.a);fe.a<fe.c.c.length;){for(ce=y(K(fe),9),b=y(Oi(Di(_e.d,ce)),25),N=Xt(qn(ce));Vt(N);)if(S=y(Gt(N),12),f=xn(S.a,0),D=!0,z=null,f.b!=f.d.c){for(n=y(vn(f),10),S.c.g==(Ye(),Et)&&(at=new h0(n,new Rt(n.a,b.j.e),b,S),at.c=!0,Ve.c[Ve.c.length]=at),S.c.g==At&&(at=new h0(n,new Rt(n.a,b.j.e+b.j.b),b,S),at.d=!0,Ve.c[Ve.c.length]=at);f.b!=f.d.c;)s=y(vn(f),10),_5(n.b,s.b)||(z=new h0(n,s,null,S),Ve.c[Ve.c.length]=z,D&&(D=!1,s.b<b.j.e?z.c=!0:s.b>b.j.e+b.j.b?z.d=!0:(z.d=!0,z.c=!0))),f.b!=f.d.c&&(n=s);z&&(m=y(bn(_e,S.d.f),25),n.b<m.j.e?z.c=!0:n.b>m.j.e+m.j.b?z.d=!0:(z.d=!0,z.c=!0))}for(R=Xt(Wr(ce));Vt(R);)S=y(Gt(R),12),S.a.b!=0&&(n=y(pw(S.a),10),S.d.g==(Ye(),Et)&&(at=new h0(n,new Rt(n.a,b.j.e),b,S),at.c=!0,Ve.c[Ve.c.length]=at),S.d.g==At&&(at=new h0(n,new Rt(n.a,b.j.e+b.j.b),b,S),at.d=!0,Ve.c[Ve.c.length]=at))}if(Ve.c.length!=0){for(_n(),Cs(Ve,null),H=(Gn(0,Ve.c.length),y(Ve.c[0],142)),d=new Oq(H,e.d),j=1;j<Ve.c.length;j++)Je=(Gn(j,Ve.c.length),y(Ve.c[j],142)),_5(d.j.d,Je.j)&&!(aq(d.j.e+d.j.b,Je.k)||aq(Je.n,d.j.e))?Ole(d,Je):(tt(e.a.b,d),d=new Oq(Je,e.d));tt(e.a.b,d)}Ve.c=Ge(yt,st,1,0,4,1),T3e(e)}function f6(e,n,s,f,d,b){var m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at,gt,mt,Tt,It,Ut,zn,Xn,ha,Ia;for(x=y(ht(e.d.c.c,f),16),Xn=new ci,z=new ci,H=0;H<x.a.c.length;++H)ce=y(ht(x.a,H),9),H<s?(gt=Xn.a.db(ce,Xn),gt==null):H>s&&(at=z.a.db(ce,z),at==null);for(ha=new ci,Z=new ci,_e=(Tt=new pn(Xn.a).a.bb().mb(),new mn(Tt));_e.a.G();)for(ce=(D=y(_e.a.H(),21),y(D.yb(),9)),m=n==1?qn(ce):Wr(ce),R=(sr(),new Po(Lo(du(m.a,new w))));Vt(R);)S=y(Gt(R),12),Pa(ce.d)!=Pa(S.d.f.d)&&Dn(ha,S.d.f);for(Re=(It=new pn(z.a).a.bb().mb(),new mn(It));Re.a.G();)for(ce=(D=y(Re.a.H(),21),y(D.yb(),9)),m=n==1?qn(ce):Wr(ce),R=(sr(),new Po(Lo(du(m.a,new w))));Vt(R);)S=y(Gt(R),12),Pa(ce.d)!=Pa(S.d.f.d)&&Dn(Z,S.d.f);for(kde&&Mh(),Ve=y(ht(e.d.c.c,f+(n==1?1:-1)),16),ie=Uu,se=Fr,j=0;j<Ve.a.c.length;j++)ce=y(ht(Ve.a,j),9),ha.a.R(ce)?ie=ie>j?ie:j:Z.a.R(ce)&&(se=se<j?se:j);if(ie<se){for(We=(Ut=new pn(ha.a).a.bb().mb(),new mn(Ut));We.a.G();){for(ce=(D=y(We.a.H(),21),y(D.yb(),9)),N=Xt(qn(ce));Vt(N);)if(S=y(Gt(N),12),Pa(ce.d)==Pa(S.d.f.d))return null;for(R=Xt(Wr(ce));Vt(R);)if(S=y(Gt(R),12),Pa(ce.d)==Pa(S.c.f.d))return null}for(Je=(mt=new pn(Z.a).a.bb().mb(),new mn(mt));Je.a.G();){for(ce=(D=y(Je.a.H(),21),y(D.yb(),9)),N=Xt(qn(ce));Vt(N);)if(S=y(Gt(N),12),Pa(ce.d)==Pa(S.d.f.d))return null;for(R=Xt(Wr(ce));Vt(R);)if(S=y(Gt(R),12),Pa(ce.d)==Pa(S.c.f.d))return null}for(Xn.a.Y()==0?Ia=0:z.a.Y()==0?Ia=Ve.a.c.length:Ia=ie+1,fe=new W(x.a);fe.a<fe.c.c.length;)if(ce=y(K(fe),9),ce.g==(wt(),_r))return null;return b==1?Ww(xe(Ee(cR,1),Xr,24,0,[Mt(Ia)])):n==1&&f==d-2||n==0&&f==1?Ww(xe(Ee(cR,1),Xr,24,0,[Mt(Ia)])):(zn=f6(e,n,Ia,f+(n==1?1:-1),d,b-1),zn&&n==1&&zn.rb(0,Mt(Ia)),zn)}return null}function SBe(e,n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe;if(Rq(n),H=(Ke(),O0).b,!(H in n.a&&Jn(n,H).ic().a)){if(S=Jn(n,"source"),R=Jn(n,"sourcePort"),N=Jn(n,"target"),D=Jn(n,"targetPort"),S){if(!S.lc())throw new vu("Invalid format of an edge's 'source' property. It must be a string.",S,n)}else throw new vu("Edges must contain a 'source' property.",null,n);if(N){if(!N.lc())throw new vu("Invalid format of an edge's 'target' property. It must be a string.",N,n)}else throw new vu("Edges must contain a 'target' property.",null,n);ie=null,ce=null;try{Z=y(qw(e.i,S.lc().a),9),R&&R.lc()&&(ie=y(qw(e.k,R.lc().a),7)),se=y(qw(e.i,N.lc().a),9),D&&D.lc()&&(ce=y(qw(e.k,D.lc().a),7))}catch(_e){throw _e=gi(_e),Qe(_e,76)?new Ly("An edge's 'source', 'target', 'sourcePort', and 'targetPort' properties have to be strings.",n):bi(_e)}if(!Kt(ze(e.g))){if(!Z||!se)return;if(na(Z)!=na(se))return}if(!Z||!se)throw new Ly("An edge's source or target node could not be resolved.",n);if(z=na(Z),f=new pu,Ae(f,(Oe(),Pt),n),m=y(Jn(n,"id"),97),Fw(e.a,m.a,f),Cn(e.b,f,n),p_(n,f),Pq(e,n,f,z),d=y(ee(z,hi),18),Z==se&&d.ib((Dr(),dx)),!ie)ie=Ale(Z,new li,(Ir(),Ri),z);else if(ie.f!=Z)throw new lk("Inconsistent source port reference found.");if(!ce)ce=Ale(se,new li,(Ir(),fa),z);else if(ce.f!=se)throw new lk("Inconsistent target port reference found.");if(nr(f,ie),Bn(f,ce),(Fh(as((Or(),new mr(Cr(xe(Ee(yt,1),st,1,4,[ie.b,ie.e]))))))>1||Fh(as(new mr(Cr(xe(Ee(yt,1),st,1,4,[ce.b,ce.e])))))>1)&&d.ib((Dr(),hx)),ft(ee(z,(sn(),yx)))===ft((Gy(),sI))&&!(JT in n.a)){s=new ea;try{for(x=Jn(n,JT).hc(),b=0;b<x.a.length;++b)j=dl(x,b).kc(),fe=new Rt(Jn(j,"x").jc().a,Jn(j,"y").jc().a),Br(s,fe,s.c.b,s.c);Ae(f,e$,s)}catch(_e){throw _e=gi(_e),Qe(_e,54)?new Ly("Invalid format of an edges 'bendPoints' property.",n):bi(_e)}}Ae(f,pr,null)}}function Kr(){Kr=a,t7=new En("LEFT_DIR_PREPROCESSOR",0),HF=new En("DOWN_DIR_PREPROCESSOR",1),d7=new En("UP_DIR_PREPROCESSOR",2),$F=new En("COMMENT_PREPROCESSOR",3),KR=new En("EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER",4),l7=new En("SPLINE_SELF_LOOP_PREPROCESSOR",5),XR=new En("INTERACTIVE_EXTERNAL_PORT_POSITIONER",6),a7=new En("PARTITION_PREPROCESSOR",7),YR=new En("BIG_NODES_PREPROCESSOR",8),Z_=new En("LABEL_DUMMY_INSERTER",9),i7=new En("PARTITION_POSTPROCESSOR",10),r7=new En("NODE_PROMOTION",11),nx=new En("LAYER_CONSTRAINT_PROCESSOR",12),VF=new En("HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR",13),UR=new En("BIG_NODES_INTERMEDIATEPROCESSOR",14),ZR=new En("LONG_EDGE_SPLITTER",15),tI=new En("PORT_SIDE_PROCESSOR",16),tx=new En("LABEL_DUMMY_SWITCHER",17),QF=new En("LABEL_MANAGEMENT_PROCESSOR",18),Q_=new En("INVERTED_PORT_PROCESSOR",19),u7=new En("SELF_LOOP_PROCESSOR",20),eI=new En("PORT_LIST_SORTER",21),ix=new En("NORTH_SOUTH_PORT_PREPROCESSOR",22),zF=new En("GREEDY_SWITCH",23),s7=new En("PORT_DISTRIBUTER",24),c7=new En("SPLINE_SELF_LOOP_POSITIONER",25),o7=new En("SAUSAGE_COMPACTION",26),JR=new En("IN_LAYER_CONSTRAINT_PROCESSOR",27),KF=new En("HYPEREDGE_DUMMY_MERGER",28),Qv=new En("LABEL_SIDE_SELECTOR",29),WR=new En("BIG_NODES_SPLITTER",30),JF=new En("LABEL_AND_NODE_SIZE_PROCESSOR",31),f7=new En("SPLINE_SELF_LOOP_ROUTER",32),n7=new En("NODE_MARGIN_CALCULATOR",33),UF=new En("HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR",34),Vg=new En("HIERARCHICAL_PORT_POSITION_PROCESSOR",35),ZF=new En("LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR",36),V0=new En("BIG_NODES_POSTPROCESSOR",37),FF=new En("COMMENT_POSTPROCESSOR",38),XF=new En("HYPERNODE_PROCESSOR",39),YF=new En("HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER",40),QR=new En("LONG_EDGE_JOINER",41),rx=new En("NORTH_SOUTH_PORT_POSTPROCESSOR",42),ex=new En("LABEL_DUMMY_REMOVER",43),WF=new En("HORIZONTAL_COMPACTOR",44),nI=new En("REVERSED_EDGE_RESTORER",45),e7=new En("LEFT_DIR_POSTPROCESSOR",46),GF=new En("DOWN_DIR_POSTPROCESSOR",47),h7=new En("UP_DIR_POSTPROCESSOR",48),J_=new En("END_LABEL_PROCESSOR",49)}function Oe(){Oe=a;var e,n;Pt=new br("origin"),epe=new br("processingConfiguration"),r$=new br("processors"),K7=new xt("compoundNode",(jn(),jn(),er)),tpe=new xt("insideConnections",er),eh=new br("nestedLGraph"),th=new br("parentLNode"),e$=new br("originalBendpoints"),t$=new br("originalDummyNodePosition"),n$=new br("originalLabelEdge"),i$=new br("representedLabels"),Js=new xt("labelSide",(ya(),H0)),ec=new xt("reversed",er),np=new br("random"),ca=new xt("longEdgeSource",null),Xi=new xt("longEdgeTarget",null),AI=new xt("edgeConstraint",(Iv(),N7)),Zf=new br("inLayerLayoutUnit"),Zu=new xt("inLayerConstraint",(yu(),vx)),tp=new xt("inLayerSuccessorConstraint",new Xe),Cu=new br("portDummy"),Xg=new xt("crossingHint",Mt(0)),hi=new xt("graphProperties",(n=y(ga(q7),11),new Si(n,y(ta(n,n.length),11),0))),ai=new xt("externalPortSide",(Ye(),Ar)),Z7=new xt("externalPortSize",new li),gx=new br("externalPortReplacedDummy"),pd=new xt("externalPortConnections",(e=y(ga(Qr),11),new Si(e,y(ta(e,e.length),11),0))),Hc=new xt(xfe,0),Y7=new br("barycenterAssociates"),Qg=new br("TopSideComments"),Kg=new br("BottomSideComments"),px=new br("CommentConnectionPort"),PI=new xt("inputCollect",er),LI=new xt("outputCollect",er),J7=new xt("cyclic",er),Q0=new xt("bigNodeOriginalSize",new gn(0)),jl=new xt("bigNodeInitial",er),W7=new xt("de.cau.cs.kieler.klay.layered.bigNodeLabels",new Xe),CI=new xt("de.cau.cs.kieler.klay.layered.postProcess",null),X7=new br("crossHierarchyMap"),DI=new br("targetOffset"),npe=new xt("splineLabelSize",new li),Z0=new xt("splineLoopSide",(Vi(),ld)),OI=new xt("splineSelfLoopComponents",new Xe),a$=new xt("splineSelfLoopMargins",new zm),nh=new br("spacings"),bx=new xt("partitionConstraint",er),Jg=new Cw((Ke(),Vf),new gn(0)),la=new Iw(yF,new gn(20),new gn(1)),NI=new Iw(pF,new gn(10),new gn(1)),Jo=new Iw(lF,new gn(12),new gn(0)),js=new Cw(gF,Mt(0)),ep=new Iw(khe,new gn(Afe),new gn(0)),Q7=new Cw(ad,(Cc(),id))}function sn(){sn=a,wx=new xt("de.cau.cs.kieler.klay.layered.nodePromotion",(Of(),ax)),l$=new Gw("de.cau.cs.kieler.klay.layered.nodePromotionBoundary",Mt(0),Mt(0),Mt(100)),f$=new xt(_fe,Mt(1)),eb=new Gh("de.cau.cs.kieler.klay.layered.inLayerSpacingFactor",new gn(1),new gn(0)),tc=new xt("de.cau.cs.kieler.klay.layered.edgeSpacingFactor",new gn(.5)),ape=new xt("de.cau.cs.kieler.klay.layered.edgeNodeSpacingFactor",new gn(q6)),GI=new xt("de.cau.cs.kieler.klay.layered.distributeNodes",(jn(),jn(),er)),nb=new xt("de.cau.cs.kieler.klay.layered.wideNodesOnMultipleLayers",(Ic(),xx)),$I=new xt("de.cau.cs.kieler.klay.layered.cycleBreaking",(Bw(),iI)),VI=new xt("de.cau.cs.kieler.klay.layered.nodeLayering",(Kw(),aI)),yx=new xt("de.cau.cs.kieler.klay.layered.crossMin",(Gy(),oI)),HI=new xt("de.cau.cs.kieler.klay.layered.greedySwitch",(g0(),RI)),UI=new xt("de.cau.cs.kieler.klay.layered.nodePlace",(h_(),uI)),o$=new Gw("de.cau.cs.kieler.klay.layered.linearSegmentsDeflectionDampening",new gn(B6),new gn(0),new gn(1)),mx=new xt("de.cau.cs.kieler.klay.layered.fixedAlignment",(s0(),EI)),rp=new xt("de.cau.cs.kieler.klay.layered.edgeLabelSideSelection",(v_(),fx)),s$=new xt(wfe,er),tb=new Gh("de.cau.cs.kieler.klay.layered.thoroughness",Mt(10),Mt(1)),Gr=new xt("de.cau.cs.kieler.klay.layered.layerConstraint",(ma(),gd)),u$=new xt("de.cau.cs.kieler.klay.layered.mergeEdges",er),c$=new xt("de.cau.cs.kieler.klay.layered.mergeHierarchyEdges",Ii),zI=new xt("de.cau.cs.kieler.klay.layered.interactiveReferencePoint",(Hw(),II)),t1=new xt("de.cau.cs.kieler.klay.layered.feedBackEdges",er),jI=new xt("de.cau.cs.kieler.klay.layered.unnecessaryBendpoints",er),FI=new xt("de.cau.cs.kieler.klay.layered.contentAlignment",(Rg(),dn(gI,xe(Ee(bI,1),nt,123,0,[hI])))),h$=new xt("de.cau.cs.kieler.klay.layered.sausageFolding",er),KI=new xt("de.cau.cs.kieler.klay.layered.splines.selfLoopPlacement",(o_(),XI)),BI=new xt("de.cau.cs.kieler.klay.layered.nodeplace.compactionStrategy",(Yy(),cI)),YI=new xt("de.cau.cs.kieler.klay.layered.northOrSouthPort",er),_x=new xt("de.cau.cs.kieler.klay.layered.postCompaction",(Cg(),W0)),WI=new xt("de.cau.cs.kieler.klay.layered.postCompaction.constraints",(Vw(),rI)),qI=new xt("de.cau.cs.kieler.klay.layered.components.compact",er)}function HT(){HT=a,ide=new ra("OUT_T_L",0,(Or(),new Rc(dn((Nc(),Sa),xe(Ee(Un,1),nt,41,0,[Ja,xa])))),(MS(),Cl)),rde=new ra("OUT_T_C",1,new mr(Cr(xe(Ee(yt,1),st,1,4,[dn(Sa,xe(Ee(Un,1),nt,41,0,[Ja,Os])),dn(Sa,xe(Ee(Un,1),nt,41,0,[Ja,Os,Ea]))]))),Jv),ade=new ra("OUT_T_R",2,new Rc(dn(Sa,xe(Ee(Un,1),nt,41,0,[Ja,ka]))),Al),Khe=new ra("OUT_B_L",3,new Rc(dn(Sa,xe(Ee(Un,1),nt,41,0,[Ka,xa]))),Cl),Whe=new ra("OUT_B_C",4,new mr(Cr(xe(Ee(yt,1),st,1,4,[dn(Sa,xe(Ee(Un,1),nt,41,0,[Ka,Os])),dn(Sa,xe(Ee(Un,1),nt,41,0,[Ka,Os,Ea]))]))),Jv),Xhe=new ra("OUT_B_R",5,new Rc(dn(Sa,xe(Ee(Un,1),nt,41,0,[Ka,ka]))),Al),Zhe=new ra("OUT_L_T",6,new Rc(dn(Sa,xe(Ee(Un,1),nt,41,0,[xa,Ja,Ea]))),Al),Qhe=new ra("OUT_L_C",7,new mr(Cr(xe(Ee(yt,1),st,1,4,[dn(Sa,xe(Ee(Un,1),nt,41,0,[xa,Xa])),dn(Sa,xe(Ee(Un,1),nt,41,0,[xa,Xa,Ea]))]))),Al),Jhe=new ra("OUT_L_B",8,new Rc(dn(Sa,xe(Ee(Un,1),nt,41,0,[xa,Ka,Ea]))),Al),nde=new ra("OUT_R_T",9,new Rc(dn(Sa,xe(Ee(Un,1),nt,41,0,[ka,Ja,Ea]))),Cl),tde=new ra("OUT_R_C",10,new mr(Cr(xe(Ee(yt,1),st,1,4,[dn(Sa,xe(Ee(Un,1),nt,41,0,[ka,Xa])),dn(Sa,xe(Ee(Un,1),nt,41,0,[ka,Xa,Ea]))]))),Cl),ede=new ra("OUT_R_B",11,new Rc(dn(Sa,xe(Ee(Un,1),nt,41,0,[ka,Ka,Ea]))),Cl),Uhe=new ra("IN_T_L",12,new mr(Cr(xe(Ee(yt,1),st,1,4,[dn(Ki,xe(Ee(Un,1),nt,41,0,[Ja,xa])),dn(Ki,xe(Ee(Un,1),nt,41,0,[Ja,xa,Ea]))]))),Cl),Vhe=new ra("IN_T_C",13,new mr(Cr(xe(Ee(yt,1),st,1,4,[dn(Ki,xe(Ee(Un,1),nt,41,0,[Ja,Os])),dn(Ki,xe(Ee(Un,1),nt,41,0,[Ja,Os,Ea]))]))),Jv),Yhe=new ra("IN_T_R",14,new mr(Cr(xe(Ee(yt,1),st,1,4,[dn(Ki,xe(Ee(Un,1),nt,41,0,[Ja,ka])),dn(Ki,xe(Ee(Un,1),nt,41,0,[Ja,ka,Ea]))]))),Al),Hhe=new ra("IN_C_L",15,new mr(Cr(xe(Ee(yt,1),st,1,4,[dn(Ki,xe(Ee(Un,1),nt,41,0,[Xa,xa])),dn(Ki,xe(Ee(Un,1),nt,41,0,[Xa,xa,Ea]))]))),Cl),Ghe=new ra("IN_C_C",16,new mr(Cr(xe(Ee(yt,1),st,1,4,[dn(Ki,xe(Ee(Un,1),nt,41,0,[Xa,Os])),dn(Ki,xe(Ee(Un,1),nt,41,0,[Xa,Os,Ea]))]))),Jv),zhe=new ra("IN_C_R",17,new mr(Cr(xe(Ee(yt,1),st,1,4,[dn(Ki,xe(Ee(Un,1),nt,41,0,[Xa,ka])),dn(Ki,xe(Ee(Un,1),nt,41,0,[Xa,ka,Ea]))]))),Al),Fhe=new ra("IN_B_L",18,new mr(Cr(xe(Ee(yt,1),st,1,4,[dn(Ki,xe(Ee(Un,1),nt,41,0,[Ka,xa])),dn(Ki,xe(Ee(Un,1),nt,41,0,[Ka,xa,Ea]))]))),Cl),qhe=new ra("IN_B_C",19,new mr(Cr(xe(Ee(yt,1),st,1,4,[dn(Ki,xe(Ee(Un,1),nt,41,0,[Ka,Os])),dn(Ki,xe(Ee(Un,1),nt,41,0,[Ka,Os,Ea]))]))),Jv),$he=new ra("IN_B_R",20,new mr(Cr(xe(Ee(yt,1),st,1,4,[dn(Ki,xe(Ee(Un,1),nt,41,0,[Ka,ka])),dn(Ki,xe(Ee(Un,1),nt,41,0,[Ka,ka,Ea]))]))),Al),jR=new ra(ed,21,R0,null)}function afe(e,n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at,gt,mt,Tt,It,Ut,zn,Xn,ha,Ia,Fl,$l,a1,nc,Ci,da,rc,si,mi,Bs,Gl,Au,Vc,rh,Qo,Uc,ib,Qs,Yc,Zs,Za,Wc,ab;for(rh=0,Tt=0,zn=n.length;Tt<zn;++Tt)if(gt=n[Tt],Gi(y(ee(gt,(Ke(),Nt)),28)))for(da=new W(gt.f);da.a<da.c.c.length;){for(Ci=y(K(da),7),si=0,x=new W(Ci.e);x.a<x.c.c.length;)m=y(K(x),12),gt.d!=m.d.f.d&&++si;si>0&&(e.a[Ci.k]=rh++)}else{for(ha=0,da=new W(gt.f);da.a<da.c.c.length;){for(Ci=y(K(da),7),x=new W(Ci.e);x.a<x.c.c.length;)m=y(K(x),12),gt.d!=m.d.f.d&&++ha;e.a[Ci.k]=rh}ha>0&&++rh}for(Yc=0,It=0,Xn=s.length;It<Xn;++It)if(gt=s[It],Gi(y(ee(gt,(Ke(),Nt)),28))){for(Ia=0,da=new W(gt.f);da.a<da.c.c.length&&(Ci=y(K(da),7),Ci.g==(Ye(),Et));)for(x=new W(Ci.b);x.a<x.c.c.length;)if(m=y(K(x),12),gt.d!=m.c.f.d){++Ia;break}for($l=0,mi=new Ln(gt.f,gt.f.c.length);mi.b>0;){for(Ci=(Ct(mi.b>0),y(mi.a.sb(mi.c=--mi.b),7)),si=0,x=new W(Ci.b);x.a<x.c.c.length;)m=y(K(x),12),gt.d!=m.c.f.d&&++si;si>0&&(Ci.g==(Ye(),Et)?(e.a[Ci.k]=Yc,++Yc):(e.a[Ci.k]=Yc+Ia+$l,++$l))}Yc+=$l}else{for(ha=0,da=new W(gt.f);da.a<da.c.c.length;){for(Ci=y(K(da),7),x=new W(Ci.b);x.a<x.c.c.length;)m=y(K(x),12),gt.d!=m.c.f.d&&++ha;e.a[Ci.k]=Yc}ha>0&&++Yc}for(rc=(Qn(),new ln),H=new ba,mt=0,Ut=n.length;mt<Ut;++mt)for(gt=n[mt],ib=new W(gt.f);ib.a<ib.c.c.length;)for(Uc=y(K(ib),7),x=new W(Uc.e);x.a<x.c.c.length;)if(m=y(K(x),12),Za=m.d,gt.d!=Za.f.d)if(Qo=y(Oi(Di(rc.d,Uc)),197),Zs=y(Oi(Di(rc.d,Za)),197),!Qo&&!Zs)j=new sie,H.a.db(j,H),tt(j.a,m),tt(j.d,Uc),Oa(rc.d,Uc,j),tt(j.d,Za),Oa(rc.d,Za,j);else if(!Qo)tt(Zs.a,m),tt(Zs.d,Uc),Oa(rc.d,Uc,Zs);else if(!Zs)tt(Qo.a,m),tt(Qo.d,Za),Oa(rc.d,Za,Qo);else if(Qo==Zs)tt(Qo.a,m);else{for(tt(Qo.a,m),nc=new W(Zs.d);nc.a<nc.c.c.length;)a1=y(K(nc),7),Oa(rc.d,a1,Qo);Vn(Qo.a,Zs.a),Vn(Qo.d,Zs.d),H.a.eb(Zs)!=null}for(z=y(mT(H,Ge(FBe,{674:1,3:1,5:1,6:1},197,H.a.Y(),0,1)),674),at=n[0].d,Vc=s[0].d,N=0,D=z.length;N<D;++N)for(R=z[N],R.e=rh,R.f=Yc,da=new W(R.d);da.a<da.c.c.length;)Ci=y(K(da),7),Bs=e.a[Ci.k],Ci.f.d==at?(Bs<R.e&&(R.e=Bs),Bs>R.b&&(R.b=Bs)):Ci.f.d==Vc&&(Bs<R.f&&(R.f=Bs),Bs>R.c&&(R.c=Bs));for(Pv(z,0,z.length,(Nh(),Nh(),bd)),Qs=Ge(gr,vr,26,z.length,12,1),f=Ge(gr,vr,26,Yc+1,12,1),ie=0;ie<z.length;ie++)Qs[ie]=z[ie].f,f[Qs[ie]]=1;for(b=0,se=0;se<f.length;se++)f[se]==1?f[se]=b:--b;for(Gl=0,ce=0;ce<Qs.length;ce++)Qs[ce]+=f[Qs[ce]],Gl=Ei(Gl,Qs[ce]+1);for(S=1;S<Gl;)S*=2;for(ab=2*S-1,S-=1,Wc=Ge(gr,vr,26,ab,12,1),d=0,Je=0;Je<Qs.length;Je++)for(We=Qs[Je]+S,++Wc[We];We>0;)We%2>0&&(d+=Wc[We+1]),We=(We-1)/2|0,++Wc[We];for(Ve=Ge(nve,st,156,z.length*2,0,1),fe=0;fe<z.length;fe++)Ve[2*fe]=new jw(z[fe],z[fe].e,z[fe].b,(zw(),X0)),Ve[2*fe+1]=new jw(z[fe],z[fe].b,z[fe].e,K0);for(Pv(Ve,0,Ve.length,bd),Fl=0,_e=0;_e<Ve.length;_e++)switch(Ve[_e].d.e){case 0:++Fl;break;case 1:--Fl,d+=Fl}for(Au=Ge(nve,st,156,z.length*2,0,1),Re=0;Re<z.length;Re++)Au[2*Re]=new jw(z[Re],z[Re].f,z[Re].c,(zw(),X0)),Au[2*Re+1]=new jw(z[Re],z[Re].c,z[Re].f,K0);for(Pv(Au,0,Au.length,bd),Fl=0,Z=0;Z<Au.length;Z++)switch(Au[Z].d.e){case 0:++Fl;break;case 1:--Fl,d+=Fl}return d}function Ke(){Ke=a;var e,n;Ehe=new xt("de.cau.cs.kieler.animate",(jn(),jn(),Ii)),new xt("de.cau.cs.kieler.minAnimTime",Mt(400)),new xt("de.cau.cs.kieler.maxAnimTime",Mt(4e3)),new xt("de.cau.cs.kieler.animTimeFactor",Mt(100)),A0=new xt("de.cau.cs.kieler.additionalPortSpace",null),$g=new xt("de.cau.cs.kieler.commentBox",er),new br("de.cau.cs.kieler.diagramType"),Wa=new xt("de.cau.cs.kieler.edgeLabelPlacement",(mu(),bR)),fF=new xt("de.cau.cs.kieler.edgeType",(y_(),wR)),The=new br("de.cau.cs.kieler.fontName"),Rhe=new xt("de.cau.cs.kieler.fontSize",Mt(0)),L0=new xt("de.cau.cs.kieler.hypernode",er),pr=new xt("de.cau.cs.kieler.junctionPoints",new ea),new xt("de.cau.cs.kieler.layoutAncestors",er),N0=new xt("de.cau.cs.kieler.margins",new zm),Gg=new Gh("de.cau.cs.kieler.minHeight",new gn(0),new gn(0)),Hg=new Gh("de.cau.cs.kieler.minWidth",new gn(0),new gn(0)),O0=new xt("de.cau.cs.kieler.noLayout",er),Vf=new br("de.cau.cs.kieler.offset"),Mc=new br("de.cau.cs.kieler.klay.layered.portAnchor"),jc=new br("de.cau.cs.kieler.portIndex"),M0=new xt("de.cau.cs.kieler.portSide",(Ye(),Ar)),new xt("de.cau.cs.kieler.progressBar",er),new xt("de.cau.cs.kieler.resetConfig",Ii),new xt("de.cau.cs.kieler.scaleFactor",new gn(1)),zo=new xt("de.cau.cs.kieler.thickness",new gn(1)),new xt("de.cau.cs.kieler.zoomToFit",er),cF=new br("de.cau.cs.kieler.algorithm"),Xs=new xt("de.cau.cs.kieler.alignment",(Fo(),gR)),khe=new xt("de.cau.cs.kieler.aspectRatio",new gn(0)),xR=new br("de.cau.cs.kieler.bendPoints"),lF=new xt("de.cau.cs.kieler.borderSpacing",new gn(-1)),P0=new xt(wfe,er),bo=new xt("de.cau.cs.kieler.direction",(ur(),go)),ad=new xt("de.cau.cs.kieler.edgeRouting",(Cc(),mR)),She=new xt("de.cau.cs.kieler.expandNodes",er),hF=new xt("de.cau.cs.kieler.hierarchyHandling",(i_(),_R)),Ihe=new xt("de.cau.cs.kieler.interactive",er),zv=new Gh("de.cau.cs.kieler.labelSpacing",new gn(3),new gn(0)),dF=new xt("de.cau.cs.kieler.layoutHierarchy",er),Da=new xt("de.cau.cs.kieler.nodeLabelPlacement",(Nc(),n=y(ga(Un),11),new Si(n,y(ta(n,n.length),11),0))),Nt=new xt("de.cau.cs.kieler.portConstraints",(rr(),Il)),D0=new xt("de.cau.cs.kieler.portLabelPlacement",(Rv(),q0)),pF=new Gh("de.cau.cs.kieler.portSpacing",new gn(-1),new gn(0)),ER=new xt("de.cau.cs.kieler.portAlignment",(ml(),Tu)),SR=new xt("de.cau.cs.kieler.portAlignment.north",sd),TR=new xt("de.cau.cs.kieler.portAlignment.south",sd),RR=new xt("de.cau.cs.kieler.portAlignment.west",sd),kR=new xt("de.cau.cs.kieler.portAlignment.east",sd),Vv=new br("de.cau.cs.kieler.position"),gF=new br("de.cau.cs.kieler.priority"),new br(_fe),IR=new xt("de.cau.cs.kieler.selfLoopInside",er),bF=new br("de.cau.cs.kieler.separateConnComp"),Rl=new xt("de.cau.cs.kieler.sizeConstraint",(Pc(),e=y(ga(zg),11),new Si(e,y(ta(e,e.length),11),0))),j0=new xt("de.cau.cs.kieler.sizeOptions",dn((Nv(),G0),xe(Ee(MR,1),nt,139,0,[NR]))),yF=new Gh("de.cau.cs.kieler.spacing",new gn(-1),new gn(0)),Che=new xt("de.cau.cs.kieler.layoutPartitions",er),vF=new br("de.cau.cs.kieler.partition")}function TBe(e,n,s,f){Mle();var d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce;if(!(!f&&(e.n?e.n:(_n(),_n(),b$)).R(new Zne(n)))){if(y(AF.a,18).kb(n)){if(!s.lc())throw new so(Rfe+n+td+s+").");H=y(y(AF.b,57).cb(n),79),z=s.lc().a,Ae(e,H,z);return}else if(y(CF.a,18).kb(n))try{if(!s.jc())throw new Vte;H=y(y(CF.b,57).cb(n),79),se=Mt(_3e(($n(),""+s.jc().a))),Ae(e,H,se);return}catch(fe){throw fe=gi(fe),Qe(fe,130)?new so("Invalid integer format for property '"+n+td+s+")."):bi(fe)}else if(y(SF.a,18).kb(n)){if(!s.ic())throw new so(Rfe+n+td+s+").");H=y(y(SF.b,57).cb(n),79),se=(jn(),s.ic().a?Ii:er),Ae(e,H,se);return}else if(y(IF.a,18).kb(n)){if(!s.jc())throw new so("Invalid float format for property '"+n+td+s+").");H=y(y(IF.b,57).cb(n),79),se=new dte(s.jc().a),Ae(e,H,se);return}else if(y(RF.a,18).kb(n)){if(!s.lc())throw new so(P6+n+td+s+").");N=s.lc().a,D=null;try{or((Ke(),M0),n)?D=(Ye(),y(ni((mse(),Mhe),N),32)):or(Xs,n)?D=(Fo(),y(ni((Rse(),dhe),N),103)):or(bo,n)?D=(ur(),y(ni((yse(),vhe),N),59)):or(ad,n)?D=(Cc(),y(ni((use(),yhe),N),122)):or(hF,n)?D=(i_(),y(ni((Qae(),xhe),N),166)):or(ER,n)||or(kR,n)||or(SR,n)||or(TR,n)||or(RR,n)?D=(ml(),y(ni((wse(),Phe),N),100)):or(Nt,n)?D=(rr(),y(ni((Cse(),Nhe),N),28)):or(D0,n)?D=(Rv(),y(ni((Jae(),Dhe),N),149)):or(fF,n)?D=(y_(),y(ni((Ise(),whe),N),133)):or(Wa,n)?D=(mu(),y(ni((ose(),ghe),N),107)):or((sn(),$I),n)?D=(Bw(),y(ni((qae(),qde),N),193)):or(VI,n)?D=(Kw(),y(ni((Zae(),Hde),N),173)):or(rp,n)?D=(v_(),y(ni((Fse(),Yve),N),115)):or(BI,n)?D=(Yy(),y(ni((fse(),hve),N),194)):or(yx,n)?D=(Gy(),y(ni(($ae(),Qde),N),192)):or(wx,n)?D=(Of(),y(ni((Bse(),Cde),N),109)):or(UI,n)?D=(h_(),y(ni((qse(),uve),N),141)):or(_x,n)?D=(Cg(),y(ni((Ase(),Nde),N),125)):or(WI,n)?D=(Vw(),y(ni((Fae(),Pde),N),175)):or(mx,n)?D=(s0(),y(ni((Qse(),Kve),N),124)):or(HI,n)?D=(g0(),y(ni((goe(),Jve),N),110)):or(Gr,n)?D=(ma(),y(ni(($se(),ipe),N),85)):or(KI,n)?D=(o_(),y(ni((Sse(),ope),N),153)):or(nb,n)?D=(Ic(),y(ni((Tse(),cpe),N),172)):or(zI,n)&&(D=(Hw(),y(ni((hse(),Zve),N),174)))}catch(fe){throw fe=gi(fe),Qe(fe,54)?new so(P6+n+td+s+")."):bi(fe)}H=y(y(RF.b,57).cb(n),79),Ae(e,H,D);return}else if(y(TF.a,18).kb(n)){if(!s.lc())throw new so(P6+n+td+s+").");for(R=s.lc().a,Z=null,S=T_(R,"[\\[\\]\\s,]+"),m=0,x=S.length;m<x;++m)b=S[m],Cy(Af(b))!=0&&(or((Ke(),Da),n)?(!Z&&(Z=(d=y(ga(Un),11),new Si(d,y(ta(d,d.length),11),0))),ji(Z,(Nc(),y(ni((Use(),Ahe),b),41)))):or(Rl,n)?(!Z&&(Z=(d=y(ga(zg),11),new Si(d,y(ta(d,d.length),11),0))),ji(Z,(Pc(),y(ni((lse(),jhe),b),150)))):or(j0,n)?(!Z&&(Z=(d=y(ga(MR),11),new Si(d,y(ta(d,d.length),11),0))),ji(Z,(Nv(),y(ni((cse(),Bhe),b),139)))):or((sn(),FI),n)&&(!Z&&(Z=(d=y(ga(bI),11),new Si(d,y(ta(d,d.length),11),0))),ji(Z,(Rg(),y(ni((Jse(),Vve),b),123)))));H=y(y(TF.b,57).cb(n),79),Ae(e,H,Z);return}else if(y(K_.a,18).kb(n)){if(!s.lc())throw new so("Invalid _other_ format for property '"+n+td+s+").");if(or((Ke(),Vv),n)||or(Mc,n))try{ie=new li,Nje(ie,s.lc().a),H=y(y(K_.b,57).cb(n),79),Ae(e,H,ie);return}catch(fe){throw fe=gi(fe),Qe(fe,29)?new so("Invalid KVector format for property '"+n+"' "+s+"."):bi(fe)}else if(or(xR,n)||or(pr,n))try{ce=new ea,oje(ce,s.lc().a),H=y(y(K_.b,57).cb(n),79),Ae(e,H,ce);return}catch(fe){throw fe=gi(fe),Qe(fe,29)?new so("Invalid KVectorChain format for property '"+n+"' "+s+"."):bi(fe)}else if(or(N0,n)||or(A0,n))try{j=new zm,$je(j,s.lc().a),H=y(y(K_.b,57).cb(n),79),Ae(e,H,j);return}catch(fe){throw fe=gi(fe),Qe(fe,29)?new so("Invalid Margins format for property '"+n+"' "+s+"."):bi(fe)}}else if(y(ude.a,18).kb(n))return;throw new so("Unsupported layout option '"+n+td+s+").")}}var I_="object",Xr={3:1,8:1,5:1,6:1},h6={3:1,46:1},zu={3:1,54:1,46:1},Vu="null",zT="anonymous",d6="Unknown",sfe="function",Fr=2147483647,ofe={181:1,3:1,54:1,46:1},b0=65536,Eu=65535,ufe={3:1,54:1,29:1,46:1},VT='For input string: "',Uu=-2147483648,Jr={56:1},v6={23:1,145:1,185:1},Ui={3:1,5:1},p6="Invalid UTF8 sequence",cfe="fromIndex: ",ri="java.lang",g6="com.google.gwt.core.client",C_="com.google.gwt.core.client.impl",A_="java.io",b6="java.nio.charset",y6="javaemul.internal",vo="com.google.common.base",lfe="%s (%s) must not be negative",st={3:1,5:1,6:1},ffe="negative size: ",nt={3:1,8:1,5:1,11:1,6:1},P_={68:1,136:1,3:1,23:1,17:1},Pg={108:1,35:1},ct="com.google.common.collect",UT={108:1,35:1,96:1},y0={144:1,3:1},kr={35:1},jv={57:1},qt="java.util",Lg={22:1,19:1},Bi={22:1,19:1,18:1},Bv={22:1,19:1,20:1},YT={22:1,19:1,20:1,63:1},qv={35:1,96:1},m6={22:1,19:1,18:1,137:1},m0={21:1},hfe="AbstractMapEntry",w6={207:1,22:1,19:1},_6={159:1,3:1,23:1,17:1},x6=1073741824,xl={22:1},E6={3:1,22:1,19:1},Fv={87:1,3:1,22:1,19:1,20:1,63:1},$v={3:1,57:1},Gv={3:1,22:1,19:1,18:1},Yi={64:1},k6="arraySize",qf="initialArraySize",S6={64:1,188:1,3:1,23:1,17:1},T6="occurrences",vr={52:1,3:1,5:1},R6={205:1,3:1,23:1,17:1},w0=1e-4,Qh="com.google.gwt.json.client",Ls=4194303,El=1048575,Zh=4194304,kl=17592186044416,WT=-17592186044416,dfe=`([{"' \r
336
+ `,vfe=`)]}"' \r
337
+ `,pfe="The given string contains parts that cannot be parsed as numbers.",gfe="de.cau.cs.kieler.core.math",I6=-17976931348623157e292,L_="de.cau.cs.kieler.core.properties",bfe={79:1,23:1},yfe="de.cau.cs.kieler.core.util",mfe="de.cau.cs.kieler.kiml",Ng="LEFT",Og="RIGHT",N_="CENTER",Yu="de.cau.cs.kieler.kiml.options",ed="UNDEFINED",Dg="NONE",wfe="de.cau.cs.kieler.debugMode",_fe="de.cau.cs.kieler.randomSeed",Mg="de.cau.cs.kieler.kiml.util.nodespacing",C6="de.cau.cs.kieler.kiml.util.labelspacing",xfe="portRatioOrPosition",Efe="NodeMarginCalculator",A6="bottom",kfe={286:1,121:1,3:1,5:1},_0="undefined",KT="text",Sfe="stacktrace",on={34:1,3:1,8:1,5:1,6:1},XT="properties",JT="bendPoints",Tfe="junctionPoints",QT="width",ZT="height",eR="padding",jg="children",oa={38:1,39:1,42:1,51:1,71:1,3:1,8:1,5:1,6:1},tR="de.cau.cs.kieler.klay.gwt.client.layout",Rfe="Invalid boolean format for property '",td="' (",P6="Invalid enum format for property '",L6="de.cau.cs.kieler.klay.layered",Ife="Layered layout",Wi=1/0,ii=-1/0,x0="de.cau.cs.kieler.klay.layered.compaction.components",Bg="de.cau.cs.kieler.klay.layered.compaction.oned",Cfe=" instance has been finished already.",nd="de.cau.cs.kieler.klay.layered.compaction.oned.algs",Wu="de.cau.cs.kieler.klay.layered.compaction.recthull",Ks={68:1},ku="de.cau.cs.kieler.klay.layered.components",N6={3:1,5:1,22:1,13:1,19:1,20:1,63:1},Afe=1.600000023841858,Dc=.001,Mn={31:1},E0="de.cau.cs.kieler.klay.layered.compound",wa={38:1,39:1,47:1,42:1,3:1,8:1,5:1,6:1},yi="de.cau.cs.kieler.klay.layered.graph",Pfe="Port side is undefined",jt="de.cau.cs.kieler.klay.layered.intermediate",Lfe="Big nodes pre-processing",Nfe=34028234663852886e22,Ofe={38:1,39:1,42:1,346:1,71:1,3:1,8:1,5:1,6:1},O6="Node '",Dfe="' has its layer constraint set to FIRST or FIRST_SEPARATE, but has ",Mfe="at least one incoming edge. Connections between nodes with these ",D6="layer constraints are not supported.",$o=17976931348623157e292,jfe="Odd port side processing",O_={250:1,3:1,5:1},Sl=1e-8,po="de.cau.cs.kieler.klay.layered.intermediate.compaction",vs="de.cau.cs.kieler.klay.layered.intermediate.greedyswitch",k0={227:1,3:1,5:1},qg="de.cau.cs.kieler.klay.layered.networksimplex",nR="INTERACTIVE",M6="de.cau.cs.kieler.klay.layered.p1cycles",Go={106:1,31:1},D_="de.cau.cs.kieler.klay.layered.p2layers",Bfe="NETWORK_SIMPLEX",Tl="de.cau.cs.kieler.klay.layered.p3order",rR=5960464477539063e-23,j6="Port type is undefined",B6=.30000001192092896,q6=.699999988079071,qfe=.8999999761581421,Ffe="de.cau.cs.kieler.klay.layered.p3order.constraints",S0="de.cau.cs.kieler.klay.layered.p3order.counting",T0="de.cau.cs.kieler.klay.layered.p4nodes",$fe={625:1,3:1,5:1,6:1},Ho="de.cau.cs.kieler.klay.layered.p4nodes.bk",Ff="de.cau.cs.kieler.klay.layered.p5edges",$f="de.cau.cs.kieler.klay.layered.p5edges.splines",Gf=1e-6,M_=-1e-6,Gfe="The list of vectors may not be empty.",iR=.09999999999999998,Ku="de.cau.cs.kieler.klay.layered.properties",Hf="_gwt_modCount",Hfe={3:1,22:1,19:1,20:1,63:1},zfe={3:1,5:1,57:1},Vfe={3:1,5:1,22:1,19:1,50:1,18:1},aR="delete",sR=15525485,F6=16777216,$6=16777215,Ufe={3:1,5:1,22:1,19:1,20:1,63:1},oR={3:1,23:1,17:1,138:1},T,j_,uR;$Oe(),Q(1,null,{},u),T.t=function(n){return this===n},T.u=function(){return this.$c},T.v=function(){return Ec(this)},T.w=function(){return Aae(this)},T.toString=function(){return this.w()},Q(46,1,h6),T.bc=function(){return this.f},T.w=function(){var n,s;return n=Km(this.$c),s=this.bc(),s!=null?n+": "+s:n},Q(54,46,zu),Q(72,54,zu,Bu),Q(164,72,{164:1,3:1,54:1,46:1},gse),T.bc=function(){return XDe(this),this.c},T.cc=function(){return ft(this.b)===ft(B_)?null:this.b};var B_,G6;Q(642,1,{}),Q(356,642,{},l),T.dc=function(n,s){var f={},d=[];n.__gwt$backingJsError={fnStack:d};for(var b=arguments.callee.caller;b;){var m=(Eg(),b.name||(b.name=ONe(b.toString())));d.push(m);var x=":"+m,S=f[x];if(S){var R,N;for(R=0,N=S.length;R<N;R++)if(S[R]===b)return}(S||(f[x]=[])).push(b),b=b.caller}},T.ec=function(n){var s,f,d,b,m;for(d=(Eg(),m=n.__gwt$backingJsError,m&&m.fnStack?m.fnStack:[]),f=d.length,b=Ge(fpe,Xr,146,f,0,1),s=0;s<f;s++)b[s]=new TS(d[s],null,-1);return b},Q(643,642,{}),T.dc=function(n,s){function f(b){if(!("stack"in b))try{throw b}catch{}return b}var d;typeof s=="string"?d=f(new Error(s.replace(`
338
+ `," "))):s&&typeof s==I_&&"stack"in s?d=s:d=f(new Error),n.__gwt$backingJsError=d},T.fc=function(n,s,f,d){return new TS(s,n+"@"+d,f<0?-1:f)},T.ec=function(n){var s,f,d,b,m,x,S;if(b=(Eg(),S=n.__gwt$backingJsError,S&&S.stack?S.stack.split(`
339
+ `):[]),m=Ge(fpe,Xr,146,0,0,1),s=0,d=b.length,d==0)return m;for(x=Hle(this,b[0]),Co(x.d,zT)||(m[s++]=x),f=1;f<d;f++)m[s++]=Hle(this,b[f]);return m},Q(357,643,{},vee),T.fc=function(n,s,f,d){return new TS(s,n,-1)};var Yfe,Wfe,Kfe;Q(181,54,ofe),Q(351,181,ofe,ICe),Q(288,1,{},W5),T.Oc=function(n){var s;return s=new W5,s.g=4,n>1?s.c=Mae(this,n-1):s.c=this,s},T.Pc=function(){return Dh(this),this.b},T.Qc=function(){return Km(this)},T.Rc=function(){return gne(this)},T.Sc=function(){return(this.g&4)!=0},T.Tc=function(){return(this.g&1)!=0},T.w=function(){return(this.g&2?"interface ":this.g&1?"":"class ")+(Dh(this),this.n)},T.g=0,Q(119,72,{3:1,119:1,54:1,46:1},Tte),Q(29,72,ufe,Zp,Rn),Q(95,72,zu,g4,Ao),Q(231,1,{3:1,231:1});var H6;Q(24,231,{3:1,23:1,24:1,231:1},i4),T.F=function(n){return hAe(this,y(n,24))},T.t=function(n){return Qe(n,24)&&y(n,24).a==this.a},T.v=function(){return this.a},T.w=function(){return Xm(this.a)},T.a=0,Kfe={3:1,345:1,23:1,2:1},Q(350,1,Jr,Yp),T.$b=function(n,s){return FLe(bv(n),bv(s))},Q(257,95,zu,zCe),Q(145,1,{23:1,145:1}),T.F=function(n){return fAe(this,y(n,145))},T.t=function(n){var s;return n===this?!0:Qe(n,145)?(s=y(n,145),Co(this.a,s.a)):!1},T.v=function(){return bT(this.a)},T.w=function(){return this.a},Q(358,29,ufe,bPe),Q(256,29,{3:1,54:1,29:1,46:1,256:1},gPe),Q(185,145,v6),Q(289,185,v6,VCe),T.Zc=function(n,s,f){var d,b;for(d=Ge(ype,Ui,26,f,12,1),b=0;b<f;++b)d[b]=n[s+b]&255&Eu;return d},Q(355,185,v6,lAe),T.Zc=function(n,s,f){var d,b,m,x,S,R,N,D;for(m=0,N=0;N<f;){if(++m,b=n[s+N],(b&192)==128)throw new Rn(p6);if(!(b&128))++N;else if((b&224)==192)N+=2;else if((b&240)==224)N+=3;else if((b&248)==240)N+=4;else throw new Rn(p6);if(N>f)throw new Ao(p6)}for(x=Ge(ype,Ui,26,m,12,1),D=0,S=0,R=0;R<f;){for(b=n[s+R++],b&128?(b&224)==192?(S=2,b&=31):(b&240)==224?(S=3,b&=15):(b&248)==240?(S=4,b&=7):(b&252)==248&&(S=5,b&=3):(S=1,b&=127);--S>0;){if(d=n[s+R++],(d&192)!=128)throw new Rn("Invalid UTF8 sequence at "+(s+R-1)+", byte="+(d>>>0).toString(16));b=b<<6|d&63}D+=mDe(b,x,D)}return x};var yt=re(ri,"Object",1),RBe=re(ri,"Throwable",46);re(ri,"Exception",54),re(ri,"RuntimeException",72),re(g6,"JavaScriptException",164),re(C_,"StackTraceCreator/Collector",642),re(C_,"StackTraceCreator/CollectorLegacy",356),re(C_,"StackTraceCreator/CollectorModern",643),re(C_,"StackTraceCreator/CollectorModernNoSourceMap",357),re(A_,"IOException",181),re(A_,"UnsupportedEncodingException",351),re(ri,"Class",288),re(ri,"ClassCastException",119),re(ri,"IllegalArgumentException",29),re(ri,"IndexOutOfBoundsException",95),re(ri,"Number",231);var cR=re(ri,"Integer",24),lR=re(ri,"String",2);re(ri,"String/1",350),re(ri,"StringIndexOutOfBoundsException",257),re(b6,"Charset",145),re(b6,"IllegalCharsetNameException",358),re(b6,"UnsupportedCharsetException",256),re(y6,"EmulatedCharset",185),re(y6,"EmulatedCharset/LatinCharset",289),re(y6,"EmulatedCharset/UtfCharset",355),Q(669,1,{3:1}),re(vo,"Optional",669),Q(601,669,{3:1},c),T.t=function(n){return n===this},T.v=function(){return 2040732332},T.w=function(){return"Optional.absent()"},T.A=function(n){return Dt(n),py(),fR};var fR;re(vo,"Absent",601);var IBe=Rw(vo,"Function");Q(208,1,{},Um),T.C=function(n){return aae(n)},re(vo,"Joiner",208),Q(363,208,{},Nie),T.C=function(n){return vw(this,n)},re(vo,"Joiner/1",363),Q(362,1,{},Zre),re(vo,"Joiner/MapJoiner",362);var CBe=Rw(vo,"Predicate"),Xfe;Q(244,1,{68:1,244:1,3:1},Cee),T.D=function(n){var s;for(s=0;s<this.a.a.length;s++)if(!y(Uie(this.a,s),68).D(n))return!1;return!0},T.t=function(n){var s;return Qe(n,244)?(s=y(n,244),Pce(this.a,s.a)):!1},T.v=function(){return Ooe(this.a)+306654252},T.w=function(){return"Predicates.and("+uB((rw(),Xfe),new ev(this.a))+")"},re(vo,"Predicates/AndPredicate",244),Q(246,1,{68:1,246:1,3:1},Ine),T.D=function(n){try{return this.a.kb(n)}catch(s){if(s=gi(s),Qe(s,76))return!1;if(Qe(s,119))return!1;throw bi(s)}},T.t=function(n){var s;return Qe(n,246)?(s=y(n,246),this.a.t(s.a)):!1},T.v=function(){return this.a.v()},T.w=function(){return"Predicates.in("+this.a+")"},re(vo,"Predicates/InPredicate",246),Q(245,1,{68:1,245:1,3:1},Aee),T.D=function(n){return ho(this.a,n)},T.t=function(n){var s;return Qe(n,245)?(s=y(n,245),ho(this.a,s.a)):!1},T.v=function(){return qo(this.a)},T.w=function(){return"Predicates.equalTo("+this.a+")"},re(vo,"Predicates/IsEqualToPredicate",245),Q(17,1,{3:1,23:1,17:1}),T.F=function(n){return PCe(this,y(n,17))},T.t=function(n){return this===n},T.v=function(){return Ec(this)},T.w=function(){return yw(this)},T.e=0;var Sn=re(ri,"Enum",17);Q(136,17,P_);var Jfe,Qfe,z6,Zfe,q_=rn(vo,"Predicates/ObjectPredicate",136,Sn,uLe);Q(591,136,P_,pie),T.D=function(n){return!0},T.w=function(){return"Predicates.alwaysTrue()"},rn(vo,"Predicates/ObjectPredicate/1",591,q_,null),Q(592,136,P_,gie),T.D=function(n){return!1},T.w=function(){return"Predicates.alwaysFalse()"},rn(vo,"Predicates/ObjectPredicate/2",592,q_,null),Q(593,136,P_,Ore),T.D=function(n){return n==null},T.w=function(){return"Predicates.isNull()"},rn(vo,"Predicates/ObjectPredicate/3",593,q_,null),Q(594,136,P_,Hre),T.D=function(n){return n!=null},T.w=function(){return"Predicates.notNull()"},rn(vo,"Predicates/ObjectPredicate/4",594,q_,null),Q(177,669,{177:1,3:1},qm),T.t=function(n){var s;return Qe(n,177)?(s=y(n,177),ho(this.a,s.a)):!1},T.v=function(){return 1502476572+qo(this.a)},T.w=function(){return"Optional.of("+this.a+")"},T.A=function(n){return new qm(AS(n.B(this.a),"the Function passed to Optional.transform() must not return null."))},re(vo,"Present",177),Q(108,1,Pg),T.I=function(){gCe()},re(ct,"UnmodifiableIterator",108),Q(651,108,UT),T.J=function(n){throw new fr},T.O=function(n){throw new fr},re(ct,"UnmodifiableListIterator",651),Q(378,651,UT),T.G=function(){return this.b<this.c},T.K=function(){return this.b>0},T.H=function(){if(this.b>=this.c)throw new Ga;return bne(this,this.b++)},T.L=function(){return this.b},T.M=function(){if(this.b<=0)throw new Ga;return bne(this,--this.b)},T.N=function(){return this.b-1},T.b=0,T.c=0,re(ct,"AbstractIndexedListIterator",378),Q(428,108,Pg),T.G=function(){return vl(this)},T.H=function(){return Vh(this)},T.d=1,re(ct,"AbstractIterator",428),Q(653,1,{144:1}),T.P=function(){var n;return n=this.f,n||(this.f=this.S())},T.T=function(){return new yk(this.P())},T.t=function(n){return Y5(this,n)},T.v=function(){return this.P().v()},T.V=function(){return this.Y()==0},T.W=function(){return pS(this)},T.w=function(){return this.P().w()},re(ct,"AbstractMultimap",653),Q(294,653,y0),T.Q=function(){uq(this)},T.R=function(n){return kv(this.b,n)},T.S=function(){return new mk(this,this.b)},T.T=function(){return new Yre(this,this.b)},T.$=function(){return QOe(this.Z())},T.U=function(n){return ds(this,n)},T.X=function(n){return AT(this,n)},T.Y=function(){return this.c},T.c=0,re(ct,"AbstractMapBasedMultimap",294),Q(600,294,y0),T.Z=function(){return new sa(this.a)},T.$=function(){return Or(),Or(),R0},T.U=function(n){return y(ds(this,n),20)},T.X=function(n){return y(AT(this,n),20)},T.P=function(){var n;return n=this.f,n||(this.f=new mk(this,this.b))},T.t=function(n){return Y5(this,n)},re(ct,"AbstractListMultimap",600),Q(388,1,kr),T.G=function(){return this.b.b||this.d.G()},T.H=function(){var n;return this.d.G()||(n=xg(this.b),n.yb(),this.a=y(n.zb(),19),this.d=this.a.mb()),this.d.H()},T.I=function(){this.d.I(),this.a.V()&&w5(this.b),--this.c.c},re(ct,"AbstractMapBasedMultimap/Itr",388),Q(389,388,kr,eoe),re(ct,"AbstractMapBasedMultimap/1",389),Q(638,1,jv),T.Q=function(){this.bb().Q()},T._=function(n){return wT(this,n)},T.R=function(n){return!!_q(this,n,!1)},T.ab=function(n){var s,f,d;for(f=this.bb().mb();f.G();)if(s=y(f.H(),21),d=s.zb(),ft(n)===ft(d)||n!=null&&ho(n,d))return!0;return!1},T.t=function(n){return uce(this,n)},T.cb=function(n){return Oi(_q(this,n,!1))},T.v=function(){return H5(this.bb())},T.V=function(){return this.Y()==0},T.W=function(){return new pn(this)},T.db=function(n,s){throw new nv("Put not supported on this map")},T.eb=function(n){return Oi(_q(this,n,!0))},T.Y=function(){return this.bb().Y()},T.w=function(){return ece(this)},T.fb=function(){return new cy(this)},re(qt,"AbstractMap",638),Q(654,638,jv),T.bb=function(){return FB(this)},T.W=function(){var n;return n=this.d,n||(this.d=new yk(this))},T.fb=function(){return uae(this)},re(ct,"Maps/ViewCachingAbstractMap",654),Q(262,654,jv,mk),T.cb=function(n){return gNe(this,n)},T.eb=function(n){return sOe(this,n)},T.Q=function(){this.a==this.b.b?uq(this.b):Lw(new a5(this))},T.R=function(n){return Iue(this.a,n)},T.hb=function(){return new Pee(this)},T.gb=function(){return this.hb()},T.t=function(n){return this===n||uce(this.a,n)},T.v=function(){return H5(new xc(this.a))},T.W=function(){return pS(this.b)},T.Y=function(){return nw(this.a)},T.w=function(){return ece(this.a)},re(ct,"AbstractMapBasedMultimap/AsMap",262),Q(640,1,Lg),T.ib=function(n){return MLe()},T.jb=function(n){return Na(this,n)},T.Q=function(){Dw(this)},T.kb=function(n){return Zy(this,n,!1)},T.lb=function(n){return gl(this,n)},T.V=function(){return this.Y()==0},T.nb=function(n){return Zy(this,n,!0)},T.ob=function(){return this.pb(Ge(yt,st,1,this.Y(),4,1))},T.pb=function(n){return mT(this,n)},T.w=function(){return _l(this)},re(qt,"AbstractCollection",640),Q(641,640,Bi),T.t=function(n){return fue(this,n)},T.v=function(){return H5(this)},re(qt,"AbstractSet",641),Q(649,641,Bi),re(ct,"Sets/ImprovedAbstractSet",649),Q(655,649,Bi),T.Q=function(){this.qb().Q()},T.kb=function(n){return vue(this,n)},T.V=function(){return this.qb().V()},T.nb=function(n){var s;return this.kb(n)?(s=y(n,21),this.qb().W().nb(s.yb())):!1},T.Y=function(){return this.qb().Y()},re(ct,"Maps/EntrySet",655),Q(387,655,Bi,Pee),T.kb=function(n){return Cue(new xc(this.a.a),n)},T.mb=function(){return new a5(this.a)},T.qb=function(){return this.a},T.nb=function(n){var s;return Cue(new xc(this.a.a),n)?(s=y(n,21),YLe(this.a.b,s.yb()),!0):!1},re(ct,"AbstractMapBasedMultimap/AsMap/AsMapEntries",387),Q(299,1,kr,a5),T.H=function(){var n;return n=xg(this.b),this.a=y(n.zb(),19),dNe(this.c,n)},T.G=function(){return this.b.b},T.I=function(){w5(this.b),this.c.b.c-=this.a.Y(),this.a.Q()},re(ct,"AbstractMapBasedMultimap/AsMap/AsMapIterator",299),Q(260,649,Bi,yk),T.Q=function(){this.b.Q()},T.kb=function(n){return this.b.R(n)},T.V=function(){return this.b.V()},T.mb=function(){return Qn(),aS(this.b.bb().mb(),(fw(),hR))},T.nb=function(n){return this.b.R(n)?(this.b.eb(n),!0):!1},T.Y=function(){return this.b.Y()},re(ct,"Maps/KeySet",260),Q(386,260,Bi,Yre),T.Q=function(){var n;Lw((n=this.b.bb().mb(),new M4(this,n)))},T.lb=function(n){return this.b.W().lb(n)},T.t=function(n){return this===n||this.b.W().t(n)},T.v=function(){return this.b.W().v()},T.mb=function(){var n;return n=this.b.bb().mb(),new M4(this,n)},T.nb=function(n){var s,f;return f=0,s=y(this.b.eb(n),19),s&&(f=s.Y(),s.Q(),this.a.c-=f),f>0},re(ct,"AbstractMapBasedMultimap/KeySet",386),Q(300,1,kr,M4),T.G=function(){return this.c.G()},T.H=function(){return this.a=y(this.c.H(),21),this.a.yb()},T.I=function(){var n;Yh(!!this.a),n=y(this.a.zb(),19),this.c.I(),this.b.a.c-=n.Y(),n.Q()},re(ct,"AbstractMapBasedMultimap/KeySet/1",300),Q(216,640,Lg,Vy),T.ib=function(n){return xNe(this,n)},T.jb=function(n){return EOe(this,n)},T.Q=function(){SLe(this)},T.kb=function(n){return hs(this),this.d.kb(n)},T.lb=function(n){return hs(this),this.d.lb(n)},T.t=function(n){return FPe(this,n)},T.v=function(){return hs(this),this.d.v()},T.mb=function(){return hs(this),new AB(this)},T.nb=function(n){return BLe(this,n)},T.Y=function(){return hs(this),this.d.Y()},T.w=function(){return hs(this),Ya(this.d)},re(ct,"AbstractMapBasedMultimap/WrappedCollection",216);var ABe=Rw(qt,"List");Q(297,216,Bv,GB),T.rb=function(n,s){var f;hs(this),f=this.d.V(),y(this.d,20).rb(n,s),++this.a.c,f&&xw(this)},T.sb=function(n){return hs(this),y(this.d,20).sb(n)},T.tb=function(){return hs(this),new Pre(this)},T.ub=function(n){return hs(this),new _ae(this,n)},T.vb=function(n){var s;return hs(this),s=y(this.d,20).vb(n),--this.a.c,Nw(this),s},T.wb=function(n,s){return hs(this),y(this.d,20).wb(n,s)},T.xb=function(n,s){return hs(this),f5(this.a,this.e,y(this.d,20).xb(n,s),this.b?this.b:this)},re(ct,"AbstractMapBasedMultimap/WrappedList",297),Q(385,297,YT,uie),re(ct,"AbstractMapBasedMultimap/RandomAccessWrappedList",385),Q(189,1,kr,AB),T.G=function(){return mv(this),this.b.G()},T.H=function(){return mv(this),this.b.H()},T.I=function(){this.b.I(),--this.d.f.c,Nw(this.d)},re(ct,"AbstractMapBasedMultimap/WrappedCollection/WrappedIterator",189),Q(298,189,qv,Pre,_ae),T.J=function(n){var s;s=sAe(this.a)==0,(mv(this),y(this.b,96)).J(n),++this.a.a.c,s&&xw(this.a)},T.K=function(){return(mv(this),y(this.b,96)).K()},T.L=function(){return(mv(this),y(this.b,96)).L()},T.M=function(){return(mv(this),y(this.b,96)).M()},T.N=function(){return(mv(this),y(this.b,96)).N()},T.O=function(n){(mv(this),y(this.b,96)).O(n)},re(ct,"AbstractMapBasedMultimap/WrappedList/WrappedListIterator",298),Q(295,216,Bi,gB),re(ct,"AbstractMapBasedMultimap/WrappedSet",295),Q(296,216,m6,bB),re(ct,"AbstractMapBasedMultimap/WrappedSortedSet",296),Q(668,1,m0),T.t=function(n){var s;return Qe(n,21)?(s=y(n,21),$h(this.yb(),s.yb())&&$h(this.zb(),s.zb())):!1},T.v=function(){var n,s;return n=this.yb(),s=this.zb(),(n==null?0:qo(n))^(s==null?0:qo(s))},T.Ab=function(n){throw new fr},T.w=function(){return this.yb()+"="+this.zb()},re(ct,hfe,668),Q(390,640,Lg,Lee),T.Q=function(){uq(this.a)},T.kb=function(n){return vOe(this.a,n)},T.mb=function(){return new eoe(this.a)},T.Y=function(){return this.a.c},re(ct,"AbstractMultimap/Values",390),Q(656,640,w6),T.ib=function(n){return this.Bb(n,1),!0},T.Bb=function(n,s){throw new fr},T.jb=function(n){return UDe(this,n)},T.Q=function(){Lw(this.Eb())},T.kb=function(n){return this.Cb(n)>0},T.Cb=function(n){var s,f;for(f=wv(this).mb();f.G();)if(s=y(f.H(),83),$h(s.Zb(),n))return s.Yb();return 0},T.gb=function(){return new Nee(this)},T.bb=function(){return wv(this)},T.t=function(n){return OMe(this,n)},T.v=function(){return wv(this).v()},T.V=function(){return wv(this).V()},T.mb=function(){return tv(),new Dne(this,wv(this).mb())},T.nb=function(n){return this.Fb(n,1)>0},T.Fb=function(n,s){throw new fr},T.Gb=function(n,s){var f,d;return tv(),Mi(s,"count"),f=this.Cb(n),d=s-f,d>0?this.Bb(n,d):d<0&&this.Fb(n,-d),f},T.Hb=function(n,s,f){return bOe(this,n,s,f)},T.Y=function(){return ZNe(this)},T.w=function(){return Ya(wv(this))},re(ct,"AbstractMultiset",656),Q(657,649,Bi),T.Q=function(){this.Ib().Q()},T.kb=function(n){var s,f;return Qe(n,83)?(f=y(n,83),f.Yb()<=0?!1:(s=this.Ib().Cb(f.Zb()),s==f.Yb())):!1},T.nb=function(n){var s,f,d,b;return Qe(n,83)&&(f=y(n,83),s=f.Zb(),d=f.Yb(),d!=0)?(b=this.Ib(),b.Hb(s,d,0)):!1},re(ct,"Multisets/EntrySet",657),Q(396,657,Bi,Nee),T.mb=function(){return this.a.Eb()},T.Ib=function(){return this.a},T.Y=function(){return this.a.Db()},re(ct,"AbstractMultiset/EntrySet",396),Q(384,294,y0),T.Z=function(){return new bk(XS(this.a))},T.$=function(){return os(),_v(),Fg},T.U=function(n){return y(ds(this,n),18)},T.X=function(n){return y(AT(this,n),18)},T.P=function(){var n;return n=this.f,n||(this.f=new mk(this,this.b))},T.t=function(n){return Y5(this,n)},re(ct,"AbstractSetMultimap",384),Q(342,656,w6),re(ct,"AbstractSortedMultiset",342),Q(280,600,y0,nS),T.a=0,re(ct,"ArrayListMultimap",280),Q(159,17,_6);var F_,Ns,V6=rn(ct,"BoundType",159,Sn,xPe);Q(623,159,_6,gre),rn(ct,"BoundType/1",623,V6,null),Q(624,159,_6,Rre),rn(ct,"BoundType/2",624,V6,null);var U6;Q(234,1,xl),T.w=function(){return DLe(this.c.mb())},re(ct,"FluentIterable",234),Q(170,234,xl,dv),T.mb=function(){return Xt(this)},re(ct,"FluentIterable/2",170),Q(664,1,{}),T.w=function(){return Ya(ls(this.a.d).b)},re(ct,"ForwardingObject",664),Q(665,664,Lg),T.ib=function(n){return ls(this.a.d),Ate()},T.jb=function(n){return ls(this.a.d),Pte()},T.Q=function(){ls(this.a.d),Lte()},T.kb=function(n){return V4(ls(this.a.d),n)},T.lb=function(n){return Yne(ls(this.a.d),n)},T.V=function(){return ls(this.a.d).b.V()},T.mb=function(){var n;return n=ls(this.a.d).b.mb(),new u4(n)},T.nb=function(n){return ls(this.a.d),Nte()},T.Y=function(){return ls(this.a.d).b.Y()},T.ob=function(){return Sae(ls(this.a.d))},T.pb=function(n){return n5(ls(this.a.d),n)},re(ct,"ForwardingCollection",665),Q(660,640,E6),T.mb=function(){return this.Kb()},T.ib=function(n){return hCe()},T.jb=function(n){return dCe()},T.Q=function(){vCe()},T.kb=function(n){return n!=null&&Zy(this,n,!1)},T.Jb=function(){switch(this.Y()){case 0:return Or(),Or(),R0;case 1:return Or(),new Rc(this.Kb().H());default:return new nae(this,this.ob())}},T.nb=function(n){return pCe()},re(ct,"ImmutableCollection",660),Q(316,660,E6,k4),T.mb=function(){return _g(this.a.mb())},T.kb=function(n){return n!=null&&this.a.kb(n)},T.lb=function(n){return this.a.lb(n)},T.V=function(){return this.a.V()},T.Kb=function(){return _g(this.a.mb())},T.Y=function(){return this.a.Y()},T.ob=function(){return this.a.ob()},T.pb=function(n){return this.a.pb(n)},T.w=function(){return Ya(this.a)},re(ct,"ForwardingImmutableCollection",316),Q(87,660,Fv),T.mb=function(){return this.Kb()},T.tb=function(){return this.Lb(0)},T.ub=function(n){return this.Lb(n)},T.xb=function(n,s){return this.Mb(n,s)},T.rb=function(n,s){throw new fr},T.t=function(n){return FMe(this,n)},T.v=function(){return YNe(this)},T.Kb=function(){return this.Lb(0)},T.Lb=function(n){return cB(this,n)},T.vb=function(n){throw new fr},T.wb=function(n,s){throw new fr},T.Mb=function(n,s){var f;return n_((f=new qne(this),new LS(f,n,s)))};var R0;re(ct,"ImmutableList",87),Q(667,87,Fv),T.mb=function(){return _g(this.Nb().mb())},T.xb=function(n,s){return n_(this.Nb().xb(n,s))},T.kb=function(n){return yie(this,n)},T.lb=function(n){return this.Nb().lb(n)},T.t=function(n){return this.Nb().t(n)},T.sb=function(n){return fre(this,n)},T.v=function(){return this.Nb().v()},T.V=function(){return this.Nb().V()},T.Kb=function(){return _g(this.Nb().mb())},T.Y=function(){return this.Nb().Y()},T.Mb=function(n,s){return n_(this.Nb().xb(n,s))},T.ob=function(){return this.Nb().pb(Ge(yt,st,1,this.Nb().Y(),4,1))},T.pb=function(n){return this.Nb().pb(n)},T.w=function(){return Ya(this.Nb())},re(ct,"ForwardingImmutableList",667),Q(524,1,$v),T.bb=function(){return wf(this)},T.W=function(){return Zie(this)},T.fb=function(){return this.Rb()},T.Q=function(){throw new fr},T.R=function(n){return this.cb(n)!=null},T.ab=function(n){return this.Rb().kb(n)},T.Pb=function(){return new Bte(this)},T.Qb=function(){return new qte(this)},T.t=function(n){return gOe(this,n)},T.v=function(){return wf(this).v()},T.V=function(){return this.Y()==0},T.db=function(n,s){return bCe()},T.eb=function(n){throw new fr},T.w=function(){var n;return Qn(),n=gg(yNe(this.Y()),123),kOe(the,n,wf(this).mb()),n.a+="}",n.a},T.Rb=function(){return this.g?this.g:this.g=this.Qb()},T.e=null,T.f=null,T.g=null,re(ct,"ImmutableMap",524),Q(320,524,$v),T.R=function(n){return Iue(this.d,n)},T.ab=function(n){return Une(this.d,n)},T.Ob=function(){return Q5(new Oee(this))},T.Pb=function(){return Q5(pae(this.d))},T.Qb=function(){return os(),new k4(bae(this.d))},T.t=function(n){return Sne(this.d,n)},T.cb=function(n){return n==null?null:t0(this.d,n)},T.v=function(){return this.d.c.v()},T.V=function(){return this.d.c.V()},T.Y=function(){return this.d.c.Y()},T.w=function(){return Ya(this.d.c)},re(ct,"ForwardingImmutableMap",320),Q(666,665,Bi),T.t=function(n){return n===this||kne(ls(this.a.d),n)},T.v=function(){return ls(this.a.d).b.v()},re(ct,"ForwardingSet",666),Q(523,666,Bi,Oee),T.kb=function(n){if(Qe(n,21)&&y(n,21).yb()==null)return!1;try{return V4(ls(this.a.d),n)}catch(s){if(s=gi(s),Qe(s,119))return!1;throw bi(s)}},T.pb=function(n){var s;return s=n5(ls(this.a.d),n),ls(this.a.d).b.Y()<s.length&&Rs(s,ls(this.a.d).b.Y(),null),s},re(ct,"ForwardingImmutableMap/1",523),Q(663,660,Gv),T.mb=function(){return this.Kb()},T.t=function(n){return pce(this,n)},T.v=function(){return BNe(this)},re(ct,"ImmutableSet",663),Q(315,663,Gv),T.mb=function(){return _g(new Jp(this.a.b.mb()))},T.kb=function(n){return n!=null&&tAe(this.a,n)},T.lb=function(n){return nAe(this.a,n)},T.v=function(){return this.a.b.v()},T.V=function(){return this.a.b.V()},T.Kb=function(){return _g(new Jp(this.a.b.mb()))},T.Y=function(){return this.a.b.Y()},T.ob=function(){return this.a.b.ob()},T.pb=function(n){return rAe(this.a,n)},T.w=function(){return Ya(this.a.b)},re(ct,"ForwardingImmutableSet",315),Q(178,1,{178:1,3:1},w_),T.t=function(n){var s;return Qe(n,178)?(s=y(n,178),this.a.t(s.a)&&this.b==s.b&&this.c==s.c&&this.d==s.d&&this.f==s.f&&$h(this.e,s.e)&&$h(this.g,s.g)):!1},T.v=function(){return tT(xe(Ee(yt,1),st,1,4,[this.a,this.e,this.d,this.g,this.f]))},T.w=function(){return gg(ul(gg(ul(gg(Vs(ul(new ig,this.a),":"),this.d==(oo(),F_)?91:40),this.b?this.e:"-∞"),44),this.c?this.g:"∞"),this.f==F_?93:41).a},T.b=!1,T.c=!1,re(ct,"GeneralRange",178),Q(215,384,y0,Ey),T.a=2,re(ct,"HashMultimap",215),Q(661,87,Fv),T.kb=function(n){return this.Sb().kb(n)},T.V=function(){return this.Sb().V()},T.Y=function(){return this.Sb().Y()},re(ct,"ImmutableAsList",661),Q(275,320,$v),T.Rb=function(){return this.Ub()},T.fb=function(){return this.Ub()},T.Ub=function(){return Zie(this.Tb())},re(ct,"ImmutableBiMap",275),Q(341,668,{3:1,21:1},j4),T.yb=function(){return this.a},T.zb=function(){return this.b},T.Ab=function(n){throw new fr},re(ct,"ImmutableEntry",341),Q(436,315,Gv,Ute),re(ct,"ImmutableEnumSet",436),Q(379,378,UT,oae),re(ct,"ImmutableList/1",379),Q(266,108,Pg,QE),T.G=function(){return this.a.G()},T.H=function(){return y(this.a.H(),21).yb()},re(ct,"ImmutableMap/1",266),Q(670,663,Gv),T.mb=function(){var n;return n=wf(this.a).Kb(),new QE(n)},T.Jb=function(){return new E4(this)},T.Kb=function(){var n;return(n=this.c,n||(this.c=new E4(this))).Kb()},re(ct,"ImmutableSet/Indexed",670),Q(606,670,Gv,Bte),T.mb=function(){var n;return n=wf(this.a).Kb(),new QE(n)},T.kb=function(n){return this.a.R(n)},T.Kb=function(){var n;return n=wf(this.a).Kb(),new QE(n)},T.Y=function(){return this.a.Y()},re(ct,"ImmutableMapKeySet",606),Q(604,660,E6,qte),T.mb=function(){return new cS(this)},T.kb=function(n){return n!=null&&(sr(),sr(),Doe(new cS(this),(rw(),n==null?(QB(),z6):new Aee(n)))!=-1)},T.Jb=function(){var n;return n=Qie(wf(this.a)),new jre(this,n)},T.Kb=function(){return new cS(this)},T.Y=function(){return this.a.Y()},re(ct,"ImmutableMapValues",604),Q(282,108,Pg,cS),T.G=function(){return this.a.G()},T.H=function(){return y(this.a.H(),21).zb()},re(ct,"ImmutableMapValues/1",282),Q(605,661,Fv,jre),T.Sb=function(){return this.a},T.sb=function(n){return y(this.b.sb(n),21).zb()},re(ct,"ImmutableMapValues/2",605),Q(311,661,Fv,E4),T.Sb=function(){return this.a},T.sb=function(n){return dPe(this.a,n)},re(ct,"ImmutableSet/Indexed/1",311),Q(414,234,xl,kre),T.mb=function(){return pB(this.a)},T.w=function(){return _l(this.a)+" (cycled)"},re(ct,"Iterables/1",414),Q(105,1,Yi,w),T.B=function(n){return y(n,22).mb()},re(ct,"Iterables/12",105),Q(415,234,xl,Bie),T.mb=function(){return dg(this)},re(ct,"Iterables/4",415),Q(416,234,xl,qie),T.mb=function(){return Lo(this)},re(ct,"Iterables/5",416);var ehe,Y6;Q(424,651,UT,_),T.G=function(){return!1},T.K=function(){return!1},T.H=function(){throw new Ga},T.L=function(){return 0},T.M=function(){throw new Ga},T.N=function(){return-1},re(ct,"Iterators/1",424),Q(264,108,Pg,ZE),T.G=function(){return!this.a},T.H=function(){if(this.a)throw new Ga;return this.a=!0,this.b},T.a=!1,re(ct,"Iterators/11",264),Q(425,1,kr,E),T.G=function(){return!1},T.H=function(){throw new Ga},T.I=function(){Yh(!1)},re(ct,"Iterators/2",425),Q(426,108,Pg,Dee),T.G=function(){return this.a.G()},T.H=function(){return this.a.H()},re(ct,"Iterators/3",426),Q(427,1,kr,mie),T.G=function(){return this.a.G()||this.b.mb().G()},T.H=function(){return I5(this)},T.I=function(){this.a.I()},re(ct,"Iterators/4",427),Q(429,428,Pg,Ane),re(ct,"Iterators/6",429),Q(261,1,kr),T.G=function(){return this.b.G()},T.H=function(){return Xne(this)},T.I=function(){this.b.I()},re(ct,"TransformedIterator",261),Q(430,261,kr,Vre),T.Vb=function(n){return hne(this,n)},re(ct,"Iterators/7",430),Q(313,1,kr),T.G=function(){return Vt(this)},T.H=function(){return Gt(this)},T.I=function(){Yh(!!this.c),this.c.I(),this.c=null},re(ct,"MultitransformedIterator",313),Q(90,313,{90:1,35:1},Po),T.Wb=function(n){return y(n,35)},re(ct,"Iterators/ConcatenatedIterator",90),Q(314,313,kr,T4),T.Wb=function(n){return jNe(y(n,35))},re(ct,"Iterators/ConcatenatedIterator/1",314),Q(329,653,y0,Y4),T.U=function(n){return new wk(this,n)},T.X=function(n){return h5(this,n)},T.Q=function(){UB(this)},T.R=function(n){return q4(this,n)},T.S=function(){return new U4(this)},T.T=function(){return new Mee(this)},T.V=function(){return!this.a},T.Y=function(){return this.d},T.c=0,T.d=0,re(ct,"LinkedListMultimap",329),Q(647,640,Bv),T.rb=function(n,s){throw new nv("Add not supported on this list")},T.ib=function(n){return this.rb(this.Y(),n),!0},T.Q=function(){this.Xb(0,this.Y())},T.t=function(n){return Pce(this,n)},T.v=function(){return Ooe(this)},T.mb=function(){return new ev(this)},T.tb=function(){return this.ub(0)},T.ub=function(n){return new Ln(this,n)},T.vb=function(n){throw new nv("Remove not supported on this list")},T.Xb=function(n,s){var f,d;for(d=this.ub(n),f=n;f<s;++f)d.H(),d.I()},T.wb=function(n,s){throw new nv("Set not supported on this list")},T.xb=function(n,s){return new LS(this,n,s)},T.d=0,re(qt,"AbstractList",647),Q(648,647,Bv),T.rb=function(n,s){gw(this,n,s)},T.sb=function(n){return Sg(this,n)},T.mb=function(){return this.ub(0)},T.vb=function(n){return hq(this,n)},T.wb=function(n,s){var f,d;f=this.ub(n);try{return d=f.H(),f.O(s),d}catch(b){throw b=gi(b),Qe(b,74)?new Ao("Can't set element "+n):bi(b)}},re(qt,"AbstractSequentialList",648),Q(276,648,Bv,wk),T.ub=function(n){return lB(this,n)},T.Y=function(){var n;return n=y(bn(this.a.b,this.b),126),n?n.a:0},re(ct,"LinkedListMultimap/1",276),Q(330,648,Bv,e4),T.ub=function(n){return new Wue(this.a,n)},T.Y=function(){return this.a.d},re(ct,"LinkedListMultimap/1EntriesImpl",330),Q(563,649,Bi,Mee),T.kb=function(n){return q4(this.a,n)},T.mb=function(){return new toe(this.a)},T.nb=function(n){return!h5(this.a,n).a.V()},T.Y=function(){return nw(this.a.b)},re(ct,"LinkedListMultimap/1KeySetImpl",563),Q(562,1,kr,toe),T.G=function(){return _B(this),!!this.c},T.H=function(){_B(this),cw(this.c),this.a=this.c,Dn(this.d,this.a.a);do this.c=this.c.b;while(this.c&&!Dn(this.d,this.c.a));return this.a.a},T.I=function(){_B(this),Yh(!!this.a),Lw(new FS(this.e,this.a.a)),this.a=null,this.b=this.e.c},T.b=0,re(ct,"LinkedListMultimap/DistinctKeyIterator",562),Q(126,1,{126:1},t5),T.a=0,re(ct,"LinkedListMultimap/KeyList",126),Q(560,668,m0,Pne),T.yb=function(){return this.a},T.zb=function(){return this.f},T.Ab=function(n){var s;return s=this.f,this.f=n,s},re(ct,"LinkedListMultimap/Node",560),Q(561,1,qv,Wue),T.J=function(n){y(n,21),yCe()},T.H=function(){return Uae(this)},T.M=function(){return Yae(this)},T.O=function(n){y(n,21),mCe()},T.G=function(){return mw(this),!!this.c},T.K=function(){return mw(this),!!this.e},T.L=function(){return this.d},T.N=function(){return this.d-1},T.I=function(){mw(this),Yh(!!this.a),this.a!=this.c?(this.e=this.a.d,--this.d):this.c=this.a.b,Ece(this.f,this.a),this.a=null,this.b=this.f.c},T.b=0,T.d=0,re(ct,"LinkedListMultimap/NodeIterator",561),Q(241,1,qv,FS,yce),T.J=function(n){this.e=BT(this.f,this.b,n,this.c),++this.d,this.a=null},T.G=function(){return!!this.c},T.K=function(){return!!this.e},T.H=function(){return PS(this)},T.L=function(){return this.d},T.M=function(){return Bae(this)},T.N=function(){return this.d-1},T.I=function(){Yh(!!this.a),this.a!=this.c?(this.e=this.a.e,--this.d):this.c=this.a.c,Ece(this.f,this.a),this.a=null},T.O=function(n){uw(!!this.a),this.a.f=n},T.d=0,re(ct,"LinkedListMultimap/ValueForKeyIterator",241),Q(419,647,Bv),T.rb=function(n,s){this.a.rb(n,s)},T.kb=function(n){return this.a.kb(n)},T.sb=function(n){return this.a.sb(n)},T.vb=function(n){return this.a.vb(n)},T.wb=function(n,s){return this.a.wb(n,s)},T.Y=function(){return this.a.Y()},re(ct,"Lists/AbstractListWrapper",419),Q(420,419,YT),re(ct,"Lists/RandomAccessListWrapper",420),Q(422,420,YT,qne),T.ub=function(n){return this.a.ub(n)},re(ct,"Lists/1",422),Q(88,647,{88:1,22:1,19:1,20:1},ag),T.rb=function(n,s){this.a.rb(yv(this,n),s)},T.Q=function(){this.a.Q()},T.sb=function(n){return this.a.sb(VB(this,n))},T.mb=function(){return Gae(this,0)},T.ub=function(n){return Gae(this,n)},T.vb=function(n){return this.a.vb(VB(this,n))},T.Xb=function(n,s){(Lae(n,s,this.a.Y()),WS(this.a.xb(yv(this,s),yv(this,n)))).Q()},T.wb=function(n,s){return this.a.wb(VB(this,n),s)},T.Y=function(){return this.a.Y()},T.xb=function(n,s){return Lae(n,s,this.a.Y()),WS(this.a.xb(yv(this,s),yv(this,n)))},re(ct,"Lists/ReverseList",88),Q(220,88,{88:1,22:1,19:1,20:1,63:1},gy),re(ct,"Lists/RandomAccessReverseList",220),Q(421,1,qv,One),T.J=function(n){this.c.J(n),this.c.M(),this.a=!1},T.G=function(){return this.c.K()},T.K=function(){return this.c.G()},T.H=function(){if(!this.c.K())throw new Ga;return this.a=!0,this.c.M()},T.L=function(){return yv(this.b,this.c.L())},T.M=function(){if(!this.c.G())throw new Ga;return this.a=!0,this.c.H()},T.N=function(){return yv(this.b,this.c.L())-1},T.I=function(){Yh(this.a),this.c.I(),this.a=!1},T.O=function(n){uw(this.a),this.c.O(n)},T.a=!1,re(ct,"Lists/ReverseList/1",421);var the;Q(376,261,kr,Ure),T.Vb=function(n){return Qn(),new j4(n,hre(this.a,n))},re(ct,"Maps/1",376),Q(188,17,S6);var hR,W6,K6=rn(ct,"Maps/EntryFunction",188,Sn,_Pe);Q(374,188,S6,Kne),T.B=function(n){return y(n,21).yb()},rn(ct,"Maps/EntryFunction/1",374,K6,null),Q(375,188,S6,xre),T.B=function(n){return y(n,21).zb()},rn(ct,"Maps/EntryFunction/2",375,K6,null),Q(373,640,Lg,Fne),T.Q=function(){this.a.Q()},T.kb=function(n){return this.a.ab(n)},T.V=function(){return this.a.V()},T.mb=function(){return lae(this)},T.nb=function(n){var s,f;try{return Zy(this,n,!0)}catch(d){if(d=gi(d),Qe(d,45)){for(f=this.a.bb().mb();f.G();)if(s=y(f.H(),21),$h(n,s.zb()))return this.a.eb(s.yb()),!0;return!1}else throw bi(d)}},T.Y=function(){return this.a.Y()},re(ct,"Maps/Values",373),Q(301,654,jv,U4),T.cb=function(n){return this.a.R(n)?this.a.U(n):null},T.eb=function(n){return this.a.R(n)?this.a.X(n):null},T.Q=function(){this.a.Q()},T.R=function(n){return this.a.R(n)},T.hb=function(){return new jee(this)},T.gb=function(){return this.hb()},T.V=function(){return this.a.V()},T.W=function(){return this.a.W()},T.Y=function(){return this.a.W().Y()},re(ct,"Multimaps/AsMap",301),Q(393,655,Bi,jee),T.mb=function(){return VAe(this.a.a.W(),new Bee(this))},T.qb=function(){return this.a},T.nb=function(n){var s;return vue(this,n)?(s=y(n,21),kCe(this.a,s.yb()),!0):!1},re(ct,"Multimaps/AsMap/EntrySet",393),Q(395,1,Yi,Bee),T.B=function(n){return hre(this,n)},re(ct,"Multimaps/AsMap/EntrySet/1",395),Q(391,656,w6,qee),T.Q=function(){UB(this.a)},T.kb=function(n){return q4(this.a,n)},T.Cb=function(n){var s;return s=y(t0(qh(this.a),n),19),s?s.Y():0},T.gb=function(){return new $ee(this)},T.Db=function(){return qh(this.a).Y()},T.Eb=function(){return new R4(FB(qh(this.a)).mb())},T.mb=function(){return iae(this)},T.Fb=function(n,s){var f,d,b,m,x;if(Mi(s,T6),s==0)return x=y(t0(qh(this.a),n),19),x?x.Y():0;if(m=y(t0(qh(this.a),n),19),!m)return 0;if(b=m.Y(),s>=b)m.Q();else for(d=m.mb(),f=0;f<s;f++)d.H(),d.I();return b},re(ct,"Multimaps/Keys",391),Q(302,261,kr,R4),T.Vb=function(n){return new Fee(y(n,21))},re(ct,"Multimaps/Keys/1",302),Q(658,1,{83:1}),T.t=function(n){var s;return Qe(n,83)?(s=y(n,83),this.Yb()==s.Yb()&&$h(this.Zb(),s.Zb())):!1},T.v=function(){var n;return n=this.Zb(),(n==null?0:qo(n))^this.Yb()},T.w=function(){return rse(this)},re(ct,"Multisets/AbstractEntry",658),Q(394,658,{83:1},Fee),T.Yb=function(){return y(this.a.zb(),19).Y()},T.Zb=function(){return this.a.yb()},re(ct,"Multimaps/Keys/1/1",394),Q(392,657,Bi,$ee),T.kb=function(n){var s,f;return Qe(n,83)?(f=y(n,83),s=y(qh(this.a.a).cb(f.Zb()),19),!!s&&s.Y()==f.Yb()):!1},T.V=function(){return!this.a.a.a},T.mb=function(){return new R4(FB(qh(this.a.a)).mb())},T.Ib=function(){return this.a},T.nb=function(n){var s,f;return Qe(n,83)&&(f=y(n,83),s=y(qh(this.a.a).cb(f.Zb()),19),s&&s.Y()==f.Yb())?(s.Q(),!0):!1},T.Y=function(){return qh(this.a.a).Y()},re(ct,"Multimaps/Keys/KeysEntrySet",392),Q(659,1,Jr),re(ct,"Ordering",659),Q(398,659,Jr,v),T.$b=function(n,s){return IAe(y(n,83),y(s,83))},re(ct,"Multisets/1",398),Q(397,658,{83:1,3:1},Fie),T.Yb=function(){return this.a},T.Zb=function(){return this.b},T.a=0,re(ct,"Multisets/ImmutableEntry",397),Q(303,1,kr,Dne),T.G=function(){return this.d>0||this.c.G()},T.H=function(){if(!(this.d>0||this.c.G()))throw new Ga;return this.d==0&&(this.b=y(this.c.H(),83),this.f=this.d=this.b.Yb()),--this.d,this.a=!0,this.b.Zb()},T.I=function(){Yh(this.a),this.f==1?this.c.I():this.e.Fb(this.b.Zb(),1)>0,--this.f,this.a=!1},T.a=!1,T.d=0,T.f=0,re(ct,"Multisets/MultisetIteratorImpl",303),Q(622,659,{3:1,56:1},p),T.$b=function(n,s){return BAe(y(n,23),y(s,23))},T.w=function(){return"Ordering.natural()"};var nhe;re(ct,"NaturalOrdering",622),Q(343,661,Fv,nae),T.ub=function(n){return cB(this.b,n)},T.Sb=function(){return this.a},T.sb=function(n){return fre(this.b,n)},T.Lb=function(n){return cB(this.b,n)},re(ct,"RegularImmutableAsList",343),Q(559,275,$v,hae),T.Tb=function(){return this.a};var rhe;re(ct,"RegularImmutableBiMap",559),Q(53,667,Fv,mr),T.Nb=function(){return this.a},re(ct,"RegularImmutableList",53),Q(321,320,$v,I4),re(ct,"RegularImmutableMap",321),Q(265,315,Gv,Lk);var Fg;re(ct,"RegularImmutableSet",265),Q(650,641,Bi),re(ct,"Sets/SetView",650),Q(377,650,Bi,xie),T.kb=function(n){return ff(this.b,n)&&ff(this.c,n)},T.lb=function(n){return gl(this.b,n)&&gl(this.c,n)},T.V=function(){return VS(this)},T.mb=function(){var n;return Bh((n=new pn(this.b.a).a.bb().mb(),new mn(n)),this.a)},T.Y=function(){var n;return jS(Bh((n=new pn(this.b.a).a.bb().mb(),new mn(n)),this.a))},re(ct,"Sets/2",377),Q(328,275,$v,zae,Lse),T.fb=function(){return os(),new sl(this.c)},T.Tb=function(){var n;return n=this.a,n||(this.a=new Lse(this.c,this.b,this))},T.Ub=function(){return os(),new sl(this.c)},re(ct,"SingletonImmutableBiMap",328),Q(127,667,Fv,Rc),T.Nb=function(){return this.a},re(ct,"SingletonImmutableList",127),Q(135,663,Gv,sl),T.mb=function(){return sr(),new ZE(this.a)},T.kb=function(n){return ho(this.a,n)},T.Kb=function(){return sr(),new ZE(this.a)},T.Y=function(){return 1},re(ct,"SingletonImmutableSet",135),Q(285,342,{207:1,3:1,22:1,19:1},u5,Rue),T.Bb=function(n,s){return __(this,n,s)},T.Cb=function(n){return g_(this,n)},T.Db=function(){return Sv(U5(this,(hw(),X6)))},T.Eb=function(){return new Wre(this)},T.Fb=function(n,s){return jq(this,n,s)},T.Gb=function(n,s){return Jue(this,n,s)},T.Hb=function(n,s,f){var d,b,m;return Mi(f,"newCount"),Mi(s,"oldCount"),hv(Oy(this.b,n)),m=this.c.a,m?(b=Ge(gr,vr,26,1,12,1),d=t6(m,this.d,n,s,f,b),Aw(this.c,m,d),b[0]==s):s==0?(f>0&&__(this,n,f),!0):!1},T.Y=function(){return Sv(U5(this,(hw(),dR)))},re(ct,"TreeMultiset",285),Q(619,658,{83:1},Mne),T.Yb=function(){var n;return n=this.b.c,n==0?g_(this.a,this.b.b):n},T.Zb=function(){return this.b.b},re(ct,"TreeMultiset/1",619),Q(620,1,kr,Wre),T.H=function(){return pOe(this)},T.G=function(){return Roe(this)},T.I=function(){Yh(!!this.b),Jue(this.c,this.b.b.b,0),this.b=null},re(ct,"TreeMultiset/2",620),Q(205,17,R6);var X6,dR,J6=rn(ct,"TreeMultiset/Aggregate",205,Sn,EPe);Q(617,205,R6,bre),T._b=function(n){return n.c},T.ac=function(n){return n?n.j:0},rn(ct,"TreeMultiset/Aggregate/1",617,J6,null),Q(618,205,R6,Gre),T._b=function(n){return 1},T.ac=function(n){return n?n.a:0},rn(ct,"TreeMultiset/Aggregate/2",618,J6,null),Q(206,658,{83:1,206:1},e_),T.Yb=function(){return this.c},T.Zb=function(){return this.b},T.w=function(){return tv(),rse(new Fie(this.b,this.c))},T.a=0,T.c=0,T.d=0,T.j=0,re(ct,"TreeMultiset/AvlNode",206),Q(616,1,{},g),re(ct,"TreeMultiset/Reference",616);var PBe=re(g6,"JavaScriptObject$",0),vR;Q(628,1,{}),re(g6,"Scheduler",628);var $_=0,ihe=0,G_=-1;Q(360,628,{},h);var Q6;re(C_,"SchedulerImpl",360),Q(646,1,{}),T.hc=function(){return null},T.ic=function(){return null},T.jc=function(){return null},T.kc=function(){return null},T.lc=function(){return null},re(Qh,"JSONValue",646),Q(214,646,{214:1},l4,Gee),T.t=function(n){return Qe(n,214)?this.a==y(n,214).a:!1},T.gc=function(){return rCe},T.v=function(){return Ec(this.a)},T.hc=function(){return this},T.w=function(){var n,s,f;for(f=new rg("["),s=0,n=this.a.length;s<n;s++)s>0&&(f.a+=","),ul(f,dl(this,s));return f.a+="]",f.a},re(Qh,"JSONArray",214),Q(292,646,{},t4),T.gc=function(){return iCe},T.ic=function(){return this},T.w=function(){return Fre(this.a)},T.a=!1;var ahe,she;re(Qh,"JSONBoolean",292),Q(371,72,zu,Yte),re(Qh,"JSONException",371),Q(435,646,{},k),T.gc=function(){return cCe},T.w=function(){return Vu};var ohe;re(Qh,"JSONNull",435),Q(104,646,{104:1},ek),T.t=function(n){return Qe(n,104)?this.a==y(n,104).a:!1},T.gc=function(){return aCe},T.v=function(){return yr(ze(this.a))},T.jc=function(){return this},T.w=function(){return this.a+""},T.a=0,re(Qh,"JSONNumber",104),Q(69,646,{69:1},Ch,tk),T.t=function(n){return Qe(n,69)?this.a==y(n,69).a:!1},T.gc=function(){return sCe},T.v=function(){return Ec(this.a)},T.kc=function(){return this},T.w=function(){var n,s,f,d,b,m;for(m=new rg("{"),n=!0,b=foe(this,Ge(lR,Xr,2,0,5,1)),f=0,d=b.length;f<d;++f)s=b[f],n?n=!1:m.a+=", ",Vs(m,Lce(s)),m.a+=":",ul(m,Jn(this,s));return m.a+="}",m.a},re(Qh,"JSONObject",69),Q(361,641,Bi,Bne),T.kb=function(n){return uo(n)&&BCe(this.a,bv(n))},T.mb=function(){return new ev(new zs(this.b))},T.Y=function(){return this.b.length},re(Qh,"JSONObject/1",361);var pR;Q(97,646,{97:1},mf),T.t=function(n){return Qe(n,97)?Co(this.a,y(n,97).a):!1},T.gc=function(){return oCe},T.v=function(){return bT(this.a)},T.lc=function(){return this},T.w=function(){return Lce(this.a)},re(Qh,"JSONString",97);var uhe,che,Z6;Q(186,1,{},ww,mB),T.b=!1,T.c=0,T.d=-1,T.e=0,T.f=!1,T.j=0,re("de.cau.cs.kieler.core.alg","BasicProgressMonitor",186),Q(10,1,{10:1,286:1,3:1,5:1},li,_f,Rt,hr),T.t=function(n){return loe(this,n)},T.v=function(){return yr(ze(this.a))+RDe(yr(ze(this.b)))},T.w=function(){return"("+this.a+","+this.b+")"},T.a=0,T.b=0;var un=re(gfe,"KVector",10);Q(58,648,{3:1,5:1,22:1,19:1,58:1,20:1},pi),T.ib=function(n){return kn(this,n)},T.Q=function(){Fu(this)},T.ub=function(n){return xn(this,n)},T.Y=function(){return this.b},T.b=0,re(qt,"LinkedList",58),Q(44,58,{44:1,286:1,3:1,5:1,22:1,19:1,58:1,20:1},ea,tS),T.w=function(){var n,s,f;for(n=new rg("("),s=xn(this,0);s.b!=s.d.c;)f=y(vn(s),10),Vs(n,f.a+","+f.b),s.b!=s.d.c&&(n.a+="; ");return n.a+=")",n.a},re(gfe,"KVectorChain",44);var rd=Rw(L_,"IProperty");Q(131,1,{179:1,131:1,3:1},I),re(L_,"MapPropertyHolder",131),Q(14,1,bfe,Cw,Iw,br,xt,Gh,Gw),T.F=function(n){return mAe(this,y(n,79))},T.t=function(n){return XB(this,n)},T.mc=function(){return this.b},T.nc=function(){return this.c},T.oc=function(){return this.d},T.v=function(){return bT(this.b)},T.w=function(){return this.b};var lhe,fhe;re(L_,"Property",14),Q(366,1,{23:1},C),T.F=function(n){return-1},re(L_,"Property/1",366),Q(367,1,{23:1},P),T.F=function(n){return 1},re(L_,"Property/2",367),Q(27,1,{27:1,22:1},jr),T.t=function(n){var s,f,d;return Qe(n,27)?(f=y(n,27),s=this.a==null?f.a==null:ho(this.a,f.a),d=this.b==null?f.b==null:ho(this.b,f.b),s&&d):!1},T.v=function(){var n,s,f,d,b,m;return f=this.a==null?0:qo(this.a),n=f&Eu,s=f&-65536,m=this.b==null?0:qo(this.b),d=m&Eu,b=m&-65536,n^b>>16&Eu|s^d<<16},T.mb=function(){return new Hee(this)},T.w=function(){return this.a==null&&this.b==null?"pair(null,null)":this.a==null?"pair(null,"+Ya(this.b)+")":this.b==null?"pair("+Ya(this.a)+",null)":"pair("+Ya(this.a)+","+Ya(this.b)+")"},re(yfe,"Pair",27),Q(431,1,kr,Hee),T.G=function(){return!this.c&&(!this.b&&this.a.a!=null||this.a.b!=null)},T.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 Ga},T.I=function(){throw this.c&&this.a.b!=null?this.a.b=null:this.b&&this.a.a!=null&&(this.a.a=null),new vy},T.b=!1,T.c=!1,re(yfe,"Pair/1",431),Q(228,72,zu,Vm),re(mfe,"UnsupportedConfigurationException",228),Q(99,72,zu,so),re(mfe,"UnsupportedGraphException",99);var eF;Q(103,17,{103:1,3:1,23:1,17:1},sg);var gR,H_,z_,V_,U_,Y_,hhe=rn(Yu,"Alignment",103,Sn,PLe),dhe;Q(59,17,{59:1,3:1,23:1,17:1},wy);var Su,ps,_a,go,Xu,I0=rn(Yu,"Direction",59,Sn,fLe),vhe;Q(107,17,{107:1,3:1,23:1,17:1},Jm);var C0,zf,Hv,bR,phe=rn(Yu,"EdgeLabelPlacement",107,Sn,iLe),ghe;Q(122,17,{122:1,3:1,23:1,17:1},Qm);var id,tF,yR,mR,bhe=rn(Yu,"EdgeRouting",122,Sn,aLe),yhe;Q(133,17,{133:1,3:1,23:1,17:1},og);var nF,rF,iF,aF,wR,sF,mhe=rn(Yu,"EdgeType",133,Sn,LLe),whe;Q(166,17,{166:1,3:1,23:1,17:1},kk);var oF,_R,uF,_he=rn(Yu,"HierarchyHandling",166,Sn,OPe),xhe,A0,cF,Xs,Ehe,khe,xR,lF,$g,P0,bo,Wa,ad,fF,She,The,Rhe,hF,L0,Ihe,pr,zv,dF,Che,N0,Gg,Hg,Da,O0,Vf,vF,ER,kR,SR,TR,RR,Mc,Nt,jc,D0,M0,pF,Vv,gF,IR,bF,Rl,j0,yF,zo;Q(41,17,{41:1,3:1,23:1,17:1},hf);var Os,xa,Ea,ka,Ki,Sa,Ka,Xa,Ja,Un=rn(Yu,"NodeLabelPlacement",41,Sn,oNe),Ahe;Q(100,17,{100:1,3:1,23:1,17:1},_y);var mF,wF,_F,Tu,sd,xF=rn(Yu,"PortAlignment",100,Sn,CLe),Phe;Q(28,17,{28:1,3:1,23:1,17:1},ug);var Uv,Ti,Vo,B0,yo,Il,Lhe=rn(Yu,"PortConstraints",28,Sn,ALe),Nhe;Q(149,17,{149:1,3:1,23:1,17:1},Sk);var CR,AR,q0,Ohe=rn(Yu,"PortLabelPlacement",149,Sn,DPe),Dhe;Q(32,17,{32:1,3:1,23:1,17:1},xy);var lt,Et,Yv,Uf,Qa,Bc,W_,Wv,Yf,gs,fi,bs,Uo,ys,od,Kv,Wf,Xv,At,Ar,vt,Qr=rn(Yu,"PortSide",32,Sn,lLe),Mhe;Q(150,17,{150:1,3:1,23:1,17:1},Zm);var F0,PR,LR,$0,zg=rn(Yu,"SizeConstraint",150,Sn,oLe),jhe;Q(139,17,{139:1,3:1,23:1,17:1},ew);var NR,OR,G0,DR,MR=rn(Yu,"SizeOptions",139,Sn,sLe),Bhe;Q(62,1,{62:1},Ok,Is),T.t=function(n){var s;return n==null||!Qe(n,62)?!1:(s=y(n,62),Va(this.d,s.d)&&Va(this.e,s.e)&&Va(this.c,s.c)&&Va(this.b,s.b))},T.v=function(){return tT(xe(Ee(yt,1),st,1,4,[this.d,this.e,this.c,this.b]))},T.w=function(){return"Rect[x="+this.d+",y="+this.e+",w="+this.c+",h="+this.b+"]"},T.b=0,T.c=0,T.d=0,T.e=0,re(Mg,"Rectangle",62),Q(283,62,{283:1,62:1},Ste),T.a=0,re(C6,"LabelGroup",283),Q(67,17,{67:1,3:1,23:1,17:1},ra);var qhe,Fhe,$he,Ghe,Hhe,zhe,Vhe,Uhe,Yhe,Whe,Khe,Xhe,Jhe,Qhe,Zhe,ede,tde,nde,rde,ide,ade,jR,sde=rn(C6,"LabelLocation",67,Sn,iq);Q(225,17,{225:1,3:1,23:1,17:1},Tk);var Jv,Cl,Al,LBe=rn(C6,"TextAlignment",225,Sn,MPe),ud;Q(589,1,{},Nle),T.a=0,T.b=!1,T.d=0,T.f=0,T.k=0,T.r=0,T.s=0,re(Mg,"LabelAndNodeSizeProcessor/NodeData",589),Q(171,17,{171:1,3:1,23:1,17:1},Rk);var Yo,Ju,ode,H0,NBe=rn(Mg,"LabelSide",171,Sn,NPe);Q(590,1,{},zee),T.b=!0,T.c=!0,T.d=!0,T.e=!0,re(Mg,Efe,590),Q(121,1,kfe),T.t=function(n){var s;return Qe(n,121)?(s=y(n,121),this.d==s.d&&this.a==s.a&&this.b==s.b&&this.c==s.c):!1},T.v=function(){var n,s;return n=yr(ze(this.b))<<16,n|=yr(ze(this.a))&Eu,s=yr(ze(this.c))<<16,s|=yr(ze(this.d))&Eu,n^s},T.w=function(){return"[top="+this.d+",left="+this.b+",bottom="+this.a+",right="+this.c+"]"},T.a=0,T.b=0,T.c=0,T.d=0,re(Mg,"Spacing",121),Q(232,121,kfe,v4,cie,die),re(Mg,"Spacing/Insets",232),Q(65,121,{286:1,121:1,65:1,3:1,5:1},zm,Mo,xB),re(Mg,"Spacing/Margins",65),Q(364,1,{},Mue),T.c=!1,T.d=null,T.g=null;var EF,kF,BR;re(tR,"JsonGraphImporter",364);var SF,TF,RF,IF,CF,ude,K_,AF,PF;Q(417,14,bfe,Zne),re(tR,"LayoutOptionResolver/DummyProperty",417),Q(348,1,{},bee);var LF;re(tR,"RecursiveLGraphLayout",348),Q(73,99,{73:1,3:1,54:1,46:1},lk,Ly,vu);var cde=re(tR,"UnsupportedJsonGraphException",73);Q(380,1,{},dae);var lde,fde;re(L6,"GraphConfigurator",380),Q(49,1,{},Zn),re(L6,"IntermediateProcessingConfiguration",49),Q(365,1,{},ase),re(L6,"KlayLayered",365),Q(577,1,{},moe),T.i=0;var hde;re(x0,"ComponentsToCGraphTransformer",577);var dde;Q(578,1,{},$),T.tc=function(n,s){return wn(n.wc(),s.wc())},T.uc=function(n,s){return wn(n.xc(),s.xc())},re(x0,"ComponentsToCGraphTransformer/1",578),Q(25,1,{25:1}),T.k=0,T.o=null,T.p=!0,T.r=ii;var X_=re(Bg,"CNode",25);Q(198,25,{198:1,25:1},sB,N5),T.vc=function(){this.b.d=this.j.d,this.b.e=this.j.e},T.wc=function(){return this.a!=null?ze(this.a):this.c.i},T.xc=function(){return this.a!=null?ze(this.a):this.c.i},T.w=function(){return""},re(x0,"ComponentsToCGraphTransformer/CRectNode",198),Q(549,1,{},Y);var qR,FR;re(x0,"OneDimensionalComponentsCompaction",549),Q(550,1,Yi,V),T.B=function(n){return QS(),jn(),y(y(n,27).a,25).f.f!=0?Ii:er},re(x0,"OneDimensionalComponentsCompaction/lambda$0$Type",550),Q(551,1,Yi,U),T.B=function(n){return QS(),jn(),tq(y(y(n,27).a,25).n,y(y(n,27).b,59))||y(y(n,27).a,25).f.f!=0&&tq(y(y(n,27).a,25).n,y(y(n,27).b,59))?Ii:er},re(x0,"OneDimensionalComponentsCompaction/lambda$1$Type",551),Q(324,1,{},HB),re(Bg,"CGraph",324),Q(78,1,{78:1},c_),T.b=0,T.c=0,T.d=0,T.f=0,T.i=!0,T.j=ii,re(Bg,"CGroup",78),Q(470,1,{},G),T.tc=function(n,s){return rt(n.wc(),s.wc())},T.uc=function(n,s){return rt(n.xc(),s.xc())},re(Bg,"ISpacingsHandler/1",470),Q(323,1,{},Lq),T.e=!1;var vde,pde,gde,$R=re(Bg,"OneDimensionalCompactor",323);Q(554,1,Yi,L),T.B=function(n){return dS(),jn(),y(y(n,27).a,25).f.f!=0?Ii:er},re(Bg,"OneDimensionalCompactor/lambda$0$Type",554),Q(335,1,{},CB),T.a=!1,T.b=!1,T.c=!1,T.d=!1,re(Bg,"Quadruplet",335),Q(587,1,{},O),T.Cc=function(n){var s,f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe;for(D=Wi,d=new W(n.a.b);d.a<d.c.c.length;)s=y(K(d),25),D=wn(D,s.f.g.j.d+s.g.a);for(se=new pi,S=new W(n.a.a);S.a<S.c.c.length;)x=y(K(S),78),x.j=D,x.f==0&&Br(se,x,se.c.b,se.c);for(;se.b!=0;){for(x=y(se.b==0?null:(Ct(se.b!=0),$u(se,se.a.a)),78),b=x.g.j.d,z=(ie=new pn(x.a.a).a.bb().mb(),new mn(ie));z.a.G();)j=(m=y(z.a.H(),21),y(m.yb(),25)),fe=x.j+j.g.a,j.f.i||j.j.d<fe?j.r=fe:j.r=j.j.d;for(b-=x.g.r,x.b+=b,n.d==(ur(),_a)||n.d==Su?x.c+=b:x.c-=b,H=(Z=new pn(x.a.a).a.bb().mb(),new mn(Z));H.a.G();)for(j=(m=y(H.a.H(),21),y(m.yb(),25)),N=j.i.mb();N.G();)R=y(N.H(),25),Ph(n.d)?ce=n.g.tc(j,R):ce=n.g.uc(j,R),R.f.j=rt(R.f.j,j.r+j.j.c+ce-R.g.a),R.p||(R.f.j=rt(R.f.j,R.j.d-R.g.a)),--R.f.f,R.f.f==0&&kn(se,R.f)}for(f=new W(n.a.b);f.a<f.c.c.length;)s=y(K(f),25),s.j.d=s.r},re(nd,"LongestPathCompaction",587),Q(588,1,{},M),T.Dc=function(n){var s,f,d,b,m,x,S;for(f=new W(n.a.b);f.a<f.c.c.length;)s=y(K(f),25),s.i.Q();for(b=new W(n.a.b);b.a<b.c.c.length;)for(d=y(K(b),25),x=new W(n.a.b);x.a<x.c.c.length;)m=y(K(x),25),d!=m&&(d.f&&d.f==m.f||(Ph(n.d)?S=n.g.uc(d,m):S=n.g.tc(d,m),d!=m.o&&(m.j.d>d.j.d||d.j.d==m.j.d&&d.j.c<m.j.c)&&GOe(m.j.e+m.j.b+S,d.j.e)&&aq(m.j.e,d.j.e+d.j.b+S)&&d.i.ib(m)))},re(nd,"QuadraticConstraintCalculation",588),Q(317,1,{},PB),T.Dc=function(n){this.b=n,PT(this,new F,new q)},re(nd,"ScanlineConstraintCalculator",317);var z0=Rw(Wu,"Scanline/EventHandler");Q(464,1,{160:1},wae),T.Ec=function(n){k3e(this,y(n,235))},re(nd,"ScanlineConstraintCalculator/ConstraintsScanlineHandler",464),Q(465,1,Jr,B),T.$b=function(n,s){return qr((y(n,25).j.d+y(n,25).j.c)/2,(y(s,25).j.d+y(s,25).j.c)/2)},re(nd,"ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type",465),Q(235,1,{235:1},F4),T.a=!1,re(nd,"ScanlineConstraintCalculator/Timestamp",235),Q(466,1,Jr,A),T.$b=function(n,s){return DDe(n,s)},re(nd,"ScanlineConstraintCalculator/lambda$0$Type",466),Q(467,1,Ks,F),T.D=function(n){return!0},re(nd,"ScanlineConstraintCalculator/lambda$1$Type",467),Q(468,1,Yi,q),T.B=function(n){return 0},re(nd,"ScanlineConstraintCalculator/lambda$2$Type",468),Q(48,1,{48:1},lv,TB),T.t=function(n){var s;return n==null||OBe!=wg(n)?!1:(s=y(n,48),Va(this.c,s.c)&&Va(this.d,s.d))},T.v=function(){return tT(xe(Ee(yt,1),st,1,4,[this.c,this.d]))},T.w=function(){return"("+this.c+", "+this.d+(this.a?"cx":"")+this.b+")"},T.a=!0,T.c=0,T.d=0;var OBe=re(Wu,"Point",48);Q(201,17,{201:1,3:1,23:1,17:1},tw);var Pl,Kf,cd,Xf,DBe=rn(Wu,"Point/Quadrant",201,Sn,cLe);Q(569,1,{},wte),T.b=null,T.c=null,T.d=null,T.e=null,T.f=null;var bde,yde,mde,wde,_de;re(Wu,"RectilinearConvexHull",569),Q(243,1,{160:1},l_),T.Ec=function(n){rNe(this,y(n,48))},T.b=0;var NF;re(Wu,"RectilinearConvexHull/MaximalElementsEventHandler",243),Q(571,1,Jr,X),T.$b=function(n,s){return cae(n,s)},re(Wu,"RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type",571),Q(570,1,{160:1},pse),T.Ec=function(n){f3e(this,y(n,48))},T.a=0,T.b=null,T.c=null,T.d=null,T.e=null,re(Wu,"RectilinearConvexHull/RectangleEventHandler",570),Q(572,1,Jr,ne),T.$b=function(n,s){return yg(),y(n,48).c==y(s,48).c?qr(y(s,48).d,y(n,48).d):qr(y(n,48).c,y(s,48).c)},re(Wu,"RectilinearConvexHull/lambda$0$Type",572),Q(573,1,Jr,ae),T.$b=function(n,s){return yg(),y(n,48).c==y(s,48).c?qr(y(n,48).d,y(s,48).d):qr(y(n,48).c,y(s,48).c)},re(Wu,"RectilinearConvexHull/lambda$1$Type",573),Q(574,1,Jr,oe),T.$b=function(n,s){return yg(),y(n,48).c==y(s,48).c?qr(y(s,48).d,y(n,48).d):qr(y(s,48).c,y(n,48).c)},re(Wu,"RectilinearConvexHull/lambda$2$Type",574),Q(575,1,Jr,le),T.$b=function(n,s){return yg(),y(n,48).c==y(s,48).c?qr(y(n,48).d,y(s,48).d):qr(y(s,48).c,y(n,48).c)},re(Wu,"RectilinearConvexHull/lambda$3$Type",575),Q(576,1,Jr,pe),T.$b=function(n,s){return aMe(n,s)},re(Wu,"RectilinearConvexHull/lambda$4$Type",576),Q(469,1,{},tse),re(Wu,"Scanline",469),Q(662,1,{}),re(ku,"AbstractGraphPlacer",662),Q(222,1,{222:1},bie);var Ht;re(ku,"ComponentGroup",222),Q(434,662,{},_te),T.Fc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z;if(this.a.c=Ge(yt,st,1,0,4,1),s.b.c=Ge(yt,st,1,0,4,1),n.V()){s.e.a=0,s.e.b=0;return}for(m=y(n.sb(0),55),Ac(s,m),b=n.mb();b.G();)d=y(b.H(),55),ROe(this,d);for(z=new li,Z=2*y(ee(m,(Oe(),la)),15).a,R=new W(this.a);R.a<R.c.c.length;)x=y(K(R),222),N=cBe(x,Z),bu(YB(x.a),z.a,z.b),z.a+=N.a,z.b+=N.b;if(s.e.a=z.a-Z,s.e.b=z.b-Z,Kt(ze(Zt(ee(m,(sn(),qI)))))&&ft(ee(m,(Ke(),ad)))===ft((Cc(),id))){for(H=n.mb();H.G();)D=y(H.H(),55),p0(D,D.d.a,D.d.b);for(f=new ge,efe(f,n,Z),j=n.mb();j.G();)D=y(j.H(),55),On(qu(D.d),f.e);On(qu(s.e),f.a)}for(S=new W(this.a);S.a<S.c.c.length;)x=y(K(S),222),xse(s,YB(x.a))},re(ku,"ComponentGroupGraphPlacer",434),Q(322,1,{},ge),re(ku,"ComponentsCompactor",322),Q(13,647,N6,Xe,sa,cl),T.rb=function(n,s){yf(this,n,s)},T.ib=function(n){return tt(this,n)},T.jb=function(n){return Vn(this,n)},T.Q=function(){this.c=Ge(yt,st,1,0,4,1)},T.kb=function(n){return aa(this,n,0)!=-1},T.sb=function(n){return ht(this,n)},T.V=function(){return this.c.length==0},T.mb=function(){return new W(this)},T.vb=function(n){return zh(this,n)},T.nb=function(n){return Vr(this,n)},T.Xb=function(n,s){jae(this,n,s)},T.wb=function(n,s){return Sf(this,n,s)},T.Y=function(){return this.c.length},T.ob=function(){return Xre(this)},T.pb=function(n){return dr(this,n)},re(qt,"ArrayList",13),Q(532,13,N6,nse),T.ib=function(n){return kg(this,y(n,48))},re(ku,"ComponentsCompactor/Hullpoints",532),Q(529,1,{347:1},Oue),T.a=!1,re(ku,"ComponentsCompactor/InternalComponent",529),Q(528,1,xl,xte),T.mb=function(){return new W(this.a)},re(ku,"ComponentsCompactor/InternalConnectedComponents",528),Q(531,1,{251:1},Sce),T.zc=function(){return null},T.Ac=function(){return this.a},T.yc=function(){return pT(this.d)},T.Bc=function(){return this.b},re(ku,"ComponentsCompactor/InternalExternalExtension",531),Q(530,1,{251:1},Cte),T.Ac=function(){return this.a},T.yc=function(){return pT(this.d)},T.zc=function(){return this.c},T.Bc=function(){return this.b},re(ku,"ComponentsCompactor/InternalUnionExternalExtension",530),Q(534,1,{},ele),re(ku,"ComponentsCompactor/OuterSegments",534),Q(533,1,{},Ete),re(ku,"ComponentsCompactor/Segments",533),Q(381,1,{},tie),re(ku,"ComponentsProcessor",381),Q(432,662,{},de),T.Fc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve;if(n.Y()==1){_e=y(n.sb(0),55),_e!=s&&(s.b.c=Ge(yt,st,1,0,4,1),ple(s,_e,0,0),Ac(s,_e),Hie(s.a,_e.a),s.e.a=_e.e.a,s.e.b=_e.e.b);return}else if(n.V()){s.b.c=Ge(yt,st,1,0,4,1),s.e.a=0,s.e.b=0;return}for(S=n.mb();S.G();){for(m=y(S.H(),55),se=0,Z=new W(m.b);Z.a<Z.c.c.length;)z=y(K(Z),9),se+=y(ee(z,(Oe(),js)),24).a;m.k=se}for(Cs(n,new Se),b=y(n.sb(0),55),s.b.c=Ge(yt,st,1,0,4,1),Ac(s,b),H=0,We=0,R=n.mb();R.G();)m=y(R.H(),55),fe=m.e,H=rt(H,fe.a),We+=fe.a*fe.b;for(H=rt(H,Math.sqrt(We)*y(ee(s,(Oe(),ep)),15).a),Re=Afe*y(ee(s,la),15).a,Je=0,Ve=0,j=0,f=Re,x=n.mb();x.G();)m=y(x.H(),55),fe=m.e,Je+fe.a>H&&(Je=0,Ve+=j+Re,j=0),ie=m.d,p0(m,Je+ie.a,Ve+ie.b),ie.a=0,ie.b=0,f=rt(f,Je+fe.a),j=rt(j,fe.b),Je+=fe.a+Re;if(s.e.a=f,s.e.b=Ve+j,ce=y(ee(s,la),15).a,Kt(ze(Zt(ee(b,(sn(),qI)))))){for(d=new ge,efe(d,n,ce),D=n.mb();D.G();)N=y(D.H(),55),On(qu(N.d),d.e);On(qu(s.e),d.a)}xse(s,n)},re(ku,"SimpleRowGraphPlacer",432),Q(433,1,Jr,Se),T.$b=function(n,s){return JNe(y(n,55),y(s,55))},re(ku,"SimpleRowGraphPlacer/1",433),Q(369,1,Mn,yee),T.sc=function(n,s){ife(n,s)};var xde;re(E0,"CompoundGraphPostprocessor",369),Q(370,1,Ks,Ne),T.D=function(n){var s;return s=y(ee(y(n,114).b,(Ke(),pr)),44),!!s&&s.b!=0},re(E0,"CompoundGraphPostprocessor/1",370),Q(368,1,Mn,cre),T.sc=function(n,s){Eue(this,n,s)},re(E0,"CompoundGraphPreprocessor",368),Q(187,1,{187:1},eue),T.c=!1,re(E0,"CompoundGraphPreprocessor/ExternalPort",187),Q(114,1,{114:1},_w),T.w=function(){return yw(this.c)+":"+Vse(this.b)},re(E0,"CrossHierarchyEdge",114),Q(310,1,Jr,n4),T.$b=function(n,s){return IDe(this,y(n,114),y(s,114))},re(E0,"CrossHierarchyEdgeComparator",310),Q(147,131,{179:1,131:1,147:1,3:1}),T.k=0,re(yi,"LGraphElement",147),Q(12,147,{179:1,131:1,12:1,147:1,3:1},pu),T.w=function(){return Vse(this)};var Ta=re(yi,"LEdge",12);Q(55,147,{179:1,131:1,55:1,147:1,3:1,22:1},A5),T.mb=function(){return new W(this.c)},T.w=function(){return this.c.c.length==0?"G-unlayered"+_l(this.b):this.b.c.length==0?"G-layered"+_l(this.c):"G[layerless"+_l(this.b)+", layers"+_l(this.c)+"]"};var MBe=re(yi,"LGraph",55);Q(273,1,{}),T.pc=function(){return this.e.j},re(yi,"LGraphAdapters/AbstractLShapeAdapter",273),Q(240,1,{627:1},Fm),T.b=null,re(yi,"LGraphAdapters/LEdgeAdapter",240),Q(325,1,{},$4),T.pc=function(){return this.a.e},T.b=null,T.c=!1,re(yi,"LGraphAdapters/LGraphAdapter",325),Q(224,273,{129:1,224:1},nk),re(yi,"LGraphAdapters/LLabelAdapter",224),Q(555,273,{626:1},Gne),T.a=null,T.b=null,T.c=!1,re(yi,"LGraphAdapters/LNodeAdapter",555),Q(556,273,{161:1},Hne),T.a=null,T.b=null,T.c=null,T.d=!1,re(yi,"LGraphAdapters/LPortAdapter",556),Q(557,1,Jr,ye),T.$b=function(n,s){return q3e(y(n,7),y(s,7))},re(yi,"LGraphAdapters/PortComparator",557),Q(168,1,{168:1},JE,xae),T.t=function(n){var s;return Qe(n,168)?(s=y(n,168),this.d==s.d&&this.a==s.a&&this.b==s.b&&this.c==s.c):!1},T.v=function(){var n,s;return n=yr(ze(this.b))<<16,n|=yr(ze(this.a))&Eu,s=yr(ze(this.c))<<16,s|=yr(ze(this.d))&Eu,n^s},T.w=function(){return"Insets[top="+this.d+",left="+this.b+",bottom="+this.a+",right="+this.c+"]"},T.a=0,T.b=0,T.c=0,T.d=0,re(yi,"LInsets",168),Q(165,147,{179:1,131:1,147:1,165:1,3:1}),re(yi,"LShape",165),Q(33,165,{179:1,131:1,147:1,33:1,165:1,3:1},nB),T.w=function(){return this.a==null?"l_"+this.k:"l_"+this.a},re(yi,"LLabel",33),Q(9,165,{179:1,131:1,147:1,9:1,165:1,3:1},Ps),T.w=function(){return Cae(this)};var $r=re(yi,"LNode",9);Q(132,17,{132:1,3:1,23:1,17:1},cg);var ua,Hn,Ds,Nn,ir,_r,OF=rn(yi,"LNode/NodeType",132,Sn,NLe);Q(7,165,{179:1,131:1,147:1,7:1,165:1,3:1},cr),T.w=function(){var n;return n=bse(this),n==null?"p_"+this.k:"p_"+n};var GR,DF,HR,MF,zR,VR,Ede=re(yi,"LPort",7);Q(399,1,Ks,we),T.D=function(n){return fie(n)},re(yi,"LPort/1",399),Q(400,1,Ks,Pe),T.D=function(n){return lie(n)},re(yi,"LPort/2",400),Q(401,1,Ks,Fe),T.D=function(n){return y(n,7).g==(Ye(),Et)},re(yi,"LPort/3",401),Q(402,1,Ks,Ue),T.D=function(n){return y(n,7).g==(Ye(),lt)},re(yi,"LPort/4",402),Q(403,1,Ks,He),T.D=function(n){return y(n,7).g==(Ye(),At)},re(yi,"LPort/5",403),Q(404,1,Ks,De),T.D=function(n){return y(n,7).g==(Ye(),vt)},re(yi,"LPort/6",404),Q(190,1,xl,Kp),T.mb=function(){var n;return n=new W(this.a.b),new Vee(n)},re(yi,"LPort/7",190),Q(405,1,kr,Vee),T.H=function(){return y(K(this.a),12).c},T.G=function(){return vf(this.a)},T.I=function(){pg(this.a)},re(yi,"LPort/7/1",405),Q(169,1,xl,Zd),T.mb=function(){var n;return n=new W(this.a.e),new r4(n)},re(yi,"LPort/8",169),Q(304,1,kr,r4),T.H=function(){return y(K(this.a),12).d},T.G=function(){return vf(this.a)},T.I=function(){pg(this.a)},re(yi,"LPort/8/1",304),Q(16,147,{179:1,131:1,147:1,16:1,3:1,22:1},xf),T.mb=function(){return new W(this.a)},T.w=function(){return"L_"+aa(this.b.c,this,0)+_l(this.a)},re(yi,"Layer",16),Q(437,1,Mn,Ce),T.sc=function(n,s){var f,d,b,m,x,S,R;for(en(s,"Big nodes intermediate-processing",1),this.a=n,m=new W(this.a.c);m.a<m.c.c.length;)for(b=y(K(m),16),R=za(b.a),f=co(R,new Be),S=Bh(f.b.mb(),f.a);vl(S);)x=y(Vh(S),9),ft(ee(x,(sn(),Gr)))===ft((ma(),Zg))||ft(ee(x,Gr))===ft(zc)?(d=zq(this,x,!1),Ae(d,Gr,y(ee(x,Gr),85)),Ae(x,Gr,gd)):zq(this,x,!0);zt(s)},re(jt,"BigNodesIntermediateProcessor",437),Q(438,1,Ks,Be),T.D=function(n){return VLe(y(n,9))},re(jt,"BigNodesIntermediateProcessor/1",438),Q(582,1,Yi,Uee),T.B=function(n){var s;return qNe((s=this,lw(n),s))},re(jt,"BigNodesLabelHandler/CompoundFunction",582),Q(332,1,{},gq),T.a=0,T.e=null,T.f=0,re(jt,"BigNodesLabelHandler/Handler",332),Q(583,1,Yi,Yee),T.B=function(n){var s;return JDe((s=this,lw(n),s))},re(jt,"BigNodesLabelHandler/Handler/1",583),Q(584,1,Yi,zne),T.B=function(n){var s;return uPe((s=this,lw(n),s))},re(jt,"BigNodesLabelHandler/Handler/2",584),Q(585,1,Yi,Vne),T.B=function(n){var s;return O4e((s=this,lw(n),s))},re(jt,"BigNodesLabelHandler/Handler/3",585),Q(439,1,Mn,ve),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie;for(en(s,"Big nodes post-processing",1),this.a=n,S=new W(this.a.c);S.a<S.c.c.length;)for(x=y(K(S),16),f=co(x.a,new ke),N=Bh(f.b.mb(),f.a);vl(N);){for(R=y(Vh(N),9),j=y(ee(R,(Oe(),Q0)),15),m=jce(this,R),ie=new Xe,Z=wr(m,(Ye(),lt)).mb();Z.G();)H=y(Z.H(),7),ie.c[ie.c.length]=H,D=H.i.a-m.j.a,H.i.a=j.a+D;for(R.j.a=j.a,z=new W(ie);z.a<z.c.c.length;)H=y(K(z),7),An(H,R);this.a.e.a<R.i.a+R.j.a&&(this.a.e.a=R.i.a+R.j.a),b=y(ee(R,W7),20),Vn(R.c,b),d=y(ee(R,CI),64),d&&d.B(null)}zt(s)},re(jt,"BigNodesPostProcessor",439),Q(440,1,Ks,ke),T.D=function(n){return ULe(y(n,9))},re(jt,"BigNodesPostProcessor/1",440),Q(441,1,Mn,Xte),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z;for(en(s,Lfe,1),this.c=n,j=this.c.b,b=0,R=new W(j);R.a<R.c.c.length;)x=y(K(R),9),x.k=b++;for(this.d=y(ee(this.c,(Oe(),la)),15).a,this.a=y(ee(this.c,(Ke(),bo)),59),this.b=j.c.length,m=Nfe,N=new W(j);N.a<N.c.c.length;)x=y(K(N),9),x.g==(wt(),ir)&&x.j.a<m&&(m=x.j.a);for(m=50>m?50:m,f=new Xe,z=m+this.d,D=new W(j);D.a<D.c.c.length;)if(x=y(K(D),9),x.g==(wt(),ir)&&x.j.a>z){for(H=1,d=x.j.a;d>m;)++H,d=(x.j.a-(H-1)*this.d)/H;tt(f,new sse(this,x,H,d))}for(S=new W(f);S.a<S.c.c.length;)x=y(K(S),267),hje(x.d)&&H4e(x);zt(s)},T.b=0,T.d=0,re(jt,"BigNodesPreProcessor",441),Q(267,1,{267:1},sse),T.a=0,T.c=0,re(jt,"BigNodesPreProcessor/BigNode",267),Q(442,1,Mn,Jte),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie;for(en(s,Lfe,1),kde=Kt(ze(Zt(ee(n,(Ke(),P0))))),this.c=n,z=new Xe,x=new W(n.c);x.a<x.c.c.length;)m=y(K(x),16),Vn(z,m.a);for(b=0,D=new W(z);D.a<D.c.c.length;)R=y(K(D),9),R.k=b++;for(this.d=y(ee(this.c,(Oe(),la)),15).a,this.a=y(ee(this.c,bo),59),this.b=z.c.length,S=Nfe,j=new W(z);j.a<j.c.c.length;)R=y(K(j),9),R.g==(wt(),ir)&&R.j.a<S&&(S=R.j.a);for(S=50>S?50:S,f=new Xe,ie=S+this.d,H=new W(z);H.a<H.c.c.length;)if(R=y(K(H),9),R.g==(wt(),ir)&&R.j.a>ie){for(Z=1,d=R.j.a;d>S;)++Z,d=(R.j.a-(Z-1)*this.d)/Z;tt(f,new Rae(this,R,Z))}for(N=new W(f);N.a<N.c.c.length;)R=y(K(N),268),fBe(R)&&Fje(R);zt(s)},T.b=0,T.d=0;var kde=!1;re(jt,"BigNodesSplitter",442),Q(268,1,{268:1},Rae),T.a=0,T.e=4,re(jt,"BigNodesSplitter/BigNode",268),Q(443,1,Mn,je),T.sc=function(n,s){var f,d,b,m,x,S,R,N;for(en(s,"Comment post-processing",1),R=y(ee(n,(Oe(),la)),15).a,m=new W(n.c);m.a<m.c.c.length;){for(b=y(K(m),16),d=new Xe,S=new W(b.a);S.a<S.c.c.length;)x=y(K(S),9),N=y(ee(x,Qg),20),f=y(ee(x,Kg),20),(N||f)&&(M4e(x,N,f,R),N&&Vn(d,N),f&&Vn(d,f));Vn(b.a,d)}zt(s)},re(jt,"CommentPostprocessor",443),Q(444,1,Mn,qe),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se;for(en(s,"Comment pre-processing",1),S=new W(n.b);S.a<S.c.c.length;)if(x=y(K(S),9),Kt(ze(Zt(ee(x,(Ke(),$g)))))){for(d=0,f=null,R=null,z=new W(x.f);z.a<z.c.c.length;)j=y(K(z),7),d+=j.b.c.length+j.e.c.length,j.b.c.length==1&&(f=y(ht(j.b,0),12),R=f.c),j.e.c.length==1&&(f=y(ht(j.e,0),12),R=f.d);if(d==1&&R.b.c.length+R.e.c.length==1&&!Kt(ze(Zt(ee(R.f,$g)))))iBe(x,f,R,R.f),pg(S);else{for(se=new Xe,H=new W(x.f);H.a<H.c.c.length;){for(j=y(K(H),7),D=new W(j.e);D.a<D.c.c.length;)N=y(K(D),12),N.d.e.c.length==0||(se.c[se.c.length]=N);for(m=new W(j.b);m.a<m.c.c.length;)b=y(K(m),12),b.c.b.c.length==0||(se.c[se.c.length]=b)}for(ie=new W(se);ie.a<ie.c.c.length;)Z=y(K(ie),12),Oc(Z,!0)}}zt(s)},re(jt,"CommentPreprocessor",444),Q(445,1,Mn,Me),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j;for(en(s,"Edge and layer constraint edge reversal",1),N=new W(n.b);N.a<N.c.c.length;){switch(R=y(K(N),9),x=y(ee(R,(sn(),Gr)),85),m=null,x.e){case 1:case 2:m=(Iv(),J0);break;case 3:case 4:m=(Iv(),lx)}if(m)Ae(R,(Oe(),AI),(Iv(),J0)),m==lx?a6(R,x,(Ir(),Ri)):m==J0&&a6(R,x,(Ir(),fa));else if(hu(y(ee(R,(Ke(),Nt)),28))&&R.f.c.length!=0){for(f=!0,j=new W(R.f);j.a<j.c.c.length;){if(D=y(K(j),7),!(D.g==(Ye(),lt)&&D.b.c.length-D.e.c.length>0||D.g==vt&&D.b.c.length-D.e.c.length<0)){f=!1;break}if(D.g==vt){for(b=new W(D.e);b.a<b.c.c.length;)if(d=y(K(b),12),S=y(ee(d.d.f,Gr),85),S==(ma(),Zg)||S==zc){f=!1;break}}if(D.g==lt){for(b=new W(D.b);b.a<b.c.c.length;)if(d=y(K(b),12),S=y(ee(d.c.f,Gr),85),S==(ma(),e1)||S==Bl){f=!1;break}}}f&&a6(R,x,(Ir(),MI))}}zt(s)},re(jt,"EdgeAndLayerConstraintEdgeReverser",445),Q(446,1,Mn,ot),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j;for(en(s,"End label placement",1),x=y(ee(n,(Ke(),zv)),15).a,this.a=(Qn(),new ln),this.c=new ln,this.b=new ln,R=new W(n.c);R.a<R.c.c.length;)for(S=y(K(R),16),D=new W(S.a);D.a<D.c.c.length;)for(N=y(K(D),9),d=Xt(qn(N));Vt(d);)for(f=y(Gt(d),12),m=new W(f.b);m.a<m.c.c.length;)b=y(K(m),33),(ft(ee(b,Wa))===ft((mu(),Hv))||ft(ee(b,Wa))===ft(zf))&&(j=null,ft(ee(b,Wa))===ft(Hv)?j=f.c:ft(ee(b,Wa))===ft(zf)&&(j=f.d),kv(this.a,j.f)||Cn(this.a,j.f,0),kv(this.c,j.f)||Cn(this.c,j.f,0),kv(this.b,j)||Cn(this.b,j,0),ft(ee(b,(Oe(),Js)))===ft((ya(),Yo))?zje(b,j,x):Hje(b,j,x));zt(s)},re(jt,"EndLabelProcessor",446),Q(269,1,Mn,rk),T.sc=function(n,s){var f,d,b,m,x;for(en(s,"Graph transformation ("+this.a+")",1),b=kf(n.b),d=new W(n.c);d.a<d.c.c.length;)f=y(K(d),16),Vn(b,f.a);switch(this.a.e){case 0:Jle(b,n);break;case 1:Vle(b),x=y(ee(n,(sn(),rp)),115),x&&Ae(n,rp,sue(x)),Us(n.d),Us(n.e);break;case 2:Jle(b,n),nBe(b,n),Vle(b),m=y(ee(n,(sn(),rp)),115),m&&Ae(n,rp,sue(m)),Us(n.d),Us(n.e)}zt(s)},re(jt,"GraphTransformer",269),Q(221,17,{221:1,3:1,23:1,17:1},Ik);var jF,BF,qF,jBe=rn(jt,"GraphTransformer/Mode",221,Sn,jPe);Q(448,1,Mn,dt),T.sc=function(n,s){en(s,"Hierarchical port constraint processing",1),WOe(n),wBe(n),zt(s)},re(jt,"HierarchicalPortConstraintProcessor",448),Q(449,1,Jr,pt),T.$b=function(n,s){return rDe(y(n,9),y(s,9))},re(jt,"HierarchicalPortConstraintProcessor/NodeComparator",449),Q(450,1,Mn,Lt),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j;for(en(s,"Hierarchical port dummy size processing",1),R=new Xe,j=new Xe,S=y(ee(n,(Oe(),la)),15).a,D=S*y(ee(n,(sn(),tc)),15).a,f=D*2,b=new W(n.c);b.a<b.c.c.length;){for(d=y(K(b),16),R.c=Ge(yt,st,1,0,4,1),j.c=Ge(yt,st,1,0,4,1),x=new W(d.a);x.a<x.c.c.length;)m=y(K(x),9),m.g==(wt(),Hn)&&(N=y(ee(m,ai),32),N==(Ye(),Et)?R.c[R.c.length]=m:N==At&&(j.c[j.c.length]=m));Rce(R,!0,f),Rce(j,!1,f)}zt(s)},re(jt,"HierarchicalPortDummySizeProcessor",450),Q(451,1,Mn,ut),T.sc=function(n,s){var f,d,b,m;en(s,"Orthogonally routing hierarchical port edges",1),this.a=0,f=Cje(n),N4e(n,f),y4e(this,n,f),W4e(n),d=y(ee(n,(Ke(),Nt)),28),b=n.c,Yle((Gn(0,b.c.length),y(b.c[0],16)),d,n),Yle(y(ht(b,b.c.length-1),16),d,n),m=n.c,Ile((Gn(0,m.c.length),y(m.c[0],16))),Ile(y(ht(m,m.c.length-1),16)),zt(s)},T.a=0,re(jt,"HierarchicalPortOrthogonalEdgeRouter",451),Q(452,1,Jr,$t),T.$b=function(n,s){return wAe(y(n,9),y(s,9))},re(jt,"HierarchicalPortOrthogonalEdgeRouter/1",452),Q(453,1,Jr,Yt),T.$b=function(n,s){return aNe(y(n,9),y(s,9))},re(jt,"HierarchicalPortOrthogonalEdgeRouter/2",453),Q(454,1,Mn,fn),T.sc=function(n,s){var f;en(s,"Hierarchical port position processing",1),f=n.c,f.c.length>0&&xle((Gn(0,f.c.length),y(f.c[0],16)),n),f.c.length>1&&xle(y(ht(f,f.c.length-1),16),n),zt(s)},re(jt,"HierarchicalPortPositionProcessor",454),Q(471,1,Mn,Yn),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie;for(en(s,"Hyperedge merging",1),z=new Ln(n.c,0);z.b<z.d.Y();)if(H=(Ct(z.b<z.d.Y()),y(z.d.sb(z.c=z.b++),16)),ie=H.a,ie.c.length!=0)for(S=null,j=null,Z=0;Z<ie.c.length;Z++)f=(Gn(Z,ie.c.length),y(ie.c[Z],9)),x=f.g,x==(wt(),Nn)&&j==Nn&&(b=y(ee(f,(Oe(),ca)),7),N=y(ee(S,ca),7),m=y(ee(f,Xi),7),D=y(ee(S,Xi),7),d=!!b||!!m,R=!!N||!!D,d&&R&&(b==N||m==D)&&(x3e(f,S,b==N,m==D),Gn(Z,ie.c.length),O4(ie.c,Z,1),--Z,f=S,x=j)),S=f,j=x;zt(s)},re(jt,"HyperedgeDummyMerger",471),Q(472,1,Mn,he),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j;for(en(s,"Hypernodes processing",1),b=new W(n.c);b.a<b.c.c.length;)for(d=y(K(b),16),S=new W(d.a);S.a<S.c.c.length;)if(x=y(K(S),9),Kt(ze(Zt(ee(x,(Ke(),L0)))))&&x.f.c.length<=2){for(j=0,D=0,f=0,m=0,N=new W(x.f);N.a<N.c.c.length;)switch(R=y(K(N),7),R.g.e){case 1:++j;break;case 2:++D;break;case 3:++f;break;case 4:++m}j==0&&f==0&&hBe(n,x,m<=D)}zt(s)},re(jt,"HypernodesProcessor",472),Q(473,1,Mn,J),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D;for(en(s,"Layer constraint edge reversal",1),x=new W(n.c);x.a<x.c.c.length;){for(m=y(K(x),16),D=-1,f=new Xe,N=y(dr(m.a,Ge($r,oa,9,m.a.c.length,0,1)),51),b=0;b<N.length;b++)d=y(ee(N[b],(Oe(),Zu)),140),D==-1?d!=(yu(),vd)&&(D=b):d==(yu(),vd)&&(ei(N[b],null),Lv(N[b],D++,m)),d==(yu(),Zv)&&tt(f,N[b]);for(R=new W(f);R.a<R.c.c.length;)S=y(K(R),9),ei(S,null),ei(S,m)}zt(s)},re(jt,"InLayerConstraintProcessor",473),Q(474,1,Mn,te),T.sc=function(n,s){var f,d,b,m,x,S;if(y(ee(n,(Oe(),hi)),18).kb((Dr(),Xo))){for(S=new W(n.b);S.a<S.c.c.length;)m=y(K(S),9),m.g==(wt(),ir)&&(b=y(ee(m,(Ke(),N0)),65),this.c=wn(this.c,m.i.a-b.b),this.a=rt(this.a,m.i.a+m.j.a+b.c),this.d=wn(this.d,m.i.b-b.d),this.b=rt(this.b,m.i.b+m.j.b+b.a));for(x=new W(n.b);x.a<x.c.c.length;)if(m=y(K(x),9),m.g!=(wt(),ir))switch(m.g.e){case 2:if(d=y(ee(m,(sn(),Gr)),85),d==(ma(),Bl)){m.i.a=this.c-10,bue(m,new be).A(new Wee(m));break}if(d==zc){m.i.a=this.a+10,bue(m,new Le).A(new Kee(m));break}if(f=y(ee(m,Zu),140),f==(yu(),vd)){Dle(m).A(new Xee(m)),m.i.b=this.d-10;break}if(f==Zv){Dle(m).A(new Jee(m)),m.i.b=this.b+10;break}break;default:throw new Rn("The node type "+m.g+" is not supported by the "+BBe)}}},T.a=ii,T.b=ii,T.c=Wi,T.d=Wi;var BBe=re(jt,"InteractiveExternalPortPositioner",474);Q(475,1,Yi,be),T.B=function(n){return y(n,12).d.f},re(jt,"InteractiveExternalPortPositioner/lambda$0$Type",475),Q(476,1,Yi,Wee),T.B=function(n){return _Ae(this.a,n)},re(jt,"InteractiveExternalPortPositioner/lambda$1$Type",476),Q(477,1,Yi,Le),T.B=function(n){return y(n,12).c.f},re(jt,"InteractiveExternalPortPositioner/lambda$2$Type",477),Q(478,1,Yi,Kee),T.B=function(n){return xAe(this.a,n)},re(jt,"InteractiveExternalPortPositioner/lambda$3$Type",478),Q(479,1,Yi,Xee),T.B=function(n){return LAe(this.a,n)},re(jt,"InteractiveExternalPortPositioner/lambda$4$Type",479),Q(480,1,Yi,Jee),T.B=function(n){return NAe(this.a,n)},re(jt,"InteractiveExternalPortPositioner/lambda$5$Type",480),Q(37,17,{37:1,3:1,23:1,17:1},En);var UR,V0,YR,WR,FF,$F,GF,HF,KR,J_,zF,VF,UF,YF,Vg,WF,KF,XF,XR,Q_,JR,JF,Z_,ex,tx,QF,Qv,nx,ZF,e7,t7,QR,ZR,n7,r7,rx,ix,i7,a7,s7,eI,tI,nI,o7,u7,c7,l7,f7,h7,d7,Sde=rn(jt,"IntermediateProcessorStrategy",37,Sn,_Me);Q(503,1,Mn,Te),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe;for(en(s,"Inverted port preprocessing",1),N=n.c,R=new Ln(N,0),f=null,fe=new Xe;R.b<R.d.Y();){for(ce=f,f=(Ct(R.b<R.d.Y()),y(R.d.sb(R.c=R.b++),16)),H=new W(fe);H.a<H.c.c.length;)D=y(K(H),9),ei(D,ce);for(fe.c=Ge(yt,st,1,0,4,1),z=new W(f.a);z.a<z.c.c.length;)if(D=y(K(z),9),D.g==(wt(),ir)&&hu(y(ee(D,(Ke(),Nt)),28))){for(se=Hq(D,(Ir(),fa),(Ye(),lt)).mb();se.G();)for(Z=y(se.H(),7),S=Z.b,x=y(dr(S,Ge(Ta,wa,12,S.c.length,0,1)),47),b=0,m=x.length;b<m;++b)d=x[b],wje(n,Z,d,fe);for(ie=Hq(D,Ri,vt).mb();ie.G();)for(Z=y(ie.H(),7),S=Z.e,x=y(dr(S,Ge(Ta,wa,12,S.c.length,0,1)),47),b=0,m=x.length;b<m;++b)d=x[b],v3e(n,Z,d,fe)}}for(j=new W(fe);j.a<j.c.c.length;)D=y(K(j),9),ei(D,f);zt(s)},re(jt,"InvertedPortProcessor",503),Q(481,1,Mn,ue),T.sc=function(n,s){en(s,"Node and Port Label Placement and Node Sizing",1),lCe((sk(),sk(),new $4(n,!1))),zt(s)},re(jt,"LabelAndNodeSizeProcessor",481),Q(482,1,Mn,mee),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e;for(en(s,"Label dummy insertions",1),H=new Xe,D=y(ee(n,(Ke(),zv)),15).a,j=y(ee(n,bo),59),Z=new W(n.b);Z.a<Z.c.c.length;)for(z=y(K(Z),9),se=new W(z.f);se.a<se.c.c.length;)for(ie=y(K(se),7),S=new W(ie.e);S.a<S.c.c.length;)if(x=y(K(S),12),x.c.f!=x.d.f&&Vie(x.b,Tde)){for(fe=pf(x.b.c.length),f=new Ps(n),Ss(f,(wt(),Ds)),Ae(f,(Oe(),Pt),x),Ae(f,i$,fe),Ae(f,Nt,(rr(),Ti)),Ae(f,ca,x.c),Ae(f,Xi,x.d),H.c[H.c.length]=f,Zce(x,f),_e=y(ee(x,zo),15).a,_e<0&&(_e=0,Ae(x,zo,new gn(_e))),ce=Math.floor(_e/2),b=new W(f.f);b.a<b.c.c.length;)d=y(K(b),7),d.i.b=ce;for(m=f.j,R=new Ln(x.b,0);R.b<R.d.Y();)N=(Ct(R.b<R.d.Y()),y(R.d.sb(R.c=R.b++),33)),ft(ee(N,Wa))===ft((mu(),C0))&&(j==(ur(),Xu)||j==Su?(m.a+=N.j.a+D,m.b=rt(m.b,N.j.b)):(m.a=rt(m.a,N.j.a),m.b+=N.j.b+D),fe.c[fe.c.length]=N,lo(R));(j==(ur(),Xu)||j==Su)&&(m.a-=D),m.b+=D+_e}Vn(n.b,H),zt(s)};var Tde;re(jt,"LabelDummyInserter",482),Q(483,1,Ks,$e),T.D=function(n){return ft(ee(y(n,33),(Ke(),Wa)))===ft((mu(),C0))},re(jt,"LabelDummyInserter/1",483),Q(484,1,Mn,Ze),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H;for(en(s,"Label dummy removal",1),b=y(ee(n,(Ke(),zv)),15).a,S=y(ee(n,bo),59),x=new W(n.c);x.a<x.c.c.length;)for(m=y(K(x),16),N=new Ln(m.a,0);N.b<N.d.Y();)R=(Ct(N.b<N.d.Y()),y(N.d.sb(N.c=N.b++),9)),R.g==(wt(),Ds)&&(D=y(ee(R,(Oe(),Pt)),12),H=y(ee(D,zo),15).a,f=new hr(R.i),ft(ee(R,Js))===ft((ya(),Ju))&&(f.b+=H+b),d=new Rt(R.j.a,R.j.b-H-b),j=y(ee(R,i$),20),S==(ur(),Xu)||S==Su?wOe(j,f,b,d,ft(ee(R,Js))!==ft(Yo)):fOe(j,f,b,d),Vn(D.b,j),Ble(R,!1),lo(N));zt(s)},re(jt,"LabelDummyRemover",484),Q(485,1,Mn,et),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe;for(en(s,"Label dummy switching",1),f=new Xe,j=new Xe,S=new Xe,z=new Xe,x=new W(n.c);x.a<x.c.c.length;)for(m=y(K(x),16),D=new W(m.a);D.a<D.c.c.length;)if(N=y(K(D),9),N.g==(wt(),Ds)){f.c[f.c.length]=N,S.c=Ge(yt,st,1,0,4,1),z.c=Ge(yt,st,1,0,4,1),ie=N;do ie=y(Gt(Xt(Wr(ie))),12).c.f,ie.g==Nn&&(S.c[S.c.length]=ie);while(ie.g==Nn);fe=N;do fe=y(Gt(Xt(qn(fe))),12).d.f,fe.g==Nn&&(z.c[z.c.length]=fe);while(fe.g==Nn);R=S.c.length,Z=z.c.length,R>Z+1?(H=(R+Z)/2|0,tt(j,new jr(N,(Gn(H,S.c.length),y(S.c[H],9))))):Z>R+1&&(H=((Z-R)/2|0)-1,tt(j,new jr(N,(Gn(H,z.c.length),y(z.c[H],9)))))}for(ce=new W(j);ce.a<ce.c.c.length;)se=y(K(ce),27),Wje(y(se.a,9),y(se.b,9));for(b=new W(f);b.a<b.c.c.length;)d=y(K(b),9),Hoe(d,new it,(Oe(),Xi)),Hoe(d,new St,ca);zt(s)},re(jt,"LabelDummySwitcher",485),Q(486,1,Yi,it),T.B=function(n){return y(Gt(Xt(Wr(y(n,9)))),12).c.f},re(jt,"LabelDummySwitcher/lambda$0$Type",486),Q(487,1,Yi,St),T.B=function(n){return y(Gt(Xt(qn(y(n,9)))),12).d.f},re(jt,"LabelDummySwitcher/lambda$1$Type",487),Q(488,1,Mn,bt),T.sc=function(n,s){en(s,"Label management",1),lw(ee(n,(y5(),eF))),zt(s)},re(jt,"LabelManagementProcessor",488),Q(489,1,Mn,wee),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie;switch(R=y(ee(n,(sn(),rp)),115),en(s,"Label side selection ("+R+")",1),N=(Dt(n),new dv(n)),R.e){case 0:vMe(N);break;case 1:dMe(N);break;case 2:i3e(N);break;case 3:r3e(N);break;case 4:A4e(N)}for(S=new W(n.c);S.a<S.c.c.length;)for(x=y(K(S),16),d=new W(x.a);d.a<d.c.c.length;){for(f=y(K(d),9),z=new W(f.f);z.a<z.c.c.length;)for(j=y(K(z),7),m=new W(j.c);m.a<m.c.c.length;)b=y(K(m),33),ft(ee(b,(Oe(),Js)))===ft((ya(),H0))&&Ae(b,Js,Rde);if(f.g==(wt(),Ds)&&ft(ee(f,(Oe(),Js)))===ft((ya(),Yo)))for(D=y(ee(f,Pt),12),ie=y(ee(D,(Ke(),zo)),15).a,Z=f.j.b-Math.ceil(ie/2),H=new W(f.f);H.a<H.c.c.length;)j=y(K(H),7),j.i.b=Z}zt(s)};var Rde;re(jt,"LabelSideSelector",489),Q(490,1,Jr,tn),T.$b=function(n,s){return wPe(y(n,7),y(s,7))},re(jt,"LabelSideSelector/1",490),Q(495,1,Mn,Wt),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e;if(en(s,"Layer constraint application",1),N=n.c,N.c.length==0){zt(s);return}for(m=(Gn(0,N.c.length),y(N.c[0],16)),x=y(ht(N,N.c.length-1),16),fe=new xf(n),_e=new xf(n),R=new W(N);R.a<R.c.c.length;)for(S=y(K(R),16),ie=y(dr(S.a,Ge($r,oa,9,S.a.c.length,0,1)),51),H=0,Z=ie.length;H<Z;++H)switch(j=ie[H],f=y(ee(j,(sn(),Gr)),85),f.e){case 1:ei(j,m),fle(j,!1);break;case 2:ei(j,fe),fle(j,!0);break;case 3:ei(j,x),yle(j);break;case 4:ei(j,_e),yle(j)}if(N.c.length>=2){for(D=!0,se=(Gn(1,N.c.length),y(N.c[1],16)),z=new W(m.a);z.a<z.c.c.length;){if(j=y(K(z),9),ft(ee(j,(sn(),Gr)))===ft((ma(),gd))){D=!1;break}for(b=Xt(qn(j));Vt(b);)if(d=y(Gt(b),12),d.d.f.d==se){D=!1;break}if(!D)break}if(D){for(ie=y(dr(m.a,Ge($r,oa,9,m.a.c.length,0,1)),51),H=0,Z=ie.length;H<Z;++H)j=ie[H],ei(j,se);Vr(N,m)}}if(N.c.length>=2){for(D=!0,ce=y(ht(N,N.c.length-2),16),z=new W(x.a);z.a<z.c.c.length;){if(j=y(K(z),9),ft(ee(j,(sn(),Gr)))===ft((ma(),gd))){D=!1;break}for(b=Xt(Wr(j));Vt(b);)if(d=y(Gt(b),12),d.c.f.d==ce){D=!1;break}if(!D)break}if(D){for(ie=y(dr(x.a,Ge($r,oa,9,x.a.c.length,0,1)),51),H=0,Z=ie.length;H<Z;++H)j=ie[H],ei(j,ce);Vr(N,x)}}N.c.length==1&&(Gn(0,N.c.length),y(N.c[0],16)).a.c.length==0&&zh(N,0),fe.a.c.length==0||(If(0,N.c.length),Ry(N.c,0,fe)),_e.a.c.length==0||(N.c[N.c.length]=_e),zt(s)},re(jt,"LayerConstraintProcessor",495),Q(496,1,Mn,cn),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z;for(en(s,"Layer size calculation",1),N=$o,R=5e-324,x=new W(n.c);x.a<x.c.c.length;)if(m=y(K(x),16),S=m.c,S.a=0,S.b=0,m.a.c.length!=0){for(j=new W(m.a);j.a<j.c.c.length;)D=y(K(j),9),z=D.j,H=D.e,S.a=rt(S.a,z.a+H.b+H.c);d=y(ht(m.a,0),9),Z=d.i.b-d.e.d,b=y(ht(m.a,m.a.c.length-1),9),f=b.i.b+b.j.b+b.e.a,S.b=f-Z,N=N<Z?N:Z,R=R>f?R:f}n.e.b=R-N,n.d.b-=N,zt(s)},re(jt,"LayerSizeAndGraphHeightCalculator",496),Q(497,1,Mn,Fn),T.sc=function(n,s){var f,d,b,m,x;for(en(s,"Edge joining",1),f=Kt(ze(Zt(ee(n,(sn(),jI))))),b=new W(n.c);b.a<b.c.c.length;)for(d=y(K(b),16),x=new Ln(d.a,0);x.b<x.d.Y();)m=(Ct(x.b<x.d.Y()),y(x.d.sb(x.c=x.b++),9)),m.g==(wt(),Nn)&&(Ble(m,f),lo(x));zt(s)},re(jt,"LongEdgeJoiner",497),Q(498,1,Mn,Qt),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z;if(en(s,"Edge splitting",1),n.c.c.length<=2){zt(s);return}for(m=new Ln(n.c,0),x=(Ct(m.b<m.d.Y()),y(m.d.sb(m.c=m.b++),16));m.b<m.d.Y();)for(b=x,x=(Ct(m.b<m.d.Y()),y(m.d.sb(m.c=m.b++),16)),R=new W(b.a);R.a<R.c.c.length;)for(S=y(K(R),9),D=new W(S.f);D.a<D.c.c.length;)for(N=y(K(D),7),d=new W(N.e);d.a<d.c.c.length;)f=y(K(d),12),H=f.d,j=H.f.d,j!=b&&j!=x&&Zce(f,(z=new Ps(n),Ss(z,(wt(),Nn)),Ae(z,(Oe(),Pt),f),Ae(z,(Ke(),Nt),(rr(),Ti)),ei(z,x),z));zt(s)},re(jt,"LongEdgeSplitter",498),Q(499,1,Mn,Kn),T.sc=function(n,s){var f,d,b,m,x,S,R,N;for(en(s,"Node margin calculation",1),f=new zee((sk(),new $4(n,!0))),DOe(f),S=y(ee(n,(Oe(),la)),15).a,b=new W(n.c);b.a<b.c.c.length;)for(d=y(K(b),16),x=new W(d.a);x.a<x.c.c.length;)m=y(K(x),9),eje(m,S),R=m.e,N=y(ee(m,a$),65),R.b=rt(R.b,N.b),R.c=rt(R.c,N.c),R.a=rt(R.a,N.a),R.d=rt(R.d,N.d);zt(s)},re(jt,Efe,499),Q(491,1,Mn,me),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j;switch(en(s,"Node promotion heuristic",1),this.g=n,Y4e(this),this.q=y(ee(n,(sn(),wx)),109),N=y(ee(this.g,l$),24).a,b=new Ie,this.q.e){case 2:case 1:Mv(this,b);break;case 3:for(this.q=(Of(),sx),Mv(this,b),S=0,x=new W(this.a);x.a<x.c.c.length;)m=y(K(x),24),S=Ei(S,m.a);S>this.j&&(this.q=U0,Mv(this,b));break;case 4:for(this.q=(Of(),sx),Mv(this,b),R=0,d=new W(this.b);d.a<d.c.c.length;)f=nn(K(d)),R=rt(R,(Rr(f),f));R>this.k&&(this.q=Y0,Mv(this,b));break;case 6:j=yr(iw(this.f.length*N/100)),Mv(this,new Qee(j));break;case 5:D=yr(iw(this.d*N/100)),Mv(this,new Zee(D));break;default:Mv(this,b)}S3e(this,n),zt(s)},T.d=0,T.e=0,T.i=0,T.j=0,T.k=0,T.n=0,re(jt,"NodePromotion",491),Q(492,1,Yi,Ie),T.B=function(n){return jn(),jn(),Ii},re(jt,"NodePromotion/lambda$0$Type",492),Q(493,1,Yi,Qee),T.B=function(n){return fPe(this.a,n)},T.a=0,re(jt,"NodePromotion/lambda$1$Type",493),Q(494,1,Yi,Zee),T.B=function(n){return hPe(this.a,n)},T.a=0,re(jt,"NodePromotion/lambda$2$Type",494),Q(109,17,{109:1,3:1,23:1,17:1},Lh);var v7,U0,p7,g7,Y0,b7,ax,sx,Ide=rn(jt,"NodePromotionStrategy",109,Sn,sNe),Cde;Q(500,1,Mn,_t),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re;for(en(s,jfe,1),z=y(ee(n,(Ke(),ad)),122),b=new W(n.c);b.a<b.c.c.length;)for(d=y(K(b),16),R=y(dr(d.a,Ge($r,oa,9,d.a.c.length,0,1)),51),x=0,S=R.length;x<S;++x)if(m=R[x],m.g==(wt(),_r)){if(z==(Cc(),yR))for(D=new W(m.f);D.a<D.c.c.length;)N=y(K(D),7),N.b.c.length==0||vDe(N),N.e.c.length==0||pDe(N);else if(Qe(ee(m,(Oe(),Pt)),12))ie=y(ee(m,Pt),12),se=y(wr(m,(Ye(),vt)).mb().H(),7),ce=y(wr(m,lt).mb().H(),7),fe=y(ee(se,Pt),7),_e=y(ee(ce,Pt),7),nr(ie,_e),Bn(ie,fe),Re=new hr(ce.f.i),Re.a=Pn(xe(Ee(un,1),on,10,0,[_e.f.i,_e.i,_e.a])).a,kn(ie.a,Re),Re=new hr(se.f.i),Re.a=Pn(xe(Ee(un,1),on,10,0,[fe.f.i,fe.i,fe.a])).a,kn(ie.a,Re);else{if(m.f.c.length>=2){for(Z=!0,j=new W(m.f),f=y(K(j),7);j.a<j.c.c.length;)if(H=f,f=y(K(j),7),!ho(ee(H,Pt),ee(f,Pt))){Z=!1;break}}else Z=!1;for(D=new W(m.f);D.a<D.c.c.length;)N=y(K(D),7),N.b.c.length==0||L3e(N,Z),N.e.c.length==0||N3e(N,Z)}ei(m,null)}zt(s)},re(jt,"NorthSouthPortPostprocessor",500),Q(501,1,Mn,kt),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re;for(en(s,jfe,1),Z=new Xe,Re=new Xe,N=new W(n.c);N.a<N.c.c.length;)for(R=y(K(N),16),se=-1,z=y(dr(R.a,Ge($r,oa,9,R.a.c.length,0,1)),51),j=0,H=z.length;j<H;++j)if(D=z[j],++se,!!(D.g==(wt(),ir)&&hu(y(ee(D,(Ke(),Nt)),28)))){for(Gi(y(ee(D,(Ke(),Nt)),28))||d3e(D),Ae(D,(Oe(),Zf),D),Z.c=Ge(yt,st,1,0,4,1),Re.c=Ge(yt,st,1,0,4,1),f=new Xe,_e=new pi,$5(_e,wr(D,(Ye(),Et))),tfe(n,_e,Z,Re,f),S=se,m=new W(Z);m.a<m.c.c.length;)d=y(K(m),9),Lv(d,S,R),++se,Ae(d,Zf,D),x=y(ht(d.f,0),7),ie=y(ee(x,Pt),7),Kt(ze(Zt(ee(ie,(sn(),YI)))))||y(ee(d,tp),20).ib(D);for(Fu(_e),fe=wr(D,At).mb();fe.G();)ce=y(fe.H(),7),Br(_e,ce,_e.a,_e.a.a);for(tfe(n,_e,Re,null,f),b=new W(Re);b.a<b.c.c.length;)d=y(K(b),9),Lv(d,++se,R),Ae(d,Zf,D),x=y(ht(d.f,0),7),ie=y(ee(x,Pt),7),Kt(ze(Zt(ee(ie,(sn(),YI)))))||y(ee(D,tp),20).ib(d);f.c.length==0||Ae(D,Y7,f)}zt(s)},re(jt,"NorthSouthPortPreprocessor",501),Q(502,1,Jr,Ot),T.$b=function(n,s){var f,d;return f=n.g,d=s.g,f!=d?f.e-d.e:n.k==s.k?0:f==(Ye(),Et)?n.k-s.k:s.k-n.k},re(jt,"NorthSouthPortPreprocessor/lambda$0$Type",502),Q(504,1,Mn,Wn),T.sc=function(n,s){var f,d,b,m,x,S;for(en(s,"Removing partition constraint edges",1),d=new W(n.c);d.a<d.c.c.length;)for(f=y(K(d),16),m=new W(f.a);m.a<m.c.c.length;)for(b=y(K(m),9),S=new W(b.f);S.a<S.c.c.length;)x=y(K(S),7),Kt(ze(Zt(ee(x,(Oe(),bx)))))&&pg(S);zt(s)},re(jt,"PartitionPostprocessor",504),Q(505,1,Mn,lr),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j;for(en(s,"Adding partition constraint edges",1),this.a=new Xe,S=new W(n.b);S.a<S.c.c.length;)m=y(K(S),9),b=y(ee(m,(Ke(),vF)),24),pNe(this,b.a).ib(m);for(d=0;d<this.a.c.length-1;d++)for(x=y(ht(this.a,d),20).mb();x.G();)for(m=y(x.H(),9),D=new cr,An(D,m),an(D,(Ye(),lt)),Ae(D,(Oe(),bx),(jn(),jn(),Ii)),N=y(ht(this.a,d+1),20).mb();N.G();)R=y(N.H(),9),j=new cr,An(j,R),an(j,vt),Ae(j,bx,Ii),f=new pu,Ae(f,bx,Ii),Ae(f,(Ke(),gF),Mt(20)),nr(f,D),Bn(f,j);this.a=null,zt(s)},re(jt,"PartitionPreprocessor",505),Q(506,1,Mn,xr),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie;for(en(s,"Port distribution",1),f=gce(n),z=0,D=0,b=0,x=f.length;b<x;++b)for(d=f[b],R=0,N=d.length;R<N;++R)for(S=d[R],S.k=D++,H=new W(S.f);H.a<H.c.c.length;)j=y(K(H),7),j.k=z++;for(m=new W(n.c);m.a<m.c.c.length;)d=y(K(m),16),YMe(d);ie=y(ee(n,(Oe(),np)),154),Z=Jh(ie,1)!=0?new fk(Ge(kx,O_,26,z,12,1)):new C4(Ge(kx,O_,26,z,12,1)),Uue(Z,f),zt(s)},re(jt,"PortDistributionProcessor",506),Q(507,1,Mn,Zi),T.sc=function(n,s){var f,d,b,m,x;for(en(s,"Port order processing",1),x=new is,d=new W(n.c);d.a<d.c.c.length;)for(f=y(K(d),16),m=new W(f.a);m.a<m.c.c.length;)b=y(K(m),9),hu(y(ee(b,(Ke(),Nt)),28))&&Cs(b.f,x);zt(s)},re(jt,"PortListSorter",507),Q(508,1,Jr,is),T.$b=function(n,s){return sje(y(n,7),y(s,7))},re(jt,"PortListSorter/PortComparator",508),Q(509,1,Mn,xi),T.sc=function(n,s){var f,d,b,m,x;for(en(s,"Port side processing",1),x=new W(n.b);x.a<x.c.c.length;)b=y(K(x),9),wce(b);for(d=new W(n.c);d.a<d.c.c.length;)for(f=y(K(d),16),m=new W(f.a);m.a<m.c.c.length;)b=y(K(m),9),wce(b);zt(s)},re(jt,"PortSideProcessor",509),Q(510,1,Mn,ou),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j;for(en(s,"Restoring reversed edges",1),S=new W(n.c);S.a<S.c.c.length;)for(x=y(K(S),16),N=new W(x.a);N.a<N.c.c.length;)for(R=y(K(N),9),j=new W(R.f);j.a<j.c.c.length;)for(D=y(K(j),7),m=y(dr(D.e,Ge(Ta,wa,12,D.e.c.length,0,1)),47),d=0,b=m.length;d<b;++d)f=m[d],Kt(ze(Zt(ee(f,(Oe(),ec)))))&&Oc(f,!1);zt(s)},re(jt,"ReversedEdgeRestorer",510),Q(511,1,Mn,Ro),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at,gt,mt,Tt,It,Ut,zn,Xn;if(en(s,"Sausage Folding",1),this.b=y(ee(n,(Oe(),la)),15).a,this.a=this.b*y(ee(n,(sn(),eb)),15).a,Z=mMe(this,n),z=n.c.c.length,ie=iMe(this,n),It=z*ie,b=y(ee(n,(Ke(),bo)),59),b==(ur(),ps)||b==_a||b==go?d=y(ee(n,ep),15).a:d=1/y(ee(n,ep),15).a,f=It/Z,d>f){zt(s);return}mt=0,m=$o;do++mt,f=It/mt/(Z*mt),H=m,m=f-d<=0?0-(f-d):f-d;while(f>d);for(H<m&&--mt,at=z/(1>mt?1:mt)|0,N=at,Re=at,Xn=!0;N<z;){j=y(ht(n.c,N),16),gt=!0,fe=null,_e=null;e:for(zn=new W(j.a);zn.a<zn.c.c.length;)for(Ut=y(K(zn),9),S=Xt(Wr(Ut));Vt(S);){if(x=y(Gt(S),12),fe&&fe!=Ut){gt=!1;break e}if(fe=Ut,Tt=x.c.f,_e&&_e!=Tt){gt=!1;break e}_e=Tt}if(Xn&&gt&&(Re=0,Xn=!1),N!=Re){for(We=y(ht(n.c,Re),16),ce=new W(kf(j.a));ce.a<ce.c.c.length;)if(se=y(K(ce),9),Lv(se,We.a.c.length,We),Re==0)for(S=new W(kf(Wr(se)));S.a<S.c.c.length;)for(x=y(K(S),12),Oc(x,!0),Ae(n,J7,(jn(),jn(),Ii)),Rje(n,x),R=new Xe,Sje(n,x.c,x,R),Ve=new W(R);Ve.a<Ve.c.c.length;)Je=y(K(Ve),9),Lv(Je,We.a.c.length-1,We)}Re>=at&&(Xn=!0),++Re,++N}for(D=new Ln(n.c,0);D.b<D.d.Y();)j=(Ct(D.b<D.d.Y()),y(D.d.sb(D.c=D.b++),16)),j.a.c.length==0&&lo(D);zt(s)},T.a=0,T.b=0,re(jt,"SausageFolding",511),Q(512,1,Mn,_c),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe;for(en(s,"Self-loop processing",1),f=new Xe,D=new W(n.c);D.a<D.c.c.length;){for(N=y(K(D),16),f.c=Ge(yt,st,1,0,4,1),H=new W(N.a);H.a<H.c.c.length;)for(j=y(K(H),9),Z=new W(j.f);Z.a<Z.c.c.length;)for(z=y(K(Z),7),R=y(dr(z.e,Ge(Ta,wa,12,z.e.c.length,0,1)),47),x=0,S=R.length;x<S;++x)m=R[x],m.c.f==m.d.f&&(ie=m.c,ce=m.d,se=ie.g,fe=ce.g,((se==(Ye(),Et)||se==At)&&fe==vt||se==At&&fe==Et||se==lt&&fe!=lt)&&Oc(m,!1),se==lt&&fe==vt?tt(f,zce(n,m,ce,ie)):se==vt&&fe==lt&&tt(f,zce(n,m,ie,ce)));for(b=new W(f);b.a<b.c.c.length;)d=y(K(b),9),ei(d,N)}zt(s)},re(jt,"SelfLoopProcessor",512),Q(513,1,Mn,nl),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z;for(en(s,"Spline SelfLoop positioning",1),D=y(ee(n,(sn(),KI)),153),N=new W(n.c);N.a<N.c.c.length;)for(R=y(K(N),16),H=new W(R.a);H.a<H.c.c.length;){for(j=y(K(H),9),x=y(ee(j,(Oe(),OI)),20),S=new Xe,b=x.mb();b.G();)f=y(b.H(),75),bDe(f),(z=KB(f.g),Na(z,f.i),z).a.Y()==0?S.c[S.c.length]=f:(Lje(f),f.g.a.Y()==0||S4e(f));switch(D.e){case 0:Z=new Ere(j),zNe(Z),dBe(Z,S);break;case 2:for(m=new W(S);m.a<m.c.c.length;)f=y(K(m),75),Ig(f,(Vi(),Iu),!0);break;case 1:for(d=new W(S);d.a<d.c.c.length;)f=y(K(d),75),Ig(f,(Vi(),Iu),!0)}switch(D.e){case 0:case 1:Q3e(x);break;case 2:J3e(x)}}zt(s)},re(jt,"SplineSelfLoopPositioner",513),Q(515,1,{},Ere),re(jt,"SplineSelfLoopPositioner/DistributedLoopSidesCalculator",515),Q(516,1,{},ole),T.d=!0,re(jt,"SplineSelfLoopPositioner/DistributedLoopSidesCalculator/SortedLoopSides",516),Q(116,1,{116:1},cne),T.a=0,T.b=0,re(jt,"SplineSelfLoopPositioner/DistributedLoopSidesCalculator/SortedLoopSides/SizeOfSide",116),Q(318,1,{},Kq);var Jf;re(jt,"SplineSelfLoopPositioner/PortReadder",318),Q(514,1,Jr,Io),T.$b=function(n,s){return cAe(y(n,75),y(s,75))},re(jt,"SplineSelfLoopPositioner/TextWidthComparator",514),Q(517,1,Mn,Nm),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe;for(en(s,"Spline SelfLoop pre-processing.",1),D=new ba,H=new W(n.b);H.a<H.c.c.length;){for(j=y(K(H),9),qOe(j),D.a.Q(),S=Xt(qn(j));Vt(S);)m=y(Gt(S),12),Rf(m)&&(z=D.a.db(m,D),z==null);for(x=(Z=new pn(D.a).a.bb().mb(),new mn(Z));x.a.G();)m=(R=y(x.a.H(),21),y(R.yb(),12)),ce=m.c.g,fe=m.d.g,(ce==(Ye(),Et)&&(fe==lt||fe==At)||ce==lt&&fe==At||ce==At&&fe==vt||ce==vt&&(fe==Et||fe==lt))&&Oc(m,!1);if(f=DMe(D,j),Ae(j,(Oe(),OI),f),!Gi(y(ee(j,(Ke(),Nt)),28))){for(se=new ci,b=new W(f);b.a<b.c.c.length;)d=y(K(b),75),Na(se,CS(d)),Na(se,d.i);for(N=new Ln(j.f,0);N.b<N.d.Y();)ie=(Ct(N.b<N.d.Y()),y(N.d.sb(N.c=N.b++),7)),se.a.R(ie)&&lo(N)}}zt(s)},re(jt,"SplineSelfLoopPreProcessor",517),Q(518,1,Mn,zE),T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at,gt,mt,Tt,It,Ut,zn;for(en(s,"Spline SelfLoop routing",1),mt=new UE,H=new W(n.c);H.a<H.c.c.length;)for(j=y(K(H),16),fe=new W(j.a);fe.a<fe.c.c.length;){for(ce=y(K(fe),9),Re=ce.f,z=new ba,d=y(ee(ce,(Oe(),OI)),20).mb();d.G();)f=y(d.H(),75),Na(z,f.a);for(We=new Xe,x=(_e=new pn(z.a).a.bb().mb(),new mn(_e));x.a.G();){for(m=(S=y(x.a.H(),21),y(S.yb(),12)),at=m.c,It=m.d,D=new W(m.c.f.f),Ve=0,Tt=0,R=0,N=0;R<2;)b=y(K(D),7),at==b&&(Ve=N,++R),It==b&&(Tt=N,++R),++N;Je=y(ee(m,Z0),60),gt=Je==(Vi(),mo)||Je==Wo?Re.c.length-(Tt-Ve<0?-(Tt-Ve):Tt-Ve)+1:Tt-Ve<0?-(Tt-Ve):Tt-Ve,tt(We,new ese(Ve,Tt,gt,Je,m))}if(Cs(We,mt),ie=new ci,Z=new W(We),Z.a<Z.c.c.length){for(se=Xle(y(K(Z),195),ie);Z.a<Z.c.c.length;)P5(se,Xle(y(K(Z),195),ie));Ae(ce,a$,(Ut=new zm,zn=new dce(ce.j.a,ce.j.b),Ut.d=rt(0,zn.d-se.d),Ut.b=rt(0,zn.b-se.b),Ut.a=rt(0,se.a-zn.a),Ut.c=rt(0,se.c-zn.c),Ut))}}zt(s)},re(jt,"SplineSelfLoopRouter",518),Q(91,1,{91:1},Ag),T.w=function(){return this.b+": "+this.d+" -> "+this.a+" "+yw(this.c)},T.a=0,T.b=0,T.d=0,re(jt,"SplineSelfLoopRouter/LoopPadding",91),Q(521,1,Ks,Oie),T.D=function(n){return uDe(this,y(n,91))},T.a=0,T.c=0,re(jt,"SplineSelfLoopRouter/LoopPadding/EnclosingPredicate",521),Q(520,1,Jr,VE),T.$b=function(n,s){return uAe(y(n,91),y(s,91))},re(jt,"SplineSelfLoopRouter/LoopPadding/MarginComparator",520),Q(196,1,Ks,Xp),T.D=function(n){return y(n,91).c==this.a},re(jt,"SplineSelfLoopRouter/LoopPadding/PortSidePredicate",196),Q(195,1,{195:1},ese),T.c=0,T.d=0,T.e=0,re(jt,"SplineSelfLoopRouter/SelfLoopEdge",195),Q(519,1,Jr,UE),T.$b=function(n,s){return LCe(y(n,195),y(s,195))},re(jt,"SplineSelfLoopRouter/SelfLoopEdge/StepSizeComparator",519),Q(82,25,{25:1,82:1},Oq),T.vc=function(){var n,s,f,d;for(s=xn(this.a,0);s.b!=s.d.c;)n=y(vn(s),10),n.a=this.j.d;for(d=xn(this.c,0);d.b!=d.d.c;)f=y(vn(d),10),f.a=this.j.d},T.wc=function(){return this.b},T.xc=function(){return this.e},T.w=function(){return _l(new pn(this.d.a))},T.b=0,T.e=0,re(po,"CLEdge",82),Q(93,25,{25:1,93:1},lle),T.vc=function(){this.b.i.a=this.j.d+this.b.e.b},T.wc=function(){return this.b.g==(wt(),Hn)?0:this.a},T.xc=function(){return this.b.g==(wt(),Hn)?0:this.c},T.w=function(){return Ya(ee(this.b,(Oe(),Pt)))},T.a=0,T.c=0,re(po,"CLNode",93),Q(175,17,{175:1,3:1,23:1,17:1},G4);var y7,rI,Ade=rn(po,"ConstraintCalculationStrategy",175,Sn,kPe),Pde;Q(125,17,{125:1,3:1,23:1,17:1},lg);var m7,w7,_7,x7,W0,E7,Lde=rn(po,"GraphCompactionStrategy",125,Sn,OLe),Nde;Q(455,1,Mn,Lre),T.sc=function(n,s){var f,d,b;if(d=y(ee(n,(sn(),_x)),125),d!=(Cg(),W0)){switch(en(s,"Horizontal Compaction",1),this.a=n,b=new lre,f=new Lq(D3e(b,n)),nne(f,this.b),y(ee(n,WI),175).e){case 1:tne(f,Ode);break;default:tne(f,(dS(),pde))}switch(d.e){case 1:Hu(f);break;case 2:Hu(xu(f,(ur(),_a)));break;case 3:Hu(my(xu(Hu(f),(ur(),_a))));break;case 4:Hu(my(hk(xu(Hu(f),(ur(),_a)),new uu)));break;case 5:Hu(CCe(f,Dde))}xu(f,(ur(),ps)),f.e=!0,Z3e(b),zt(s)}};var Ode,Dde;re(po,"HorizontalGraphCompactor",455),Q(462,1,{},ete),T.tc=function(n,s){var f,d,b;return Qe(n,82)&&Qe(s,82)&&!VS(L5(y(n,82).d,y(s,82).d))||(f=null,Qe(n,93)&&(f=y(n,93).b),d=null,Qe(s,93)&&(d=y(s,93).b),f&&f.g==(wt(),Hn)||d&&d.g==(wt(),Hn))?0:(b=y(ee(this.a.a,(Oe(),nh)),134),Kk(b,f?f.g:(wt(),Nn),d?d.g:(wt(),Nn)))},T.uc=function(n,s){return Qe(n,82)&&Qe(s,82)&&!VS(L5(y(n,82).d,y(s,82).d))?1:wn(n.xc(),s.xc())},re(po,"HorizontalGraphCompactor/1",462),Q(456,317,{},Die),T.Dc=function(n){var s,f,d;for(this.b=n,PT(this,new Aa,this.a),PT(this,new Li,this.a),s=Wi,d=new W(this.b.a.b);d.a<d.c.c.length;)f=y(K(d),25),!(Qe(f,93)&&y(f,93).b.g==(wt(),Hn))&&(s=wn(s,ze(mne(this.a,f))));s==Wi&&(s=0),PT(this,new Ni,new nte(s))},re(po,"HorizontalGraphCompactor/EdgeAwareScanlineConstraintCalculation",456),Q(457,1,Yi,tte),T.B=function(n){return mne(this,n)},re(po,"HorizontalGraphCompactor/EdgeAwareScanlineConstraintCalculation/lambda$0$Type",457),Q(458,1,Ks,Aa),T.D=function(n){return Qe(y(n,25),82)},re(po,"HorizontalGraphCompactor/EdgeAwareScanlineConstraintCalculation/lambda$1$Type",458),Q(459,1,Ks,Li),T.D=function(n){return Qe(y(n,25),93)},re(po,"HorizontalGraphCompactor/EdgeAwareScanlineConstraintCalculation/lambda$2$Type",459),Q(460,1,Ks,Ni),T.D=function(n){return!0},re(po,"HorizontalGraphCompactor/EdgeAwareScanlineConstraintCalculation/lambda$3$Type",460),Q(461,1,Yi,nte),T.B=function(n){return this.a},T.a=0,re(po,"HorizontalGraphCompactor/EdgeAwareScanlineConstraintCalculation/lambda$4$Type",461),Q(463,1,Yi,uu),T.B=function(n){return aB(),jn(),tq(y(y(n,27).a,25).n,y(y(n,27).b,59))?er:Ii},re(po,"HorizontalGraphCompactor/lambda$0$Type",463),Q(553,1,{},lre),T.c=!1,re(po,"LGraphToCGraphTransformer",553),Q(552,1,{},ks),T.Cc=function(n){var s,f,d,b,m;for(this.a=n,this.d=new ok,this.c=Ge(k7,st,61,this.a.a.a.c.length,0,1),this.b=0,f=new W(this.a.a.a);f.a<f.c.c.length;)s=y(K(f),78),s.d=this.b,m=Py(Ene(N4(new Qp,this.b),s),this.d),this.c[this.b]=m,++this.b;for(s4e(this),eBe(this),e3e(this),Uq(EB(this.d),new ww),b=new W(this.a.a.b);b.a<b.c.c.length;)d=y(K(b),25),d.r=this.c[d.f.d].e+d.g.a,d.j.d=d.r},T.b=0,re(po,"NetworkSimplexCompaction",552),Q(142,1,{142:1,23:1},h0),T.F=function(n){return iNe(this,y(n,142))},T.c=!1,T.d=!0,T.i=0,T.j=0,T.k=0,T.n=0,re(po,"VerticalSegment",142),Q(586,1,{},pre),T.e=!1,re(vs,"AllCrossingsCounter",586),Q(339,1,{}),re(vs,"BetweenLayerEdgeAllCrossingsCounter",339),Q(613,1,{},Xue),T.c=0,T.e=0,T.i=0,re(vs,"BetweenLayerEdgeTwoNodeCrossingsCounter",613),Q(284,1,{284:1},doe),T.w=function(){return"AdjacencyList [node="+this.d+", adjacencies= "+this.a+"]"},T.b=0,T.c=0,T.f=0,re(vs,"BetweenLayerEdgeTwoNodeCrossingsCounter/AdjacencyList",284),Q(128,1,{128:1,23:1},Qre),T.F=function(n){return XAe(this,y(n,128))},T.w=function(){return"Adjacency [position="+this.c+", cardinality="+this.a+", currentCardinality="+this.b+"]"},T.a=0,T.b=0,T.c=0,re(vs,"BetweenLayerEdgeTwoNodeCrossingsCounter/AdjacencyList/Adjacency",128),Q(610,339,{},Wte),T.Gc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at,gt,mt,Tt,It,Ut,zn,Xn,ha,Ia,Fl,$l,a1,nc,Ci,da,rc,si,mi,Bs,Gl,Au,Vc,rh,Qo,Uc,ib,Qs,Yc,Zs,Za,Wc,ab,yd,md,Hl,sb,eC,wpe;for(Zs=0,zn=0,Ia=n.length;zn<Ia;++zn)if(It=n[zn],Gi(y(ee(It,(Ke(),Nt)),28)))for(mi=new W(It.f);mi.a<mi.c.c.length;){for(si=y(K(mi),7),Gl=0,x=new W(si.e);x.a<x.c.c.length;)m=y(K(x),12),It.d!=m.d.f.d&&++Gl;Gl>0&&(this.a[si.k]=Zs++)}else{for($l=0,mi=new W(It.f);mi.a<mi.c.c.length;){for(si=y(K(mi),7),x=new W(si.e);x.a<x.c.c.length;)m=y(K(x),12),It.d!=m.d.f.d&&++$l;this.a[si.k]=Zs}$l>0&&++Zs}for(md=0,Xn=0,Fl=s.length;Xn<Fl;++Xn)if(It=s[Xn],Gi(y(ee(It,(Ke(),Nt)),28))){for(a1=0,mi=new W(It.f);mi.a<mi.c.c.length&&(si=y(K(mi),7),si.g==(Ye(),Et));)for(x=new W(si.b);x.a<x.c.c.length;)if(m=y(K(x),12),It.d!=m.c.f.d){++a1;break}for(Ci=0,Au=new Ln(It.f,It.f.c.length);Au.b>0;){for(si=(Ct(Au.b>0),y(Au.a.sb(Au.c=--Au.b),7)),Gl=0,x=new W(si.b);x.a<x.c.c.length;)m=y(K(x),12),It.d!=m.c.f.d&&++Gl;Gl>0&&(si.g==(Ye(),Et)?(this.a[si.k]=md,++md):(this.a[si.k]=md+a1+Ci,++Ci))}md+=Ci}else{for($l=0,mi=new W(It.f);mi.a<mi.c.c.length;){for(si=y(K(mi),7),x=new W(si.b);x.a<x.c.c.length;)m=y(K(x),12),It.d!=m.c.f.d&&++$l;this.a[si.k]=md}$l>0&&++md}for(Bs=new ln,ie=new ci,Ut=0,ha=n.length;Ut<ha;++Ut)for(It=n[Ut],ab=new W(It.f);ab.a<ab.c.c.length;)for(Wc=y(K(ab),7),x=new W(Wc.e);x.a<x.c.c.length;)if(m=y(K(x),12),sb=m.d,It.d!=sb.f.d)if(Za=y(Oi(Di(Bs.d,Wc)),204),Hl=y(Oi(Di(Bs.d,sb)),204),!Za&&!Hl)Z=new eie,ie.a.db(Z,ie),kn(Z.a,m),kn(Z.e,Wc),Oa(Bs.d,Wc,Z),kn(Z.e,sb),Oa(Bs.d,sb,Z);else if(!Za)kn(Hl.a,m),kn(Hl.e,Wc),Oa(Bs.d,Wc,Hl);else if(!Hl)kn(Za.a,m),kn(Za.e,sb),Oa(Bs.d,sb,Za);else if(Za==Hl)kn(Za.a,m);else{for(kn(Za.a,m),rc=xn(Hl.e,0);rc.b!=rc.d.c;)da=y(vn(rc),7),Oa(Bs.d,da,Za);Na(Za.a,Hl.a),Na(Za.e,Hl.e),ie.a.eb(Hl)!=null}for(se=y(mT(ie,Ge(qBe,{675:1,3:1,5:1,6:1},204,ie.a.Y(),0,1)),675),Tt=n[0].d,Yc=s[0].d,H=0,z=se.length;H<z;++H)for(j=se[H],j.f=Zs,j.g=md,mi=xn(j.e,0);mi.b!=mi.d.c;)si=y(vn(mi),7),Vc=this.a[si.k],si.f.d==Tt?(Vc<j.f&&(j.f=Vc,j.b=Ec(si)),Vc>j.c&&(j.c=Vc)):si.f.d==Yc&&(Vc<j.g&&(j.g=Vc),Vc>j.d&&(j.d=Vc));for(Pv(se,0,se.length,(Nh(),Nh(),bd)),yd=Ge(gr,vr,26,se.length,12,1),f=Ge(gr,vr,26,md+1,12,1),fe=0;fe<se.length;fe++)yd[fe]=se[fe].g,f[yd[fe]]=1;for(b=0,_e=0;_e<f.length;_e++)f[_e]==1?f[_e]=b:--b;for(rh=0,Re=0;Re<yd.length;Re++)yd[Re]+=f[yd[Re]],rh=Ei(rh,yd[Re]+1);for(D=1;D<rh;)D*=2;for(wpe=2*D-1,D-=1,eC=Ge(gr,vr,26,wpe,12,1),d=0,R=0,N=yd.length;R<N;++R)for(S=yd[R],Je=S+D,++eC[Je];Je>0;)Je%2>0&&(d+=eC[Je+1]),Je=(Je-1)/2|0,++eC[Je];for(mt=Ge(Mde,st,158,se.length*2,0,1),We=0;We<se.length;We++)mt[2*We]=new Mw(se[We],se[We].f,se[We].c,0),mt[2*We+1]=new Mw(se[We],se[We].c,se[We].f,1);for(Pv(mt,0,mt.length,bd),nc=0,at=0,gt=mt.length;at<gt;++at)switch(Ve=mt[at],Ve.d){case 0:++nc;break;case 1:--nc,d+=nc}for(Qs=Ge(Mde,st,158,se.length*2,0,1),ce=0;ce<se.length;ce++)Qs[2*ce]=new Mw(se[ce],se[ce].g,se[ce].d,0),Qs[2*ce+1]=new Mw(se[ce],se[ce].d,se[ce].g,1);for(Pv(Qs,0,Qs.length,bd),nc=0,Uc=0,ib=Qs.length;Uc<ib;++Uc)switch(Qo=Qs[Uc],Qo.d){case 0:++nc;break;case 1:--nc,d+=nc}return d},re(vs,"BetweenLayerHyperedgeAllCrossingsCounter",610),Q(204,1,{204:1,23:1},eie),T.F=function(n){return zOe(this,y(n,204))},T.b=0,T.c=0,T.d=0,T.f=0,T.g=0;var qBe=re(vs,"BetweenLayerHyperedgeAllCrossingsCounter/Hyperedge",204);Q(158,1,{158:1,23:1},Mw),T.F=function(n){return LMe(this,y(n,158))},T.b=0,T.c=0,T.d=0;var Mde=re(vs,"BetweenLayerHyperedgeAllCrossingsCounter/HyperedgeCorner",158);Q(611,339,{},Kte),T.Gc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at;for(at=0,m=0,S=n[0].d,Re=s[0].d,D=0,H=s.length;D<H;++D)if(R=s[D],Gi(y(ee(R,(Ke(),Nt)),28))){for(Z=0,ce=new W(R.f);ce.a<ce.c.c.length&&(se=y(K(ce),7),se.g==(Ye(),Et));)for(b=new W(se.b);b.a<b.c.c.length;)if(d=y(K(b),12),d.c.f.d==S){++Z;break}for(ie=0,_e=new Ln(R.f,R.f.c.length);_e.b>0;){for(se=(Ct(_e.b>0),y(_e.a.sb(_e.c=--_e.b),7)),fe=0,b=new W(se.b);b.a<b.c.c.length;)d=y(K(b),12),d.c.f.d==S&&++fe;fe>0&&(se.g==(Ye(),Et)?(this.a[se.k]=at,++at):(this.a[se.k]=at+Z+ie,++ie),m+=fe)}at+=ie}else{for(z=0,ce=new W(R.f);ce.a<ce.c.c.length;){for(se=y(K(ce),7),b=new W(se.b);b.a<b.c.c.length;)d=y(K(b),12),d.c.f.d==S&&++z;this.a[se.k]=at}z>0&&(++at,m+=z)}for(We=Ge(gr,vr,26,m,12,1),x=0,N=0,j=n.length;N<j;++N)if(R=n[N],Gi(y(ee(R,(Ke(),Nt)),28)))for(ce=new W(R.f);ce.a<ce.c.c.length;)for(se=y(K(ce),7),Je=x,b=new W(se.e);b.a<b.c.c.length;)d=y(K(b),12),Ve=d.d,Ve.f.d==Re&&_oe(We,Je,x++,this.a[Ve.k]);else for(Je=x,ce=new W(R.f);ce.a<ce.c.c.length;)for(se=y(K(ce),7),b=new W(se.e);b.a<b.c.c.length;)d=y(K(b),12),Ve=d.d,Ve.f.d==Re&&_oe(We,Je,x++,this.a[Ve.k]);return f=cMe(at,m,We),f},re(vs,"BetweenLayerStraightEdgeAllCrossingsCounter",611),Q(338,1,{},kq),T.b=0,T.e=!1,re(vs,"CrossingMatrixFiller",338),Q(447,1,Mn,YE),T.sc=function(n,s){var f,d,b,m;if(en(s,"Greedy switch crossing reduction",1),this.e=y(ee(n,(sn(),HI)),110),f=n.c.c.length,f<2||this.e==(g0(),TI)){zt(s);return}qje(this,n),this.e.b?(this.e.a?Z5(this):x5(this),d=SDe(this),b=this.e.a?this.c:xT(this.b,this.d),this.i=!this.i,this.d=this.g,this.e.a?Z5(this):x5(this),m=this.e.a?this.c:xT(this.b,this.d),b<=m&&F5(this,d)):this.e.a?Z5(this):x5(this),CMe(this,this.a),zt(s)},T.c=0,T.i=!0,re(vs,"GreedySwitchProcessor",447),Q(340,1,{},nq),re(vs,"InLayerEdgeAllCrossingsCounter",340),Q(614,340,{},vie),T.b=0,T.d=0,re(vs,"InLayerEdgeTwoNodeCrossingCounter",614),Q(226,1,{226:1,23:1},JB),T.F=function(n){return cDe(this,y(n,226))},T.w=function(){return"ComparableEdgeAndPort [port="+this.b+", edge="+this.a+", portPosition="+this.c+"]"},T.c=0,re(vs,"InLayerEdgeTwoNodeCrossingCounter/ComparableEdgeAndPort",226),Q(612,1,{},Fue),T.e=!0,T.f=0,T.g=0,T.k=!1,re(vs,"NorthSouthEdgeAllCrossingsCounter",612),Q(615,1,{},yoe),T.b=0,T.d=0,T.e=!1,re(vs,"NorthSouthEdgeNeighbouringNodeCrossingsCounter",615),Q(143,1,xl,bf),T.mb=function(){return Df(this)},T.b=0,re(vs,"PortIterable",143),Q(344,1,kr,o5),T.H=function(){return y(tae(this.a),7)},T.G=function(){return this.a.b>0},T.I=function(){throw new fr},re(vs,"PortIterable/1",344),Q(336,1,{},wq),re(vs,"SwitchDecider",336),Q(89,1,{89:1},Up),T.w=function(){return"NEdge[id="+this.b+" w="+this.f+" d="+this.a+"]"},T.a=1,T.b=0,T.e=!1,T.f=0;var jde=re(qg,"NEdge",89);Q(157,1,{},Ih),re(qg,"NEdge/NEdgeBuilder",157),Q(278,1,{},ok),re(qg,"NGraph",278),Q(61,1,{61:1},ise),T.b=0,T.d=-1,T.e=0,T.i=-1,T.j=!1;var k7=re(qg,"NNode",61);Q(333,13,N6,p4),T.rb=function(n,s){++this.d,If(n,this.c.length),Ry(this.c,n,s)},T.ib=function(n){return hl(this,n)},T.jb=function(n){return++this.d,Vn(this,n)},T.Q=function(){++this.d,this.c=Ge(yt,st,1,0,4,1)},T.vb=function(n){return++this.d,zh(this,n)},T.nb=function(n){return rB(this,n)},re(qg,"NNode/ChangeAwareArrayList",333),Q(199,1,{},Qp),re(qg,"NNode/NNodeBuilder",199),Q(595,1,{},WE),T.a=!1,T.f=Fr,T.j=0,re(qg,"NetworkSimplex",595),Q(193,17,{180:1,193:1,3:1,23:1,17:1},H4),T.rc=function(){switch(this.e){case 0:return new Tie;case 1:return new gee;default:throw new Rn("No implementation is available for the cycle breaker "+(this.d!=null?this.d:""+this.e))}};var iI,S7,Bde=rn(M6,"CycleBreakingStrategy",193,Sn,SPe),qde;Q(539,1,Go,Tie),T.qc=function(n){return Fde},T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at,gt,mt,Tt,It,Ut,zn,Xn;for(en(s,"Greedy cycle removal",1),ce=n.b,Xn=ce.c.length,this.a=Ge(gr,vr,26,Xn,12,1),this.c=Ge(gr,vr,26,Xn,12,1),this.b=Ge(gr,vr,26,Xn,12,1),S=0,ie=new W(ce);ie.a<ie.c.c.length;){for(z=y(K(ie),9),z.k=S,Je=new W(z.f);Je.a<Je.c.c.length;){for(Re=y(K(Je),7),m=new W(Re.b);m.a<m.c.c.length;)f=y(K(m),12),f.c.f!=z&&(gt=y(ee(f,(Oe(),js)),24).a,this.a[S]+=gt>0?gt+1:1);for(b=new W(Re.e);b.a<b.c.c.length;)f=y(K(b),12),f.d.f!=z&&(gt=y(ee(f,(Oe(),js)),24).a,this.c[S]+=gt>0?gt+1:1)}this.c[S]==0?kn(this.d,z):this.a[S]==0&&kn(this.e,z),++S}for(H=-1,j=1,N=new Xe,mt=y(ee(n,(Oe(),np)),154);Xn>0;){for(;this.d.b!=0;)It=y(IB(this.d),9),this.b[It.k]=H--,Wq(this,It),--Xn;for(;this.e.b!=0;)Ut=y(IB(this.e),9),this.b[Ut.k]=j++,Wq(this,Ut),--Xn;if(Xn>0){for(D=Uu,se=new W(ce);se.a<se.c.c.length;)z=y(K(se),9),this.b[z.k]==0&&(fe=this.c[z.k]-this.a[z.k],fe>=D&&(fe>D&&(N.c=Ge(yt,st,1,0,4,1),D=fe),N.c[N.c.length]=z));R=y(ht(N,lq(mt,N.c.length)),9),this.b[R.k]=j++,Wq(this,R),--Xn}}for(Tt=ce.c.length+1,S=0;S<ce.c.length;S++)this.b[S]<0&&(this.b[S]+=Tt);for(Z=new W(ce);Z.a<Z.c.c.length;)for(z=y(K(Z),9),at=y(dr(z.f,Ge(Ede,Ofe,7,z.f.c.length,0,1)),346),We=0,Ve=at.length;We<Ve;++We)for(Re=at[We],_e=y(dr(Re.e,Ge(Ta,wa,12,Re.e.c.length,0,1)),47),d=0,x=_e.length;d<x;++d)f=_e[d],zn=f.d.f.k,this.b[z.k]>this.b[zn]&&(Oc(f,!0),Ae(n,J7,(jn(),jn(),Ii)));this.a=null,this.c=null,this.b=null,Fu(this.e),Fu(this.d),zt(s)};var Fde;re(M6,"GreedyCycleBreaker",539),Q(540,1,Go,gee),T.qc=function(n){return $de},T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie;for(en(s,"Interactive cycle breaking",1),D=new Xe,H=new W(n.b);H.a<H.c.c.length;)for(j=y(K(H),9),j.k=1,z=bq(j).a,N=wu(j,(Ir(),Ri)).mb();N.G();)for(R=y(N.H(),7),b=new W(R.e);b.a<b.c.c.length;)f=y(K(b),12),Z=f.d.f,Z!=j&&(ie=bq(Z).a,ie<z&&(D.c[D.c.length]=f));for(m=new W(D);m.a<m.c.c.length;)f=y(K(m),12),Oc(f,!0);for(D.c=Ge(yt,st,1,0,4,1),S=new W(n.b);S.a<S.c.c.length;)x=y(K(S),9),x.k>0&&hce(this,x,D);for(d=new W(D);d.a<d.c.c.length;)f=y(K(d),12),Oc(f,!0);D.c=Ge(yt,st,1,0,4,1),zt(s)};var $de;re(M6,"InteractiveCycleBreaker",540),Q(543,1,Go,KE),T.qc=function(n){return zi(fl(new Zn,(Kr(),XR)),nx)},T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie;for(en(s,"Interactive node layering",1),f=new Xe,j=new W(n.b);j.a<j.c.c.length;){for(N=y(K(j),9),S=N.i.a,x=S+N.j.a,x=S+1>x?S+1:x,ie=new Ln(f,0),d=null;ie.b<ie.d.Y();)if(z=(Ct(ie.b<ie.d.Y()),y(ie.d.sb(ie.c=ie.b++),239)),z.c>=x){Ct(ie.b>0),ie.a.sb(ie.c=--ie.b);break}else z.a>S&&(d?(Vn(d.b,z.b),d.a=rt(d.a,z.a),lo(ie)):(tt(z.b,N),z.c=wn(z.c,S),z.a=rt(z.a,x),d=z));d||(d=new kte,d.c=S,d.a=x,Sc(ie,d),tt(d.b,N))}for(m=n.c,R=0,Z=new W(f);Z.a<Z.c.c.length;)for(z=y(K(Z),239),b=new xf(n),b.k=R++,m.c[m.c.length]=b,H=new W(z.b);H.a<H.c.c.length;)N=y(K(H),9),ei(N,b),N.k=0;for(D=new W(n.b);D.a<D.c.c.length;)N=y(K(D),9),N.k==0&&ale(this,N,n);for(;(Gn(0,m.c.length),y(m.c[0],16)).a.c.length==0;)Gn(0,m.c.length),m.c.splice(0,1);n.b.c=Ge(yt,st,1,0,4,1),zt(s)},re(D_,"InteractiveLayerer",543),Q(239,1,{239:1},kte),T.a=0,T.c=0,re(D_,"InteractiveLayerer/LayerSpan",239),Q(173,17,{180:1,173:1,3:1,23:1,17:1},Ck),T.rc=function(){switch(this.e){case 0:return new Sre;case 1:return new pee;case 2:return new KE;default:throw new Rn("No implementation is available for the layerer "+(this.d!=null?this.d:""+this.e))}};var T7,R7,aI,Gde=rn(D_,"LayeringStrategy",173,Sn,BPe),Hde;Q(542,1,Go,pee),T.qc=function(n){var s;return s=kw(zde),Kt(ze(Zt(ee(n,(sn(),GI)))))||ft(ee(n,nb))===ft((Ic(),rb))?Ur(s,Vde):ft(ee(n,nb))===ft((Ic(),n1))&&Ur(s,Ude),Kt(ze(Zt(ee(n,h$))))&&cs(s,(Kr(),o7)),s},T.sc=function(n,s){var f,d,b,m,x;for(en(s,"Longest path layering",1),this.a=n,x=this.a.b,this.b=Ge(gr,vr,26,x.c.length,12,1),f=0,m=new W(x);m.a<m.c.c.length;)d=y(K(m),9),d.k=f,this.b[f]=-1,++f;for(b=new W(x);b.a<b.c.c.length;)d=y(K(b),9),Fce(this,d);x.c=Ge(yt,st,1,0,4,1),this.a=null,this.b=null,zt(s)};var zde,Vde,Ude;re(D_,"LongestPathLayerer",542),Q(541,1,Go,Sre),T.qc=function(n){var s;return s=kw(Yde),Kt(ze(Zt(ee(n,(sn(),GI)))))||ft(ee(n,nb))===ft((Ic(),rb))?(Ur(s,Wde),this.d=(Ic(),rb)):ft(ee(n,nb))===ft((Ic(),n1))&&(Ur(s,Kde),this.d=n1),s},T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j;if(en(s,"Network simplex layering",1),this.b=n,j=y(ee(n,(sn(),tb)),24).a*4,D=this.b.b,D.c.length<1){zt(s);return}for(d=xn(tje(this,D),0);d.b!=d.d.c;)for(f=y(vn(d),20),m=j*yr(ire(f.Y())),b=X3e(f),Uq(rne(ACe(ine(EB(b),m),this.b),this.d==(Ic(),rb)),Uh(s,1)),S=this.b.c,N=new W(b.a);N.a<N.c.c.length;){for(R=y(K(N),61);S.c.length<=R.e;)yf(S,S.c.length,new xf(this.b));x=y(R.f,9),ei(x,y(ht(S,R.e),16))}D.c=Ge(yt,st,1,0,4,1),this.a=null,this.b=null,this.c=null,zt(s)};var Yde,Wde,Kde;re(D_,"NetworkSimplexLayerer",541),Q(326,1,{}),re(Tl,"AbstractPortDistributor",326),Q(558,1,Jr,ite),T.$b=function(n,s){return XOe(this,y(n,7),y(s,7))},re(Tl,"AbstractPortDistributor/1",558),Q(564,1,{},Nse),re(Tl,"BarycenterHeuristic",564),Q(272,1,{272:1},ote),T.b=0,T.d=0,T.e=!1;var Xde=re(Tl,"BarycenterHeuristic/BarycenterState",272);Q(565,1,Jr,ate),T.$b=function(n,s){return YDe(this.a,n,s)},re(Tl,"BarycenterHeuristic/lambda$0$Type",565),Q(192,17,{180:1,192:1,3:1,23:1,17:1},z4),T.rc=function(){switch(this.e){case 0:return new _ne;case 1:return new _ee;default:throw new Rn("No implementation is available for the crossing minimizer "+(this.d!=null?this.d:""+this.e))}};var sI,oI,Jde=rn(Tl,"CrossingMinimizationStrategy",192,Sn,TPe),Qde;Q(526,1,Go,_ee),T.qc=function(n){var s;return s=kw(Zde),y(ee(n,(Oe(),hi)),18).kb((Dr(),hd))&&zi(s,(Kr(),eI)),s},T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z;for(en(s,"Interactive crossing minimization",1),H=0,b=new W(n.c);b.a<b.c.c.length;){for(d=y(K(b),16),f=0,N=0,R=new W(d.a);R.a<R.c.c.length;)for(x=y(K(R),9),x.i.a>0&&(f+=x.i.a+x.j.a/2,++N),j=new W(x.f);j.a<j.c.c.length;)D=y(K(j),7),D.k=H++;for(f/=N,Z=Ge(Ra,Ui,26,d.a.c.length,12,1),m=0,S=new W(d.a);S.a<S.c.c.length;)x=y(K(S),9),x.k=m++,Z[x.k]=d4e(x,f),x.g==(wt(),Nn)&&Ae(x,(Oe(),t$),Z[x.k]);Cs(d.a,new ste(Z))}z=new fk(Ge(kx,O_,26,H,12,1)),Uue(z,gce(n)),zt(s)};var Zde;re(Tl,"InteractiveCrossingMinimizer",526),Q(527,1,Jr,ste),T.$b=function(n,s){return $De(this,y(n,9),y(s,9))},re(Tl,"InteractiveCrossingMinimizer/1",527),Q(525,1,Go,_ne),T.qc=function(n){var s;return s=kw(eve),y(ee(n,(Oe(),hi)),18).kb((Dr(),hd))&&zi(s,(Kr(),eI)),s},T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at,gt,mt,Tt,It,Ut;if(en(s,"Layer sweep crossing minimization",1),Tt=y(ee(n,(Oe(),np)),154),se=n.c.c.length,se<2){zt(s);return}for(vBe(this,n),d=Fr,Ut=y(ee(n,(sn(),tb)),24).a,f=Ge(Xde,Xr,671,n.c.c.length,0,2),H=0,ie=new W(n.c);ie.a<ie.c.c.length;){for(Z=y(K(ie),16),Z.k=H,f[H]=Ge(Xde,{671:1,3:1,5:1,6:1},272,Z.a.c.length,0,1),z=0,We=new W(Z.a);We.a<We.c.c.length;)Re=y(K(We),9),Re.k=z,f[H][z]=new ote(Re),++z;++H}for(b=new kce(f,this.g),m=new Nse(f,b,Tt,this.j),Ve=new fk(this.j),_e=new C4(this.j),It=0;It<Ut&&d>0;It++){D=Jh(Tt,1)!=0,N=D?0:se-1,R=this.b[N],gt=Jh(Tt,1)!=0?Ve:_e,eq(R,m,D,!1,!0),x=Fr,S=!0;do{if(M5(this.b,this.k),mt=x,x=0,x+=k5(this.f,R,N),D){for(ce=1;ce<se;ce++)j=this.b[ce],g5(gt,R,(Ir(),Ri)),eq(j,m,!0,!S,!1),x+=k5(this.f,j,ce),this.d[ce]||this.c[ce-1]?x+=afe(this.e,R,j):x+=rfe(this.i,R,j),R=j;N=se-1}else{for(ce=se-2;ce>=0;ce--)j=this.b[ce],g5(gt,R,(Ir(),fa)),eq(j,m,!1,!S,!1),x+=k5(this.f,j,ce),this.c[ce]||this.d[ce+1]?x+=afe(this.e,j,R):x+=rfe(this.i,j,R),R=j;N=0}S=!1,D=!D}while(x<mt&&x>0);(x<d||mt<d)&&(x<=mt?(M5(this.b,this.a),d=x):(M5(this.k,this.a),d=mt))}for(fe=new Ln(n.c,0);fe.b<fe.d.Y();)for(Z=(Ct(fe.b<fe.d.Y()),y(fe.d.sb(fe.c=fe.b++),16)),at=this.a[fe.b-1],Je=new Ln(Z.a,0);Je.b<Je.d.Y();)Ct(Je.b<Je.d.Y()),Je.d.sb(Je.c=Je.b++),kB(Je,at[Je.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,UB(this.g),zt(s)};var eve;re(Tl,"LayerSweepCrossingMinimizer",525),Q(327,326,{},C4),T.Hc=function(n,s,f){var d,b,m,x,S,R,N,D,j,H,z,Z;if(H=this.a,Gi(y(ee(n,(Ke(),Nt)),28)))switch(f.e){case 1:{for(b=0,S=0,j=new W(n.f);j.a<j.c.c.length;)N=y(K(j),7),N.b.c.length!=0&&(++b,N.g==(Ye(),Et)&&++S);for(R=s+S,Z=s+b,D=wu(n,(Ir(),fa)).mb();D.G();)N=y(D.H(),7),N.g==(Ye(),Et)?(H[N.k]=R,--R):(H[N.k]=Z,--Z);return b}case 2:{for(z=0,D=wu(n,(Ir(),Ri)).mb();D.G();)N=y(D.H(),7),++z,H[N.k]=s+z;return z}default:throw new Zp}else{for(x=4,m=0,j=wu(n,f).mb();j.G();)N=y(j.H(),7),d=Gce(f,N.g),x=x<d-1?x:d-1,m=m>d?m:d;if(m>x){for(D=wu(n,f).mb();D.G();)N=y(D.H(),7),H[N.k]=s+Gce(f,N.g)-x;return m-x}return 0}},re(Tl,"LayerTotalPortDistributor",327),Q(274,326,{},fk),T.Hc=function(n,s,f){var d,b,m,x,S,R,N,D,j,H,z;if(j=this.a,Gi(y(ee(n,(Ke(),Nt)),28)))switch(f.e){case 1:{for(b=0,m=0,D=new W(n.f);D.a<D.c.c.length;)R=y(K(D),7),R.b.c.length!=0&&(++b,R.g==(Ye(),Et)&&++m);for(d=1/(b+1),x=s+m*d,z=s+1-d,N=wu(n,(Ir(),fa)).mb();N.G();)R=y(N.H(),7),R.g==(Ye(),Et)?(j[R.k]=x,x-=d):(j[R.k]=z,z-=d);break}case 2:{for(S=0,D=new W(n.f);D.a<D.c.c.length;)R=y(K(D),7),R.e.c.length==0||++S;for(d=1/(S+1),H=s+d,N=wu(n,(Ir(),Ri)).mb();N.G();)R=y(N.H(),7),j[R.k]=H,H+=d;break}default:throw new Rn(j6)}else for(N=wu(n,f).mb();N.G();)R=y(N.H(),7),j[R.k]=s+o3e(f,R.g);return 1},re(Tl,"NodeRelativePortDistributor",274),Q(566,1,{},kce),re(Ffe,"ForsterConstraintResolver",566),Q(102,1,{102:1},mae,qle),T.w=function(){var n,s;for(s=new ig,s.a+="[",n=0;n<this.d.length;n++)Vs(s,Cae(this.d[n])),ss(this.g,this.d[0]).a!=null&&Vs(Vs((s.a+="<",s),Tne(ze(ss(this.g,this.d[0]).a))),">"),n<this.d.length-1&&(s.a+=", ");return s.a+="]",s.a},T.a=0,T.c=0,T.f=0;var tve=re(Ffe,"ForsterConstraintResolver/ConstraintGroup",102);Q(331,1,{}),re(S0,"AbstractCrossingsCounter",331),Q(568,331,{},$ie),re(S0,"BarthJuengerMutzelCrossingsCounter",568),Q(567,331,{},Gie),re(S0,"HyperedgeCrossingsCounter",567),Q(197,1,{197:1,23:1},sie),T.F=function(n){return aDe(this,y(n,197))},T.b=0,T.c=0,T.e=0,T.f=0;var FBe=re(S0,"HyperedgeCrossingsCounter/Hyperedge",197);Q(156,1,{156:1,23:1},jw),T.F=function(n){return ZMe(this,y(n,156))},T.b=0,T.c=0;var nve=re(S0,"HyperedgeCrossingsCounter/HyperedgeCorner",156);Q(242,17,{242:1,3:1,23:1,17:1},W4);var K0,X0,$Be=rn(S0,"HyperedgeCrossingsCounter/HyperedgeCorner/Type",242,Sn,YPe);Q(545,1,Go,xee),T.qc=function(n){return y(ee(n,(Oe(),hi)),18).kb((Dr(),Xo))?rve:null},T.sc=function(n,s){var f,d;for(en(s,"Interactive node placement",1),this.a=y(ee(n,(Oe(),nh)),134),d=new W(n.c);d.a<d.c.c.length;)f=y(K(d),16),w3e(this,f);zt(s)};var rve;re(T0,"InteractiveNodePlacer",545),Q(546,1,Go,Eee),T.qc=function(n){return y(ee(n,(Oe(),hi)),18).kb((Dr(),Xo))?ive:null},T.sc=function(n,s){en(s,"Linear segments node placement",1),this.b=y(ee(n,(Oe(),nh)),134),_Be(this,n),Eje(this,n),Jje(this,n),uBe(this),this.a=null,this.b=null,zt(s)};var ive,ox,ux;re(T0,"LinearSegmentsNodePlacer",546),Q(111,1,{111:1,23:1},b4),T.F=function(n){return qCe(this,y(n,111))},T.t=function(n){var s;return Qe(n,111)?(s=y(n,111),this.b==s.b):!1},T.v=function(){return this.b},T.w=function(){return"ls"+_l(this.f)},T.a=0,T.b=0,T.c=-1,T.d=-1,T.i=0;var ave=re(T0,"LinearSegmentsNodePlacer/LinearSegment",111);Q(548,1,Go,kee),T.qc=function(n){return y(ee(n,(Oe(),hi)),18).kb((Dr(),Xo))?sve:null},T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at,gt,mt,Tt,It,Ut,zn,Xn;for(Ut=y(ee(n,(Oe(),nh)),134),Re=(Qn(),new ln),_e=0,b=new ok,R=new W(n.c);R.a<R.c.c.length;)for(x=y(K(R),16),mt=null,gt=null,z=new W(x.a);z.a<z.c.c.length;)H=y(K(z),9),++_e,fe=Py(new Qp,b),fe.f=H,Oa(Re.d,H,fe),H.e.d=iw(H.e.d),gt&&(ce=new Up,ce.f=0,ce.a=yr(eB(mt.e.d+mt.j.b+mt.e.a+My(Ut,y(gt.f,9),H))),ce.c=gt,ce.d=fe,hl(gt.g,ce),hl(fe.c,ce)),mt=H,gt=fe;for(N=new W(n.c);N.a<N.c.c.length;)for(x=y(K(N),16),z=new W(x.a);z.a<z.c.c.length;)for(H=y(K(z),9),Ve=new W(H.f);Ve.a<Ve.c.c.length;)Je=y(K(Ve),7),Xn=Je.i.b+Je.a.b,Xn!=Math.floor(Xn)&&(We=Xn-ELe(CNe(Math.round(Xn))),Je.i.b-=We);for(S=new W(n.c);S.a<S.c.c.length;)for(x=y(K(S),16),z=new W(x.a);z.a<z.c.c.length;)for(H=y(K(z),9),j=Xt(qn(H));Vt(j);)D=y(Gt(j),12),!Rf(D)&&D.d.f.d!=x&&(It=D.c.f.e.d+D.c.i.b+D.c.a.b,zn=D.d.f.e.d+D.d.i.b+D.d.a.b,f=zn-It,at=yr(f),d=Py(new Qp,b),Z=new Up,Z.f=jue(D),Z.a=at>0?at:0,Z.c=d,Z.d=y(bn(Re,D.c.f),61),hl(Z.c.g,Z),hl(Z.d.c,Z),Tt=new Up,Tt.f=jue(D),Tt.a=at<0?-at:0,Tt.c=d,Tt.d=y(bn(Re,D.d.f),61),hl(Tt.c.g,Tt),hl(Tt.d.c,Tt));for(m=y(ee(n,(sn(),tb)),24).a*yr(Math.sqrt(_e)),Uq(rne(ine(EB(b),m),!1),Uh(s,1)),se=new W(b.a);se.a<se.c.c.length;)ie=y(K(se),61),ie.f!=null&&(H=y(ie.f,9),H.i.b=ie.e+H.e.d)};var sve;re(T0,"NetworkSimplexPlacer",548),Q(141,17,{180:1,141:1,3:1,23:1,17:1},ky),T.rc=function(){switch(this.e){case 0:return new See;case 1:return new xee;case 2:return new Eee;case 3:return new sre;case 4:return new kee;default:throw new Rn("No implementation is available for the node placer "+(this.d!=null?this.d:""+this.e))}};var uI,I7,C7,A7,P7,ove=rn(T0,"NodePlacementStrategy",141,Sn,JLe),uve;Q(544,1,Go,See),T.qc=function(n){return y(ee(n,(Oe(),hi)),18).kb((Dr(),Xo))?cve:null},T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j;for(en(s,"Simple node placement",1),j=y(ee(n,(Oe(),nh)),134),S=0,m=new W(n.c);m.a<m.c.c.length;){for(d=y(K(m),16),x=d.c,x.b=0,f=null,N=new W(d.a);N.a<N.c.c.length;)R=y(K(N),9),f&&(x.b+=Kk(j,R.g,f.g)*j.d),x.b+=R.e.d+R.j.b+R.e.a,f=R;S=rt(S,x.b)}for(b=new W(n.c);b.a<b.c.c.length;)for(d=y(K(b),16),x=d.c,D=(S-x.b)/2,f=null,N=new W(d.a);N.a<N.c.c.length;)R=y(K(N),9),f&&(D+=Kk(j,R.g,f.g)*j.d),D+=R.e.d,R.i.b=D,D+=R.j.b+R.e.a,f=R;zt(s)};var cve;re(T0,"SimpleNodePlacer",544),Q(81,1,{81:1},Mf),T.w=function(){var n;return n="",this.c==(fo(),Ll)?n+=Og:this.c==Ru&&(n+=Ng),this.k==(Ys(),qc)?n+="DOWN":this.k==Ms?n+="UP":n+="BALANCED",n},re(Ho,"BKAlignedLayout",81),Q(248,17,{248:1,3:1,23:1,17:1},K4);var Ru,Ll,GBe=rn(Ho,"BKAlignedLayout/HDirection",248,Sn,WPe);Q(247,17,{247:1,3:1,23:1,17:1},X4);var qc,Ms,HBe=rn(Ho,"BKAlignedLayout/VDirection",247,Sn,KPe);Q(596,1,{},tre),re(Ho,"BKAligner",596),Q(599,1,{},Vue),re(Ho,"BKCompactor",599),Q(279,1,{279:1},sy),T.a=0,re(Ho,"BKCompactor/ClassEdge",279),Q(200,1,{200:1},Ite),T.a=0,T.b=0,re(Ho,"BKCompactor/ClassNode",200),Q(547,1,Go,sre),T.qc=function(n){return y(ee(n,(Oe(),hi)),18).kb((Dr(),Xo))?lve:null},T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e;switch(en(s,"Brandes & Koepf node placement",1),this.b=n,this.d=xje(n),this.a=Kt(ze(Zt(ee(n,(sn(),s$))))),this.e=ft(ee(n,mx))===ft((s0(),xI)),h4e(this,n),z=(Mi(4,qf),new sa(4)),y(ee(n,mx),124).e){case 3:Z=new Mf(n,this.d.d,(Ys(),qc),(fo(),Ru)),z.c[z.c.length]=Z;break;case 1:ie=new Mf(n,this.d.d,(Ys(),Ms),(fo(),Ru)),z.c[z.c.length]=ie;break;case 4:fe=new Mf(n,this.d.d,(Ys(),qc),(fo(),Ll)),z.c[z.c.length]=fe;break;case 2:_e=new Mf(n,this.d.d,(Ys(),Ms),(fo(),Ll)),z.c[z.c.length]=_e;break;default:Z=new Mf(n,this.d.d,(Ys(),qc),(fo(),Ru)),ie=new Mf(n,this.d.d,Ms,Ru),fe=new Mf(n,this.d.d,qc,Ll),_e=new Mf(n,this.d.d,Ms,Ll),z.c[z.c.length]=fe,z.c[z.c.length]=_e,z.c[z.c.length]=Z,z.c[z.c.length]=ie}for(f=new tre(n,this.d),m=new W(z);m.a<m.c.c.length;)d=y(K(m),81),tBe(f,d,this.c),Aje(d);for(D=new Vue(n,this.d),x=new W(z);x.a<x.c.c.length;)d=y(K(x),81),q4e(D,d);if(this.a)for(S=new W(z);S.a<S.c.c.length;)d=y(K(S),81),Mh(),d+""+LT(d);if(N=null,this.e&&(R=Q4e(this,z,this.d.d),ble(this,n,R)&&(N=R)),!N)for(S=new W(z);S.a<S.c.c.length;)d=y(K(S),81),ble(this,n,d)&&(!N||LT(N)>LT(d))&&(N=d);for(!N&&(N=(Gn(0,z.c.length),y(z.c[0],81))),H=new W(n.c);H.a<H.c.c.length;)for(j=y(K(H),16),ce=new W(j.a);ce.a<ce.c.c.length;)se=y(K(ce),9),se.i.b=ze(N.n[se.k])+ze(N.d[se.k]);for(this.a&&(Mh(),""+Mce(N),""+c3e(N)),b=new W(z);b.a<b.c.c.length;)d=y(K(b),81),d.f=null,d.b=null,d.a=null,d.d=null,d.i=null,d.g=null,d.n=null;$Ne(this.d),this.c.a.Q(),zt(s)},T.a=!1,T.e=!1;var lve;re(Ho,"BKNodePlacer",547),Q(194,17,{194:1,3:1,23:1,17:1},J4);var cI,lI,fve=rn(Ho,"CompactionStrategy",194,Sn,XPe),hve;Q(597,1,{},Wp),T.d=0,re(Ho,"NeighborhoodInformation",597),Q(598,1,Jr,cte),T.$b=function(n,s){return FNe(this,y(n,27),y(s,27))},re(Ho,"NeighborhoodInformation/NeighborComparator",598),Q(334,1,{}),re(Ho,"ThresholdStrategy",334),Q(602,334,{},Gte),T.Ic=function(n,s,f){return this.a.k==(Ys(),Ms)?Wi:ii},T.Jc=function(){},re(Ho,"ThresholdStrategy/NullThresholdStrategy",602),Q(249,1,{249:1},nre),T.c=!1,T.d=!1,re(Ho,"ThresholdStrategy/Postprocessable",249),Q(603,334,{},Hte),T.Ic=function(n,s,f){var d,b,m;return b=s==f,d=this.a.a[f.k]==s,b||d?(m=n,this.a.c==(fo(),Ll)?(b&&(m=qT(this,s,!0)),(m==1/0||m==-1/0)&&d&&(m=qT(this,f,!1))):(b&&(m=qT(this,s,!0)),(m==1/0||m==-1/0)&&d&&(m=qT(this,f,!1))),m):n},T.Jc=function(){for(var n,s,f,d;this.d.b!=0;)d=y(qPe(this.d),249),f=ule(this,d),f.a&&(n=f.a,this.c.a[n.c.f.d.k]!==this.c.a[n.d.f.d.k]&&(s=Bce(this,d),s||dre(this.e,d)));for(;this.e.a.c.length!=0;)Bce(this,y(joe(this.e),249))},re(Ho,"ThresholdStrategy/SimpleThresholdStrategy",603),Q(423,1,{180:1},Om),T.rc=function(){switch(this.a.e){case 1:return new ore;case 3:return new Ree;default:return new Tee}},re(Ff,"EdgeRouterFactory",423),Q(538,1,Go,Tee),T.qc=function(n){var s,f;return f=y(ee(n,(Oe(),hi)),18),s=new Zn,f.kb((Dr(),hx))&&(Ur(s,gve),Ur(s,L7)),(f.kb(hd)||Kt(ze(Zt(ee(n,(sn(),t1))))))&&(Ur(s,L7),f.kb(dd)&&Ur(s,yve)),f.kb(Xo)&&Ur(s,pve),f.kb(dx)&&Ur(s,mve),f.kb(SI)&&Ur(s,bve),f.kb(Yg)&&Ur(s,dve),f.kb(Wg)&&Ur(s,vve),s},T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z;en(s,"Orthogonal edge routing",1),H=y(ee(n,(Oe(),nh)),134),Kt(ze(Zt(ee(n,(Ke(),P0))))),D=new kT(0,H.a),Z=0,m=new Ln(n.c,0),x=null,S=null;do R=m.b<m.d.Y()?(Ct(m.b<m.d.Y()),y(m.d.sb(m.c=m.b++),16)):null,N=R?R.a:null,x&&(o6(x,Z),Z+=x.c.a),z=x?Z+H.b:Z,j=e6(D,n,S,N,z),d=!x||Gk(S,(d_(),cx)),b=!R||Gk(N,(d_(),cx)),j>0?(f=H.b+(j-1)*H.a,R&&(f+=H.b),f<H.f&&!d&&!b&&(f=H.f),Z+=f):!d&&!b&&(Z+=H.f),x=R,S=N;while(R);n.e.a=Z,zt(s)};var dve,vve,pve,gve,bve,L7,yve,mve;re(Ff,"OrthogonalEdgeRouter",538),Q(277,1,{},kT),T.a=0,T.c=0,re(Ff,"OrthogonalRoutingGenerator",277),Q(118,1,{118:1},Qw),T.w=function(){return this.a+"->"+this.b},T.c=0,re(Ff,"OrthogonalRoutingGenerator/Dependency",118),Q(80,1,{80:1,23:1},woe),T.F=function(n){return FCe(this,y(n,80))},T.t=function(n){var s;return Qe(n,80)?(s=y(n,80),this.d==s.d):!1},T.v=function(){return this.d},T.w=function(){var n,s,f,d;for(n=new rg("{"),d=new W(this.g);d.a<d.c.c.length;)f=y(K(d),7),s=Uw(f.f),s==null&&(s="n"+hie(f.f)),n.a+=""+s,d.a<d.c.c.length&&(n.a+=",");return n.a+="}",n.a},T.a=NaN,T.c=0,T.d=0,T.f=0,T.i=0,T.k=NaN,re(Ff,"OrthogonalRoutingGenerator/HyperNode",80),Q(580,1,{},lte),T.Kc=function(n,s){var f,d,b,m,x,S,R,N,D,j;for(j=s+n.i*this.a.c,S=new W(n.g);S.a<S.c.c.length;)for(x=y(K(S),7),R=Pn(xe(Ee(un,1),on,10,0,[x.f.i,x.i,x.a])).a,d=new W(x.e);d.a<d.c.c.length;)f=y(K(d),12),N=f.d,D=Pn(xe(Ee(un,1),on,10,0,[N.f.i,N.i,N.a])).a,(R-D<=0?0-(R-D):R-D)>Dc&&(b=new Rt(R,j),kn(f.a,b),v0(this.a,f,n,b,!1),m=new Rt(D,j),kn(f.a,m),v0(this.a,f,n,m,!1))},T.Lc=function(n){return n.f.i.a+n.i.a+n.a.a},T.Mc=function(){return Ye(),At},T.Nc=function(){return Ye(),Et},re(Ff,"OrthogonalRoutingGenerator/NorthToSouthRoutingStrategy",580),Q(581,1,{},fte),T.Kc=function(n,s){var f,d,b,m,x,S,R,N,D,j;for(j=s-n.i*this.a.c,S=new W(n.g);S.a<S.c.c.length;)for(x=y(K(S),7),R=Pn(xe(Ee(un,1),on,10,0,[x.f.i,x.i,x.a])).a,d=new W(x.e);d.a<d.c.c.length;)f=y(K(d),12),N=f.d,D=Pn(xe(Ee(un,1),on,10,0,[N.f.i,N.i,N.a])).a,(R-D<=0?0-(R-D):R-D)>Dc&&(b=new Rt(R,j),kn(f.a,b),v0(this.a,f,n,b,!1),m=new Rt(D,j),kn(f.a,m),v0(this.a,f,n,m,!1))},T.Lc=function(n){return n.f.i.a+n.i.a+n.a.a},T.Mc=function(){return Ye(),Et},T.Nc=function(){return Ye(),At},re(Ff,"OrthogonalRoutingGenerator/SouthToNorthRoutingStrategy",581),Q(579,1,{},hte),T.Kc=function(n,s){var f,d,b,m,x,S,R,N,D,j;for(j=s+n.i*this.a.c,S=new W(n.g);S.a<S.c.c.length;)for(x=y(K(S),7),R=Pn(xe(Ee(un,1),on,10,0,[x.f.i,x.i,x.a])).b,d=new W(x.e);d.a<d.c.c.length;)f=y(K(d),12),N=f.d,D=Pn(xe(Ee(un,1),on,10,0,[N.f.i,N.i,N.a])).b,(R-D<=0?0-(R-D):R-D)>Dc&&(b=new Rt(j,R),kn(f.a,b),v0(this.a,f,n,b,!0),m=new Rt(j,D),kn(f.a,m),v0(this.a,f,n,m,!0))},T.Lc=function(n){return n.f.i.b+n.i.b+n.a.b},T.Mc=function(){return Ye(),lt},T.Nc=function(){return Ye(),vt},re(Ff,"OrthogonalRoutingGenerator/WestToEastRoutingStrategy",579),Q(535,1,Go,ore),T.qc=function(n){var s,f;return f=y(ee(n,(Oe(),hi)),18),s=new Zn,(f.kb((Dr(),hd))||Kt(ze(Zt(ee(n,(sn(),t1))))))&&(Ur(s,xve),f.kb(dd)&&Ur(s,Eve)),f.kb(Yg)&&Ur(s,wve),f.kb(Wg)&&Ur(s,_ve),s},T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We;for(en(s,"Polyline edge routing",1),j=y(ee(n,(Oe(),la)),15).a,f=y(ee(n,(sn(),tc)),15).a,se=0,n.c.c.length!=0&&(ce=qce(y(ht(n.c,0),16)),se=.4*f*ce),m=new Ln(n.c,0);m.b<m.d.Y();){for(b=(Ct(m.b<m.d.Y()),y(m.d.sb(m.c=m.b++),16)),d=Gk(b,cx),d&&se>0&&(se-=j),o6(b,se),R=0,D=new W(b.a);D.a<D.c.c.length;){for(N=y(K(D),9),S=0,z=Xt(qn(N));Vt(z);)H=y(Gt(z),12),Z=ia(H.c).b,ie=ia(H.d).b,b==H.d.f.d&&(fe=H.c,_e=H.d,Re=(Pn(xe(Ee(un,1),on,10,0,[fe.f.i,fe.i,fe.a])).b+Pn(xe(Ee(un,1),on,10,0,[_e.f.i,_e.i,_e.a])).b)/2,fe.g==(Ye(),lt)?We=new Rt(se+fe.f.d.c.a+.4*f*(Z-ie<=0?0-(Z-ie):Z-ie),Re):We=new Rt(se-.4*f*(Z-ie<=0?0-(Z-ie):Z-ie),Re),gw(H.a,0,We),H.c.g==vt&&(Z=0,ie=0)),S=S>(ie-Z<=0?0-(ie-Z):ie-Z)?S:ie-Z<=0?0-(ie-Z):ie-Z;switch(N.g.e){case 0:case 4:case 1:case 3:Oje(this,N,se)}R=R>S?R:S}m.b<m.d.Y()&&(ce=qce((Ct(m.b<m.d.Y()),y(m.d.sb(m.c=m.b++),16))),R=R>ce?R:ce,Ct(m.b>0),m.a.sb(m.c=--m.b)),x=.4*f*R,!d&&m.b<m.d.Y()&&(x+=j),se+=b.c.a+x}this.a.a.Q(),n.e.a=se,zt(s)};var wve,_ve,xve,Eve,cx;re(Ff,"PolylineEdgeRouter",535),Q(536,1,Ks,Dm),T.D=function(n){return voe(y(n,9))},re(Ff,"PolylineEdgeRouter/1",536),Q(75,1,{75:1},Zoe),T.w=function(){var n,s,f,d;for(f=new ig,this.e&&Vs(Vs(f,yw(this.e)),": "),s=xn(CS(this),0);s.b!=s.d.c;)n=y(vn(s),7),Vs(Vs(gg(Vs(f,(d=bse(n),d==null?"p_"+n.k:"p_"+d)),32),yw(n.g))," / ");return pAe(f,Cy(f.a)-2-1)},T.j=0,T.k=0,re($f,"ConnectedSelfLoopComponent",75),Q(60,17,{60:1,3:1,23:1,17:1},gu),T.c=0;var kve,Sve,Tve,Fc,Nl,Wo,Ol,Iu,mo,Ko,$c,Gc,Rve,Ive,Cve,Ave,Pve,Lve,Nve,Ove,Dve,Mve,jve,Bve,qve,Qf,ld,Dl,Ml,Ug=rn($f,"LoopSide",60,Sn,V5);Q(203,1,{},wue,Zq,oq),T.w=function(){return this.b.w()},T.c=0,T.d=!1,T.e=!1,T.f=!1,T.i=0,T.j=0,re($f,"NubSpline",203),Q(92,1,{92:1},IS,tle),re($f,"NubSpline/PolarCP",92),Q(281,203,{},kS),re($f,"NubsSelfLoop",281),Q(112,1,{},dce,Bue,zy,ET,ST),T.a=I6,T.b=$o,T.c=I6,T.d=$o,re($f,"Rectangle",112),Q(537,1,Go,Ree),T.qc=function(n){var s,f;return s=new Zn,f=y(ee(n,(Oe(),hi)),18),f.kb((Dr(),dx))&&Ur(s,zve),f.kb(Yg)&&Ur(s,Fve),(f.kb(hd)||Kt(ze(Zt(ee(n,(sn(),t1))))))&&(Ur(s,Gve),f.kb(dd)&&Ur(s,Hve)),f.kb(Wg)&&Ur(s,$ve),s},T.sc=function(n,s){var f,d,b,m,x,S,R,N,D,j,H,z,Z,ie,se,ce,fe,_e,Re,We,Je,Ve,at,gt,mt,Tt,It,Ut,zn,Xn,ha,Ia;en(s,"Spline edge routing",1),Re=y(ee(n,(Oe(),la)),15).a,this.a=Re*y(ee(n,(sn(),tc)),15).a,Ia=0,se=new W(n.c),ce=null,Xn=(Qn(),new ln),zn=new Xe,R=!0,N=!0;do{for(Ve=se.a<se.c.c.length?y(K(se),16):null,H=new Xe,x=new Xe,fe=new ba,gt=new ba,It=new ba,J4e(new jr(ce,Ve),new jr(fe,gt),x,Xn,zn,It),GT(fe,gt,(Ef(),Qu),!0,x,H),GT(fe,gt,Qu,!1,x,H),GT(fe,gt,fd,!0,x,H),GT(fe,gt,fd,!1,x,H),lje(x,fe,gt,H),Ut=new Ln(H,0);Ut.b<Ut.d.Y();)for(D=(Ct(Ut.b<Ut.d.Y()),y(Ut.d.sb(Ut.c=Ut.b++),77)),ha=new Ln(H,Ut.b);ha.b<ha.d.Y();)j=(Ct(ha.b<ha.d.Y()),y(ha.d.sb(ha.c=ha.b++),77)),z4e(D,j);if(pBe(H,y(ee(n,np),154)),p4e(H),at=Ia+10,Ve){for(N=!Ve||Gk(Ve.a,(d_(),cx)),_e=-1,b=new W(H);b.a<b.c.c.length;)f=y(K(b),77),_e=Ei(_e,f.n);++_e,_e>0?(z=(_e+1)*this.a,z<Re&&!R&&!N&&(z=Re),at+=z):R||N||pue(ce)||pue(Ve)||(at+=Re),o6(Ve,at)}for(Tt=(Je=new pn(It.a).a.bb().mb(),new mn(Je));Tt.a.G();)for(mt=(S=y(Tt.a.H(),21),y(S.yb(),12)),We=mt.c.f.i,pl(mt.a,We),ie=new W(mt.b);ie.a<ie.c.c.length;)Z=y(K(ie),33),On(Z.i,We);for(m=new W(H);m.a<m.c.c.length;)f=y(K(m),77),f.f?RMe(f,Ia):_je(this,f,Ia,at);if(Ve)Ia=at+Ve.c.a+10;else{for(_e=-1,b=new W(H);b.a<b.c.c.length;)f=y(K(b),77),_e=Ei(_e,f.n);_e>=0&&(Ia+=(_e+2)*this.a)}ce=Ve,R=N}while(Ve);for(d=new W(zn);d.a<d.c.c.length;)f=y(K(d),12),lBe(f,Xn);n.e.a=Ia,zt(s)},T.a=3;var Fve,$ve,Gve,Hve,zve;re($f,"SplineEdgeRouter",537),Q(117,1,{117:1},Yw),T.w=function(){return this.a+" ->("+this.c+") "+this.b},T.c=0,re($f,"SplineEdgeRouter/Dependency",117),Q(223,17,{223:1,3:1,23:1,17:1},Q4);var Qu,fd,zBe=rn($f,"SplineEdgeRouter/SideToProcess",223,Sn,UPe);Q(77,1,{77:1,23:1},mce,s6),T.F=function(n){return $Ce(this,y(n,77))},T.a=0,T.b=0,T.e=0,T.f=!1,T.i=0,T.k=0,T.n=0,T.p=0,re($f,"SplineEdgeRouter/SplineHyperEdge",77),Q(123,17,{123:1,3:1,23:1,17:1},fg);var fI,hI,dI,vI,pI,gI,bI=rn(Ku,"ContentAlignment",123,Sn,uNe),Vve;Q(218,17,{218:1,3:1,23:1,17:1},Dk);var lx,N7,J0,VBe=rn(Ku,"EdgeConstraint",218,Sn,dLe);Q(115,17,{115:1,3:1,23:1,17:1},Sy);var yI,fx,mI,wI,_I,Uve=rn(Ku,"EdgeLabelSideSelection",115,Sn,QLe),Yve;Q(124,17,{124:1,3:1,23:1,17:1},hg);var xI,O7,D7,EI,M7,j7,Wve=rn(Ku,"FixedAlignment",124,Sn,cNe),Kve;Q(113,17,{113:1,3:1,23:1,17:1},ol);var Yg,kI,Wg,Xo,hx,SI,hd,dd,B7,dx,q7=rn(Ku,"GraphProperties",113,Sn,GNe);Q(110,17,{110:1,3:1,23:1,17:1},Hh),T.a=!1,T.b=!1,T.c=!1;var TI,F7,$7,G7,H7,RI,z7,V7,Xve=rn(Ku,"GreedySwitchType",110,Sn,TNe),Jve;Q(140,17,{140:1,3:1,23:1,17:1},Mk);var Zv,vx,vd,UBe=rn(Ku,"InLayerConstraint",140,Sn,hLe);Q(174,17,{174:1,3:1,23:1,17:1},Z4);var II,U7,Qve=rn(Ku,"InteractiveReferencePoint",174,Sn,JPe),Zve,ep,Y7,W7,CI,jl,Q0,Jo,Kg,px,K7,epe,Xg,X7,J7,AI,Q7,pd,gx,ai,Z7,hi,PI,tpe,Zu,Zf,tp,Js,ca,Xi,eh,Jg,Pt,e$,t$,n$,LI,th,bx,Cu,Hc,NI,js,r$,np,i$,ec,la,nh,npe,Z0,OI,a$,DI,Qg;Q(85,17,{85:1,3:1,23:1,17:1},Ty);var e1,Bl,Zg,zc,gd,rpe=rn(Ku,"LayerConstraint",85,Sn,ZLe),ipe;Q(219,17,{219:1,3:1,23:1,17:1},jk);var fa,Ri,MI,YBe=rn(Ku,"PortType",219,Sn,vLe),jI,BI,qI,FI,yx,$I,s$,GI,rp,ape,tc,t1,mx,HI,zI,Gr,o$,u$,c$,VI,UI,wx,l$,YI,eb,_x,WI,f$,h$,KI,tb,nb;Q(153,17,{153:1,3:1,23:1,17:1},Bk);var d$,v$,XI,spe=rn(Ku,"SelfLoopPlacement",153,Sn,pLe),ope;Q(134,1,{134:1},Wle),T.a=0,T.b=0,T.c=0,T.d=0,T.e=0,T.f=0,re(Ku,"Spacings",134),Q(172,17,{172:1,3:1,23:1,17:1},qk);var rb,n1,xx,upe=rn(Ku,"WideNodesStrategy",172,Sn,gLe),cpe;Q(644,1,{}),re(A_,"OutputStream",644),Q(645,644,{}),re(A_,"FilterOutputStream",645),Q(291,645,{},Mm),re(A_,"PrintStream",291),Q(255,1,{}),T.w=function(){return this.a},re(ri,"AbstractStringBuilder",255),Q(621,95,zu,zte),re(ri,"ArrayIndexOutOfBoundsException",621),Q(290,72,zu,Rte,sne),re(ri,"ArrayStoreException",290),Q(252,46,h6),re(ri,"Error",252),Q(84,252,h6,d4,$S),re(ri,"AssertionError",84),Yfe={3:1,349:1,23:1};var er,Ii,WBe=re(ri,"Boolean",349);Wfe={3:1,23:1,184:1,231:1};var r1=re(ri,"Double",184);Q(15,231,{3:1,23:1,15:1,231:1},dte,gn),T.F=function(n){return gAe(this,y(n,15))},T.t=function(n){return Qe(n,15)&&y(n,15).a==this.a},T.v=function(){return yr(this.a)},T.w=function(){return JCe(this.a)},T.a=0;var KBe=re(ri,"Float",15);Q(101,72,zu,vy,rl),re(ri,"IllegalStateException",101);var p$,lpe;Q(608,72,zu,one),re(ri,"NegativeArraySizeException",608),Q(76,72,{3:1,54:1,76:1,46:1},eg,by),re(ri,"NullPointerException",76),Q(130,29,{3:1,54:1,29:1,130:1,46:1},Vte,Wm),re(ri,"NumberFormatException",130),Q(146,1,{3:1,146:1},TS),T.t=function(n){var s;return Qe(n,146)?(s=y(n,146),this.c==s.c&&Va(this.d,s.d)&&Va(this.a,s.a)&&Va(this.b,s.b)):!1},T.v=function(){return tT(xe(Ee(yt,1),st,1,4,[Mt(this.c),this.a,this.d,this.b]))},T.w=function(){return this.a+"."+this.d+"("+(this.b!=null?this.b:"Unknown Source")+(this.c>=0?":"+this.c:"")+")"},T.c=0;var fpe=re(ri,"StackTraceElement",146);Q(98,255,{345:1},ig,pk,rg),re(ri,"StringBuilder",98);var hpe,g$;Q(45,72,{3:1,54:1,46:1,45:1},fr,nv),re(ri,"UnsupportedOperationException",45),Q(213,638,jv),T.Q=function(){Ws(this)},T.R=function(n){return kv(this,n)},T.ab=function(n){return Goe(this,n,this.e)||Goe(this,n,this.d)},T.bb=function(){return new xc(this)},T.cb=function(n){return bn(this,n)},T.db=function(n,s){return Cn(this,n,s)},T.eb=function(n){return jh(this,n)},T.Y=function(){return nw(this)},re(qt,"AbstractHashMap",213),Q(120,641,Bi,xc),T.Q=function(){this.a.Q()},T.kb=function(n){return l5(this,n)},T.mb=function(){return new Wh(this.a)},T.nb=function(n){var s;return l5(this,n)?(s=y(n,21).yb(),this.a.eb(s),!0):!1},T.Y=function(){return this.a.Y()},re(qt,"AbstractHashMap/EntrySet",120),Q(148,1,kr,Wh),T.H=function(){return xg(this)},T.G=function(){return this.b},T.I=function(){w5(this)},T.b=!1,re(qt,"AbstractHashMap/EntrySetIterator",148),Q(162,1,kr,ev),T.G=function(){return this.b<this.d.Y()},T.H=function(){return Ct(this.G()),this.d.sb(this.c=this.b++)},T.I=function(){lo(this)},T.b=0,T.c=-1,re(qt,"AbstractList/IteratorImpl",162),Q(43,162,qv,Ln),T.J=function(n){Sc(this,n)},T.K=function(){return this.b>0},T.L=function(){return this.b},T.M=function(){return tae(this)},T.N=function(){return this.b-1},T.O=function(n){kB(this,n)},re(qt,"AbstractList/ListIteratorImpl",43),Q(258,647,Bv,LS),T.rb=function(n,s){If(n,this.b),this.c.rb(this.a+n,s),++this.b},T.sb=function(n){return Gn(n,this.b),this.c.sb(this.a+n)},T.vb=function(n){var s;return Gn(n,this.b),s=this.c.vb(this.a+n),--this.b,s},T.wb=function(n,s){return Gn(n,this.b),this.c.wb(this.a+n,s)},T.Y=function(){return this.b},T.a=0,T.b=0,re(qt,"AbstractList/SubList",258),Q(36,641,Bi,pn),T.Q=function(){this.a.Q()},T.kb=function(n){return this.a.R(n)},T.mb=function(){var n;return n=this.a.bb().mb(),new mn(n)},T.nb=function(n){return this.a.R(n)?(this.a.eb(n),!0):!1},T.Y=function(){return this.a.Y()},re(qt,"AbstractMap/1",36),Q(40,1,kr,mn),T.G=function(){return this.a.G()},T.H=function(){var n;return n=y(this.a.H(),21),n.yb()},T.I=function(){this.a.I()},re(qt,"AbstractMap/1/1",40),Q(211,640,Lg,cy),T.Q=function(){this.a.Q()},T.kb=function(n){return this.a.ab(n)},T.mb=function(){var n;return n=this.a.bb().mb(),new ly(n)},T.Y=function(){return this.a.Y()},re(qt,"AbstractMap/2",211),Q(212,1,kr,ly),T.G=function(){return this.a.G()},T.H=function(){var n;return n=y(this.a.H(),21),n.zb()},T.I=function(){this.a.I()},re(qt,"AbstractMap/2/1",212),Q(210,1,{210:1,21:1}),T.t=function(n){var s;return Qe(n,21)?(s=y(n,21),Va(this.d,s.yb())&&Va(this.e,s.zb())):!1},T.yb=function(){return this.d},T.zb=function(){return this.e},T.v=function(){return Yk(this.d)^Yk(this.e)},T.Ab=function(n){return RB(this,n)},T.w=function(){return this.d+"="+this.e},re(qt,"AbstractMap/AbstractEntry",210),Q(163,210,{210:1,163:1,21:1},ow),re(qt,"AbstractMap/SimpleEntry",163),Q(652,1,m0),T.t=function(n){var s;return Qe(n,21)?(s=y(n,21),Va(this.yb(),s.yb())&&Va(this.zb(),s.zb())):!1},T.v=function(){return Yk(this.yb())^Yk(this.zb())},T.w=function(){return this.yb()+"="+this.zb()},re(qt,hfe,652),Q(639,638,jv),T._=function(n){return kse(this,n)},T.R=function(n){return Fk(this,n)},T.bb=function(){return new s4(this)},T.cb=function(n){return Oi(K5(this,n))},T.W=function(){return new $m(this)},re(qt,"AbstractNavigableMap",639),Q(287,641,Bi,s4),T.kb=function(n){return Qe(n,21)&&kse(this.b,y(n,21))},T.mb=function(){return new Dy(this.b)},T.nb=function(n){var s;return Qe(n,21)?(s=y(n,21),Pse(this.b,s)):!1},T.Y=function(){return this.b.c},re(qt,"AbstractNavigableMap/EntrySet",287),Q(229,641,m6,$m),T.Q=function(){Ym(this.a)},T.kb=function(n){return Fk(this.a,n)},T.mb=function(){var n;return n=new Dy(new Ny(this.a).b),new Gm(n)},T.nb=function(n){return Fk(this.a,n)?(qy(this.a,n),!0):!1},T.Y=function(){return this.a.c},re(qt,"AbstractNavigableMap/NavigableKeySet",229),Q(230,1,kr,Gm),T.G=function(){return Ak(this.a.a)},T.H=function(){var n;return n=eS(this.a),n.yb()},T.I=function(){Mie(this.a)},re(qt,"AbstractNavigableMap/NavigableKeySet/1",230),Q(4,1,kr,W),T.G=function(){return vf(this)},T.H=function(){return K(this)},T.I=function(){pg(this)},T.a=0,T.b=-1,re(qt,"ArrayList/1",4),Q(94,647,Hfe,zs),T.kb=function(n){return NNe(this,n)!=-1},T.sb=function(n){return Uie(this,n)},T.wb=function(n,s){var f;return f=(Gn(n,this.a.length),this.a[n]),Rs(this.a,n,s),f},T.Y=function(){return this.a.length},T.ob=function(){return que(this,Ge(yt,st,1,this.a.length,4,1))},T.pb=function(n){return que(this,n)},re(qt,"Arrays/ArrayList",94);var ql,b$,JI;Q(413,1,Jr,vte),T.$b=function(n,s){return cae(s,n)},re(qt,"Collections/2",413),Q(406,647,Hfe,cu),T.kb=function(n){return!1},T.sb=function(n){return Gn(n,0),null},T.mb=function(){return _n(),Nk(),QI},T.tb=function(){return _n(),Nk(),QI},T.Y=function(){return 0},re(qt,"Collections/EmptyList",406),Q(407,1,qv,oy),T.J=function(n){throw new fr},T.G=function(){return!1},T.K=function(){return!1},T.H=function(){throw new Ga},T.L=function(){return 0},T.M=function(){throw new Ga},T.N=function(){return-1},T.I=function(){throw new vy},T.O=function(n){throw new vy};var QI;re(qt,"Collections/EmptyListIterator",407),Q(409,638,$v,jm),T.R=function(n){return!1},T.ab=function(n){return!1},T.bb=function(){return _n(),JI},T.cb=function(n){return null},T.W=function(){return _n(),JI},T.Y=function(){return 0},T.fb=function(){return _n(),ql},re(qt,"Collections/EmptyMap",409),Q(408,641,Gv,Qd),T.kb=function(n){return!1},T.mb=function(){return _n(),Nk(),QI},T.Y=function(){return 0},re(qt,"Collections/EmptySet",408),Q(410,1,Jr,lu),T.$b=function(n,s){return KCe(y(n,23),y(s,23))};var dpe;re(qt,"Collections/ReverseComparator",410),Q(411,647,{3:1,22:1,19:1,20:1},pte),T.kb=function(n){return Va(this.a,n)},T.sb=function(n){return Gn(n,1),this.a},T.Y=function(){return 1},re(qt,"Collections/SingletonList",411),Q(217,1,Lg,fy),T.ib=function(n){return Ate()},T.jb=function(n){return Pte()},T.Q=function(){Lte()},T.kb=function(n){return this.b.kb(n)},T.lb=function(n){return this.b.lb(n)},T.V=function(){return this.b.V()},T.mb=function(){return new Jp(this.b.mb())},T.nb=function(n){return Nte()},T.Y=function(){return this.b.Y()},T.ob=function(){return this.b.ob()},T.pb=function(n){return this.b.pb(n)},T.w=function(){return Ya(this.b)},re(qt,"Collections/UnmodifiableCollection",217),Q(152,1,kr,Jp),T.G=function(){return this.b.G()},T.H=function(){return this.b.H()},T.I=function(){wCe()},re(qt,"Collections/UnmodifiableCollectionIterator",152),Q(233,217,Bv,bw),T.rb=function(n,s){throw new fr},T.t=function(n){return this.a.t(n)},T.sb=function(n){return this.a.sb(n)},T.v=function(){return this.a.v()},T.V=function(){return this.a.V()},T.tb=function(){return new hB(this.a.ub(0))},T.ub=function(n){return new hB(this.a.ub(n))},T.vb=function(n){throw new fr},T.wb=function(n,s){throw new fr},T.xb=function(n,s){return new bw(this.a.xb(n,s))},re(qt,"Collections/UnmodifiableList",233),Q(309,152,qv,hB),T.J=function(n){throw new fr},T.K=function(){return this.a.K()},T.L=function(){return this.a.L()},T.M=function(){return this.a.M()},T.N=function(){return this.a.N()},T.O=function(n){throw new fr},re(qt,"Collections/UnmodifiableListIterator",309),Q(305,1,jv,o4),T.Q=function(){throw new fr},T.R=function(n){return this.c.R(n)},T.ab=function(n){return Une(this,n)},T.bb=function(){return ls(this)},T.t=function(n){return Sne(this,n)},T.cb=function(n){return this.c.cb(n)},T.v=function(){return this.c.v()},T.V=function(){return this.c.V()},T.W=function(){return pae(this)},T.db=function(n,s){throw new fr},T.eb=function(n){throw new fr},T.Y=function(){return this.c.Y()},T.w=function(){return Ya(this.c)},T.fb=function(){return bae(this)},re(qt,"Collections/UnmodifiableMap",305),Q(151,217,Bi,Ah),T.t=function(n){return kne(this,n)},T.v=function(){return this.b.v()},re(qt,"Collections/UnmodifiableSet",151),Q(412,151,Bi,pne),T.kb=function(n){return V4(this,n)},T.lb=function(n){return Yne(this,n)},T.mb=function(){var n;return n=this.b.mb(),new u4(n)},T.ob=function(){return Sae(this)},T.pb=function(n){return n5(this,n)},re(qt,"Collections/UnmodifiableMap/UnmodifiableEntrySet",412),Q(263,1,kr,u4),T.H=function(){return new c4(y(this.a.H(),21))},T.G=function(){return this.a.G()},T.I=function(){throw new fr},re(qt,"Collections/UnmodifiableMap/UnmodifiableEntrySet/1",263),Q(306,1,m0,c4),T.t=function(n){return this.a.t(n)},T.yb=function(){return this.a.yb()},T.zb=function(){return this.a.zb()},T.v=function(){return this.a.v()},T.Ab=function(n){throw new fr},T.w=function(){return Ya(this.a)},re(qt,"Collections/UnmodifiableMap/UnmodifiableEntrySet/UnmodifiableEntry",306),Q(307,233,YT,L4),re(qt,"Collections/UnmodifiableRandomAccessList",307),Q(308,151,m6,dB),T.t=function(n){return this.a.t(n)},T.v=function(){return this.a.v()},re(qt,"Collections/UnmodifiableSortedSet",308);var bd;Q(522,1,Jr,XE),T.$b=function(n,s){return Rr(n),Rr(s),j5(y(n,23),s)},re(qt,"Comparators/1",522),Q(202,72,zu,tg),re(qt,"ConcurrentModificationException",202),Q(609,72,zu,$te),re(qt,"EmptyStackException",609),Q(319,638,jv,rq),T.db=function(n,s){return SB(this,n,s)},T.Q=function(){vae(this)},T.R=function(n){return qB(this.a,n)},T.ab=function(n){var s,f;for(f=new fv(this.a);f.a<f.c.a.length;)if(s=Tf(f),Va(n,this.b[s.e]))return!0;return!1},T.bb=function(){return new Hm(this)},T.cb=function(n){return xv(this,n)},T.eb=function(n){return c5(this,n)},T.Y=function(){return this.a.c},re(qt,"EnumMap",319),Q(236,641,Bi,Hm),T.Q=function(){vae(this.a)},T.kb=function(n){return Wae(this,n)},T.mb=function(){return new Pw(this.a)},T.nb=function(n){var s;return Wae(this,n)?(s=y(n,21).yb(),c5(this.a,s),!0):!1},T.Y=function(){return this.a.a.c},re(qt,"EnumMap/EntrySet",236),Q(237,1,kr,Pw),T.H=function(){return this.b=Tf(this.a),new sw(this.c,this.b)},T.G=function(){return dw(this.a)},T.I=function(){Oh(!!this.b),c5(this.c,this.b),this.b=null},re(qt,"EnumMap/EntrySetIterator",237),Q(238,652,m0,sw),T.yb=function(){return this.a},T.zb=function(){return this.b.b[this.a.e]},T.Ab=function(n){return yS(this.b,this.a.e,n)},re(qt,"EnumMap/MapEntry",238),Q(86,641,{22:1,19:1,86:1,18:1}),re(qt,"EnumSet",86),Q(66,86,{22:1,19:1,86:1,66:1,18:1},Si),T.ib=function(n){return ji(this,y(n,17))},T.kb=function(n){return qB(this,n)},T.mb=function(){return new fv(this)},T.nb=function(n){return Xie(this,n)},T.Y=function(){return this.c},T.c=0,re(qt,"EnumSet/EnumSetImpl",66),Q(167,1,kr,fv),T.H=function(){return Tf(this)},T.G=function(){return dw(this)},T.I=function(){Oh(this.b!=-1),Rs(this.c.b,this.b,null),--this.c.c,this.b=-1},T.a=-1,T.b=-1,re(qt,"EnumSet/EnumSetImpl/IteratorImpl",167),Q(30,213,zfe,ln,Pk,vre),T.Uc=function(n,s){return ft(n)===ft(s)||n!=null&&ho(n,s)},T.Vc=function(n){var s;return s=qo(n),s|0},re(qt,"HashMap",30),Q(50,641,Vfe,ci,bk,BB),T.ib=function(n){return Dn(this,n)},T.Q=function(){this.a.Q()},T.Wc=function(){return new BB(this)},T.kb=function(n){return ff(this,n)},T.V=function(){return this.a.Y()==0},T.mb=function(){var n;return n=new pn(this.a).a.bb().mb(),new mn(n)},T.nb=function(n){return Wk(this,n)},T.Y=function(){return this.a.Y()},T.w=function(){return _l(new pn(this.a))},re(qt,"HashSet",50),Q(418,1,xl,Cre),T.mb=function(){return new i5(this)},T.c=0,re(qt,"InternalHashCodeMap",418),Q(312,1,kr,i5),T.H=function(){return this.d=this.a[this.c++],this.d},T.G=function(){var n;return this.c<this.a.length?!0:(n=this.b.next(),n.done?!1:(this.a=n.value[1],this.c=0,!0))},T.I=function(){NT(this.e,this.d.yb()),this.c!=0&&--this.c},T.c=0,T.d=null,re(qt,"InternalHashCodeMap/1",312);var vpe;Q(382,1,xl,Are),T.mb=function(){return new v5(this)},T.c=0,T.d=0,re(qt,"InternalStringMap",382),Q(293,1,kr,v5),T.H=function(){return this.c=this.a,this.a=this.b.next(),new Lie(this.d,this.c,this.d.d)},T.G=function(){return!this.a.done},T.I=function(){Ioe(this.d,this.c.value[0])},re(qt,"InternalStringMap/1",293),Q(383,652,m0,Lie),T.yb=function(){return this.b.value[0]},T.zb=function(){return this.a.d!=this.c?are(this.a,this.b.value[0]):this.b.value[1]},T.Ab=function(n){return uT(this.a,this.b.value[0],n)},T.c=0,re(qt,"InternalStringMap/2",383),Q(155,30,zfe,mg,Ose),T.Q=function(){Eie(this)},T.R=function(n){return kv(this.c,n)},T.ab=function(n){var s;for(s=this.b.a;s!=this.b;){if(Va(s.e,n))return!0;s=s.a}return!1},T.bb=function(){return new ik(this)},T.cb=function(n){return GS(this,n)},T.db=function(n,s){return n0(this,n,s)},T.eb=function(n){return S5(this,n)},T.Y=function(){return nw(this.c)},T.a=!1,re(qt,"LinkedHashMap",155),Q(176,163,{210:1,163:1,176:1,21:1},oie,NB),re(qt,"LinkedHashMap/ChainEntry",176),Q(270,641,Bi,ik),T.Q=function(){Eie(this.a)},T.kb=function(n){return Kae(this,n)},T.mb=function(){return new ES(this)},T.nb=function(n){var s;return Kae(this,n)?(s=y(n,21).yb(),S5(this.a,s),!0):!1},T.Y=function(){return nw(this.a.c)},re(qt,"LinkedHashMap/EntrySet",270),Q(271,1,kr,ES),T.H=function(){return m5(this)},T.G=function(){return this.b!=this.c.a.b},T.I=function(){Oh(!!this.a),gS(this.c.a.c,this),DB(this.a),jh(this.c.a.c,this.a.d),fB(this.c.a.c,this),this.a=null},re(qt,"LinkedHashMap/EntrySet/EntryIterator",271),Q(70,50,Vfe,ba,Jre,hS),T.Wc=function(){return new hS(this)},re(qt,"LinkedHashSet",70),Q(372,1,qv,Pie),T.J=function(n){By(this,n)},T.G=function(){return this.b!=this.d.c},T.K=function(){return this.b.b!=this.d.a},T.H=function(){return vn(this)},T.L=function(){return this.a},T.M=function(){return Fy(this)},T.N=function(){return this.a-1},T.I=function(){C5(this)},T.O=function(n){Oh(!!this.c),this.c.c=n},T.a=0,T.c=null,re(qt,"LinkedList/ListIteratorImpl",372),Q(259,1,{},Bm),re(qt,"LinkedList/Node",259),Q(74,72,{3:1,54:1,46:1,74:1},Ga),re(qt,"NoSuchElementException",74),Q(154,1,{154:1},nue,Gse),T.a=0,T.b=0;var y$,m$,XBe=0;re(qt,"Random",154),Q(607,647,Ufe),T.rb=function(n,s){Sw(n,this.a.c.length+1),yf(this.a,n,s)},T.ib=function(n){return tt(this.a,n)},T.jb=function(n){return Vn(this.a,n)},T.Q=function(){this.a.c=Ge(yt,st,1,0,4,1)},T.kb=function(n){return aa(this.a,n,0)!=-1},T.lb=function(n){return gl(this.a,n)},T.sb=function(n){return Sw(n,this.a.c.length),ht(this.a,n)},T.V=function(){return this.a.c.length==0},T.mb=function(){return new W(this.a)},T.vb=function(n){return Sw(n,this.a.c.length),zh(this.a,n)},T.Xb=function(n,s){jae(this.a,n,s)},T.wb=function(n,s){return Sw(n,this.a.c.length),Sf(this.a,n,s)},T.Y=function(){return this.a.c.length},T.xb=function(n,s){return new LS(this.a,n,s)},T.ob=function(){return Xre(this.a)},T.pb=function(n){return dr(this.a,n)},T.w=function(){return _l(this.a)},re(qt,"Vector",607),Q(337,607,Ufe,y4),re(qt,"Stack",337),Q(253,639,$v,Wne,s5),T.Q=function(){Ym(this)},T.bb=function(){return new Ny(this)},T.db=function(n,s){return Moe(this,n,s)},T.eb=function(n){return qy(this,n)},T.Y=function(){return this.c},T.c=0,re(qt,"TreeMap",253),Q(182,1,kr,Dy),T.H=function(){return eS(this)},T.G=function(){return Ak(this.a)},T.I=function(){Mie(this)},re(qt,"TreeMap/EntryIterator",182),Q(209,287,Bi,Ny),T.Q=function(){Ym(this.a)},re(qt,"TreeMap/EntrySet",209),Q(183,163,{210:1,163:1,21:1,183:1},qS),T.b=!1;var JBe=re(qt,"TreeMap/Node",183);Q(254,1,{},uy),T.w=function(){return"State: mv="+this.c+" value="+this.d+" done="+this.a+" found="+this.b},T.a=!1,T.b=!1,T.c=!1,re(qt,"TreeMap/State",254),Q(138,17,oR,aw),T.Xc=function(){return!1},T.Yc=function(){return!1};var w$,ppe,gpe,bpe,ZI=rn(qt,"TreeMap/SubMapType",138,Sn,$Le);Q(352,138,oR,Dre),T.Yc=function(){return!0},rn(qt,"TreeMap/SubMapType/1",352,ZI,null),Q(353,138,oR,$re),T.Xc=function(){return!0},T.Yc=function(){return!0},rn(qt,"TreeMap/SubMapType/2",353,ZI,null),Q(354,138,oR,Mre),T.Xc=function(){return!0},rn(qt,"TreeMap/SubMapType/3",354,ZI,null),Q(191,641,{3:1,22:1,19:1,18:1,137:1,191:1},A4,Rne),T.ib=function(n){return zB(this,n)},T.Q=function(){Ym(this.a)},T.kb=function(n){return Fk(this.a,n)},T.mb=function(){var n;return n=new Dy(new Ny(new $m(this.a).a).b),new Gm(n)},T.nb=function(n){return iie(this,n)},T.Y=function(){return this.a.c},re(qt,"TreeSet",191);var QBe=0,_$,x$=0,Ex,gr=Ow("int","I"),i1=Ow("boolean","Z"),ype=Ow("char","C"),Ra=Ow("double","D"),kx=Ow("float","F"),Sx=RLe,mpe=mpe=HDe;LNe(ZIe),KNe("permProps",[[["locale","default"],["user.agent","gecko1_8"]]]),mpe(null,"klay",null)})()}(l3)),l3.exports}(function(r,t){(function(a,u){r.exports=u(C2e())})(Lr,function(i){return function(a){var u={};function c(l){if(u[l])return u[l].exports;var h=u[l]={i:l,l:!1,exports:{}};return a[l].call(h.exports,h,h.exports,c),h.l=!0,h.exports}return c.m=a,c.c=u,c.i=function(l){return l},c.d=function(l,h,v){c.o(l,h)||Object.defineProperty(l,h,{configurable:!1,enumerable:!0,get:v})},c.n=function(l){var h=l&&l.__esModule?function(){return l.default}:function(){return l};return c.d(h,"a",h),h},c.o=function(l,h){return Object.prototype.hasOwnProperty.call(l,h)},c.p="",c(c.s=3)}([function(a,u,c){var l=c(4),h=c(1),v=c(2),p={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"},g=function(A){for(var L=Object.keys(A),O={},M=0;M<L.length;M++){var B=L[M],F=p[B],q=A[B];O[F]=q}return O},w={interactiveReferencePoint:"CENTER"},_=function(A){for(var L=A.parent(),O=A.scratch("klay"),M={x:O.x,y:O.y};L.nonempty();){var B=L.scratch("klay");M.x+=B.x,M.y+=B.y,L=L.parent()}return M},E=function(A,L){var O=A.layoutDimensions(L),M=A.numericStyle("padding"),B={_cyEle:A,id:A.id(),padding:{top:M,left:M,bottom:M,right:M}};return A.isParent()||(B.width=O.w,B.height=O.h),A.scratch("klay",B),B},k=function(A,L){var O={_cyEle:A,id:A.id(),source:A.data("source"),target:A.data("target"),properties:{}},M=L.priority(A);return M!=null&&(O.properties.priority=M),A.scratch("klay",O),O},I=function(A,L,O){for(var M=[],B=[],F={},q={id:"root",children:[],edges:[]},$=0;$<A.length;$++){var Y=A[$],V=E(Y,O);M.push(V),F[Y.id()]=V}for(var U=0;U<L.length;U++){var G=L[U],X=k(G,O);B.push(X),F[G.id()]=X}for(var ne=0;ne<M.length;ne++){var ae=M[ne],oe=ae._cyEle;if(!oe.isChild())q.children.push(ae);else{var le=oe.parent(),pe=F[le.id()],ge=pe.children=pe.children||[];ge.push(ae)}}for(var de=0;de<B.length;de++){var Se=B[de],Ne=Se._cyEle;Ne.source().parent(),Ne.target().parent(),q.edges.push(Se)}return q};function C(P){var A=P.klay;this.options=h({},v,P),this.options.klay=h({},v.klay,A,w)}C.prototype.run=function(){var P=this,A=this.options,L=A.eles,O=L.nodes(),M=L.edges(),B=I(O,M,A);return l.layout({graph:B,options:g(A.klay),success:function(){},error:function(q){throw q}}),O.filter(function(F){return!F.isParent()}).layoutPositions(P,A,_),this},C.prototype.stop=function(){return this},C.prototype.destroy=function(){return this},a.exports=C},function(a,u,c){a.exports=Object.assign!=null?Object.assign.bind(Object):function(l){for(var h=arguments.length,v=Array(h>1?h-1:0),p=1;p<h;p++)v[p-1]=arguments[p];return v.filter(function(g){return g!=null}).forEach(function(g){Object.keys(g).forEach(function(w){return l[w]=g[w]})}),l}},function(a,u,c){var l={nodeDimensionsIncludeLabels:!1,fit:!0,padding:20,animate:!1,animateFilter:function(v,p){return!0},animationDuration:500,animationEasing:void 0,transform:function(v,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(v){return null}};a.exports=l},function(a,u,c){var l=c(0),h=function(p){p&&p("layout","klay",l)};typeof cytoscape<"u"&&h(cytoscape),a.exports=h},function(a,u){a.exports=i}])})})(BX);var A2e=BX.exports;const P2e=Lb(A2e);var FX={exports:{}};(function(r,t){(function(a,u){r.exports=u()})(Lr,function(){return function(i){var a={};function u(c){if(a[c])return a[c].exports;var l=a[c]={i:c,l:!1,exports:{}};return i[c].call(l.exports,l,l.exports,u),l.l=!0,l.exports}return u.m=i,u.c=a,u.i=function(c){return c},u.d=function(c,l,h){u.o(c,l)||Object.defineProperty(c,l,{configurable:!1,enumerable:!0,get:h})},u.n=function(c){var l=c&&c.__esModule?function(){return c.default}:function(){return c};return u.d(l,"a",l),l},u.o=function(c,l){return Object.prototype.hasOwnProperty.call(c,l)},u.p="",u(u.s=11)}([function(i,a,u){i.exports=Object.assign!=null?Object.assign.bind(Object):function(c){for(var l=arguments.length,h=Array(l>1?l-1:0),v=1;v<l;v++)h[v-1]=arguments[v];return h.forEach(function(p){Object.keys(p).forEach(function(g){return c[g]=p[g]})}),c}},function(i,a,u){var c=u(0),l=Object.freeze({source:null,target:null,length:80,coeff:2e-4,weight:1});function h(p){return c({},l,p)}function v(p){var g=p.source,w=p.target,_=p.length<0?l.length:p.length,E=w.pos.x-g.pos.x,k=w.pos.y-g.pos.y,I=Math.sqrt(E*E+k*k);I===0&&(E=(Math.random()-.5)/50,k=(Math.random()-.5)/50,I=Math.sqrt(E*E+k*k));var C=I-_,P=(!p.coeff||p.coeff<0?l.springCoeff:p.coeff)*C/I*p.weight;g.force.x+=P*E,g.force.y+=P*k,w.force.x-=P*E,w.force.y-=P*k}i.exports={makeSpring:h,applySpring:v}},function(i,a,u){var c=function(){function X(ne,ae){for(var oe=0;oe<ae.length;oe++){var le=ae[oe];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(ne,le.key,le)}}return function(ne,ae,oe){return ae&&X(ne.prototype,ae),oe&&X(ne,oe),ne}}();function l(X,ne){if(!(X instanceof ne))throw new TypeError("Cannot call a class as a function")}function h(X,ne){if(!X)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ne&&(typeof ne=="object"||typeof ne=="function")?ne:X}function v(X,ne){if(typeof ne!="function"&&ne!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ne);X.prototype=Object.create(ne&&ne.prototype,{constructor:{value:X,enumerable:!1,writable:!0,configurable:!0}}),ne&&(Object.setPrototypeOf?Object.setPrototypeOf(X,ne):X.__proto__=ne)}var p=u(13),g=u(0),w=u(4),_=u(10),E=_.tick,k=u(7),I=k.makeQuadtree,C=u(3),P=C.makeBody,A=u(1),L=A.makeSpring,O=function(ne){return typeof ne=="function"},M=function(ne){return ne.isParent()},B=function(ne){return!M(ne)},F=function(ne){return M(ne.source())||M(ne.target())},q=function(ne){return!F(ne)},$=function(ne){return ne.scratch("euler").body},Y=function(ne){return M(ne)?ne.descendants().filter(B):ne},V=function(ne){var ae=ne.scratch("euler");return ae||(ae={},ne.scratch("euler",ae)),ae},U=function(ne,ae){return O(ne)?ne(ae):ne},G=function(X){v(ne,X);function ne(ae){return l(this,ne),h(this,(ne.__proto__||Object.getPrototypeOf(ne)).call(this,g({},w,ae)))}return c(ne,[{key:"prerun",value:function(oe){var le=oe;le.quadtree=I();var pe=le.bodies=[];le.nodes.filter(function(de){return B(de)}).forEach(function(de){var Se=V(de),Ne=P({pos:{x:Se.x,y:Se.y},mass:U(le.mass,de),locked:Se.locked});Ne._cyNode=de,Se.body=Ne,Ne._scratch=Se,pe.push(Ne)});var ge=le.springs=[];le.edges.filter(q).forEach(function(de){var Se=L({source:$(de.source()),target:$(de.target()),length:U(le.springLength,de),coeff:U(le.springCoeff,de)});Se._cyEdge=de;var Ne=V(de);Se._scratch=Ne,Ne.spring=Se,ge.push(Se)}),le.edges.filter(F).forEach(function(de){var Se=Y(de.source()),Ne=Y(de.target());Se=[Se[0]],Ne=[Ne[0]],Se.forEach(function(ye){Ne.forEach(function(we){ge.push(L({source:$(ye),target:$(we),length:U(le.springLength,de),coeff:U(le.springCoeff,de)}))})})})}},{key:"tick",value:function(oe){var le=E(oe),pe=le<=oe.movementThreshold;return pe}}]),ne}(p);i.exports=G},function(i,a,u){var c=Object.freeze({pos:{x:0,y:0},prevPos:{x:0,y:0},force:{x:0,y:0},velocity:{x:0,y:0},mass:1}),l=function(w){return{x:w.x,y:w.y}},h=function(w,_){return w??_},v=function(w,_){return l(h(w,_))};function p(g){var w={};return w.pos=v(g.pos,c.pos),w.prevPos=v(g.prevPos,w.pos),w.force=v(g.force,c.force),w.velocity=v(g.velocity,c.velocity),w.mass=g.mass!=null?g.mass:c.mass,w.locked=g.locked,w}i.exports={makeBody:p}},function(i,a,u){var c=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});i.exports=c},function(i,a,u){var c=.02;function l(h,v){var p=void 0;v!=null?p=v:h.dragCoeff!=null?p=h.dragCoeff:p=c,h.force.x-=p*h.velocity.x,h.force.y-=p*h.velocity.y}i.exports={applyDrag:l}},function(i,a,u){function c(l,h){var v=0,p=0,g=0,w=0,_,E=l.length;if(E===0)return 0;for(_=0;_<E;++_){var k=l[_],I=h/k.mass;if(!k.grabbed){k.locked?(k.velocity.x=0,k.velocity.y=0):(k.velocity.x+=I*k.force.x,k.velocity.y+=I*k.force.y);var C=k.velocity.x,P=k.velocity.y,A=Math.sqrt(C*C+P*P);A>1&&(k.velocity.x=C/A,k.velocity.y=P/A),v=h*k.velocity.x,g=h*k.velocity.y,k.pos.x+=v,k.pos.y+=g,p+=Math.abs(v),w+=Math.abs(g)}}return(p*p+w*w)/E}i.exports={integrate:c}},function(i,a,u){var c=u(9),l=u(8),h=function(E){E.x=0,E.y=0},v=function(E,k){var I=1e-8,C=Math.abs(E.x-k.x),P=Math.abs(E.y-k.y);return C<I&&P<I};function p(){var _=[],E=new l,k=[],I=0,C=P();function P(){var M=k[I];return M?(M.quad0=null,M.quad1=null,M.quad2=null,M.quad3=null,M.body=null,M.mass=M.massX=M.massY=0,M.left=M.right=M.top=M.bottom=0):(M=new c,k[I]=M),++I,M}function A(M,B,F,q){var $=_,Y=void 0,V=void 0,U=void 0,G=void 0,X=0,ne=0,ae=1,oe=0,le=1;$[0]=C,h(M.force);var pe=-M.pos.x,ge=-M.pos.y,de=Math.sqrt(pe*pe+ge*ge),Se=M.mass*q/de;for(X+=Se*pe,ne+=Se*ge;ae;){var Ne=$[oe],ye=Ne.body;ae-=1,oe+=1;var we=ye!==M;ye&&we?(V=ye.pos.x-M.pos.x,U=ye.pos.y-M.pos.y,G=Math.sqrt(V*V+U*U),G===0&&(V=(Math.random()-.5)/50,U=(Math.random()-.5)/50,G=Math.sqrt(V*V+U*U)),Y=B*ye.mass*M.mass/(G*G*G),X+=Y*V,ne+=Y*U):we&&(V=Ne.massX/Ne.mass-M.pos.x,U=Ne.massY/Ne.mass-M.pos.y,G=Math.sqrt(V*V+U*U),G===0&&(V=(Math.random()-.5)/50,U=(Math.random()-.5)/50,G=Math.sqrt(V*V+U*U)),(Ne.right-Ne.left)/G<F?(Y=B*Ne.mass*M.mass/(G*G*G),X+=Y*V,ne+=Y*U):(Ne.quad0&&($[le]=Ne.quad0,ae+=1,le+=1),Ne.quad1&&($[le]=Ne.quad1,ae+=1,le+=1),Ne.quad2&&($[le]=Ne.quad2,ae+=1,le+=1),Ne.quad3&&($[le]=Ne.quad3,ae+=1,le+=1)))}M.force.x+=X,M.force.y+=ne}function L(M){if(M.length!==0){var B=Number.MAX_VALUE,F=Number.MAX_VALUE,q=Number.MIN_VALUE,$=Number.MIN_VALUE,Y=void 0,V=M.length;for(Y=V;Y--;){var U=M[Y].pos.x,G=M[Y].pos.y;U<B&&(B=U),U>q&&(q=U),G<F&&(F=G),G>$&&($=G)}var X=q-B,ne=$-F;for(X>ne?$=F+X:q=B+ne,I=0,C=P(),C.left=B,C.right=q,C.top=F,C.bottom=$,Y=V-1,Y>=0&&(C.body=M[Y]);Y--;)O(M[Y])}}function O(M){for(E.reset(),E.push(C,M);!E.isEmpty();){var B=E.pop(),F=B.node,q=B.body;if(F.body){var oe=F.body;if(F.body=null,v(oe.pos,q.pos)){var le=3;do{var pe=Math.random(),ge=(F.right-F.left)*pe,de=(F.bottom-F.top)*pe;oe.pos.x=F.left+ge,oe.pos.y=F.top+de,le-=1}while(le>0&&v(oe.pos,q.pos));if(le===0&&v(oe.pos,q.pos))return}E.push(F,oe),E.push(F,q)}else{var $=q.pos.x,Y=q.pos.y;F.mass=F.mass+q.mass,F.massX=F.massX+q.mass*$,F.massY=F.massY+q.mass*Y;var V=0,U=F.left,G=(F.right+U)/2,X=F.top,ne=(F.bottom+X)/2;$>G&&(V=V+1,U=G,G=F.right),Y>ne&&(V=V+2,X=ne,ne=F.bottom);var ae=g(F,V);ae?E.push(ae,q):(ae=P(),ae.left=U,ae.top=X,ae.right=G,ae.bottom=ne,ae.body=q,w(F,V,ae))}}}return{insertBodies:L,updateBodyForce:A}}function g(_,E){return E===0?_.quad0:E===1?_.quad1:E===2?_.quad2:E===3?_.quad3:null}function w(_,E,k){E===0?_.quad0=k:E===1?_.quad1=k:E===2?_.quad2=k:E===3&&(_.quad3=k)}i.exports={makeQuadtree:p}},function(i,a,u){i.exports=c;function c(){this.stack=[],this.popIdx=0}c.prototype={isEmpty:function(){return this.popIdx===0},push:function(v,p){var g=this.stack[this.popIdx];g?(g.node=v,g.body=p):this.stack[this.popIdx]=new l(v,p),++this.popIdx},pop:function(){if(this.popIdx>0)return this.stack[--this.popIdx]},reset:function(){this.popIdx=0}};function l(h,v){this.node=h,this.body=v}},function(i,a,u){i.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(i,a,u){var c=u(6),l=c.integrate,h=u(5),v=h.applyDrag,p=u(1),g=p.applySpring;function w(_){var E=_.bodies,k=_.springs,I=_.quadtree,C=_.timeStep,P=_.gravity,A=_.theta,L=_.dragCoeff,O=_.pull;E.forEach(function(Y){var V=Y._scratch;V&&(Y.locked=V.locked,Y.grabbed=V.grabbed,Y.pos.x=V.x,Y.pos.y=V.y)}),I.insertBodies(E);for(var M=0;M<E.length;M++){var B=E[M];I.updateBodyForce(B,P,A,O),v(B,L)}for(var F=0;F<k.length;F++){var q=k[F];g(q)}var $=l(E,C);return E.forEach(function(Y){var V=Y._scratch;V&&(V.x=Y.pos.x,V.y=Y.pos.y)}),$}i.exports={tick:w}},function(i,a,u){var c=u(2),l=function(v){v&&v("layout","euler",c)};typeof cytoscape<"u"&&l(cytoscape),i.exports=l},function(i,a,u){i.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(i,a,u){var c=function(){function P(A,L){for(var O=0;O<L.length;O++){var M=L[O];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(A,M.key,M)}}return function(A,L,O){return L&&P(A.prototype,L),O&&P(A,O),A}}();function l(P,A){if(!(P instanceof A))throw new TypeError("Cannot call a class as a function")}var h=u(0),v=u(12),p=u(14),g=u(15),w=g.setInitialPositionState,_=g.refreshPositions,E=g.getNodePositionData,k=u(16),I=k.multitick,C=function(){function P(A){l(this,P);var L=this.options=h({},v,A),O=L.eles.nodes();if(!L.randomize){O=O.sort(function(q,$){return q.position().x-$.position().x});var M={x:0,y:0},B={};O.forEach(function(q){Object.assign(B,q.position()),Math.abs(M.x-B.x)<L.theta&&Math.abs(M.y-B.y)<L.theta&&q.position({x:Math.random()*100,y:Math.random()*100}),Object.assign(M,B)})}var F=this.state=h({},L,{layout:this,nodes:O,edges:L.eles.edges(),tickIndex:0,firstUpdate:!0});F.animateEnd=L.animate&&L.animate==="end",F.animateContinuously=L.animate&&!F.animateEnd}return c(P,[{key:"run",value:function(){var L=this,O=this.state;if(O.tickIndex=0,O.firstUpdate=!0,O.startTime=Date.now(),O.running=!0,O.currentBoundingBox=p(O.boundingBox,O.cy),O.ready&&L.one("ready",O.ready),O.stop&&L.one("stop",O.stop),O.nodes.forEach(function(ge){return w(ge,O)}),L.prerun(O),O.animateContinuously){var M=function(de){if(O.ungrabifyWhileSimulating){var Se=E(de,O).grabbable=de.grabbable();Se&&de.ungrabify()}},B=function(de){if(O.ungrabifyWhileSimulating){var Se=E(de,O).grabbable;Se&&de.grabify()}},F=function(de){return E(de,O).grabbed=de.grabbed()},q=function(de){var Se=de.target;F(Se)},$=q,Y=function(de){var Se=de.target,Ne=E(Se,O),ye=Se.position();Ne.x=ye.x,Ne.y=ye.y},V=function(de){de.on("grab",q),de.on("free",$),de.on("drag",Y)},U=function(de){de.removeListener("grab",q),de.removeListener("free",$),de.removeListener("drag",Y)},G=function(){O.fit&&O.animateContinuously&&O.cy.fit(O.padding)},X=function(){_(O.nodes,O),G(),requestAnimationFrame(ne)},ne=function(){I(O,X,ae)},ae=function(){_(O.nodes,O),G(),O.nodes.forEach(function(de){B(de),U(de)}),O.running=!1,L.emit("layoutstop")};L.emit("layoutstart"),O.nodes.forEach(function(ge){M(ge),V(ge)}),ne()}else{for(var oe=!1,le=function(){},pe=function(){return oe=!0};!oe;)I(O,le,pe);O.eles.layoutPositions(this,O,function(ge){var de=E(ge,O);return{x:de.x,y:de.y}})}return L.postrun(O),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}}]),P}();i.exports=C},function(i,a,u){i.exports=function(c,l){return c==null?c={x1:0,y1:0,w:l.width(),h:l.height()}:c={x1:c.x1,x2:c.x2,y1:c.y1,y2:c.y2,w:c.w,h:c.h},c.x2==null&&(c.x2=c.x1+c.w),c.w==null&&(c.w=c.x2-c.x1),c.y2==null&&(c.y2=c.y1+c.h),c.h==null&&(c.h=c.y2-c.y1),c}},function(i,a,u){var c=u(0),l=function(g,w){var _=g.position(),E=w.currentBoundingBox,k=g.scratch(w.name);k==null&&(k={},g.scratch(w.name,k)),c(k,w.randomize?{x:E.x1+Math.random()*E.w,y:E.y1+Math.random()*E.h}:{x:_.x,y:_.y}),k.locked=g.locked()},h=function(g,w){return g.scratch(w.name)},v=function(g,w){g.positions(function(_){var E=_.scratch(w.name);return{x:E.x,y:E.y}})};i.exports={setInitialPositionState:l,getNodePositionData:h,refreshPositions:v}},function(i,a,u){var c=function(){},l=function(p){var g=p,w=p.layout,_=w.tick(g);g.firstUpdate&&(g.animateContinuously&&g.layout.emit("layoutready"),g.firstUpdate=!1),g.tickIndex++;var E=Date.now()-g.startTime;return!g.infinite&&(_||g.tickIndex>=g.maxIterations||E>=g.maxSimulationTime)},h=function(p){for(var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c,w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:c,_=!1,E=p,k=0;k<E.refresh&&(_=!E.running||l(E),!_);k++);_?w():g()};i.exports={tick:l,multitick:h}}])})})(FX);var L2e=FX.exports;const N2e=Lb(L2e);oc.use(nwe),oc.use(m2e),oc.use(I2e),oc.use(P2e),oc.use(N2e);let O2e=0;function D2e(r){return`${r}${Date.now()}_${++O2e}`}const $X={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 M2e{constructor(t,i={}){var a;if(!t)throw new Error("Container element is required");this.container=t,this.options={layout:i.layout||{name:"preset"},...i},this._instanceId=Math.random().toString(36).slice(2,9),this.userStylesheet=(i.style||[]).map(u=>({selector:u.selector,style:{...u.style}})),this._nodeTypes=(i.nodeTypes||[]).map(u=>({...u})),this._edgeTypes=(i.edgeTypes||[]).map(u=>({...u})),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=((a=this._nodeTypes[0])==null?void 0:a.id)||null,this._selectedElement=null,this._ctxTarget=null,this._ctxPosition=null,this.context={...i.context||{}},this._init(),i.edgeHandle!==!1&&typeof document<"u"&&document.body&&this._initEdgeHandle()}_esc(t){return String(t??"").replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}_injectCSS(){if(document.getElementById("bxe-styles"))return;const t=document.createElement("style");t.id="bxe-styles",t.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(t)}_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 t=document.createElement("div");t.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()),t.appendChild(this._undoBtn),t.appendChild(this._redoBtn),this._sidebarEl.appendChild(t);const i=document.createElement("div");i.className="bxe-tab-nav";const a=[{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={},a.forEach(({id:M,icon:B,title:F})=>{const q=document.createElement("button");q.className="bxe-tab-btn",q.textContent=B,q.title=F,q.dataset.tab=M,q.addEventListener("click",()=>this._switchPane(M)),this._tabBtns[M]=q,i.appendChild(q)}),this._sidebarEl.appendChild(i);const u=document.createElement("div");u.className="bxe-tab-body",this._panes={};const c=document.createElement("div");c.className="bxe-pane",c.dataset.pane="palette";const l=document.createElement("div");l.className="bxe-pane-title",l.textContent="Palette",c.appendChild(l);const h=document.createElement("div");h.className="bxe-pane-label",h.innerHTML="Node type <small>(double-click canvas to add)</small>",c.appendChild(h),this._nodePaletteEl=document.createElement("div"),c.appendChild(this._nodePaletteEl);const v=document.createElement("div");v.className="bxe-pane-label",v.innerHTML="Edge type <small>(drag handle to connect)</small>",c.appendChild(v),this._edgePaletteEl=document.createElement("div"),c.appendChild(this._edgePaletteEl),this._nodePaletteEl.addEventListener("click",M=>{const B=M.target.closest(".bxe-palette-item");B&&this._selectNodeType(B.dataset.typeId)}),this._edgePaletteEl.addEventListener("click",M=>{const B=M.target.closest(".bxe-palette-item");B&&this.setEdgeType(B.dataset.typeId)}),this._panes.palette=c;const p=document.createElement("div");p.className="bxe-pane",p.dataset.pane="properties";const g=document.createElement("div");g.className="bxe-pane-title",g.textContent="Properties",p.appendChild(g),this._propsContentEl=document.createElement("div"),p.appendChild(this._propsContentEl),p.addEventListener("input",M=>this._handlePropertiesEvent(M)),p.addEventListener("change",M=>this._handlePropertiesEvent(M)),p.addEventListener("blur",M=>this._handlePropertiesEvent(M),!0),p.addEventListener("click",M=>this._handlePropertiesEvent(M)),this._panes.properties=p;const w=document.createElement("div");w.className="bxe-pane",w.dataset.pane="stylesheet";const _=document.createElement("div");_.className="bxe-pane-title",_.textContent="Stylesheet",w.appendChild(_),this._stylesheetRulesEl=document.createElement("div"),w.appendChild(this._stylesheetRulesEl);const E=document.createElement("button");E.className="bxe-btn-add",E.textContent="+ Add Rule",E.addEventListener("click",()=>{this.addStyleRule("node",{}),this._switchPane("stylesheet")}),w.appendChild(E),w.addEventListener("change",M=>this._handleStylesheetEvent(M)),w.addEventListener("click",M=>this._handleStylesheetEvent(M)),this._panes.stylesheet=w;const k=document.createElement("div");k.className="bxe-pane",k.dataset.pane="layout";const I=document.createElement("div");I.className="bxe-pane-title",I.textContent="Layout",k.appendChild(I),this._layoutPaneContentEl=document.createElement("div"),k.appendChild(this._layoutPaneContentEl),this._panes.layout=k;const C=document.createElement("div");C.className="bxe-pane",C.dataset.pane="context";const P=document.createElement("div");P.className="bxe-pane-title",P.textContent="JSON-LD Context",C.appendChild(P),this._contextEntriesEl=document.createElement("div"),C.appendChild(this._contextEntriesEl);const A=document.createElement("div");A.className="bxe-ctx-addbtns";const L=document.createElement("button");L.className="bxe-btn-add",L.textContent="+ Add Prefix",L.addEventListener("click",()=>this._addContextEntry("prefix"));const O=document.createElement("button");O.className="bxe-btn-add",O.textContent="+ Add Term",O.addEventListener("click",()=>this._addContextEntry("term")),A.appendChild(L),A.appendChild(O),C.appendChild(A),C.addEventListener("change",M=>this._handleContextEvent(M)),C.addEventListener("click",M=>this._handleContextEvent(M)),this._panes.context=C,[c,p,w,k,C].forEach(M=>u.appendChild(M)),this._sidebarEl.appendChild(u),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",M=>{var q;const B=M.target.closest(".bxe-ctx-item");if(!B)return;const F=B.dataset.action;if(F==="edit-props")this._ctxTarget&&(this._refreshProperties(this._ctxTarget),this._switchPane("properties"));else if(F==="duplicate"){if((q=this._ctxTarget)!=null&&q.isNode()){const $={...this._ctxTarget.data()};delete $.id,$.label=($.label||"Node")+" (copy)";const Y=this._ctxTarget.position();this.addNode($,{x:Y.x+50,y:Y.y+50})}}else F==="cut"?this.cut():F==="copy"?this.copy():F==="paste"?this.paste():F==="delete"?(this.cy.$(":selected").length>0?this.removeSelected():this._ctxTarget&&this.removeElement(this._ctxTarget.id()),this._clearProperties()):F==="add-node-here"&&this._ctxPosition&&this._addNodeAtPosition(this._ctxPosition);this._hideContextMenu()}),document.body.appendChild(this._ctxMenu),this._keydownHandler=M=>{var B,F,q,$;if((M.ctrlKey||M.metaKey)&&M.key==="z"&&!M.shiftKey)M.preventDefault(),this.undo();else if((M.ctrlKey||M.metaKey)&&(M.key==="y"||M.key==="z"&&M.shiftKey))M.preventDefault(),this.redo();else if((M.ctrlKey||M.metaKey)&&M.key==="c"){const Y=(B=document.activeElement)==null?void 0:B.tagName;Y!=="INPUT"&&Y!=="TEXTAREA"&&Y!=="SELECT"&&(M.preventDefault(),this.copy())}else if((M.ctrlKey||M.metaKey)&&M.key==="x"){const Y=(F=document.activeElement)==null?void 0:F.tagName;Y!=="INPUT"&&Y!=="TEXTAREA"&&Y!=="SELECT"&&(M.preventDefault(),this.cut())}else if((M.ctrlKey||M.metaKey)&&M.key==="v"){const Y=(q=document.activeElement)==null?void 0:q.tagName;Y!=="INPUT"&&Y!=="TEXTAREA"&&Y!=="SELECT"&&(M.preventDefault(),this.paste())}else if(M.key==="Delete"||M.key==="Backspace"){const Y=($=document.activeElement)==null?void 0:$.tagName;Y!=="INPUT"&&Y!=="TEXTAREA"&&Y!=="SELECT"&&this.removeSelected()}},document.addEventListener("keydown",this._keydownHandler),this._switchPane("palette"),this._renderContextPane()}_switchPane(t){Object.entries(this._panes).forEach(([i,a])=>{a.classList.toggle("active",i===t)}),Object.entries(this._tabBtns).forEach(([i,a])=>{a.classList.toggle("active",i===t)})}_renderPalette(){var a;const t=this._nodeTypes,i=this._edgeTypes;if(this._nodePaletteEl){if(!t.length)this._nodePaletteEl.innerHTML='<div class="bxe-empty-small">No node types defined</div>';else{this._nodePaletteEl.innerHTML="";const u=document.createElement("div");u.className="bxe-palette",t.forEach((c,l)=>{const h=c.shape==="ellipse"?"50%":c.shape==="roundrectangle"?"5px":"2px",v=c.color||"#e0e0e0",p=c.borderColor||"#999",g=document.createElement("div");g.className="bxe-palette-item"+(l===0?" selected":""),g.dataset.typeId=c.id;const w=document.createElement("div");w.className="bxe-node-swatch",w.style.cssText=`background:${v};border-color:${p};border-radius:${h}`;const _=document.createElement("span");_.className="bxe-palette-label",_.textContent=c.label,g.appendChild(w),g.appendChild(_),u.appendChild(g)}),this._nodePaletteEl.appendChild(u)}if(!i.length)this._edgePaletteEl.innerHTML='<div class="bxe-empty-small">No edge types defined</div>';else{this._edgePaletteEl.innerHTML="";const u=document.createElement("div");u.className="bxe-palette",i.forEach((c,l)=>{const h=c.color||"#666666",v=c.lineStyle==="dashed"?"6,3":c.lineStyle==="dotted"?"2,3":"none",p=`bxe-arr-${this._instanceId}-${String(c.id).replace(/[^a-zA-Z0-9]/g,"_")}`,g=document.createElement("div");g.className="bxe-palette-item"+(l===0?" selected":""),g.dataset.typeId=c.id;const w=v==="none"?`<line x1="4" y1="11" x2="34" y2="11" stroke="${h}" stroke-width="2" marker-end="url(#${p})"/>`:`<line x1="4" y1="11" x2="34" y2="11" stroke="${h}" stroke-width="2" stroke-dasharray="${v}" marker-end="url(#${p})"/>`;g.innerHTML=`<svg width="44" height="22" style="flex-shrink:0;overflow:visible"><defs><marker id="${p}" markerWidth="6" markerHeight="6" refX="5" refY="3" orient="auto"><path d="M0,0 L6,3 L0,6 Z" fill="${h}"/></marker></defs>${w}</svg><span class="bxe-palette-label">${this._esc(c.label)}</span>`,u.appendChild(g)}),this._edgePaletteEl.appendChild(u)}this._currentNodeTypeId=((a=t[0])==null?void 0:a.id)||null,i[0]&&(this.currentEdgeType=i[0])}}_selectNodeType(t){this._currentNodeTypeId=t,this._nodePaletteEl&&this._nodePaletteEl.querySelectorAll(".bxe-palette-item").forEach(i=>{i.classList.toggle("selected",i.dataset.typeId===t)})}_addNodeAtPosition(t){this._currentNodeTypeId?this.addNodeOfType(this._currentNodeTypeId,t):this.addNode({label:"New Node"},t)}_refreshProperties(t){if(this._selectedElement=t,!this._propsContentEl)return;const i=t.data(),a=t.isNode(),u=new Set(["id","label","source","target","_style"]),c=Object.keys(i).filter(p=>!u.has(p)),l=this._esc(i.id||"");let h=`
412
+ <div class="bxe-prop-group">
413
+ <label>ID</label>
414
+ <input class="bxe-input" type="text" value="${l}" 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(i.label||"")}" placeholder="Enter label" data-field="label" data-element-id="${l}">
419
+ </div>`;a||(h+=`
420
+ <div class="bxe-prop-group">
421
+ <label>Source → Target</label>
422
+ <input class="bxe-input" type="text" value="${this._esc(i.source)} → ${this._esc(i.target)}" readonly>
423
+ </div>`);let v="";c.length?c.forEach(p=>{v+=`
424
+ <tr class="bxe-prop-row" data-key="${this._esc(p)}">
425
+ <td><input class="bxe-cell-input" type="text" value="${this._esc(p)}" 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(i[p]??""))}</textarea></td>
427
+ <td><button class="bxe-btn-del" data-action="del-prop" title="Remove">×</button></td>
428
+ </tr>`}):v='<tr class="bxe-no-props-row"><td colspan="3" class="bxe-empty-small">No properties</td></tr>',h+=`
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="${l}">${v}</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="${l}">Delete</button>
441
+ </div>`,this._propsContentEl.innerHTML=h}_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(t){var a,u,c;const i=t.target;if(!(!i||!this._selectedElement)){if(t.type==="input"&&i.dataset.field==="label"){const l=this._selectedElement.id();this.updateElement(l,{label:i.value});return}if(t.type==="input"&&i.dataset.field==="value"){const l=i.closest("tr.bxe-prop-row");if(!l)return;const h=l.dataset.key;if(!h)return;this.updateElement(this._selectedElement.id(),{[h]:i.value});return}if(t.type==="blur"&&i.dataset.field==="key"){const l=i.closest("tr.bxe-prop-row");if(!l)return;const h=l.dataset.key,v=i.value.trim();if(!v)return;const p=this._selectedElement.id();if(h&&h!==v){const g=l.querySelector('[data-field="value"]'),w=g?g.value:"";this.updateElement(p,{[h]:void 0,[v]:w})}else if(!h&&v){const g=l.querySelector('[data-field="value"]'),w=g?g.value:"";this.updateElement(p,{[v]:w})}l.dataset.key=v;return}if(t.type==="click"&&i.dataset.action==="add-prop"){const l=(a=this._propsContentEl)==null?void 0:a.querySelector(".bxe-props-tbody");if(!l)return;(u=l.querySelector(".bxe-no-props-row"))==null||u.remove();const h=document.createElement("tr");h.className="bxe-prop-row",h.dataset.key="",h.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>`,l.appendChild(h),h.querySelector('[data-field="key"]').focus();return}if(t.type==="click"&&i.dataset.action==="del-prop"){const l=i.closest("tr.bxe-prop-row");if(!l)return;const h=l.dataset.key;h&&this.updateElement(this._selectedElement.id(),{[h]:void 0}),l.remove();const v=(c=this._propsContentEl)==null?void 0:c.querySelector(".bxe-props-tbody");v&&!v.querySelector(".bxe-prop-row")&&(v.innerHTML='<tr class="bxe-no-props-row"><td colspan="3" class="bxe-empty-small">No properties</td></tr>');return}if(t.type==="click"&&i.closest('[data-action="delete-el"]')){if(this.cy.$(":selected").length>0)this.removeSelected();else{const v=this._selectedElement.id();this.removeElement(v)}this._clearProperties()}}}_refreshStylesheet(){if(!this._stylesheetRulesEl)return;const t=this.userStylesheet;if(!t.length){this._stylesheetRulesEl.innerHTML='<div class="bxe-empty">No style rules yet.</div>';return}this._stylesheetRulesEl.innerHTML=t.map((i,a)=>{const c=Object.entries(i.style||{}).map(([l,h])=>`
445
+ <div class="bxe-style-prop-row">
446
+ <input type="text" value="${this._esc(l)}" placeholder="property" data-field="key" data-rule="${a}" data-prop="${this._esc(l)}">
447
+ <input type="text" value="${this._esc(h)}" placeholder="value" data-field="value" data-rule="${a}" data-prop="${this._esc(l)}">
448
+ <button class="bxe-btn-del" data-action="del-prop" data-rule="${a}" data-prop="${this._esc(l)}" title="Remove">×</button>
449
+ </div>`).join("");return`
450
+ <div class="bxe-style-rule" data-rule="${a}">
451
+ <div class="bxe-style-rule-header">
452
+ <input type="text" value="${this._esc(i.selector)}" placeholder="selector" data-field="selector" data-rule="${a}">
453
+ <button class="bxe-btn-del" data-action="del-rule" data-rule="${a}" 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="${a}">+ property</button>
458
+ </div>
459
+ </div>`}).join("")}_handleStylesheetEvent(t){const i=t.target;if(i){if(t.type==="change"){if(i.dataset.field==="selector"){const a=parseInt(i.dataset.rule),u=this.userStylesheet[a];u&&this.updateStyleRule(a,i.value,u.style);return}if(i.dataset.field==="key"){const a=parseInt(i.dataset.rule),u=i.dataset.prop,c=i.value.trim();if(!c)return;const l=this.userStylesheet[a];if(!l)return;const h={...l.style},v=h[u];delete h[u],h[c]=v,this.updateStyleRule(a,l.selector,h);return}if(i.dataset.field==="value"){const a=parseInt(i.dataset.rule),u=i.dataset.prop,c=this.userStylesheet[a];if(!c)return;this.updateStyleRule(a,c.selector,{...c.style,[u]:i.value});return}}if(t.type==="click"){if(i.dataset.action==="del-rule"){this.removeStyleRule(parseInt(i.dataset.rule));return}if(i.dataset.action==="del-prop"){const a=parseInt(i.dataset.rule),u=i.dataset.prop,c=this.userStylesheet[a];if(!c)return;const l={...c.style};delete l[u],this.updateStyleRule(a,c.selector,l);return}if(i.dataset.action==="add-prop"){const a=parseInt(i.dataset.rule),u=prompt("CSS property name (e.g. background-color):");if(!u)return;const c=prompt(`Value for "${u}":`)??"",l=this.userStylesheet[a];if(!l)return;this.updateStyleRule(a,l.selector,{...l.style,[u]:c});return}}}}_showContextMenu(t,i,a){this._ctxTarget=a;const u=a.isNode(),c=this.cy.$(":selected").length,l=c>1?`Delete (${c})`:"Delete",h=c>0,v=!!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
+ ${h?`<div class="bxe-ctx-item" data-action="cut">Cut${c>1?` (${c})`:""}</div>`:""}
463
+ ${h?`<div class="bxe-ctx-item" data-action="copy">Copy${c>1?` (${c})`:""}</div>`:""}
464
+ ${v?'<div class="bxe-ctx-item" data-action="paste">Paste</div>':""}
465
+ ${h||v?'<div class="bxe-ctx-sep"></div>':""}
466
+ ${u&&!h?'<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(l)}</div>`,this._ctxMenu.style.left=t+"px",this._ctxMenu.style.top=i+"px",this._ctxMenu.style.display="block",setTimeout(()=>document.addEventListener("click",()=>this._hideContextMenu(),{once:!0}),50)}_showBackgroundContextMenu(t,i){const a=!!this._clipboard;this._ctxMenu.innerHTML=`
468
+ <div class="bxe-ctx-item" data-action="add-node-here">Add Node Here</div>
469
+ ${a?'<div class="bxe-ctx-sep"></div><div class="bxe-ctx-item" data-action="paste">Paste</div>':""}`,this._ctxMenu.style.left=t+"px",this._ctxMenu.style.top=i+"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 t=this._buildStylesheet();this.cy=oc({container:this._canvasDiv,elements:this.options.elements||{nodes:[],edges:[]},style:t,layout:this.options.layout,userZoomingEnabled:!0,userPanningEnabled:!0,boxSelectionEnabled:!0}),this._initPanzoomControls(),this._setupEvents(),this._renderPalette(),this.createLayoutPanel(this._layoutPaneContentEl),this._refreshStylesheet()}_buildStylesheet(){const t=[{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}}],i=this.userStylesheet,a=this._generateElementStyles();return[...t,...i,...a]}_generateElementStyles(){const t=[];if(this.cy)this.cy.elements().forEach(i=>{const a=i.data("_style");if(a&&Object.keys(a).length>0){const u=i.isNode()?"node":"edge";t.push({selector:`${u}[id="${i.id()}"]`,style:a})}});else{const i=this.options.elements||{nodes:[],edges:[]};(i.nodes||[]).forEach(a=>{a.data&&a.data._style&&t.push({selector:`node[id="${a.data.id}"]`,style:a.data._style})}),(i.edges||[]).forEach(a=>{a.data&&a.data._style&&t.push({selector:`edge[id="${a.data.id}"]`,style:a.data._style})})}return t}_setupEvents(){this.cy.on("add remove data",t=>{this._emit("change",{type:t.type,target:t.target})}),this.cy.on("select",t=>{this._emit("select",{target:t.target}),this._emit("selectionChange",{type:"select",target:t.target,selected:this.cy.$(":selected").jsons()}),this._selectedElement=t.target,this._refreshProperties(t.target),this._switchPane("properties")}),this.cy.on("unselect",t=>{this._emit("unselect",{target:t.target}),this._emit("selectionChange",{type:"unselect",target:t.target,selected:this.cy.$(":selected").jsons()}),this.cy.$(":selected").length||this._clearProperties()}),this.cy.on("grabon","node",t=>{if(this._restoringState||this._ehDrawing)return;const a=t.target.position();this._preGrabPos={x:a.x,y:a.y},this._preGrabSnapshot=this.exportGraph()}),this.cy.on("free","node",t=>{if(this._restoringState||this._ehDrawing||!this._preGrabSnapshot)return;const a=t.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",t=>{t.target===this.cy&&this._addNodeAtPosition(t.position)}),this.cy.on("cxttap","node,edge",t=>{t.preventDefault(),this._showContextMenu(t.originalEvent.clientX,t.originalEvent.clientY,t.target)}),this.cy.on("cxttap",t=>{t.target===this.cy&&(t.preventDefault(),this._ctxPosition=t.position,this._showBackgroundContextMenu(t.originalEvent.clientX,t.originalEvent.clientY))}),this.cy.on("tap",()=>this._hideContextMenu())}addNode(t,i=null,a={}){this._pushUndo();const u={...t};Object.keys(a).length>0&&(u._style={...u._style||{},...a});const c={group:"nodes",data:u};i&&typeof i.x=="number"&&(c.position=i);const l=this.cy.add(c);return this._updateStylesheet(),this._emit("nodeAdded",{node:l.json()}),l.json()}addEdge(t,i,a={},u={}){this._pushUndo();const c={source:t,target:i,...a};Object.keys(u).length>0&&(c._style=u);const l=this.cy.add({group:"edges",data:c});return this._updateStylesheet(),this._emit("edgeAdded",{edge:l.json()}),l.json()}removeElement(t){this._pushUndo();const i=this.cy.getElementById(t);if(i.length>0){const a=i.json();return i.remove(),this._emit("elementRemoved",{element:a}),!0}return!1}updateElement(t,i,a=null){this._pushUndo();const u=this.cy.getElementById(t);if(u.length===0)return!1;const c=u.data(),l={...i};return a!==null?l._style={...c._style,...a}:c._style&&(l._style=c._style),u.data(l),a!==null&&this._updateStylesheet(),this._emit("elementUpdated",{element:u.json()}),u.json()}updateElementStyle(t,i){this._pushUndo();const a=this.cy.getElementById(t);if(a.length===0)return!1;const c={...a.data("_style")||{},...i};return a.data("_style",c),this._updateStylesheet(),this._emit("styleUpdated",{elementId:t,style:c}),c}_updateStylesheet(){const t=this._buildStylesheet();this.cy.style().fromJson(t).update()}runLayout(t){this._pushUndo(),typeof t=="string"&&(t={name:t});const{name:i,...a}=t;this._lastLayout={name:i,options:{...a}};const u=this.cy.nodes(":selected"),c=u.length>0?u.add(u.edgesWith(u)):this.cy;this._stopRunningLayout();const l=c.layout(t);this._runningLayout=l,l.one("layoutstop",()=>{this._runningLayout=null}),l.run(),this._emit("layoutRun",{options:t})}_stopRunningLayout(){if(this._runningLayout){try{this._runningLayout.stop()}catch{}this._runningLayout=null}}getLastLayout(){return{...this._lastLayout,options:{...this._lastLayout.options}}}setLastLayout(t,i={}){this._lastLayout={name:t,options:{...i}}}getAvailableLayouts(){return Object.entries($X).filter(([t,i])=>i.builtin||this._isLayoutRegistered(t)).map(([t,i])=>({name:t,label:i.label,params:i.params}))}getLayoutParams(t){var i;return((i=$X[t])==null?void 0:i.params)||[]}_isLayoutRegistered(t){try{const i=this.cy.layout({name:t,stop:()=>{}});return!!(i&&typeof i.run=="function")}catch{return!1}}getElements(){const t=this.cy.json().elements||{};return{nodes:t.nodes||[],edges:t.edges||[]}}loadElements(t){const i=t.nodes||(Array.isArray(t)?t.filter(u=>u.group==="nodes"):[]),a=t.edges||(Array.isArray(t)?t.filter(u=>u.group==="edges"):[]);this.cy.batch(()=>{this.cy.elements().remove(),i.length&&this.cy.add(i),a.length&&this.cy.add(a)}),this._updateStylesheet(),this._emit("elementsLoaded",{elements:t})}exportGraph(){const t=this.cy.json().elements,i=u=>{if(!u.classes)return u;const c=u.classes.split(" ").filter(l=>!l.startsWith("eh-")).join(" ");return c!==u.classes?{...u,classes:c}:u},a=u=>{const c=u.classes||"";return c.includes("eh-ghost")||c.includes("eh-preview")};return{elements:{nodes:(t.nodes||[]).filter(u=>!a(u)).map(i),edges:(t.edges||[]).filter(u=>!a(u)).map(i)},userStylesheet:this.userStylesheet.map(u=>({selector:u.selector,style:{...u.style}})),lastLayout:this.getLastLayout(),context:{...this.context},version:"1.0.0"}}importGraph(t){t.elements&&this.loadElements(t.elements);const i=t.userStylesheet||t.stylesheet;if(i&&(this.userStylesheet=i.map(a=>({selector:a.selector,style:{...a.style}})),this._updateStylesheet(),this._emit("stylesheetChanged",{stylesheet:this.userStylesheet})),t.lastLayout&&(this._lastLayout={name:t.lastLayout.name||"dagre",options:{...t.lastLayout.options||{}}},this._layoutPanel&&this._layoutPanelSync()),this._nodesNeedLayout()){const{name:a,options:u}=this._lastLayout;this.runLayout({name:a,...u})}this._emit("graphImported",{graphData:t}),this._stylesheetRulesEl&&this._refreshStylesheet(),t.context&&(this.context={...t.context},this._renderContextPane())}_nodesNeedLayout(){const t=this.cy.nodes();return t.length?t.every(i=>{const a=i.position();return a.x===0&&a.y===0}):!1}getStylesheet(){return this.userStylesheet.map(t=>({selector:t.selector,style:{...t.style}}))}setStylesheet(t){this._pushUndo(),this.userStylesheet=t.map(i=>({selector:i.selector,style:{...i.style}})),this._updateStylesheet(),this._emit("stylesheetChanged",{stylesheet:this.userStylesheet}),this._stylesheetRulesEl&&this._refreshStylesheet()}addStyleRule(t,i={}){return this._pushUndo(),this.userStylesheet.push({selector:t,style:{...i}}),this._updateStylesheet(),this._emit("stylesheetChanged",{stylesheet:this.userStylesheet}),this._stylesheetRulesEl&&this._refreshStylesheet(),this.userStylesheet.length-1}updateStyleRule(t,i,a){return this._pushUndo(),t<0||t>=this.userStylesheet.length?!1:(this.userStylesheet[t]={selector:i,style:{...a}},this._updateStylesheet(),this._emit("stylesheetChanged",{stylesheet:this.userStylesheet}),this._stylesheetRulesEl&&this._refreshStylesheet(),!0)}removeStyleRule(t){return this._pushUndo(),t<0||t>=this.userStylesheet.length?!1:(this.userStylesheet.splice(t,1),this._updateStylesheet(),this._emit("stylesheetChanged",{stylesheet:this.userStylesheet}),this._stylesheetRulesEl&&this._refreshStylesheet(),!0)}getSelected(){return this.cy.$(":selected").toArray().map(t=>t.json())}removeSelected(){const t=this.cy.$(":selected");return t.length?(this._pushUndo(),t.forEach(i=>{const a=i.json();this.cy.remove(i),this._emit("elementRemoved",{element:a})}),this._updateStylesheet(),t.length):0}copy(){const t=this.cy.$("node:selected");if(!t.length)return!1;const i=new Set(t.map(u=>u.id())),a=this.cy.$("edge:selected").filter(u=>i.has(u.data("source"))&&i.has(u.data("target"))).add(this.cy.edges().filter(u=>i.has(u.data("source"))&&i.has(u.data("target"))));return this._clipboard={nodes:t.map(u=>u.json()),edges:a.map(u=>u.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 t=this._pasteOffset,i={},a=[],u=[];this._clipboard.nodes.forEach(l=>{const h="node-"+Math.random().toString(36).slice(2,9);i[l.data.id]=h;const v={...l.data,id:h},p=l.position?{x:l.position.x+t,y:l.position.y+t}:void 0,g={group:"nodes",data:v};p&&(g.position=p),a.push(g)}),this._clipboard.edges.forEach(l=>{const h=i[l.data.source],v=i[l.data.target];if(!h||!v)return;const p="edge-"+Math.random().toString(36).slice(2,9);u.push({group:"edges",data:{...l.data,id:p,source:h,target:v}})}),this.cy.$(":selected").unselect();const c=this.cy.add([...a,...u]);return c.select(),this._updateStylesheet(),this._emit("paste",{nodes:a,edges:u}),c}canPaste(){return!!this._clipboard}_pushUndo(){var i,a;if(this._restoringState)return;const t=this.exportGraph();console.debug("[Boxes] pushUndo: snapshot has",(i=t.elements.nodes)==null?void 0:i.length,"nodes,",(a=t.elements.edges)==null?void 0:a.length,"edges"),this._undoStack.push(t),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(t){this._restoringState=!0;try{this.loadElements(t.elements||{}),this.cy.nodes().length&&this.cy.fit(void 0,30),t.userStylesheet&&(this.userStylesheet=t.userStylesheet.map(i=>({selector:i.selector,style:{...i.style}})),this._updateStylesheet(),this._emit("stylesheetChanged",{stylesheet:this.userStylesheet})),t.lastLayout&&(this._lastLayout={name:t.lastLayout.name,options:{...t.lastLayout.options||{}}},this._layoutPanel&&this._layoutPanelSync())}finally{this._restoringState=!1}if(this._emit("graphImported",{graphData:t}),this._stylesheetRulesEl&&this._refreshStylesheet(),this._selectedElement){const i=this.cy.getElementById(this._selectedElement.id());i.length?this._refreshProperties(i):this._clearProperties()}}undo(){var i,a;if(!this._undoStack.length)return!1;this._stopRunningLayout(),this._preGrabSnapshot=null,this._preGrabPos=null,this._redoStack.push(this.exportGraph());const t=this._undoStack.pop();return console.debug("[Boxes] undo: restoring snapshot with",(i=t.elements.nodes)==null?void 0:i.length,"nodes,",(a=t.elements.edges)==null?void 0:a.length,"edges"),this._restoreSnapshot(t),this._emitHistoryChange(),!0}redo(){var i,a;if(!this._redoStack.length)return!1;this._stopRunningLayout(),this._preGrabSnapshot=null,this._preGrabPos=null,this._undoStack.push(this.exportGraph());const t=this._redoStack.pop();return console.debug("[Boxes] redo: restoring snapshot with",(i=t.elements.nodes)==null?void 0:i.length,"nodes,",(a=t.elements.edges)==null?void 0:a.length,"edges"),this._restoreSnapshot(t),this._emitHistoryChange(),!0}canUndo(){return this._undoStack.length>0}canRedo(){return this._redoStack.length>0}selectElements(t){this.cy.elements().unselect(),t.forEach(i=>{this.cy.getElementById(i).select()})}on(t,i){this.eventHandlers.has(t)||this.eventHandlers.set(t,[]),this.eventHandlers.get(t).push(i)}off(t,i){if(!this.eventHandlers.has(t))return;const a=this.eventHandlers.get(t),u=a.indexOf(i);u>-1&&a.splice(u,1)}_emit(t,i){this.eventHandlers.has(t)&&this.eventHandlers.get(t).forEach(a=>{a(i)})}getCytoscape(){return this.cy}destroy(){var t;this._destroyEdgeHandle(),this._destroyLayoutPanel(),this.cy&&(this.cy.destroy(),this.cy=null),this.eventHandlers.clear(),this._ctxMenu&&((t=this._ctxMenu.parentNode)==null||t.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(t=>({...t}))}getEdgeTypes(){return this._edgeTypes.map(t=>({...t}))}addNodeOfType(t,i=null){const a=this._nodeTypes.find(c=>c.id===t);if(!a)return null;const u={id:D2e("n"),label:a.label,...a.data};if(!i){const c=this.cy.pan(),l=this.cy.zoom(),h=this.cy.nodes().length*15,v=this._canvasDiv||this.container;i={x:(v.offsetWidth/2-c.x)/l+h%150-75,y:(v.offsetHeight/2-c.y)/l+Math.floor(h/150)*80}}return this.addNode(u,i)}setEdgeType(t){const i=this._edgeTypes.find(a=>a.id===t)||null;this.currentEdgeType=i,this._emit("edgeTypeChanged",{edgeType:this.currentEdgeType}),this._edgePaletteEl&&this._edgePaletteEl.querySelectorAll(".bxe-palette-item").forEach(a=>{a.classList.toggle("selected",a.dataset.typeId===t)})}getEdgeType(){return this.currentEdgeType?{...this.currentEdgeType}:null}_initPanzoomControls(){const t=document.createElement("div");t.className="bxe-panzoom",t.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(t),t.addEventListener("click",i=>{const a=i.target.closest("[data-pz]");if(!a)return;const u=this.cy;switch(a.dataset.pz){case"zoom-in":u.zoom({level:u.zoom()*1.3,renderedPosition:{x:u.width()/2,y:u.height()/2}});break;case"zoom-out":u.zoom({level:u.zoom()/1.3,renderedPosition:{x:u.width()/2,y:u.height()/2}});break;case"fit":u.fit(void 0,30);break}})}_initEdgeHandle(){this._eh=this.cy.edgehandles({canConnect:(u,c)=>!u.same(c),edgeParams:(u,c)=>{var l,h;return{data:{label:((l=this.currentEdgeType)==null?void 0:l.label)||"",...((h=this.currentEdgeType)==null?void 0:h.data)||{}}}},snap:!1,noEdgeEventsInDraw:!0,disableBrowserGestures:!0}),this._ehHandleDiv=null,this._ehHandleNode=null,this._ehDrawing=!1;const t=(u,c)=>{const l=u.renderedBoundingBox({includeLabels:!1}),h=this.cy.container().getBoundingClientRect(),v=h.left+(l.x1+l.x2)/2,p=h.top+l.y2,g=16,w=8;c.style.left=`${v-g/2}px`,c.style.top=`${p-w/2}px`},i=()=>{var u;this._ehHandleDiv&&(this._ehHandleDiv.removeEventListener("mousedown",this._ehStartDrawing),(u=this._ehHandleDiv.parentNode)==null||u.removeChild(this._ehHandleDiv),this._ehHandleDiv=null),this._ehHandleNode=null},a=u=>{if(this._ehDrawing)return;i(),this._ehHandleNode=u;const c=document.createElement("div");c.className="boxes-eh-handle",c.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(";"),c.addEventListener("mousedown",this._ehStartDrawing),document.body.appendChild(c),this._ehHandleDiv=c,t(u,c)};this._ehStartDrawing=u=>{u.preventDefault(),u.stopPropagation(),this._ehHandleNode&&this._eh.start(this._ehHandleNode)},this._ehMouseoverHandler=u=>a(u.target),this._ehRemoveHandler=()=>i(),this._ehWindowMouseup=()=>this._eh.stop(),this.cy.on("mouseover","node",this._ehMouseoverHandler),this.cy.on("grab","node",this._ehRemoveHandler),this.cy.on("tap",u=>{u.target===this.cy&&i()}),this.cy.on("zoom pan",this._ehRemoveHandler),window.addEventListener("mouseup",this._ehWindowMouseup),this._ehCompleteHandler=(u,c,l,h)=>{this._updateStylesheet(),h.forEach(v=>{this._emit("edgeAdded",{edge:v.json()})}),this._emit("edgeHandleComplete",{sourceId:c.id(),targetId:l.id(),edgeType:this.currentEdgeType})},this.cy.on("ehstart",()=>{this._pushUndo(),this._ehDrawing=!0,i()}),this.cy.on("ehstop",()=>{this._ehDrawing=!1}),this.cy.on("ehcomplete",this._ehCompleteHandler)}_destroyEdgeHandle(){var t;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&&((t=this._ehHandleDiv.parentNode)==null||t.removeChild(this._ehHandleDiv),this._ehHandleDiv=null),this._eh&&(this._eh.destroy(),this._eh=null)}_renderContextPane(){const t=this._contextEntriesEl;if(!t)return;const i=Object.entries(this.context);if(!i.length){t.innerHTML='<div class="bxe-empty">No entries. Add a prefix mapping or term definition.</div>';return}t.innerHTML=i.map(([a,u])=>{const c=typeof u=="object"&&u!==null,l=this._esc(a);if(c){const h=this._esc(JSON.stringify(u,null,2));return`
474
+ <div class="bxe-ctx-row" data-key="${l}">
475
+ <input class="bxe-ctx-key bxe-cell-input" type="text" value="${l}" 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">${h}</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="${l}">
481
+ <input class="bxe-ctx-key bxe-cell-input" type="text" value="${l}" 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(u))}" 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(t){var a;if(t==="term"){let u="term1",c=1;for(;u in this.context;)u=`term${++c}`;this.context[u]={"@type":"@id"}}else{let u="prefix1",c=1;for(;u in this.context;)u=`prefix${++c}`;this.context[u]=""}this._renderContextPane();const i=(a=this._contextEntriesEl)==null?void 0:a.querySelectorAll(".bxe-ctx-key");i!=null&&i.length&&i[i.length-1].focus()}_handleContextEvent(t){const i=t.target.closest(".bxe-ctx-row");if(!i)return;const a=i.dataset.key,u=t.target.dataset.role,c=t.target.dataset.type;if(u==="del")delete this.context[a],this._renderContextPane(),this._emit("contextChanged",{context:{...this.context}});else if(u==="key"&&t.type==="change"){const l=t.target.value.trim();if(!l||l===a){t.target.value=a;return}const h={};for(const[v,p]of Object.entries(this.context))h[v===a?l:v]=p;this.context=h,i.dataset.key=l,this._emit("contextChanged",{context:{...this.context}})}else if(u==="val"&&t.type==="change")if(c==="object")try{const l=JSON.parse(t.target.value);if(typeof l!="object"||l===null||Array.isArray(l))throw new Error("Must be a JSON object");t.target.classList.remove("bxe-ctx-invalid"),this.context[a]=l,this._emit("contextChanged",{context:{...this.context}})}catch{t.target.classList.add("bxe-ctx-invalid")}else this.context[a]=t.target.value,this._emit("contextChanged",{context:{...this.context}})}createLayoutPanel(t){if(!t)return;if(this._destroyLayoutPanel(),!document.getElementById("boxes-layout-panel-css")){const p=document.createElement("style");p.id="boxes-layout-panel-css",p.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(p)}this._layoutPanelTarget=t,t.innerHTML="";const i=document.createElement("div");i.className="blp-panel";const a=document.createElement("div");a.className="blp-algo-row";const u=document.createElement("label");u.textContent="Algorithm";const c=document.createElement("select");this.getAvailableLayouts().forEach(({name:p,label:g})=>{const w=document.createElement("option");w.value=p,w.textContent=g,c.appendChild(w)}),c.value=this._lastLayout.name,a.appendChild(u),a.appendChild(c),i.appendChild(a);const l=document.createElement("div");l.className="blp-params",i.appendChild(l);const h=document.createElement("button");h.className="blp-run-btn",h.textContent="▶ Apply Layout",i.appendChild(h),t.appendChild(i);const v=p=>{const g=this.getLayoutParams(p),w=p===this._lastLayout.name?this._lastLayout.options:{};l.innerHTML="",g.forEach(_=>{const E=document.createElement("div");E.className="blp-row";const k=document.createElement("label");k.textContent=_.label,E.appendChild(k);let I;_.type==="boolean"?(I=document.createElement("input"),I.type="checkbox",I.checked=_.name in w?w[_.name]:_.default):_.type==="select"?(I=document.createElement("select"),_.options.forEach(C=>{const P=document.createElement("option");P.value=C,P.textContent=C,I.appendChild(P)}),I.value=_.name in w?w[_.name]:_.default):(I=document.createElement("input"),I.type="number",_.min!==void 0&&(I.min=_.min),_.max!==void 0&&(I.max=_.max),_.step!==void 0&&(I.step=_.step),I.value=_.name in w?w[_.name]:_.default),I.dataset.param=_.name,E.appendChild(I),l.appendChild(E)})};v(this._lastLayout.name),this._layoutPanelRenderParams=v,c.addEventListener("change",()=>v(c.value)),h.addEventListener("click",()=>{const p=c.value,g=this.getLayoutParams(p),w={};g.forEach(_=>{const E=l.querySelector(`[data-param="${CSS.escape(_.name)}"]`);if(E)if(_.type==="boolean")w[_.name]=E.checked;else if(_.type==="number"){const k=parseFloat(E.value);!isNaN(k)&&!(k===0&&(_.name==="rows"||_.name==="cols"||_.name==="radius"))&&(w[_.name]=k)}else w[_.name]=E.value}),this.runLayout({name:p,...w})}),this._layoutPanelAlgoSel=c,this._layoutPanelParamsDiv=l}_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}}const j2e={"owl-ontology":{name:"Ontology",description:"Template with OWL and SKOS meta-types styling (CMap Ontology edition)",context:{owl:"http://www.w3.org/2002/07/owl#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",skos:"http://www.w3.org/2004/02/skos/core#",sh:"http://www.w3.org/ns/shacl#","rdfs:subClassOf":{"@type":"@id"},"rdfs:domain":{"@type":"@id"},"rdfs:range":{"@type":"@id"},"rdfs:subPropertyOf":{"@type":"@id"},"rdfs:seeAlso":{"@type":"@id"},"rdfs:isDefinedBy":{"@type":"@id"},"owl:equivalentClass":{"@type":"@id"},"owl:equivalentProperty":{"@type":"@id"},"owl:inverseOf":{"@type":"@id"},"owl:onProperty":{"@type":"@id"},"owl:allValuesFrom":{"@type":"@id"},"owl:someValuesFrom":{"@type":"@id"},"owl:imports":{"@type":"@id"},"skos:broader":{"@type":"@id"},"skos:narrower":{"@type":"@id"},"skos:related":{"@type":"@id"},"skos:broadMatch":{"@type":"@id"},"skos:narrowMatch":{"@type":"@id"},"skos:exactMatch":{"@type":"@id"},"skos:closeMatch":{"@type":"@id"},"sh:path":{"@type":"@id"},"sh:node":{"@type":"@id"},"sh:qualifiedValueShape":{"@type":"@id"},"sh:property":{"@type":"@id"},"sh:class":{"@type":"@id"},"sh:datatype":{"@type":"@id"}},nodeTypes:[{id:"owl:Class",label:"Class",data:{"@type":"owl:Class","@id":"","skos:definition":""},color:"#E6F3FF",borderColor:"#2471A3",shape:"roundrectangle"},{id:"default",label:"Instance",data:{"@type":"","@id":""},color:"#FFFFFF",borderColor:"#666666",shape:"ellipse"},{id:"skos:Concept",label:"Concept",data:{"@type":"skos:Concept","@id":"","skos:definition":""},color:"#E6F3FF",borderColor:"#2471A3",shape:"roundrectangle"},{id:"owl:Ontology",label:"Ontology",data:{"@type":"owl:Ontology","@id":""},color:"#FFFACD",borderColor:"#B8860B",shape:"roundrectangle"}],edgeTypes:[{id:"rdfs:subClassOf",label:"are",data:{"@id":"rdfs:subClassOf"},color:"#555555",lineStyle:"solid"},{id:"rdf:type",label:"a",data:{"@id":"rdf:type"},color:"#8E44AD",lineStyle:"solid"},{id:"skos:related",label:"related",data:{"@id":"skos:related"},color:"#666666",lineStyle:"solid"},{id:"skos:broader",label:"broader",data:{"@id":"skos:broader"},color:"#777777",lineStyle:"solid"},{id:"skos:narrower",label:"narrower",data:{"@id":"skos:narrower"},color:"#777777",lineStyle:"solid"},{id:"owl:ObjectProperty",label:"ObjectProperty",data:{"@type":"owl:ObjectProperty"},color:"#2471A3",lineStyle:"dashed",source_property:"rdfs:domain",target_property:"rdfs:range"},{id:"owl:DatatypeProperty",label:"DatatypeProperty",data:{"@type":"owl:DatatypeProperty"},color:"#1E8449",lineStyle:"solid",source_property:"rdfs:domain",target_property:"rdfs:range"},{id:"QualifiedPropertyShape",label:"Qualified Property Shape",data:{"@type":"sh:PropertyShape","sh:path":"","sh:qualifiedMinCount":0},color:"#2471A3",lineStyle:"dashed",target_property:"sh:qualifiedValueShape",reverse_source_property:"sh:property"},{id:"PropertyShape",label:"Property Shape",data:{"@type":"sh:PropertyShape","sh:path":""},color:"#2471A3",lineStyle:"dashed",target_property:"sh:node",reverse_source_property:"sh:property"}],elements:{nodes:[],edges:[]},style:[{selector:"node",style:{shape:"ellipse","background-color":"#FFFFFF","border-width":2,"border-color":"#666666",width:"label",height:"label",padding:"8px","text-valign":"center","text-halign":"center","font-size":"13px",color:"#000000","min-width":"60px"}},{selector:'node[\\@type = "owl:Ontology"]',style:{shape:"roundrectangle","background-color":"#FFFACD","border-width":1,"border-color":"#B8860B","font-weight":"bold",color:"#000000"}},{selector:'node[\\@type = "owl:Class"]',style:{shape:"roundrectangle","background-color":"#E6F3FF","border-width":1,"border-color":"#2471A3","font-size":"14px","font-weight":"bold",color:"#154360"}},{selector:'node[\\@type = "rdfs:Class"]',style:{shape:"roundrectangle","background-color":"#E6F3FF","border-width":1,"border-color":"#2471A3","font-size":"14px","font-weight":"bold",color:"#154360"}},{selector:"edge",style:{label:"data(label)","line-color":"#666666","target-arrow-color":"#666666","target-arrow-shape":"triangle","curve-style":"bezier","font-size":"11px","text-background-color":"#FFFFFF","text-background-opacity":.8,"text-background-padding":"2px",width:1.5}},{selector:'edge[\\@type = "owl:ObjectProperty"]',style:{"line-color":"#2471A3","target-arrow-color":"#2471A3",width:2}},{selector:'edge[\\@type = "owl:DatatypeProperty"]',style:{"line-color":"#1E8449","target-arrow-color":"#1E8449","line-style":"dashed",width:1.5}},{selector:'edge[\\@id = "rdfs:subClassOf"]',style:{"line-color":"#555555","target-arrow-color":"#555555","target-arrow-shape":"triangle",width:2}},{selector:'edge[\\@id = "rdf:type"]',style:{"line-color":"#884EA0","target-arrow-color":"#884EA0","line-style":"dotted",width:1.5}}]},arrows:{name:"Arrows",description:"Basic graph template similar to Arrows (Neo4j)",nodeTypes:[{id:"default",label:"Node",data:{},color:"#6FB1FC",borderColor:"#3A7CC5",shape:"ellipse"}],edgeTypes:[{id:"default",label:"RELATES_TO",data:{},color:"#6FB1FC",lineStyle:"solid"}],elements:{nodes:[],edges:[]},style:[{selector:"node",style:{"background-color":"#6FB1FC",shape:"ellipse",width:"80px",height:"80px","border-width":3,"border-color":"#3A7CC5",color:"#000000","font-size":"13px","text-valign":"center","text-halign":"center"}},{selector:"edge",style:{label:"data(label)","line-color":"#9DB8D2","target-arrow-color":"#9DB8D2","target-arrow-shape":"triangle",width:2,"curve-style":"bezier","font-size":"11px","text-background-color":"#FFFFFF","text-background-opacity":.8,"text-background-padding":"2px"}}]},blank:{name:"Blank",description:"Empty graph with default styling",nodeTypes:[{id:"default",label:"Node",data:{},color:"#CCCCCC",borderColor:"#888888",shape:"rectangle"}],edgeTypes:[{id:"default",label:"edge",data:{},color:"#666666",lineStyle:"solid"}],elements:{nodes:[],edges:[]},style:[]}},GX="http://www.w3.org/1999/02/22-rdf-syntax-ns#",HX="http://www.w3.org/2000/01/rdf-schema#",kp="http://www.w3.org/2001/XMLSchema#",Fd=GX+"type",$b=HX+"label",$d={rdf:GX,rdfs:HX,xsd:kp},X2=new Set(["id","source","target","parent","_style","_classes","label"]);function Fa(r,t){if(!r||typeof r!="string"||r.startsWith("http://")||r.startsWith("https://")||r.startsWith("urn:")||r.startsWith("_:"))return r;const i=r.indexOf(":");if(i===-1){const l=t["@vocab"];return l&&typeof l=="string"?l+r:r}const a=r.slice(0,i),u=r.slice(i+1),c={...$d,...t};return c[a]!==void 0?c[a]+u:r}function iu(r,t){if(!r||typeof r!="string"||r.startsWith("_:"))return r;const i={...$d,...t};let a=null,u=0;for(const[c,l]of Object.entries(i))if(!c.startsWith("@")&&typeof l=="string"&&r.startsWith(l)&&l.length>u){const h=r.slice(l.length);h&&/^[A-Za-z_\u00C0-\uFFFF][A-Za-z0-9_.\-\u00B7-\uFFFF]*$/.test(h)&&(a=c,u=l.length)}return a!==null?`${a}:${r.slice(u)}`:r}class B2e{constructor(t){this.s=t,this.i=0,this.prefixes={...$d},this.base="",this.triples=[],this._bn=0}parse(){for(;this.i<this.s.length&&(this._ws(),!(this.i>=this.s.length));){const t=this.s[this.i];if(t==="#"){this._skipLine();continue}if(t==="@"){this.i++;const i=this._readName().toLowerCase();if(this._ws(),i==="prefix"){const a=this._readPrefixLabel();this._ws();const u=this._readIRIRef();this._ws(),this._consumeChar("."),this.prefixes[a]=u}else i==="base"&&(this.base=this._readIRIRef(),this._ws(),this._consumeChar("."));continue}if(/[A-Za-z]/.test(t)){const i=this._peekKeyword().toUpperCase();if(i==="PREFIX"){this._skipKeyword(),this._ws();const a=this._readPrefixLabel();this._ws();const u=this._readIRIRef();this.prefixes[a]=u;continue}if(i==="BASE"){this._skipKeyword(),this._ws(),this.base=this._readIRIRef();continue}}this._parseTripleSet()}return{prefixes:this.prefixes,triples:this.triples}}_ws(){for(;this.i<this.s.length;){const t=this.s[this.i];if(t===" "||t===" "||t==="\r"||t===`
507
+ `){this.i++;continue}if(t==="#"){this._skipLine();continue}break}}_skipLine(){for(;this.i<this.s.length&&this.s[this.i]!==`
508
+ `;)this.i++}_readName(){let t="";for(;this.i<this.s.length&&/[A-Za-z0-9_\-]/.test(this.s[this.i]);)t+=this.s[this.i++];return t}_peekKeyword(){let t=this.i,i="";for(;t<this.s.length&&/[A-Za-z]/.test(this.s[t]);)i+=this.s[t++];return i}_skipKeyword(){for(;this.i<this.s.length&&/[A-Za-z]/.test(this.s[this.i]);)this.i++}_readPrefixLabel(){let t="";for(;this.i<this.s.length&&this.s[this.i]!==":";)t+=this.s[this.i++];return this.i++,t.trim()}_readIRIRef(){if(this._ws(),this.s[this.i]!=="<")throw new Error(`Expected '<' at pos ${this.i}: "${this.s.slice(this.i,this.i+20)}"`);this.i++;let t="";for(;this.i<this.s.length&&this.s[this.i]!==">";)this.s[this.i]==="\\"?(this.i++,t+=this.s[this.i++]):t+=this.s[this.i++];if(this.i++,this.base&&!t.includes("://"))try{return new URL(t,this.base).href}catch{}return t}_consumeChar(t){this.i<this.s.length&&this.s[this.i]===t&&this.i++}_parseTripleSet(){const t=this._parseTerm(!0);if(t===null){for(;this.i<this.s.length&&this.s[this.i]!==".";)this.i++;this._consumeChar(".");return}this._ws(),this._parsePredicateObjectList(t),this._ws(),this._consumeChar(".")}_parseTerm(t=!1){if(this._ws(),this.i>=this.s.length)return null;const i=this.s[this.i];if(i==="<")return this._readIRIRef();if(i==="_"&&this.s[this.i+1]===":"){this.i+=2;let a="";for(;this.i<this.s.length&&/[A-Za-z0-9_.\-]/.test(this.s[this.i]);)a+=this.s[this.i++];return"_:"+a}if(i==="["){this.i++;const a="_:b"+ ++this._bn;return this._ws(),this.s[this.i]!=="]"&&(this._parsePredicateObjectList(a),this._ws()),this._consumeChar("]"),a}return i==='"'||i==="'"?this._parseStringLiteral():/[0-9]/.test(i)||(i==="+"||i==="-")&&/[0-9]/.test(this.s[this.i+1]||"")?this._parseNumericLiteral():this.s.startsWith("true",this.i)&&!/[A-Za-z0-9_]/.test(this.s[this.i+4]||"")?(this.i+=4,{value:"true",datatype:kp+"boolean"}):this.s.startsWith("false",this.i)&&!/[A-Za-z0-9_]/.test(this.s[this.i+5]||"")?(this.i+=5,{value:"false",datatype:kp+"boolean"}):i==="a"&&!/[A-Za-z0-9_:.]/.test(this.s[this.i+1]||"")?(this.i++,Fd):/[A-Za-z_\u00C0-\uFFFF]/.test(i)||i===":"?this._parsePrefixedName():null}_parsePrefixedName(){let t="";for(;this.i<this.s.length&&/[A-Za-z0-9_\-.\u00B7\u00C0-\uFFFF]/.test(this.s[this.i])&&this.s[this.i]!==":";)t+=this.s[this.i++];if(this.i>=this.s.length||this.s[this.i]!==":")return t||null;for(t+=this.s[this.i++];this.i<this.s.length&&/[A-Za-z0-9_\-.\u00B7\u00C0-\uFFFF]/.test(this.s[this.i]);)t+=this.s[this.i++];const i=t.indexOf(":"),a=t.slice(0,i),u=t.slice(i+1),c=this.prefixes[a];return c!==void 0?c+u:t}_parseStringLiteral(){const t=this.s[this.i];this.i++;let i="";if(this.s[this.i]===t&&this.s[this.i+1]===t)for(this.i+=2;this.i<this.s.length;){if(this.s[this.i]===t&&this.s[this.i+1]===t&&this.s[this.i+2]===t){this.i+=3;break}i+=this.s[this.i]==="\\"?this._parseEscape():this.s[this.i++]}else{for(;this.i<this.s.length&&this.s[this.i]!==t&&this.s[this.i]!==`
509
+ `;)i+=this.s[this.i]==="\\"?this._parseEscape():this.s[this.i++];this._consumeChar(t)}if(this.s[this.i]==="@"){this.i++;let a="";for(;this.i<this.s.length&&/[A-Za-z0-9\-]/.test(this.s[this.i]);)a+=this.s[this.i++];return{value:i,language:a}}if(this.s[this.i]==="^"&&this.s[this.i+1]==="^"){this.i+=2;const a=this._parseTerm();return{value:i,datatype:typeof a=="string"?a:String(a)}}return{value:i}}_parseEscape(){this.i++;const t=this.s[this.i++];switch(t){case"n":return`
510
+ `;case"t":return" ";case"r":return"\r";case"\\":return"\\";case'"':return'"';case"'":return"'";case"u":{const i=this.s.slice(this.i,this.i+4);return this.i+=4,String.fromCharCode(parseInt(i,16))}case"U":{const i=this.s.slice(this.i,this.i+8);return this.i+=8,String.fromCodePoint(parseInt(i,16))}default:return t}}_parseNumericLiteral(){let t="";for((this.s[this.i]==="+"||this.s[this.i]==="-")&&(t+=this.s[this.i++]);this.i<this.s.length&&/[0-9]/.test(this.s[this.i]);)t+=this.s[this.i++];if(this.s[this.i]==="."&&/[0-9]/.test(this.s[this.i+1]||""))for(t+=this.s[this.i++];this.i<this.s.length&&/[0-9]/.test(this.s[this.i]);)t+=this.s[this.i++];if(this.s[this.i]==="e"||this.s[this.i]==="E"){for(t+=this.s[this.i++],(this.s[this.i]==="+"||this.s[this.i]==="-")&&(t+=this.s[this.i++]);this.i<this.s.length&&/[0-9]/.test(this.s[this.i]);)t+=this.s[this.i++];return{value:t,datatype:kp+"double"}}return{value:t,datatype:t.includes(".")?kp+"decimal":kp+"integer"}}_parsePredicateObjectList(t){for(;this._ws(),!(this.i>=this.s.length);){const i=this.s[this.i];if(i==="."||i==="]")break;if(i===";"){this.i++,this._ws();continue}const a=this._parseTerm();if(a===null)break;if(this._ws(),this._parseObjectList(t,a),this._ws(),this.s[this.i]===";"){this.i++;continue}break}}_parseObjectList(t,i){for(;;){this._ws();const a=this._parseTerm();if(a===null)break;if(this.triples.push([t,i,a]),this._ws(),this.s[this.i]===","){this.i++;continue}break}}}function q2e(r){return new B2e(r).parse()}function f3(r,t){if(r==null)return'""';if(typeof r=="object"){const a=String(r.value).replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r");if(r.language)return`"${a}"@${r.language}`;if(r.datatype&&r.datatype!==kp+"string"){const u=iu(r.datatype,t),c=u!==r.datatype?u:`<${r.datatype}>`;return`"${a}"^^${c}`}return`"${a}"`}if(r.startsWith("_:"))return r;if(r===Fd)return"a";const i=iu(r,t);return i===r?`<${r}>`:i}function F2e(r,t){let i="";t["@base"]&&typeof t["@base"]=="string"&&(i+=`@base <${t["@base"]}> .
511
+ `);for(const[a,u]of Object.entries(t))a.startsWith("@")||typeof u=="string"&&(i+=`@prefix ${a}: <${u}> .
512
+ `);i+=`
513
+ `;for(const[a,u]of r){const c=[...u.entries()].filter(([,h])=>h.length>0);if(c.length===0)continue;const l=f3(a,t);i+=l,c.forEach(([h,v],p)=>{const g=f3(h,t),w=v.map(_=>f3(_,t)).join(" , ");p===0?i+=` ${g} ${w}`:i+=` ;
514
+ ${g} ${w}`}),i+=` .
515
+
516
+ `}return i}function J2(r,t){if(typeof r!="string")return{value:String(r)};if(!r)return{value:""};if(r.startsWith("http://")||r.startsWith("https://")||r.startsWith("urn:")||r.startsWith("_:"))return r;const i=r.indexOf(":");if(i>0){const a=r.slice(0,i),u={...$d,...t};if(u[a]!==void 0)return u[a]+r.slice(i+1)}return{value:r}}function zX(r,t,i){if(!r["@type"])return null;const a=Fa(r["@type"],i),u=t.filter(h=>{var v;return((v=h.data)==null?void 0:v["@type"])&&Fa(h.data["@type"],i)===a});if(u.length===0)return null;if(u.length===1)return u[0];let c=u[0],l=-1;for(const h of u){const v=Object.keys(h.data||{}).filter(p=>p in r).length;v>l&&(l=v,c=h)}return c}function VX(r,{context:t={},edgeTypes:i=[]}={}){var g,w;const a={...t},u=((g=r.elements)==null?void 0:g.nodes)||[],c=((w=r.elements)==null?void 0:w.edges)||[],l=new Map;for(const{data:_}of u){const E=_["@id"]||_.id||"";l.set(_.id,Fa(E,a)||E)}const h=new Map,v=(_,E,k)=>{h.has(_)||h.set(_,new Map);const I=h.get(_);I.has(E)||I.set(E,[]),I.get(E).push(k)};for(const{data:_}of u){const E=_["@id"]||_.id||"",k=Fa(E,a)||E;let I=!1;for(const[C,P]of Object.entries(_)){if(X2.has(C)||C==="@id"||P===""||P===null||P===void 0)continue;if(C==="@type"){v(k,Fd,J2(P,a));continue}const A=Fa(C,a);A===$b&&(I=!0),v(k,A,J2(P,a))}!I&&_.label&&v(k,$b,{value:String(_.label)})}const p=[];for(const{data:_}of c){const E=l.get(_.source),k=l.get(_.target);if(!(!E||!k))if(_["@type"]){const I=zX(_,i,a),C=_["@id"]||"",P=C.startsWith("_:")?C:C?Fa(C,a):`_:e${_.id}`,A=new Set(X2);I!=null&&I.source_property&&A.add(I.source_property),I!=null&&I.target_property&&A.add(I.target_property),I!=null&&I.reverse_source_property&&A.add(I.reverse_source_property);let L=!1;for(const[O,M]of Object.entries(_)){if(A.has(O)||O==="@id"||M===""||M===null||M===void 0)continue;if(O==="@type"){v(P,Fd,J2(M,a));continue}const B=Fa(O,a);B===$b&&(L=!0),v(P,B,J2(M,a))}!L&&_.label&&v(P,$b,{value:String(_.label)}),I!=null&&I.source_property&&v(P,Fa(I.source_property,a),E),I!=null&&I.target_property&&v(P,Fa(I.target_property,a),k),I!=null&&I.reverse_source_property&&p.push([E,Fa(I.reverse_source_property,a),P])}else _["@id"]&&v(E,Fa(_["@id"],a),k)}for(const[_,E,k]of p)v(_,E,k);return F2e(h,a)}function UX(r,t,i,a=new Set){const u={"@id":iu(r,i)};for(const[c,l]of t){if(!l.length)continue;if(c===Fd){const p=l[0];typeof p=="string"&&(u["@type"]=iu(p,i));continue}if(a.has(c))continue;const h=l[0],v=iu(c,i);u[v]=typeof h=="object"?h.value:iu(h,i)}return u}function h3(r,t,{context:i={},edgeTypes:a=[],nodeTypes:u=[]}={}){var A;({...t});const c={...$d,...t,...i},l=new Map;for(const[L,O,M]of r){l.has(L)||l.set(L,new Map);const B=l.get(L);B.has(O)||B.set(O,[]),B.get(O).push(M)}const h=new Map;for(const[L,O]of l)for(const[M,B]of O){h.has(M)||h.set(M,new Map);const F=h.get(M);for(const q of B)typeof q=="string"&&(F.has(q)||F.set(q,[]),F.get(q).push(L))}const v=[],p=[],g=new Set,w=new Map,_=new Set,E=(L,O)=>{w.has(L)||w.set(L,new Set),w.get(L).add(O)},k=a.filter(L=>{var O;return(O=L.data)==null?void 0:O["@type"]});for(const L of k){const O=Fa(L.data["@type"],c),M=L.target_property?Fa(L.target_property,c):null,B=L.source_property?Fa(L.source_property,c):null,F=L.reverse_source_property?Fa(L.reverse_source_property,c):null;for(const[q,$]of l){if(g.has(q)||!($.get(Fd)||[]).some(pe=>typeof pe=="string"&&pe===O)||k.filter(pe=>Fa(pe.data["@type"],c)===O).length>1&&M&&!$.has(M))continue;let V=null;B?V=($.get(B)||[]).find(ge=>typeof ge=="string")||null:F&&(V=(((A=h.get(F))==null?void 0:A.get(q))||[])[0]||null);let U=null;if(M&&(U=($.get(M)||[]).find(ge=>typeof ge=="string")||null),!V||!U||V.startsWith("_:")||U.startsWith("_:"))continue;g.add(q);const G=new Set([Fd]);B&&G.add(B),M&&G.add(M);const X=UX(q,$,c,G),ne=$.get($b)||[],ae=ne.length?typeof ne[0]=="object"?ne[0].value:String(ne[0]):L.label||"",oe=iu(V,c),le=iu(U,c);p.push({data:{id:`e_${X["@id"]||q}`,source:oe,target:le,label:ae,...X}}),F&&E(V,F)}}const I=a.filter(L=>{var O,M;return((O=L.data)==null?void 0:O["@id"])&&!((M=L.data)!=null&&M["@type"])});for(const L of I){const O=Fa(L.data["@id"],c);for(const[M,B]of l){const F=B.get(O)||[];for(const q of F){if(typeof q!="string"||!l.has(q))continue;const $=iu(M,c),Y=iu(q,c);p.push({data:{id:`e_${L.id}_${$}_${Y}`,source:$,target:Y,label:L.label||"","@id":iu(O,c)}}),M.startsWith("_:")&&_.add(M),q.startsWith("_:")&&_.add(q),E(M,O)}}}for(const[L,O]of l){if(typeof L!="string"||g.has(L)||L.startsWith("_:")&&!_.has(L))continue;const M=w.get(L)||new Set,B=new Set([Fd,...M]),F=UX(L,O,c,B),q=O.get($b)||[],$=q.length?typeof q[0]=="object"?q[0].value:String(q[0]):iu(L,c),Y=iu(L,c);v.push({data:{id:Y,label:$,...F}})}const C=new Set(v.map(L=>L.data.id));for(const L of _){const O=iu(L,c);C.has(O)||(v.push({data:{id:O,label:O,"@id":O}}),C.add(O))}const P={...t,...i};for(const L of Object.keys($d))(!i[L]&&!t[L]||t[L]===$d[L]&&!i[L])&&delete P[L];return{elements:{nodes:v,edges:p},context:P,version:"1.0.0"}}function YX(r,t={}){const{prefixes:i,triples:a}=q2e(r);return h3(a,i,t)}const $2e={name:"RDF / Turtle",extension:".ttl",mimeType:"text/turtle",export(r,t={}){var a;const i=r.exportGraph();return VX(i,{context:r.context||{},edgeTypes:((a=r.getEdgeTypes)==null?void 0:a.call(r))||[],...t})}},G2e={name:"RDF / Turtle",extensions:[".ttl",".turtle",".n3"],mimeTypes:["text/turtle","text/n3","application/x-turtle"],import(r,t={}){return YX(r,t)}};var vh={},Q2={};Q2.byteLength=V2e,Q2.toByteArray=Y2e,Q2.fromByteArray=X2e;for(var Zl=[],lc=[],H2e=typeof Uint8Array<"u"?Uint8Array:Array,v3="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Gb=0,z2e=v3.length;Gb<z2e;++Gb)Zl[Gb]=v3[Gb],lc[v3.charCodeAt(Gb)]=Gb;lc[45]=62,lc[95]=63;function WX(r){var t=r.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=r.indexOf("=");i===-1&&(i=t);var a=i===t?0:4-i%4;return[i,a]}function V2e(r){var t=WX(r),i=t[0],a=t[1];return(i+a)*3/4-a}function U2e(r,t,i){return(t+i)*3/4-i}function Y2e(r){var t,i=WX(r),a=i[0],u=i[1],c=new H2e(U2e(r,a,u)),l=0,h=u>0?a-4:a,v;for(v=0;v<h;v+=4)t=lc[r.charCodeAt(v)]<<18|lc[r.charCodeAt(v+1)]<<12|lc[r.charCodeAt(v+2)]<<6|lc[r.charCodeAt(v+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=t&255;return u===2&&(t=lc[r.charCodeAt(v)]<<2|lc[r.charCodeAt(v+1)]>>4,c[l++]=t&255),u===1&&(t=lc[r.charCodeAt(v)]<<10|lc[r.charCodeAt(v+1)]<<4|lc[r.charCodeAt(v+2)]>>2,c[l++]=t>>8&255,c[l++]=t&255),c}function W2e(r){return Zl[r>>18&63]+Zl[r>>12&63]+Zl[r>>6&63]+Zl[r&63]}function K2e(r,t,i){for(var a,u=[],c=t;c<i;c+=3)a=(r[c]<<16&16711680)+(r[c+1]<<8&65280)+(r[c+2]&255),u.push(W2e(a));return u.join("")}function X2e(r){for(var t,i=r.length,a=i%3,u=[],c=16383,l=0,h=i-a;l<h;l+=c)u.push(K2e(r,l,l+c>h?h:l+c));return a===1?(t=r[i-1],u.push(Zl[t>>2]+Zl[t<<4&63]+"==")):a===2&&(t=(r[i-2]<<8)+r[i-1],u.push(Zl[t>>10]+Zl[t>>4&63]+Zl[t<<2&63]+"=")),u.join("")}var p3={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */p3.read=function(r,t,i,a,u){var c,l,h=u*8-a-1,v=(1<<h)-1,p=v>>1,g=-7,w=i?u-1:0,_=i?-1:1,E=r[t+w];for(w+=_,c=E&(1<<-g)-1,E>>=-g,g+=h;g>0;c=c*256+r[t+w],w+=_,g-=8);for(l=c&(1<<-g)-1,c>>=-g,g+=a;g>0;l=l*256+r[t+w],w+=_,g-=8);if(c===0)c=1-p;else{if(c===v)return l?NaN:(E?-1:1)*(1/0);l=l+Math.pow(2,a),c=c-p}return(E?-1:1)*l*Math.pow(2,c-a)},p3.write=function(r,t,i,a,u,c){var l,h,v,p=c*8-u-1,g=(1<<p)-1,w=g>>1,_=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=a?0:c-1,k=a?1:-1,I=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(h=isNaN(t)?1:0,l=g):(l=Math.floor(Math.log(t)/Math.LN2),t*(v=Math.pow(2,-l))<1&&(l--,v*=2),l+w>=1?t+=_/v:t+=_*Math.pow(2,1-w),t*v>=2&&(l++,v/=2),l+w>=g?(h=0,l=g):l+w>=1?(h=(t*v-1)*Math.pow(2,u),l=l+w):(h=t*Math.pow(2,w-1)*Math.pow(2,u),l=0));u>=8;r[i+E]=h&255,E+=k,h/=256,u-=8);for(l=l<<u|h,p+=u;p>0;r[i+E]=l&255,E+=k,l/=256,p-=8);r[i+E-k]|=I*128};/*!
517
+ * The buffer module from node.js, for the browser.
518
+ *
519
+ * @author Feross Aboukhadijeh <https://feross.org>
520
+ * @license MIT
521
+ */(function(r){const t=Q2,i=p3,a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=h,r.SlowBuffer=A,r.INSPECT_MAX_BYTES=50;const u=2147483647;r.kMaxLength=u,h.TYPED_ARRAY_SUPPORT=c(),!h.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 c(){try{const he=new Uint8Array(1),J={foo:function(){return 42}};return Object.setPrototypeOf(J,Uint8Array.prototype),Object.setPrototypeOf(he,J),he.foo()===42}catch{return!1}}Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}});function l(he){if(he>u)throw new RangeError('The value "'+he+'" is invalid for option "size"');const J=new Uint8Array(he);return Object.setPrototypeOf(J,h.prototype),J}function h(he,J,te){if(typeof he=="number"){if(typeof J=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(he)}return v(he,J,te)}h.poolSize=8192;function v(he,J,te){if(typeof he=="string")return _(he,J);if(ArrayBuffer.isView(he))return k(he);if(he==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof he);if(ut(he,ArrayBuffer)||he&&ut(he.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ut(he,SharedArrayBuffer)||he&&ut(he.buffer,SharedArrayBuffer)))return I(he,J,te);if(typeof he=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const be=he.valueOf&&he.valueOf();if(be!=null&&be!==he)return h.from(be,J,te);const Le=C(he);if(Le)return Le;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof he[Symbol.toPrimitive]=="function")return h.from(he[Symbol.toPrimitive]("string"),J,te);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof he)}h.from=function(he,J,te){return v(he,J,te)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array);function p(he){if(typeof he!="number")throw new TypeError('"size" argument must be of type number');if(he<0)throw new RangeError('The value "'+he+'" is invalid for option "size"')}function g(he,J,te){return p(he),he<=0?l(he):J!==void 0?typeof te=="string"?l(he).fill(J,te):l(he).fill(J):l(he)}h.alloc=function(he,J,te){return g(he,J,te)};function w(he){return p(he),l(he<0?0:P(he)|0)}h.allocUnsafe=function(he){return w(he)},h.allocUnsafeSlow=function(he){return w(he)};function _(he,J){if((typeof J!="string"||J==="")&&(J="utf8"),!h.isEncoding(J))throw new TypeError("Unknown encoding: "+J);const te=L(he,J)|0;let be=l(te);const Le=be.write(he,J);return Le!==te&&(be=be.slice(0,Le)),be}function E(he){const J=he.length<0?0:P(he.length)|0,te=l(J);for(let be=0;be<J;be+=1)te[be]=he[be]&255;return te}function k(he){if(ut(he,Uint8Array)){const J=new Uint8Array(he);return I(J.buffer,J.byteOffset,J.byteLength)}return E(he)}function I(he,J,te){if(J<0||he.byteLength<J)throw new RangeError('"offset" is outside of buffer bounds');if(he.byteLength<J+(te||0))throw new RangeError('"length" is outside of buffer bounds');let be;return J===void 0&&te===void 0?be=new Uint8Array(he):te===void 0?be=new Uint8Array(he,J):be=new Uint8Array(he,J,te),Object.setPrototypeOf(be,h.prototype),be}function C(he){if(h.isBuffer(he)){const J=P(he.length)|0,te=l(J);return te.length===0||he.copy(te,0,0,J),te}if(he.length!==void 0)return typeof he.length!="number"||$t(he.length)?l(0):E(he);if(he.type==="Buffer"&&Array.isArray(he.data))return E(he.data)}function P(he){if(he>=u)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u.toString(16)+" bytes");return he|0}function A(he){return+he!=he&&(he=0),h.alloc(+he)}h.isBuffer=function(J){return J!=null&&J._isBuffer===!0&&J!==h.prototype},h.compare=function(J,te){if(ut(J,Uint8Array)&&(J=h.from(J,J.offset,J.byteLength)),ut(te,Uint8Array)&&(te=h.from(te,te.offset,te.byteLength)),!h.isBuffer(J)||!h.isBuffer(te))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(J===te)return 0;let be=J.length,Le=te.length;for(let Te=0,ue=Math.min(be,Le);Te<ue;++Te)if(J[Te]!==te[Te]){be=J[Te],Le=te[Te];break}return be<Le?-1:Le<be?1:0},h.isEncoding=function(J){switch(String(J).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}},h.concat=function(J,te){if(!Array.isArray(J))throw new TypeError('"list" argument must be an Array of Buffers');if(J.length===0)return h.alloc(0);let be;if(te===void 0)for(te=0,be=0;be<J.length;++be)te+=J[be].length;const Le=h.allocUnsafe(te);let Te=0;for(be=0;be<J.length;++be){let ue=J[be];if(ut(ue,Uint8Array))Te+ue.length>Le.length?(h.isBuffer(ue)||(ue=h.from(ue)),ue.copy(Le,Te)):Uint8Array.prototype.set.call(Le,ue,Te);else if(h.isBuffer(ue))ue.copy(Le,Te);else throw new TypeError('"list" argument must be an Array of Buffers');Te+=ue.length}return Le};function L(he,J){if(h.isBuffer(he))return he.length;if(ArrayBuffer.isView(he)||ut(he,ArrayBuffer))return he.byteLength;if(typeof he!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof he);const te=he.length,be=arguments.length>2&&arguments[2]===!0;if(!be&&te===0)return 0;let Le=!1;for(;;)switch(J){case"ascii":case"latin1":case"binary":return te;case"utf8":case"utf-8":return Me(he).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te*2;case"hex":return te>>>1;case"base64":return pt(he).length;default:if(Le)return be?-1:Me(he).length;J=(""+J).toLowerCase(),Le=!0}}h.byteLength=L;function O(he,J,te){let be=!1;if((J===void 0||J<0)&&(J=0),J>this.length||((te===void 0||te>this.length)&&(te=this.length),te<=0)||(te>>>=0,J>>>=0,te<=J))return"";for(he||(he="utf8");;)switch(he){case"hex":return pe(this,J,te);case"utf8":case"utf-8":return X(this,J,te);case"ascii":return oe(this,J,te);case"latin1":case"binary":return le(this,J,te);case"base64":return G(this,J,te);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ge(this,J,te);default:if(be)throw new TypeError("Unknown encoding: "+he);he=(he+"").toLowerCase(),be=!0}}h.prototype._isBuffer=!0;function M(he,J,te){const be=he[J];he[J]=he[te],he[te]=be}h.prototype.swap16=function(){const J=this.length;if(J%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let te=0;te<J;te+=2)M(this,te,te+1);return this},h.prototype.swap32=function(){const J=this.length;if(J%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let te=0;te<J;te+=4)M(this,te,te+3),M(this,te+1,te+2);return this},h.prototype.swap64=function(){const J=this.length;if(J%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let te=0;te<J;te+=8)M(this,te,te+7),M(this,te+1,te+6),M(this,te+2,te+5),M(this,te+3,te+4);return this},h.prototype.toString=function(){const J=this.length;return J===0?"":arguments.length===0?X(this,0,J):O.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(J){if(!h.isBuffer(J))throw new TypeError("Argument must be a Buffer");return this===J?!0:h.compare(this,J)===0},h.prototype.inspect=function(){let J="";const te=r.INSPECT_MAX_BYTES;return J=this.toString("hex",0,te).replace(/(.{2})/g,"$1 ").trim(),this.length>te&&(J+=" ... "),"<Buffer "+J+">"},a&&(h.prototype[a]=h.prototype.inspect),h.prototype.compare=function(J,te,be,Le,Te){if(ut(J,Uint8Array)&&(J=h.from(J,J.offset,J.byteLength)),!h.isBuffer(J))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof J);if(te===void 0&&(te=0),be===void 0&&(be=J?J.length:0),Le===void 0&&(Le=0),Te===void 0&&(Te=this.length),te<0||be>J.length||Le<0||Te>this.length)throw new RangeError("out of range index");if(Le>=Te&&te>=be)return 0;if(Le>=Te)return-1;if(te>=be)return 1;if(te>>>=0,be>>>=0,Le>>>=0,Te>>>=0,this===J)return 0;let ue=Te-Le,$e=be-te;const Ze=Math.min(ue,$e),et=this.slice(Le,Te),it=J.slice(te,be);for(let St=0;St<Ze;++St)if(et[St]!==it[St]){ue=et[St],$e=it[St];break}return ue<$e?-1:$e<ue?1:0};function B(he,J,te,be,Le){if(he.length===0)return-1;if(typeof te=="string"?(be=te,te=0):te>2147483647?te=2147483647:te<-2147483648&&(te=-2147483648),te=+te,$t(te)&&(te=Le?0:he.length-1),te<0&&(te=he.length+te),te>=he.length){if(Le)return-1;te=he.length-1}else if(te<0)if(Le)te=0;else return-1;if(typeof J=="string"&&(J=h.from(J,be)),h.isBuffer(J))return J.length===0?-1:F(he,J,te,be,Le);if(typeof J=="number")return J=J&255,typeof Uint8Array.prototype.indexOf=="function"?Le?Uint8Array.prototype.indexOf.call(he,J,te):Uint8Array.prototype.lastIndexOf.call(he,J,te):F(he,[J],te,be,Le);throw new TypeError("val must be string, number or Buffer")}function F(he,J,te,be,Le){let Te=1,ue=he.length,$e=J.length;if(be!==void 0&&(be=String(be).toLowerCase(),be==="ucs2"||be==="ucs-2"||be==="utf16le"||be==="utf-16le")){if(he.length<2||J.length<2)return-1;Te=2,ue/=2,$e/=2,te/=2}function Ze(it,St){return Te===1?it[St]:it.readUInt16BE(St*Te)}let et;if(Le){let it=-1;for(et=te;et<ue;et++)if(Ze(he,et)===Ze(J,it===-1?0:et-it)){if(it===-1&&(it=et),et-it+1===$e)return it*Te}else it!==-1&&(et-=et-it),it=-1}else for(te+$e>ue&&(te=ue-$e),et=te;et>=0;et--){let it=!0;for(let St=0;St<$e;St++)if(Ze(he,et+St)!==Ze(J,St)){it=!1;break}if(it)return et}return-1}h.prototype.includes=function(J,te,be){return this.indexOf(J,te,be)!==-1},h.prototype.indexOf=function(J,te,be){return B(this,J,te,be,!0)},h.prototype.lastIndexOf=function(J,te,be){return B(this,J,te,be,!1)};function q(he,J,te,be){te=Number(te)||0;const Le=he.length-te;be?(be=Number(be),be>Le&&(be=Le)):be=Le;const Te=J.length;be>Te/2&&(be=Te/2);let ue;for(ue=0;ue<be;++ue){const $e=parseInt(J.substr(ue*2,2),16);if($t($e))return ue;he[te+ue]=$e}return ue}function $(he,J,te,be){return Lt(Me(J,he.length-te),he,te,be)}function Y(he,J,te,be){return Lt(ot(J),he,te,be)}function V(he,J,te,be){return Lt(pt(J),he,te,be)}function U(he,J,te,be){return Lt(dt(J,he.length-te),he,te,be)}h.prototype.write=function(J,te,be,Le){if(te===void 0)Le="utf8",be=this.length,te=0;else if(be===void 0&&typeof te=="string")Le=te,be=this.length,te=0;else if(isFinite(te))te=te>>>0,isFinite(be)?(be=be>>>0,Le===void 0&&(Le="utf8")):(Le=be,be=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Te=this.length-te;if((be===void 0||be>Te)&&(be=Te),J.length>0&&(be<0||te<0)||te>this.length)throw new RangeError("Attempt to write outside buffer bounds");Le||(Le="utf8");let ue=!1;for(;;)switch(Le){case"hex":return q(this,J,te,be);case"utf8":case"utf-8":return $(this,J,te,be);case"ascii":case"latin1":case"binary":return Y(this,J,te,be);case"base64":return V(this,J,te,be);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,J,te,be);default:if(ue)throw new TypeError("Unknown encoding: "+Le);Le=(""+Le).toLowerCase(),ue=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function G(he,J,te){return J===0&&te===he.length?t.fromByteArray(he):t.fromByteArray(he.slice(J,te))}function X(he,J,te){te=Math.min(he.length,te);const be=[];let Le=J;for(;Le<te;){const Te=he[Le];let ue=null,$e=Te>239?4:Te>223?3:Te>191?2:1;if(Le+$e<=te){let Ze,et,it,St;switch($e){case 1:Te<128&&(ue=Te);break;case 2:Ze=he[Le+1],(Ze&192)===128&&(St=(Te&31)<<6|Ze&63,St>127&&(ue=St));break;case 3:Ze=he[Le+1],et=he[Le+2],(Ze&192)===128&&(et&192)===128&&(St=(Te&15)<<12|(Ze&63)<<6|et&63,St>2047&&(St<55296||St>57343)&&(ue=St));break;case 4:Ze=he[Le+1],et=he[Le+2],it=he[Le+3],(Ze&192)===128&&(et&192)===128&&(it&192)===128&&(St=(Te&15)<<18|(Ze&63)<<12|(et&63)<<6|it&63,St>65535&&St<1114112&&(ue=St))}}ue===null?(ue=65533,$e=1):ue>65535&&(ue-=65536,be.push(ue>>>10&1023|55296),ue=56320|ue&1023),be.push(ue),Le+=$e}return ae(be)}const ne=4096;function ae(he){const J=he.length;if(J<=ne)return String.fromCharCode.apply(String,he);let te="",be=0;for(;be<J;)te+=String.fromCharCode.apply(String,he.slice(be,be+=ne));return te}function oe(he,J,te){let be="";te=Math.min(he.length,te);for(let Le=J;Le<te;++Le)be+=String.fromCharCode(he[Le]&127);return be}function le(he,J,te){let be="";te=Math.min(he.length,te);for(let Le=J;Le<te;++Le)be+=String.fromCharCode(he[Le]);return be}function pe(he,J,te){const be=he.length;(!J||J<0)&&(J=0),(!te||te<0||te>be)&&(te=be);let Le="";for(let Te=J;Te<te;++Te)Le+=Yt[he[Te]];return Le}function ge(he,J,te){const be=he.slice(J,te);let Le="";for(let Te=0;Te<be.length-1;Te+=2)Le+=String.fromCharCode(be[Te]+be[Te+1]*256);return Le}h.prototype.slice=function(J,te){const be=this.length;J=~~J,te=te===void 0?be:~~te,J<0?(J+=be,J<0&&(J=0)):J>be&&(J=be),te<0?(te+=be,te<0&&(te=0)):te>be&&(te=be),te<J&&(te=J);const Le=this.subarray(J,te);return Object.setPrototypeOf(Le,h.prototype),Le};function de(he,J,te){if(he%1!==0||he<0)throw new RangeError("offset is not uint");if(he+J>te)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(J,te,be){J=J>>>0,te=te>>>0,be||de(J,te,this.length);let Le=this[J],Te=1,ue=0;for(;++ue<te&&(Te*=256);)Le+=this[J+ue]*Te;return Le},h.prototype.readUintBE=h.prototype.readUIntBE=function(J,te,be){J=J>>>0,te=te>>>0,be||de(J,te,this.length);let Le=this[J+--te],Te=1;for(;te>0&&(Te*=256);)Le+=this[J+--te]*Te;return Le},h.prototype.readUint8=h.prototype.readUInt8=function(J,te){return J=J>>>0,te||de(J,1,this.length),this[J]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(J,te){return J=J>>>0,te||de(J,2,this.length),this[J]|this[J+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(J,te){return J=J>>>0,te||de(J,2,this.length),this[J]<<8|this[J+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(J,te){return J=J>>>0,te||de(J,4,this.length),(this[J]|this[J+1]<<8|this[J+2]<<16)+this[J+3]*16777216},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(J,te){return J=J>>>0,te||de(J,4,this.length),this[J]*16777216+(this[J+1]<<16|this[J+2]<<8|this[J+3])},h.prototype.readBigUInt64LE=fn(function(J){J=J>>>0,ve(J,"offset");const te=this[J],be=this[J+7];(te===void 0||be===void 0)&&ke(J,this.length-8);const Le=te+this[++J]*2**8+this[++J]*2**16+this[++J]*2**24,Te=this[++J]+this[++J]*2**8+this[++J]*2**16+be*2**24;return BigInt(Le)+(BigInt(Te)<<BigInt(32))}),h.prototype.readBigUInt64BE=fn(function(J){J=J>>>0,ve(J,"offset");const te=this[J],be=this[J+7];(te===void 0||be===void 0)&&ke(J,this.length-8);const Le=te*2**24+this[++J]*2**16+this[++J]*2**8+this[++J],Te=this[++J]*2**24+this[++J]*2**16+this[++J]*2**8+be;return(BigInt(Le)<<BigInt(32))+BigInt(Te)}),h.prototype.readIntLE=function(J,te,be){J=J>>>0,te=te>>>0,be||de(J,te,this.length);let Le=this[J],Te=1,ue=0;for(;++ue<te&&(Te*=256);)Le+=this[J+ue]*Te;return Te*=128,Le>=Te&&(Le-=Math.pow(2,8*te)),Le},h.prototype.readIntBE=function(J,te,be){J=J>>>0,te=te>>>0,be||de(J,te,this.length);let Le=te,Te=1,ue=this[J+--Le];for(;Le>0&&(Te*=256);)ue+=this[J+--Le]*Te;return Te*=128,ue>=Te&&(ue-=Math.pow(2,8*te)),ue},h.prototype.readInt8=function(J,te){return J=J>>>0,te||de(J,1,this.length),this[J]&128?(255-this[J]+1)*-1:this[J]},h.prototype.readInt16LE=function(J,te){J=J>>>0,te||de(J,2,this.length);const be=this[J]|this[J+1]<<8;return be&32768?be|4294901760:be},h.prototype.readInt16BE=function(J,te){J=J>>>0,te||de(J,2,this.length);const be=this[J+1]|this[J]<<8;return be&32768?be|4294901760:be},h.prototype.readInt32LE=function(J,te){return J=J>>>0,te||de(J,4,this.length),this[J]|this[J+1]<<8|this[J+2]<<16|this[J+3]<<24},h.prototype.readInt32BE=function(J,te){return J=J>>>0,te||de(J,4,this.length),this[J]<<24|this[J+1]<<16|this[J+2]<<8|this[J+3]},h.prototype.readBigInt64LE=fn(function(J){J=J>>>0,ve(J,"offset");const te=this[J],be=this[J+7];(te===void 0||be===void 0)&&ke(J,this.length-8);const Le=this[J+4]+this[J+5]*2**8+this[J+6]*2**16+(be<<24);return(BigInt(Le)<<BigInt(32))+BigInt(te+this[++J]*2**8+this[++J]*2**16+this[++J]*2**24)}),h.prototype.readBigInt64BE=fn(function(J){J=J>>>0,ve(J,"offset");const te=this[J],be=this[J+7];(te===void 0||be===void 0)&&ke(J,this.length-8);const Le=(te<<24)+this[++J]*2**16+this[++J]*2**8+this[++J];return(BigInt(Le)<<BigInt(32))+BigInt(this[++J]*2**24+this[++J]*2**16+this[++J]*2**8+be)}),h.prototype.readFloatLE=function(J,te){return J=J>>>0,te||de(J,4,this.length),i.read(this,J,!0,23,4)},h.prototype.readFloatBE=function(J,te){return J=J>>>0,te||de(J,4,this.length),i.read(this,J,!1,23,4)},h.prototype.readDoubleLE=function(J,te){return J=J>>>0,te||de(J,8,this.length),i.read(this,J,!0,52,8)},h.prototype.readDoubleBE=function(J,te){return J=J>>>0,te||de(J,8,this.length),i.read(this,J,!1,52,8)};function Se(he,J,te,be,Le,Te){if(!h.isBuffer(he))throw new TypeError('"buffer" argument must be a Buffer instance');if(J>Le||J<Te)throw new RangeError('"value" argument is out of bounds');if(te+be>he.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(J,te,be,Le){if(J=+J,te=te>>>0,be=be>>>0,!Le){const $e=Math.pow(2,8*be)-1;Se(this,J,te,be,$e,0)}let Te=1,ue=0;for(this[te]=J&255;++ue<be&&(Te*=256);)this[te+ue]=J/Te&255;return te+be},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(J,te,be,Le){if(J=+J,te=te>>>0,be=be>>>0,!Le){const $e=Math.pow(2,8*be)-1;Se(this,J,te,be,$e,0)}let Te=be-1,ue=1;for(this[te+Te]=J&255;--Te>=0&&(ue*=256);)this[te+Te]=J/ue&255;return te+be},h.prototype.writeUint8=h.prototype.writeUInt8=function(J,te,be){return J=+J,te=te>>>0,be||Se(this,J,te,1,255,0),this[te]=J&255,te+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(J,te,be){return J=+J,te=te>>>0,be||Se(this,J,te,2,65535,0),this[te]=J&255,this[te+1]=J>>>8,te+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(J,te,be){return J=+J,te=te>>>0,be||Se(this,J,te,2,65535,0),this[te]=J>>>8,this[te+1]=J&255,te+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(J,te,be){return J=+J,te=te>>>0,be||Se(this,J,te,4,4294967295,0),this[te+3]=J>>>24,this[te+2]=J>>>16,this[te+1]=J>>>8,this[te]=J&255,te+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(J,te,be){return J=+J,te=te>>>0,be||Se(this,J,te,4,4294967295,0),this[te]=J>>>24,this[te+1]=J>>>16,this[te+2]=J>>>8,this[te+3]=J&255,te+4};function Ne(he,J,te,be,Le){Be(J,be,Le,he,te,7);let Te=Number(J&BigInt(4294967295));he[te++]=Te,Te=Te>>8,he[te++]=Te,Te=Te>>8,he[te++]=Te,Te=Te>>8,he[te++]=Te;let ue=Number(J>>BigInt(32)&BigInt(4294967295));return he[te++]=ue,ue=ue>>8,he[te++]=ue,ue=ue>>8,he[te++]=ue,ue=ue>>8,he[te++]=ue,te}function ye(he,J,te,be,Le){Be(J,be,Le,he,te,7);let Te=Number(J&BigInt(4294967295));he[te+7]=Te,Te=Te>>8,he[te+6]=Te,Te=Te>>8,he[te+5]=Te,Te=Te>>8,he[te+4]=Te;let ue=Number(J>>BigInt(32)&BigInt(4294967295));return he[te+3]=ue,ue=ue>>8,he[te+2]=ue,ue=ue>>8,he[te+1]=ue,ue=ue>>8,he[te]=ue,te+8}h.prototype.writeBigUInt64LE=fn(function(J,te=0){return Ne(this,J,te,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=fn(function(J,te=0){return ye(this,J,te,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(J,te,be,Le){if(J=+J,te=te>>>0,!Le){const Ze=Math.pow(2,8*be-1);Se(this,J,te,be,Ze-1,-Ze)}let Te=0,ue=1,$e=0;for(this[te]=J&255;++Te<be&&(ue*=256);)J<0&&$e===0&&this[te+Te-1]!==0&&($e=1),this[te+Te]=(J/ue>>0)-$e&255;return te+be},h.prototype.writeIntBE=function(J,te,be,Le){if(J=+J,te=te>>>0,!Le){const Ze=Math.pow(2,8*be-1);Se(this,J,te,be,Ze-1,-Ze)}let Te=be-1,ue=1,$e=0;for(this[te+Te]=J&255;--Te>=0&&(ue*=256);)J<0&&$e===0&&this[te+Te+1]!==0&&($e=1),this[te+Te]=(J/ue>>0)-$e&255;return te+be},h.prototype.writeInt8=function(J,te,be){return J=+J,te=te>>>0,be||Se(this,J,te,1,127,-128),J<0&&(J=255+J+1),this[te]=J&255,te+1},h.prototype.writeInt16LE=function(J,te,be){return J=+J,te=te>>>0,be||Se(this,J,te,2,32767,-32768),this[te]=J&255,this[te+1]=J>>>8,te+2},h.prototype.writeInt16BE=function(J,te,be){return J=+J,te=te>>>0,be||Se(this,J,te,2,32767,-32768),this[te]=J>>>8,this[te+1]=J&255,te+2},h.prototype.writeInt32LE=function(J,te,be){return J=+J,te=te>>>0,be||Se(this,J,te,4,2147483647,-2147483648),this[te]=J&255,this[te+1]=J>>>8,this[te+2]=J>>>16,this[te+3]=J>>>24,te+4},h.prototype.writeInt32BE=function(J,te,be){return J=+J,te=te>>>0,be||Se(this,J,te,4,2147483647,-2147483648),J<0&&(J=4294967295+J+1),this[te]=J>>>24,this[te+1]=J>>>16,this[te+2]=J>>>8,this[te+3]=J&255,te+4},h.prototype.writeBigInt64LE=fn(function(J,te=0){return Ne(this,J,te,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=fn(function(J,te=0){return ye(this,J,te,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function we(he,J,te,be,Le,Te){if(te+be>he.length)throw new RangeError("Index out of range");if(te<0)throw new RangeError("Index out of range")}function Pe(he,J,te,be,Le){return J=+J,te=te>>>0,Le||we(he,J,te,4),i.write(he,J,te,be,23,4),te+4}h.prototype.writeFloatLE=function(J,te,be){return Pe(this,J,te,!0,be)},h.prototype.writeFloatBE=function(J,te,be){return Pe(this,J,te,!1,be)};function Fe(he,J,te,be,Le){return J=+J,te=te>>>0,Le||we(he,J,te,8),i.write(he,J,te,be,52,8),te+8}h.prototype.writeDoubleLE=function(J,te,be){return Fe(this,J,te,!0,be)},h.prototype.writeDoubleBE=function(J,te,be){return Fe(this,J,te,!1,be)},h.prototype.copy=function(J,te,be,Le){if(!h.isBuffer(J))throw new TypeError("argument should be a Buffer");if(be||(be=0),!Le&&Le!==0&&(Le=this.length),te>=J.length&&(te=J.length),te||(te=0),Le>0&&Le<be&&(Le=be),Le===be||J.length===0||this.length===0)return 0;if(te<0)throw new RangeError("targetStart out of bounds");if(be<0||be>=this.length)throw new RangeError("Index out of range");if(Le<0)throw new RangeError("sourceEnd out of bounds");Le>this.length&&(Le=this.length),J.length-te<Le-be&&(Le=J.length-te+be);const Te=Le-be;return this===J&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(te,be,Le):Uint8Array.prototype.set.call(J,this.subarray(be,Le),te),Te},h.prototype.fill=function(J,te,be,Le){if(typeof J=="string"){if(typeof te=="string"?(Le=te,te=0,be=this.length):typeof be=="string"&&(Le=be,be=this.length),Le!==void 0&&typeof Le!="string")throw new TypeError("encoding must be a string");if(typeof Le=="string"&&!h.isEncoding(Le))throw new TypeError("Unknown encoding: "+Le);if(J.length===1){const ue=J.charCodeAt(0);(Le==="utf8"&&ue<128||Le==="latin1")&&(J=ue)}}else typeof J=="number"?J=J&255:typeof J=="boolean"&&(J=Number(J));if(te<0||this.length<te||this.length<be)throw new RangeError("Out of range index");if(be<=te)return this;te=te>>>0,be=be===void 0?this.length:be>>>0,J||(J=0);let Te;if(typeof J=="number")for(Te=te;Te<be;++Te)this[Te]=J;else{const ue=h.isBuffer(J)?J:h.from(J,Le),$e=ue.length;if($e===0)throw new TypeError('The value "'+J+'" is invalid for argument "value"');for(Te=0;Te<be-te;++Te)this[Te+te]=ue[Te%$e]}return this};const Ue={};function He(he,J,te){Ue[he]=class extends te{constructor(){super(),Object.defineProperty(this,"message",{value:J.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${he}]`,this.stack,delete this.name}get code(){return he}set code(Le){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Le,writable:!0})}toString(){return`${this.name} [${he}]: ${this.message}`}}}He("ERR_BUFFER_OUT_OF_BOUNDS",function(he){return he?`${he} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),He("ERR_INVALID_ARG_TYPE",function(he,J){return`The "${he}" argument must be of type number. Received type ${typeof J}`},TypeError),He("ERR_OUT_OF_RANGE",function(he,J,te){let be=`The value of "${he}" is out of range.`,Le=te;return Number.isInteger(te)&&Math.abs(te)>2**32?Le=De(String(te)):typeof te=="bigint"&&(Le=String(te),(te>BigInt(2)**BigInt(32)||te<-(BigInt(2)**BigInt(32)))&&(Le=De(Le)),Le+="n"),be+=` It must be ${J}. Received ${Le}`,be},RangeError);function De(he){let J="",te=he.length;const be=he[0]==="-"?1:0;for(;te>=be+4;te-=3)J=`_${he.slice(te-3,te)}${J}`;return`${he.slice(0,te)}${J}`}function Ce(he,J,te){ve(J,"offset"),(he[J]===void 0||he[J+te]===void 0)&&ke(J,he.length-(te+1))}function Be(he,J,te,be,Le,Te){if(he>te||he<J){const ue=typeof J=="bigint"?"n":"";let $e;throw J===0||J===BigInt(0)?$e=`>= 0${ue} and < 2${ue} ** ${(Te+1)*8}${ue}`:$e=`>= -(2${ue} ** ${(Te+1)*8-1}${ue}) and < 2 ** ${(Te+1)*8-1}${ue}`,new Ue.ERR_OUT_OF_RANGE("value",$e,he)}Ce(be,Le,Te)}function ve(he,J){if(typeof he!="number")throw new Ue.ERR_INVALID_ARG_TYPE(J,"number",he)}function ke(he,J,te){throw Math.floor(he)!==he?(ve(he,te),new Ue.ERR_OUT_OF_RANGE("offset","an integer",he)):J<0?new Ue.ERR_BUFFER_OUT_OF_BOUNDS:new Ue.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${J}`,he)}const je=/[^+/0-9A-Za-z-_]/g;function qe(he){if(he=he.split("=")[0],he=he.trim().replace(je,""),he.length<2)return"";for(;he.length%4!==0;)he=he+"=";return he}function Me(he,J){J=J||1/0;let te;const be=he.length;let Le=null;const Te=[];for(let ue=0;ue<be;++ue){if(te=he.charCodeAt(ue),te>55295&&te<57344){if(!Le){if(te>56319){(J-=3)>-1&&Te.push(239,191,189);continue}else if(ue+1===be){(J-=3)>-1&&Te.push(239,191,189);continue}Le=te;continue}if(te<56320){(J-=3)>-1&&Te.push(239,191,189),Le=te;continue}te=(Le-55296<<10|te-56320)+65536}else Le&&(J-=3)>-1&&Te.push(239,191,189);if(Le=null,te<128){if((J-=1)<0)break;Te.push(te)}else if(te<2048){if((J-=2)<0)break;Te.push(te>>6|192,te&63|128)}else if(te<65536){if((J-=3)<0)break;Te.push(te>>12|224,te>>6&63|128,te&63|128)}else if(te<1114112){if((J-=4)<0)break;Te.push(te>>18|240,te>>12&63|128,te>>6&63|128,te&63|128)}else throw new Error("Invalid code point")}return Te}function ot(he){const J=[];for(let te=0;te<he.length;++te)J.push(he.charCodeAt(te)&255);return J}function dt(he,J){let te,be,Le;const Te=[];for(let ue=0;ue<he.length&&!((J-=2)<0);++ue)te=he.charCodeAt(ue),be=te>>8,Le=te%256,Te.push(Le),Te.push(be);return Te}function pt(he){return t.toByteArray(qe(he))}function Lt(he,J,te,be){let Le;for(Le=0;Le<be&&!(Le+te>=J.length||Le>=he.length);++Le)J[Le+te]=he[Le];return Le}function ut(he,J){return he instanceof J||he!=null&&he.constructor!=null&&he.constructor.name!=null&&he.constructor.name===J.name}function $t(he){return he!==he}const Yt=function(){const he="0123456789abcdef",J=new Array(256);for(let te=0;te<16;++te){const be=te*16;for(let Le=0;Le<16;++Le)J[be+Le]=he[te]+he[Le]}return J}();function fn(he){return typeof BigInt>"u"?Yn:he}function Yn(){throw new Error("BigInt not supported")}})(vh);const Sp="http://www.w3.org/1999/02/22-rdf-syntax-ns#",rm="http://www.w3.org/2001/XMLSchema#",Z2="http://www.w3.org/2000/10/swap/",Eo={xsd:{decimal:`${rm}decimal`,boolean:`${rm}boolean`,double:`${rm}double`,integer:`${rm}integer`,string:`${rm}string`},rdf:{type:`${Sp}type`,nil:`${Sp}nil`,first:`${Sp}first`,rest:`${Sp}rest`,langString:`${Sp}langString`,dirLangString:`${Sp}dirLangString`,reifies:`${Sp}reifies`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${Z2}reify#forSome`,forAll:`${Z2}reify#forAll`},log:{implies:`${Z2}log#implies`,isImpliedBy:`${Z2}log#isImpliedBy`}},{xsd:eE}=Eo,J2e=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g,KX={"\\":"\\","'":"'",'"':'"',n:`
522
+ `,r:"\r",t:" ",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},Q2e=/[\x00-\x20<>\\"\{\}\|\^\`]/,Z2e={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_dircode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},eEe=/$0^/;class tEe{constructor(t){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]*)?$/,t=t||{},this._isImpliedBy=t.isImpliedBy,this._lineMode=!!t.lineMode){this._n3Mode=!1;for(const i in this)!(i in Z2e)&&this[i]instanceof RegExp&&(this[i]=eEe)}else this._n3Mode=t.n3!==!1;this.comments=!!t.comments,this._literalClosingPos=0}_tokenizeToEnd(t,i){let a=this._input,u=a.length;for(;;){let h,v;for(;h=this._newline.exec(a);)this.comments&&(v=this._comment.exec(h[0]))&&c("comment",v[1],"",this._line,h[0].length),a=a.substr(h[0].length,a.length),u=a.length,this._line++;if(!h&&(h=this._whitespace.exec(a))&&(a=a.substr(h[0].length,a.length)),this._endOfFile.test(a))return i&&(this.comments&&(v=this._comment.exec(a))&&c("comment",v[1],"",this._line,a.length),a=null,c("eof","","",this._line,0)),this._input=a;const p=this._line,g=a[0];let w="",_="",E="",k=null,I=0,C=!1;switch(g){case"^":if(a.length<3)break;if(a[1]==="^"){if(this._previousMarker="^^",a=a.substr(2),a[0]!=="<"){C=!0;break}}else{this._n3Mode&&(I=1,w="^");break}case"<":if(k=this._unescapedIri.exec(a))w="IRI",_=k[1];else if(k=this._iri.exec(a)){if(_=this._unescape(k[1]),_===null||Q2e.test(_))return l(this);w="IRI"}else a.length>2&&a[1]==="<"&&a[2]==="("?(w="<<(",I=3):!this._lineMode&&a.length>(i?1:2)&&a[1]==="<"?(w="<<",I=2):this._n3Mode&&a.length>1&&a[1]==="="&&(I=2,this._isImpliedBy?(w="abbreviation",_="<"):(w="inverse",_=">"));break;case">":a.length>1&&a[1]===">"&&(w=">>",I=2);break;case"_":((k=this._blank.exec(a))||i&&(k=this._blank.exec(`${a} `)))&&(w="blank",E="_",_=k[1]);break;case'"':if(k=this._simpleQuotedString.exec(a))_=k[1];else if({value:_,matchLength:I}=this._parseLiteral(a),_===null)return l(this);(k!==null||I!==0)&&(w="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(k=this._simpleApostropheString.exec(a))_=k[1];else if({value:_,matchLength:I}=this._parseLiteral(a),_===null)return l(this);(k!==null||I!==0)&&(w="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(k=this._variable.exec(a))&&(w="var",_=k[0]);break;case"@":this._previousMarker==="literal"&&(k=this._langcode.exec(a))&&k[1]!=="version"?(w="langcode",_=k[1]):(k=this._atKeyword.exec(a))&&(w=k[0]);break;case".":if(a.length===1?i:a[1]<"0"||a[1]>"9"){w=".",I=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(a[1]==="-"){this._previousMarker==="langcode"&&(k=this._dircode.exec(a))&&(w="dircode",I=2,_=k[1]||k[2],I=_.length+2);break}(k=this._number.exec(a)||i&&(k=this._number.exec(`${a} `)))&&(w="literal",_=k[0],E=typeof k[1]=="string"?eE.double:typeof k[2]=="string"?eE.decimal:eE.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":case"V":case"v":(k=this._keyword.exec(a))?w=k[0].toUpperCase():C=!0;break;case"f":case"t":(k=this._boolean.exec(a))?(w="literal",_=k[0],E=eE.boolean):C=!0;break;case"a":(k=this._shortPredicates.exec(a))?(w="abbreviation",_="a"):C=!0;break;case"=":this._n3Mode&&a.length>1&&(w="abbreviation",a[1]!==">"?(I=1,_="="):(I=2,_=">"));break;case"!":if(!this._n3Mode)break;case")":if(!i&&(a.length===1||a.length===2&&a[1]===">"))break;if(a.length>2&&a[1]===">"&&a[2]===">"){w=")>>",I=3;break}case",":case";":case"[":case"]":case"(":case"}":case"~":this._lineMode||(I=1,w=g);break;case"{":!this._lineMode&&a.length>=2&&(a[1]==="|"?(w="{|",I=2):(w=g,I=1));break;case"|":a.length>=2&&a[1]==="}"&&(w="|}",I=2);break;default:C=!0}if(C&&((this._previousMarker==="@prefix"||this._previousMarker==="PREFIX")&&(k=this._prefix.exec(a))?(w="prefix",_=k[1]||""):((k=this._prefixed.exec(a))||i&&(k=this._prefixed.exec(`${a} `)))&&(w="prefixed",E=k[1]||"",_=this._unescape(k[2]))),this._previousMarker==="^^")switch(w){case"prefixed":w="type";break;case"IRI":w="typeIRI";break;default:w=""}if(!w)return i||!/^'''|^"""/.test(a)&&/\n|\r/.test(a)?l(this):this._input=a;const P=I||k[0].length,A=c(w,_,E,p,P);this.previousToken=A,this._previousMarker=w,a=a.substr(P,a.length)}function c(h,v,p,g,w){const _=a?u-a.length:u,E=_+w,k={type:h,value:v,prefix:p,line:g,start:_,end:E};return t(null,k),k}function l(h){t(h._syntaxError(/^\S*/.exec(a)[0]))}}_unescape(t){let i=!1;const a=t.replace(J2e,(u,c,l,h)=>{if(typeof c=="string")return String.fromCharCode(Number.parseInt(c,16));if(typeof l=="string"){let v=Number.parseInt(l,16);return v<=65535?String.fromCharCode(Number.parseInt(l,16)):String.fromCharCode(55296+((v-=65536)>>10),56320+(v&1023))}return h in KX?KX[h]:(i=!0,"")});return i?null:a}_parseLiteral(t){if(t.length>=3){const i=t.match(/^(?:"""|"|'''|'|)/)[0],a=i.length;let u=Math.max(this._literalClosingPos,a);for(;(u=t.indexOf(i,u))>0;){let c=0;for(;t[u-c-1]==="\\";)c++;if(c%2===0){const l=t.substring(a,u),h=l.split(/\r\n|\r|\n/).length-1,v=u+a;if(a===1&&h!==0||a===3&&this._lineMode)break;return this._line+=h,{value:this._unescape(l),matchLength:v}}u++}this._literalClosingPos=t.length-a+1}return{value:"",matchLength:0}}_syntaxError(t){this._input=null;const i=new Error(`Unexpected "${t}" on line ${this._line}.`);return i.context={token:void 0,line:this._line,previousToken:this.previousToken},i}_readStartingBom(t){return t.startsWith("\uFEFF")?t.substr(1):t}tokenize(t,i){if(this._line=1,typeof t=="string")if(this._input=this._readStartingBom(t),typeof i=="function")queueMicrotask(()=>this._tokenizeToEnd(i,!0));else{const a=[];let u;if(this._tokenizeToEnd((c,l)=>c?u=c:a.push(l),!0),u)throw u;return a}else this._pendingBuffer=null,typeof t.setEncoding=="function"&&t.setEncoding("utf8"),t.on("data",a=>{this._input!==null&&a.length!==0&&(this._pendingBuffer&&(a=vh.Buffer.concat([this._pendingBuffer,a]),this._pendingBuffer=null),a[a.length-1]&128?this._pendingBuffer=a:(typeof this._input>"u"?this._input=this._readStartingBom(typeof a=="string"?a:a.toString()):this._input+=a,this._tokenizeToEnd(i,!1)))}),t.on("end",()=>{typeof this._input=="string"&&this._tokenizeToEnd(i,!0)}),t.on("error",i)}}const{rdf:XX,xsd:Hb}=Eo;let im,nEe=0;const g3={namedNode:ZX,blankNode:eJ,variable:nJ,literal:tJ,defaultGraph:sEe,quad:b3,triple:b3,fromTerm:am,fromQuad:rJ};class ef{constructor(t){this.id=t}get value(){return this.id}equals(t){return t instanceof ef?this.id===t.id:!!t&&this.termType===t.termType&&this.value===t.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class JX extends ef{get termType(){return"NamedNode"}}class zb extends ef{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const t=this.id;let i=t.lastIndexOf('"')+1;const a=t.lastIndexOf("--");return i<t.length&&t[i++]==="@"?(a>i?t.substr(0,a):t).substr(i).toLowerCase():""}get direction(){const t=this.id,i=t.lastIndexOf('"'),a=t.lastIndexOf("--");return a>i&&a+2<t.length?t.substr(a+2).toLowerCase():""}get datatype(){return new JX(this.datatypeString)}get datatypeString(){const t=this.id,i=t.lastIndexOf('"')+1,a=i<t.length?t[i]:"";return a==="^"?t.substr(i+2):a!=="@"?Hb.string:t.indexOf("--",i)>0?XX.dirLangString:XX.langString}equals(t){return t instanceof zb?this.id===t.id:!!t&&!!t.datatype&&this.termType===t.termType&&this.value===t.value&&this.language===t.language&&(this.direction===t.direction||this.direction===""&&!t.direction)&&this.datatype.value===t.datatype.value}toJSON(){return{termType:this.termType,value:this.value,language:this.language,direction:this.direction,datatype:{termType:"NamedNode",value:this.datatypeString}}}}class rEe extends ef{constructor(t){super(`_:${t}`)}get termType(){return"BlankNode"}get value(){return this.id.substr(2)}}class iEe extends ef{constructor(t){super(`?${t}`)}get termType(){return"Variable"}get value(){return this.id.substr(1)}}class aEe extends ef{constructor(){return super(""),im||this}get termType(){return"DefaultGraph"}equals(t){return this===t||!!t&&this.termType===t.termType}}im=new aEe;class QX extends ef{constructor(t,i,a,u){super(""),this._subject=t,this._predicate=i,this._object=a,this._graph=u||im}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(t){return!!t&&this._subject.equals(t.subject)&&this._predicate.equals(t.predicate)&&this._object.equals(t.object)&&this._graph.equals(t.graph)}}function ZX(r){return new JX(r)}function eJ(r){return new rEe(r||`n3-${nEe++}`)}function tJ(r,t){if(typeof t=="string")return new zb(`"${r}"@${t.toLowerCase()}`);if(t!==void 0&&!("termType"in t))return new zb(`"${r}"@${t.language.toLowerCase()}${t.direction?`--${t.direction.toLowerCase()}`:""}`);let i=t?t.value:"";return i===""&&(typeof r=="boolean"?i=Hb.boolean:typeof r=="number"&&(Number.isFinite(r)?i=Number.isInteger(r)?Hb.integer:Hb.double:(i=Hb.double,Number.isNaN(r)||(r=r>0?"INF":"-INF")))),i===""||i===Hb.string?new zb(`"${r}"`):new zb(`"${r}"^^${i}`)}function nJ(r){return new iEe(r)}function sEe(){return im}function b3(r,t,i,a){return new QX(r,t,i,a)}function am(r){if(r instanceof ef)return r;switch(r.termType){case"NamedNode":return ZX(r.value);case"BlankNode":return eJ(r.value);case"Variable":return nJ(r.value);case"DefaultGraph":return im;case"Literal":return tJ(r.value,r.language||r.datatype);case"Quad":return rJ(r);default:throw new Error(`Unexpected termType: ${r.termType}`)}}function rJ(r){if(r instanceof QX)return r;if(r.termType!=="Quad")throw new Error(`Unexpected termType: ${r.termType}`);return b3(am(r.subject),am(r.predicate),am(r.object),am(r.graph))}let iJ=0;class sm{constructor(t){this._contextStack=[],this._graph=null,t=t||{},this._setBase(t.baseIRI),t.factory&&aJ(this,t.factory);const i=typeof t.format=="string"?t.format.match(/\w*$/)[0].toLowerCase():"",a=/turtle/.test(i),u=/trig/.test(i),c=/triple/.test(i),l=/quad/.test(i),h=this._n3Mode=/n3/.test(i),v=c||l;(this._supportsNamedGraphs=!(a||h))||(this._readPredicateOrNamedGraph=this._readPredicate),this._supportsQuads=!(a||u||c||h),this._isImpliedBy=t.isImpliedBy,v&&(this._resolveRelativeIRI=p=>null),this._blankNodePrefix=typeof t.blankNodePrefix!="string"?"":t.blankNodePrefix.replace(/^(?!_:)/,"_:"),this._lexer=t.lexer||new tEe({lineMode:v,n3:h,isImpliedBy:this._isImpliedBy}),this._explicitQuantifiers=!!t.explicitQuantifiers,this._parseUnsupportedVersions=!!t.parseUnsupportedVersions,this._version=t.version}static _resetBlankNodePrefix(){iJ=0}_setBase(t){if(!t)this._base="",this._basePath="";else{const i=t.indexOf("#");i>=0&&(t=t.substr(0,i)),this._base=t,this._basePath=t.indexOf("/")<0?t:t.replace(/[^\/?]*(?:\?.*)?$/,""),t=t.match(/^(?:([a-z][a-z0-9+.-]*:))?(?:\/\/[^\/]*)?/i),this._baseRoot=t[0],this._baseScheme=t[1]}}_saveContext(t,i,a,u,c){const l=this._n3Mode;this._contextStack.push({type:t,subject:a,predicate:u,object:c,graph:i,inverse:l?this._inversePredicate:!1,blankPrefix:l?this._prefixes._:"",quantified:l?this._quantified:null}),l&&(this._inversePredicate=!1,this._prefixes._=this._graph?`${this._graph.value}.`:".",this._quantified=Object.create(this._quantified))}_restoreContext(t,i){const a=this._contextStack.pop();if(!a||a.type!==t)return this._error(`Unexpected ${i.type}`,i);this._subject=a.subject,this._predicate=a.predicate,this._object=a.object,this._graph=a.graph,this._n3Mode&&(this._inversePredicate=a.inverse,this._prefixes._=a.blankPrefix,this._quantified=a.quantified)}_readBeforeTopContext(t){return this._version&&!this._isValidVersion(this._version)?this._error(`Detected unsupported version as media type parameter: "${this._version}"`,t):this._readInTopContext(t)}_readInTopContext(t){switch(t.type){case"eof":return this._graph!==null?this._error("Unclosed graph",t):(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(t)}}_readEntity(t,i){let a;switch(t.type){case"IRI":case"typeIRI":const u=this._resolveIRI(t.value);if(u===null)return this._error("Invalid IRI",t);a=this._factory.namedNode(u);break;case"type":case"prefixed":const c=this._prefixes[t.prefix];if(c===void 0)return this._error(`Undefined prefix "${t.prefix}:"`,t);a=this._factory.namedNode(c+t.value);break;case"blank":a=this._factory.blankNode(this._prefixes[t.prefix]+t.value);break;case"var":a=this._factory.variable(t.value.substr(1));break;default:return this._error(`Expected entity but got ${t.type}`,t)}return!i&&this._n3Mode&&a.id in this._quantified&&(a=this._quantified[a.id]),a}_readSubject(t){switch(this._predicate=null,t.type){case"[":return this._saveContext("blank",this._graph,this._subject=this._factory.blankNode(),null,null),this._readBlankNodeHead;case"(":const i=this._contextStack;return(i.length&&i[i.length-1]).type==="<<"?this._error("Unexpected list in reified triple",t):(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",t);case"}":return this._readPunctuation(t);case"@forSome":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORSOME,this._quantifier="blankNode",this._readQuantifierList):this._error('Unexpected "@forSome"',t);case"@forAll":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORALL,this._quantifier="variable",this._readQuantifierList):this._error('Unexpected "@forAll"',t);case"literal":if(!this._n3Mode)return this._error("Unexpected literal",t);if(t.prefix.length===0)return this._literalValue=t.value,this._completeSubjectLiteral;this._subject=this._factory.literal(t.value,this._factory.namedNode(t.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",t);case"<<":return this._saveContext("<<",this._graph,null,null,null),this._graph=null,this._readSubject;default:if((this._subject=this._readEntity(t))===void 0)return;if(this._n3Mode)return this._getPathReader(this._readPredicateOrNamedGraph)}return this._readPredicateOrNamedGraph}_readPredicate(t){const i=t.type;switch(i){case"inverse":this._inversePredicate=!0;case"abbreviation":this._predicate=this.ABBREVIATIONS[t.value];break;case".":case"]":case"}":case"|}":return this._predicate===null?this._error(`Unexpected ${i}`,t):(this._subject=null,i==="]"?this._readBlankNodeTail(t):this._readPunctuation(t));case";":return this._predicate!==null?this._readPredicate:this._error("Expected predicate but got ;",t);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",t);default:if((this._predicate=this._readEntity(t))===void 0)return}return this._validAnnotation=!0,this._readObject}_readObject(t){switch(t.type){case"literal":if(t.prefix.length===0)return this._literalValue=t.value,this._readDataTypeOrLang;this._object=this._factory.literal(t.value,this._factory.namedNode(t.prefix));break;case"[":return this._saveContext("blank",this._graph,this._subject,this._predicate,this._subject=this._factory.blankNode()),this._readBlankNodeHead;case"(":const i=this._contextStack;return(i.length&&i[i.length-1]).type==="<<"?this._error("Unexpected list in reified triple",t):(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",t);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(t))===void 0)return;if(this._n3Mode)return this._getPathReader(this._getContextEndReader())}return this._getContextEndReader()}_readPredicateOrNamedGraph(t){return t.type==="{"?this._readGraph(t):this._readPredicate(t)}_readGraph(t){return t.type!=="{"?this._error(`Expected graph but got ${t.type}`,t):(this._graph=this._subject,this._subject=null,this._readSubject)}_readBlankNodeHead(t){if(t.type==="]")return this._subject=null,this._readBlankNodeTail(t);{const i=this._contextStack;return(i.length>1&&i[i.length-2]).type==="<<"?this._error("Unexpected compound blank node expression in reified triple",t):(this._predicate=null,this._readPredicate(t))}}_readBlankNodeTail(t){if(t.type!=="]")return this._readBlankNodePunctuation(t);this._subject!==null&&this._emit(this._subject,this._predicate,this._object,this._graph);const i=this._predicate===null;return this._restoreContext("blank",t),this._object!==null?this._getContextEndReader():this._predicate!==null?this._readObject:i?this._readPredicateOrNamedGraph:this._readPredicateAfterBlank}_readPredicateAfterBlank(t){switch(t.type){case".":case"}":return this._subject=null,this._readPunctuation(t);default:return this._readPredicate(t)}}_readListItem(t){let i=null,a=null,u=this._readListItem;const c=this._subject,l=this._contextStack,h=l[l.length-1];switch(t.type){case"[":this._saveContext("blank",this._graph,a=this._factory.blankNode(),this.RDF_FIRST,this._subject=i=this._factory.blankNode()),u=this._readBlankNodeHead;break;case"(":this._saveContext("list",this._graph,a=this._factory.blankNode(),this.RDF_FIRST,this.RDF_NIL),this._subject=null;break;case")":if(this._restoreContext("list",t),l.length!==0&&l[l.length-1].type==="list"&&this._emit(this._subject,this._predicate,this._object,this._graph),this._predicate===null){if(u=this._readPredicate,this._subject===this.RDF_NIL)return u}else if(u=this._getContextEndReader(),this._object===this.RDF_NIL)return u;a=this.RDF_NIL;break;case"literal":t.prefix.length===0?(this._literalValue=t.value,u=this._readListItemDataTypeOrLang):(i=this._factory.literal(t.value,this._factory.namedNode(t.prefix)),u=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",t);case"<<":this._saveContext("<<",this._graph,null,null,null),this._graph=null,u=this._readSubject;break;default:if((i=this._readEntity(t))===void 0)return}if(a===null&&(this._subject=a=this._factory.blankNode()),t.type==="<<"&&(l[l.length-1].subject=this._subject),c===null?h.predicate===null?h.subject=a:h.object=a:this._emit(c,this.RDF_REST,a,this._graph),i!==null){if(this._n3Mode&&(t.type==="IRI"||t.type==="prefixed"))return this._saveContext("item",this._graph,a,this.RDF_FIRST,i),this._subject=i,this._predicate=null,this._getPathReader(this._readListItem);this._emit(a,this.RDF_FIRST,i,this._graph)}return u}_readDataTypeOrLang(t){return this._completeObjectLiteral(t,!1)}_readListItemDataTypeOrLang(t){return this._completeObjectLiteral(t,!0)}_completeLiteral(t,i){let a=this._factory.literal(this._literalValue),u;switch(t.type){case"type":case"typeIRI":const c=this._readEntity(t);if(c===void 0)return;if(c.value===Eo.rdf.langString||c.value===Eo.rdf.dirLangString)return this._error("Detected illegal (directional) languaged-tagged string with explicit datatype",t);a=this._factory.literal(this._literalValue,c),t=null;break;case"langcode":if(t.value.split("-").some(l=>l.length>8))return this._error("Detected language tag with subtag longer than 8 characters",t);a=this._factory.literal(this._literalValue,t.value),this._literalLanguage=t.value,t=null,u=this._readDirCode.bind(this,i);break}return{token:t,literal:a,readCb:u}}_readDirCode(t,i,a){if(a.type==="dircode"){const u=this._factory.literal(this._literalValue,{language:this._literalLanguage,direction:a.value});t==="subject"?this._subject=u:this._object=u,this._literalLanguage=void 0,a=null}return t==="subject"?a===null?this._readPredicateOrNamedGraph:this._readPredicateOrNamedGraph(a):this._completeObjectLiteralPost(a,i)}_completeSubjectLiteral(t){const i=this._completeLiteral(t,"subject");return this._subject=i.literal,i.readCb?i.readCb.bind(this,!1):this._readPredicateOrNamedGraph}_completeObjectLiteral(t,i){const a=this._completeLiteral(t,"object");if(a)return this._object=a.literal,a.readCb?a.readCb.bind(this,i):this._completeObjectLiteralPost(a.token,i)}_completeObjectLiteralPost(t,i){return i&&this._emit(this._subject,this.RDF_FIRST,this._object,this._graph),t===null?this._getContextEndReader():(this._readCallback=this._getContextEndReader(),this._readCallback(t))}_readFormulaTail(t){return t.type!=="}"?this._readPunctuation(t):(this._subject!==null&&this._emit(this._subject,this._predicate,this._object,this._graph),this._restoreContext("formula",t),this._object===null?this._readPredicate:this._getContextEndReader())}_readPunctuation(t){let i,a=this._graph,u=!1;const c=this._subject,l=this._inversePredicate;switch(t.type){case"}":if(this._graph===null)return this._error("Unexpected graph closing",t);if(this._n3Mode)return this._readFormulaTail(t);this._graph=null;case".":this._subject=null,this._tripleTerm=null,i=this._contextStack.length?this._readSubject:this._readInTopContext,l&&(this._inversePredicate=!1);break;case";":i=this._readPredicate;break;case",":i=this._readObject;break;case"~":i=this._readReifierInAnnotation,u=!0;break;case"{|":this._subject=this._readTripleTerm(),this._validAnnotation=!1,u=!0,i=this._readPredicate;break;case"|}":if(!this._annotation)return this._error("Unexpected annotation syntax closing",t);if(!this._validAnnotation)return this._error("Annotation block can not be empty",t);this._subject=null,this._annotation=!1,i=this._readPunctuation;break;default:if(this._supportsQuads&&this._graph===null&&(a=this._readEntity(t))!==void 0){i=this._readQuadPunctuation;break}return this._error(`Expected punctuation to follow "${this._object.id}"`,t)}if(c!==null&&(!u||u&&!this._annotation)){const h=this._predicate,v=this._object;l?this._emit(v,h,c,a):this._emit(c,h,v,a)}return u&&(this._annotation=!0),i}_readBlankNodePunctuation(t){let i;switch(t.type){case";":i=this._readPredicate;break;case",":i=this._readObject;break;default:return this._error(`Expected punctuation to follow "${this._object.id}"`,t)}return this._emit(this._subject,this._predicate,this._object,this._graph),i}_readQuadPunctuation(t){return t.type!=="."?this._error("Expected dot to follow quad",t):this._readInTopContext}_readPrefix(t){return t.type!=="prefix"?this._error("Expected prefix to follow @prefix",t):(this._prefix=t.value,this._readPrefixIRI)}_readPrefixIRI(t){if(t.type!=="IRI")return this._error(`Expected IRI to follow prefix "${this._prefix}:"`,t);const i=this._readEntity(t);return this._prefixes[this._prefix]=i.value,this._prefixCallback(this._prefix,i),this._readDeclarationPunctuation}_readBaseIRI(t){const i=t.type==="IRI"&&this._resolveIRI(t.value);return i?(this._setBase(i),this._readDeclarationPunctuation):this._error("Expected valid IRI to follow base declaration",t)}_isValidVersion(t){return this._parseUnsupportedVersions||sm.SUPPORTED_VERSIONS.includes(t)}_readVersion(t){return t.type!=="literal"?this._error("Expected literal to follow version declaration",t):t.end-t.start!==t.value.length+2?this._error("Version declarations must use single quotes",t):(this._versionCallback(t.value),this._isValidVersion(t.value)?this._readDeclarationPunctuation:this._error(`Detected unsupported version: "${t.value}"`,t))}_readNamedGraphLabel(t){switch(t.type){case"IRI":case"blank":case"prefixed":return this._readSubject(t),this._readGraph;case"[":return this._readNamedGraphBlankLabel;default:return this._error("Invalid graph label",t)}}_readNamedGraphBlankLabel(t){return t.type!=="]"?this._error("Invalid graph label",t):(this._subject=this._factory.blankNode(),this._readGraph)}_readDeclarationPunctuation(t){return this._sparqlStyle?(this._sparqlStyle=!1,this._readInTopContext(t)):t.type!=="."?this._error("Expected declaration to end with a dot",t):this._readInTopContext}_readQuantifierList(t){let i;switch(t.type){case"IRI":case"prefixed":if((i=this._readEntity(t,!0))!==void 0)break;default:return this._error(`Unexpected ${t.type}`,t)}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,i,this.QUANTIFIERS_GRAPH)):this._quantified[i.id]=this._factory[this._quantifier](this._factory.blankNode().value),this._readQuantifierPunctuation}_readQuantifierPunctuation(t){return t.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(t))}_getPathReader(t){return this._afterPath=t,this._readPath}_readPath(t){switch(t.type){case"!":return this._readForwardPath;case"^":return this._readBackwardPath;default:const i=this._contextStack,a=i.length&&i[i.length-1];if(a&&a.type==="item"){const u=this._subject;this._restoreContext("item",t),this._emit(this._subject,this.RDF_FIRST,u,this._graph)}return this._afterPath(t)}}_readForwardPath(t){let i,a;const u=this._factory.blankNode();if((a=this._readEntity(t))!==void 0)return this._predicate===null?(i=this._subject,this._subject=u):(i=this._object,this._object=u),this._emit(i,a,u,this._graph),this._readPath}_readBackwardPath(t){const i=this._factory.blankNode();let a,u;if((a=this._readEntity(t))!==void 0)return this._predicate===null?(u=this._subject,this._subject=i):(u=this._object,this._object=i),this._emit(i,a,u,this._graph),this._readPath}_readTripleTermTail(t){if(t.type!==")>>")return this._error(`Expected )>> but got ${t.type}`,t);const i=this._factory.quad(this._subject,this._predicate,this._object,this._graph||this.DEFAULTGRAPH);return this._restoreContext("<<(",t),this._subject===null?(this._subject=i,this._readPredicate):(this._object=i,this._getContextEndReader())}_readReifiedTripleTailOrReifier(t){return t.type==="~"?this._readReifier:this._readReifiedTripleTail(t)}_readReifiedTripleTail(t){if(t.type!==">>")return this._error(`Expected >> but got ${t.type}`,t);this._tripleTerm=null;const i=this._readTripleTerm();this._restoreContext("<<",t);const a=this._contextStack,u=a.length&&a[a.length-1];return u&&u.type==="list"?(this._emit(this._subject,this.RDF_FIRST,i,this._graph),this._getContextEndReader()):this._subject===null?(this._subject=i,this._readPredicateOrReifierTripleEnd):(this._object=i,this._getContextEndReader())}_readPredicateOrReifierTripleEnd(t){return t.type==="."?(this._subject=null,this._readPunctuation(t)):this._readPredicate(t)}_readReifier(t){return this._reifier=this._readEntity(t),this._readReifiedTripleTail}_readReifierInAnnotation(t){return t.type==="IRI"||t.type==="typeIRI"||t.type==="type"||t.type==="prefixed"||t.type==="blank"||t.type==="var"?(this._reifier=this._readEntity(t),this._readPunctuation):(this._readTripleTerm(),this._subject=null,this._readPunctuation(t))}_readTripleTerm(){const t=this._contextStack,i=t.length&&t[t.length-1],a=i?i.graph:void 0,u=this._reifier||this._factory.blankNode();return this._reifier=null,this._tripleTerm=this._tripleTerm||this._factory.quad(this._subject,this._predicate,this._object),this._emit(u,this.RDF_REIFIES,this._tripleTerm,a||this.DEFAULTGRAPH),u}_getContextEndReader(){const t=this._contextStack;if(!t.length)return this._readPunctuation;switch(t[t.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(t,i,a,u){this._callback(null,this._factory.quad(t,i,a,u||this.DEFAULTGRAPH))}_error(t,i){const a=new Error(`${t} on line ${i.line}.`);a.context={token:i,line:i.line,previousToken:this._lexer.previousToken},this._callback(a),this._callback=om}_resolveIRI(t){return/^[a-z][a-z0-9+.-]*:/i.test(t)?t:this._resolveRelativeIRI(t)}_resolveRelativeIRI(t){if(!t.length)return this._base;switch(t[0]){case"#":return this._base+t;case"?":return this._base.replace(/(?:\?.*)?$/,t);case"/":return(t[1]==="/"?this._baseScheme:this._baseRoot)+this._removeDotSegments(t);default:return/^[^/:]*:/.test(t)?null:this._removeDotSegments(this._basePath+t)}}_removeDotSegments(t){if(!/(^|\/)\.\.?($|[/#?])/.test(t))return t;const i=t.length;let a="",u=-1,c=-1,l=0,h="/";for(;u<i;){switch(h){case":":if(c<0&&t[++u]==="/"&&t[++u]==="/")for(;(c=u+1)<i&&t[c]!=="/";)u=c;break;case"?":case"#":u=i;break;case"/":if(t[u+1]===".")switch(h=t[++u+1],h){case"/":a+=t.substring(l,u-1),l=u+1;break;case void 0:case"?":case"#":return a+t.substring(l,u)+t.substr(u+1);case".":if(h=t[++u+1],h===void 0||h==="/"||h==="?"||h==="#"){if(a+=t.substring(l,u-2),(l=a.lastIndexOf("/"))>=c&&(a=a.substr(0,l)),h!=="/")return`${a}/${t.substr(u+1)}`;l=u+1}}}h=t[++u]}return a+t.substring(l)}parse(t,i,a,u){let c,l,h,v;if(i&&(i.onQuad||i.onPrefix||i.onComment||i.onVersion)?(c=i.onQuad,l=i.onPrefix,h=i.onComment,v=i.onVersion):(c=i,l=a,v=u),this._readCallback=this._readBeforeTopContext,this._sparqlStyle=!1,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix?this._blankNodePrefix.substr(2):`b${iJ++}_`,this._prefixCallback=l||om,this._versionCallback=v||om,this._inversePredicate=!1,this._quantified=Object.create(null),!c){const g=[];let w;if(this._callback=(_,E)=>{_?w=_:E&&g.push(E)},this._lexer.tokenize(t).every(_=>this._readCallback=this._readCallback(_)),w)throw w;return g}let p=(g,w)=>{g!==null?(this._callback(g),this._callback=om):this._readCallback&&(this._readCallback=this._readCallback(w))};h&&(this._lexer.comments=!0,p=(g,w)=>{g!==null?(this._callback(g),this._callback=om):this._readCallback&&(w.type==="comment"?h(w.value):this._readCallback=this._readCallback(w))}),this._callback=c,this._lexer.tokenize(t,p)}}function om(){}function aJ(r,t){r._factory=t,r.DEFAULTGRAPH=t.defaultGraph(),r.RDF_FIRST=t.namedNode(Eo.rdf.first),r.RDF_REST=t.namedNode(Eo.rdf.rest),r.RDF_NIL=t.namedNode(Eo.rdf.nil),r.RDF_REIFIES=t.namedNode(Eo.rdf.reifies),r.N3_FORALL=t.namedNode(Eo.r.forAll),r.N3_FORSOME=t.namedNode(Eo.r.forSome),r.ABBREVIATIONS={a:t.namedNode(Eo.rdf.type),"=":t.namedNode(Eo.owl.sameAs),">":t.namedNode(Eo.log.implies),"<":t.namedNode(Eo.log.isImpliedBy)},r.QUANTIFIERS_GRAPH=t.namedNode("urn:n3:quantifiers")}sm.SUPPORTED_VERSIONS=["1.2","1.2-basic","1.1"],aJ(sm.prototype,g3);function oEe(r){return!!r&&r.termType==="DefaultGraph"}function tE(r){return r.replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&")}const uEe=/^:?[^:?#]*(?:[?#]|$)|^file:|^[^:]*:\/*[^?#]+?\/(?:\.\.?(?:\/|$)|\/)/i,cEe=/^(?:(?:[^/?#]{3,}|\.?[^/?#.]\.?)(?:\/[^/?#]{3,}|\.?[^/?#.]\.?)*\/?)?(?:[?#]|$)/,sJ="./",lEe="../",y3="?",oJ="#";class m3{constructor(t){this.base=t,this._baseLength=0,this._baseMatcher=null,this._pathReplacements=new Array(t.length+1)}static supports(t){return!uEe.test(t)}_getBaseMatcher(){if(this._baseMatcher)return this._baseMatcher;if(!m3.supports(this.base))return this._baseMatcher=/.^/;const t=/^[^:]*:\/*/.exec(this.base)[0],i=["^",tE(t)],a=[],u=[],c=/[^/?#]*([/?#])/y;let l,h=0,v=0,p=c.lastIndex=t.length;for(;!h&&!v&&(l=c.exec(this.base));)l[1]===oJ?v=c.lastIndex-1:(i.push(tE(l[0]),"(?:"),a.push(")?"),l[1]!==y3?u.push(p=c.lastIndex):(h=p=c.lastIndex,v=this.base.indexOf(oJ,h),this._pathReplacements[h]=y3));for(let g=0;g<u.length;g++)this._pathReplacements[u[g]]=lEe.repeat(u.length-g-1);return this._pathReplacements[u[u.length-1]]=sJ,this._baseLength=v>0?v:this.base.length,i.push(tE(this.base.substring(p,this._baseLength)),h?"(?:#|$)":"(?:[?#]|$)"),this._baseMatcher=new RegExp([...i,...a].join(""))}toRelative(t){const i=this._getBaseMatcher().exec(t);if(!i)return t;const a=i[0].length;if(a===this._baseLength&&a===t.length)return"";const u=this._pathReplacements[a];if(u){const c=t.substring(a);return u!==y3&&!cEe.test(c)?t:u===sJ&&/^[^?#]/.test(c)?c:u+c}return t.substring(a-1)}}const um=g3.defaultGraph(),{rdf:fEe,xsd:Vb}=Eo,uJ=/["\\\t\n\r\b\f\u0000-\u0019\ud800-\udbff]/,cJ=/["\\\t\n\r\b\f\u0000-\u0019]|[\ud800-\udbff][\udc00-\udfff]/g,hEe={"\\":"\\\\",'"':'\\"'," ":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};class cm extends ef{equals(t){return t===this}}class dEe{constructor(t,i){if(this._prefixRegex=/$0^/,t&&typeof t.write!="function"&&(i=t,t=null),i=i||{},this._lists=i.lists,t)this._outputStream=t,this._endStream=i.end===void 0?!0:!!i.end;else{let a="";this._outputStream={write(u,c,l){a+=u,l&&l()},end:u=>{u&&u(null,a)}},this._endStream=!0}this._subject=null,/triple|quad/i.test(i.format)?(this._lineMode=!0,this._writeQuad=this._writeQuadLine):(this._lineMode=!1,this._graph=um,this._prefixIRIs=Object.create(null),i.prefixes&&this.addPrefixes(i.prefixes),i.baseIRI&&(this._baseIri=new m3(i.baseIRI)))}get _inDefaultGraph(){return um.equals(this._graph)}_write(t,i){this._outputStream.write(t,"utf8",i)}_writeQuad(t,i,a,u,c){try{u.equals(this._graph)||(this._write((this._subject===null?"":this._inDefaultGraph?`.
523
+ `:`
524
+ }
525
+ `)+(um.equals(u)?"":`${this._encodeIriOrBlank(u)} {
526
+ `)),this._graph=u,this._subject=null),t.equals(this._subject)?i.equals(this._predicate)?this._write(`, ${this._encodeObject(a)}`,c):this._write(`;
527
+ ${this._encodePredicate(this._predicate=i)} ${this._encodeObject(a)}`,c):this._write(`${(this._subject===null?"":`.
528
+ `)+this._encodeSubject(this._subject=t)} ${this._encodePredicate(this._predicate=i)} ${this._encodeObject(a)}`,c)}catch(l){c&&c(l)}}_writeQuadLine(t,i,a,u,c){delete this._prefixMatch,this._write(this.quadToString(t,i,a,u),c)}quadToString(t,i,a,u){return`${this._encodeSubject(t)} ${this._encodeIriOrBlank(i)} ${this._encodeObject(a)}${u&&u.value?` ${this._encodeIriOrBlank(u)} .
529
+ `:` .
530
+ `}`}quadsToString(t){let i="";for(const a of t)i+=this.quadToString(a.subject,a.predicate,a.object,a.graph);return i}_encodeSubject(t){return t.termType==="Quad"?this._encodeQuad(t):this._encodeIriOrBlank(t)}_encodeIriOrBlank(t){if(t.termType!=="NamedNode")return this._lists&&t.value in this._lists&&(t=this.list(this._lists[t.value])),"id"in t?t.id:`_:${t.value}`;let i=t.value;this._baseIri&&(i=this._baseIri.toRelative(i)),uJ.test(i)&&(i=i.replace(cJ,lJ));const a=this._prefixRegex.exec(i);return a?a[1]?this._prefixIRIs[a[1]]+a[2]:i:`<${i}>`}_encodeLiteral(t){let i=t.value;uJ.test(i)&&(i=i.replace(cJ,lJ));const a=t.direction?`--${t.direction}`:"";if(t.language)return`"${i}"@${t.language}${a}`;if(this._lineMode){if(t.datatype.value===Vb.string)return`"${i}"`}else switch(t.datatype.value){case Vb.string:return`"${i}"`;case Vb.boolean:if(i==="true"||i==="false")return i;break;case Vb.integer:if(/^[+-]?\d+$/.test(i))return i;break;case Vb.decimal:if(/^[+-]?\d*\.\d+$/.test(i))return i;break;case Vb.double:if(/^[+-]?(?:\d+\.\d*|\.?\d+)[eE][+-]?\d+$/.test(i))return i;break}return`"${i}"^^${this._encodeIriOrBlank(t.datatype)}`}_encodePredicate(t){return t.value===fEe.type?"a":this._encodeIriOrBlank(t)}_encodeObject(t){switch(t.termType){case"Quad":return this._encodeQuad(t);case"Literal":return this._encodeLiteral(t);default:return this._encodeIriOrBlank(t)}}_encodeQuad({subject:t,predicate:i,object:a,graph:u}){return`<<(${this._encodeSubject(t)} ${this._encodePredicate(i)} ${this._encodeObject(a)}${oEe(u)?"":` ${this._encodeIriOrBlank(u)}`})>>`}_blockedWrite(){throw new Error("Cannot write because the writer has been closed.")}addQuad(t,i,a,u,c){a===void 0?this._writeQuad(t.subject,t.predicate,t.object,t.graph,i):typeof u=="function"?this._writeQuad(t,i,a,um,u):this._writeQuad(t,i,a,u||um,c)}addQuads(t){for(let i=0;i<t.length;i++)this.addQuad(t[i])}addPrefix(t,i,a){const u={};u[t]=i,this.addPrefixes(u,a)}addPrefixes(t,i){if(!this._prefixIRIs)return i&&i();let a=!1;for(let u in t){let c=t[u];typeof c!="string"&&(c=c.value),a=!0,this._subject!==null&&(this._write(this._inDefaultGraph?`.
531
+ `:`
532
+ }
533
+ `),this._subject=null,this._graph=""),this._prefixIRIs[c]=u+=":",this._write(`@prefix ${u} <${c}>.
534
+ `)}if(a){let u="",c="";for(const l in this._prefixIRIs)u+=u?`|${l}`:l,c+=(c?"|":"")+this._prefixIRIs[l];u=tE(u),this._prefixRegex=new RegExp(`^(?:${c})[^/]*$|^(${u})([_a-zA-Z0-9][\\-_a-zA-Z0-9]*)$`)}this._write(a?`
535
+ `:"",i)}blank(t,i){let a=t,u,c;switch(t===void 0?a=[]:t.termType?a=[{predicate:t,object:i}]:"length"in t||(a=[t]),c=a.length){case 0:return new cm("[]");case 1:if(u=a[0],!(u.object instanceof cm))return new cm(`[ ${this._encodePredicate(u.predicate)} ${this._encodeObject(u.object)} ]`);default:let l="[";for(let h=0;h<c;h++)u=a[h],u.predicate.equals(t)?l+=`, ${this._encodeObject(u.object)}`:(l+=`${(h?`;
536
+ `:`
537
+ `)+this._encodePredicate(u.predicate)} ${this._encodeObject(u.object)}`,t=u.predicate);return new cm(`${l}
538
+ ]`)}}list(t){const i=t&&t.length||0,a=new Array(i);for(let u=0;u<i;u++)a[u]=this._encodeObject(t[u]);return new cm(`(${a.join(" ")})`)}end(t){this._subject!==null&&(this._write(this._inDefaultGraph?`.
539
+ `:`
540
+ }
541
+ `),this._subject=null),this._write=this._blockedWrite;let i=t&&((a,u)=>{i=null,t(a,u)});if(this._endStream)try{return this._outputStream.end(i)}catch{}i&&i()}}function lJ(r){let t=hEe[r];return t===void 0&&(r.length===1?(t=r.charCodeAt(0).toString(16),t="\\u0000".substr(0,6-t.length)+t):(t=((r.charCodeAt(0)-55296)*1024+r.charCodeAt(1)+9216).toString(16),t="\\U00000000".substr(0,10-t.length)+t)),t}var vEe={exports:{}},w3={exports:{}},Qi={AggregateError:class extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError(`Expected input to be an Array, got ${typeof t}`);let i="";for(let a=0;a<t.length;a++)i+=` ${t[a].stack}
542
+ `;super(i),this.name="AggregateError",this.errors=t}},ArrayIsArray(r){return Array.isArray(r)},ArrayPrototypeIncludes(r,t){return r.includes(t)},ArrayPrototypeIndexOf(r,t){return r.indexOf(t)},ArrayPrototypeJoin(r,t){return r.join(t)},ArrayPrototypeMap(r,t){return r.map(t)},ArrayPrototypePop(r,t){return r.pop(t)},ArrayPrototypePush(r,t){return r.push(t)},ArrayPrototypeSlice(r,t,i){return r.slice(t,i)},Error,FunctionPrototypeCall(r,t,...i){return r.call(t,...i)},FunctionPrototypeSymbolHasInstance(r,t){return Function.prototype[Symbol.hasInstance].call(r,t)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(r,t){return Object.defineProperties(r,t)},ObjectDefineProperty(r,t,i){return Object.defineProperty(r,t,i)},ObjectGetOwnPropertyDescriptor(r,t){return Object.getOwnPropertyDescriptor(r,t)},ObjectKeys(r){return Object.keys(r)},ObjectSetPrototypeOf(r,t){return Object.setPrototypeOf(r,t)},Promise,PromisePrototypeCatch(r,t){return r.catch(t)},PromisePrototypeThen(r,t,i){return r.then(t,i)},PromiseReject(r){return Promise.reject(r)},PromiseResolve(r){return Promise.resolve(r)},ReflectApply:Reflect.apply,RegExpPrototypeTest(r,t){return r.test(t)},SafeSet:Set,String,StringPrototypeSlice(r,t,i){return r.slice(t,i)},StringPrototypeToLowerCase(r){return r.toLowerCase()},StringPrototypeToUpperCase(r){return r.toUpperCase()},StringPrototypeTrim(r){return r.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(r,t,i){return r.set(t,i)},Boolean,Uint8Array},fJ={exports:{}},hJ={format(r,...t){return r.replace(/%([sdifj])/g,function(...[i,a]){const u=t.shift();return a==="f"?u.toFixed(6):a==="j"?JSON.stringify(u):a==="s"&&typeof u=="object"?`${u.constructor!==Object?u.constructor.name:""} {}`.trim():u.toString()})},inspect(r){switch(typeof r){case"string":if(r.includes("'"))if(r.includes('"')){if(!r.includes("`")&&!r.includes("${"))return`\`${r}\``}else return`"${r}"`;return`'${r}'`;case"number":return isNaN(r)?"NaN":Object.is(r,-0)?String(r):r;case"bigint":return`${String(r)}n`;case"boolean":case"undefined":return String(r);case"object":return"{}"}}};const{format:pEe,inspect:nE}=hJ,{AggregateError:gEe}=Qi,bEe=globalThis.AggregateError||gEe,yEe=Symbol("kIsNodeError"),mEe=["string","function","number","object","Function","Object","boolean","bigint","symbol"],wEe=/^([A-Z][a-z0-9]*)+$/,_Ee="__node_internal_",rE={};function Tp(r,t){if(!r)throw new rE.ERR_INTERNAL_ASSERTION(t)}function dJ(r){let t="",i=r.length;const a=r[0]==="-"?1:0;for(;i>=a+4;i-=3)t=`_${r.slice(i-3,i)}${t}`;return`${r.slice(0,i)}${t}`}function xEe(r,t,i){if(typeof t=="function")return Tp(t.length<=i.length,`Code: ${r}; The provided arguments length (${i.length}) does not match the required ones (${t.length}).`),t(...i);const a=(t.match(/%[dfijoOs]/g)||[]).length;return Tp(a===i.length,`Code: ${r}; The provided arguments length (${i.length}) does not match the required ones (${a}).`),i.length===0?t:pEe(t,...i)}function Hs(r,t,i){i||(i=Error);class a extends i{constructor(...c){super(xEe(r,t,c))}toString(){return`${this.name} [${r}]: ${this.message}`}}Object.defineProperties(a.prototype,{name:{value:i.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${r}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),a.prototype.code=r,a.prototype[yEe]=!0,rE[r]=a}function vJ(r){const t=_Ee+r.name;return Object.defineProperty(r,"name",{value:t}),r}function EEe(r,t){if(r&&t&&r!==t){if(Array.isArray(t.errors))return t.errors.push(r),t;const i=new bEe([t,r],t.message);return i.code=t.code,i}return r||t}let kEe=class extends Error{constructor(t="The operation was aborted",i=void 0){if(i!==void 0&&typeof i!="object")throw new rE.ERR_INVALID_ARG_TYPE("options","Object",i);super(t,i),this.code="ABORT_ERR",this.name="AbortError"}};Hs("ERR_ASSERTION","%s",Error),Hs("ERR_INVALID_ARG_TYPE",(r,t,i)=>{Tp(typeof r=="string","'name' must be a string"),Array.isArray(t)||(t=[t]);let a="The ";r.endsWith(" argument")?a+=`${r} `:a+=`"${r}" ${r.includes(".")?"property":"argument"} `,a+="must be ";const u=[],c=[],l=[];for(const v of t)Tp(typeof v=="string","All expected entries have to be of type string"),mEe.includes(v)?u.push(v.toLowerCase()):wEe.test(v)?c.push(v):(Tp(v!=="object",'The value "object" should be written as "Object"'),l.push(v));if(c.length>0){const v=u.indexOf("object");v!==-1&&(u.splice(u,v,1),c.push("Object"))}if(u.length>0){switch(u.length){case 1:a+=`of type ${u[0]}`;break;case 2:a+=`one of type ${u[0]} or ${u[1]}`;break;default:{const v=u.pop();a+=`one of type ${u.join(", ")}, or ${v}`}}(c.length>0||l.length>0)&&(a+=" or ")}if(c.length>0){switch(c.length){case 1:a+=`an instance of ${c[0]}`;break;case 2:a+=`an instance of ${c[0]} or ${c[1]}`;break;default:{const v=c.pop();a+=`an instance of ${c.join(", ")}, or ${v}`}}l.length>0&&(a+=" or ")}switch(l.length){case 0:break;case 1:l[0].toLowerCase()!==l[0]&&(a+="an "),a+=`${l[0]}`;break;case 2:a+=`one of ${l[0]} or ${l[1]}`;break;default:{const v=l.pop();a+=`one of ${l.join(", ")}, or ${v}`}}if(i==null)a+=`. Received ${i}`;else if(typeof i=="function"&&i.name)a+=`. Received function ${i.name}`;else if(typeof i=="object"){var h;if((h=i.constructor)!==null&&h!==void 0&&h.name)a+=`. Received an instance of ${i.constructor.name}`;else{const v=nE(i,{depth:-1});a+=`. Received ${v}`}}else{let v=nE(i,{colors:!1});v.length>25&&(v=`${v.slice(0,25)}...`),a+=`. Received type ${typeof i} (${v})`}return a},TypeError),Hs("ERR_INVALID_ARG_VALUE",(r,t,i="is invalid")=>{let a=nE(t);return a.length>128&&(a=a.slice(0,128)+"..."),`The ${r.includes(".")?"property":"argument"} '${r}' ${i}. Received ${a}`},TypeError),Hs("ERR_INVALID_RETURN_VALUE",(r,t,i)=>{var a;const u=i!=null&&(a=i.constructor)!==null&&a!==void 0&&a.name?`instance of ${i.constructor.name}`:`type ${typeof i}`;return`Expected ${r} to be returned from the "${t}" function but got ${u}.`},TypeError),Hs("ERR_MISSING_ARGS",(...r)=>{Tp(r.length>0,"At least one arg needs to be specified");let t;const i=r.length;switch(r=(Array.isArray(r)?r:[r]).map(a=>`"${a}"`).join(" or "),i){case 1:t+=`The ${r[0]} argument`;break;case 2:t+=`The ${r[0]} and ${r[1]} arguments`;break;default:{const a=r.pop();t+=`The ${r.join(", ")}, and ${a} arguments`}break}return`${t} must be specified`},TypeError),Hs("ERR_OUT_OF_RANGE",(r,t,i)=>{Tp(t,'Missing "range" argument');let a;if(Number.isInteger(i)&&Math.abs(i)>2**32)a=dJ(String(i));else if(typeof i=="bigint"){a=String(i);const u=BigInt(2)**BigInt(32);(i>u||i<-u)&&(a=dJ(a)),a+="n"}else a=nE(i);return`The value of "${r}" is out of range. It must be ${t}. Received ${a}`},RangeError),Hs("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),Hs("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),Hs("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),Hs("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),Hs("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),Hs("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Hs("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),Hs("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),Hs("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),Hs("ERR_STREAM_WRITE_AFTER_END","write after end",Error),Hs("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);var ko={AbortError:kEe,aggregateTwoErrors:vJ(EEe),hideStackFrames:vJ,codes:rE},lm={exports:{}},pJ;function fm(){if(pJ)return lm.exports;pJ=1;const{AbortController:r,AbortSignal:t}=typeof self<"u"?self:typeof window<"u"?window:void 0;return lm.exports=r,lm.exports.AbortSignal=t,lm.exports.default=r,lm.exports}var _3={exports:{}},Ub=typeof Reflect=="object"?Reflect:null,gJ=Ub&&typeof Ub.apply=="function"?Ub.apply:function(t,i,a){return Function.prototype.apply.call(t,i,a)},iE;Ub&&typeof Ub.ownKeys=="function"?iE=Ub.ownKeys:Object.getOwnPropertySymbols?iE=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:iE=function(t){return Object.getOwnPropertyNames(t)};function SEe(r){console&&console.warn&&console.warn(r)}var bJ=Number.isNaN||function(t){return t!==t};function ui(){ui.init.call(this)}_3.exports=ui,_3.exports.once=CEe,ui.EventEmitter=ui,ui.prototype._events=void 0,ui.prototype._eventsCount=0,ui.prototype._maxListeners=void 0;var yJ=10;function aE(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}Object.defineProperty(ui,"defaultMaxListeners",{enumerable:!0,get:function(){return yJ},set:function(r){if(typeof r!="number"||r<0||bJ(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");yJ=r}}),ui.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},ui.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||bJ(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function mJ(r){return r._maxListeners===void 0?ui.defaultMaxListeners:r._maxListeners}ui.prototype.getMaxListeners=function(){return mJ(this)},ui.prototype.emit=function(t){for(var i=[],a=1;a<arguments.length;a++)i.push(arguments[a]);var u=t==="error",c=this._events;if(c!==void 0)u=u&&c.error===void 0;else if(!u)return!1;if(u){var l;if(i.length>0&&(l=i[0]),l instanceof Error)throw l;var h=new Error("Unhandled error."+(l?" ("+l.message+")":""));throw h.context=l,h}var v=c[t];if(v===void 0)return!1;if(typeof v=="function")gJ(v,this,i);else for(var p=v.length,g=kJ(v,p),a=0;a<p;++a)gJ(g[a],this,i);return!0};function wJ(r,t,i,a){var u,c,l;if(aE(i),c=r._events,c===void 0?(c=r._events=Object.create(null),r._eventsCount=0):(c.newListener!==void 0&&(r.emit("newListener",t,i.listener?i.listener:i),c=r._events),l=c[t]),l===void 0)l=c[t]=i,++r._eventsCount;else if(typeof l=="function"?l=c[t]=a?[i,l]:[l,i]:a?l.unshift(i):l.push(i),u=mJ(r),u>0&&l.length>u&&!l.warned){l.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=r,h.type=t,h.count=l.length,SEe(h)}return r}ui.prototype.addListener=function(t,i){return wJ(this,t,i,!1)},ui.prototype.on=ui.prototype.addListener,ui.prototype.prependListener=function(t,i){return wJ(this,t,i,!0)};function TEe(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _J(r,t,i){var a={fired:!1,wrapFn:void 0,target:r,type:t,listener:i},u=TEe.bind(a);return u.listener=i,a.wrapFn=u,u}ui.prototype.once=function(t,i){return aE(i),this.on(t,_J(this,t,i)),this},ui.prototype.prependOnceListener=function(t,i){return aE(i),this.prependListener(t,_J(this,t,i)),this},ui.prototype.removeListener=function(t,i){var a,u,c,l,h;if(aE(i),u=this._events,u===void 0)return this;if(a=u[t],a===void 0)return this;if(a===i||a.listener===i)--this._eventsCount===0?this._events=Object.create(null):(delete u[t],u.removeListener&&this.emit("removeListener",t,a.listener||i));else if(typeof a!="function"){for(c=-1,l=a.length-1;l>=0;l--)if(a[l]===i||a[l].listener===i){h=a[l].listener,c=l;break}if(c<0)return this;c===0?a.shift():REe(a,c),a.length===1&&(u[t]=a[0]),u.removeListener!==void 0&&this.emit("removeListener",t,h||i)}return this},ui.prototype.off=ui.prototype.removeListener,ui.prototype.removeAllListeners=function(t){var i,a,u;if(a=this._events,a===void 0)return this;if(a.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):a[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete a[t]),this;if(arguments.length===0){var c=Object.keys(a),l;for(u=0;u<c.length;++u)l=c[u],l!=="removeListener"&&this.removeAllListeners(l);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(i=a[t],typeof i=="function")this.removeListener(t,i);else if(i!==void 0)for(u=i.length-1;u>=0;u--)this.removeListener(t,i[u]);return this};function xJ(r,t,i){var a=r._events;if(a===void 0)return[];var u=a[t];return u===void 0?[]:typeof u=="function"?i?[u.listener||u]:[u]:i?IEe(u):kJ(u,u.length)}ui.prototype.listeners=function(t){return xJ(this,t,!0)},ui.prototype.rawListeners=function(t){return xJ(this,t,!1)},ui.listenerCount=function(r,t){return typeof r.listenerCount=="function"?r.listenerCount(t):EJ.call(r,t)},ui.prototype.listenerCount=EJ;function EJ(r){var t=this._events;if(t!==void 0){var i=t[r];if(typeof i=="function")return 1;if(i!==void 0)return i.length}return 0}ui.prototype.eventNames=function(){return this._eventsCount>0?iE(this._events):[]};function kJ(r,t){for(var i=new Array(t),a=0;a<t;++a)i[a]=r[a];return i}function REe(r,t){for(;t+1<r.length;t++)r[t]=r[t+1];r.pop()}function IEe(r){for(var t=new Array(r.length),i=0;i<t.length;++i)t[i]=r[i].listener||r[i];return t}function CEe(r,t){return new Promise(function(i,a){function u(l){r.removeListener(t,c),a(l)}function c(){typeof r.removeListener=="function"&&r.removeListener("error",u),i([].slice.call(arguments))}SJ(r,t,c,{once:!0}),t!=="error"&&AEe(r,u,{once:!0})})}function AEe(r,t,i){typeof r.on=="function"&&SJ(r,"error",t,i)}function SJ(r,t,i,a){if(typeof r.on=="function")a.once?r.once(t,i):r.on(t,i);else if(typeof r.addEventListener=="function")r.addEventListener(t,function u(c){a.once&&r.removeEventListener(t,u),i(c)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof r)}var sE=_3.exports;(function(r){const t=vh,{format:i,inspect:a}=hJ,{codes:{ERR_INVALID_ARG_TYPE:u}}=ko,{kResistStopPropagation:c,AggregateError:l,SymbolDispose:h}=Qi,v=globalThis.AbortSignal||fm().AbortSignal,p=globalThis.AbortController||fm().AbortController,g=Object.getPrototypeOf(async function(){}).constructor,w=globalThis.Blob||t.Blob,_=typeof w<"u"?function(C){return C instanceof w}:function(C){return!1},E=(I,C)=>{if(I!==void 0&&(I===null||typeof I!="object"||!("aborted"in I)))throw new u(C,"AbortSignal",I)},k=(I,C)=>{if(typeof I!="function")throw new u(C,"Function",I)};r.exports={AggregateError:l,kEmptyObject:Object.freeze({}),once(I){let C=!1;return function(...P){C||(C=!0,I.apply(this,P))}},createDeferredPromise:function(){let I,C;return{promise:new Promise((A,L)=>{I=A,C=L}),resolve:I,reject:C}},promisify(I){return new Promise((C,P)=>{I((A,...L)=>A?P(A):C(...L))})},debuglog(){return function(){}},format:i,inspect:a,types:{isAsyncFunction(I){return I instanceof g},isArrayBufferView(I){return ArrayBuffer.isView(I)}},isBlob:_,deprecate(I,C){return I},addAbortListener:sE.addAbortListener||function(C,P){if(C===void 0)throw new u("signal","AbortSignal",C);E(C,"signal"),k(P,"listener");let A;return C.aborted?queueMicrotask(()=>P()):(C.addEventListener("abort",P,{__proto__:null,once:!0,[c]:!0}),A=()=>{C.removeEventListener("abort",P)}),{__proto__:null,[h](){var L;(L=A)===null||L===void 0||L()}}},AbortSignalAny:v.any||function(C){if(C.length===1)return C[0];const P=new p,A=()=>P.abort();return C.forEach(L=>{E(L,"signals"),L.addEventListener("abort",A,{once:!0})}),P.signal.addEventListener("abort",()=>{C.forEach(L=>L.removeEventListener("abort",A))},{once:!0}),P.signal}},r.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")})(fJ);var au=fJ.exports,x3={};const{ArrayIsArray:TJ,ArrayPrototypeIncludes:PEe,ArrayPrototypeJoin:LEe,ArrayPrototypeMap:NEe,NumberIsInteger:E3,NumberIsNaN:e5e,NumberMAX_SAFE_INTEGER:OEe,NumberMIN_SAFE_INTEGER:DEe,NumberParseInt:t5e,ObjectPrototypeHasOwnProperty:MEe,RegExpPrototypeExec:n5e,String:jEe,StringPrototypeToUpperCase:r5e,StringPrototypeTrim:i5e}=Qi,{hideStackFrames:fc,codes:{ERR_SOCKET_BAD_PORT:a5e,ERR_INVALID_ARG_TYPE:hc,ERR_INVALID_ARG_VALUE:RJ,ERR_OUT_OF_RANGE:Yb,ERR_UNKNOWN_SIGNAL:s5e}}=ko,{normalizeEncoding:o5e}=au,{isAsyncFunction:BEe,isArrayBufferView:qEe}=au.types,FEe=fc((r,t,i=DEe,a=OEe)=>{if(typeof r!="number")throw new hc(t,"number",r);if(!E3(r))throw new Yb(t,"an integer",r);if(r<i||r>a)throw new Yb(t,`>= ${i} && <= ${a}`,r)});fc((r,t,i=-2147483648,a=2147483647)=>{if(typeof r!="number")throw new hc(t,"number",r);if(!E3(r))throw new Yb(t,"an integer",r);if(r<i||r>a)throw new Yb(t,`>= ${i} && <= ${a}`,r)}),fc((r,t,i=!1)=>{if(typeof r!="number")throw new hc(t,"number",r);if(!E3(r))throw new Yb(t,"an integer",r);const a=i?1:0,u=4294967295;if(r<a||r>u)throw new Yb(t,`>= ${a} && <= ${u}`,r)}),fc((r,t,i)=>{if(!PEe(i,r)){const u="must be one of: "+LEe(NEe(i,c=>typeof c=="string"?`'${c}'`:jEe(c)),", ");throw new RJ(t,r,u)}});function $Ee(r,t){if(typeof r!="boolean")throw new hc(t,"boolean",r)}function k3(r,t,i){return r==null||!MEe(r,t)?i:r[t]}const GEe=fc((r,t,i=null)=>{const a=k3(i,"allowArray",!1),u=k3(i,"allowFunction",!1);if(!k3(i,"nullable",!1)&&r===null||!a&&TJ(r)||typeof r!="object"&&(!u||typeof r!="function"))throw new hc(t,"Object",r)});fc((r,t)=>{if(r!=null&&typeof r!="object"&&typeof r!="function")throw new hc(t,"a dictionary",r)}),fc((r,t,i=0)=>{if(!TJ(r))throw new hc(t,"Array",r);if(r.length<i){const a=`must be longer than ${i}`;throw new RJ(t,r,a)}}),fc((r,t="buffer")=>{if(!qEe(r))throw new hc(t,["Buffer","TypedArray","DataView"],r)});const HEe=fc((r,t)=>{if(r!==void 0&&(r===null||typeof r!="object"||!("aborted"in r)))throw new hc(t,"AbortSignal",r)}),zEe=fc((r,t)=>{if(typeof r!="function")throw new hc(t,"Function",r)});fc((r,t)=>{if(typeof r!="function"||BEe(r))throw new hc(t,"Function",r)}),fc((r,t)=>{if(r!==void 0)throw new hc(t,"undefined",r)});var hm={validateBoolean:$Ee,validateFunction:zEe,validateInteger:FEe,validateObject:GEe,validateAbortSignal:HEe},S3={exports:{}},IJ={exports:{}},Ca=IJ.exports={},tf,nf;function T3(){throw new Error("setTimeout has not been defined")}function R3(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?tf=setTimeout:tf=T3}catch{tf=T3}try{typeof clearTimeout=="function"?nf=clearTimeout:nf=R3}catch{nf=R3}})();function CJ(r){if(tf===setTimeout)return setTimeout(r,0);if((tf===T3||!tf)&&setTimeout)return tf=setTimeout,setTimeout(r,0);try{return tf(r,0)}catch{try{return tf.call(null,r,0)}catch{return tf.call(this,r,0)}}}function VEe(r){if(nf===clearTimeout)return clearTimeout(r);if((nf===R3||!nf)&&clearTimeout)return nf=clearTimeout,clearTimeout(r);try{return nf(r)}catch{try{return nf.call(null,r)}catch{return nf.call(this,r)}}}var ph=[],Wb=!1,Rp,oE=-1;function UEe(){!Wb||!Rp||(Wb=!1,Rp.length?ph=Rp.concat(ph):oE=-1,ph.length&&AJ())}function AJ(){if(!Wb){var r=CJ(UEe);Wb=!0;for(var t=ph.length;t;){for(Rp=ph,ph=[];++oE<t;)Rp&&Rp[oE].run();oE=-1,t=ph.length}Rp=null,Wb=!1,VEe(r)}}Ca.nextTick=function(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];ph.push(new PJ(r,t)),ph.length===1&&!Wb&&CJ(AJ)};function PJ(r,t){this.fun=r,this.array=t}PJ.prototype.run=function(){this.fun.apply(null,this.array)},Ca.title="browser",Ca.browser=!0,Ca.env={},Ca.argv=[],Ca.version="",Ca.versions={};function gh(){}Ca.on=gh,Ca.addListener=gh,Ca.once=gh,Ca.off=gh,Ca.removeListener=gh,Ca.removeAllListeners=gh,Ca.emit=gh,Ca.prependListener=gh,Ca.prependOnceListener=gh,Ca.listeners=function(r){return[]},Ca.binding=function(r){throw new Error("process.binding is not supported")},Ca.cwd=function(){return"/"},Ca.chdir=function(r){throw new Error("process.chdir is not supported")},Ca.umask=function(){return 0};var Ip=IJ.exports;const{SymbolAsyncIterator:LJ,SymbolIterator:NJ,SymbolFor:Cp}=Qi,OJ=Cp("nodejs.stream.destroyed"),YEe=Cp("nodejs.stream.errored"),DJ=Cp("nodejs.stream.readable"),MJ=Cp("nodejs.stream.writable"),WEe=Cp("nodejs.stream.disturbed"),KEe=Cp("nodejs.webstream.isClosedPromise"),XEe=Cp("nodejs.webstream.controllerErrorFunction");function I3(r,t=!1){var i;return!!(r&&typeof r.pipe=="function"&&typeof r.on=="function"&&(!t||typeof r.pause=="function"&&typeof r.resume=="function")&&(!r._writableState||((i=r._readableState)===null||i===void 0?void 0:i.readable)!==!1)&&(!r._writableState||r._readableState))}function uE(r){var t;return!!(r&&typeof r.write=="function"&&typeof r.on=="function"&&(!r._readableState||((t=r._writableState)===null||t===void 0?void 0:t.writable)!==!1))}function JEe(r){return!!(r&&typeof r.pipe=="function"&&r._readableState&&typeof r.on=="function"&&typeof r.write=="function")}function rf(r){return r&&(r._readableState||r._writableState||typeof r.write=="function"&&typeof r.on=="function"||typeof r.pipe=="function"&&typeof r.on=="function")}function jJ(r){return!!(r&&!rf(r)&&typeof r.pipeThrough=="function"&&typeof r.getReader=="function"&&typeof r.cancel=="function")}function BJ(r){return!!(r&&!rf(r)&&typeof r.getWriter=="function"&&typeof r.abort=="function")}function qJ(r){return!!(r&&!rf(r)&&typeof r.readable=="object"&&typeof r.writable=="object")}function QEe(r){return jJ(r)||BJ(r)||qJ(r)}function ZEe(r,t){return r==null?!1:t===!0?typeof r[LJ]=="function":t===!1?typeof r[NJ]=="function":typeof r[LJ]=="function"||typeof r[NJ]=="function"}function cE(r){if(!rf(r))return null;const t=r._writableState,i=r._readableState,a=t||i;return!!(r.destroyed||r[OJ]||a!=null&&a.destroyed)}function eke(r){if(!uE(r))return null;if(r.writableEnded===!0)return!0;const t=r._writableState;return t!=null&&t.errored?!1:typeof(t==null?void 0:t.ended)!="boolean"?null:t.ended}function tke(r,t){if(!uE(r))return null;if(r.writableFinished===!0)return!0;const i=r._writableState;return i!=null&&i.errored?!1:typeof(i==null?void 0:i.finished)!="boolean"?null:!!(i.finished||t===!1&&i.ended===!0&&i.length===0)}function FJ(r,t){if(!I3(r))return null;const i=r._readableState;return i!=null&&i.errored?!1:typeof(i==null?void 0:i.endEmitted)!="boolean"?null:!!(i.endEmitted||t===!1&&i.ended===!0&&i.length===0)}function $J(r){return r&&r[DJ]!=null?r[DJ]:typeof(r==null?void 0:r.readable)!="boolean"?null:cE(r)?!1:I3(r)&&r.readable&&!FJ(r)}function GJ(r){return r&&r[MJ]!=null?r[MJ]:typeof(r==null?void 0:r.writable)!="boolean"?null:cE(r)?!1:uE(r)&&r.writable&&!eke(r)}function nke(r,t){return rf(r)?cE(r)?!0:!((t==null?void 0:t.readable)!==!1&&$J(r)||(t==null?void 0:t.writable)!==!1&&GJ(r)):null}function rke(r){var t,i;return rf(r)?r.writableErrored?r.writableErrored:(t=(i=r._writableState)===null||i===void 0?void 0:i.errored)!==null&&t!==void 0?t:null:null}function ike(r){var t,i;return rf(r)?r.readableErrored?r.readableErrored:(t=(i=r._readableState)===null||i===void 0?void 0:i.errored)!==null&&t!==void 0?t:null:null}function ake(r){if(!rf(r))return null;if(typeof r.closed=="boolean")return r.closed;const t=r._writableState,i=r._readableState;return typeof(t==null?void 0:t.closed)=="boolean"||typeof(i==null?void 0:i.closed)=="boolean"?(t==null?void 0:t.closed)||(i==null?void 0:i.closed):typeof r._closed=="boolean"&&HJ(r)?r._closed:null}function HJ(r){return typeof r._closed=="boolean"&&typeof r._defaultKeepAlive=="boolean"&&typeof r._removedConnection=="boolean"&&typeof r._removedContLen=="boolean"}function ske(r){return typeof r._sent100=="boolean"&&HJ(r)}function oke(r){var t;return typeof r._consuming=="boolean"&&typeof r._dumped=="boolean"&&((t=r.req)===null||t===void 0?void 0:t.upgradeOrConnect)===void 0}function uke(r){if(!rf(r))return null;const t=r._writableState,i=r._readableState,a=t||i;return!a&&ske(r)||!!(a&&a.autoDestroy&&a.emitClose&&a.closed===!1)}function cke(r){var t;return!!(r&&((t=r[WEe])!==null&&t!==void 0?t:r.readableDidRead||r.readableAborted))}function lke(r){var t,i,a,u,c,l,h,v,p,g;return!!(r&&((t=(i=(a=(u=(c=(l=r[YEe])!==null&&l!==void 0?l:r.readableErrored)!==null&&c!==void 0?c:r.writableErrored)!==null&&u!==void 0?u:(h=r._readableState)===null||h===void 0?void 0:h.errorEmitted)!==null&&a!==void 0?a:(v=r._writableState)===null||v===void 0?void 0:v.errorEmitted)!==null&&i!==void 0?i:(p=r._readableState)===null||p===void 0?void 0:p.errored)!==null&&t!==void 0?t:!((g=r._writableState)===null||g===void 0)&&g.errored))}var bh={isDestroyed:cE,kIsDestroyed:OJ,isDisturbed:cke,isErrored:lke,isReadable:$J,kIsClosedPromise:KEe,kControllerErrorFunction:XEe,isClosed:ake,isDuplexNodeStream:JEe,isFinished:nke,isIterable:ZEe,isReadableNodeStream:I3,isReadableStream:jJ,isReadableFinished:FJ,isReadableErrored:ike,isNodeStream:rf,isWebStream:QEe,isWritable:GJ,isWritableNodeStream:uE,isWritableStream:BJ,isWritableFinished:tke,isWritableErrored:rke,isServerRequest:oke,willEmitClose:uke,isTransformStream:qJ};const Gd=Ip,{AbortError:zJ,codes:fke}=ko,{ERR_INVALID_ARG_TYPE:hke,ERR_STREAM_PREMATURE_CLOSE:VJ}=fke,{kEmptyObject:C3,once:A3}=au,{validateAbortSignal:dke,validateFunction:vke,validateObject:pke,validateBoolean:gke}=hm,{Promise:bke,PromisePrototypeThen:yke,SymbolDispose:UJ}=Qi,{isClosed:mke,isReadable:YJ,isReadableNodeStream:P3,isReadableStream:wke,isReadableFinished:WJ,isReadableErrored:KJ,isWritable:XJ,isWritableNodeStream:JJ,isWritableStream:_ke,isWritableFinished:QJ,isWritableErrored:ZJ,isNodeStream:xke,willEmitClose:Eke,kIsClosedPromise:kke}=bh;let Kb;function Ske(r){return r.setHeader&&typeof r.abort=="function"}const L3=()=>{};function eQ(r,t,i){var a,u;if(arguments.length===2?(i=t,t=C3):t==null?t=C3:pke(t,"options"),vke(i,"callback"),dke(t.signal,"options.signal"),i=A3(i),wke(r)||_ke(r))return Tke(r,t,i);if(!xke(r))throw new hke("stream",["ReadableStream","WritableStream","Stream"],r);const c=(a=t.readable)!==null&&a!==void 0?a:P3(r),l=(u=t.writable)!==null&&u!==void 0?u:JJ(r),h=r._writableState,v=r._readableState,p=()=>{r.writable||_()};let g=Eke(r)&&P3(r)===c&&JJ(r)===l,w=QJ(r,!1);const _=()=>{w=!0,r.destroyed&&(g=!1),!(g&&(!r.readable||c))&&(!c||E)&&i.call(r)};let E=WJ(r,!1);const k=()=>{E=!0,r.destroyed&&(g=!1),!(g&&(!r.writable||l))&&(!l||w)&&i.call(r)},I=M=>{i.call(r,M)};let C=mke(r);const P=()=>{C=!0;const M=ZJ(r)||KJ(r);if(M&&typeof M!="boolean")return i.call(r,M);if(c&&!E&&P3(r,!0)&&!WJ(r,!1))return i.call(r,new VJ);if(l&&!w&&!QJ(r,!1))return i.call(r,new VJ);i.call(r)},A=()=>{C=!0;const M=ZJ(r)||KJ(r);if(M&&typeof M!="boolean")return i.call(r,M);i.call(r)},L=()=>{r.req.on("finish",_)};Ske(r)?(r.on("complete",_),g||r.on("abort",P),r.req?L():r.on("request",L)):l&&!h&&(r.on("end",p),r.on("close",p)),!g&&typeof r.aborted=="boolean"&&r.on("aborted",P),r.on("end",k),r.on("finish",_),t.error!==!1&&r.on("error",I),r.on("close",P),C?Gd.nextTick(P):h!=null&&h.errorEmitted||v!=null&&v.errorEmitted?g||Gd.nextTick(A):(!c&&(!g||YJ(r))&&(w||XJ(r)===!1)||!l&&(!g||XJ(r))&&(E||YJ(r)===!1)||v&&r.req&&r.aborted)&&Gd.nextTick(A);const O=()=>{i=L3,r.removeListener("aborted",P),r.removeListener("complete",_),r.removeListener("abort",P),r.removeListener("request",L),r.req&&r.req.removeListener("finish",_),r.removeListener("end",p),r.removeListener("close",p),r.removeListener("finish",_),r.removeListener("end",k),r.removeListener("error",I),r.removeListener("close",P)};if(t.signal&&!C){const M=()=>{const B=i;O(),B.call(r,new zJ(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)Gd.nextTick(M);else{Kb=Kb||au.addAbortListener;const B=Kb(t.signal,M),F=i;i=A3((...q)=>{B[UJ](),F.apply(r,q)})}}return O}function Tke(r,t,i){let a=!1,u=L3;if(t.signal)if(u=()=>{a=!0,i.call(r,new zJ(void 0,{cause:t.signal.reason}))},t.signal.aborted)Gd.nextTick(u);else{Kb=Kb||au.addAbortListener;const l=Kb(t.signal,u),h=i;i=A3((...v)=>{l[UJ](),h.apply(r,v)})}const c=(...l)=>{a||Gd.nextTick(()=>i.apply(r,l))};return yke(r[kke].promise,c,c),L3}function Rke(r,t){var i;let a=!1;return t===null&&(t=C3),(i=t)!==null&&i!==void 0&&i.cleanup&&(gke(t.cleanup,"cleanup"),a=t.cleanup),new bke((u,c)=>{const l=eQ(r,t,h=>{a&&l(),h?c(h):u()})})}S3.exports=eQ,S3.exports.finished=Rke;var Hd=S3.exports;const af=Ip,{aggregateTwoErrors:Ike,codes:{ERR_MULTIPLE_CALLBACK:Cke},AbortError:Ake}=ko,{Symbol:tQ}=Qi,{kIsDestroyed:Pke,isDestroyed:Lke,isFinished:Nke,isServerRequest:Oke}=bh,nQ=tQ("kDestroy"),N3=tQ("kConstruct");function rQ(r,t,i){r&&(r.stack,t&&!t.errored&&(t.errored=r),i&&!i.errored&&(i.errored=r))}function Dke(r,t){const i=this._readableState,a=this._writableState,u=a||i;return a!=null&&a.destroyed||i!=null&&i.destroyed?(typeof t=="function"&&t(),this):(rQ(r,a,i),a&&(a.destroyed=!0),i&&(i.destroyed=!0),u.constructed?iQ(this,r,t):this.once(nQ,function(c){iQ(this,Ike(c,r),t)}),this)}function iQ(r,t,i){let a=!1;function u(c){if(a)return;a=!0;const l=r._readableState,h=r._writableState;rQ(c,h,l),h&&(h.closed=!0),l&&(l.closed=!0),typeof i=="function"&&i(c),c?af.nextTick(Mke,r,c):af.nextTick(aQ,r)}try{r._destroy(t||null,u)}catch(c){u(c)}}function Mke(r,t){O3(r,t),aQ(r)}function aQ(r){const t=r._readableState,i=r._writableState;i&&(i.closeEmitted=!0),t&&(t.closeEmitted=!0),(i!=null&&i.emitClose||t!=null&&t.emitClose)&&r.emit("close")}function O3(r,t){const i=r._readableState,a=r._writableState;a!=null&&a.errorEmitted||i!=null&&i.errorEmitted||(a&&(a.errorEmitted=!0),i&&(i.errorEmitted=!0),r.emit("error",t))}function jke(){const r=this._readableState,t=this._writableState;r&&(r.constructed=!0,r.closed=!1,r.closeEmitted=!1,r.destroyed=!1,r.errored=null,r.errorEmitted=!1,r.reading=!1,r.ended=r.readable===!1,r.endEmitted=r.readable===!1),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=t.writable===!1,t.ending=t.writable===!1,t.finished=t.writable===!1)}function D3(r,t,i){const a=r._readableState,u=r._writableState;if(u!=null&&u.destroyed||a!=null&&a.destroyed)return this;a!=null&&a.autoDestroy||u!=null&&u.autoDestroy?r.destroy(t):t&&(t.stack,u&&!u.errored&&(u.errored=t),a&&!a.errored&&(a.errored=t),i?af.nextTick(O3,r,t):O3(r,t))}function Bke(r,t){if(typeof r._construct!="function")return;const i=r._readableState,a=r._writableState;i&&(i.constructed=!1),a&&(a.constructed=!1),r.once(N3,t),!(r.listenerCount(N3)>1)&&af.nextTick(qke,r)}function qke(r){let t=!1;function i(a){if(t){D3(r,a??new Cke);return}t=!0;const u=r._readableState,c=r._writableState,l=c||u;u&&(u.constructed=!0),c&&(c.constructed=!0),l.destroyed?r.emit(nQ,a):a?D3(r,a,!0):af.nextTick(Fke,r)}try{r._construct(a=>{af.nextTick(i,a)})}catch(a){af.nextTick(i,a)}}function Fke(r){r.emit(N3)}function sQ(r){return(r==null?void 0:r.setHeader)&&typeof r.abort=="function"}function oQ(r){r.emit("close")}function $ke(r,t){r.emit("error",t),af.nextTick(oQ,r)}function Gke(r,t){!r||Lke(r)||(!t&&!Nke(r)&&(t=new Ake),Oke(r)?(r.socket=null,r.destroy(t)):sQ(r)?r.abort():sQ(r.req)?r.req.abort():typeof r.destroy=="function"?r.destroy(t):typeof r.close=="function"?r.close():t?af.nextTick($ke,r,t):af.nextTick(oQ,r),r.destroyed||(r[Pke]=!0))}var Xb={construct:Bke,destroyer:Gke,destroy:Dke,undestroy:jke,errorOrDestroy:D3};const{ArrayIsArray:Hke,ObjectSetPrototypeOf:uQ}=Qi,{EventEmitter:lE}=sE;function fE(r){lE.call(this,r)}uQ(fE.prototype,lE.prototype),uQ(fE,lE),fE.prototype.pipe=function(r,t){const i=this;function a(g){r.writable&&r.write(g)===!1&&i.pause&&i.pause()}i.on("data",a);function u(){i.readable&&i.resume&&i.resume()}r.on("drain",u),!r._isStdio&&(!t||t.end!==!1)&&(i.on("end",l),i.on("close",h));let c=!1;function l(){c||(c=!0,r.end())}function h(){c||(c=!0,typeof r.destroy=="function"&&r.destroy())}function v(g){p(),lE.listenerCount(this,"error")===0&&this.emit("error",g)}M3(i,"error",v),M3(r,"error",v);function p(){i.removeListener("data",a),r.removeListener("drain",u),i.removeListener("end",l),i.removeListener("close",h),i.removeListener("error",v),r.removeListener("error",v),i.removeListener("end",p),i.removeListener("close",p),r.removeListener("close",p)}return i.on("end",p),i.on("close",p),r.on("close",p),r.emit("pipe",i),r};function M3(r,t,i){if(typeof r.prependListener=="function")return r.prependListener(t,i);!r._events||!r._events[t]?r.on(t,i):Hke(r._events[t])?r._events[t].unshift(i):r._events[t]=[i,r._events[t]]}var j3={Stream:fE,prependListener:M3},cQ={exports:{}};(function(r){const{SymbolDispose:t}=Qi,{AbortError:i,codes:a}=ko,{isNodeStream:u,isWebStream:c,kControllerErrorFunction:l}=bh,h=Hd,{ERR_INVALID_ARG_TYPE:v}=a;let p;const g=(w,_)=>{if(typeof w!="object"||!("aborted"in w))throw new v(_,"AbortSignal",w)};r.exports.addAbortSignal=function(_,E){if(g(_,"signal"),!u(E)&&!c(E))throw new v("stream",["ReadableStream","WritableStream","Stream"],E);return r.exports.addAbortSignalNoValidate(_,E)},r.exports.addAbortSignalNoValidate=function(w,_){if(typeof w!="object"||!("aborted"in w))return _;const E=u(_)?()=>{_.destroy(new i(void 0,{cause:w.reason}))}:()=>{_[l](new i(void 0,{cause:w.reason}))};if(w.aborted)E();else{p=p||au.addAbortListener;const k=p(w,E);h(_,k[t])}return _}})(cQ);var hE=cQ.exports;const{StringPrototypeSlice:lQ,SymbolIterator:zke,TypedArrayPrototypeSet:dE,Uint8Array:Vke}=Qi,{Buffer:B3}=vh,{inspect:Uke}=au;var Yke=class{constructor(){this.head=null,this.tail=null,this.length=0}push(t){const i={data:t,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}unshift(t){const i={data:t,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}shift(){if(this.length===0)return;const t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}clear(){this.head=this.tail=null,this.length=0}join(t){if(this.length===0)return"";let i=this.head,a=""+i.data;for(;(i=i.next)!==null;)a+=t+i.data;return a}concat(t){if(this.length===0)return B3.alloc(0);const i=B3.allocUnsafe(t>>>0);let a=this.head,u=0;for(;a;)dE(i,a.data,u),u+=a.data.length,a=a.next;return i}consume(t,i){const a=this.head.data;if(t<a.length){const u=a.slice(0,t);return this.head.data=a.slice(t),u}return t===a.length?this.shift():i?this._getString(t):this._getBuffer(t)}first(){return this.head.data}*[zke](){for(let t=this.head;t;t=t.next)yield t.data}_getString(t){let i="",a=this.head,u=0;do{const c=a.data;if(t>c.length)i+=c,t-=c.length;else{t===c.length?(i+=c,++u,a.next?this.head=a.next:this.head=this.tail=null):(i+=lQ(c,0,t),this.head=a,a.data=lQ(c,t));break}++u}while((a=a.next)!==null);return this.length-=u,i}_getBuffer(t){const i=B3.allocUnsafe(t),a=t;let u=this.head,c=0;do{const l=u.data;if(t>l.length)dE(i,l,a-t),t-=l.length;else{t===l.length?(dE(i,l,a-t),++c,u.next?this.head=u.next:this.head=this.tail=null):(dE(i,new Vke(l.buffer,l.byteOffset,t),a-t),this.head=u,u.data=l.slice(t));break}++c}while((u=u.next)!==null);return this.length-=c,i}[Symbol.for("nodejs.util.inspect.custom")](t,i){return Uke(this,{...i,depth:0,customInspect:!1})}};const{MathFloor:Wke,NumberIsInteger:Kke}=Qi,{validateInteger:Xke}=hm,{ERR_INVALID_ARG_VALUE:Jke}=ko.codes;let fQ=16*1024,hQ=16;function Qke(r,t,i){return r.highWaterMark!=null?r.highWaterMark:t?r[i]:null}function dQ(r){return r?hQ:fQ}function Zke(r,t){Xke(t,"value",0),r?hQ=t:fQ=t}function eSe(r,t,i,a){const u=Qke(t,a,i);if(u!=null){if(!Kke(u)||u<0){const c=a?`options.${i}`:"options.highWaterMark";throw new Jke(c,u)}return Wke(u)}return dQ(r.objectMode)}var vE={getHighWaterMark:eSe,getDefaultHighWaterMark:dQ,setDefaultHighWaterMark:Zke},vQ={},q3={exports:{}};const tSe=Qme(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(r,t){var i=tSe,a=i.Buffer;function u(l,h){for(var v in l)h[v]=l[v]}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?r.exports=i:(u(i,t),t.Buffer=c);function c(l,h,v){return a(l,h,v)}c.prototype=Object.create(a.prototype),u(a,c),c.from=function(l,h,v){if(typeof l=="number")throw new TypeError("Argument must not be a number");return a(l,h,v)},c.alloc=function(l,h,v){if(typeof l!="number")throw new TypeError("Argument must be a number");var p=a(l);return h!==void 0?typeof v=="string"?p.fill(h,v):p.fill(h):p.fill(0),p},c.allocUnsafe=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return a(l)},c.allocUnsafeSlow=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return i.SlowBuffer(l)}})(q3,q3.exports);var nSe=q3.exports,F3=nSe.Buffer,pQ=F3.isEncoding||function(r){switch(r=""+r,r&&r.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function rSe(r){if(!r)return"utf8";for(var t;;)switch(r){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return r;default:if(t)return;r=(""+r).toLowerCase(),t=!0}}function iSe(r){var t=rSe(r);if(typeof t!="string"&&(F3.isEncoding===pQ||!pQ(r)))throw new Error("Unknown encoding: "+r);return t||r}vQ.StringDecoder=dm;function dm(r){this.encoding=iSe(r);var t;switch(this.encoding){case"utf16le":this.text=lSe,this.end=fSe,t=4;break;case"utf8":this.fillLast=oSe,t=4;break;case"base64":this.text=hSe,this.end=dSe,t=3;break;default:this.write=vSe,this.end=pSe;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=F3.allocUnsafe(t)}dm.prototype.write=function(r){if(r.length===0)return"";var t,i;if(this.lastNeed){if(t=this.fillLast(r),t===void 0)return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<r.length?t?t+this.text(r,i):this.text(r,i):t||""},dm.prototype.end=cSe,dm.prototype.text=uSe,dm.prototype.fillLast=function(r){if(this.lastNeed<=r.length)return r.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);r.copy(this.lastChar,this.lastTotal-this.lastNeed,0,r.length),this.lastNeed-=r.length};function $3(r){return r<=127?0:r>>5===6?2:r>>4===14?3:r>>3===30?4:r>>6===2?-1:-2}function aSe(r,t,i){var a=t.length-1;if(a<i)return 0;var u=$3(t[a]);return u>=0?(u>0&&(r.lastNeed=u-1),u):--a<i||u===-2?0:(u=$3(t[a]),u>=0?(u>0&&(r.lastNeed=u-2),u):--a<i||u===-2?0:(u=$3(t[a]),u>=0?(u>0&&(u===2?u=0:r.lastNeed=u-3),u):0))}function sSe(r,t,i){if((t[0]&192)!==128)return r.lastNeed=0,"�";if(r.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return r.lastNeed=1,"�";if(r.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return r.lastNeed=2,"�"}}function oSe(r){var t=this.lastTotal-this.lastNeed,i=sSe(this,r);if(i!==void 0)return i;if(this.lastNeed<=r.length)return r.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);r.copy(this.lastChar,t,0,r.length),this.lastNeed-=r.length}function uSe(r,t){var i=aSe(this,r,t);if(!this.lastNeed)return r.toString("utf8",t);this.lastTotal=i;var a=r.length-(i-this.lastNeed);return r.copy(this.lastChar,0,a),r.toString("utf8",t,a)}function cSe(r){var t=r&&r.length?this.write(r):"";return this.lastNeed?t+"�":t}function lSe(r,t){if((r.length-t)%2===0){var i=r.toString("utf16le",t);if(i){var a=i.charCodeAt(i.length-1);if(a>=55296&&a<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=r[r.length-2],this.lastChar[1]=r[r.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=r[r.length-1],r.toString("utf16le",t,r.length-1)}function fSe(r){var t=r&&r.length?this.write(r):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,i)}return t}function hSe(r,t){var i=(r.length-t)%3;return i===0?r.toString("base64",t):(this.lastNeed=3-i,this.lastTotal=3,i===1?this.lastChar[0]=r[r.length-1]:(this.lastChar[0]=r[r.length-2],this.lastChar[1]=r[r.length-1]),r.toString("base64",t,r.length-i))}function dSe(r){var t=r&&r.length?this.write(r):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function vSe(r){return r.toString(this.encoding)}function pSe(r){return r&&r.length?this.write(r):""}const gQ=Ip,{PromisePrototypeThen:gSe,SymbolAsyncIterator:bQ,SymbolIterator:yQ}=Qi,{Buffer:bSe}=vh,{ERR_INVALID_ARG_TYPE:ySe,ERR_STREAM_NULL_VALUES:mSe}=ko.codes;function wSe(r,t,i){let a;if(typeof t=="string"||t instanceof bSe)return new r({objectMode:!0,...i,read(){this.push(t),this.push(null)}});let u;if(t&&t[bQ])u=!0,a=t[bQ]();else if(t&&t[yQ])u=!1,a=t[yQ]();else throw new ySe("iterable",["Iterable"],t);const c=new r({objectMode:!0,highWaterMark:1,...i});let l=!1;c._read=function(){l||(l=!0,v())},c._destroy=function(p,g){gSe(h(p),()=>gQ.nextTick(g,p),w=>gQ.nextTick(g,w||p))};async function h(p){const g=p!=null,w=typeof a.throw=="function";if(g&&w){const{value:_,done:E}=await a.throw(p);if(await _,E)return}if(typeof a.return=="function"){const{value:_}=await a.return();await _}}async function v(){for(;;){try{const{value:p,done:g}=u?await a.next():a.next();if(g)c.push(null);else{const w=p&&typeof p.then=="function"?await p:p;if(w===null)throw l=!1,new mSe;if(c.push(w))continue;l=!1}}catch(p){c.destroy(p)}break}}return c}var mQ=wSe,G3,wQ;function pE(){if(wQ)return G3;wQ=1;const r=Ip,{ArrayPrototypeIndexOf:t,NumberIsInteger:i,NumberIsNaN:a,NumberParseInt:u,ObjectDefineProperties:c,ObjectKeys:l,ObjectSetPrototypeOf:h,Promise:v,SafeSet:p,SymbolAsyncDispose:g,SymbolAsyncIterator:w,Symbol:_}=Qi;G3=ut,ut.ReadableState=Lt;const{EventEmitter:E}=sE,{Stream:k,prependListener:I}=j3,{Buffer:C}=vh,{addAbortSignal:P}=hE,A=Hd;let L=au.debuglog("stream",me=>{L=me});const O=Yke,M=Xb,{getHighWaterMark:B,getDefaultHighWaterMark:F}=vE,{aggregateTwoErrors:q,codes:{ERR_INVALID_ARG_TYPE:$,ERR_METHOD_NOT_IMPLEMENTED:Y,ERR_OUT_OF_RANGE:V,ERR_STREAM_PUSH_AFTER_EOF:U,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:G},AbortError:X}=ko,{validateObject:ne}=hm,ae=_("kPaused"),{StringDecoder:oe}=vQ,le=mQ;h(ut.prototype,k.prototype),h(ut,k);const pe=()=>{},{errorOrDestroy:ge}=M,de=1,Se=2,Ne=4,ye=8,we=16,Pe=32,Fe=64,Ue=128,He=256,De=512,Ce=1024,Be=2048,ve=4096,ke=8192,je=16384,qe=32768,Me=65536,ot=1<<17,dt=1<<18;function pt(me){return{enumerable:!1,get(){return(this.state&me)!==0},set(Ie){Ie?this.state|=me:this.state&=~me}}}c(Lt.prototype,{objectMode:pt(de),ended:pt(Se),endEmitted:pt(Ne),reading:pt(ye),constructed:pt(we),sync:pt(Pe),needReadable:pt(Fe),emittedReadable:pt(Ue),readableListening:pt(He),resumeScheduled:pt(De),errorEmitted:pt(Ce),emitClose:pt(Be),autoDestroy:pt(ve),destroyed:pt(ke),closed:pt(je),closeEmitted:pt(qe),multiAwaitDrain:pt(Me),readingMore:pt(ot),dataEmitted:pt(dt)});function Lt(me,Ie,_t){typeof _t!="boolean"&&(_t=Ie instanceof yh()),this.state=Be|ve|we|Pe,me&&me.objectMode&&(this.state|=de),_t&&me&&me.readableObjectMode&&(this.state|=de),this.highWaterMark=me?B(this,me,"readableHighWaterMark",_t):F(!1),this.buffer=new O,this.length=0,this.pipes=[],this.flowing=null,this[ae]=null,me&&me.emitClose===!1&&(this.state&=~Be),me&&me.autoDestroy===!1&&(this.state&=~ve),this.errored=null,this.defaultEncoding=me&&me.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,me&&me.encoding&&(this.decoder=new oe(me.encoding),this.encoding=me.encoding)}function ut(me){if(!(this instanceof ut))return new ut(me);const Ie=this instanceof yh();this._readableState=new Lt(me,this,Ie),me&&(typeof me.read=="function"&&(this._read=me.read),typeof me.destroy=="function"&&(this._destroy=me.destroy),typeof me.construct=="function"&&(this._construct=me.construct),me.signal&&!Ie&&P(me.signal,this)),k.call(this,me),M.construct(this,()=>{this._readableState.needReadable&&Le(this,this._readableState)})}ut.prototype.destroy=M.destroy,ut.prototype._undestroy=M.undestroy,ut.prototype._destroy=function(me,Ie){Ie(me)},ut.prototype[E.captureRejectionSymbol]=function(me){this.destroy(me)},ut.prototype[g]=function(){let me;return this.destroyed||(me=this.readableEnded?null:new X,this.destroy(me)),new v((Ie,_t)=>A(this,kt=>kt&&kt!==me?_t(kt):Ie(null)))},ut.prototype.push=function(me,Ie){return $t(this,me,Ie,!1)},ut.prototype.unshift=function(me,Ie){return $t(this,me,Ie,!0)};function $t(me,Ie,_t,kt){L("readableAddChunk",Ie);const Ot=me._readableState;let lr;if(Ot.state&de||(typeof Ie=="string"?(_t=_t||Ot.defaultEncoding,Ot.encoding!==_t&&(kt&&Ot.encoding?Ie=C.from(Ie,_t).toString(Ot.encoding):(Ie=C.from(Ie,_t),_t=""))):Ie instanceof C?_t="":k._isUint8Array(Ie)?(Ie=k._uint8ArrayToBuffer(Ie),_t=""):Ie!=null&&(lr=new $("chunk",["string","Buffer","Uint8Array"],Ie))),lr)ge(me,lr);else if(Ie===null)Ot.state&=~ye,J(me,Ot);else if(Ot.state&de||Ie&&Ie.length>0)if(kt)if(Ot.state&Ne)ge(me,new G);else{if(Ot.destroyed||Ot.errored)return!1;Yt(me,Ot,Ie,!0)}else if(Ot.ended)ge(me,new U);else{if(Ot.destroyed||Ot.errored)return!1;Ot.state&=~ye,Ot.decoder&&!_t?(Ie=Ot.decoder.write(Ie),Ot.objectMode||Ie.length!==0?Yt(me,Ot,Ie,!1):Le(me,Ot)):Yt(me,Ot,Ie,!1)}else kt||(Ot.state&=~ye,Le(me,Ot));return!Ot.ended&&(Ot.length<Ot.highWaterMark||Ot.length===0)}function Yt(me,Ie,_t,kt){Ie.flowing&&Ie.length===0&&!Ie.sync&&me.listenerCount("data")>0?(Ie.state&Me?Ie.awaitDrainWriters.clear():Ie.awaitDrainWriters=null,Ie.dataEmitted=!0,me.emit("data",_t)):(Ie.length+=Ie.objectMode?1:_t.length,kt?Ie.buffer.unshift(_t):Ie.buffer.push(_t),Ie.state&Fe&&te(me)),Le(me,Ie)}ut.prototype.isPaused=function(){const me=this._readableState;return me[ae]===!0||me.flowing===!1},ut.prototype.setEncoding=function(me){const Ie=new oe(me);this._readableState.decoder=Ie,this._readableState.encoding=this._readableState.decoder.encoding;const _t=this._readableState.buffer;let kt="";for(const Ot of _t)kt+=Ie.write(Ot);return _t.clear(),kt!==""&&_t.push(kt),this._readableState.length=kt.length,this};const fn=1073741824;function Yn(me){if(me>fn)throw new V("size","<= 1GiB",me);return me--,me|=me>>>1,me|=me>>>2,me|=me>>>4,me|=me>>>8,me|=me>>>16,me++,me}function he(me,Ie){return me<=0||Ie.length===0&&Ie.ended?0:Ie.state&de?1:a(me)?Ie.flowing&&Ie.length?Ie.buffer.first().length:Ie.length:me<=Ie.length?me:Ie.ended?Ie.length:0}ut.prototype.read=function(me){L("read",me),me===void 0?me=NaN:i(me)||(me=u(me,10));const Ie=this._readableState,_t=me;if(me>Ie.highWaterMark&&(Ie.highWaterMark=Yn(me)),me!==0&&(Ie.state&=~Ue),me===0&&Ie.needReadable&&((Ie.highWaterMark!==0?Ie.length>=Ie.highWaterMark:Ie.length>0)||Ie.ended))return L("read: emitReadable",Ie.length,Ie.ended),Ie.length===0&&Ie.ended?cn(this):te(this),null;if(me=he(me,Ie),me===0&&Ie.ended)return Ie.length===0&&cn(this),null;let kt=(Ie.state&Fe)!==0;if(L("need readable",kt),(Ie.length===0||Ie.length-me<Ie.highWaterMark)&&(kt=!0,L("length less than watermark",kt)),Ie.ended||Ie.reading||Ie.destroyed||Ie.errored||!Ie.constructed)kt=!1,L("reading, ended or constructing",kt);else if(kt){L("do read"),Ie.state|=ye|Pe,Ie.length===0&&(Ie.state|=Fe);try{this._read(Ie.highWaterMark)}catch(lr){ge(this,lr)}Ie.state&=~Pe,Ie.reading||(me=he(_t,Ie))}let Ot;return me>0?Ot=Wt(me,Ie):Ot=null,Ot===null?(Ie.needReadable=Ie.length<=Ie.highWaterMark,me=0):(Ie.length-=me,Ie.multiAwaitDrain?Ie.awaitDrainWriters.clear():Ie.awaitDrainWriters=null),Ie.length===0&&(Ie.ended||(Ie.needReadable=!0),_t!==me&&Ie.ended&&cn(this)),Ot!==null&&!Ie.errorEmitted&&!Ie.closeEmitted&&(Ie.dataEmitted=!0,this.emit("data",Ot)),Ot};function J(me,Ie){if(L("onEofChunk"),!Ie.ended){if(Ie.decoder){const _t=Ie.decoder.end();_t&&_t.length&&(Ie.buffer.push(_t),Ie.length+=Ie.objectMode?1:_t.length)}Ie.ended=!0,Ie.sync?te(me):(Ie.needReadable=!1,Ie.emittedReadable=!0,be(me))}}function te(me){const Ie=me._readableState;L("emitReadable",Ie.needReadable,Ie.emittedReadable),Ie.needReadable=!1,Ie.emittedReadable||(L("emitReadable",Ie.flowing),Ie.emittedReadable=!0,r.nextTick(be,me))}function be(me){const Ie=me._readableState;L("emitReadable_",Ie.destroyed,Ie.length,Ie.ended),!Ie.destroyed&&!Ie.errored&&(Ie.length||Ie.ended)&&(me.emit("readable"),Ie.emittedReadable=!1),Ie.needReadable=!Ie.flowing&&!Ie.ended&&Ie.length<=Ie.highWaterMark,St(me)}function Le(me,Ie){!Ie.readingMore&&Ie.constructed&&(Ie.readingMore=!0,r.nextTick(Te,me,Ie))}function Te(me,Ie){for(;!Ie.reading&&!Ie.ended&&(Ie.length<Ie.highWaterMark||Ie.flowing&&Ie.length===0);){const _t=Ie.length;if(L("maybeReadMore read 0"),me.read(0),_t===Ie.length)break}Ie.readingMore=!1}ut.prototype._read=function(me){throw new Y("_read()")},ut.prototype.pipe=function(me,Ie){const _t=this,kt=this._readableState;kt.pipes.length===1&&(kt.multiAwaitDrain||(kt.multiAwaitDrain=!0,kt.awaitDrainWriters=new p(kt.awaitDrainWriters?[kt.awaitDrainWriters]:[]))),kt.pipes.push(me),L("pipe count=%d opts=%j",kt.pipes.length,Ie);const lr=(!Ie||Ie.end!==!1)&&me!==r.stdout&&me!==r.stderr?Zi:Li;kt.endEmitted?r.nextTick(lr):_t.once("end",lr),me.on("unpipe",xr);function xr(Ni,ks){L("onunpipe"),Ni===_t&&ks&&ks.hasUnpiped===!1&&(ks.hasUnpiped=!0,ou())}function Zi(){L("onend"),me.end()}let is,xi=!1;function ou(){L("cleanup"),me.removeListener("close",uu),me.removeListener("finish",Aa),is&&me.removeListener("drain",is),me.removeListener("error",nl),me.removeListener("unpipe",xr),_t.removeListener("end",Zi),_t.removeListener("end",Li),_t.removeListener("data",_c),xi=!0,is&&kt.awaitDrainWriters&&(!me._writableState||me._writableState.needDrain)&&is()}function Ro(){xi||(kt.pipes.length===1&&kt.pipes[0]===me?(L("false write response, pause",0),kt.awaitDrainWriters=me,kt.multiAwaitDrain=!1):kt.pipes.length>1&&kt.pipes.includes(me)&&(L("false write response, pause",kt.awaitDrainWriters.size),kt.awaitDrainWriters.add(me)),_t.pause()),is||(is=ue(_t,me),me.on("drain",is))}_t.on("data",_c);function _c(Ni){L("ondata");const ks=me.write(Ni);L("dest.write",ks),ks===!1&&Ro()}function nl(Ni){if(L("onerror",Ni),Li(),me.removeListener("error",nl),me.listenerCount("error")===0){const ks=me._writableState||me._readableState;ks&&!ks.errorEmitted?ge(me,Ni):me.emit("error",Ni)}}I(me,"error",nl);function uu(){me.removeListener("finish",Aa),Li()}me.once("close",uu);function Aa(){L("onfinish"),me.removeListener("close",uu),Li()}me.once("finish",Aa);function Li(){L("unpipe"),_t.unpipe(me)}return me.emit("pipe",_t),me.writableNeedDrain===!0?Ro():kt.flowing||(L("pipe resume"),_t.resume()),me};function ue(me,Ie){return function(){const kt=me._readableState;kt.awaitDrainWriters===Ie?(L("pipeOnDrain",1),kt.awaitDrainWriters=null):kt.multiAwaitDrain&&(L("pipeOnDrain",kt.awaitDrainWriters.size),kt.awaitDrainWriters.delete(Ie)),(!kt.awaitDrainWriters||kt.awaitDrainWriters.size===0)&&me.listenerCount("data")&&me.resume()}}ut.prototype.unpipe=function(me){const Ie=this._readableState,_t={hasUnpiped:!1};if(Ie.pipes.length===0)return this;if(!me){const Ot=Ie.pipes;Ie.pipes=[],this.pause();for(let lr=0;lr<Ot.length;lr++)Ot[lr].emit("unpipe",this,{hasUnpiped:!1});return this}const kt=t(Ie.pipes,me);return kt===-1?this:(Ie.pipes.splice(kt,1),Ie.pipes.length===0&&this.pause(),me.emit("unpipe",this,_t),this)},ut.prototype.on=function(me,Ie){const _t=k.prototype.on.call(this,me,Ie),kt=this._readableState;return me==="data"?(kt.readableListening=this.listenerCount("readable")>0,kt.flowing!==!1&&this.resume()):me==="readable"&&!kt.endEmitted&&!kt.readableListening&&(kt.readableListening=kt.needReadable=!0,kt.flowing=!1,kt.emittedReadable=!1,L("on readable",kt.length,kt.reading),kt.length?te(this):kt.reading||r.nextTick(Ze,this)),_t},ut.prototype.addListener=ut.prototype.on,ut.prototype.removeListener=function(me,Ie){const _t=k.prototype.removeListener.call(this,me,Ie);return me==="readable"&&r.nextTick($e,this),_t},ut.prototype.off=ut.prototype.removeListener,ut.prototype.removeAllListeners=function(me){const Ie=k.prototype.removeAllListeners.apply(this,arguments);return(me==="readable"||me===void 0)&&r.nextTick($e,this),Ie};function $e(me){const Ie=me._readableState;Ie.readableListening=me.listenerCount("readable")>0,Ie.resumeScheduled&&Ie[ae]===!1?Ie.flowing=!0:me.listenerCount("data")>0?me.resume():Ie.readableListening||(Ie.flowing=null)}function Ze(me){L("readable nexttick read 0"),me.read(0)}ut.prototype.resume=function(){const me=this._readableState;return me.flowing||(L("resume"),me.flowing=!me.readableListening,et(this,me)),me[ae]=!1,this};function et(me,Ie){Ie.resumeScheduled||(Ie.resumeScheduled=!0,r.nextTick(it,me,Ie))}function it(me,Ie){L("resume",Ie.reading),Ie.reading||me.read(0),Ie.resumeScheduled=!1,me.emit("resume"),St(me),Ie.flowing&&!Ie.reading&&me.read(0)}ut.prototype.pause=function(){return L("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(L("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[ae]=!0,this};function St(me){const Ie=me._readableState;for(L("flow",Ie.flowing);Ie.flowing&&me.read()!==null;);}ut.prototype.wrap=function(me){let Ie=!1;me.on("data",kt=>{!this.push(kt)&&me.pause&&(Ie=!0,me.pause())}),me.on("end",()=>{this.push(null)}),me.on("error",kt=>{ge(this,kt)}),me.on("close",()=>{this.destroy()}),me.on("destroy",()=>{this.destroy()}),this._read=()=>{Ie&&me.resume&&(Ie=!1,me.resume())};const _t=l(me);for(let kt=1;kt<_t.length;kt++){const Ot=_t[kt];this[Ot]===void 0&&typeof me[Ot]=="function"&&(this[Ot]=me[Ot].bind(me))}return this},ut.prototype[w]=function(){return bt(this)},ut.prototype.iterator=function(me){return me!==void 0&&ne(me,"options"),bt(this,me)};function bt(me,Ie){typeof me.read!="function"&&(me=ut.wrap(me,{objectMode:!0}));const _t=tn(me,Ie);return _t.stream=me,_t}async function*tn(me,Ie){let _t=pe;function kt(xr){this===me?(_t(),_t=pe):_t=xr}me.on("readable",kt);let Ot;const lr=A(me,{writable:!1},xr=>{Ot=xr?q(Ot,xr):null,_t(),_t=pe});try{for(;;){const xr=me.destroyed?null:me.read();if(xr!==null)yield xr;else{if(Ot)throw Ot;if(Ot===null)return;await new v(kt)}}}catch(xr){throw Ot=q(Ot,xr),Ot}finally{(Ot||(Ie==null?void 0:Ie.destroyOnReturn)!==!1)&&(Ot===void 0||me._readableState.autoDestroy)?M.destroyer(me,null):(me.off("readable",kt),lr())}}c(ut.prototype,{readable:{__proto__:null,get(){const me=this._readableState;return!!me&&me.readable!==!1&&!me.destroyed&&!me.errorEmitted&&!me.endEmitted},set(me){this._readableState&&(this._readableState.readable=!!me)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(me){this._readableState&&(this._readableState.flowing=me)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(me){this._readableState&&(this._readableState.destroyed=me)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),c(Lt.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[ae]!==!1},set(me){this[ae]=!!me}}}),ut._fromList=Wt;function Wt(me,Ie){if(Ie.length===0)return null;let _t;return Ie.objectMode?_t=Ie.buffer.shift():!me||me>=Ie.length?(Ie.decoder?_t=Ie.buffer.join(""):Ie.buffer.length===1?_t=Ie.buffer.first():_t=Ie.buffer.concat(Ie.length),Ie.buffer.clear()):_t=Ie.buffer.consume(me,Ie.decoder),_t}function cn(me){const Ie=me._readableState;L("endReadable",Ie.endEmitted),Ie.endEmitted||(Ie.ended=!0,r.nextTick(Wn,Ie,me))}function Wn(me,Ie){if(L("endReadableNT",me.endEmitted,me.length),!me.errored&&!me.closeEmitted&&!me.endEmitted&&me.length===0){if(me.endEmitted=!0,Ie.emit("end"),Ie.writable&&Ie.allowHalfOpen===!1)r.nextTick(Fn,Ie);else if(me.autoDestroy){const _t=Ie._writableState;(!_t||_t.autoDestroy&&(_t.finished||_t.writable===!1))&&Ie.destroy()}}}function Fn(me){me.writable&&!me.writableEnded&&!me.destroyed&&me.end()}ut.from=function(me,Ie){return le(ut,me,Ie)};let Qt;function Kn(){return Qt===void 0&&(Qt={}),Qt}return ut.fromWeb=function(me,Ie){return Kn().newStreamReadableFromReadableStream(me,Ie)},ut.toWeb=function(me,Ie){return Kn().newReadableStreamFromStreamReadable(me,Ie)},ut.wrap=function(me,Ie){var _t,kt;return new ut({objectMode:(_t=(kt=me.readableObjectMode)!==null&&kt!==void 0?kt:me.objectMode)!==null&&_t!==void 0?_t:!0,...Ie,destroy(Ot,lr){M.destroyer(me,Ot),lr(Ot)}}).wrap(me)},G3}var H3,_Q;function z3(){if(_Q)return H3;_Q=1;const r=Ip,{ArrayPrototypeSlice:t,Error:i,FunctionPrototypeSymbolHasInstance:a,ObjectDefineProperty:u,ObjectDefineProperties:c,ObjectSetPrototypeOf:l,StringPrototypeToLowerCase:h,Symbol:v,SymbolHasInstance:p}=Qi;H3=ne,ne.WritableState=G;const{EventEmitter:g}=sE,w=j3.Stream,{Buffer:_}=vh,E=Xb,{addAbortSignal:k}=hE,{getHighWaterMark:I,getDefaultHighWaterMark:C}=vE,{ERR_INVALID_ARG_TYPE:P,ERR_METHOD_NOT_IMPLEMENTED:A,ERR_MULTIPLE_CALLBACK:L,ERR_STREAM_CANNOT_PIPE:O,ERR_STREAM_DESTROYED:M,ERR_STREAM_ALREADY_FINISHED:B,ERR_STREAM_NULL_VALUES:F,ERR_STREAM_WRITE_AFTER_END:q,ERR_UNKNOWN_ENCODING:$}=ko.codes,{errorOrDestroy:Y}=E;l(ne.prototype,w.prototype),l(ne,w);function V(){}const U=v("kOnFinished");function G(ve,ke,je){typeof je!="boolean"&&(je=ke instanceof yh()),this.objectMode=!!(ve&&ve.objectMode),je&&(this.objectMode=this.objectMode||!!(ve&&ve.writableObjectMode)),this.highWaterMark=ve?I(this,ve,"writableHighWaterMark",je):C(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const qe=!!(ve&&ve.decodeStrings===!1);this.decodeStrings=!qe,this.defaultEncoding=ve&&ve.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=ge.bind(void 0,ke),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,X(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!ve||ve.emitClose!==!1,this.autoDestroy=!ve||ve.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[U]=[]}function X(ve){ve.buffered=[],ve.bufferedIndex=0,ve.allBuffers=!0,ve.allNoop=!0}G.prototype.getBuffer=function(){return t(this.buffered,this.bufferedIndex)},u(G.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function ne(ve){const ke=this instanceof yh();if(!ke&&!a(ne,this))return new ne(ve);this._writableState=new G(ve,this,ke),ve&&(typeof ve.write=="function"&&(this._write=ve.write),typeof ve.writev=="function"&&(this._writev=ve.writev),typeof ve.destroy=="function"&&(this._destroy=ve.destroy),typeof ve.final=="function"&&(this._final=ve.final),typeof ve.construct=="function"&&(this._construct=ve.construct),ve.signal&&k(ve.signal,this)),w.call(this,ve),E.construct(this,()=>{const je=this._writableState;je.writing||ye(this,je),Ue(this,je)})}u(ne,p,{__proto__:null,value:function(ve){return a(this,ve)?!0:this!==ne?!1:ve&&ve._writableState instanceof G}}),ne.prototype.pipe=function(){Y(this,new O)};function ae(ve,ke,je,qe){const Me=ve._writableState;if(typeof je=="function")qe=je,je=Me.defaultEncoding;else{if(!je)je=Me.defaultEncoding;else if(je!=="buffer"&&!_.isEncoding(je))throw new $(je);typeof qe!="function"&&(qe=V)}if(ke===null)throw new F;if(!Me.objectMode)if(typeof ke=="string")Me.decodeStrings!==!1&&(ke=_.from(ke,je),je="buffer");else if(ke instanceof _)je="buffer";else if(w._isUint8Array(ke))ke=w._uint8ArrayToBuffer(ke),je="buffer";else throw new P("chunk",["string","Buffer","Uint8Array"],ke);let ot;return Me.ending?ot=new q:Me.destroyed&&(ot=new M("write")),ot?(r.nextTick(qe,ot),Y(ve,ot,!0),ot):(Me.pendingcb++,oe(ve,Me,ke,je,qe))}ne.prototype.write=function(ve,ke,je){return ae(this,ve,ke,je)===!0},ne.prototype.cork=function(){this._writableState.corked++},ne.prototype.uncork=function(){const ve=this._writableState;ve.corked&&(ve.corked--,ve.writing||ye(this,ve))},ne.prototype.setDefaultEncoding=function(ke){if(typeof ke=="string"&&(ke=h(ke)),!_.isEncoding(ke))throw new $(ke);return this._writableState.defaultEncoding=ke,this};function oe(ve,ke,je,qe,Me){const ot=ke.objectMode?1:je.length;ke.length+=ot;const dt=ke.length<ke.highWaterMark;return dt||(ke.needDrain=!0),ke.writing||ke.corked||ke.errored||!ke.constructed?(ke.buffered.push({chunk:je,encoding:qe,callback:Me}),ke.allBuffers&&qe!=="buffer"&&(ke.allBuffers=!1),ke.allNoop&&Me!==V&&(ke.allNoop=!1)):(ke.writelen=ot,ke.writecb=Me,ke.writing=!0,ke.sync=!0,ve._write(je,qe,ke.onwrite),ke.sync=!1),dt&&!ke.errored&&!ke.destroyed}function le(ve,ke,je,qe,Me,ot,dt){ke.writelen=qe,ke.writecb=dt,ke.writing=!0,ke.sync=!0,ke.destroyed?ke.onwrite(new M("write")):je?ve._writev(Me,ke.onwrite):ve._write(Me,ot,ke.onwrite),ke.sync=!1}function pe(ve,ke,je,qe){--ke.pendingcb,qe(je),Ne(ke),Y(ve,je)}function ge(ve,ke){const je=ve._writableState,qe=je.sync,Me=je.writecb;if(typeof Me!="function"){Y(ve,new L);return}je.writing=!1,je.writecb=null,je.length-=je.writelen,je.writelen=0,ke?(ke.stack,je.errored||(je.errored=ke),ve._readableState&&!ve._readableState.errored&&(ve._readableState.errored=ke),qe?r.nextTick(pe,ve,je,ke,Me):pe(ve,je,ke,Me)):(je.buffered.length>je.bufferedIndex&&ye(ve,je),qe?je.afterWriteTickInfo!==null&&je.afterWriteTickInfo.cb===Me?je.afterWriteTickInfo.count++:(je.afterWriteTickInfo={count:1,cb:Me,stream:ve,state:je},r.nextTick(de,je.afterWriteTickInfo)):Se(ve,je,1,Me))}function de({stream:ve,state:ke,count:je,cb:qe}){return ke.afterWriteTickInfo=null,Se(ve,ke,je,qe)}function Se(ve,ke,je,qe){for(!ke.ending&&!ve.destroyed&&ke.length===0&&ke.needDrain&&(ke.needDrain=!1,ve.emit("drain"));je-- >0;)ke.pendingcb--,qe();ke.destroyed&&Ne(ke),Ue(ve,ke)}function Ne(ve){if(ve.writing)return;for(let Me=ve.bufferedIndex;Me<ve.buffered.length;++Me){var ke;const{chunk:ot,callback:dt}=ve.buffered[Me],pt=ve.objectMode?1:ot.length;ve.length-=pt,dt((ke=ve.errored)!==null&&ke!==void 0?ke:new M("write"))}const je=ve[U].splice(0);for(let Me=0;Me<je.length;Me++){var qe;je[Me]((qe=ve.errored)!==null&&qe!==void 0?qe:new M("end"))}X(ve)}function ye(ve,ke){if(ke.corked||ke.bufferProcessing||ke.destroyed||!ke.constructed)return;const{buffered:je,bufferedIndex:qe,objectMode:Me}=ke,ot=je.length-qe;if(!ot)return;let dt=qe;if(ke.bufferProcessing=!0,ot>1&&ve._writev){ke.pendingcb-=ot-1;const pt=ke.allNoop?V:ut=>{for(let $t=dt;$t<je.length;++$t)je[$t].callback(ut)},Lt=ke.allNoop&&dt===0?je:t(je,dt);Lt.allBuffers=ke.allBuffers,le(ve,ke,!0,ke.length,Lt,"",pt),X(ke)}else{do{const{chunk:pt,encoding:Lt,callback:ut}=je[dt];je[dt++]=null;const $t=Me?1:pt.length;le(ve,ke,!1,$t,pt,Lt,ut)}while(dt<je.length&&!ke.writing);dt===je.length?X(ke):dt>256?(je.splice(0,dt),ke.bufferedIndex=0):ke.bufferedIndex=dt}ke.bufferProcessing=!1}ne.prototype._write=function(ve,ke,je){if(this._writev)this._writev([{chunk:ve,encoding:ke}],je);else throw new A("_write()")},ne.prototype._writev=null,ne.prototype.end=function(ve,ke,je){const qe=this._writableState;typeof ve=="function"?(je=ve,ve=null,ke=null):typeof ke=="function"&&(je=ke,ke=null);let Me;if(ve!=null){const ot=ae(this,ve,ke);ot instanceof i&&(Me=ot)}return qe.corked&&(qe.corked=1,this.uncork()),Me||(!qe.errored&&!qe.ending?(qe.ending=!0,Ue(this,qe,!0),qe.ended=!0):qe.finished?Me=new B("end"):qe.destroyed&&(Me=new M("end"))),typeof je=="function"&&(Me||qe.finished?r.nextTick(je,Me):qe[U].push(je)),this};function we(ve){return ve.ending&&!ve.destroyed&&ve.constructed&&ve.length===0&&!ve.errored&&ve.buffered.length===0&&!ve.finished&&!ve.writing&&!ve.errorEmitted&&!ve.closeEmitted}function Pe(ve,ke){let je=!1;function qe(Me){if(je){Y(ve,Me??L());return}if(je=!0,ke.pendingcb--,Me){const ot=ke[U].splice(0);for(let dt=0;dt<ot.length;dt++)ot[dt](Me);Y(ve,Me,ke.sync)}else we(ke)&&(ke.prefinished=!0,ve.emit("prefinish"),ke.pendingcb++,r.nextTick(He,ve,ke))}ke.sync=!0,ke.pendingcb++;try{ve._final(qe)}catch(Me){qe(Me)}ke.sync=!1}function Fe(ve,ke){!ke.prefinished&&!ke.finalCalled&&(typeof ve._final=="function"&&!ke.destroyed?(ke.finalCalled=!0,Pe(ve,ke)):(ke.prefinished=!0,ve.emit("prefinish")))}function Ue(ve,ke,je){we(ke)&&(Fe(ve,ke),ke.pendingcb===0&&(je?(ke.pendingcb++,r.nextTick((qe,Me)=>{we(Me)?He(qe,Me):Me.pendingcb--},ve,ke)):we(ke)&&(ke.pendingcb++,He(ve,ke))))}function He(ve,ke){ke.pendingcb--,ke.finished=!0;const je=ke[U].splice(0);for(let qe=0;qe<je.length;qe++)je[qe]();if(ve.emit("finish"),ke.autoDestroy){const qe=ve._readableState;(!qe||qe.autoDestroy&&(qe.endEmitted||qe.readable===!1))&&ve.destroy()}}c(ne.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(ve){this._writableState&&(this._writableState.destroyed=ve)}},writable:{__proto__:null,get(){const ve=this._writableState;return!!ve&&ve.writable!==!1&&!ve.destroyed&&!ve.errored&&!ve.ending&&!ve.ended},set(ve){this._writableState&&(this._writableState.writable=!!ve)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){const ve=this._writableState;return ve?!ve.destroyed&&!ve.ending&&ve.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});const De=E.destroy;ne.prototype.destroy=function(ve,ke){const je=this._writableState;return!je.destroyed&&(je.bufferedIndex<je.buffered.length||je[U].length)&&r.nextTick(Ne,je),De.call(this,ve,ke),this},ne.prototype._undestroy=E.undestroy,ne.prototype._destroy=function(ve,ke){ke(ve)},ne.prototype[g.captureRejectionSymbol]=function(ve){this.destroy(ve)};let Ce;function Be(){return Ce===void 0&&(Ce={}),Ce}return ne.fromWeb=function(ve,ke){return Be().newStreamWritableFromWritableStream(ve,ke)},ne.toWeb=function(ve){return Be().newWritableStreamFromStreamWritable(ve)},H3}var V3,xQ;function _Se(){if(xQ)return V3;xQ=1;const r=Ip,t=vh,{isReadable:i,isWritable:a,isIterable:u,isNodeStream:c,isReadableNodeStream:l,isWritableNodeStream:h,isDuplexNodeStream:v,isReadableStream:p,isWritableStream:g}=bh,w=Hd,{AbortError:_,codes:{ERR_INVALID_ARG_TYPE:E,ERR_INVALID_RETURN_VALUE:k}}=ko,{destroyer:I}=Xb,C=yh(),P=pE(),A=z3(),{createDeferredPromise:L}=au,O=mQ,M=globalThis.Blob||t.Blob,B=typeof M<"u"?function(G){return G instanceof M}:function(G){return!1},F=globalThis.AbortController||fm().AbortController,{FunctionPrototypeCall:q}=Qi;class $ extends C{constructor(G){super(G),(G==null?void 0:G.readable)===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),(G==null?void 0:G.writable)===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}V3=function U(G,X){if(v(G))return G;if(l(G))return V({readable:G});if(h(G))return V({writable:G});if(c(G))return V({writable:!1,readable:!1});if(p(G))return V({readable:P.fromWeb(G)});if(g(G))return V({writable:A.fromWeb(G)});if(typeof G=="function"){const{value:ae,write:oe,final:le,destroy:pe}=Y(G);if(u(ae))return O($,ae,{objectMode:!0,write:oe,final:le,destroy:pe});const ge=ae==null?void 0:ae.then;if(typeof ge=="function"){let de;const Se=q(ge,ae,Ne=>{if(Ne!=null)throw new k("nully","body",Ne)},Ne=>{I(de,Ne)});return de=new $({objectMode:!0,readable:!1,write:oe,final(Ne){le(async()=>{try{await Se,r.nextTick(Ne,null)}catch(ye){r.nextTick(Ne,ye)}})},destroy:pe})}throw new k("Iterable, AsyncIterable or AsyncFunction",X,ae)}if(B(G))return U(G.arrayBuffer());if(u(G))return O($,G,{objectMode:!0,writable:!1});if(p(G==null?void 0:G.readable)&&g(G==null?void 0:G.writable))return $.fromWeb(G);if(typeof(G==null?void 0:G.writable)=="object"||typeof(G==null?void 0:G.readable)=="object"){const ae=G!=null&&G.readable?l(G==null?void 0:G.readable)?G==null?void 0:G.readable:U(G.readable):void 0,oe=G!=null&&G.writable?h(G==null?void 0:G.writable)?G==null?void 0:G.writable:U(G.writable):void 0;return V({readable:ae,writable:oe})}const ne=G==null?void 0:G.then;if(typeof ne=="function"){let ae;return q(ne,G,oe=>{oe!=null&&ae.push(oe),ae.push(null)},oe=>{I(ae,oe)}),ae=new $({objectMode:!0,writable:!1,read(){}})}throw new E(X,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],G)};function Y(U){let{promise:G,resolve:X}=L();const ne=new F,ae=ne.signal;return{value:U(async function*(){for(;;){const le=G;G=null;const{chunk:pe,done:ge,cb:de}=await le;if(r.nextTick(de),ge)return;if(ae.aborted)throw new _(void 0,{cause:ae.reason});({promise:G,resolve:X}=L()),yield pe}}(),{signal:ae}),write(le,pe,ge){const de=X;X=null,de({chunk:le,done:!1,cb:ge})},final(le){const pe=X;X=null,pe({done:!0,cb:le})},destroy(le,pe){ne.abort(),pe(le)}}}function V(U){const G=U.readable&&typeof U.readable.read!="function"?P.wrap(U.readable):U.readable,X=U.writable;let ne=!!i(G),ae=!!a(X),oe,le,pe,ge,de;function Se(Ne){const ye=ge;ge=null,ye?ye(Ne):Ne&&de.destroy(Ne)}return de=new $({readableObjectMode:!!(G!=null&&G.readableObjectMode),writableObjectMode:!!(X!=null&&X.writableObjectMode),readable:ne,writable:ae}),ae&&(w(X,Ne=>{ae=!1,Ne&&I(G,Ne),Se(Ne)}),de._write=function(Ne,ye,we){X.write(Ne,ye)?we():oe=we},de._final=function(Ne){X.end(),le=Ne},X.on("drain",function(){if(oe){const Ne=oe;oe=null,Ne()}}),X.on("finish",function(){if(le){const Ne=le;le=null,Ne()}})),ne&&(w(G,Ne=>{ne=!1,Ne&&I(G,Ne),Se(Ne)}),G.on("readable",function(){if(pe){const Ne=pe;pe=null,Ne()}}),G.on("end",function(){de.push(null)}),de._read=function(){for(;;){const Ne=G.read();if(Ne===null){pe=de._read;return}if(!de.push(Ne))return}}),de._destroy=function(Ne,ye){!Ne&&ge!==null&&(Ne=new _),pe=null,oe=null,le=null,ge===null?ye(Ne):(ge=ye,I(X,Ne),I(G,Ne))},de}return V3}var U3,EQ;function yh(){if(EQ)return U3;EQ=1;const{ObjectDefineProperties:r,ObjectGetOwnPropertyDescriptor:t,ObjectKeys:i,ObjectSetPrototypeOf:a}=Qi;U3=l;const u=pE(),c=z3();a(l.prototype,u.prototype),a(l,u);{const g=i(c.prototype);for(let w=0;w<g.length;w++){const _=g[w];l.prototype[_]||(l.prototype[_]=c.prototype[_])}}function l(g){if(!(this instanceof l))return new l(g);u.call(this,g),c.call(this,g),g?(this.allowHalfOpen=g.allowHalfOpen!==!1,g.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),g.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}r(l.prototype,{writable:{__proto__:null,...t(c.prototype,"writable")},writableHighWaterMark:{__proto__:null,...t(c.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...t(c.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...t(c.prototype,"writableBuffer")},writableLength:{__proto__:null,...t(c.prototype,"writableLength")},writableFinished:{__proto__:null,...t(c.prototype,"writableFinished")},writableCorked:{__proto__:null,...t(c.prototype,"writableCorked")},writableEnded:{__proto__:null,...t(c.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...t(c.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(g){this._readableState&&this._writableState&&(this._readableState.destroyed=g,this._writableState.destroyed=g)}}});let h;function v(){return h===void 0&&(h={}),h}l.fromWeb=function(g,w){return v().newStreamDuplexFromReadableWritablePair(g,w)},l.toWeb=function(g){return v().newReadableWritablePairFromDuplex(g)};let p;return l.from=function(g){return p||(p=_Se()),p(g,"body")},U3}const{ObjectSetPrototypeOf:kQ,Symbol:xSe}=Qi;var SQ=mh;const{ERR_METHOD_NOT_IMPLEMENTED:ESe}=ko.codes,Y3=yh(),{getHighWaterMark:kSe}=vE;kQ(mh.prototype,Y3.prototype),kQ(mh,Y3);const vm=xSe("kCallback");function mh(r){if(!(this instanceof mh))return new mh(r);const t=r?kSe(this,r,"readableHighWaterMark",!0):null;t===0&&(r={...r,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:r.writableHighWaterMark||0}),Y3.call(this,r),this._readableState.sync=!1,this[vm]=null,r&&(typeof r.transform=="function"&&(this._transform=r.transform),typeof r.flush=="function"&&(this._flush=r.flush)),this.on("prefinish",SSe)}function W3(r){typeof this._flush=="function"&&!this.destroyed?this._flush((t,i)=>{if(t){r?r(t):this.destroy(t);return}i!=null&&this.push(i),this.push(null),r&&r()}):(this.push(null),r&&r())}function SSe(){this._final!==W3&&W3.call(this)}mh.prototype._final=W3,mh.prototype._transform=function(r,t,i){throw new ESe("_transform()")},mh.prototype._write=function(r,t,i){const a=this._readableState,u=this._writableState,c=a.length;this._transform(r,t,(l,h)=>{if(l){i(l);return}h!=null&&this.push(h),u.ended||c===a.length||a.length<a.highWaterMark?i():this[vm]=i})},mh.prototype._read=function(){if(this[vm]){const r=this[vm];this[vm]=null,r()}};const{ObjectSetPrototypeOf:TQ}=Qi;var RQ=Jb;const K3=SQ;TQ(Jb.prototype,K3.prototype),TQ(Jb,K3);function Jb(r){if(!(this instanceof Jb))return new Jb(r);K3.call(this,r)}Jb.prototype._transform=function(r,t,i){i(null,r)};const pm=Ip,{ArrayIsArray:TSe,Promise:RSe,SymbolAsyncIterator:ISe,SymbolDispose:CSe}=Qi,gE=Hd,{once:ASe}=au,PSe=Xb,IQ=yh(),{aggregateTwoErrors:LSe,codes:{ERR_INVALID_ARG_TYPE:X3,ERR_INVALID_RETURN_VALUE:J3,ERR_MISSING_ARGS:NSe,ERR_STREAM_DESTROYED:OSe,ERR_STREAM_PREMATURE_CLOSE:DSe},AbortError:MSe}=ko,{validateFunction:jSe,validateAbortSignal:BSe}=hm,{isIterable:Ap,isReadable:Q3,isReadableNodeStream:bE,isNodeStream:CQ,isTransformStream:Qb,isWebStream:qSe,isReadableStream:Z3,isReadableFinished:FSe}=bh,$Se=globalThis.AbortController||fm().AbortController;let ej,tj,nj;function AQ(r,t,i){let a=!1;r.on("close",()=>{a=!0});const u=gE(r,{readable:t,writable:i},c=>{a=!c});return{destroy:c=>{a||(a=!0,PSe.destroyer(r,c||new OSe("pipe")))},cleanup:u}}function GSe(r){return jSe(r[r.length-1],"streams[stream.length - 1]"),r.pop()}function rj(r){if(Ap(r))return r;if(bE(r))return HSe(r);throw new X3("val",["Readable","Iterable","AsyncIterable"],r)}async function*HSe(r){tj||(tj=pE()),yield*tj.prototype[ISe].call(r)}async function yE(r,t,i,{end:a}){let u,c=null;const l=p=>{if(p&&(u=p),c){const g=c;c=null,g()}},h=()=>new RSe((p,g)=>{u?g(u):c=()=>{u?g(u):p()}});t.on("drain",l);const v=gE(t,{readable:!1},l);try{t.writableNeedDrain&&await h();for await(const p of r)t.write(p)||await h();a&&(t.end(),await h()),i()}catch(p){i(u!==p?LSe(u,p):p)}finally{v(),t.off("drain",l)}}async function ij(r,t,i,{end:a}){Qb(t)&&(t=t.writable);const u=t.getWriter();try{for await(const c of r)await u.ready,u.write(c).catch(()=>{});await u.ready,a&&await u.close(),i()}catch(c){try{await u.abort(c),i(c)}catch(l){i(l)}}}function zSe(...r){return PQ(r,ASe(GSe(r)))}function PQ(r,t,i){if(r.length===1&&TSe(r[0])&&(r=r[0]),r.length<2)throw new NSe("streams");const a=new $Se,u=a.signal,c=i==null?void 0:i.signal,l=[];BSe(c,"options.signal");function h(){k(new MSe)}nj=nj||au.addAbortListener;let v;c&&(v=nj(c,h));let p,g;const w=[];let _=0;function E(A){k(A,--_===0)}function k(A,L){var O;if(A&&(!p||p.code==="ERR_STREAM_PREMATURE_CLOSE")&&(p=A),!(!p&&!L)){for(;w.length;)w.shift()(p);(O=v)===null||O===void 0||O[CSe](),a.abort(),L&&(p||l.forEach(M=>M()),pm.nextTick(t,p,g))}}let I;for(let A=0;A<r.length;A++){const L=r[A],O=A<r.length-1,M=A>0,B=O||(i==null?void 0:i.end)!==!1,F=A===r.length-1;if(CQ(L)){let q=function($){$&&$.name!=="AbortError"&&$.code!=="ERR_STREAM_PREMATURE_CLOSE"&&E($)};if(B){const{destroy:$,cleanup:Y}=AQ(L,O,M);w.push($),Q3(L)&&F&&l.push(Y)}L.on("error",q),Q3(L)&&F&&l.push(()=>{L.removeListener("error",q)})}if(A===0)if(typeof L=="function"){if(I=L({signal:u}),!Ap(I))throw new J3("Iterable, AsyncIterable or Stream","source",I)}else Ap(L)||bE(L)||Qb(L)?I=L:I=IQ.from(L);else if(typeof L=="function"){if(Qb(I)){var C;I=rj((C=I)===null||C===void 0?void 0:C.readable)}else I=rj(I);if(I=L(I,{signal:u}),O){if(!Ap(I,!0))throw new J3("AsyncIterable",`transform[${A-1}]`,I)}else{var P;ej||(ej=RQ);const q=new ej({objectMode:!0}),$=(P=I)===null||P===void 0?void 0:P.then;if(typeof $=="function")_++,$.call(I,U=>{g=U,U!=null&&q.write(U),B&&q.end(),pm.nextTick(E)},U=>{q.destroy(U),pm.nextTick(E,U)});else if(Ap(I,!0))_++,yE(I,q,E,{end:B});else if(Z3(I)||Qb(I)){const U=I.readable||I;_++,yE(U,q,E,{end:B})}else throw new J3("AsyncIterable or Promise","destination",I);I=q;const{destroy:Y,cleanup:V}=AQ(I,!1,!0);w.push(Y),F&&l.push(V)}}else if(CQ(L)){if(bE(I)){_+=2;const q=VSe(I,L,E,{end:B});Q3(L)&&F&&l.push(q)}else if(Qb(I)||Z3(I)){const q=I.readable||I;_++,yE(q,L,E,{end:B})}else if(Ap(I))_++,yE(I,L,E,{end:B});else throw new X3("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],I);I=L}else if(qSe(L)){if(bE(I))_++,ij(rj(I),L,E,{end:B});else if(Z3(I)||Ap(I))_++,ij(I,L,E,{end:B});else if(Qb(I))_++,ij(I.readable,L,E,{end:B});else throw new X3("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],I);I=L}else I=IQ.from(L)}return(u!=null&&u.aborted||c!=null&&c.aborted)&&pm.nextTick(h),I}function VSe(r,t,i,{end:a}){let u=!1;if(t.on("close",()=>{u||i(new DSe)}),r.pipe(t,{end:!1}),a){let c=function(){u=!0,t.end()};FSe(r)?pm.nextTick(c):r.once("end",c)}else i();return gE(r,{readable:!0,writable:!1},c=>{const l=r._readableState;c&&c.code==="ERR_STREAM_PREMATURE_CLOSE"&&l&&l.ended&&!l.errored&&!l.errorEmitted?r.once("end",i).once("error",i):i(c)}),gE(t,{readable:!1,writable:!0},i)}var aj={pipelineImpl:PQ,pipeline:zSe};const{pipeline:USe}=aj,mE=yh(),{destroyer:YSe}=Xb,{isNodeStream:wE,isReadable:LQ,isWritable:NQ,isWebStream:sj,isTransformStream:Pp,isWritableStream:OQ,isReadableStream:DQ}=bh,{AbortError:WSe,codes:{ERR_INVALID_ARG_VALUE:MQ,ERR_MISSING_ARGS:KSe}}=ko,XSe=Hd;var jQ=function(...t){if(t.length===0)throw new KSe("streams");if(t.length===1)return mE.from(t[0]);const i=[...t];if(typeof t[0]=="function"&&(t[0]=mE.from(t[0])),typeof t[t.length-1]=="function"){const E=t.length-1;t[E]=mE.from(t[E])}for(let E=0;E<t.length;++E)if(!(!wE(t[E])&&!sj(t[E]))){if(E<t.length-1&&!(LQ(t[E])||DQ(t[E])||Pp(t[E])))throw new MQ(`streams[${E}]`,i[E],"must be readable");if(E>0&&!(NQ(t[E])||OQ(t[E])||Pp(t[E])))throw new MQ(`streams[${E}]`,i[E],"must be writable")}let a,u,c,l,h;function v(E){const k=l;l=null,k?k(E):E?h.destroy(E):!_&&!w&&h.destroy()}const p=t[0],g=USe(t,v),w=!!(NQ(p)||OQ(p)||Pp(p)),_=!!(LQ(g)||DQ(g)||Pp(g));if(h=new mE({writableObjectMode:!!(p!=null&&p.writableObjectMode),readableObjectMode:!!(g!=null&&g.readableObjectMode),writable:w,readable:_}),w){if(wE(p))h._write=function(k,I,C){p.write(k,I)?C():a=C},h._final=function(k){p.end(),u=k},p.on("drain",function(){if(a){const k=a;a=null,k()}});else if(sj(p)){const I=(Pp(p)?p.writable:p).getWriter();h._write=async function(C,P,A){try{await I.ready,I.write(C).catch(()=>{}),A()}catch(L){A(L)}},h._final=async function(C){try{await I.ready,I.close().catch(()=>{}),u=C}catch(P){C(P)}}}const E=Pp(g)?g.readable:g;XSe(E,()=>{if(u){const k=u;u=null,k()}})}if(_){if(wE(g))g.on("readable",function(){if(c){const E=c;c=null,E()}}),g.on("end",function(){h.push(null)}),h._read=function(){for(;;){const E=g.read();if(E===null){c=h._read;return}if(!h.push(E))return}};else if(sj(g)){const k=(Pp(g)?g.readable:g).getReader();h._read=async function(){for(;;)try{const{value:I,done:C}=await k.read();if(!h.push(I))return;if(C){h.push(null);return}}catch{return}}}}return h._destroy=function(E,k){!E&&l!==null&&(E=new WSe),c=null,a=null,u=null,l===null?k(E):(l=k,wE(g)&&YSe(g,E))},h};const JSe=globalThis.AbortController||fm().AbortController,{codes:{ERR_INVALID_ARG_VALUE:QSe,ERR_INVALID_ARG_TYPE:gm,ERR_MISSING_ARGS:ZSe,ERR_OUT_OF_RANGE:eTe},AbortError:sf}=ko,{validateAbortSignal:Lp,validateInteger:BQ,validateObject:Np}=hm,tTe=Qi.Symbol("kWeak"),nTe=Qi.Symbol("kResistStopPropagation"),{finished:rTe}=Hd,iTe=jQ,{addAbortSignalNoValidate:aTe}=hE,{isWritable:sTe,isNodeStream:oTe}=bh,{deprecate:uTe}=au,{ArrayPrototypePush:cTe,Boolean:lTe,MathFloor:qQ,Number:fTe,NumberIsNaN:hTe,Promise:FQ,PromiseReject:$Q,PromiseResolve:dTe,PromisePrototypeThen:GQ,Symbol:HQ}=Qi,_E=HQ("kEmpty"),zQ=HQ("kEof");function vTe(r,t){if(t!=null&&Np(t,"options"),(t==null?void 0:t.signal)!=null&&Lp(t.signal,"options.signal"),oTe(r)&&!sTe(r))throw new QSe("stream",r,"must be writable");const i=iTe(this,r);return t!=null&&t.signal&&aTe(t.signal,i),i}function xE(r,t){if(typeof r!="function")throw new gm("fn",["Function","AsyncFunction"],r);t!=null&&Np(t,"options"),(t==null?void 0:t.signal)!=null&&Lp(t.signal,"options.signal");let i=1;(t==null?void 0:t.concurrency)!=null&&(i=qQ(t.concurrency));let a=i-1;return(t==null?void 0:t.highWaterMark)!=null&&(a=qQ(t.highWaterMark)),BQ(i,"options.concurrency",1),BQ(a,"options.highWaterMark",0),a+=i,(async function*(){const c=au.AbortSignalAny([t==null?void 0:t.signal].filter(lTe)),l=this,h=[],v={signal:c};let p,g,w=!1,_=0;function E(){w=!0,k()}function k(){_-=1,I()}function I(){g&&!w&&_<i&&h.length<a&&(g(),g=null)}async function C(){try{for await(let P of l){if(w)return;if(c.aborted)throw new sf;try{if(P=r(P,v),P===_E)continue;P=dTe(P)}catch(A){P=$Q(A)}_+=1,GQ(P,k,E),h.push(P),p&&(p(),p=null),!w&&(h.length>=a||_>=i)&&await new FQ(A=>{g=A})}h.push(zQ)}catch(P){const A=$Q(P);GQ(A,k,E),h.push(A)}finally{w=!0,p&&(p(),p=null)}}C();try{for(;;){for(;h.length>0;){const P=await h[0];if(P===zQ)return;if(c.aborted)throw new sf;P!==_E&&(yield P),h.shift(),I()}await new FQ(P=>{p=P})}}finally{w=!0,g&&(g(),g=null)}}).call(this)}function pTe(r=void 0){return r!=null&&Np(r,"options"),(r==null?void 0:r.signal)!=null&&Lp(r.signal,"options.signal"),(async function*(){let i=0;for await(const u of this){var a;if(r!=null&&(a=r.signal)!==null&&a!==void 0&&a.aborted)throw new sf({cause:r.signal.reason});yield[i++,u]}}).call(this)}async function VQ(r,t=void 0){for await(const i of oj.call(this,r,t))return!0;return!1}async function gTe(r,t=void 0){if(typeof r!="function")throw new gm("fn",["Function","AsyncFunction"],r);return!await VQ.call(this,async(...i)=>!await r(...i),t)}async function bTe(r,t){for await(const i of oj.call(this,r,t))return i}async function yTe(r,t){if(typeof r!="function")throw new gm("fn",["Function","AsyncFunction"],r);async function i(a,u){return await r(a,u),_E}for await(const a of xE.call(this,i,t));}function oj(r,t){if(typeof r!="function")throw new gm("fn",["Function","AsyncFunction"],r);async function i(a,u){return await r(a,u)?a:_E}return xE.call(this,i,t)}class mTe extends ZSe{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}async function wTe(r,t,i){var a;if(typeof r!="function")throw new gm("reducer",["Function","AsyncFunction"],r);i!=null&&Np(i,"options"),(i==null?void 0:i.signal)!=null&&Lp(i.signal,"options.signal");let u=arguments.length>1;if(i!=null&&(a=i.signal)!==null&&a!==void 0&&a.aborted){const p=new sf(void 0,{cause:i.signal.reason});throw this.once("error",()=>{}),await rTe(this.destroy(p)),p}const c=new JSe,l=c.signal;if(i!=null&&i.signal){const p={once:!0,[tTe]:this,[nTe]:!0};i.signal.addEventListener("abort",()=>c.abort(),p)}let h=!1;try{for await(const p of this){var v;if(h=!0,i!=null&&(v=i.signal)!==null&&v!==void 0&&v.aborted)throw new sf;u?t=await r(t,p,{signal:l}):(t=p,u=!0)}if(!h&&!u)throw new mTe}finally{c.abort()}return t}async function _Te(r){r!=null&&Np(r,"options"),(r==null?void 0:r.signal)!=null&&Lp(r.signal,"options.signal");const t=[];for await(const a of this){var i;if(r!=null&&(i=r.signal)!==null&&i!==void 0&&i.aborted)throw new sf(void 0,{cause:r.signal.reason});cTe(t,a)}return t}function xTe(r,t){const i=xE.call(this,r,t);return(async function*(){for await(const u of i)yield*u}).call(this)}function UQ(r){if(r=fTe(r),hTe(r))return 0;if(r<0)throw new eTe("number",">= 0",r);return r}function ETe(r,t=void 0){return t!=null&&Np(t,"options"),(t==null?void 0:t.signal)!=null&&Lp(t.signal,"options.signal"),r=UQ(r),(async function*(){var a;if(t!=null&&(a=t.signal)!==null&&a!==void 0&&a.aborted)throw new sf;for await(const c of this){var u;if(t!=null&&(u=t.signal)!==null&&u!==void 0&&u.aborted)throw new sf;r--<=0&&(yield c)}}).call(this)}function kTe(r,t=void 0){return t!=null&&Np(t,"options"),(t==null?void 0:t.signal)!=null&&Lp(t.signal,"options.signal"),r=UQ(r),(async function*(){var a;if(t!=null&&(a=t.signal)!==null&&a!==void 0&&a.aborted)throw new sf;for await(const c of this){var u;if(t!=null&&(u=t.signal)!==null&&u!==void 0&&u.aborted)throw new sf;if(r-- >0&&(yield c),r<=0)return}}).call(this)}x3.streamReturningOperators={asIndexedPairs:uTe(pTe,"readable.asIndexedPairs will be removed in a future version."),drop:ETe,filter:oj,flatMap:xTe,map:xE,take:kTe,compose:vTe},x3.promiseReturningOperators={every:gTe,forEach:yTe,reduce:wTe,toArray:_Te,some:VQ,find:bTe};var uj,YQ;function WQ(){if(YQ)return uj;YQ=1;const{ArrayPrototypePop:r,Promise:t}=Qi,{isIterable:i,isNodeStream:a,isWebStream:u}=bh,{pipelineImpl:c}=aj,{finished:l}=Hd;XQ();function h(...v){return new t((p,g)=>{let w,_;const E=v[v.length-1];if(E&&typeof E=="object"&&!a(E)&&!i(E)&&!u(E)){const k=r(v);w=k.signal,_=k.end}c(v,(k,I)=>{k?g(k):p(I)},{signal:w,end:_})})}return uj={finished:l,pipeline:h},uj}var KQ;function XQ(){if(KQ)return w3.exports;KQ=1;const{Buffer:r}=vh,{ObjectDefineProperty:t,ObjectKeys:i,ReflectApply:a}=Qi,{promisify:{custom:u}}=au,{streamReturningOperators:c,promiseReturningOperators:l}=x3,{codes:{ERR_ILLEGAL_CONSTRUCTOR:h}}=ko,v=jQ,{setDefaultHighWaterMark:p,getDefaultHighWaterMark:g}=vE,{pipeline:w}=aj,{destroyer:_}=Xb,E=Hd,k=WQ(),I=bh,C=w3.exports=j3.Stream;C.isDestroyed=I.isDestroyed,C.isDisturbed=I.isDisturbed,C.isErrored=I.isErrored,C.isReadable=I.isReadable,C.isWritable=I.isWritable,C.Readable=pE();for(const A of i(c)){let O=function(...M){if(new.target)throw h();return C.Readable.from(a(L,this,M))};const L=c[A];t(O,"name",{__proto__:null,value:L.name}),t(O,"length",{__proto__:null,value:L.length}),t(C.Readable.prototype,A,{__proto__:null,value:O,enumerable:!1,configurable:!0,writable:!0})}for(const A of i(l)){let O=function(...M){if(new.target)throw h();return a(L,this,M)};const L=l[A];t(O,"name",{__proto__:null,value:L.name}),t(O,"length",{__proto__:null,value:L.length}),t(C.Readable.prototype,A,{__proto__:null,value:O,enumerable:!1,configurable:!0,writable:!0})}C.Writable=z3(),C.Duplex=yh(),C.Transform=SQ,C.PassThrough=RQ,C.pipeline=w;const{addAbortSignal:P}=hE;return C.addAbortSignal=P,C.finished=E,C.destroy=_,C.compose=v,C.setDefaultHighWaterMark=p,C.getDefaultHighWaterMark=g,t(C,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return k}}),t(w,u,{__proto__:null,enumerable:!0,get(){return k.pipeline}}),t(E,u,{__proto__:null,enumerable:!0,get(){return k.finished}}),C.Stream=C,C._isUint8Array=function(L){return L instanceof Uint8Array},C._uint8ArrayToBuffer=function(L){return r.from(L.buffer,L.byteOffset,L.byteLength)},w3.exports}(function(r){const t=XQ(),i=WQ(),a=t.Readable.destroy;r.exports=t.Readable,r.exports._uint8ArrayToBuffer=t._uint8ArrayToBuffer,r.exports._isUint8Array=t._isUint8Array,r.exports.isDisturbed=t.isDisturbed,r.exports.isErrored=t.isErrored,r.exports.isReadable=t.isReadable,r.exports.Readable=t.Readable,r.exports.Writable=t.Writable,r.exports.Duplex=t.Duplex,r.exports.Transform=t.Transform,r.exports.PassThrough=t.PassThrough,r.exports.addAbortSignal=t.addAbortSignal,r.exports.finished=t.finished,r.exports.destroy=t.destroy,r.exports.destroy=a,r.exports.pipeline=t.pipeline,r.exports.compose=t.compose,Object.defineProperty(t,"promises",{configurable:!0,enumerable:!0,get(){return i}}),r.exports.Stream=t.Stream,r.exports.default=r.exports})(vEe);const{namedNode:zd,blankNode:cj,literal:EE,defaultGraph:Op,quad:Dp}=g3,Lu="http://www.w3.org/1999/02/22-rdf-syntax-ns#",lj="http://www.w3.org/2000/01/rdf-schema#",JQ="http://www.w3.org/2001/XMLSchema#",STe="http://www.w3.org/2002/07/owl#",bm="http://www.w3.org/XML/1998/namespace",kE=Lu+"type",QQ=JQ+"string",TTe=Lu+"langString";let fj=null;async function hj(){return fj||(fj=Promise.resolve().then(()=>QIe).then(r=>{const t=r.default??r;return t.documentLoader=async i=>{throw new Error(`Remote JSON-LD context loading is disabled. Inline your @context instead of referencing: ${i}`)},t})),fj}function RTe(r,t){const i=new Set;for(const[a,u]of Object.entries(r))if(typeof u=="object"&&u!==null&&u["@type"]==="@id"){i.add(a);const c=Fa(a,t);c&&c!==a&&i.add(c)}return i}function dj(r,{edgeTypes:t=[]}={}){var _,E;const i=r.context||{},a=((_=r.elements)==null?void 0:_.nodes)||[],u=((E=r.elements)==null?void 0:E.edges)||[],c={...$d,...i},l=RTe(i,c),h=new Map;for(const{data:k}of a)h.set(k.id,k["@id"]||k.id);const v=new Map;function p(k){return v.has(k)||v.set(k,{"@id":k}),v.get(k)}function g(k,I,C){I in k?Array.isArray(k[I])?k[I].push(C):k[I]=[k[I],C]:k[I]=C}for(const{data:k}of a){const I=k["@id"]||k.id,C=p(I);let P=!1;for(const[A,L]of Object.entries(k)){if(X2.has(A)||A==="@id"||L===""||L===null||L===void 0)continue;if(A==="@type"){C["@type"]=String(L);continue}const O=Fa(A,c);O===lj+"label"&&(P=!0),l.has(A)||l.has(O)?g(C,A,{"@id":String(L)}):g(C,A,String(L))}!P&&k.label&&g(C,"rdfs:label",k.label)}const w=[];for(const{data:k}of u){const I=h.get(k.source),C=h.get(k.target);if(!(!I||!C))if(k["@type"]){const P=zX(k,t,c),A=k["@id"]||`_:e${k.id}`,L=p(A),O=new Set(X2);P!=null&&P.source_property&&O.add(P.source_property),P!=null&&P.target_property&&O.add(P.target_property),P!=null&&P.reverse_source_property&&O.add(P.reverse_source_property);let M=!1;for(const[B,F]of Object.entries(k)){if(O.has(B)||B==="@id"||F===""||F===null||F===void 0)continue;if(B==="@type"){L["@type"]=String(F);continue}const q=Fa(B,c);q===lj+"label"&&(M=!0),l.has(B)||l.has(q)?g(L,B,{"@id":String(F)}):g(L,B,String(F))}!M&&k.label&&g(L,"rdfs:label",k.label),P!=null&&P.source_property&&g(L,P.source_property,{"@id":I}),P!=null&&P.target_property&&g(L,P.target_property,{"@id":C}),P!=null&&P.reverse_source_property&&w.push([I,P.reverse_source_property,{"@id":A}])}else k["@id"]&&g(p(I),k["@id"],{"@id":C})}for(const[k,I,C]of w)g(p(k),I,C);return{"@context":i,"@graph":[...v.values()]}}function ZQ(r){const t=[];for(const i of r||[]){const a=i["@id"];if(a){for(const u of i["@type"]||[])t.push([a,kE,u]);for(const[u,c]of Object.entries(i))if(!(u==="@id"||u==="@type")){for(const l of Array.isArray(c)?c:[c])if(l["@id"]!==void 0)t.push([a,u,l["@id"]]);else if("@value"in l){const h={value:String(l["@value"])};l["@language"]?h.language=l["@language"]:l["@type"]&&l["@type"]!==QQ&&l["@type"]!==TTe&&(h.datatype=l["@type"]),t.push([a,u,h])}}}}return t}async function ITe(r,t={}){const i=await hj(),a=typeof r["@context"]=="object"&&!Array.isArray(r["@context"])?r["@context"]:{},u=t.context||{},c={...a,...u},l={};for(const[p,g]of Object.entries(c))!p.startsWith("@")&&typeof g=="string"&&(l[p]=g);const h=await i.expand(r),v=ZQ(h);return h3(v,l,{...t,context:c})}function CTe(r,t){return new Promise((i,a)=>{const u=[];new sm({format:t}).parse(r,(l,h,v)=>{if(l)return a(l);h?u.push(h):i({quads:u,prefixes:v||{}})})})}function ATe(r){return new Promise((t,i)=>{const a=new dEe({format:"N-Triples"});a.addQuads(r),a.end((u,c)=>u?i(u):t(c))})}function PTe(r,t){const i=t||{},a={rdf:Lu,rdfs:lj,xsd:JQ,owl:STe};for(const[E,k]of Object.entries(i))!E.startsWith("@")&&typeof k=="string"&&(a[E]=k);function u(E){for(const[k,I]of Object.entries(a))if(E.startsWith(I)){const C=E.slice(I.length);if(C&&/^[A-Za-z_][\w.\-]*$/.test(C))return{prefix:k,local:C}}return null}const c=E=>{const k=u(E);return k?`${k.prefix}:${k.local}`:null},l=E=>String(E).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),h=new Map,v=[];for(const E of r){const k=E.subject.termType==="BlankNode"?"_:"+E.subject.value:E.subject.value;h.has(k)||(h.set(k,new Map),v.push(k));const I=h.get(k);I.has(E.predicate.value)||I.set(E.predicate.value,[]),I.get(E.predicate.value).push(E.object)}const p=new Set(["rdf"]),g=E=>{const k=u(E);k&&p.add(k.prefix)};for(const[E,k]of h){E.startsWith("_:")||g(E);for(const[I,C]of k){g(I);for(const P of C)P.termType==="NamedNode"&&g(P.value),P.datatype&&g(P.datatype.value)}}let _=`<?xml version="1.0" encoding="UTF-8"?>
543
+ <rdf:RDF
544
+ ${[...p].filter(E=>a[E]).map(E=>` xmlns:${E}="${l(a[E])}"`).join(`
545
+ `)}>
546
+
547
+ `;for(const E of v){const k=h.get(E),I=E.startsWith("_:"),C=k.get(kE)||[],P=C[0]?c(C[0].value):null,A=P||"rdf:Description",L=I?`rdf:nodeID="${l(E.slice(2))}"`:`rdf:about="${l(E)}"`;_+=` <${A} ${L}>
548
+ `;for(const[O,M]of k){if(O===kE&&P)continue;const B=c(O)||`<${O}>`;for(const F of M)if(F.termType==="NamedNode")_+=` <${B} rdf:resource="${l(F.value)}"/>
549
+ `;else if(F.termType==="BlankNode")_+=` <${B} rdf:nodeID="${l(F.value)}"/>
550
+ `;else{const q=F.language?` xml:lang="${l(F.language)}"`:F.datatype&&F.datatype.value!==QQ?` rdf:datatype="${l(F.datatype.value)}"`:"";_+=` <${B}${q}>${l(F.value)}</${B}>
551
+ `}}_+=` </${A}>
552
+
553
+ `}return _+=`</rdf:RDF>
554
+ `,_}function LTe(r){const t=new DOMParser().parseFromString(r,"application/xml"),i=t.querySelector("parseerror, parsererror");if(i)throw new Error("RDF/XML parse error: "+i.textContent.trim());const a=t.documentElement,u=[];let c=0;const l=()=>cj("b"+ ++c),h=new Map;function v(A){if(h.has(A))return h.get(A);const L=A.parentElement?{...v(A.parentElement)}:{};for(const O of A.attributes)O.name==="xmlns"?L[""]=O.value:O.name.startsWith("xmlns:")&&(L[O.name.slice(6)]=O.value);return h.set(A,L),L}function p(A,L){const O=A.name.indexOf(":");if(O===-1)return A.name;const M=A.name.slice(0,O),B=A.name.slice(O+1);return M==="xml"?bm+B:L[M]?L[M]+B:A.name}const g=A=>A.namespaceURI?A.namespaceURI+A.localName:A.tagName;function w(A,L){if(!A)return A;if(A.startsWith("#")&&L)return L.split("#")[0]+A;if(!A.includes(":")&&L)try{return new URL(A,L).href}catch{return A}return A}const _=Lu+"Description",E=Lu+"RDF";function k(A,L){const O=A.getAttributeNS(bm,"base")||L,M=A.getAttributeNS(Lu,"about")??A.getAttribute("rdf:about"),B=A.getAttributeNS(Lu,"ID")??A.getAttribute("rdf:ID"),F=A.getAttributeNS(Lu,"nodeID")??A.getAttribute("rdf:nodeID");let q;M!==null?q=zd(w(M,O)||M):B!==null?q=zd(w("#"+B,O)||"#"+B):F!==null?q=cj(F):q=l();const $=g(A);$!==_&&$!==E&&u.push(Dp(q,zd(kE),zd($),Op()));for(const Y of A.attributes){const V=p(Y,v(A));V.startsWith(Lu)||Y.name.startsWith("xmlns")||Y.name.startsWith("xml:")||u.push(Dp(q,zd(V),EE(Y.value),Op()))}for(const Y of A.children)I(Y,q,O);return q}function I(A,L,O){const M=A.getAttributeNS(bm,"base")||O,B=zd(g(A)),F=A.getAttributeNS(Lu,"resource")??A.getAttribute("rdf:resource"),q=A.getAttributeNS(Lu,"nodeID")??A.getAttribute("rdf:nodeID"),$=A.getAttributeNS(Lu,"datatype")??A.getAttribute("rdf:datatype"),Y=A.getAttributeNS(bm,"lang")??A.getAttribute("xml:lang"),V=A.getAttributeNS(Lu,"parseType")??A.getAttribute("rdf:parseType");if(F!==null)u.push(Dp(L,B,zd(w(F,M)||F),Op()));else if(q!==null)u.push(Dp(L,B,cj(q),Op()));else if(V==="Resource"){const U=l();u.push(Dp(L,B,U,Op()));for(const G of A.children)I(G,U,M)}else if(A.children.length===1){const U=k(A.children[0],M);u.push(Dp(L,B,U,Op()))}else if(A.children.length>1)for(const U of A.children)k(U,M);else{const U=Y?EE(A.textContent,Y):$?EE(A.textContent,zd($)):EE(A.textContent);u.push(Dp(L,B,U,Op()))}}const C=a.getAttributeNS(bm,"base")||null;if(g(a)===E)for(const A of a.children)k(A,C);else k(a,C);const P={};for(const A of t.getElementsByTagName("*"))for(const L of A.attributes)if(L.name.startsWith("xmlns:")&&L.value){const O=L.name.slice(6);P[O]||(P[O]=L.value)}return{quads:u,prefixes:P}}async function eZ(r,t){const a=dj(r,{edgeTypes:(t||{}).edgeTypes||[]});return JSON.stringify(a,null,2)}async function tZ(r,t){const i=t||{};let a;try{a=JSON.parse(r)}catch(u){throw new Error("Invalid JSON-LD: "+u.message)}return ITe(a,i)}async function nZ(r,t){const i=t||{},a=await hj(),u=Object.assign({},r.context,i.context),c=dj(r,{edgeTypes:i.edgeTypes||[]}),l=await a.toRDF(c,{format:"application/n-quads"}),{quads:h}=await CTe(l,"N-Quads");return PTe(h,u)}async function rZ(r,t){const i=t||{},a=await hj(),{quads:u,prefixes:c}=LTe(r),l=await ATe(u),h=await a.fromRDF(l,{format:"application/n-quads"}),v=ZQ(Array.isArray(h)?h:[]);return h3(v,c,i)}const NTe={name:"JSON-LD",extension:".jsonld",mimeType:"application/ld+json",async export(r,t){const i=t||{},a=r.exportGraph();return eZ(a,{context:r.context||{},edgeTypes:r.getEdgeTypes?r.getEdgeTypes():[],...i})}},OTe={name:"JSON-LD",extensions:[".jsonld",".json"],mimeTypes:["application/ld+json","application/json"],async import(r,t){return tZ(r,t||{})}},DTe={name:"RDF/XML",extension:".rdf",mimeType:"application/rdf+xml",async export(r,t){const i=t||{},a=r.exportGraph();return nZ(a,{context:r.context||{},edgeTypes:r.getEdgeTypes?r.getEdgeTypes():[],...i})}},MTe={name:"RDF/XML",extensions:[".rdf",".owl",".xml"],mimeTypes:["application/rdf+xml","application/owl+xml","text/xml"],async import(r,t){return rZ(r,t||{})}};var iZ={},vj=class _pe{constructor(t,i=new Map,a=0){this.prefix=t,this._existing=i,this.counter=a}clone(){const{prefix:t,_existing:i,counter:a}=this;return new _pe(t,new Map(i),a)}getId(t){const i=t&&this._existing.get(t);if(i)return i;const a=this.prefix+this.counter;return this.counter++,t&&this._existing.set(t,a),a}hasId(t){return this._existing.has(t)}getOldIds(){return[...this._existing.keys()]}},ym={};(function(r,t){if(r.setImmediate)return;var i=1,a={},u=!1,c=r.document,l;function h(A){typeof A!="function"&&(A=new Function(""+A));for(var L=new Array(arguments.length-1),O=0;O<L.length;O++)L[O]=arguments[O+1];var M={callback:A,args:L};return a[i]=M,l(i),i++}function v(A){delete a[A]}function p(A){var L=A.callback,O=A.args;switch(O.length){case 0:L();break;case 1:L(O[0]);break;case 2:L(O[0],O[1]);break;case 3:L(O[0],O[1],O[2]);break;default:L.apply(t,O);break}}function g(A){if(u)setTimeout(g,0,A);else{var L=a[A];if(L){u=!0;try{p(L)}finally{v(A),u=!1}}}}function w(){l=function(A){process.nextTick(function(){g(A)})}}function _(){if(r.postMessage&&!r.importScripts){var A=!0,L=r.onmessage;return r.onmessage=function(){A=!1},r.postMessage("","*"),r.onmessage=L,A}}function E(){var A="setImmediate$"+Math.random()+"$",L=function(O){O.source===r&&typeof O.data=="string"&&O.data.indexOf(A)===0&&g(+O.data.slice(A.length))};r.addEventListener?r.addEventListener("message",L,!1):r.attachEvent("onmessage",L),l=function(O){r.postMessage(A+O,"*")}}function k(){var A=new MessageChannel;A.port1.onmessage=function(L){var O=L.data;g(O)},l=function(L){A.port2.postMessage(L)}}function I(){var A=c.documentElement;l=function(L){var O=c.createElement("script");O.onreadystatechange=function(){g(L),O.onreadystatechange=null,A.removeChild(O),O=null},A.appendChild(O)}}function C(){l=function(A){setTimeout(g,0,A)}}var P=Object.getPrototypeOf&&Object.getPrototypeOf(r);P=P&&P.setTimeout?P:r,{}.toString.call(r.process)==="[object process]"?w():_()?E():r.MessageChannel?k():c&&"onreadystatechange"in c.createElement("script")?I():C(),P.setImmediate=h,P.clearImmediate=v})(typeof self>"u"?Lr:self);/*!
555
+ * Copyright (c) 2023 Digital Bazaar, Inc. All rights reserved.
556
+ */ym.setImmediate=setImmediate,ym.crypto=globalThis.crypto;const aZ=[];for(let r=0;r<=255;++r)aZ.push(r.toString(16).padStart(2,"0"));ym.bufferToHex=function(t){let i="";const a=new Uint8Array(t);for(let u=0;u<a.length;++u)i+=aZ[a[u]];return i};/*!
557
+ * Copyright (c) 2016-2023 Digital Bazaar, Inc. All rights reserved.
558
+ */const{bufferToHex:jTe,crypto:pj}=ym,sZ=new Map([["sha256","SHA-256"],["SHA256","SHA-256"],["SHA-256","SHA-256"],["sha384","SHA-384"],["SHA384","SHA-384"],["SHA-384","SHA-384"],["sha512","SHA-512"],["SHA512","SHA-512"],["SHA-512","SHA-512"]]);var oZ=class{constructor(t){if(!(pj&&pj.subtle))throw new Error("crypto.subtle not found.");if(!sZ.has(t))throw new Error(`Unsupported algorithm "${t}".`);this.algorithm=sZ.get(t),this._content=""}update(t){this._content+=t}async digest(){const t=new TextEncoder().encode(this._content),i=await pj.subtle.digest(this.algorithm,t);return jTe(i)}};/*!
559
+ * Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.
560
+ */var uZ=class{constructor(t){this.current=t.sort(),this.done=!1,this.dir=new Map;for(let i=0;i<t.length;++i)this.dir.set(t[i],!0)}hasNext(){return!this.done}next(){const{current:t,dir:i}=this,a=t.slice();let u=null,c=0;const l=t.length;for(let h=0;h<l;++h){const v=t[h],p=i.get(v);(u===null||v>u)&&(p&&h>0&&v>t[h-1]||!p&&h<l-1&&v>t[h+1])&&(u=v,c=h)}if(u===null)this.done=!0;else{const h=i.get(u)?c-1:c+1;t[c]=t[h],t[h]=u;for(const v of t)v>u&&i.set(v,!i.get(v))}return a}};/*!
561
+ * Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.
562
+ */const cZ="http://www.w3.org/1999/02/22-rdf-syntax-ns#"+"langString",lZ="http://www.w3.org/2001/XMLSchema#string",wh="NamedNode",mm="BlankNode",fZ="Literal",BTe="DefaultGraph",Zb={};(()=>{const t="A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�"+"_",i=t+"0-9-·̀-ͯ‿-⁀",a="_:((?:["+t+"0-9])(?:(?:["+i+".])*(?:["+i+"]))?)",l='(?:<((?:[^\0- <>"{}|^`\\\\]|'+"\\\\u[0-9A-Fa-f]{4}"+"|"+"\\\\U[0-9A-Fa-f]{8}"+")*)>)",h=a,v='"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"',p="(?:\\^\\^"+l+")",w="(?:"+v+"(?:"+p+"|"+"(?:@([a-zA-Z]+(?:-[a-zA-Z0-9]+)*))"+")?)",_="[ \\t]+",E="[ \\t]*",k="(?:"+l+"|"+h+")"+_,I=l+_,C="(?:"+l+"|"+h+"|"+w+")"+E,P="(?:\\.|(?:(?:"+l+"|"+h+")"+E+"\\.))";Zb.eoln=/(?:\r\n)|(?:\n)|(?:\r)/g,Zb.empty=new RegExp("^"+E+"$"),Zb.quad=new RegExp("^"+E+k+I+C+P+E+"$")})();var gj=class E${static parse(t){const i=[],a={},u=t.split(Zb.eoln);let c=0;for(const l of u){if(c++,Zb.empty.test(l))continue;const h=l.match(Zb.quad);if(h===null)throw new Error("N-Quads parse error on line "+c+".");const v={subject:null,predicate:null,object:null,graph:null};if(h[1]!==void 0?v.subject={termType:wh,value:_m(h[1])}:v.subject={termType:mm,value:h[2]},v.predicate={termType:wh,value:_m(h[3])},h[4]!==void 0?v.object={termType:wh,value:_m(h[4])}:h[5]!==void 0?v.object={termType:mm,value:h[5]}:(v.object={termType:fZ,value:void 0,datatype:{termType:wh}},h[7]!==void 0?v.object.datatype.value=_m(h[7]):h[8]!==void 0?(v.object.datatype.value=cZ,v.object.language=h[8]):v.object.datatype.value=lZ,v.object.value=$Te(h[6])),h[9]!==void 0?v.graph={termType:wh,value:_m(h[9])}:h[10]!==void 0?v.graph={termType:mm,value:h[10]}:v.graph={termType:BTe,value:""},!(v.graph.value in a))a[v.graph.value]=[v],i.push(v);else{let p=!0;const g=a[v.graph.value];for(const w of g)if(qTe(w,v)){p=!1;break}p&&(g.push(v),i.push(v))}}return i}static serialize(t){const i=[];for(const a of t)i.push(E$.serializeQuad(a));return i.sort().join("")}static serializeQuadComponents(t,i,a,u){let c="";return t.termType===wh?c+=`<${wm(t.value)}>`:c+=`_:${t.value}`,i.termType===wh?c+=` <${wm(i.value)}> `:c+=` _:${i.value} `,a.termType===wh?c+=`<${wm(a.value)}>`:a.termType===mm?c+=`_:${a.value}`:(c+=`"${FTe(a.value)}"`,a.datatype.value===cZ?a.language&&(c+=`@${a.language}`):a.datatype.value!==lZ&&(c+=`^^<${wm(a.datatype.value)}>`)),u.termType===wh?c+=` <${wm(u.value)}>`:u.termType===mm&&(c+=` _:${u.value}`),c+=` .
563
+ `,c}static serializeQuad(t){return E$.serializeQuadComponents(t.subject,t.predicate,t.object,t.graph)}};function qTe(r,t){return!(r.subject.termType===t.subject.termType&&r.object.termType===t.object.termType)||!(r.subject.value===t.subject.value&&r.predicate.value===t.predicate.value&&r.object.value===t.object.value)?!1:r.object.termType!==fZ?!0:r.object.datatype.termType===t.object.datatype.termType&&r.object.language===t.object.language&&r.object.datatype.value===t.object.datatype.value}const SE=/[\u0000-\u001F\u007F"\\]/g,_h=[];for(let r=0;r<=127;++r)SE.test(String.fromCharCode(r))&&(_h[r]="\\u"+r.toString(16).toUpperCase().padStart(4,"0"),SE.lastIndex=0);_h["\b".codePointAt(0)]="\\b",_h[" ".codePointAt(0)]="\\t",_h[`
564
+ `.codePointAt(0)]="\\n",_h["\f".codePointAt(0)]="\\f",_h["\r".codePointAt(0)]="\\r",_h['"'.codePointAt(0)]='\\"',_h["\\".codePointAt(0)]="\\\\";function FTe(r){return SE.test(r)?r.replace(SE,function(t){return _h[t.codePointAt(0)]}):r}const hZ=/(?:\\([btnfr"'\\]))|(?:\\u([0-9A-Fa-f]{4}))|(?:\\U([0-9A-Fa-f]{8}))/g;function $Te(r){return hZ.test(r)?r.replace(hZ,function(t,i,a,u){if(i)switch(i){case"b":return"\b";case"t":return" ";case"n":return`
565
+ `;case"f":return"\f";case"r":return"\r";case'"':return'"';case"'":return"'";case"\\":return"\\"}if(a)return String.fromCharCode(parseInt(a,16));if(u)return String.fromCodePoint(parseInt(u,16))}):r}const TE=/[\u0000-\u0020<>"{}|^`\\]/g,dZ=[];for(let r=0;r<=127;++r)TE.test(String.fromCharCode(r))&&(dZ[r]="\\u"+r.toString(16).toUpperCase().padStart(4,"0"),TE.lastIndex=0);function wm(r){return TE.test(r)?r.replace(TE,function(t){return dZ[t.codePointAt(0)]}):r}const vZ=/(?:\\u([0-9A-Fa-f]{4}))|(?:\\U([0-9A-Fa-f]{8}))/g;function _m(r){return vZ.test(r)?r.replace(vZ,function(t,i,a){if(i)return String.fromCharCode(parseInt(i,16));if(a)return String.fromCodePoint(parseInt(a,16))}):r}/*!
566
+ * Copyright (c) 2016-2023 Digital Bazaar, Inc. All rights reserved.
567
+ */const pZ=vj,GTe=oZ,HTe=uZ,gZ=gj,{setImmediate:zTe}=ym;var VTe=class{constructor({createMessageDigest:t=null,messageDigestAlgorithm:i="sha256",canonicalIdMap:a=new Map,maxWorkFactor:u=1,maxDeepIterations:c=-1,signal:l=null}={}){this.name="RDFC-1.0",this.blankNodeInfo=new Map,this.canonicalIssuer=new pZ("c14n",a),this.createMessageDigest=t||(()=>new GTe(i)),this.maxWorkFactor=u,this.maxDeepIterations=c,this.remainingDeepIterations=0,this.signal=l,this.quads=null}async main(t){this.quads=t;for(const v of t)this._addBlankNodeQuadInfo({quad:v,component:v.subject}),this._addBlankNodeQuadInfo({quad:v,component:v.object}),this._addBlankNodeQuadInfo({quad:v,component:v.graph});const i=new Map,a=[...this.blankNodeInfo.keys()];let u=0;for(const v of a)++u%100===0&&await this._yield(),await this._hashAndTrackBlankNode({id:v,hashToBlankNodes:i});const c=[...i.keys()].sort(),l=[];for(const v of c){const p=i.get(v);if(p.length>1){l.push(p);continue}const g=p[0];this.canonicalIssuer.getId(g)}if(this.maxDeepIterations<0)if(this.maxWorkFactor===0)this.maxDeepIterations=0;else if(this.maxWorkFactor===1/0)this.maxDeepIterations=1/0;else{const v=l.reduce((p,g)=>p+g.length,0);this.maxDeepIterations=v**this.maxWorkFactor}this.maxDeepIterations>Number.MAX_SAFE_INTEGER&&(this.maxDeepIterations=1/0),this.remainingDeepIterations=this.maxDeepIterations;for(const v of l){const p=[];for(const g of v){if(this.canonicalIssuer.hasId(g))continue;const w=new pZ("b");w.getId(g);const _=await this.hashNDegreeQuads(g,w);p.push(_)}p.sort(UTe);for(const g of p){const w=g.issuer.getOldIds();for(const _ of w)this.canonicalIssuer.getId(_)}}const h=[];for(const v of this.quads){const p=gZ.serializeQuadComponents(this._componentWithCanonicalId(v.subject),v.predicate,this._componentWithCanonicalId(v.object),this._componentWithCanonicalId(v.graph));h.push(p)}return h.sort(),h.join("")}async hashFirstDegreeQuads(t){const i=[],a=this.blankNodeInfo.get(t),u=a.quads;for(const l of u)i.push(gZ.serializeQuadComponents(this.modifyFirstDegreeComponent(t,l.subject,"subject"),l.predicate,this.modifyFirstDegreeComponent(t,l.object,"object"),this.modifyFirstDegreeComponent(t,l.graph,"graph")));i.sort();const c=this.createMessageDigest();for(const l of i)c.update(l);return a.hash=await c.digest(),a.hash}async hashRelatedBlankNode(t,i,a,u){const c=this.createMessageDigest();c.update(u),u!=="g"&&c.update(this.getRelatedPredicate(i));let l;return this.canonicalIssuer.hasId(t)?l="_:"+this.canonicalIssuer.getId(t):a.hasId(t)?l="_:"+a.getId(t):l=this.blankNodeInfo.get(t).hash,c.update(l),c.digest()}async hashNDegreeQuads(t,i){if(this.remainingDeepIterations===0)throw new Error(`Maximum deep iterations exceeded (${this.maxDeepIterations}).`);this.remainingDeepIterations--;const a=this.createMessageDigest(),u=await this.createHashToRelated(t,i),c=[...u.keys()].sort();for(const l of c){a.update(l);let h="",v;const p=new HTe(u.get(l));let g=0;for(;p.hasNext();){const w=p.next();if(++g%3===0){if(this.signal&&this.signal.aborted)throw new Error(`Abort signal received: "${this.signal.reason}".`);await this._yield()}let _=i.clone(),E="";const k=[];let I=!1;for(const C of w)if(this.canonicalIssuer.hasId(C)?E+="_:"+this.canonicalIssuer.getId(C):(_.hasId(C)||k.push(C),E+="_:"+_.getId(C)),h.length!==0&&E>h){I=!0;break}if(!I){for(const C of k){const P=await this.hashNDegreeQuads(C,_);if(E+="_:"+_.getId(C),E+=`<${P.hash}>`,_=P.issuer,h.length!==0&&E>h){I=!0;break}}I||(h.length===0||E<h)&&(h=E,v=_)}}a.update(h),i=v}return{hash:await a.digest(),issuer:i}}modifyFirstDegreeComponent(t,i){return i.termType!=="BlankNode"?i:{termType:"BlankNode",value:i.value===t?"a":"z"}}getRelatedPredicate(t){return`<${t.predicate.value}>`}async createHashToRelated(t,i){const a=new Map,u=this.blankNodeInfo.get(t).quads;let c=0;for(const l of u)++c%100===0&&await this._yield(),await Promise.all([this._addRelatedBlankNodeHash({quad:l,component:l.subject,position:"s",id:t,issuer:i,hashToRelated:a}),this._addRelatedBlankNodeHash({quad:l,component:l.object,position:"o",id:t,issuer:i,hashToRelated:a}),this._addRelatedBlankNodeHash({quad:l,component:l.graph,position:"g",id:t,issuer:i,hashToRelated:a})]);return a}async _hashAndTrackBlankNode({id:t,hashToBlankNodes:i}){const a=await this.hashFirstDegreeQuads(t),u=i.get(a);u?u.push(t):i.set(a,[t])}_addBlankNodeQuadInfo({quad:t,component:i}){if(i.termType!=="BlankNode")return;const a=i.value,u=this.blankNodeInfo.get(a);u?u.quads.add(t):this.blankNodeInfo.set(a,{quads:new Set([t]),hash:null})}async _addRelatedBlankNodeHash({quad:t,component:i,position:a,id:u,issuer:c,hashToRelated:l}){if(!(i.termType==="BlankNode"&&i.value!==u))return;const h=i.value,v=await this.hashRelatedBlankNode(h,t,c,a),p=l.get(v);p?p.push(h):l.set(v,[h])}_componentWithCanonicalId(t){return t.termType==="BlankNode"&&!t.value.startsWith(this.canonicalIssuer.prefix)?{termType:"BlankNode",value:this.canonicalIssuer.getId(t.value)}:t}async _yield(){return new Promise(t=>zTe(t))}};function UTe(r,t){return r.hash<t.hash?-1:r.hash>t.hash?1:0}/*!
568
+ * Copyright (c) 2016-2023 Digital Bazaar, Inc. All rights reserved.
569
+ */const bZ=vj,YTe=oZ,WTe=uZ,yZ=gj;var KTe=class{constructor({createMessageDigest:t=null,messageDigestAlgorithm:i="sha256",canonicalIdMap:a=new Map,maxWorkFactor:u=1,maxDeepIterations:c=-1,timeout:l=0}={}){this.name="RDFC-1.0",this.blankNodeInfo=new Map,this.canonicalIssuer=new bZ("c14n",a),this.createMessageDigest=t||(()=>new YTe(i)),this.maxWorkFactor=u,this.maxDeepIterations=c,this.remainingDeepIterations=0,this.timeout=l,l>0&&(this.startTime=Date.now()),this.quads=null}main(t){this.quads=t;for(const h of t)this._addBlankNodeQuadInfo({quad:h,component:h.subject}),this._addBlankNodeQuadInfo({quad:h,component:h.object}),this._addBlankNodeQuadInfo({quad:h,component:h.graph});const i=new Map,a=[...this.blankNodeInfo.keys()];for(const h of a)this._hashAndTrackBlankNode({id:h,hashToBlankNodes:i});const u=[...i.keys()].sort(),c=[];for(const h of u){const v=i.get(h);if(v.length>1){c.push(v);continue}const p=v[0];this.canonicalIssuer.getId(p)}if(this.maxDeepIterations<0)if(this.maxWorkFactor===0)this.maxDeepIterations=0;else if(this.maxWorkFactor===1/0)this.maxDeepIterations=1/0;else{const h=c.reduce((v,p)=>v+p.length,0);this.maxDeepIterations=h**this.maxWorkFactor}this.maxDeepIterations>Number.MAX_SAFE_INTEGER&&(this.maxDeepIterations=1/0),this.remainingDeepIterations=this.maxDeepIterations;for(const h of c){const v=[];for(const p of h){if(this.canonicalIssuer.hasId(p))continue;const g=new bZ("b");g.getId(p);const w=this.hashNDegreeQuads(p,g);v.push(w)}v.sort(XTe);for(const p of v){const g=p.issuer.getOldIds();for(const w of g)this.canonicalIssuer.getId(w)}}const l=[];for(const h of this.quads){const v=yZ.serializeQuadComponents(this._componentWithCanonicalId(h.subject),h.predicate,this._componentWithCanonicalId(h.object),this._componentWithCanonicalId(h.graph));l.push(v)}return l.sort(),l.join("")}hashFirstDegreeQuads(t){const i=[],a=this.blankNodeInfo.get(t),u=a.quads;for(const l of u)i.push(yZ.serializeQuadComponents(this.modifyFirstDegreeComponent(t,l.subject,"subject"),l.predicate,this.modifyFirstDegreeComponent(t,l.object,"object"),this.modifyFirstDegreeComponent(t,l.graph,"graph")));i.sort();const c=this.createMessageDigest();for(const l of i)c.update(l);return a.hash=c.digest(),a.hash}hashRelatedBlankNode(t,i,a,u){const c=this.createMessageDigest();c.update(u),u!=="g"&&c.update(this.getRelatedPredicate(i));let l;return this.canonicalIssuer.hasId(t)?l="_:"+this.canonicalIssuer.getId(t):a.hasId(t)?l="_:"+a.getId(t):l=this.blankNodeInfo.get(t).hash,c.update(l),c.digest()}hashNDegreeQuads(t,i){if(this.remainingDeepIterations===0)throw new Error(`Maximum deep iterations exceeded (${this.maxDeepIterations}).`);this.remainingDeepIterations--;const a=this.createMessageDigest(),u=this.createHashToRelated(t,i),c=[...u.keys()].sort();for(const l of c){a.update(l);let h="",v;const p=new WTe(u.get(l));let g=0;for(;p.hasNext();){const w=p.next();if(++g%3===0&&this.timeout>0&&Date.now()-this.startTime>this.timeout)throw new Error("Canonize timeout.");let _=i.clone(),E="";const k=[];let I=!1;for(const C of w)if(this.canonicalIssuer.hasId(C)?E+="_:"+this.canonicalIssuer.getId(C):(_.hasId(C)||k.push(C),E+="_:"+_.getId(C)),h.length!==0&&E>h){I=!0;break}if(!I){for(const C of k){const P=this.hashNDegreeQuads(C,_);if(E+="_:"+_.getId(C),E+=`<${P.hash}>`,_=P.issuer,h.length!==0&&E>h){I=!0;break}}I||(h.length===0||E<h)&&(h=E,v=_)}}a.update(h),i=v}return{hash:a.digest(),issuer:i}}modifyFirstDegreeComponent(t,i){return i.termType!=="BlankNode"?i:{termType:"BlankNode",value:i.value===t?"a":"z"}}getRelatedPredicate(t){return`<${t.predicate.value}>`}createHashToRelated(t,i){const a=new Map,u=this.blankNodeInfo.get(t).quads;for(const c of u)this._addRelatedBlankNodeHash({quad:c,component:c.subject,position:"s",id:t,issuer:i,hashToRelated:a}),this._addRelatedBlankNodeHash({quad:c,component:c.object,position:"o",id:t,issuer:i,hashToRelated:a}),this._addRelatedBlankNodeHash({quad:c,component:c.graph,position:"g",id:t,issuer:i,hashToRelated:a});return a}_hashAndTrackBlankNode({id:t,hashToBlankNodes:i}){const a=this.hashFirstDegreeQuads(t),u=i.get(a);u?u.push(t):i.set(a,[t])}_addBlankNodeQuadInfo({quad:t,component:i}){if(i.termType!=="BlankNode")return;const a=i.value,u=this.blankNodeInfo.get(a);u?u.quads.add(t):this.blankNodeInfo.set(a,{quads:new Set([t]),hash:null})}_addRelatedBlankNodeHash({quad:t,component:i,position:a,id:u,issuer:c,hashToRelated:l}){if(!(i.termType==="BlankNode"&&i.value!==u))return;const h=i.value,v=this.hashRelatedBlankNode(h,t,c,a),p=l.get(v);p?p.push(h):l.set(v,[h])}_componentWithCanonicalId(t){return t.termType==="BlankNode"&&!t.value.startsWith(this.canonicalIssuer.prefix)?{termType:"BlankNode",value:this.canonicalIssuer.getId(t.value)}:t}};function XTe(r,t){return r.hash<t.hash?-1:r.hash>t.hash?1:0}(function(r){const t=VTe,i=KTe;function a(l,h){if(h.inputFormat){if(h.inputFormat==="application/n-quads"){if(typeof l!="string")throw new Error("N-Quads input must be a string.");return r.NQuads.parse(l)}throw new Error(`Unknown canonicalization input format: "${h.inputFormat}".`)}return l}function u(l){if(l.format&&l.format!=="application/n-quads")throw new Error(`Unknown canonicalization output format: "${l.format}".`)}function c(){globalThis.RDF_CANONIZE_TRACE_URDNA2015&&console.trace("[rdf-canonize] URDNA2015 is deprecated, use RDFC-1.0")}r.NQuads=gj,r.IdentifierIssuer=vj,r.canonize=async function(l,h={}){const v=a(l,h);if(u(h),!("algorithm"in h))throw new Error("No RDF Dataset Canonicalization algorithm specified.");if(h.algorithm==="RDFC-1.0")return new t(h).main(v);if(h.algorithm==="URDNA2015"&&!h.rejectURDNA2015)return c(),new t(h).main(v);throw new Error("Invalid RDF Dataset Canonicalization algorithm: "+h.algorithm)},r._canonizeSync=function(l,h={}){const v=a(l,h);if(u(h),!("algorithm"in h))throw new Error("No RDF Dataset Canonicalization algorithm specified.");if(h.algorithm==="RDFC-1.0")return new i(h).main(v);if(h.algorithm==="URDNA2015"&&!h.rejectURDNA2015)return c(),new i(h).main(v);throw new Error("Invalid RDF Dataset Canonicalization algorithm: "+h.algorithm)}})(iZ);var bj=iZ;const dc={};var Nu=dc;dc.isArray=Array.isArray,dc.isBoolean=r=>typeof r=="boolean"||Object.prototype.toString.call(r)==="[object Boolean]",dc.isDouble=r=>dc.isNumber(r)&&(String(r).indexOf(".")!==-1||Math.abs(r)>=1e21),dc.isEmptyObject=r=>dc.isObject(r)&&Object.keys(r).length===0,dc.isNumber=r=>typeof r=="number"||Object.prototype.toString.call(r)==="[object Number]",dc.isNumeric=r=>!isNaN(parseFloat(r))&&isFinite(r),dc.isObject=r=>Object.prototype.toString.call(r)==="[object Object]",dc.isString=r=>typeof r=="string"||Object.prototype.toString.call(r)==="[object String]",dc.isUndefined=r=>typeof r>"u";const Mp=Nu,xh={};var Eh=xh;xh.isSubject=r=>Mp.isObject(r)&&!("@value"in r||"@set"in r||"@list"in r)?Object.keys(r).length>1||!("@id"in r):!1,xh.isSubjectReference=r=>Mp.isObject(r)&&Object.keys(r).length===1&&"@id"in r,xh.isValue=r=>Mp.isObject(r)&&"@value"in r,xh.isList=r=>Mp.isObject(r)&&"@list"in r,xh.isGraph=r=>Mp.isObject(r)&&"@graph"in r&&Object.keys(r).filter(t=>t!=="@id"&&t!=="@index").length===1,xh.isSimpleGraph=r=>xh.isGraph(r)&&!("@id"in r),xh.isBlankNode=r=>{if(Mp.isObject(r)){if("@id"in r){const t=r["@id"];return!Mp.isString(t)||t.indexOf("_:")===0}return Object.keys(r).length===0||!("@value"in r||"@set"in r||"@list"in r)}return!1};var vc=class extends Error{constructor(t="An unspecified JSON-LD error occurred.",i="jsonld.Error",a={}){super(t),this.name=i,this.message=t,this.details=a}};const xm=Eh,ro=Nu,mZ=bj.IdentifierIssuer,JTe=vc,QTe=/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/,ZTe=/(?:<[^>]*?>|"[^"]*?"|[^,])+/g,eRe=/\s*<([^>]*?)>\s*(?:;\s*(.*))?/,tRe=/(.*?)=(?:(?:"([^"]*?)")|([^"]*?))\s*(?:(?:;\s*)|$)/g,nRe=/^@[a-zA-Z]+$/,wZ={headers:{accept:"application/ld+json, application/json"}},Mr={};var pc=Mr;Mr.IdentifierIssuer=mZ,Mr.REGEX_BCP47=QTe,Mr.REGEX_KEYWORD=nRe,Mr.clone=function(r){if(r&&typeof r=="object"){let t;if(ro.isArray(r)){t=[];for(let i=0;i<r.length;++i)t[i]=Mr.clone(r[i])}else if(r instanceof Map){t=new Map;for(const[i,a]of r)t.set(i,Mr.clone(a))}else if(r instanceof Set){t=new Set;for(const i of r)t.add(Mr.clone(i))}else if(ro.isObject(r)){t={};for(const i in r)t[i]=Mr.clone(r[i])}else t=r.toString();return t}return r},Mr.asArray=function(r){return Array.isArray(r)?r:[r]},Mr.buildHeaders=(r={})=>{if(Object.keys(r).some(i=>i.toLowerCase()==="accept"))throw new RangeError('Accept header may not be specified; only "'+wZ.headers.accept+'" is supported.');return Object.assign({Accept:wZ.headers.accept},r)},Mr.parseLinkHeader=r=>{const t={},i=r.match(ZTe);for(let a=0;a<i.length;++a){let u=i[a].match(eRe);if(!u)continue;const c={target:u[1]},l=u[2];for(;u=tRe.exec(l);)c[u[1]]=u[2]===void 0?u[3]:u[2];const h=c.rel||"";Array.isArray(t[h])?t[h].push(c):t.hasOwnProperty(h)?t[h]=[t[h],c]:t[h]=c}return t},Mr.validateTypeValue=(r,t)=>{if(!ro.isString(r)&&!(ro.isArray(r)&&r.every(i=>ro.isString(i)))){if(t&&ro.isObject(r))switch(Object.keys(r).length){case 0:return;case 1:if("@default"in r&&Mr.asArray(r["@default"]).every(i=>ro.isString(i)))return}throw new JTe('Invalid JSON-LD syntax; "@type" value must a string, an array of strings, an empty object, or a default object.',"jsonld.SyntaxError",{code:"invalid type value",value:r})}},Mr.hasProperty=(r,t)=>{if(r.hasOwnProperty(t)){const i=r[t];return!ro.isArray(i)||i.length>0}return!1},Mr.hasValue=(r,t,i)=>{if(Mr.hasProperty(r,t)){let a=r[t];const u=xm.isList(a);if(ro.isArray(a)||u){u&&(a=a["@list"]);for(let c=0;c<a.length;++c)if(Mr.compareValues(i,a[c]))return!0}else if(!ro.isArray(i))return Mr.compareValues(i,a)}return!1},Mr.addValue=(r,t,i,a)=>{if(a=a||{},"propertyIsArray"in a||(a.propertyIsArray=!1),"valueIsArray"in a||(a.valueIsArray=!1),"allowDuplicate"in a||(a.allowDuplicate=!0),"prependValue"in a||(a.prependValue=!1),a.valueIsArray)r[t]=i;else if(ro.isArray(i)){i.length===0&&a.propertyIsArray&&!r.hasOwnProperty(t)&&(r[t]=[]),a.prependValue&&(i=i.concat(r[t]),r[t]=[]);for(let u=0;u<i.length;++u)Mr.addValue(r,t,i[u],a)}else if(r.hasOwnProperty(t)){const u=!a.allowDuplicate&&Mr.hasValue(r,t,i);!ro.isArray(r[t])&&(!u||a.propertyIsArray)&&(r[t]=[r[t]]),u||(a.prependValue?r[t].unshift(i):r[t].push(i))}else r[t]=a.propertyIsArray?[i]:i},Mr.getValues=(r,t)=>[].concat(r[t]||[]),Mr.removeProperty=(r,t)=>{delete r[t]},Mr.removeValue=(r,t,i,a)=>{a=a||{},"propertyIsArray"in a||(a.propertyIsArray=!1);const u=Mr.getValues(r,t).filter(c=>!Mr.compareValues(c,i));u.length===0?Mr.removeProperty(r,t):u.length===1&&!a.propertyIsArray?r[t]=u[0]:r[t]=u},Mr.relabelBlankNodes=(r,t)=>{t=t||{};const i=t.issuer||new mZ("_:b");return RE(i,r)},Mr.compareValues=(r,t)=>r===t||xm.isValue(r)&&xm.isValue(t)&&r["@value"]===t["@value"]&&r["@type"]===t["@type"]&&r["@language"]===t["@language"]&&r["@index"]===t["@index"]?!0:ro.isObject(r)&&"@id"in r&&ro.isObject(t)&&"@id"in t?r["@id"]===t["@id"]:!1,Mr.compareShortestLeast=(r,t)=>r.length<t.length?-1:t.length<r.length?1:r===t?0:r<t?-1:1;function RE(r,t){if(ro.isArray(t))for(let i=0;i<t.length;++i)t[i]=RE(r,t[i]);else if(xm.isList(t))t["@list"]=RE(r,t["@list"]);else if(ro.isObject(t)){xm.isBlankNode(t)&&(t["@id"]=r.getId(t["@id"]));const i=Object.keys(t).sort();for(let a=0;a<i.length;++a){const u=i[a];u!=="@id"&&(t[u]=RE(r,t[u]))}}return t}const jp="http://www.w3.org/1999/02/22-rdf-syntax-ns#",IE="http://www.w3.org/2001/XMLSchema#";var yj={LINK_HEADER_CONTEXT:"http://www.w3.org/ns/json-ld#context",RDF_LIST:jp+"List",RDF_FIRST:jp+"first",RDF_REST:jp+"rest",RDF_NIL:jp+"nil",RDF_TYPE:jp+"type",RDF_JSON_LITERAL:jp+"JSON",RDF_LANGSTRING:jp+"langString",XSD_BOOLEAN:IE+"boolean",XSD_DOUBLE:IE+"double",XSD_INTEGER:IE+"integer",XSD_STRING:IE+"string"},mj,_Z;function xZ(){return _Z||(_Z=1,mj=class{constructor(){this._requests={}}wrapLoader(t){const i=this;return i._loader=t,function(){return i.add.apply(i,arguments)}}async add(t){let i=this._requests[t];if(i)return Promise.resolve(i);i=this._requests[t]=this._loader(t);try{return await i}finally{delete this._requests[t]}}}),mj}const CE=Nu,io={};var Vd=io;io.parsers={simple:{keys:["href","scheme","authority","path","query","fragment"],regex:/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/},full:{keys:["href","protocol","scheme","authority","auth","user","password","hostname","port","path","directory","file","query","fragment"],regex:/^(([a-zA-Z][a-zA-Z0-9+-.]*):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(?:(((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/}},io.parse=(r,t)=>{const i={},a=io.parsers[t||"full"],u=a.regex.exec(r);let c=a.keys.length;for(;c--;)i[a.keys[c]]=u[c]===void 0?null:u[c];return(i.scheme==="https"&&i.port==="443"||i.scheme==="http"&&i.port==="80")&&(i.href=i.href.replace(":"+i.port,""),i.authority=i.authority.replace(":"+i.port,""),i.port=null),i.normalizedPath=io.removeDotSegments(i.path),i},io.prependBase=(r,t)=>{if(r===null||io.isAbsolute(t))return t;(!r||CE.isString(r))&&(r=io.parse(r||""));const i=io.parse(t),a={protocol:r.protocol||""};if(i.authority!==null)a.authority=i.authority,a.path=i.path,a.query=i.query;else if(a.authority=r.authority,i.path==="")a.path=r.path,i.query!==null?a.query=i.query:a.query=r.query;else{if(i.path.indexOf("/")===0)a.path=i.path;else{let c=r.path;c=c.substr(0,c.lastIndexOf("/")+1),(c.length>0||r.authority)&&c.substr(-1)!=="/"&&(c+="/"),c+=i.path,a.path=c}a.query=i.query}i.path!==""&&(a.path=io.removeDotSegments(a.path));let u=a.protocol;return a.authority!==null&&(u+="//"+a.authority),u+=a.path,a.query!==null&&(u+="?"+a.query),i.fragment!==null&&(u+="#"+i.fragment),u===""&&(u="./"),u},io.removeBase=(r,t)=>{if(r===null)return t;(!r||CE.isString(r))&&(r=io.parse(r||""));let i="";if(r.href!==""?i+=(r.protocol||"")+"//"+(r.authority||""):t.indexOf("//")&&(i+="//"),t.indexOf(i)!==0)return t;const a=io.parse(t.substr(i.length)),u=r.normalizedPath.split("/"),c=a.normalizedPath.split("/"),l=a.fragment||a.query?0:1;for(;u.length>0&&c.length>l&&u[0]===c[0];)u.shift(),c.shift();let h="";if(u.length>0){u.pop();for(let v=0;v<u.length;++v)h+="../"}return h+=c.join("/"),a.query!==null&&(h+="?"+a.query),a.fragment!==null&&(h+="#"+a.fragment),h===""&&(h="./"),h},io.removeDotSegments=r=>{if(r.length===0)return"";const t=r.split("/"),i=[];for(;t.length>0;){const a=t.shift(),u=t.length===0;if(a==="."){u&&i.push("");continue}if(a===".."){i.pop(),u&&i.push("");continue}i.push(a)}return r[0]==="/"&&i.length>0&&i[0]!==""&&i.unshift(""),i.length===1&&i[0]===""?"/":i.join("/")};const rRe=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^\s]*$/;io.isAbsolute=r=>CE.isString(r)&&rRe.test(r),io.isRelative=r=>CE.isString(r);const{parseLinkHeader:iRe,buildHeaders:aRe}=pc,{LINK_HEADER_CONTEXT:sRe}=yj,Em=vc,oRe=xZ(),{prependBase:uRe}=Vd,cRe=/(^|(\r\n))link:/i;var lRe=({secure:r,headers:t={},xhr:i}={headers:{}})=>{return t=aRe(t),new oRe().wrapLoader(u);async function u(c){if(c.indexOf("http:")!==0&&c.indexOf("https:")!==0)throw new Em('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:c});if(r&&c.indexOf("https")!==0)throw new Em(`URL could not be dereferenced; secure mode is enabled and the URL's scheme is not "https".`,"jsonld.InvalidUrl",{code:"loading document failed",url:c});let l;try{l=await fRe(i,c,t)}catch(w){throw new Em("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:c,cause:w})}if(l.status>=400)throw new Em("URL could not be dereferenced: "+l.statusText,"jsonld.LoadDocumentError",{code:"loading document failed",url:c,httpStatusCode:l.status});let h={contextUrl:null,documentUrl:c,document:l.response},v=null;const p=l.getResponseHeader("Content-Type");let g;if(cRe.test(l.getAllResponseHeaders())&&(g=l.getResponseHeader("Link")),g&&p!=="application/ld+json"){const w=iRe(g),_=w[sRe];if(Array.isArray(_))throw new Em("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:c});_&&(h.contextUrl=_.target),v=w.alternate,v&&v.type=="application/ld+json"&&!(p||"").match(/^application\/(\w*\+)?json$/)&&(h=await u(uRe(c,v.target)))}return h}};function fRe(r,t,i){r=r||XMLHttpRequest;const a=new r;return new Promise((u,c)=>{a.onload=()=>u(a),a.onerror=l=>c(l),a.open("GET",t,!0);for(const l in i)a.setRequestHeader(l,i[l]);a.send()})}const hRe=lRe,wj={};var dRe=wj;wj.setupDocumentLoaders=function(r){typeof XMLHttpRequest<"u"&&(r.documentLoaders.xhr=hRe,r.useDocumentLoader("xhr"))},wj.setupGlobals=function(r){typeof globalThis.JsonLdProcessor>"u"&&Object.defineProperty(globalThis,"JsonLdProcessor",{writable:!0,enumerable:!1,configurable:!0,value:r.JsonLdProcessor})};var _j,EZ;function vRe(){return EZ||(EZ=1,_j=function(r){r.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}),_j}var pRe=Nr;Nr.Node=Bp,Nr.create=Nr;function Nr(r){var t=this;if(t instanceof Nr||(t=new Nr),t.tail=null,t.head=null,t.length=0,r&&typeof r.forEach=="function")r.forEach(function(u){t.push(u)});else if(arguments.length>0)for(var i=0,a=arguments.length;i<a;i++)t.push(arguments[i]);return t}Nr.prototype.removeNode=function(r){if(r.list!==this)throw new Error("removing node which does not belong to this list");var t=r.next,i=r.prev;return t&&(t.prev=i),i&&(i.next=t),r===this.head&&(this.head=t),r===this.tail&&(this.tail=i),r.list.length--,r.next=null,r.prev=null,r.list=null,t},Nr.prototype.unshiftNode=function(r){if(r!==this.head){r.list&&r.list.removeNode(r);var t=this.head;r.list=this,r.next=t,t&&(t.prev=r),this.head=r,this.tail||(this.tail=r),this.length++}},Nr.prototype.pushNode=function(r){if(r!==this.tail){r.list&&r.list.removeNode(r);var t=this.tail;r.list=this,r.prev=t,t&&(t.next=r),this.tail=r,this.head||(this.head=r),this.length++}},Nr.prototype.push=function(){for(var r=0,t=arguments.length;r<t;r++)bRe(this,arguments[r]);return this.length},Nr.prototype.unshift=function(){for(var r=0,t=arguments.length;r<t;r++)yRe(this,arguments[r]);return this.length},Nr.prototype.pop=function(){if(this.tail){var r=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,r}},Nr.prototype.shift=function(){if(this.head){var r=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,r}},Nr.prototype.forEach=function(r,t){t=t||this;for(var i=this.head,a=0;i!==null;a++)r.call(t,i.value,a,this),i=i.next},Nr.prototype.forEachReverse=function(r,t){t=t||this;for(var i=this.tail,a=this.length-1;i!==null;a--)r.call(t,i.value,a,this),i=i.prev},Nr.prototype.get=function(r){for(var t=0,i=this.head;i!==null&&t<r;t++)i=i.next;if(t===r&&i!==null)return i.value},Nr.prototype.getReverse=function(r){for(var t=0,i=this.tail;i!==null&&t<r;t++)i=i.prev;if(t===r&&i!==null)return i.value},Nr.prototype.map=function(r,t){t=t||this;for(var i=new Nr,a=this.head;a!==null;)i.push(r.call(t,a.value,this)),a=a.next;return i},Nr.prototype.mapReverse=function(r,t){t=t||this;for(var i=new Nr,a=this.tail;a!==null;)i.push(r.call(t,a.value,this)),a=a.prev;return i},Nr.prototype.reduce=function(r,t){var i,a=this.head;if(arguments.length>1)i=t;else if(this.head)a=this.head.next,i=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var u=0;a!==null;u++)i=r(i,a.value,u),a=a.next;return i},Nr.prototype.reduceReverse=function(r,t){var i,a=this.tail;if(arguments.length>1)i=t;else if(this.tail)a=this.tail.prev,i=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var u=this.length-1;a!==null;u--)i=r(i,a.value,u),a=a.prev;return i},Nr.prototype.toArray=function(){for(var r=new Array(this.length),t=0,i=this.head;i!==null;t++)r[t]=i.value,i=i.next;return r},Nr.prototype.toArrayReverse=function(){for(var r=new Array(this.length),t=0,i=this.tail;i!==null;t++)r[t]=i.value,i=i.prev;return r},Nr.prototype.slice=function(r,t){t=t||this.length,t<0&&(t+=this.length),r=r||0,r<0&&(r+=this.length);var i=new Nr;if(t<r||t<0)return i;r<0&&(r=0),t>this.length&&(t=this.length);for(var a=0,u=this.head;u!==null&&a<r;a++)u=u.next;for(;u!==null&&a<t;a++,u=u.next)i.push(u.value);return i},Nr.prototype.sliceReverse=function(r,t){t=t||this.length,t<0&&(t+=this.length),r=r||0,r<0&&(r+=this.length);var i=new Nr;if(t<r||t<0)return i;r<0&&(r=0),t>this.length&&(t=this.length);for(var a=this.length,u=this.tail;u!==null&&a>t;a--)u=u.prev;for(;u!==null&&a>r;a--,u=u.prev)i.push(u.value);return i},Nr.prototype.splice=function(r,t,...i){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var a=0,u=this.head;u!==null&&a<r;a++)u=u.next;for(var c=[],a=0;u&&a<t;a++)c.push(u.value),u=this.removeNode(u);u===null&&(u=this.tail),u!==this.head&&u!==this.tail&&(u=u.prev);for(var a=0;a<i.length;a++)u=gRe(this,u,i[a]);return c},Nr.prototype.reverse=function(){for(var r=this.head,t=this.tail,i=r;i!==null;i=i.prev){var a=i.prev;i.prev=i.next,i.next=a}return this.head=t,this.tail=r,this};function gRe(r,t,i){var a=t===r.head?new Bp(i,null,t,r):new Bp(i,t,t.next,r);return a.next===null&&(r.tail=a),a.prev===null&&(r.head=a),r.length++,a}function bRe(r,t){r.tail=new Bp(t,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function yRe(r,t){r.head=new Bp(t,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function Bp(r,t,i,a){if(!(this instanceof Bp))return new Bp(r,t,i,a);this.list=a,this.value=r,t?(t.next=this,this.prev=t):this.prev=null,i?(i.prev=this,this.next=i):this.next=null}try{vRe()(Nr)}catch{}const mRe=pRe,qp=Symbol("max"),kh=Symbol("length"),ey=Symbol("lengthCalculator"),km=Symbol("allowStale"),Fp=Symbol("maxAge"),Sh=Symbol("dispose"),kZ=Symbol("noDisposeOnSet"),xs=Symbol("lruList"),el=Symbol("cache"),SZ=Symbol("updateAgeOnGet"),xj=()=>1;class wRe{constructor(t){if(typeof t=="number"&&(t={max:t}),t||(t={}),t.max&&(typeof t.max!="number"||t.max<0))throw new TypeError("max must be a non-negative number");this[qp]=t.max||1/0;const i=t.length||xj;if(this[ey]=typeof i!="function"?xj:i,this[km]=t.stale||!1,t.maxAge&&typeof t.maxAge!="number")throw new TypeError("maxAge must be a number");this[Fp]=t.maxAge||0,this[Sh]=t.dispose,this[kZ]=t.noDisposeOnSet||!1,this[SZ]=t.updateAgeOnGet||!1,this.reset()}set max(t){if(typeof t!="number"||t<0)throw new TypeError("max must be a non-negative number");this[qp]=t||1/0,Sm(this)}get max(){return this[qp]}set allowStale(t){this[km]=!!t}get allowStale(){return this[km]}set maxAge(t){if(typeof t!="number")throw new TypeError("maxAge must be a non-negative number");this[Fp]=t,Sm(this)}get maxAge(){return this[Fp]}set lengthCalculator(t){typeof t!="function"&&(t=xj),t!==this[ey]&&(this[ey]=t,this[kh]=0,this[xs].forEach(i=>{i.length=this[ey](i.value,i.key),this[kh]+=i.length})),Sm(this)}get lengthCalculator(){return this[ey]}get length(){return this[kh]}get itemCount(){return this[xs].length}rforEach(t,i){i=i||this;for(let a=this[xs].tail;a!==null;){const u=a.prev;TZ(this,t,a,i),a=u}}forEach(t,i){i=i||this;for(let a=this[xs].head;a!==null;){const u=a.next;TZ(this,t,a,i),a=u}}keys(){return this[xs].toArray().map(t=>t.key)}values(){return this[xs].toArray().map(t=>t.value)}reset(){this[Sh]&&this[xs]&&this[xs].length&&this[xs].forEach(t=>this[Sh](t.key,t.value)),this[el]=new Map,this[xs]=new mRe,this[kh]=0}dump(){return this[xs].map(t=>AE(this,t)?!1:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[xs]}set(t,i,a){if(a=a||this[Fp],a&&typeof a!="number")throw new TypeError("maxAge must be a number");const u=a?Date.now():0,c=this[ey](i,t);if(this[el].has(t)){if(c>this[qp])return ty(this,this[el].get(t)),!1;const v=this[el].get(t).value;return this[Sh]&&(this[kZ]||this[Sh](t,v.value)),v.now=u,v.maxAge=a,v.value=i,this[kh]+=c-v.length,v.length=c,this.get(t),Sm(this),!0}const l=new _Re(t,i,c,u,a);return l.length>this[qp]?(this[Sh]&&this[Sh](t,i),!1):(this[kh]+=l.length,this[xs].unshift(l),this[el].set(t,this[xs].head),Sm(this),!0)}has(t){if(!this[el].has(t))return!1;const i=this[el].get(t).value;return!AE(this,i)}get(t){return Ej(this,t,!0)}peek(t){return Ej(this,t,!1)}pop(){const t=this[xs].tail;return t?(ty(this,t),t.value):null}del(t){ty(this,this[el].get(t))}load(t){this.reset();const i=Date.now();for(let a=t.length-1;a>=0;a--){const u=t[a],c=u.e||0;if(c===0)this.set(u.k,u.v);else{const l=c-i;l>0&&this.set(u.k,u.v,l)}}}prune(){this[el].forEach((t,i)=>Ej(this,i,!1))}}const Ej=(r,t,i)=>{const a=r[el].get(t);if(a){const u=a.value;if(AE(r,u)){if(ty(r,a),!r[km])return}else i&&(r[SZ]&&(a.value.now=Date.now()),r[xs].unshiftNode(a));return u.value}},AE=(r,t)=>{if(!t||!t.maxAge&&!r[Fp])return!1;const i=Date.now()-t.now;return t.maxAge?i>t.maxAge:r[Fp]&&i>r[Fp]},Sm=r=>{if(r[kh]>r[qp])for(let t=r[xs].tail;r[kh]>r[qp]&&t!==null;){const i=t.prev;ty(r,t),t=i}},ty=(r,t)=>{if(t){const i=t.value;r[Sh]&&r[Sh](i.key,i.value),r[kh]-=i.length,r[el].delete(i.key),r[xs].removeNode(t)}};class _Re{constructor(t,i,a,u,c){this.key=t,this.value=i,this.length=a,this.now=u,this.maxAge=c||0}}const TZ=(r,t,i,a)=>{let u=i.value;AE(r,u)&&(ty(r,i),r[km]||(u=void 0)),u&&t.call(a,u.value,u.key,r)};var RZ=wRe;const xRe=RZ,ERe=10;var kRe=class{constructor({document:t}){this.document=t,this.cache=new xRe({max:ERe})}getProcessed(t){return this.cache.get(t)}setProcessed(t,i){this.cache.set(t,i)}};const{isArray:kj,isObject:Tm,isString:PE}=Nu,{asArray:SRe}=pc,{prependBase:Sj}=Vd,Rm=vc,IZ=kRe,CZ=10;var TRe=class{constructor({sharedCache:t}){this.perOpCache=new Map,this.sharedCache=t}async resolve({activeCtx:t,context:i,documentLoader:a,base:u,cycles:c=new Set}){i&&Tm(i)&&i["@context"]&&(i=i["@context"]),i=SRe(i);const l=[];for(const h of i){if(PE(h)){let g=this._get(h);g||(g=await this._resolveRemoteContext({activeCtx:t,url:h,documentLoader:a,base:u,cycles:c})),kj(g)?l.push(...g):l.push(g);continue}if(h===null){l.push(new IZ({document:null}));continue}Tm(h)||RRe(i);const v=JSON.stringify(h);let p=this._get(v);p||(p=new IZ({document:h}),this._cacheResolvedContext({key:v,resolved:p,tag:"static"})),l.push(p)}return l}_get(t){let i=this.perOpCache.get(t);if(!i){const a=this.sharedCache.get(t);a&&(i=a.get("static"),i&&this.perOpCache.set(t,i))}return i}_cacheResolvedContext({key:t,resolved:i,tag:a}){if(this.perOpCache.set(t,i),a!==void 0){let u=this.sharedCache.get(t);u||(u=new Map,this.sharedCache.set(t,u)),u.set(a,i)}return i}async _resolveRemoteContext({activeCtx:t,url:i,documentLoader:a,base:u,cycles:c}){i=Sj(u,i);const{context:l,remoteDoc:h}=await this._fetchContext({activeCtx:t,url:i,documentLoader:a,cycles:c});u=h.documentUrl||i,Tj({context:l,base:u});const v=await this.resolve({activeCtx:t,context:l,documentLoader:a,base:u,cycles:c});return this._cacheResolvedContext({key:i,resolved:v,tag:h.tag}),v}async _fetchContext({activeCtx:t,url:i,documentLoader:a,cycles:u}){if(u.size>CZ)throw new Rm("Maximum number of @context URLs exceeded.","jsonld.ContextUrlError",{code:t.processingMode==="json-ld-1.0"?"loading remote context failed":"context overflow",max:CZ});if(u.has(i))throw new Rm("Cyclical @context URLs detected.","jsonld.ContextUrlError",{code:t.processingMode==="json-ld-1.0"?"recursive context inclusion":"context overflow",url:i});u.add(i);let c,l;try{l=await a(i),c=l.document||null,PE(c)&&(c=JSON.parse(c))}catch(h){throw new Rm(`Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context. URL: "${i}".`,"jsonld.InvalidUrl",{code:"loading remote context failed",url:i,cause:h})}if(!Tm(c))throw new Rm(`Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object. URL: "${i}".`,"jsonld.InvalidUrl",{code:"invalid remote context",url:i});return"@context"in c?c={"@context":c["@context"]}:c={"@context":{}},l.contextUrl&&(kj(c["@context"])||(c["@context"]=[c["@context"]]),c["@context"].push(l.contextUrl)),{context:c,remoteDoc:l}}};function RRe(r){throw new Rm("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:r})}function Tj({context:r,base:t}){if(!r)return;const i=r["@context"];if(PE(i)){r["@context"]=Sj(t,i);return}if(kj(i)){for(let a=0;a<i.length;++a){const u=i[a];if(PE(u)){i[a]=Sj(t,u);continue}Tm(u)&&Tj({context:{"@context":u},base:t})}return}if(Tm(i))for(const a in i)Tj({context:i[a],base:t})}var IRe=bj.NQuads;const Rj=vc,{isArray:CRe}=Nu,{asArray:AZ}=pc,Ou={};var Im=Ou;Ou.defaultEventHandler=null,Ou.setupEventHandler=({options:r={}})=>{const t=[].concat(r.safe?Ou.safeEventHandler:[],r.eventHandler?AZ(r.eventHandler):[],Ou.defaultEventHandler?Ou.defaultEventHandler:[]);return t.length===0?null:t},Ou.handleEvent=({event:r,options:t})=>{PZ({event:r,handlers:t.eventHandler})};function PZ({event:r,handlers:t}){let i=!0;for(let a=0;i&&a<t.length;++a){i=!1;const u=t[a];if(CRe(u))i=PZ({event:r,handlers:u});else if(typeof u=="function")u({event:r,next:()=>{i=!0}});else if(typeof u=="object")r.code in u?u[r.code]({event:r,next:()=>{i=!0}}):i=!0;else throw new Rj("Invalid event handler.","jsonld.InvalidEventHandler",{event:r})}return i}const ARe=new Set(["empty object","free-floating scalar","invalid @language value","invalid property","null @id value","null @value value","object with only @id","object with only @language","object with only @list","object with only @value","relative @id reference","relative @type reference","relative @vocab reference","reserved @id value","reserved @reverse value","reserved term","blank node predicate","relative graph reference","relative object reference","relative predicate reference","relative subject reference","rdfDirection not set"]);Ou.safeEventHandler=function({event:t,next:i}){if(t.level==="warning"&&ARe.has(t.code))throw new Rj("Safe mode validation error.","jsonld.ValidationError",{event:t});i()},Ou.logEventHandler=function({event:t,next:i}){console.log(`EVENT: ${t.message}`,{event:t}),i()},Ou.logWarningEventHandler=function({event:t,next:i}){t.level==="warning"&&console.warn(`WARNING: ${t.message}`,{event:t}),i()},Ou.unhandledEventHandler=function({event:t}){throw new Rj("No handler for event.","jsonld.UnhandledEvent",{event:t})},Ou.setDefaultEventHandler=function({eventHandler:r}={}){Ou.defaultEventHandler=r?AZ(r):null};const LZ=pc,Tn=vc,{isArray:NZ,isObject:Ud,isString:su,isUndefined:PRe}=Nu,{isAbsolute:$p,isRelative:LRe,prependBase:Cm}=Vd,{handleEvent:ny}=Im,{REGEX_BCP47:NRe,REGEX_KEYWORD:LE,asArray:OZ,compareShortestLeast:ORe}=pc,NE=new Map,DRe=1e4,Pi={};var Gp=Pi;Pi.process=async({activeCtx:r,localCtx:t,options:i,propagate:a=!0,overrideProtected:u=!1,cycles:c=new Set})=>{if(Ud(t)&&"@context"in t&&NZ(t["@context"])&&(t=t["@context"]),OZ(t).length===0)return r;const h=[],v=[({event:_,next:E})=>{h.push(_),E()}];i.eventHandler&&v.push(i.eventHandler);const p=i;i={...i,eventHandler:v};const g=await i.contextResolver.resolve({activeCtx:r,context:t,documentLoader:i.documentLoader,base:i.base});Ud(g[0].document)&&typeof g[0].document["@propagate"]=="boolean"&&(a=g[0].document["@propagate"]);let w=r;!a&&!w.previousContext&&(w=w.clone(),w.previousContext=r);for(const _ of g){let{document:E}=_;if(r=w,E===null){if(!u&&Object.keys(r.protected).length!==0)throw new Tn("Tried to nullify a context with protected terms outside of a term definition.","jsonld.SyntaxError",{code:"invalid context nullification"});w=r=Pi.getInitialContext(i).clone();continue}const k=_.getProcessed(r);if(k){if(p.eventHandler)for(const C of k.events)ny({event:C,options:p});w=r=k.context;continue}if(Ud(E)&&"@context"in E&&(E=E["@context"]),!Ud(E))throw new Tn("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:E});w=w.clone();const I=new Map;if("@version"in E){if(E["@version"]!==1.1)throw new Tn("Unsupported JSON-LD version: "+E["@version"],"jsonld.UnsupportedVersion",{code:"invalid @version value",context:E});if(r.processingMode&&r.processingMode==="json-ld-1.0")throw new Tn("@version: "+E["@version"]+" not compatible with "+r.processingMode,"jsonld.ProcessingModeConflict",{code:"processing mode conflict",context:E});w.processingMode="json-ld-1.1",w["@version"]=E["@version"],I.set("@version",!0)}if(w.processingMode=w.processingMode||r.processingMode,"@base"in E){let C=E["@base"];if(!(C===null||$p(C)))if(LRe(C))C=Cm(w["@base"],C);else throw new Tn('Invalid JSON-LD syntax; the value of "@base" in a @context must be an absolute IRI, a relative IRI, or null.',"jsonld.SyntaxError",{code:"invalid base IRI",context:E});w["@base"]=C,I.set("@base",!0)}if("@vocab"in E){const C=E["@vocab"];if(C===null)delete w["@vocab"];else if(su(C)){if(!$p(C)&&Pi.processingMode(w,1))throw new Tn('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be an absolute IRI.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:E});{const P=ry(w,C,{vocab:!0,base:!0},void 0,void 0,i);$p(P)||i.eventHandler&&ny({event:{type:["JsonLdEvent"],code:"relative @vocab reference",level:"warning",message:"Relative @vocab reference found.",details:{vocab:P}},options:i}),w["@vocab"]=P}}else throw new Tn('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:E});I.set("@vocab",!0)}if("@language"in E){const C=E["@language"];if(C===null)delete w["@language"];else if(su(C))C.match(NRe)||i.eventHandler&&ny({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:C}},options:i}),w["@language"]=C.toLowerCase();else throw new Tn('Invalid JSON-LD syntax; the value of "@language" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid default language",context:E});I.set("@language",!0)}if("@direction"in E){const C=E["@direction"];if(r.processingMode==="json-ld-1.0")throw new Tn("Invalid JSON-LD syntax; @direction not compatible with "+r.processingMode,"jsonld.SyntaxError",{code:"invalid context member",context:E});if(C===null)delete w["@direction"];else{if(C!=="ltr"&&C!=="rtl")throw new Tn('Invalid JSON-LD syntax; the value of "@direction" in a @context must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:E});w["@direction"]=C}I.set("@direction",!0)}if("@propagate"in E){const C=E["@propagate"];if(r.processingMode==="json-ld-1.0")throw new Tn("Invalid JSON-LD syntax; @propagate not compatible with "+r.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:E});if(typeof C!="boolean")throw new Tn("Invalid JSON-LD syntax; @propagate value must be a boolean.","jsonld.SyntaxError",{code:"invalid @propagate value",context:t});I.set("@propagate",!0)}if("@import"in E){const C=E["@import"];if(r.processingMode==="json-ld-1.0")throw new Tn("Invalid JSON-LD syntax; @import not compatible with "+r.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:E});if(!su(C))throw new Tn("Invalid JSON-LD syntax; @import must be a string.","jsonld.SyntaxError",{code:"invalid @import value",context:t});const P=await i.contextResolver.resolve({activeCtx:r,context:C,documentLoader:i.documentLoader,base:i.base});if(P.length!==1)throw new Tn("Invalid JSON-LD syntax; @import must reference a single context.","jsonld.SyntaxError",{code:"invalid remote context",context:t});const A=P[0].getProcessed(r);if(A)E=A;else{const L=P[0].document;if("@import"in L)throw new Tn("Invalid JSON-LD syntax: imported context must not include @import.","jsonld.SyntaxError",{code:"invalid context entry",context:t});for(const O in L)E.hasOwnProperty(O)||(E[O]=L[O]);P[0].setProcessed(r,E)}I.set("@import",!0)}I.set("@protected",E["@protected"]||!1);for(const C in E)if(Pi.createTermDefinition({activeCtx:w,localCtx:E,term:C,defined:I,options:i,overrideProtected:u}),Ud(E[C])&&"@context"in E[C]){const P=E[C]["@context"];let A=!0;if(su(P)){const L=Cm(i.base,P);c.has(L)?A=!1:c.add(L)}if(A)try{await Pi.process({activeCtx:w.clone(),localCtx:E[C]["@context"],overrideProtected:!0,options:i,cycles:c})}catch{throw new Tn("Invalid JSON-LD syntax; invalid scoped context.","jsonld.SyntaxError",{code:"invalid scoped context",context:E[C]["@context"],term:C})}}_.setProcessed(r,{context:w,events:h})}return w},Pi.createTermDefinition=({activeCtx:r,localCtx:t,term:i,defined:a,options:u,overrideProtected:c=!1})=>{if(a.has(i)){if(a.get(i))return;throw new Tn("Cyclical context definition detected.","jsonld.CyclicalContext",{code:"cyclic IRI mapping",context:t,term:i})}a.set(i,!1);let l;if(t.hasOwnProperty(i)&&(l=t[i]),i==="@type"&&Ud(l)&&(l["@container"]||"@set")==="@set"&&Pi.processingMode(r,1.1)){const E=["@container","@id","@protected"],k=Object.keys(l);if(k.length===0||k.some(I=>!E.includes(I)))throw new Tn("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:i})}else{if(Pi.isKeyword(i))throw new Tn("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:i});if(i.match(LE)){u.eventHandler&&ny({event:{type:["JsonLdEvent"],code:"reserved term",level:"warning",message:'Terms beginning with "@" are reserved for future use and dropped.',details:{term:i}},options:u});return}else if(i==="")throw new Tn("Invalid JSON-LD syntax; a term cannot be an empty string.","jsonld.SyntaxError",{code:"invalid term definition",context:t})}const h=r.mappings.get(i);r.mappings.has(i)&&r.mappings.delete(i);let v=!1;if((su(l)||l===null)&&(v=!0,l={"@id":l}),!Ud(l))throw new Tn("Invalid JSON-LD syntax; @context term values must be strings or objects.","jsonld.SyntaxError",{code:"invalid term definition",context:t});const p={};r.mappings.set(i,p),p.reverse=!1;const g=["@container","@id","@language","@reverse","@type"];Pi.processingMode(r,1.1)&&g.push("@context","@direction","@index","@nest","@prefix","@protected");for(const E in l)if(!g.includes(E))throw new Tn("Invalid JSON-LD syntax; a term definition must not contain "+E,"jsonld.SyntaxError",{code:"invalid term definition",context:t});const w=i.indexOf(":");if(p._termHasColon=w>0,"@reverse"in l){if("@id"in l)throw new Tn("Invalid JSON-LD syntax; a @reverse term definition must not contain @id.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});if("@nest"in l)throw new Tn("Invalid JSON-LD syntax; a @reverse term definition must not contain @nest.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});const E=l["@reverse"];if(!su(E))throw new Tn("Invalid JSON-LD syntax; a @context @reverse value must be a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(E.match(LE)){u.eventHandler&&ny({event:{type:["JsonLdEvent"],code:"reserved @reverse value",level:"warning",message:'@reverse values beginning with "@" are reserved for future use and dropped.',details:{reverse:E}},options:u}),h?r.mappings.set(i,h):r.mappings.delete(i);return}const k=ry(r,E,{vocab:!0,base:!1},t,a,u);if(!$p(k))throw new Tn("Invalid JSON-LD syntax; a @context @reverse value must be an absolute IRI or a blank node identifier.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});p["@id"]=k,p.reverse=!0}else if("@id"in l){let E=l["@id"];if(E&&!su(E))throw new Tn("Invalid JSON-LD syntax; a @context @id value must be an array of strings or a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(E===null)p["@id"]=null;else if(!Pi.isKeyword(E)&&E.match(LE)){u.eventHandler&&ny({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:'@id values beginning with "@" are reserved for future use and dropped.',details:{id:E}},options:u}),h?r.mappings.set(i,h):r.mappings.delete(i);return}else if(E!==i){if(E=ry(r,E,{vocab:!0,base:!1},t,a,u),!$p(E)&&!Pi.isKeyword(E))throw new Tn("Invalid JSON-LD syntax; a @context @id value must be an absolute IRI, a blank node identifier, or a keyword.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(i.match(/(?::[^:])|\//)){const k=new Map(a).set(i,!0);if(ry(r,i,{vocab:!0,base:!1},t,k,u)!==E)throw new Tn("Invalid JSON-LD syntax; term in form of IRI must expand to definition.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t})}p["@id"]=E,p._prefix=v&&!p._termHasColon&&E.match(/[:\/\?#\[\]@]$/)!==null}}if(!("@id"in p))if(p._termHasColon){const E=i.substr(0,w);if(t.hasOwnProperty(E)&&Pi.createTermDefinition({activeCtx:r,localCtx:t,term:E,defined:a,options:u}),r.mappings.has(E)){const k=i.substr(w+1);p["@id"]=r.mappings.get(E)["@id"]+k}else p["@id"]=i}else if(i==="@type")p["@id"]=i;else{if(!("@vocab"in r))throw new Tn("Invalid JSON-LD syntax; @context terms must define an @id.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t,term:i});p["@id"]=r["@vocab"]+i}if((l["@protected"]===!0||a.get("@protected")===!0&&l["@protected"]!==!1)&&(r.protected[i]=!0,p.protected=!0),a.set(i,!0),"@type"in l){let E=l["@type"];if(!su(E))throw new Tn("Invalid JSON-LD syntax; an @context @type value must be a string.","jsonld.SyntaxError",{code:"invalid type mapping",context:t});if(E==="@json"||E==="@none"){if(Pi.processingMode(r,1))throw new Tn(`Invalid JSON-LD syntax; an @context @type value must not be "${E}" in JSON-LD 1.0 mode.`,"jsonld.SyntaxError",{code:"invalid type mapping",context:t})}else if(E!=="@id"&&E!=="@vocab"){if(E=ry(r,E,{vocab:!0,base:!1},t,a,u),!$p(E))throw new Tn("Invalid JSON-LD syntax; an @context @type value must be an absolute IRI.","jsonld.SyntaxError",{code:"invalid type mapping",context:t});if(E.indexOf("_:")===0)throw new Tn("Invalid JSON-LD syntax; an @context @type value must be an IRI, not a blank node identifier.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}p["@type"]=E}if("@container"in l){const E=su(l["@container"])?[l["@container"]]:l["@container"]||[],k=["@list","@set","@index","@language"];let I=!0;const C=E.includes("@set");if(Pi.processingMode(r,1.1)){if(k.push("@graph","@id","@type"),E.includes("@list")){if(E.length!==1)throw new Tn("Invalid JSON-LD syntax; @context @container with @list must have no other values","jsonld.SyntaxError",{code:"invalid container mapping",context:t})}else if(E.includes("@graph")){if(E.some(P=>P!=="@graph"&&P!=="@id"&&P!=="@index"&&P!=="@set"))throw new Tn("Invalid JSON-LD syntax; @context @container with @graph must have no other values other than @id, @index, and @set","jsonld.SyntaxError",{code:"invalid container mapping",context:t})}else I&=E.length<=(C?2:1);if(E.includes("@type")&&(p["@type"]=p["@type"]||"@id",!["@id","@vocab"].includes(p["@type"])))throw new Tn("Invalid JSON-LD syntax; container: @type requires @type to be @id or @vocab.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}else I&=!NZ(l["@container"]),I&=E.length<=1;if(I&=E.every(P=>k.includes(P)),I&=!(C&&E.includes("@list")),!I)throw new Tn("Invalid JSON-LD syntax; @context @container value must be one of the following: "+k.join(", "),"jsonld.SyntaxError",{code:"invalid container mapping",context:t});if(p.reverse&&!E.every(P=>["@index","@set"].includes(P)))throw new Tn("Invalid JSON-LD syntax; @context @container value for a @reverse type definition must be @index or @set.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});p["@container"]=E}if("@index"in l){if(!("@container"in l)||!p["@container"].includes("@index"))throw new Tn(`Invalid JSON-LD syntax; @index without @index in @container: "${l["@index"]}" on term "${i}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t});if(!su(l["@index"])||l["@index"].indexOf("@")===0)throw new Tn(`Invalid JSON-LD syntax; @index must expand to an IRI: "${l["@index"]}" on term "${i}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t});p["@index"]=l["@index"]}if("@context"in l&&(p["@context"]=l["@context"]),"@language"in l&&!("@type"in l)){let E=l["@language"];if(E!==null&&!su(E))throw new Tn("Invalid JSON-LD syntax; @context @language value must be a string or null.","jsonld.SyntaxError",{code:"invalid language mapping",context:t});E!==null&&(E=E.toLowerCase()),p["@language"]=E}if("@prefix"in l){if(i.match(/:|\//))throw new Tn("Invalid JSON-LD syntax; @context @prefix used on a compact IRI term","jsonld.SyntaxError",{code:"invalid term definition",context:t});if(Pi.isKeyword(p["@id"]))throw new Tn("Invalid JSON-LD syntax; keywords may not be used as prefixes","jsonld.SyntaxError",{code:"invalid term definition",context:t});if(typeof l["@prefix"]=="boolean")p._prefix=l["@prefix"]===!0;else throw new Tn("Invalid JSON-LD syntax; @context value for @prefix must be boolean","jsonld.SyntaxError",{code:"invalid @prefix value",context:t})}if("@direction"in l){const E=l["@direction"];if(E!==null&&E!=="ltr"&&E!=="rtl")throw new Tn('Invalid JSON-LD syntax; @direction value must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:t});p["@direction"]=E}if("@nest"in l){const E=l["@nest"];if(!su(E)||E!=="@nest"&&E.indexOf("@")===0)throw new Tn("Invalid JSON-LD syntax; @context @nest value must be a string which is not a keyword other than @nest.","jsonld.SyntaxError",{code:"invalid @nest value",context:t});p["@nest"]=E}// disallow aliasing @context and @preserve
570
+ const _=p["@id"];if(_==="@context"||_==="@preserve")throw new Tn("Invalid JSON-LD syntax; @context and @preserve cannot be aliased.","jsonld.SyntaxError",{code:"invalid keyword alias",context:t});if(h&&h.protected&&!c&&(r.protected[i]=!0,p.protected=!0,!Ij(h,p)))throw new Tn("Invalid JSON-LD syntax; tried to redefine a protected term.","jsonld.SyntaxError",{code:"protected term redefinition",context:t,term:i})},Pi.expandIri=(r,t,i,a)=>ry(r,t,i,void 0,void 0,a);function ry(r,t,i,a,u,c){if(t===null||!su(t)||Pi.isKeyword(t))return t;if(t.match(LE))return null;if(a&&a.hasOwnProperty(t)&&u.get(t)!==!0&&Pi.createTermDefinition({activeCtx:r,localCtx:a,term:t,defined:u,options:c}),i=i||{},i.vocab){const h=r.mappings.get(t);if(h===null)return null;if(Ud(h)&&"@id"in h)return h["@id"]}const l=t.indexOf(":");if(l>0){const h=t.substr(0,l),v=t.substr(l+1);if(h==="_"||v.indexOf("//")===0)return t;a&&a.hasOwnProperty(h)&&Pi.createTermDefinition({activeCtx:r,localCtx:a,term:h,defined:u,options:c});const p=r.mappings.get(h);if(p&&p._prefix)return p["@id"]+v;if($p(t))return t}if(i.vocab&&"@vocab"in r)t=r["@vocab"]+t;else if(i.base){let h,v;"@base"in r?r["@base"]?(v=Cm(c.base,r["@base"]),h=Cm(v,t)):(v=r["@base"],h=t):(v=c.base,h=Cm(c.base,t)),t=h}return t}Pi.getInitialContext=r=>{const t=JSON.stringify({processingMode:r.processingMode}),i=NE.get(t);if(i)return i;const a={processingMode:r.processingMode,mappings:new Map,inverse:null,getInverse:u,clone:h,revertToPreviousContext:v,protected:{}};return NE.size===DRe&&NE.clear(),NE.set(t,a),a;function u(){const p=this;if(p.inverse)return p.inverse;const g=p.inverse={},w=p.fastCurieMap={},_={},E=(p["@language"]||"@none").toLowerCase(),k=p["@direction"],I=p.mappings,C=[...I.keys()].sort(ORe);for(const P of C){const A=I.get(P);if(A===null)continue;let L=A["@container"]||"@none";if(L=[].concat(L).sort().join(""),A["@id"]===null)continue;const O=OZ(A["@id"]);for(const M of O){let B=g[M];const F=Pi.isKeyword(M);if(B)!F&&!A._termHasColon&&_[M].push(P);else if(g[M]=B={},!F&&!A._termHasColon){_[M]=[P];const q={iri:M,terms:_[M]};M[0]in w?w[M[0]].push(q):w[M[0]]=[q]}if(B[L]||(B[L]={"@language":{},"@type":{},"@any":{}}),B=B[L],l(P,B["@any"],"@none"),A.reverse)l(P,B["@type"],"@reverse");else if(A["@type"]==="@none")l(P,B["@any"],"@none"),l(P,B["@language"],"@none"),l(P,B["@type"],"@none");else if("@type"in A)l(P,B["@type"],A["@type"]);else if("@language"in A&&"@direction"in A){const q=A["@language"],$=A["@direction"];q&&$?l(P,B["@language"],`${q}_${$}`.toLowerCase()):q?l(P,B["@language"],q.toLowerCase()):$?l(P,B["@language"],`_${$}`):l(P,B["@language"],"@null")}else"@language"in A?l(P,B["@language"],(A["@language"]||"@null").toLowerCase()):"@direction"in A?A["@direction"]?l(P,B["@language"],`_${A["@direction"]}`):l(P,B["@language"],"@none"):k?(l(P,B["@language"],`_${k}`),l(P,B["@language"],"@none"),l(P,B["@type"],"@none")):(l(P,B["@language"],E),l(P,B["@language"],"@none"),l(P,B["@type"],"@none"))}}for(const P in w)c(w,P,1);return g}function c(p,g,w){const _=p[g],E=p[g]={};let k,I;for(const C of _)k=C.iri,w>=k.length?I="":I=k[w],I in E?E[I].push(C):E[I]=[C];for(const C in E)C!==""&&c(E,C,w+1)}function l(p,g,w){g.hasOwnProperty(w)||(g[w]=p)}function h(){const p={};return p.mappings=LZ.clone(this.mappings),p.clone=this.clone,p.inverse=null,p.getInverse=this.getInverse,p.protected=LZ.clone(this.protected),this.previousContext&&(p.previousContext=this.previousContext.clone()),p.revertToPreviousContext=this.revertToPreviousContext,"@base"in this&&(p["@base"]=this["@base"]),"@language"in this&&(p["@language"]=this["@language"]),"@vocab"in this&&(p["@vocab"]=this["@vocab"]),p}function v(){return this.previousContext?this.previousContext.clone():this}},Pi.getContextValue=(r,t,i)=>{if(t===null)return i==="@context"?void 0:null;if(r.mappings.has(t)){const a=r.mappings.get(t);if(PRe(i))return a;if(a.hasOwnProperty(i))return a[i]}if(i==="@language"&&i in r||i==="@direction"&&i in r)return r[i];if(i!=="@context")return null},Pi.processingMode=(r,t)=>t.toString()>="1.1"?!r.processingMode||r.processingMode>="json-ld-"+t.toString():r.processingMode==="json-ld-1.0",Pi.isKeyword=r=>{if(!su(r)||r[0]!=="@")return!1;switch(r){case"@base":case"@container":case"@context":case"@default":case"@direction":case"@embed":case"@explicit":case"@graph":case"@id":case"@included":case"@index":case"@json":case"@language":case"@list":case"@nest":case"@none":case"@omitDefault":case"@prefix":case"@preserve":case"@protected":case"@requireAll":case"@reverse":case"@set":case"@type":case"@value":case"@version":case"@vocab":return!0}return!1};function Ij(r,t){if(!(r&&typeof r=="object")||!(t&&typeof t=="object"))return r===t;const i=Array.isArray(r);if(i!==Array.isArray(t))return!1;if(i){if(r.length!==t.length)return!1;for(let c=0;c<r.length;++c)if(!Ij(r[c],t[c]))return!1;return!0}const a=Object.keys(r),u=Object.keys(t);if(a.length!==u.length)return!1;for(const c in r){let l=r[c],h=t[c];if(c==="@container"&&Array.isArray(l)&&Array.isArray(h)&&(l=l.slice().sort(),h=h.slice().sort()),!Ij(l,h))return!1}return!0}const $i=vc,{isArray:gc,isObject:bc,isEmptyObject:Cj,isString:ao,isUndefined:OE}=Nu,{isList:Aj,isValue:Pj,isGraph:MRe,isSubject:jRe}=Eh,{expandIri:$a,getContextValue:Du,isKeyword:Lj,process:Am,processingMode:DE}=Gp,{isAbsolute:ME}=Vd,{REGEX_BCP47:DZ,REGEX_KEYWORD:BRe,addValue:Mu,asArray:tl,getValues:qRe,validateTypeValue:FRe}=pc,{handleEvent:yc}=Im,Yd={};var $Re=Yd;Yd.expand=async({activeCtx:r,activeProperty:t=null,element:i,options:a={},insideList:u=!1,insideIndex:c=!1,typeScopedContext:l=null})=>{if(i==null)return null;if(t==="@default"&&(a=Object.assign({},a,{isFrame:!1})),!gc(i)&&!bc(i))return!u&&(t===null||$a(r,t,{vocab:!0},a)==="@graph")?(a.eventHandler&&yc({event:{type:["JsonLdEvent"],code:"free-floating scalar",level:"warning",message:"Dropping free-floating scalar not in a list.",details:{value:i}},options:a}),null):BZ({activeCtx:r,activeProperty:t,value:i,options:a});if(gc(i)){let k=[];const I=Du(r,t,"@container")||[];u=u||I.includes("@list");for(let C=0;C<i.length;++C){let P=await Yd.expand({activeCtx:r,activeProperty:t,element:i[C],options:a,insideIndex:c,typeScopedContext:l});u&&gc(P)&&(P={"@list":P}),P!==null&&(gc(P)?k=k.concat(P):k.push(P))}return k}const h=$a(r,t,{vocab:!0},a),v=Du(r,t,"@context");l=l||(r.previousContext?r:null);let p=Object.keys(i).sort(),g=!c;if(g&&l&&p.length<=2&&!p.includes("@context"))for(const k of p){const I=$a(l,k,{vocab:!0},a);if(I==="@value"){g=!1,r=l;break}if(I==="@id"&&p.length===1){g=!1;break}}g&&(r=r.revertToPreviousContext()),OE(v)||(r=await Am({activeCtx:r,localCtx:v,propagate:!0,overrideProtected:!0,options:a})),"@context"in i&&(r=await Am({activeCtx:r,localCtx:i["@context"],options:a})),l=r;let w=null;for(const k of p)if($a(r,k,{vocab:!0},a)==="@type"){w=w||k;const C=i[k],P=Array.isArray(C)?C.length>1?C.slice().sort():C:[C];for(const A of P){const L=Du(l,A,"@context");OE(L)||(r=await Am({activeCtx:r,localCtx:L,options:a,propagate:!1}))}}let _={};await jZ({activeCtx:r,activeProperty:t,expandedActiveProperty:h,element:i,expandedParent:_,options:a,insideList:u,typeKey:w,typeScopedContext:l}),p=Object.keys(_);let E=p.length;if("@value"in _){if("@type"in _&&("@language"in _||"@direction"in _))throw new $i('Invalid JSON-LD syntax; an element containing "@value" may not contain both "@type" and either "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:_});let k=E-1;if("@type"in _&&(k-=1),"@index"in _&&(k-=1),"@language"in _&&(k-=1),"@direction"in _&&(k-=1),k!==0)throw new $i('Invalid JSON-LD syntax; an element containing "@value" may only have an "@index" property and either "@type" or either or both "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:_});const I=_["@value"]===null?[]:tl(_["@value"]),C=qRe(_,"@type");if(!(DE(r,1.1)&&C.includes("@json")&&C.length===1))if(I.length===0)a.eventHandler&&yc({event:{type:["JsonLdEvent"],code:"null @value value",level:"warning",message:"Dropping null @value value.",details:{value:_}},options:a}),_=null;else{if(!I.every(P=>ao(P)||Cj(P))&&"@language"in _)throw new $i("Invalid JSON-LD syntax; only strings may be language-tagged.","jsonld.SyntaxError",{code:"invalid language-tagged value",element:_});if(!C.every(P=>ME(P)&&!(ao(P)&&P.indexOf("_:")===0)||Cj(P)))throw new $i('Invalid JSON-LD syntax; an element containing "@value" and "@type" must have an absolute IRI for the value of "@type".',"jsonld.SyntaxError",{code:"invalid typed value",element:_})}}else if("@type"in _&&!gc(_["@type"]))_["@type"]=[_["@type"]];else if("@set"in _||"@list"in _){if(E>1&&!(E===2&&"@index"in _))throw new $i('Invalid JSON-LD syntax; if an element has the property "@set" or "@list", then it can have at most one other property that is "@index".',"jsonld.SyntaxError",{code:"invalid set or list object",element:_});"@set"in _&&(_=_["@set"],p=Object.keys(_),E=p.length)}else E===1&&"@language"in _&&(a.eventHandler&&yc({event:{type:["JsonLdEvent"],code:"object with only @language",level:"warning",message:"Dropping object with only @language.",details:{value:_}},options:a}),_=null);return bc(_)&&!a.keepFreeFloatingNodes&&!u&&(t===null||h==="@graph"||(Du(r,t,"@container")||[]).includes("@graph"))&&(_=MZ({value:_,count:E,options:a})),_};function MZ({value:r,count:t,options:i}){if(t===0||"@value"in r||"@list"in r||t===1&&"@id"in r){if(i.eventHandler){let a,u;t===0?(a="empty object",u="Dropping empty object."):"@value"in r?(a="object with only @value",u="Dropping object with only @value."):"@list"in r?(a="object with only @list",u="Dropping object with only @list."):t===1&&"@id"in r&&(a="object with only @id",u="Dropping object with only @id."),yc({event:{type:["JsonLdEvent"],code:a,level:"warning",message:u,details:{value:r}},options:i})}return null}return r}async function jZ({activeCtx:r,activeProperty:t,expandedActiveProperty:i,element:a,expandedParent:u,options:c={},insideList:l,typeKey:h,typeScopedContext:v}){const p=Object.keys(a).sort(),g=[];let w;const _=a[h]&&$a(r,gc(a[h])?a[h][0]:a[h],{vocab:!0},{...c,typeExpansion:!0})==="@json";for(const E of p){let k=a[E],I;if(E==="@context")continue;const C=$a(r,E,{vocab:!0},c);if(C===null||!(ME(C)||Lj(C))){c.eventHandler&&yc({event:{type:["JsonLdEvent"],code:"invalid property",level:"warning",message:"Dropping property that did not expand into an absolute IRI or keyword.",details:{property:E,expandedProperty:C}},options:c});continue}if(Lj(C)){if(i==="@reverse")throw new $i("Invalid JSON-LD syntax; a keyword cannot be used as a @reverse property.","jsonld.SyntaxError",{code:"invalid reverse property map",value:k});if(C in u&&C!=="@included"&&C!=="@type")throw new $i("Invalid JSON-LD syntax; colliding keywords detected.","jsonld.SyntaxError",{code:"colliding keywords",keyword:C})}if(C==="@id"){if(!ao(k)){if(!c.isFrame)throw new $i('Invalid JSON-LD syntax; "@id" value must a string.',"jsonld.SyntaxError",{code:"invalid @id value",value:k});if(bc(k)){if(!Cj(k))throw new $i('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:k})}else if(gc(k)){if(!k.every(O=>ao(O)))throw new $i('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:k})}else throw new $i('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:k})}Mu(u,"@id",tl(k).map(O=>{if(ao(O)){const M=$a(r,O,{base:!0},c);return c.eventHandler&&(M===null?yc(O===null?{event:{type:["JsonLdEvent"],code:"null @id value",level:"warning",message:"Null @id found.",details:{id:O}},options:c}:{event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:O}},options:c}):ME(M)||yc({event:{type:["JsonLdEvent"],code:"relative @id reference",level:"warning",message:"Relative @id reference found.",details:{id:O,expandedId:M}},options:c})),M}return O}),{propertyIsArray:c.isFrame});continue}if(C==="@type"){bc(k)&&(k=Object.fromEntries(Object.entries(k).map(([O,M])=>[$a(v,O,{vocab:!0}),tl(M).map(B=>$a(v,B,{base:!0,vocab:!0},{...c,typeExpansion:!0}))]))),FRe(k,c.isFrame),Mu(u,"@type",tl(k).map(O=>{if(ao(O)){const M=$a(v,O,{base:!0,vocab:!0},{...c,typeExpansion:!0});return M!=="@json"&&!ME(M)&&c.eventHandler&&yc({event:{type:["JsonLdEvent"],code:"relative @type reference",level:"warning",message:"Relative @type reference found.",details:{type:O}},options:c}),M}return O}),{propertyIsArray:!!c.isFrame});continue}if(C==="@included"&&DE(r,1.1)){const O=tl(await Yd.expand({activeCtx:r,activeProperty:t,element:k,options:c}));if(!O.every(M=>jRe(M)))throw new $i("Invalid JSON-LD syntax; values of @included must expand to node objects.","jsonld.SyntaxError",{code:"invalid @included value",value:k});Mu(u,"@included",O,{propertyIsArray:!0});continue}if(C==="@graph"&&!(bc(k)||gc(k)))throw new $i('Invalid JSON-LD syntax; "@graph" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid @graph value",value:k});if(C==="@value"){w=k,_&&DE(r,1.1)?u["@value"]=k:Mu(u,"@value",k,{propertyIsArray:c.isFrame});continue}if(C==="@language"){if(k===null)continue;if(!ao(k)&&!c.isFrame)throw new $i('Invalid JSON-LD syntax; "@language" value must be a string.',"jsonld.SyntaxError",{code:"invalid language-tagged string",value:k});k=tl(k).map(O=>ao(O)?O.toLowerCase():O);for(const O of k)ao(O)&&!O.match(DZ)&&c.eventHandler&&yc({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:O}},options:c});Mu(u,"@language",k,{propertyIsArray:c.isFrame});continue}if(C==="@direction"){if(!ao(k)&&!c.isFrame)throw new $i('Invalid JSON-LD syntax; "@direction" value must be a string.',"jsonld.SyntaxError",{code:"invalid base direction",value:k});k=tl(k);for(const O of k)if(ao(O)&&O!=="ltr"&&O!=="rtl")throw new $i('Invalid JSON-LD syntax; "@direction" must be "ltr" or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",value:k});Mu(u,"@direction",k,{propertyIsArray:c.isFrame});continue}if(C==="@index"){if(!ao(k))throw new $i('Invalid JSON-LD syntax; "@index" value must be a string.',"jsonld.SyntaxError",{code:"invalid @index value",value:k});Mu(u,"@index",k);continue}if(C==="@reverse"){if(!bc(k))throw new $i('Invalid JSON-LD syntax; "@reverse" value must be an object.',"jsonld.SyntaxError",{code:"invalid @reverse value",value:k});if(I=await Yd.expand({activeCtx:r,activeProperty:"@reverse",element:k,options:c}),"@reverse"in I)for(const M in I["@reverse"])Mu(u,M,I["@reverse"][M],{propertyIsArray:!0});let O=u["@reverse"]||null;for(const M in I){if(M==="@reverse")continue;O===null&&(O=u["@reverse"]={}),Mu(O,M,[],{propertyIsArray:!0});const B=I[M];for(let F=0;F<B.length;++F){const q=B[F];if(Pj(q)||Aj(q))throw new $i('Invalid JSON-LD syntax; "@reverse" value must not be a @value or an @list.',"jsonld.SyntaxError",{code:"invalid reverse property value",value:I});Mu(O,M,q,{propertyIsArray:!0})}}continue}if(C==="@nest"){g.push(E);continue}let P=r;const A=Du(r,E,"@context");OE(A)||(P=await Am({activeCtx:r,localCtx:A,propagate:!0,overrideProtected:!0,options:c}));const L=Du(r,E,"@container")||[];if(L.includes("@language")&&bc(k)){const O=Du(P,E,"@direction");I=GRe(P,k,O,c)}else if(L.includes("@index")&&bc(k)){const O=L.includes("@graph"),M=Du(P,E,"@index")||"@index",B=M!=="@index"&&$a(r,M,{vocab:!0},c);I=await Nj({activeCtx:P,options:c,activeProperty:E,value:k,asGraph:O,indexKey:M,propertyIndex:B})}else if(L.includes("@id")&&bc(k)){const O=L.includes("@graph");I=await Nj({activeCtx:P,options:c,activeProperty:E,value:k,asGraph:O,indexKey:"@id"})}else if(L.includes("@type")&&bc(k))I=await Nj({activeCtx:P.revertToPreviousContext(),options:c,activeProperty:E,value:k,asGraph:!1,indexKey:"@type"});else{const O=C==="@list";if(O||C==="@set"){let M=t;O&&i==="@graph"&&(M=null),I=await Yd.expand({activeCtx:P,activeProperty:M,element:k,options:c,insideList:O})}else Du(r,E,"@type")==="@json"?I={"@type":"@json","@value":k}:I=await Yd.expand({activeCtx:P,activeProperty:E,element:k,options:c,insideList:!1})}if(!(I===null&&C!=="@value")){if(C!=="@list"&&!Aj(I)&&L.includes("@list")&&(I={"@list":tl(I)}),L.includes("@graph")&&!L.some(O=>O==="@id"||O==="@index")){if(I=tl(I),c.isFrame||(I=I.filter(O=>{const M=Object.keys(O).length;return MZ({value:O,count:M,options:c})!==null})),I.length===0)continue;I=I.map(O=>({"@graph":tl(O)}))}if(P.mappings.has(E)&&P.mappings.get(E).reverse){const O=u["@reverse"]=u["@reverse"]||{};I=tl(I);for(let M=0;M<I.length;++M){const B=I[M];if(Pj(B)||Aj(B))throw new $i('Invalid JSON-LD syntax; "@reverse" value must not be a @value or an @list.',"jsonld.SyntaxError",{code:"invalid reverse property value",value:I});Mu(O,C,B,{propertyIsArray:!0})}continue}Mu(u,C,I,{propertyIsArray:!0})}}if("@value"in u&&!(u["@type"]==="@json"&&DE(r,1.1))){if((bc(w)||gc(w))&&!c.isFrame)throw new $i('Invalid JSON-LD syntax; "@value" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid value object value",value:w})}for(const E of g){const k=gc(a[E])?a[E]:[a[E]];for(const I of k){if(!bc(I)||Object.keys(I).some(C=>$a(r,C,{vocab:!0},c)==="@value"))throw new $i("Invalid JSON-LD syntax; nested value must be a node object.","jsonld.SyntaxError",{code:"invalid @nest value",value:I});await jZ({activeCtx:r,activeProperty:t,expandedActiveProperty:i,element:I,expandedParent:u,options:c,insideList:l,typeScopedContext:v,typeKey:h})}}}function BZ({activeCtx:r,activeProperty:t,value:i,options:a}){if(i==null)return null;const u=$a(r,t,{vocab:!0},a);if(u==="@id")return $a(r,i,{base:!0},a);if(u==="@type")return $a(r,i,{vocab:!0,base:!0},{...a,typeExpansion:!0});const c=Du(r,t,"@type");if((c==="@id"||u==="@graph")&&ao(i)){const h=$a(r,i,{base:!0},a);return h===null&&i.match(BRe)&&a.eventHandler&&yc({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:t}},options:a}),{"@id":h}}if(c==="@vocab"&&ao(i))return{"@id":$a(r,i,{vocab:!0,base:!0},a)};if(Lj(u))return i;const l={};if(c&&!["@id","@vocab","@none"].includes(c))l["@type"]=c;else if(ao(i)){const h=Du(r,t,"@language");h!==null&&(l["@language"]=h);const v=Du(r,t,"@direction");v!==null&&(l["@direction"]=v)}return["boolean","number","string"].includes(typeof i)||(i=i.toString()),l["@value"]=i,l}function GRe(r,t,i,a){const u=[],c=Object.keys(t).sort();for(const l of c){const h=$a(r,l,{vocab:!0},a);let v=t[l];gc(v)||(v=[v]);for(const p of v){if(p===null)continue;if(!ao(p))throw new $i("Invalid JSON-LD syntax; language map values must be strings.","jsonld.SyntaxError",{code:"invalid language map value",languageMap:t});const g={"@value":p};h!=="@none"&&(l.match(DZ)||a.eventHandler&&yc({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:l}},options:a}),g["@language"]=l.toLowerCase()),i&&(g["@direction"]=i),u.push(g)}}return u}async function Nj({activeCtx:r,options:t,activeProperty:i,value:a,asGraph:u,indexKey:c,propertyIndex:l}){const h=[],v=Object.keys(a).sort(),p=c==="@type";for(let g of v){if(p){const E=Du(r,g,"@context");OE(E)||(r=await Am({activeCtx:r,localCtx:E,propagate:!1,options:t}))}let w=a[g];gc(w)||(w=[w]),w=await Yd.expand({activeCtx:r,activeProperty:i,element:w,options:t,insideList:!1,insideIndex:!0});let _;l?g==="@none"?_="@none":_=BZ({activeCtx:r,activeProperty:c,value:g,options:t}):_=$a(r,g,{vocab:!0},t),c==="@id"?g=$a(r,g,{base:!0},t):p&&(g=_);for(let E of w){if(u&&!MRe(E)&&(E={"@graph":[E]}),c==="@type")_==="@none"||(E["@type"]?E["@type"]=[g].concat(E["@type"]):E["@type"]=[g]);else{if(Pj(E)&&!["@language","@type","@index"].includes(c))throw new $i(`Invalid JSON-LD syntax; Attempt to add illegal key to value object: "${c}".`,"jsonld.SyntaxError",{code:"invalid value object",value:E});l?_!=="@none"&&Mu(E,l,_,{propertyIsArray:!0,prependValue:!0}):_!=="@none"&&!(c in E)&&(E[c]=g)}h.push(E)}}return h}const{isKeyword:qZ}=Gp,of=Eh,Oj=Nu,uf=pc,HRe=vc,So={};var jE=So;So.createMergedNodeMap=(r,t)=>{t=t||{};const i=t.issuer||new uf.IdentifierIssuer("_:b"),a={"@default":{}};return So.createNodeMap(r,a,"@default",i),So.mergeNodeMaps(a)},So.createNodeMap=(r,t,i,a,u,c)=>{if(Oj.isArray(r)){for(const p of r)So.createNodeMap(p,t,i,a,void 0,c);return}if(!Oj.isObject(r)){c&&c.push(r);return}if(of.isValue(r)){if("@type"in r){let p=r["@type"];p.indexOf("_:")===0&&(r["@type"]=p=a.getId(p))}c&&c.push(r);return}else if(c&&of.isList(r)){const p=[];So.createNodeMap(r["@list"],t,i,a,u,p),c.push({"@list":p});return}if("@type"in r){const p=r["@type"];for(const g of p)g.indexOf("_:")===0&&a.getId(g)}Oj.isUndefined(u)&&(u=of.isBlankNode(r)?a.getId(r["@id"]):r["@id"]),c&&c.push({"@id":u});const l=t[i],h=l[u]=l[u]||{};h["@id"]=u;const v=Object.keys(r).sort();for(let p of v){if(p==="@id")continue;if(p==="@reverse"){const w={"@id":u},_=r["@reverse"];for(const E in _){const k=_[E];for(const I of k){let C=I["@id"];of.isBlankNode(I)&&(C=a.getId(C)),So.createNodeMap(I,t,i,a,C),uf.addValue(l[C],E,w,{propertyIsArray:!0,allowDuplicate:!1})}}continue}if(p==="@graph"){u in t||(t[u]={}),So.createNodeMap(r[p],t,u,a);continue}if(p==="@included"){So.createNodeMap(r[p],t,i,a);continue}if(p!=="@type"&&qZ(p)){if(p==="@index"&&p in h&&(r[p]!==h[p]||r[p]["@id"]!==h[p]["@id"]))throw new HRe("Invalid JSON-LD syntax; conflicting @index property detected.","jsonld.SyntaxError",{code:"conflicting indexes",subject:h});h[p]=r[p];continue}const g=r[p];if(p.indexOf("_:")===0&&(p=a.getId(p)),g.length===0){uf.addValue(h,p,[],{propertyIsArray:!0});continue}for(let w of g)if(p==="@type"&&(w=w.indexOf("_:")===0?a.getId(w):w),of.isSubject(w)||of.isSubjectReference(w)){if("@id"in w&&!w["@id"])continue;const _=of.isBlankNode(w)?a.getId(w["@id"]):w["@id"];uf.addValue(h,p,{"@id":_},{propertyIsArray:!0,allowDuplicate:!1}),So.createNodeMap(w,t,i,a,_)}else if(of.isValue(w))uf.addValue(h,p,w,{propertyIsArray:!0,allowDuplicate:!1});else if(of.isList(w)){const _=[];So.createNodeMap(w["@list"],t,i,a,u,_),w={"@list":_},uf.addValue(h,p,w,{propertyIsArray:!0,allowDuplicate:!1})}else So.createNodeMap(w,t,i,a,u),uf.addValue(h,p,w,{propertyIsArray:!0,allowDuplicate:!1})}},So.mergeNodeMapGraphs=r=>{const t={};for(const i of Object.keys(r).sort())for(const a of Object.keys(r[i]).sort()){const u=r[i][a];a in t||(t[a]={"@id":a});const c=t[a];for(const l of Object.keys(u).sort())if(qZ(l)&&l!=="@type")c[l]=uf.clone(u[l]);else for(const h of u[l])uf.addValue(c,l,uf.clone(h),{propertyIsArray:!0,allowDuplicate:!1})}return t},So.mergeNodeMaps=r=>{const t=r["@default"],i=Object.keys(r).sort();for(const a of i){if(a==="@default")continue;const u=r[a];let c=t[a];c?"@graph"in c||(c["@graph"]=[]):t[a]=c={"@id":a,"@graph":[]};const l=c["@graph"];for(const h of Object.keys(u).sort()){const v=u[h];of.isSubjectReference(v)||l.push(v)}}return t};const{isSubjectReference:zRe}=Eh,{createMergedNodeMap:VRe}=jE,FZ={};var URe=FZ;FZ.flatten=r=>{const t=VRe(r),i=[],a=Object.keys(t).sort();for(let u=0;u<a.length;++u){const c=t[a[u]];zRe(c)||i.push(c)}return i};const Dj=vc,Mj=Eh,iy=Nu,{REGEX_BCP47:$Z,addValue:GZ}=pc,{handleEvent:HZ}=Im,{RDF_LIST:YRe,RDF_FIRST:jj,RDF_REST:Bj,RDF_NIL:qj,RDF_TYPE:WRe,RDF_JSON_LITERAL:KRe,XSD_BOOLEAN:XRe,XSD_DOUBLE:JRe,XSD_INTEGER:QRe,XSD_STRING:zZ}=yj,VZ={};var ZRe=VZ;VZ.fromRDF=async(r,t)=>{const{useRdfType:i=!1,useNativeTypes:a=!1,rdfDirection:u=null}=t,c={},l={"@default":c},h={};if(u){if(u==="compound-literal")throw new Dj("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:u});if(u!=="i18n-datatype")throw new Dj("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:u})}for(const g of r){const w=g.graph.termType==="DefaultGraph"?"@default":g.graph.value;w in l||(l[w]={}),w!=="@default"&&!(w in c)&&(c[w]={"@id":w});const _=l[w],E=Fj(g.subject),k=g.predicate.value,I=g.object;E in _||(_[E]={"@id":E});const C=_[E],P=Fj(I),A=!!P;if(A&&!(P in _)&&(_[P]={"@id":P}),k===WRe&&!i&&A){GZ(C,"@type",P,{propertyIsArray:!0});continue}const L=eIe(I,a,u,t);if(GZ(C,k,L,{propertyIsArray:!0}),A)if(P===qj){const O=_[P];"usages"in O||(O.usages=[]),O.usages.push({node:C,property:k,value:L})}else P in h?h[P]=!1:h[P]={node:C,property:k,value:L}}for(const g in l){const w=l[g];if(!(qj in w))continue;const _=w[qj];if(_.usages){for(let E of _.usages){let k=E.node,I=E.property,C=E.value;const P=[],A=[];let L=Object.keys(k).length;for(;I===Bj&&iy.isObject(h[k["@id"]])&&iy.isArray(k[jj])&&k[jj].length===1&&iy.isArray(k[Bj])&&k[Bj].length===1&&(L===3||L===4&&iy.isArray(k["@type"])&&k["@type"].length===1&&k["@type"][0]===YRe)&&(P.push(k[jj][0]),A.push(k["@id"]),E=h[k["@id"]],k=E.node,I=E.property,C=E.value,L=Object.keys(k).length,!!Mj.isBlankNode(k)););delete C["@id"],C["@list"]=P.reverse();for(const O of A)delete w[O]}delete _.usages}}const v=[],p=Object.keys(c).sort();for(const g of p){const w=c[g];if(g in l){const _=w["@graph"]=[],E=l[g],k=Object.keys(E).sort();for(const I of k){const C=E[I];Mj.isSubjectReference(C)||_.push(C)}}Mj.isSubjectReference(w)||v.push(w)}return v};function eIe(r,t,i,a){const u=Fj(r);if(u)return{"@id":u};const c={"@value":r.value};if(r.language)r.language.match($Z)||a.eventHandler&&HZ({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:r.language}},options:a}),c["@language"]=r.language;else{let l=r.datatype.value;if(l||(l=zZ),l===KRe){l="@json";try{c["@value"]=JSON.parse(c["@value"])}catch(h){throw new Dj("JSON literal could not be parsed.","jsonld.InvalidJsonLiteral",{code:"invalid JSON literal",value:c["@value"],cause:h})}}if(t)if(l===XRe)c["@value"]==="true"||c["@value"]==="1"?c["@value"]=!0:c["@value"]==="false"||c["@value"]==="0"?c["@value"]=!1:c["@type"]=l;else if(l===QRe)if(iy.isNumeric(c["@value"])){const h=parseInt(c["@value"],10);h.toFixed(0)===c["@value"]&&(c["@value"]=h)}else c["@type"]=l;else l===JRe&&iy.isNumeric(c["@value"])?c["@value"]=parseFloat(c["@value"]):c["@type"]=l;else if(i==="i18n-datatype"&&l.startsWith("https://www.w3.org/ns/i18n#")){const[,h,v]=l.split(/[#_]/);h.length>0&&(c["@language"]=h,h.match($Z)||a.eventHandler&&HZ({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:h}},options:a})),c["@direction"]=v}else l!==zZ&&(c["@type"]=l)}return c}function Fj(r){return r.termType==="NamedNode"?r.value:r.termType==="BlankNode"?"_:"+r.value:null}var tIe=function r(t){if(typeof t=="number"&&isNaN(t))throw new Error("NaN is not allowed");if(typeof t=="number"&&!isFinite(t))throw new Error("Infinity is not allowed");return t===null||typeof t!="object"?JSON.stringify(t):t.toJSON instanceof Function?r(t.toJSON()):Array.isArray(t)?`[${t.reduce((u,c,l)=>`${u}${l===0?"":","}${r(c===void 0||typeof c=="symbol"?null:c)}`,"")}]`:`{${Object.keys(t).sort().reduce((a,u)=>{if(t[u]===void 0||typeof t[u]=="symbol")return a;const c=a.length===0?"":",";return`${a}${c}${r(u)}:${r(t[u])}`},"")}}`};const{createNodeMap:nIe}=jE,{isKeyword:rIe}=Gp,UZ=Eh,iIe=tIe,YZ=vc,Pm=Nu,aIe=pc,{handleEvent:Hp}=Im,{RDF_FIRST:sIe,RDF_REST:oIe,RDF_NIL:uIe,RDF_TYPE:cIe,RDF_JSON_LITERAL:lIe,RDF_LANGSTRING:fIe,XSD_BOOLEAN:hIe,XSD_DOUBLE:WZ,XSD_INTEGER:dIe,XSD_STRING:vIe}=yj,{isAbsolute:BE}=Vd,KZ={};var pIe=KZ;KZ.toRDF=(r,t)=>{const i=new aIe.IdentifierIssuer("_:b"),a={"@default":{}};nIe(r,a,"@default",i);const u=[],c=Object.keys(a).sort();for(const l of c){let h;if(l==="@default")h={termType:"DefaultGraph",value:""};else if(BE(l))h=qE(l);else{t.eventHandler&&Hp({event:{type:["JsonLdEvent"],code:"relative graph reference",level:"warning",message:"Relative graph reference found.",details:{graph:l}},options:t});continue}gIe(u,a[l],h,i,t)}return u};function gIe(r,t,i,a,u){const c=Object.keys(t).sort();for(const l of c){const h=t[l],v=Object.keys(h).sort();for(let p of v){const g=h[p];if(p==="@type")p=cIe;else if(rIe(p))continue;for(const w of g){const _=qE(l);if(!BE(l)){u.eventHandler&&Hp({event:{type:["JsonLdEvent"],code:"relative subject reference",level:"warning",message:"Relative subject reference found.",details:{subject:l}},options:u});continue}const E=qE(p);if(!BE(p)){u.eventHandler&&Hp({event:{type:["JsonLdEvent"],code:"relative predicate reference",level:"warning",message:"Relative predicate reference found.",details:{predicate:p}},options:u});continue}if(E.termType==="BlankNode"&&!u.produceGeneralizedRdf){u.eventHandler&&Hp({event:{type:["JsonLdEvent"],code:"blank node predicate",level:"warning",message:"Dropping blank node predicate.",details:{property:a.getOldIds().find(I=>a.getId(I)===p)}},options:u});continue}const k=$j(w,a,r,i,u.rdfDirection,u);k&&r.push({subject:_,predicate:E,object:k,graph:i})}}}}function bIe(r,t,i,a,u,c){const l={termType:"NamedNode",value:sIe},h={termType:"NamedNode",value:oIe},v={termType:"NamedNode",value:uIe},p=r.pop(),g=p?{termType:"BlankNode",value:t.getId().slice(2)}:v;let w=g;for(const _ of r){const E=$j(_,t,i,a,u,c),k={termType:"BlankNode",value:t.getId().slice(2)};i.push({subject:w,predicate:l,object:E,graph:a}),i.push({subject:w,predicate:h,object:k,graph:a}),w=k}if(p){const _=$j(p,t,i,a,u,c);i.push({subject:w,predicate:l,object:_,graph:a}),i.push({subject:w,predicate:h,object:v,graph:a})}return g}function $j(r,t,i,a,u,c){let l;if(UZ.isValue(r)){l={termType:"Literal",value:void 0,datatype:{termType:"NamedNode"}};let h=r["@value"];const v=r["@type"]||null;if(v==="@json")l.value=iIe(h),l.datatype.value=lIe;else if(Pm.isBoolean(h))l.value=h.toString(),l.datatype.value=v||hIe;else if(Pm.isDouble(h)||v===WZ)Pm.isDouble(h)||(h=parseFloat(h)),l.value=h.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),l.datatype.value=v||WZ;else if(Pm.isNumber(h))l.value=h.toFixed(0),l.datatype.value=v||dIe;else if("@direction"in r&&u==="i18n-datatype"){const p=(r["@language"]||"").toLowerCase(),g=r["@direction"],w=`https://www.w3.org/ns/i18n#${p}_${g}`;l.datatype.value=w,l.value=h}else{if("@direction"in r&&u==="compound-literal")throw new YZ("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:u});if("@direction"in r&&u)throw new YZ("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:u});"@language"in r?("@direction"in r&&!u&&c.eventHandler&&Hp({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:l.value}},options:c}),l.value=h,l.datatype.value=v||fIe,l.language=r["@language"]):("@direction"in r&&!u&&c.eventHandler&&Hp({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:l.value}},options:c}),l.value=h,l.datatype.value=v||vIe)}}else if(UZ.isList(r)){const h=bIe(r["@list"],t,i,a,u,c);l={termType:h.termType,value:h.value}}else{const h=Pm.isObject(r)?r["@id"]:r;l=qE(h)}return l.termType==="NamedNode"&&!BE(l.value)?(c.eventHandler&&Hp({event:{type:["JsonLdEvent"],code:"relative object reference",level:"warning",message:"Relative object reference found.",details:{object:l.value}},options:c}),null):l}function qE(r){return r.startsWith("_:")?{termType:"BlankNode",value:r.slice(2)}:{termType:"NamedNode",value:r}}const{isKeyword:Gj}=Gp,mc=Eh,vi=Nu,Es=pc,XZ=Vd,Lm=vc,{createNodeMap:yIe,mergeNodeMapGraphs:mIe}=jE,wc={};var wIe=wc;wc.frameMergedOrDefault=(r,t,i)=>{const a={options:i,embedded:!1,graph:"@default",graphMap:{"@default":{}},subjectStack:[],link:{},bnodeMap:{}},u=new Es.IdentifierIssuer("_:b");yIe(r,a.graphMap,"@default",u),i.merged&&(a.graphMap["@merged"]=mIe(a.graphMap),a.graph="@merged"),a.subjects=a.graphMap[a.graph];const c=[];wc.frame(a,Object.keys(a.subjects).sort(),t,c),i.pruneBlankNodeIdentifiers&&(i.bnodesToClear=Object.keys(a.bnodeMap).filter(l=>a.bnodeMap[l].length===1));// remove @preserve from results
571
+ return i.link={},$E(c,i)},wc.frame=(r,t,i,a,u=null)=>{QZ(i),i=i[0];const c=r.options,l={embed:FE(i,c,"embed"),explicit:FE(i,c,"explicit"),requireAll:FE(i,c,"requireAll")};r.link.hasOwnProperty(r.graph)||(r.link[r.graph]={});const h=r.link[r.graph],v=xIe(r,t,i,l),p=Object.keys(v).sort();for(const g of p){const w=v[g];if(u===null?r.uniqueEmbeds={[r.graph]:{}}:r.uniqueEmbeds[r.graph]=r.uniqueEmbeds[r.graph]||{},l.embed==="@link"&&g in h){zp(a,u,h[g]);continue}const _={"@id":g};if(g.indexOf("_:")===0&&Es.addValue(r.bnodeMap,g,_,{propertyIsArray:!0}),h[g]=_,(l.embed==="@first"||l.embed==="@last")&&r.is11)throw new Lm("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:i});if(!(!r.embedded&&r.uniqueEmbeds[r.graph].hasOwnProperty(g))){if(r.embedded&&(l.embed==="@never"||_Ie(w,r.graph,r.subjectStack))){zp(a,u,_);continue}if(r.embedded&&(l.embed=="@first"||l.embed=="@once")&&r.uniqueEmbeds[r.graph].hasOwnProperty(g)){zp(a,u,_);continue}if(l.embed==="@last"&&g in r.uniqueEmbeds[r.graph]&&EIe(r,g),r.uniqueEmbeds[r.graph][g]={parent:a,property:u},r.subjectStack.push({subject:w,graph:r.graph}),g in r.graphMap){let E=!1,k=null;"@graph"in i?(k=i["@graph"][0],E=!(g==="@merged"||g==="@default"),vi.isObject(k)||(k={})):(E=r.graph!=="@merged",k={}),E&&wc.frame({...r,graph:g,embedded:!1},Object.keys(r.graphMap[g]).sort(),[k],_,"@graph")}"@included"in i&&wc.frame({...r,embedded:!1},t,i["@included"],_,"@included");for(const E of Object.keys(w).sort()){if(Gj(E)){if(_[E]=Es.clone(w[E]),E==="@type")for(const k of w["@type"])k.indexOf("_:")===0&&Es.addValue(r.bnodeMap,k,_,{propertyIsArray:!0});continue}if(!(l.explicit&&!(E in i)))for(const k of w[E]){const I=E in i?i[E]:JZ(l);if(mc.isList(k)){const C=i[E]&&i[E][0]&&i[E][0]["@list"]?i[E][0]["@list"]:JZ(l),P={"@list":[]};zp(_,E,P);const A=k["@list"];for(const L of A)mc.isSubjectReference(L)?wc.frame({...r,embedded:!0},[L["@id"]],C,P,"@list"):zp(P,"@list",Es.clone(L))}else mc.isSubjectReference(k)?wc.frame({...r,embedded:!0},[k["@id"]],I,_,E):Hj(I[0],k)&&zp(_,E,Es.clone(k))}}for(const E of Object.keys(i).sort()){if(E==="@type"){if(!vi.isObject(i[E][0])||!("@default"in i[E][0]))continue}else if(Gj(E))continue;const k=i[E][0]||{};if(!FE(k,c,"omitDefault")&&!(E in _)){let C="@null";"@default"in k&&(C=Es.clone(k["@default"])),vi.isArray(C)||(C=[C]),_[E]=[{"@preserve":C}]}}for(const E of Object.keys(i["@reverse"]||{}).sort()){const k=i["@reverse"][E];for(const I of Object.keys(r.subjects))Es.getValues(r.subjects[I],E).some(P=>P["@id"]===g)&&(_["@reverse"]=_["@reverse"]||{},Es.addValue(_["@reverse"],E,[],{propertyIsArray:!0}),wc.frame({...r,embedded:!0},[I],k,_["@reverse"][E],u))}zp(a,u,_),r.subjectStack.pop()}}},wc.cleanupNull=(r,t)=>{if(vi.isArray(r))return r.map(a=>wc.cleanupNull(a,t)).filter(a=>a);if(r==="@null")return null;if(vi.isObject(r)){if("@id"in r){const i=r["@id"];if(t.link.hasOwnProperty(i)){const a=t.link[i].indexOf(r);if(a!==-1)return t.link[i][a];t.link[i].push(r)}else t.link[i]=[r]}for(const i in r)r[i]=wc.cleanupNull(r[i],t)}return r};function JZ(r){const t={};for(const i in r)r[i]!==void 0&&(t["@"+i]=[r[i]]);return[t]}function _Ie(r,t,i){for(let a=i.length-1;a>=0;--a){const u=i[a];if(u.graph===t&&u.subject["@id"]===r["@id"])return!0}return!1}function FE(r,t,i){const a="@"+i;let u=a in r?r[a][0]:t[i];if(i==="embed"){if(u===!0)u="@once";else if(u===!1)u="@never";else if(u!=="@always"&&u!=="@never"&&u!=="@link"&&u!=="@first"&&u!=="@last"&&u!=="@once")throw new Lm("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:r})}return u}function QZ(r){if(!vi.isArray(r)||r.length!==1||!vi.isObject(r[0]))throw new Lm("Invalid JSON-LD syntax; a JSON-LD frame must be a single object.","jsonld.SyntaxError",{frame:r});if("@id"in r[0]){for(const t of Es.asArray(r[0]["@id"]))if(!(vi.isObject(t)||XZ.isAbsolute(t))||vi.isString(t)&&t.indexOf("_:")===0)throw new Lm("Invalid JSON-LD syntax; invalid @id in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:r})}if("@type"in r[0]){for(const t of Es.asArray(r[0]["@type"]))if(!(vi.isObject(t)||XZ.isAbsolute(t)||t==="@json")||vi.isString(t)&&t.indexOf("_:")===0)throw new Lm("Invalid JSON-LD syntax; invalid @type in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:r})}}function xIe(r,t,i,a){const u={};for(const c of t){const l=r.graphMap[r.graph][c];ZZ(r,l,i,a)&&(u[c]=l)}return u}function ZZ(r,t,i,a){let u=!0,c=!1;for(const l in i){let h=!1;const v=Es.getValues(t,l),p=Es.getValues(i,l).length===0;if(l==="@id"){if(vi.isEmptyObject(i["@id"][0]||{})?h=!0:i["@id"].length>=0&&(h=i["@id"].includes(v[0])),!a.requireAll)return h}else if(l==="@type"){if(u=!1,p){if(v.length>0)return!1;h=!0}else if(i["@type"].length===1&&vi.isEmptyObject(i["@type"][0]))h=v.length>0;else for(const g of i["@type"])vi.isObject(g)&&"@default"in g?h=!0:h=h||v.some(w=>w===g);if(!a.requireAll)return h}else{if(Gj(l))continue;{const g=Es.getValues(i,l)[0];let w=!1;if(g&&(QZ([g]),w="@default"in g),u=!1,v.length===0&&w)continue;if(v.length>0&&p)return!1;if(g===void 0){if(v.length>0)return!1;h=!0}else if(mc.isList(g)){const _=g["@list"][0];if(mc.isList(v[0])){const E=v[0]["@list"];mc.isValue(_)?h=E.some(k=>Hj(_,k)):(mc.isSubject(_)||mc.isSubjectReference(_))&&(h=E.some(k=>eee(r,_,k,a)))}}else mc.isValue(g)?h=v.some(_=>Hj(g,_)):mc.isSubjectReference(g)?h=v.some(_=>eee(r,g,_,a)):vi.isObject(g)?h=v.length>0:h=!1}}if(!h&&a.requireAll)return!1;c=c||h}return u||c}function EIe(r,t){const i=r.uniqueEmbeds[r.graph],a=i[t],u=a.parent,c=a.property,l={"@id":t};if(vi.isArray(u)){for(let v=0;v<u.length;++v)if(Es.compareValues(u[v],l)){u[v]=l;break}}else{const v=vi.isArray(u[c]);Es.removeValue(u,c,l,{propertyIsArray:v}),Es.addValue(u,c,l,{propertyIsArray:v})}const h=v=>{const p=Object.keys(i);for(const g of p)g in i&&vi.isObject(i[g].parent)&&i[g].parent["@id"]===v&&(delete i[g],h(g))};h(t)}/**
572
+ * Removes the @preserve keywords from expanded result of framing.
573
+ *
574
+ * @param input the framed, framed output.
575
+ * @param options the framing options used.
576
+ *
577
+ * @return the resulting output.
578
+ */function $E(r,t){if(vi.isArray(r))return r.map(i=>$E(i,t));if(vi.isObject(r)){// remove @preserve
579
+ if("@preserve"in r)return r["@preserve"][0];if(mc.isValue(r))return r;if(mc.isList(r))return r["@list"]=$E(r["@list"],t),r;if("@id"in r){const i=r["@id"];if(t.link.hasOwnProperty(i)){const a=t.link[i].indexOf(r);if(a!==-1)return t.link[i][a];t.link[i].push(r)}else t.link[i]=[r]}for(const i in r){if(i==="@id"&&t.bnodesToClear.includes(r[i])){delete r["@id"];continue}r[i]=$E(r[i],t)}}return r}function zp(r,t,i){vi.isObject(r)?Es.addValue(r,t,i,{propertyIsArray:!0}):r.push(i)}function eee(r,t,i,a){if(!("@id"in i))return!1;const u=r.subjects[i["@id"]];return u&&ZZ(r,u,t,a)}function Hj(r,t){const i=t["@value"],a=t["@type"],u=t["@language"],c=r["@value"]?vi.isArray(r["@value"])?r["@value"]:[r["@value"]]:[],l=r["@type"]?vi.isArray(r["@type"])?r["@type"]:[r["@type"]]:[],h=r["@language"]?vi.isArray(r["@language"])?r["@language"]:[r["@language"]]:[];return c.length===0&&l.length===0&&h.length===0?!0:!(!(c.includes(i)||vi.isEmptyObject(c[0]))||!(!a&&l.length===0||l.includes(a)||a&&vi.isEmptyObject(l[0]))||!(!u&&h.length===0||h.includes(u)||u&&vi.isEmptyObject(h[0])))}const zj=vc,{isArray:Wd,isObject:Kd,isString:tee,isUndefined:Vj}=Nu,{isList:Uj,isValue:Th,isGraph:nee,isSimpleGraph:ree,isSubjectReference:Yj}=Eh,{expandIri:iee,getContextValue:To,isKeyword:aee,process:Wj,processingMode:kIe}=Gp,{removeBase:see,prependBase:SIe}=Vd,{REGEX_KEYWORD:TIe,addValue:ju,asArray:GE,compareShortestLeast:RIe}=pc,tr={};var IIe=tr;tr.compact=async({activeCtx:r,activeProperty:t=null,element:i,options:a={}})=>{if(Wd(i)){let c=[];for(let l=0;l<i.length;++l){const h=await tr.compact({activeCtx:r,activeProperty:t,element:i[l],options:a});h!==null&&c.push(h)}return a.compactArrays&&c.length===1&&(To(r,t,"@container")||[]).length===0&&(c=c[0]),c}const u=To(r,t,"@context");if(Vj(u)||(r=await Wj({activeCtx:r,localCtx:u,propagate:!0,overrideProtected:!0,options:a})),Kd(i)){if(a.link&&"@id"in i&&a.link.hasOwnProperty(i["@id"])){const _=a.link[i["@id"]];for(let E=0;E<_.length;++E)if(_[E].expanded===i)return _[E].compacted}if(Th(i)||Yj(i)){const _=tr.compactValue({activeCtx:r,activeProperty:t,value:i,options:a});return a.link&&Yj(i)&&(a.link.hasOwnProperty(i["@id"])||(a.link[i["@id"]]=[]),a.link[i["@id"]].push({expanded:i,compacted:_})),_}if(Uj(i)&&(To(r,t,"@container")||[]).includes("@list"))return tr.compact({activeCtx:r,activeProperty:t,element:i["@list"],options:a});const c=t==="@reverse",l={},h=r;!Th(i)&&!Yj(i)&&(r=r.revertToPreviousContext());const v=To(h,t,"@context");Vj(v)||(r=await Wj({activeCtx:r,localCtx:v,propagate:!0,overrideProtected:!0,options:a})),a.link&&"@id"in i&&(a.link.hasOwnProperty(i["@id"])||(a.link[i["@id"]]=[]),a.link[i["@id"]].push({expanded:i,compacted:l}));let p=i["@type"]||[];p.length>1&&(p=Array.from(p).sort());const g=r;for(const _ of p){const E=tr.compactIri({activeCtx:g,iri:_,relativeTo:{vocab:!0}}),k=To(h,E,"@context");Vj(k)||(r=await Wj({activeCtx:r,localCtx:k,options:a,propagate:!1}))}const w=Object.keys(i).sort();for(const _ of w){const E=i[_];if(_==="@id"){let k=GE(E).map(C=>tr.compactIri({activeCtx:r,iri:C,relativeTo:{vocab:!1},base:a.base}));k.length===1&&(k=k[0]);const I=tr.compactIri({activeCtx:r,iri:"@id",relativeTo:{vocab:!0}});l[I]=k;continue}if(_==="@type"){let k=GE(E).map(L=>tr.compactIri({activeCtx:h,iri:L,relativeTo:{vocab:!0}}));k.length===1&&(k=k[0]);const I=tr.compactIri({activeCtx:r,iri:"@type",relativeTo:{vocab:!0}}),A=(To(r,I,"@container")||[]).includes("@set")&&kIe(r,1.1)||Wd(k)&&E.length===0;ju(l,I,k,{propertyIsArray:A});continue}if(_==="@reverse"){const k=await tr.compact({activeCtx:r,activeProperty:"@reverse",element:E,options:a});for(const I in k)if(r.mappings.has(I)&&r.mappings.get(I).reverse){const C=k[I],A=(To(r,I,"@container")||[]).includes("@set")||!a.compactArrays;ju(l,I,C,{propertyIsArray:A}),delete k[I]}if(Object.keys(k).length>0){const I=tr.compactIri({activeCtx:r,iri:_,relativeTo:{vocab:!0}});ju(l,I,k)}continue}if(_==="@preserve"){const k=await tr.compact({activeCtx:r,activeProperty:t,element:E,options:a});Wd(k)&&k.length===0||ju(l,_,k);continue}if(_==="@index"){if((To(r,t,"@container")||[]).includes("@index"))continue;const I=tr.compactIri({activeCtx:r,iri:_,relativeTo:{vocab:!0}});ju(l,I,E);continue}if(_!=="@graph"&&_!=="@list"&&_!=="@included"&&aee(_)){const k=tr.compactIri({activeCtx:r,iri:_,relativeTo:{vocab:!0}});ju(l,k,E);continue}if(!Wd(E))throw new zj("JSON-LD expansion error; expanded value must be an array.","jsonld.SyntaxError");if(E.length===0){const k=tr.compactIri({activeCtx:r,iri:_,value:E,relativeTo:{vocab:!0},reverse:c}),I=r.mappings.has(k)?r.mappings.get(k)["@nest"]:null;let C=l;I&&(oee(r,I,a),Kd(l[I])||(l[I]={}),C=l[I]),ju(C,k,E,{propertyIsArray:!0})}for(const k of E){const I=tr.compactIri({activeCtx:r,iri:_,value:k,relativeTo:{vocab:!0},reverse:c}),C=r.mappings.has(I)?r.mappings.get(I)["@nest"]:null;let P=l;C&&(oee(r,C,a),Kd(l[C])||(l[C]={}),P=l[C]);const A=To(r,I,"@container")||[],L=nee(k),O=Uj(k);let M;O?M=k["@list"]:L&&(M=k["@graph"]);let B=await tr.compact({activeCtx:r,activeProperty:I,element:O||L?M:k,options:a});if(O)if(Wd(B)||(B=[B]),!A.includes("@list"))B={[tr.compactIri({activeCtx:r,iri:"@list",relativeTo:{vocab:!0}})]:B},"@index"in k&&(B[tr.compactIri({activeCtx:r,iri:"@index",relativeTo:{vocab:!0}})]=k["@index"]);else{ju(P,I,B,{valueIsArray:!0,allowDuplicate:!0});continue}if(L)if(A.includes("@graph")&&(A.includes("@id")||A.includes("@index")&&ree(k))){let F;P.hasOwnProperty(I)?F=P[I]:P[I]=F={};const q=(A.includes("@id")?k["@id"]:k["@index"])||tr.compactIri({activeCtx:r,iri:"@none",relativeTo:{vocab:!0}});ju(F,q,B,{propertyIsArray:!a.compactArrays||A.includes("@set")})}else A.includes("@graph")&&ree(k)?(Wd(B)&&B.length>1&&(B={"@included":B}),ju(P,I,B,{propertyIsArray:!a.compactArrays||A.includes("@set")})):(Wd(B)&&B.length===1&&a.compactArrays&&(B=B[0]),B={[tr.compactIri({activeCtx:r,iri:"@graph",relativeTo:{vocab:!0}})]:B},"@id"in k&&(B[tr.compactIri({activeCtx:r,iri:"@id",relativeTo:{vocab:!0}})]=k["@id"]),"@index"in k&&(B[tr.compactIri({activeCtx:r,iri:"@index",relativeTo:{vocab:!0}})]=k["@index"]),ju(P,I,B,{propertyIsArray:!a.compactArrays||A.includes("@set")}));else if(A.includes("@language")||A.includes("@index")||A.includes("@id")||A.includes("@type")){let F;P.hasOwnProperty(I)?F=P[I]:P[I]=F={};let q;if(A.includes("@language"))Th(B)&&(B=B["@value"]),q=k["@language"];else if(A.includes("@index")){const $=To(r,I,"@index")||"@index",Y=tr.compactIri({activeCtx:r,iri:$,relativeTo:{vocab:!0}});if($==="@index")q=k["@index"],delete B[Y];else{let V;if([q,...V]=GE(B[$]||[]),!tee(q))q=null;else switch(V.length){case 0:delete B[$];break;case 1:B[$]=V[0];break;default:B[$]=V;break}}}else if(A.includes("@id")){const $=tr.compactIri({activeCtx:r,iri:"@id",relativeTo:{vocab:!0}});q=B[$],delete B[$]}else if(A.includes("@type")){const $=tr.compactIri({activeCtx:r,iri:"@type",relativeTo:{vocab:!0}});let Y;switch([q,...Y]=GE(B[$]||[]),Y.length){case 0:delete B[$];break;case 1:B[$]=Y[0];break;default:B[$]=Y;break}Object.keys(B).length===1&&"@id"in k&&(B=await tr.compact({activeCtx:r,activeProperty:I,element:{"@id":k["@id"]},options:a}))}q||(q=tr.compactIri({activeCtx:r,iri:"@none",relativeTo:{vocab:!0}})),ju(F,q,B,{propertyIsArray:A.includes("@set")})}else{const F=!a.compactArrays||A.includes("@set")||A.includes("@list")||Wd(B)&&B.length===0||_==="@list"||_==="@graph";ju(P,I,B,{propertyIsArray:F})}}}return l}return i},tr.compactIri=({activeCtx:r,iri:t,value:i=null,relativeTo:a={vocab:!1},reverse:u=!1,base:c=null})=>{if(t===null)return t;r.isPropertyTermScoped&&r.previousContext&&(r=r.previousContext);const l=r.getInverse();if(aee(t)&&t in l&&"@none"in l[t]&&"@type"in l[t]["@none"]&&"@none"in l[t]["@none"]["@type"])return l[t]["@none"]["@type"]["@none"];if(a.vocab&&t in l){const w=r["@language"]||"@none",_=[];Kd(i)&&"@index"in i&&!("@graph"in i)&&_.push("@index","@index@set"),Kd(i)&&"@preserve"in i&&(i=i["@preserve"][0]),nee(i)?("@index"in i&&_.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in i&&_.push("@graph@id","@graph@id@set"),_.push("@graph","@graph@set","@set"),"@index"in i||_.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in i||_.push("@graph@id","@graph@id@set")):Kd(i)&&!Th(i)&&_.push("@id","@id@set","@type","@set@type");let E="@language",k="@null";if(u)E="@type",k="@reverse",_.push("@set");else if(Uj(i)){"@index"in i||_.push("@list");const C=i["@list"];if(C.length===0)E="@any",k="@none";else{let P=C.length===0?w:null,A=null;for(let L=0;L<C.length;++L){const O=C[L];let M="@none",B="@none";if(Th(O))if("@direction"in O){const F=(O["@language"]||"").toLowerCase(),q=O["@direction"];M=`${F}_${q}`}else"@language"in O?M=O["@language"].toLowerCase():"@type"in O?B=O["@type"]:M="@null";else B="@id";if(P===null?P=M:M!==P&&Th(O)&&(P="@none"),A===null?A=B:B!==A&&(A="@none"),P==="@none"&&A==="@none")break}P=P||"@none",A=A||"@none",A!=="@none"?(E="@type",k=A):k=P}}else{if(Th(i))if("@language"in i&&!("@index"in i)){_.push("@language","@language@set"),k=i["@language"];const C=i["@direction"];C&&(k=`${k}_${C}`)}else"@direction"in i&&!("@index"in i)?k=`_${i["@direction"]}`:"@type"in i&&(E="@type",k=i["@type"]);else E="@type",k="@id";_.push("@set")}_.push("@none"),Kd(i)&&!("@index"in i)&&_.push("@index","@index@set"),Th(i)&&Object.keys(i).length===1&&_.push("@language","@language@set");const I=CIe(r,t,i,_,E,k);if(I!==null)return I}if(a.vocab&&"@vocab"in r){const w=r["@vocab"];if(t.indexOf(w)===0&&t!==w){const _=t.substr(w.length);if(!r.mappings.has(_))return _}}let h=null;const v=[];let p=r.fastCurieMap;const g=t.length-1;for(let w=0;w<g&&t[w]in p;++w)p=p[t[w]],""in p&&v.push(p[""][0]);for(let w=v.length-1;w>=0;--w){const _=v[w],E=_.terms;for(const k of E){const I=k+":"+t.substr(_.iri.length);r.mappings.get(k)._prefix&&(!r.mappings.has(I)||i===null&&r.mappings.get(I)["@id"]===t)&&(h===null||RIe(I,h)<0)&&(h=I)}}if(h!==null)return h;for(const[w,_]of r.mappings)if(_&&_._prefix&&t.startsWith(w+":"))throw new zj(`Absolute IRI "${t}" confused with prefix "${w}".`,"jsonld.SyntaxError",{code:"IRI confused with prefix",context:r});if(!a.vocab)if("@base"in r)if(r["@base"]){const w=see(SIe(c,r["@base"]),t);return TIe.test(w)?`./${w}`:w}else return t;else return see(c,t);return t},tr.compactValue=({activeCtx:r,activeProperty:t,value:i,options:a})=>{if(Th(i)){const h=To(r,t,"@type"),v=To(r,t,"@language"),p=To(r,t,"@direction"),g=To(r,t,"@container")||[],w="@index"in i&&!g.includes("@index");if(!w&&h!=="@none"&&(i["@type"]===h||"@language"in i&&i["@language"]===v&&"@direction"in i&&i["@direction"]===p||"@language"in i&&i["@language"]===v||"@direction"in i&&i["@direction"]===p))return i["@value"];const _=Object.keys(i).length,E=_===1||_===2&&"@index"in i&&!w,k="@language"in r,I=tee(i["@value"]),C=r.mappings.has(t)&&r.mappings.get(t)["@language"]===null;if(E&&h!=="@none"&&(!k||!I||C))return i["@value"];const P={};return w&&(P[tr.compactIri({activeCtx:r,iri:"@index",relativeTo:{vocab:!0}})]=i["@index"]),"@type"in i?P[tr.compactIri({activeCtx:r,iri:"@type",relativeTo:{vocab:!0}})]=tr.compactIri({activeCtx:r,iri:i["@type"],relativeTo:{vocab:!0}}):"@language"in i&&(P[tr.compactIri({activeCtx:r,iri:"@language",relativeTo:{vocab:!0}})]=i["@language"]),"@direction"in i&&(P[tr.compactIri({activeCtx:r,iri:"@direction",relativeTo:{vocab:!0}})]=i["@direction"]),P[tr.compactIri({activeCtx:r,iri:"@value",relativeTo:{vocab:!0}})]=i["@value"],P}const u=iee(r,t,{vocab:!0},a),c=To(r,t,"@type"),l=tr.compactIri({activeCtx:r,iri:i["@id"],relativeTo:{vocab:c==="@vocab"},base:a.base});return c==="@id"||c==="@vocab"||u==="@graph"?l:{[tr.compactIri({activeCtx:r,iri:"@id",relativeTo:{vocab:!0}})]:l}};function CIe(r,t,i,a,u,c){c===null&&(c="@null");const l=[];if((c==="@id"||c==="@reverse")&&Kd(i)&&"@id"in i){c==="@reverse"&&l.push("@reverse");const v=tr.compactIri({activeCtx:r,iri:i["@id"],relativeTo:{vocab:!0}});r.mappings.has(v)&&r.mappings.get(v)&&r.mappings.get(v)["@id"]===i["@id"]?l.push.apply(l,["@vocab","@id"]):l.push.apply(l,["@id","@vocab"])}else{l.push(c);const v=l.find(p=>p.includes("_"));v&&l.push(v.replace(/^[^_]+_/,"_"))}l.push("@none");const h=r.inverse[t];for(const v of a){if(!(v in h))continue;const p=h[v][u];for(const g of l)if(g in p)return p[g]}return null}function oee(r,t,i){if(iee(r,t,{vocab:!0},i)!=="@nest")throw new zj("JSON-LD compact error; nested property must have an @nest value resolving to @nest.","jsonld.SyntaxError",{code:"invalid @nest value"})}var Kj,uee;function AIe(){return uee||(uee=1,Kj=r=>{class t{toString(){return"[object JsonLdProcessor]"}}return Object.defineProperty(t,"prototype",{writable:!1,enumerable:!1}),Object.defineProperty(t.prototype,"constructor",{writable:!0,enumerable:!1,configurable:!0,value:t}),t.compact=function(i,a){return arguments.length<2?Promise.reject(new TypeError("Could not compact, too few arguments.")):r.compact(i,a)},t.expand=function(i){return arguments.length<1?Promise.reject(new TypeError("Could not expand, too few arguments.")):r.expand(i)},t.flatten=function(i){return arguments.length<1?Promise.reject(new TypeError("Could not flatten, too few arguments.")):r.flatten(i)},t}),Kj}/**
580
+ * A JavaScript implementation of the JSON-LD API.
581
+ *
582
+ * @author Dave Longley
583
+ *
584
+ * @license BSD 3-Clause License
585
+ * Copyright (c) 2011-2022 Digital Bazaar, Inc.
586
+ * All rights reserved.
587
+ *
588
+ * Redistribution and use in source and binary forms, with or without
589
+ * modification, are permitted provided that the following conditions are met:
590
+ *
591
+ * Redistributions of source code must retain the above copyright notice,
592
+ * this list of conditions and the following disclaimer.
593
+ *
594
+ * Redistributions in binary form must reproduce the above copyright
595
+ * notice, this list of conditions and the following disclaimer in the
596
+ * documentation and/or other materials provided with the distribution.
597
+ *
598
+ * Neither the name of the Digital Bazaar, Inc. nor the names of its
599
+ * contributors may be used to endorse or promote products derived from
600
+ * this software without specific prior written permission.
601
+ *
602
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
603
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
604
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
605
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
606
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
607
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
608
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
609
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
610
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
611
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
612
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
613
+ */const cee=bj,lee=dRe,Xd=pc,Rh=TRe,Xj=Xd.IdentifierIssuer,cf=vc,PIe=RZ,Jj=IRe,{expand:LIe}=$Re,{flatten:NIe}=URe,{fromRDF:OIe}=ZRe,{toRDF:DIe}=pIe,{frameMergedOrDefault:MIe,cleanupNull:jIe}=wIe,{isArray:ay,isObject:Vp,isString:Jd}=Nu,{isSubjectReference:BIe}=Eh,{expandIri:qIe,getInitialContext:HE,process:fee,processingMode:Qj}=Gp,{compact:FIe,compactIri:$Ie}=IIe,{createNodeMap:GIe,createMergedNodeMap:HIe,mergeNodeMaps:zIe}=jE,{logEventHandler:VIe,logWarningEventHandler:UIe,safeEventHandler:YIe,setDefaultEventHandler:WIe,setupEventHandler:KIe,strictEventHandler:XIe,unhandledEventHandler:JIe}=Im,hee=function(r){const t={},a=new PIe({max:100});r.compact=async function(c,l,h){if(arguments.length<2)throw new TypeError("Could not compact, too few arguments.");if(l===null)throw new cf("The compaction context must not be null.","jsonld.CompactError",{code:"invalid local context"});if(c===null)return null;h=u(h,{base:Jd(c)?c:"",compactArrays:!0,compactToRelative:!0,graph:!1,skipExpansion:!1,link:!1,issuer:new Xj("_:b"),contextResolver:new Rh({sharedCache:a})}),h.link&&(h.skipExpansion=!0),h.compactToRelative||delete h.base;let v;h.skipExpansion?v=c:v=await r.expand(c,h);const p=await r.processContext(HE(h),l,h);let g=await FIe({activeCtx:p,element:v,options:h});h.compactArrays&&!h.graph&&ay(g)?g.length===1?g=g[0]:g.length===0&&(g={}):h.graph&&Vp(g)&&(g=[g]),Vp(l)&&"@context"in l&&(l=l["@context"]),l=Xd.clone(l),ay(l)||(l=[l]);const w=l;l=[];for(let E=0;E<w.length;++E)(!Vp(w[E])||Object.keys(w[E]).length>0)&&l.push(w[E]);const _=l.length>0;if(l.length===1&&(l=l[0]),ay(g)){const E=$Ie({activeCtx:p,iri:"@graph",relativeTo:{vocab:!0}}),k=g;g={},_&&(g["@context"]=l),g[E]=k}else if(Vp(g)&&_){const E=g;g={"@context":l};for(const k in E)g[k]=E[k]}return g},r.expand=async function(c,l){if(arguments.length<1)throw new TypeError("Could not expand, too few arguments.");l=u(l,{keepFreeFloatingNodes:!1,contextResolver:new Rh({sharedCache:a})});const h={},v=[];if("expandContext"in l){const _=Xd.clone(l.expandContext);Vp(_)&&"@context"in _?h.expandContext=_:h.expandContext={"@context":_},v.push(h.expandContext)}let p;if(!Jd(c))h.input=Xd.clone(c);else{const _=await r.get(c,l);p=_.documentUrl,h.input=_.document,_.contextUrl&&(h.remoteContext={"@context":_.contextUrl},v.push(h.remoteContext))}"base"in l||(l.base=p||"");let g=HE(l);for(const _ of v)g=await fee({activeCtx:g,localCtx:_,options:l});let w=await LIe({activeCtx:g,element:h.input,options:l});return Vp(w)&&"@graph"in w&&Object.keys(w).length===1?w=w["@graph"]:w===null&&(w=[]),ay(w)||(w=[w]),w},r.flatten=async function(c,l,h){if(arguments.length<1)return new TypeError("Could not flatten, too few arguments.");typeof l=="function"?l=null:l=l||null,h=u(h,{base:Jd(c)?c:"",contextResolver:new Rh({sharedCache:a})});const v=await r.expand(c,h),p=NIe(v);return l===null?p:(h.graph=!0,h.skipExpansion=!0,await r.compact(p,l,h))},r.frame=async function(c,l,h){if(arguments.length<2)throw new TypeError("Could not frame, too few arguments.");if(h=u(h,{base:Jd(c)?c:"",embed:"@once",explicit:!1,requireAll:!1,omitDefault:!1,bnodesToClear:[],contextResolver:new Rh({sharedCache:a})}),Jd(l)){const C=await r.get(l,h);if(l=C.document,C.contextUrl){let P=l["@context"];P?ay(P)?P.push(C.contextUrl):P=[P,C.contextUrl]:P=C.contextUrl,l["@context"]=P}}const v=l?l["@context"]||{}:{},p=await r.processContext(HE(h),v,h);h.hasOwnProperty("omitGraph")||(h.omitGraph=Qj(p,1.1)),h.hasOwnProperty("pruneBlankNodeIdentifiers")||(h.pruneBlankNodeIdentifiers=Qj(p,1.1));const g=await r.expand(c,h),w={...h};w.isFrame=!0,w.keepFreeFloatingNodes=!0;const _=await r.expand(l,w),E=Object.keys(l).map(C=>qIe(p,C,{vocab:!0}));w.merged=!E.includes("@graph"),w.is11=Qj(p,1.1);const k=MIe(g,_,w);w.graph=!h.omitGraph,w.skipExpansion=!0,w.link={},w.framing=!0;let I=await r.compact(k,v,w);return w.link={},I=jIe(I,w),I},r.link=async function(c,l,h){const v={};return l&&(v["@context"]=l),v["@embed"]="@link",r.frame(c,v,h)},r.normalize=r.canonize=async function(c,l){if(arguments.length<1)throw new TypeError("Could not canonize, too few arguments.");l=u(l,{skipExpansion:!1,safe:!0,contextResolver:new Rh({sharedCache:a})});const h=Object.assign({},{algorithm:"RDFC-1.0"},l.canonizeOptions||null);if("inputFormat"in l){if(l.inputFormat!=="application/n-quads")throw new cf("Unknown canonicalization input format.","jsonld.CanonizeError");const g=Jj.parse(c);return cee.canonize(g,h)}const v={...l};delete v.format,delete v.canonizeOptions,v.produceGeneralizedRdf=!1;const p=await r.toRDF(c,v);return cee.canonize(p,h)},r.fromRDF=async function(c,l){if(arguments.length<1)throw new TypeError("Could not convert from RDF, too few arguments.");l=u(l,{format:Jd(c)?"application/n-quads":void 0});const{format:h}=l;let{rdfParser:v}=l;if(h){if(v=v||t[h],!v)throw new cf("Unknown input format.","jsonld.UnknownFormat",{format:h})}else v=()=>c;const p=await v(c);return OIe(p,l)},r.toRDF=async function(c,l){if(arguments.length<1)throw new TypeError("Could not convert to RDF, too few arguments.");l=u(l,{skipExpansion:!1,contextResolver:new Rh({sharedCache:a})});let h;l.skipExpansion?h=c:h=await r.expand(c,l);const v=DIe(h,l);if(l.format){if(l.format==="application/n-quads")return Jj.serialize(v);throw new cf("Unknown output format.","jsonld.UnknownFormat",{format:l.format})}return v},r.createNodeMap=async function(c,l){if(arguments.length<1)throw new TypeError("Could not create node map, too few arguments.");l=u(l,{base:Jd(c)?c:"",contextResolver:new Rh({sharedCache:a})});const h=await r.expand(c,l);return HIe(h,l)},r.merge=async function(c,l,h){if(arguments.length<1)throw new TypeError("Could not merge, too few arguments.");if(!ay(c))throw new TypeError('Could not merge, "docs" must be an array.');typeof l=="function"?l=null:l=l||null,h=u(h,{contextResolver:new Rh({sharedCache:a})});const v=await Promise.all(c.map(C=>{const P={...h};return r.expand(C,P)}));let p=!0;"mergeNodes"in h&&(p=h.mergeNodes);const g=h.issuer||new Xj("_:b"),w={"@default":{}};for(let C=0;C<v.length;++C){const P=Xd.relabelBlankNodes(v[C],{issuer:new Xj("_:b"+C+"-")}),A=p||C===0?w:{"@default":{}};if(GIe(P,A,"@default",g),A!==w)for(const L in A){const O=A[L];if(!(L in w)){w[L]=O;continue}const M=w[L];for(const B in O)B in M||(M[B]=O[B])}}const _=zIe(w),E=[],k=Object.keys(_).sort();for(let C=0;C<k.length;++C){const P=_[k[C]];BIe(P)||E.push(P)}return l===null?E:(h.graph=!0,h.skipExpansion=!0,await r.compact(E,l,h))},Object.defineProperty(r,"documentLoader",{get:()=>r._documentLoader,set:c=>r._documentLoader=c}),r.documentLoader=async c=>{throw new cf("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed",url:c})},r.get=async function(c,l){let h;typeof l.documentLoader=="function"?h=l.documentLoader:h=r.documentLoader;const v=await h(c);try{if(!v.document)throw new cf("No remote document found at the given URL.","jsonld.NullRemoteDocument");Jd(v.document)&&(v.document=JSON.parse(v.document))}catch(p){throw new cf("Could not retrieve a JSON-LD document from the URL.","jsonld.LoadDocumentError",{code:"loading document failed",cause:p,remoteDoc:v})}return v},r.processContext=async function(c,l,h){return h=u(h,{base:"",contextResolver:new Rh({sharedCache:a})}),l===null?HE(h):(l=Xd.clone(l),Vp(l)&&"@context"in l||(l={"@context":l}),fee({activeCtx:c,localCtx:l,options:h}))},r.getContextValue=Gp.getContextValue,r.documentLoaders={},r.useDocumentLoader=function(c){if(!(c in r.documentLoaders))throw new cf('Unknown document loader type: "'+c+'"',"jsonld.UnknownDocumentLoader",{type:c});r.documentLoader=r.documentLoaders[c].apply(r,Array.prototype.slice.call(arguments,1))},r.registerRDFParser=function(c,l){t[c]=l},r.unregisterRDFParser=function(c){delete t[c]},r.registerRDFParser("application/n-quads",Jj.parse),r.url=Vd,r.logEventHandler=VIe,r.logWarningEventHandler=UIe,r.safeEventHandler=YIe,r.setDefaultEventHandler=WIe,r.strictEventHandler=XIe,r.unhandledEventHandler=JIe,r.util=Xd,Object.assign(r,Xd),r.promises=r,r.RequestQueue=xZ(),r.JsonLdProcessor=AIe()(r),lee.setupGlobals(r),lee.setupDocumentLoaders(r);function u(c,{documentLoader:l=r.documentLoader,...h}){if(c&&"compactionMap"in c)throw new cf('"compactionMap" not supported.',"jsonld.OptionsError");if(c&&"expansionMap"in c)throw new cf('"expansionMap" not supported.',"jsonld.OptionsError");return Object.assign({},{documentLoader:l},h,c,{eventHandler:KIe({options:c})})}return r},Zj=function(){return hee(function(){return Zj()})};hee(Zj);var dee=Zj;const QIe=s1({__proto__:null,default:Lb(dee)},[dee]);Ma.BoxesEditor=M2e,Ma.defaultTemplates=j2e,Ma.exportToJsonLD=eZ,Ma.exportToRdfXml=nZ,Ma.exportToTurtle=VX,Ma.graphDataToJsonLD=dj,Ma.importFromJsonLD=tZ,Ma.importFromRdfXml=rZ,Ma.importFromTurtle=YX,Ma.jsonldExporter=NTe,Ma.jsonldImporter=OTe,Ma.rdfExporter=$2e,Ma.rdfImporter=G2e,Ma.rdfXmlExporter=DTe,Ma.rdfXmlImporter=MTe,Object.defineProperty(Ma,Symbol.toStringTag,{value:"Module"})});