vendor: 29,442 bytes, line 1
1import{a as rs}from"./chunk-WVHPJQMP.mjs";import{d as ts}from"./chunk-KMOJB3TB.mjs";import{k as es}from"./chunk-AC3VT7B7.mjs";import"./chunk-TI4EEUUG.mjs";import{F as ta,N as Ji,X as ra,b as Yt,fa as ji,n as Ki,o as Zi,p as Qi,s as Sr}from"./chunk-NQURTBEV.mjs";import"./chunk-6BY5RJGC.mjs";import{a as f,b as Gn,e as Tl}from"./chunk-GTKDMUJJ.mjs";var Ui=Gn((Pa,Vi)=>{"use strict";f(function(e,r){typeof Pa=="object"&&typeof Vi=="object"?Vi.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Pa=="object"?Pa.layoutBase=r():e.layoutBase=r()},"webpackUniversalModuleDefinition")(Pa,function(){return function(t){var e={};function r(a){if(e[a])return e[a].exports;var n=e[a]={i:a,l:!1,exports:{}};return t[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return f(r,"__webpack_require__"),r.m=t,r.c=e,r.i=function(a){return a},r.d=function(a,n,i){r.o(a,n)||Object.defineProperty(a,n,{configurable:!1,enumerable:!0,get:i})},r.n=function(a){var n=a&&a.__esModule?f(function(){return a.default},"getDefault"):f(function(){return a},"getModuleExports");return r.d(n,"a",n),n},r.o=function(a,n){return Object.prototype.hasOwnProperty.call(a,n)},r.p="",r(r.s=26)}([function(t,e,r){"use strict";function a(){}f(a,"LayoutConstants"),a.QUALITY=1,a.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,a.DEFAULT_INCREMENTAL=!1,a.DEFAULT_ANIMATION_ON_LAYOUT=!0,a.DEFAULT_ANIMATION_DURING_LAYOUT=!1,a.DEFAULT_ANIMATION_PERIOD=50,a.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,a.DEFAULT_GRAPH_MARGIN=15,a.NODE_DIMENSIONS_INCLUDE_LABELS=!1,a.SIMPLE_NODE_SIZE=40,a.SIMPLE_NODE_HALF_SIZE=a.SIMPLE_NODE_SIZE/2,a.EMPTY_COMPOUND_NODE_SIZE=40,a.MIN_EDGE_LENGTH=1,a.WORLD_BOUNDARY=1e6,a.INITIAL_WORLD_BOUNDARY=a.WORLD_BOUNDARY/1e3,a.WORLD_CENTER_X=1200,a.WORLD_CENTER_Y=900,t.exports=a},function(t,e,r){"use strict";var a=r(2),n=r(8),i=r(9);function s(l,u,h){a.call(this,h),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=h,this.bendpoints=[],this.source=l,this.target=u}f(s,"LEdge"),s.prototype=Object.create(a.prototype);for(var o in a)s[o]=a[o];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(l,u){for(var h=this.getOtherEnd(l),c=u.getGraphManager().getRoot();;){if(h.getOwner()==u)return h;if(h.getOwner()==c)break;h=h.getOwner().getParent()}return null},s.prototype.updateLength=function(){var l=new Array(4);this.isOverlapingSourceAndTarget=n.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,r){"use strict";function a(n){this.vGraphObject=n}f(a,"LGraphObject"),t.exports=a},function(t,e,r){"use strict";var a=r(2),n=r(10),i=r(13),s=r(0),o=r(16),l=r(4);function u(c,v,d,g){d==null&&g==null&&(g=v),a.call(this,g),c.graphManager!=null&&(c=c.graphManager),this.estimatedSize=n.MIN_VALUE,this.inclusionTreeDepth=n.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=c,d!=null&&v!=null?this.rect=new i(v.x,v.y,d.width,d.height):this.rect=new i}f(u,"LNode"),u.prototype=Object.create(a.prototype);for(var h in a)u[h]=a[h];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(c){this.rect.width=c},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(c){this.rect.height=c},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(c,v){this.rect.x=c.x,this.rect.y=c.y,this.rect.width=v.width,this.rect.height=v.height},u.prototype.setCenter=function(c,v){this.rect.x=c-this.rect.width/2,this.rect.y=v-this.rect.height/2},u.prototype.setLocation=function(c,v){this.rect.x=c,this.rect.y=v},u.prototype.moveBy=function(c,v){this.rect.x+=c,this.rect.y+=v},u.prototype.getEdgeListToNode=function(c){var v=[],d,g=this;return g.edges.forEach(function(m){if(m.target==c){if(m.source!=g)throw"Incorrect edge source!";v.push(m)}}),v},u.prototype.getEdgesBetween=function(c){var v=[],d,g=this;return g.edges.forEach(function(m){if(!(m.source==g||m.target==g))throw"Incorrect edge source and/or target";(m.target==c||m.source==c)&&v.push(m)}),v},u.prototype.getNeighborsList=function(){var c=new Set,v=this;return v.edges.forEach(function(d){if(d.source==v)c.add(d.target);else{if(d.target!=v)throw"Incorrect incidency!";c.add(d.source)}}),c},u.prototype.withChildren=function(){var c=new Set,v,d;if(c.add(this),this.child!=null)for(var g=this.child.getNodes(),m=0;m<g.length;m++)v=g[m],d=v.withChildren(),d.forEach(function(y){c.add(y)});return c},u.prototype.getNoOfChildren=function(){var c=0,v;if(this.child==null)c=1;else for(var d=this.child.getNodes(),g=0;g<d.length;g++)v=d[g],c+=v.getNoOfChildren();return c==0&&(c=1),c},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==n.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},u.prototype.scatter=function(){var c,v,d=-s.INITIAL_WORLD_BOUNDARY,g=s.INITIAL_WORLD_BOUNDARY;c=s.WORLD_CENTER_X+o.nextDouble()*(g-d)+d;var m=-s.INITIAL_WORLD_BOUNDARY,y=s.INITIAL_WORLD_BOUNDARY;v=s.WORLD_CENTER_Y+o.nextDouble()*(y-m)+m,this.rect.x=c,this.rect.y=v},u.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var c=this.getChild();if(c.updateBounds(!0),this.rect.x=c.getLeft(),this.rect.y=c.getTop(),this.setWidth(c.getRight()-c.getLeft()),this.setHeight(c.getBottom()-c.getTop()),s.NODE_DIMENSIONS_INCLUDE_LABELS){var v=c.getRight()-c.getLeft(),d=c.getBottom()-c.getTop();this.labelWidth>v&&(this.rect.x-=(this.labelWidth-v)/2,this.setWidth(this.labelWidth)),this.labelHeight>d&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-d)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-d),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==n.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(c){var v=this.rect.x;v>s.WORLD_BOUNDARY?v=s.WORLD_BOUNDARY:v<-s.WORLD_BOUNDARY&&(v=-s.WORLD_BOUNDARY);var d=this.rect.y;d>s.WORLD_BOUNDARY?d=s.WORLD_BOUNDARY:d<-s.WORLD_BOUNDARY&&(d=-s.WORLD_BOUNDARY);var g=new l(v,d),m=c.inverseTransformPoint(g);this.setLocation(m.x,m.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},t.exports=u},function(t,e,r){"use strict";function a(n,i){n==null&&i==null?(this.x=0,this.y=0):(this.x=n,this.y=i)}f(a,"PointD"),a.prototype.getX=function(){return this.x},a.prototype.getY=function(){return this.y},a.prototype.setX=function(n){this.x=n},a.prototype.setY=function(n){this.y=n},a.prototype.getDifference=function(n){return new DimensionD(this.x-n.x,this.y-n.y)},a.prototype.getCopy=function(){return new a(this.x,this.y)},a.prototype.translate=function(n){return this.x+=n.width,this.y+=n.height,this},t.exports=a},function(t,e,r){"use strict";var a=r(2),n=r(10),i=r(0),s=r(6),o=r(3),l=r(1),u=r(13),h=r(12),c=r(11);function v(g,m,y){a.call(this,y),this.estimatedSize=n.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,m!=null&&m instanceof s?this.graphManager=m:m!=null&&m instanceof Layout&&(this.graphManager=m.graphManager)}f(v,"LGraph"),v.prototype=Object.create(a.prototype);for(var d in a)v[d]=a[d];v.prototype.getNodes=function(){return this.nodes},v.prototype.getEdges=function(){return this.edges},v.prototype.getGraphManager=function(){return this.graphManager},v.prototype.getParent=function(){return this.parent},v.prototype.getLeft=function(){return this.left},v.prototype.getRight=function(){return this.right},v.prototype.getTop=function(){return this.top},v.prototype.getBottom=function(){return this.bottom},v.prototype.isConnected=function(){return this.isConnected},v.prototype.add=function(g,m,y){if(m==null&&y==null){var p=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(p)>-1)throw"Node already in graph!";return p.owner=this,this.getNodes().push(p),p}else{var b=g;if(!(this.getNodes().indexOf(m)>-1&&this.getNodes().indexOf(y)>-1))throw"Source or target not in graph!";if(!(m.owner==y.owner&&m.owner==this))throw"Both owners must be this graph!";return m.owner!=y.owner?null:(b.source=m,b.target=y,b.isInterGraph=!1,this.getEdges().push(b),m.edges.push(b),y!=m&&y.edges.push(b),b)}},v.prototype.remove=function(g){var m=g;if(g instanceof o){if(m==null)throw"Node is null!";if(!(m.owner!=null&&m.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var y=m.edges.slice(),p,b=y.length,E=0;E<b;E++)p=y[E],p.isInterGraph?this.graphManager.remove(p):p.source.owner.remove(p);var S=this.nodes.indexOf(m);if(S==-1)throw"Node not in owner node list!";this.nodes.splice(S,1)}else if(g instanceof l){var p=g;if(p==null)throw"Edge is null!";if(!(p.source!=null&&p.target!=null))throw"Source and/or target is null!";if(!(p.source.owner!=null&&p.target.owner!=null&&p.source.owner==this&&p.target.owner==this))throw"Source and/or target owner is invalid!";var w=p.source.edges.indexOf(p),x=p.target.edges.indexOf(p);if(!(w>-1&&x>-1))throw"Source and/or target doesn't know this edge!";p.source.edges.splice(w,1),p.target!=p.source&&p.target.edges.splice(x,1);var S=p.source.owner.getEdges().indexOf(p);if(S==-1)throw"Not in owner's edge list!";p.source.owner.getEdges().splice(S,1)}},v.prototype.updateLeftTop=function(){for(var g=n.MAX_VALUE,m=n.MAX_VALUE,y,p,b,E=this.getNodes(),S=E.length,w=0;w<S;w++){var x=E[w];y=x.getTop(),p=x.getLeft(),g>y&&(g=y),m>p&&(m=p)}return g==n.MAX_VALUE?null:(E[0].getParent().paddingLeft!=null?b=E[0].getParent().paddingLeft:b=this.margin,this.left=m-b,this.top=g-b,new h(this.left,this.top))},v.prototype.updateBounds=function(g){for(var m=n.MAX_VALUE,y=-n.MAX_VALUE,p=n.MAX_VALUE,b=-n.MAX_VALUE,E,S,w,x,T,C=this.nodes,D=C.length,L=0;L<D;L++){var O=C[L];g&&O.child!=null&&O.updateBounds(),E=O.getLeft(),S=O.getRight(),w=O.getTop(),x=O.getBottom(),m>E&&(m=E),y<S&&(y=S),p>w&&(p=w),b<x&&(b=x)}var A=new u(m,p,y-m,b-p);m==n.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),C[0].getParent().paddingLeft!=null?T=C[0].getParent().paddingLeft:T=this.margin,this.left=A.x-T,this.right=A.x+A.width+T,this.top=A.y-T,this.bottom=A.y+A.height+T},v.calculateBounds=function(g){for(var m=n.MAX_VALUE,y=-n.MAX_VALUE,p=n.MAX_VALUE,b=-n.MAX_VALUE,E,S,w,x,T=g.length,C=0;C<T;C++){var D=g[C];E=D.getLeft(),S=D.getRight(),w=D.getTop(),x=D.getBottom(),m>E&&(m=E),y<S&&(y=S),p>w&&(p=w),b<x&&(b=x)}var L=new u(m,p,y-m,b-p);return L},v.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},v.prototype.getEstimatedSize=function(){if(this.estimatedSize==n.MIN_VALUE)throw"assert failed";return this.estimatedSize},v.prototype.calcEstimatedSize=function(){for(var g=0,m=this.nodes,y=m.length,p=0;p<y;p++){var b=m[p];g+=b.calcEstimatedSize()}return g==0?this.estimatedSize=i.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=g/Math.sqrt(this.nodes.length),this.estimatedSize},v.prototype.updateConnected=function(){var g=this;if(this.nodes.length==0){this.isConnected=!0;return}var m=new c,y=new Set,p=this.nodes[0],b,E,S=p.withChildren();for(S.forEach(function(L){m.push(L),y.add(L)});m.length!==0;){p=m.shift(),b=p.getEdges();for(var w=b.length,x=0;x<w;x++){var T=b[x];if(E=T.getOtherEndInGraph(p,this),E!=null&&!y.has(E)){var C=E.withChildren();C.forEach(function(L){m.push(L),y.add(L)})}}}if(this.isConnected=!1,y.size>=this.nodes.length){var D=0;y.forEach(function(L){L.owner==g&&D++}),D==this.nodes.length&&(this.isConnected=!0)}},t.exports=v},function(t,e,r){"use strict";var a,n=r(1);function i(s){a=r(5),this.layout=s,this.graphs=[],this.edges=[]}f(i,"LGraphManager"),i.prototype.addRoot=function(){var s=this.layout.newGraph(),o=this.layout.newNode(null),l=this.add(s,o);return this.setRootGraph(l),this.rootGraph},i.prototype.add=function(s,o,l,u,h){if(l==null&&u==null&&h==null){if(s==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(s)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(s),s.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return s.parent=o,o.child=s,s}else{h=l,u=o,l=s;var c=u.getOwner(),v=h.getOwner();if(!(c!=null&&c.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(v!=null&&v.getGraphManager()==this))throw"Target not in this graph mgr!";if(c==v)return l.isInterGraph=!1,c.add(l,u,h);if(l.isInterGraph=!0,l.source=u,l.target=h,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},i.prototype.remove=function(s){if(s instanceof a){var o=s;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(o.getEdges());for(var u,h=l.length,c=0;c<h;c++)u=l[c],o.remove(u);var v=[];v=v.concat(o.getNodes());var d;h=v.length;for(var c=0;c<h;c++)d=v[c],o.remove(d);o==this.rootGraph&&this.setRootGraph(null);var g=this.graphs.indexOf(o);this.graphs.splice(g,1),o.parent=null}else if(s instanceof n){if(u=s,u==null)throw"Edge is null!";if(!u.isInterGraph)throw"Not an inter-graph edge!";if(!(u.source!=null&&u.target!=null))throw"Source and/or target is null!";if(!(u.source.edges.indexOf(u)!=-1&&u.target.edges.indexOf(u)!=-1))throw"Source and/or target doesn't know this edge!";var g=u.source.edges.indexOf(u);if(u.source.edges.splice(g,1),g=u.target.edges.indexOf(u),u.target.edges.splice(g,1),!(u.source.owner!=null&&u.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(u.source.owner.getGraphManager().edges.indexOf(u)==-1)throw"Not in owner graph manager's edge list!";var g=u.source.owner.getGraphManager().edges.indexOf(u);u.source.owner.getGraphManager().edges.splice(g,1)}},i.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},i.prototype.getGraphs=function(){return this.graphs},i.prototype.getAllNodes=function(){if(this.allNodes==null){for(var s=[],o=this.getGraphs(),l=o.length,u=0;u<l;u++)s=s.concat(o[u].getNodes());this.allNodes=s}return this.allNodes},i.prototype.resetAllNodes=function(){this.allNodes=null},i.prototype.resetAllEdges=function(){this.allEdges=null},i.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},i.prototype.getAllEdges=function(){if(this.allEdges==null){for(var s=[],o=this.getGraphs(),l=o.length,u=0;u<o.length;u++)s=s.concat(o[u].getEdges());s=s.concat(this.edges),this.allEdges=s}return this.allEdges},i.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},i.prototype.setAllNodesToApplyGravitation=function(s){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=s},i.prototype.getRoot=function(){return this.rootGraph},i.prototype.setRootGraph=function(s){if(s.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=s,s.parent==null&&(s.parent=this.layout.newNode("Root node"))},i.prototype.getLayout=function(){return this.layout},i.prototype.isOneAncestorOfOther=function(s,o){if(!(s!=null&&o!=null))throw"assert failed";if(s==o)return!0;var l=s.getOwner(),u;do{if(u=l.getParent(),u==null)break;if(u==o)return!0;if(l=u.getOwner(),l==null)break}while(!0);l=o.getOwner();do{if(u=l.getParent(),u==null)break;if(u==s)return!0;if(l=u.getOwner(),l==null)break}while(!0);return!1},i.prototype.calcLowestCommonAncestors=function(){for(var s,o,l,u,h,c=this.getAllEdges(),v=c.length,d=0;d<v;d++){if(s=c[d],o=s.source,l=s.target,s.lca=null,s.sourceInLca=o,s.targetInLca=l,o==l){s.lca=o.getOwner();continue}for(u=o.getOwner();s.lca==null;){for(s.targetInLca=l,h=l.getOwner();s.lca==null;){if(h==u){s.lca=h;break}if(h==this.rootGraph)break;if(s.lca!=null)throw"assert failed";s.targetInLca=h.getParent(),h=s.targetInLca.getOwner()}if(u==this.rootGraph)break;s.lca==null&&(s.sourceInLca=u.getParent(),u=s.sourceInLca.getOwner())}if(s.lca==null)throw"assert failed"}},i.prototype.calcLowestCommonAncestor=function(s,o){if(s==o)return s.getOwner();var l=s.getOwner();do{if(l==null)break;var u=o.getOwner();do{if(u==null)break;if(u==l)return u;u=u.getParent().getOwner()}while(!0);l=l.getParent().getOwner()}while(!0);return l},i.prototype.calcInclusionTreeDepths=function(s,o){s==null&&o==null&&(s=this.rootGraph,o=1);for(var l,u=s.getNodes(),h=u.length,c=0;c<h;c++)l=u[c],l.inclusionTreeDepth=o,l.child!=null&&this.calcInclusionTreeDepths(l.child,o+1)},i.prototype.includesInvalidEdge=function(){for(var s,o=this.edges.length,l=0;l<o;l++)if(s=this.edges[l],this.isOneAncestorOfOther(s.source,s.target))return!0;return!1},t.exports=i},function(t,e,r){"use strict";var a=r(0);function n(){}f(n,"FDLayoutConstants");for(var i in a)n[i]=a[i];n.MAX_ITERATIONS=2500,n.DEFAULT_EDGE_LENGTH=50,n.DEFAULT_SPRING_STRENGTH=.45,n.DEFAULT_REPULSION_STRENGTH=4500,n.DEFAULT_GRAVITY_STRENGTH=.4,n.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,n.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,n.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,n.COOLING_ADAPTATION_FACTOR=.33,n.ADAPTATION_LOWER_NODE_LIMIT=1e3,n.ADAPTATION_UPPER_NODE_LIMIT=5e3,n.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,n.MAX_NODE_DISPLACEMENT=n.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,n.MIN_REPULSION_DIST=n.DEFAULT_EDGE_LENGTH/10,n.CONVERGENCE_CHECK_PERIOD=100,n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,n.MIN_EDGE_LENGTH=1,n.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=n},function(t,e,r){"use strict";var a=r(12);function n(){}f(n,"IGeometry"),n.calcSeparationAmount=function(i,s,o,l){if(!i.intersects(s))throw"assert failed";var u=new Array(2);this.decideDirectionsForOverlappingNodes(i,s,u),o[0]=Math.min(i.getRight(),s.getRight())-Math.max(i.x,s.x),o[1]=Math.min(i.getBottom(),s.getBottom())-Math.max(i.y,s.y),i.getX()<=s.getX()&&i.getRight()>=s.getRight()?o[0]+=Math.min(s.getX()-i.getX(),i.getRight()-s.getRight()):s.getX()<=i.getX()&&s.getRight()>=i.getRight()&&(o[0]+=Math.min(i.getX()-s.getX(),s.getRight()-i.getRight())),i.getY()<=s.getY()&&i.getBottom()>=s.getBottom()?o[1]+=Math.min(s.getY()-i.getY(),i.getBottom()-s.getBottom()):s.getY()<=i.getY()&&s.getBottom()>=i.getBottom()&&(o[1]+=Math.min(i.getY()-s.getY(),s.getBottom()-i.getBottom()));var h=Math.abs((s.getCenterY()-i.getCenterY())/(s.getCenterX()-i.getCenterX()));s.getCenterY()===i.getCenterY()&&s.getCenterX()===i.getCenterX()&&(h=1);var c=h*o[0],v=o[1]/h;o[0]<v?v=o[0]:c=o[1],o[0]=-1*u[0]*(v/2+l),o[1]=-1*u[1]*(c/2+l)},n.decideDirectionsForOverlappingNodes=function(i,s,o){i.getCenterX()<s.getCenterX()?o[0]=-1:o[0]=1,i.getCenterY()<s.getCenterY()?o[1]=-1:o[1]=1},n.getIntersection2=function(i,s,o){var l=i.getCenterX(),u=i.getCenterY(),h=s.getCenterX(),c=s.getCenterY();if(i.intersects(s))return o[0]=l,o[1]=u,o[2]=h,o[3]=c,!0;var v=i.getX(),d=i.getY(),g=i.getRight(),m=i.getX(),y=i.getBottom(),p=i.getRight(),b=i.getWidthHalf(),E=i.getHeightHalf(),S=s.getX(),w=s.getY(),x=s.getRight(),T=s.getX(),C=s.getBottom(),D=s.getRight(),L=s.getWidthHalf(),O=s.getHeightHalf(),A=!1,I=!1;if(l===h){if(u>c)return o[0]=l,o[1]=d,o[2]=h,o[3]=C,!1;if(u<c)return o[0]=l,o[1]=y,o[2]=h,o[3]=w,!1}else if(u===c){if(l>h)return o[0]=v,o[1]=u,o[2]=x,o[3]=c,!1;if(l<h)return o[0]=g,o[1]=u,o[2]=S,o[3]=c,!1}else{var M=i.height/i.width,P=s.height/s.width,R=(c-u)/(h-l),k=void 0,B=void 0,F=void 0,U=void 0,V=void 0,G=void 0;if(-M===R?l>h?(o[0]=m,o[1]=y,A=!0):(o[0]=g,o[1]=d,A=!0):M===R&&(l>h?(o[0]=v,o[1]=d,A=!0):(o[0]=p,o[1]=y,A=!0)),-P===R?h>l?(o[2]=T,o[3]=C,I=!0):(o[2]=x,o[3]=w,I=!0):P===R&&(h>l?(o[2]=S,o[3]=w,I=!0):(o[2]=D,o[3]=C,I=!0)),A&&I)return!1;if(l>h?u>c?(k=this.getCardinalDirection(M,R,4),B=this.getCardinalDirection(P,R,2)):(k=this.getCardinalDirection(-M,R,3),B=this.getCardinalDirection(-P,R,1)):u>c?(k=this.getCardinalDirection(-M,R,1),B=this.getCardinalDirection(-P,R,3)):(k=this.getCardinalDirection(M,R,2),B=this.getCardinalDirection(P,R,4)),!A)switch(k){case 1:U=d,F=l+-E/R,o[0]=F,o[1]=U;break;case 2:F=p,U=u+b*R,o[0]=F,o[1]=U;break;case 3:U=y,F=l+E/R,o[0]=F,o[1]=U;break;case 4:F=m,U=u+-b*R,o[0]=F,o[1]=U;break}if(!I)switch(B){case 1:G=w,V=h+-O/R,o[2]=V,o[3]=G;break;case 2:V=D,G=c+L*R,o[2]=V,o[3]=G;break;case 3:G=C,V=h+O/R,o[2]=V,o[3]=G;break;case 4:V=T,G=c+-L*R,o[2]=V,o[3]=G;break}}return!1},n.getCardinalDirection=function(i,s,o){return i>s?o:1+o%4},n.getIntersection=function(i,s,o,l){if(l==null)return this.getIntersection2(i,s,o);var u=i.x,h=i.y,c=s.x,v=s.y,d=o.x,g=o.y,m=l.x,y=l.y,p=void 0,b=void 0,E=void 0,S=void 0,w=void 0,x=void 0,T=void 0,C=void 0,D=void 0;return E=v-h,w=u-c,T=c*h-u*v,S=y-g,x=d-m,C=m*g-d*y,D=E*x-S*w,D===0?null:(p=(w*C-x*T)/D,b=(S*T-E*C)/D,new a(p,b))},n.angleOfVector=function(i,s,o,l){var u=void 0;return i!==o?(u=Math.atan((l-s)/(o-i)),o<i?u+=Math.PI:l<s&&(u+=this.TWO_PI)):l<s?u=this.ONE_AND_HALF_PI:u=this.HALF_PI,u},n.doIntersect=function(i,s,o,l){var u=i.x,h=i.y,c=s.x,v=s.y,d=o.x,g=o.y,m=l.x,y=l.y,p=(c-u)*(y-g)-(m-d)*(v-h);if(p===0)return!1;var b=((y-g)*(m-u)+(d-m)*(y-h))/p,E=((h-v)*(m-u)+(c-u)*(y-h))/p;return 0<b&&b<1&&0<E&&E<1},n.HALF_PI=.5*Math.PI,n.ONE_AND_HALF_PI=1.5*Math.PI,n.TWO_PI=2*Math.PI,n.THREE_PI=3*Math.PI,t.exports=n},function(t,e,r){"use strict";function a(){}f(a,"IMath"),a.sign=function(n){return n>0?1:n<0?-1:0},a.floor=function(n){return n<0?Math.ceil(n):Math.floor(n)},a.ceil=function(n){return n<0?Math.floor(n):Math.ceil(n)},t.exports=a},function(t,e,r){"use strict";function a(){}f(a,"Integer"),a.MAX_VALUE=2147483647,a.MIN_VALUE=-2147483648,t.exports=a},function(t,e,r){"use strict";var a=function(){function u(h,c){for(var v=0;v<c.length;v++){var d=c[v];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,d.key,d)}}return f(u,"defineProperties"),function(h,c,v){return c&&u(h.prototype,c),v&&u(h,v),h}}();function n(u,h){if(!(u instanceof h))throw new TypeError("Cannot call a class as a function")}f(n,"_classCallCheck");var i=f(function(h){return{value:h,next:null,prev:null}},"nodeFrom"),s=f(function(h,c,v,d){return h!==null?h.next=c:d.head=c,v!==null?v.prev=c:d.tail=c,c.prev=h,c.next=v,d.length++,c},"add"),o=f(function(h,c){var v=h.prev,d=h.next;return v!==null?v.next=d:c.head=d,d!==null?d.prev=v:c.tail=v,h.prev=h.next=null,c.length--,h},"_remove"),l=function(){function u(h){var c=this;n(this,u),this.length=0,this.head=null,this.tail=null,h?.forEach(function(v){return c.push(v)})}return f(u,"LinkedList"),a(u,[{key:"size",value:f(function(){return this.length},"size")},{key:"insertBefore",value:f(function(c,v){return s(v.prev,i(c),v,this)},"insertBefore")},{key:"insertAfter",value:f(function(c,v){return s(v,i(c),v.next,this)},"insertAfter")},{key:"insertNodeBefore",value:f(function(c,v){return s(v.prev,c,v,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:f(function(c,v){return s(v,c,v.next,this)},"insertNodeAfter")},{key:"push",value:f(function(c){return s(this.tail,i(c),null,this)},"push")},{key:"unshift",value:f(function(c){return s(null,i(c),this.head,this)},"unshift")},{key:"remove",value:f(function(c){return o(c,this)},"remove")},{key:"pop",value:f(function(){return o(this.tail,this).value},"pop")},{key:"popNode",value:f(function(){return o(this.tail,this)},"popNode")},{key:"shift",value:f(function(){return o(this.head,this).value},"shift")},{key:"shiftNode",value:f(function(){return o(this.head,this)},"shiftNode")},{key:"get_object_at",value:f(function(c){if(c<=this.length()){for(var v=1,d=this.head;v<c;)d=d.next,v++;return d.value}},"get_object_at")},{key:"set_object_at",value:f(function(c,v){if(c<=this.length()){for(var d=1,g=this.head;d<c;)g=g.next,d++;g.value=v}},"set_object_at")}]),u}();t.exports=l},function(t,e,r){"use strict";function a(n,i,s){this.x=null,this.y=null,n==null&&i==null&&s==null?(this.x=0,this.y=0):typeof n=="number"&&typeof i=="number"&&s==null?(this.x=n,this.y=i):n.constructor.name=="Point"&&i==null&&s==null&&(s=n,this.x=s.x,this.y=s.y)}f(a,"Point"),a.prototype.getX=function(){return this.x},a.prototype.getY=function(){return this.y},a.prototype.getLocation=function(){return new a(this.x,this.y)},a.prototype.setLocation=function(n,i,s){n.constructor.name=="Point"&&i==null&&s==null?(s=n,this.setLocation(s.x,s.y)):typeof n=="number"&&typeof i=="number"&&s==null&&(parseInt(n)==n&&parseInt(i)==i?this.move(n,i):(this.x=Math.floor(n+.5),this.y=Math.floor(i+.5)))},a.prototype.move=function(n,i){this.x=n,this.y=i},a.prototype.translate=function(n,i){this.x+=n,this.y+=i},a.prototype.equals=function(n){if(n.constructor.name=="Point"){var i=n;return this.x==i.x&&this.y==i.y}return this==n},a.prototype.toString=function(){return new a().constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=a},function(t,e,r){"use strict";function a(n,i,s,o){this.x=0,this.y=0,this.width=0,this.height=0,n!=null&&i!=null&&s!=null&&o!=null&&(this.x=n,this.y=i,this.width=s,this.height=o)}f(a,"RectangleD"),a.prototype.getX=function(){return this.x},a.prototype.setX=function(n){this.x=n},a.prototype.getY=function(){return this.y},a.prototype.setY=function(n){this.y=n},a.prototype.getWidth=function(){return this.width},a.prototype.setWidth=function(n){this.width=n},a.prototype.getHeight=function(){return this.height},a.prototype.setHeight=function(n){this.height=n},a.prototype.getRight=function(){return this.x+this.width},a.prototype.getBottom=function(){return this.y+this.height},a.prototype.intersects=function(n){return!(this.getRight()<n.x||this.getBottom()<n.y||n.getRight()<this.x||n.getBottom()<this.y)},a.prototype.getCenterX=function(){return this.x+this.width/2},a.prototype.getMinX=function(){return this.getX()},a.prototype.getMaxX=function(){return this.getX()+this.width},a.prototype.getCenterY=function(){return this.y+this.height/2},a.prototype.getMinY=function(){return this.getY()},a.prototype.getMaxY=function(){return this.getY()+this.height},a.prototype.getWidthHalf=function(){return this.width/2},a.prototype.getHeightHalf=function(){return this.height/2},t.exports=a},function(t,e,r){"use strict";var a=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 n(){}f(n,"UniqueIDGeneretor"),n.lastID=0,n.createID=function(i){return n.isPrimitive(i)?i:(i.uniqueID!=null||(i.uniqueID=n.getString(),n.lastID++),i.uniqueID)},n.getString=function(i){return i==null&&(i=n.lastID),"Object#"+i},n.isPrimitive=function(i){var s=typeof i>"u"?"undefined":a(i);return i==null||s!="object"&&s!="function"},t.exports=n},function(t,e,r){"use strict";
vendor: 4,945 bytes, line 1
1function a(d){if(Array.isArray(d)){for(var g=0,m=Array(d.length);g<d.length;g++)m[g]=d[g];return m}else return Array.from(d)}f(a,"_toConsumableArray");var n=r(0),i=r(6),s=r(3),o=r(1),l=r(5),u=r(4),h=r(17),c=r(27);function v(d){c.call(this),this.layoutQuality=n.QUALITY,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=n.DEFAULT_INCREMENTAL,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new i(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,d!=null&&(this.isRemoteUse=d)}f(v,"Layout"),v.RANDOM_SEED=1,v.prototype=Object.create(c.prototype),v.prototype.getGraphManager=function(){return this.graphManager},v.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},v.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},v.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},v.prototype.newGraphManager=function(){var d=new i(this);return this.graphManager=d,d},v.prototype.newGraph=function(d){return new l(null,this.graphManager,d)},v.prototype.newNode=function(d){return new s(this.graphManager,d)},v.prototype.newEdge=function(d){return new o(null,null,d)},v.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},v.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var d;return this.checkLayoutSuccess()?d=!1:d=this.layout(),n.ANIMATE==="during"?!1:(d&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,d)},v.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},v.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var d,g=this.graphManager.getAllEdges(),m=0;m<g.length;m++)d=g[m];for(var y,p=this.graphManager.getRoot().getNodes(),m=0;m<p.length;m++)y=p[m];this.update(this.graphManager.getRoot())}},v.prototype.update=function(d){if(d==null)this.update2();else if(d instanceof s){var g=d;if(g.getChild()!=null)for(var m=g.getChild().getNodes(),y=0;y<m.length;y++)update(m[y]);if(g.vGraphObject!=null){var p=g.vGraphObject;p.update(g)}}else if(d instanceof o){var b=d;if(b.vGraphObject!=null){var E=b.vGraphObject;E.update(b)}}else if(d instanceof l){var S=d;if(S.vGraphObject!=null){var w=S.vGraphObject;w.update(S)}}},v.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=n.QUALITY,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=n.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},v.prototype.transform=function(d){if(d==null)this.transform(new u(0,0));else{var g=new h,m=this.graphManager.getRoot().updateLeftTop();if(m!=null){g.setWorldOrgX(d.x),g.setWorldOrgY(d.y),g.setDeviceOrgX(m.x),g.setDeviceOrgY(m.y);for(var y=this.getAllNodes(),p,b=0;b<y.length;b++)p=y[b],p.transform(g)}}},v.prototype.positionNodesRandomly=function(d){if(d==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var g,m,y=d.getNodes(),p=0;p<y.length;p++)g=y[p],m=g.getChild(),m==null||m.getNodes().length==0?g.scatter():(this.positionNodesRandomly(m),g.updateBounds())},v.prototype.getFlatForest=function(){for(var d=[],g=!0,m=this.graphManager.getRoot().getNodes(),y=!0,p=0;p<m.length;p++)m[p].getChild()!=null&&(y=!1);if(!y)return d;var b=new Set,E=[],S=new Map,w=[];for(w=w.concat(m);w.length>0&&g;){for(E.push(w[0]);E.length>0&&g;){var x=E[0];E.splice(0,1),b.add(x);for(var T=x.getEdges(),p=0;p<T.length;p++){var C=T[p].getOtherEnd(x);if(S.get(x)!=C)if(!b.has(C))E.push(C),S.set(C,x);else{g=!1;break}}}if(!g)d=[];else{var D=[].concat(a(b));d.push(D);for(var p=0;p<D.length;p++){var L=D[p],O=w.indexOf(L);O>-1&&w.splice(O,1)}b=new Set,S=new Map}}return d},v.prototype.createDummyNodesForBendpoints=function(d){for(var g=[],m=d.source,y=this.graphManager.calcLowestCommonAncestor(d.source,d.target),p=0;p<d.bendpoints.length;p++){var b=this.newNode(null);b.setRect(new Point(0,0),new Dimension(1,1)),y.add(b);var E=this.newEdge(null);this.graphManager.add(E,m,b),g.add(b),m=b}var E=this.newEdge(null);return this.graphManager.add(E,m,d.target),this.edgeToDummyNodes.set(d,g),d.isInterGraph()?this.graphManager.remove(d):y.remove(d),g}
vendor: 23,626 bytes, line 1
1,v.prototype.createBendpointsFromDummyNodes=function(){var d=[];d=d.concat(this.graphManager.getAllEdges()),d=[].concat(a(this.edgeToDummyNodes.keys())).concat(d);for(var g=0;g<d.length;g++){var m=d[g];if(m.bendpoints.length>0){for(var y=this.edgeToDummyNodes.get(m),p=0;p<y.length;p++){var b=y[p],E=new u(b.getCenterX(),b.getCenterY()),S=m.bendpoints.get(p);S.x=E.x,S.y=E.y,b.getOwner().remove(b)}this.graphManager.add(m,m.source,m.target)}}},v.transform=function(d,g,m,y){if(m!=null&&y!=null){var p=g;if(d<=50){var b=g/m;p-=(g-b)/50*(50-d)}else{var E=g*y;p+=(E-g)/50*(d-50)}return p}else{var S,w;return d<=50?(S=9*g/500,w=g/10):(S=9*g/50,w=-8*g),S*d+w}},v.findCenterOfTree=function(d){var g=[];g=g.concat(d);var m=[],y=new Map,p=!1,b=null;(g.length==1||g.length==2)&&(p=!0,b=g[0]);for(var E=0;E<g.length;E++){var S=g[E],w=S.getNeighborsList().size;y.set(S,S.getNeighborsList().size),w==1&&m.push(S)}var x=[];for(x=x.concat(m);!p;){var T=[];T=T.concat(x),x=[];for(var E=0;E<g.length;E++){var S=g[E],C=g.indexOf(S);C>=0&&g.splice(C,1);var D=S.getNeighborsList();D.forEach(function(A){if(m.indexOf(A)<0){var I=y.get(A),M=I-1;M==1&&x.push(A),y.set(A,M)}})}m=m.concat(x),(g.length==1||g.length==2)&&(p=!0,b=g[0])}return b},v.prototype.setGraphManager=function(d){this.graphManager=d},t.exports=v},function(t,e,r){"use strict";function a(){}f(a,"RandomSeed"),a.seed=1,a.x=0,a.nextDouble=function(){return a.x=Math.sin(a.seed++)*1e4,a.x-Math.floor(a.x)},t.exports=a},function(t,e,r){"use strict";var a=r(4);function n(i,s){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}f(n,"Transform"),n.prototype.getWorldOrgX=function(){return this.lworldOrgX},n.prototype.setWorldOrgX=function(i){this.lworldOrgX=i},n.prototype.getWorldOrgY=function(){return this.lworldOrgY},n.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},n.prototype.getWorldExtX=function(){return this.lworldExtX},n.prototype.setWorldExtX=function(i){this.lworldExtX=i},n.prototype.getWorldExtY=function(){return this.lworldExtY},n.prototype.setWorldExtY=function(i){this.lworldExtY=i},n.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},n.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},n.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},n.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},n.prototype.getDeviceExtX=function(){return this.ldeviceExtX},n.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},n.prototype.getDeviceExtY=function(){return this.ldeviceExtY},n.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},n.prototype.transformX=function(i){var s=0,o=this.lworldExtX;return o!=0&&(s=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/o),s},n.prototype.transformY=function(i){var s=0,o=this.lworldExtY;return o!=0&&(s=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/o),s},n.prototype.inverseTransformX=function(i){var s=0,o=this.ldeviceExtX;return o!=0&&(s=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/o),s},n.prototype.inverseTransformY=function(i){var s=0,o=this.ldeviceExtY;return o!=0&&(s=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/o),s},n.prototype.inverseTransformPoint=function(i){var s=new a(this.inverseTransformX(i.x),this.inverseTransformY(i.y));return s},t.exports=n},function(t,e,r){"use strict";function a(c){if(Array.isArray(c)){for(var v=0,d=Array(c.length);v<c.length;v++)d[v]=c[v];return d}else return Array.from(c)}f(a,"_toConsumableArray");var n=r(15),i=r(7),s=r(0),o=r(8),l=r(9);function u(){n.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=i.DEFAULT_EDGE_LENGTH,this.springConstant=i.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=i.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}f(u,"FDLayout"),u.prototype=Object.create(n.prototype);for(var h in n)u[h]=n[h];u.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},u.prototype.calcIdealEdgeLengths=function(){for(var c,v,d,g,m,y,p=this.getGraphManager().getAllEdges(),b=0;b<p.length;b++)c=p[b],c.idealLength=this.idealEdgeLength,c.isInterGraph&&(d=c.getSource(),g=c.getTarget(),m=c.getSourceInLca().getEstimatedSize(),y=c.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(c.idealLength+=m+y-2*s.SIMPLE_NODE_SIZE),v=c.getLca().getInclusionTreeDepth(),c.idealLength+=i.DEFAULT_EDGE_LENGTH*i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(d.getInclusionTreeDepth()+g.getInclusionTreeDepth()-2*v))},u.prototype.initSpringEmbedder=function(){var c=this.getAllNodes().length;this.incremental?(c>i.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(c-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(c>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(c-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var c=this.getAllEdges(),v,d=0;d<c.length;d++)v=c[d],this.calcSpringForce(v,v.idealLength)},u.prototype.calcRepulsionForces=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d,g,m,y,p=this.getAllNodes(),b;if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&c&&this.updateGrid(),b=new Set,d=0;d<p.length;d++)m=p[d],this.calculateRepulsionForceOfANode(m,b,c,v),b.add(m);else for(d=0;d<p.length;d++)for(m=p[d],g=d+1;g<p.length;g++)y=p[g],m.getOwner()==y.getOwner()&&this.calcRepulsionForce(m,y)},u.prototype.calcGravitationalForces=function(){for(var c,v=this.getAllNodesToApplyGravitation(),d=0;d<v.length;d++)c=v[d],this.calcGravitationalForce(c)},u.prototype.moveNodes=function(){for(var c=this.getAllNodes(),v,d=0;d<c.length;d++)v=c[d],v.move()},u.prototype.calcSpringForce=function(c,v){var d=c.getSource(),g=c.getTarget(),m,y,p,b;if(this.uniformLeafNodeSizes&&d.getChild()==null&&g.getChild()==null)c.updateLengthSimple();else if(c.updateLength(),c.isOverlapingSourceAndTarget)return;m=c.getLength(),m!=0&&(y=this.springConstant*(m-v),p=y*(c.lengthX/m),b=y*(c.lengthY/m),d.springForceX+=p,d.springForceY+=b,g.springForceX-=p,g.springForceY-=b)},u.prototype.calcRepulsionForce=function(c,v){var d=c.getRect(),g=v.getRect(),m=new Array(2),y=new Array(4),p,b,E,S,w,x,T;if(d.intersects(g)){o.calcSeparationAmount(d,g,m,i.DEFAULT_EDGE_LENGTH/2),x=2*m[0],T=2*m[1];var C=c.noOfChildren*v.noOfChildren/(c.noOfChildren+v.noOfChildren);c.repulsionForceX-=C*x,c.repulsionForceY-=C*T,v.repulsionForceX+=C*x,v.repulsionForceY+=C*T}else this.uniformLeafNodeSizes&&c.getChild()==null&&v.getChild()==null?(p=g.getCenterX()-d.getCenterX(),b=g.getCenterY()-d.getCenterY()):(o.getIntersection(d,g,y),p=y[2]-y[0],b=y[3]-y[1]),Math.abs(p)<i.MIN_REPULSION_DIST&&(p=l.sign(p)*i.MIN_REPULSION_DIST),Math.abs(b)<i.MIN_REPULSION_DIST&&(b=l.sign(b)*i.MIN_REPULSION_DIST),E=p*p+b*b,S=Math.sqrt(E),w=this.repulsionConstant*c.noOfChildren*v.noOfChildren/E,x=w*p/S,T=w*b/S,c.repulsionForceX-=x,c.repulsionForceY-=T,v.repulsionForceX+=x,v.repulsionForceY+=T},u.prototype.calcGravitationalForce=function(c){var v,d,g,m,y,p,b,E;v=c.getOwner(),d=(v.getRight()+v.getLeft())/2,g=(v.getTop()+v.getBottom())/2,m=c.getCenterX()-d,y=c.getCenterY()-g,p=Math.abs(m)+c.getWidth()/2,b=Math.abs(y)+c.getHeight()/2,c.getOwner()==this.graphManager.getRoot()?(E=v.getEstimatedSize()*this.gravityRangeFactor,(p>E||b>E)&&(c.gravitationForceX=-this.gravityConstant*m,c.gravitationForceY=-this.gravityConstant*y)):(E=v.getEstimatedSize()*this.compoundGravityRangeFactor,(p>E||b>E)&&(c.gravitationForceX=-this.gravityConstant*m*this.compoundGravityConstant,c.gravitationForceY=-this.gravityConstant*y*this.compoundGravityConstant))},u.prototype.isConverged=function(){var c,v=!1;return this.totalIterations>this.maxIterations/3&&(v=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),c=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,c||v},u.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},u.prototype.calcNoOfChildrenForAllNodes=function(){for(var c,v=this.graphManager.getAllNodes(),d=0;d<v.length;d++)c=v[d],c.noOfChildren=c.getNoOfChildren()},u.prototype.calcGrid=function(c){var v=0,d=0;v=parseInt(Math.ceil((c.getRight()-c.getLeft())/this.repulsionRange)),d=parseInt(Math.ceil((c.getBottom()-c.getTop())/this.repulsionRange));for(var g=new Array(v),m=0;m<v;m++)g[m]=new Array(d);for(var m=0;m<v;m++)for(var y=0;y<d;y++)g[m][y]=new Array;return g},u.prototype.addNodeToGrid=function(c,v,d){var g=0,m=0,y=0,p=0;g=parseInt(Math.floor((c.getRect().x-v)/this.repulsionRange)),m=parseInt(Math.floor((c.getRect().width+c.getRect().x-v)/this.repulsionRange)),y=parseInt(Math.floor((c.getRect().y-d)/this.repulsionRange)),p=parseInt(Math.floor((c.getRect().height+c.getRect().y-d)/this.repulsionRange));for(var b=g;b<=m;b++)for(var E=y;E<=p;E++)this.grid[b][E].push(c),c.setGridCoordinates(g,m,y,p)},u.prototype.updateGrid=function(){var c,v,d=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),c=0;c<d.length;c++)v=d[c],this.addNodeToGrid(v,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},u.prototype.calculateRepulsionForceOfANode=function(c,v,d,g){if(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&d||g){var m=new Set;c.surrounding=new Array;for(var y,p=this.grid,b=c.startX-1;b<c.finishX+2;b++)for(var E=c.startY-1;E<c.finishY+2;E++)if(!(b<0||E<0||b>=p.length||E>=p[0].length)){for(var S=0;S<p[b][E].length;S++)if(y=p[b][E][S],!(c.getOwner()!=y.getOwner()||c==y)&&!v.has(y)&&!m.has(y)){var w=Math.abs(c.getCenterX()-y.getCenterX())-(c.getWidth()/2+y.getWidth()/2),x=Math.abs(c.getCenterY()-y.getCenterY())-(c.getHeight()/2+y.getHeight()/2);w<=this.repulsionRange&&x<=this.repulsionRange&&m.add(y)}}c.surrounding=[].concat(a(m))}for(b=0;b<c.surrounding.length;b++)this.calcRepulsionForce(c,c.surrounding[b])},u.prototype.calcRepulsionRange=function(){return 0},t.exports=u},function(t,e,r){"use strict";var a=r(1),n=r(7);function i(o,l,u){a.call(this,o,l,u),this.idealLength=n.DEFAULT_EDGE_LENGTH}f(i,"FDLayoutEdge"),i.prototype=Object.create(a.prototype);for(var s in a)i[s]=a[s];t.exports=i},function(t,e,r){"use strict";var a=r(3);function n(s,o,l,u){a.call(this,s,o,l,u),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}f(n,"FDLayoutNode"),n.prototype=Object.create(a.prototype);for(var i in a)n[i]=a[i];n.prototype.setGridCoordinates=function(s,o,l,u){this.startX=s,this.finishX=o,this.startY=l,this.finishY=u},t.exports=n},function(t,e,r){"use strict";function a(n,i){this.width=0,this.height=0,n!==null&&i!==null&&(this.height=i,this.width=n)}f(a,"DimensionD"),a.prototype.getWidth=function(){return this.width},a.prototype.setWidth=function(n){this.width=n},a.prototype.getHeight=function(){return this.height},a.prototype.setHeight=function(n){this.height=n},t.exports=a},function(t,e,r){"use strict";var a=r(14);function n(){this.map={},this.keys=[]}f(n,"HashMap"),n.prototype.put=function(i,s){var o=a.createID(i);this.contains(o)||(this.map[o]=s,this.keys.push(i))},n.prototype.contains=function(i){var s=a.createID(i);return this.map[i]!=null},n.prototype.get=function(i){var s=a.createID(i);return this.map[s]},n.prototype.keySet=function(){return this.keys},t.exports=n},function(t,e,r){"use strict";var a=r(14);function n(){this.set={}}f(n,"HashSet"),n.prototype.add=function(i){var s=a.createID(i);this.contains(s)||(this.set[s]=i)},n.prototype.remove=function(i){delete this.set[a.createID(i)]},n.prototype.clear=function(){this.set={}},n.prototype.contains=function(i){return this.set[a.createID(i)]==i},n.prototype.isEmpty=function(){return this.size()===0},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAllTo=function(i){for(var s=Object.keys(this.set),o=s.length,l=0;l<o;l++)i.push(this.set[s[l]])},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAll=function(i){for(var s=i.length,o=0;o<s;o++){var l=i[o];this.add(l)}},t.exports=n},function(t,e,r){"use strict";var a=function(){function o(l,u){for(var h=0;h<u.length;h++){var c=u[h];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,c.key,c)}}return f(o,"defineProperties"),function(l,u,h){return u&&o(l.prototype,u),h&&o(l,h),l}}();function n(o,l){if(!(o instanceof l))throw new TypeError("Cannot call a class as a function")}f(n,"_classCallCheck");var i=r(11),s=function(){function o(l,u){n(this,o),(u!==null||u!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var h=void 0;l instanceof i?h=l.size():h=l.length,this._quicksort(l,0,h-1)}return f(o,"Quicksort"),a(o,[{key:"_quicksort",value:f(function(u,h,c){if(h<c){var v=this._partition(u,h,c);this._quicksort(u,h,v),this._quicksort(u,v+1,c)}},"_quicksort")},{key:"_partition",value:f(function(u,h,c){for(var v=this._get(u,h),d=h,g=c;;){for(;this.compareFunction(v,this._get(u,g));)g--;for(;this.compareFunction(this._get(u,d),v);)d++;if(d<g)this._swap(u,d,g),d++,g--;else return g}},"_partition")},{key:"_get",value:f(function(u,h){return u instanceof i?u.get_object_at(h):u[h]},"_get")},{key:"_set",value:f(function(u,h,c){u instanceof i?u.set_object_at(h,c):u[h]=c},"_set")},{key:"_swap",value:f(function(u,h,c){var v=this._get(u,h);this._set(u,h,this._get(u,c)),this._set(u,c,v)},"_swap")},{key:"_defaultCompareFunction",value:f(function(u,h){return h>u},"_defaultCompareFunction")}]),o}();t.exports=s},function(t,e,r){"use strict";var a=function(){function s(o,l){for(var u=0;u<l.length;u++){var h=l[u];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(o,h.key,h)}}return f(s,"defineProperties"),function(o,l,u){return l&&s(o.prototype,l),u&&s(o,u),o}}();function n(s,o){if(!(s instanceof o))throw new TypeError("Cannot call a class as a function")}f(n,"_classCallCheck");var i=function(){function s(o,l){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;n(this,s),this.sequence1=o,this.sequence2=l,this.match_score=u,this.mismatch_penalty=h,this.gap_penalty=c,this.iMax=o.length+1,this.jMax=l.length+1,this.grid=new Array(this.iMax);for(var v=0;v<this.iMax;v++){this.grid[v]=new Array(this.jMax);for(var d=0;d<this.jMax;d++)this.grid[v][d]=0}this.tracebackGrid=new Array(this.iMax);for(var g=0;g<this.iMax;g++){this.tracebackGrid[g]=new Array(this.jMax);for(var m=0;m<this.jMax;m++)this.tracebackGrid[g][m]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return f(s,"NeedlemanWunsch"),a(s,[{key:"getScore",value:f(function(){return this.score},"getScore")},{key:"getAlignments",value:f(function(){return this.alignments},"getAlignments")},{key:"computeGrids",value:f(function(){for(var l=1;l<this.jMax;l++)this.grid[0][l]=this.grid[0][l-1]+this.gap_penalty,this.tracebackGrid[0][l]=[!1,!1,!0];for(var u=1;u<this.iMax;u++)this.grid[u][0]=this.grid[u-1][0]+this.gap_penalty,this.tracebackGrid[u][0]=[!1,!0,!1];for(var h=1;h<this.iMax;h++)for(var c=1;c<this.jMax;c++){var v=void 0;this.sequence1[h-1]===this.sequence2[c-1]?v=this.grid[h-1][c-1]+this.match_score:v=this.grid[h-1][c-1]+this.mismatch_penalty;var d=this.grid[h-1][c]+this.gap_penalty,g=this.grid[h][c-1]+this.gap_penalty,m=[v,d,g],y=this.arrayAllMaxIndexes(m);this.grid[h][c]=m[y[0]],this.tracebackGrid[h][c]=[y.includes(0),y.includes(1),y.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]},"computeGrids")},{key:"alignmentTraceback",value:f(function(){var l=[];for(l.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});l[0];){var u=l[0],h=this.tracebackGrid[u.pos[0]][u.pos[1]];h[0]&&l.push({pos:[u.pos[0]-1,u.pos[1]-1],seq1:this.sequence1[u.pos[0]-1]+u.seq1,seq2:this.sequence2[u.pos[1]-1]+u.seq2}),h[1]&&l.push({pos:[u.pos[0]-1,u.pos[1]],seq1:this.sequence1[u.pos[0]-1]+u.seq1,seq2:"-"+u.seq2}),h[2]&&l.push({pos:[u.pos[0],u.pos[1]-1],seq1:"-"+u.seq1,seq2:this.sequence2[u.pos[1]-1]+u.seq2}),u.pos[0]===0&&u.pos[1]===0&&this.alignments.push({sequence1:u.seq1,sequence2:u.seq2}),l.shift()}return this.alignments},"alignmentTraceback")},{key:"getAllIndexes",value:f(function(l,u){for(var h=[],c=-1;(c=l.indexOf(u,c+1))!==-1;)h.push(c);return h},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:f(function(l){return this.getAllIndexes(l,Math.max.apply(null,l))},"arrayAllMaxIndexes")}]),s}();t.exports=i},function(t,e,r){"use strict";var a=f(function(){},"layoutBase");a.FDLayout=r(18),a.FDLayoutConstants=r(7),a.FDLayoutEdge=r(19),a.FDLayoutNode=r(20),a.DimensionD=r(21),a.HashMap=r(22),a.HashSet=r(23),a.IGeometry=r(8),a.IMath=r(9),a.Integer=r(10),a.Point=r(12),a.PointD=r(4),a.RandomSeed=r(16),a.RectangleD=r(13),a.Transform=r(17),a.UniqueIDGeneretor=r(14),a.Quicksort=r(24),a.LinkedList=r(11),a.LGraphObject=r(2),a.LGraph=r(5),a.LEdge=r(1),a.LGraphManager=r(6),a.LNode=r(3),a.Layout=r(15),a.LayoutConstants=r(0),a.NeedlemanWunsch=r(25),t.exports=a},function(t,e,r){"use strict";function a(){this.listeners=[]}f(a,"Emitter");var n=a.prototype;n.addListener=function(i,s){this.listeners.push({event:i,callback:s})},n.removeListener=function(i,s){for(var o=this.listeners.length;o>=0;o--){var l=this.listeners[o];l.event===i&&l.callback===s&&this.listeners.splice(o,1)}},n.emit=function(i,s){for(var o=0;o<this.listeners.length;o++){var l=this.listeners[o];i===l.event&&l.callback(s)}},t.exports=a}])})});var $i=Gn((Ba,Yi)=>{"use strict";f(function(e,r){typeof Ba=="object"&&typeof Yi=="object"?Yi.exports=r(Ui()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof Ba=="object"?Ba.coseBase=r(Ui()):e.coseBase=r(e.layoutBase)},"webpackUniversalModuleDefinition")(Ba,function(t){return function(e){var r={};function a(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,a),i.l=!0,i.exports}return f(a,"__webpack_require__"),a.m=e,a.c=r,a.i=function(n){return n},a.d=function(n,i,s){a.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:s})},a.n=function(n){var i=n&&n.__esModule?f(function(){return n.default},"getDefault"):f(function(){return n},"getModuleExports");return a.d(i,"a",i),i},a.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},a.p="",a(a.s=7)}([function(e,r){e.exports=t},function(e,r,a){"use strict";var n=a(0).FDLayoutConstants;function i(){}f(i,"CoSEConstants");for(var s in n)i[s]=n[s];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=i},function(e,r,a){"use strict";var n=a(0).FDLayoutEdge;function i(o,l,u){n.call(this,o,l,u)}f(i,"CoSEEdge"),i.prototype=Object.create(n.prototype);for(var s in n)i[s]=n[s];e.exports=i},function(e,r,a){"use strict";var n=a(0).LGraph;function i(o,l,u){n.call(this,o,l,u)}f(i,"CoSEGraph"),i.prototype=Object.create(n.prototype);for(var s in n)i[s]=n[s];e.exports=i},function(e,r,a){"use strict";var n=a(0).LGraphManager;function i(o){n.call(this,o)}f(i,"CoSEGraphManager"),i.prototype=Object.create(n.prototype);for(var s in n)i[s]=n[s];e.exports=i},function(e,r,a){"use strict";var n=a(0).FDLayoutNode,i=a(0).IMath;function s(l,u,h,c){n.call(this,l,u,h,c)}f(s,"CoSENode"),s.prototype=Object.create(n.prototype);for(var o in n)s[o]=n[o];s.prototype.move=function(){var l=this.graphManager.getLayout();this.displacementX=l.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=l.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>l.coolingFactor*l.maxNodeDisplacement&&(this.displacementX=l.coolingFactor*l.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>l.coolingFactor*l.maxNodeDisplacement&&(this.displacementY=l.coolingFactor*l.maxNodeDisplacement*i.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),l.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},s.prototype.propogateDisplacementToChildren=function(l,u){for(var h=this.getChild().getNodes(),c,v=0;v<h.length;v++)c=h[v],c.getChild()==null?(c.moveBy(l,u),c.displacementX+=l,c.displacementY+=u):c.propogateDisplacementToChildren(l,u)},s.prototype.setPred1=function(l){this.pred1=l},s.prototype.getPred1=function(){return pred1},s.prototype.getPred2=function(){return pred2},s.prototype.setNext=function(l){this.next=l},s.prototype.getNext=function(){return next},s.prototype.setProcessed=function(l){this.processed=l},s.prototype.isProcessed=function(){return processed},e.exports=s},function(e,r,a){"use strict";var n=a(0).FDLayout,i=a(4),s=a(3),o=a(5),l=a(2),u=a(1),h=a(0).FDLayoutConstants,c=a(0).LayoutConstants,v=a(0).Point,d=a(0).PointD,g=a(0).Layout,m=a(0).Integer,y=a(0).IGeometry,p=a(0).LGraph,b=a(0).Transform;function E(){n.call(this),this.toBeTiled={}}f(E,"CoSELayout"),E.prototype=Object.create(n.prototype);for(var S in n)E[S]=n[S];E.prototype.newGraphManager=function(){var w=new i(this);return this.graphManager=w,w},E.prototype.newGraph=function(w){return new s(null,this.graphManager,w)},E.prototype.newNode=function(w){return new o(this.graphManager,w)},E.prototype.newEdge=function(w){return new l(null,null,w)},E.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.isSubLayout||(u.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=u.DEFAULT_EDGE_LENGTH,this.useSmartIdealE
vendor: 10,270 bytes, line 1
1dgeLengthCalculation=u.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=h.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=h.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=h.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},E.prototype.layout=function(){var w=c.DEFAULT_CREATE_BENDS_AS_NEEDED;return w&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},E.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(u.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var x=new Set(this.getAllNodes()),T=this.nodesWithGravity.filter(function(L){return x.has(L)});this.graphManager.setAllNodesToApplyGravitation(T)}}else{var w=this.getFlatForest();if(w.length>0)this.positionNodesRadially(w);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var x=new Set(this.getAllNodes()),T=this.nodesWithGravity.filter(function(C){return x.has(C)});this.graphManager.setAllNodesToApplyGravitation(T),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},E.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var w=new Set(this.getAllNodes()),x=this.nodesWithGravity.filter(function(D){return w.has(D)});this.graphManager.setAllNodesToApplyGravitation(x),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var T=!this.isTreeGrowing&&!this.isGrowthFinished,C=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(T,C),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},E.prototype.getPositionsData=function(){for(var w=this.graphManager.getAllNodes(),x={},T=0;T<w.length;T++){var C=w[T].rect,D=w[T].id;x[D]={id:D,x:C.getCenterX(),y:C.getCenterY(),w:C.width,h:C.height}}return x},E.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var w=!1;if(h.ANIMATE==="during")this.emit("layoutstarted");else{for(;!w;)w=this.tick();this.graphManager.updateBounds()}},E.prototype.calculateNodesToApplyGravitationTo=function(){var w=[],x,T=this.graphManager.getGraphs(),C=T.length,D;for(D=0;D<C;D++)x=T[D],x.updateConnected(),x.isConnected||(w=w.concat(x.getNodes()));return w},E.prototype.createBendpoints=function(){var w=[];w=w.concat(this.graphManager.getAllEdges());var x=new Set,T;for(T=0;T<w.length;T++){var C=w[T];if(!x.has(C)){var D=C.getSource(),L=C.getTarget();if(D==L)C.getBendpoints().push(new d),C.getBendpoints().push(new d),this.createDummyNodesForBendpoints(C),x.add(C);else{var O=[];if(O=O.concat(D.getEdgeListToNode(L)),O=O.concat(L.getEdgeListToNode(D)),!x.has(O[0])){if(O.length>1){var A;for(A=0;A<O.length;A++){var I=O[A];I.getBendpoints().push(new d),this.createDummyNodesForBendpoints(I)}}O.forEach(function(M){x.add(M)})}}}if(x.size==w.length)break}},E.prototype.positionNodesRadially=function(w){for(var x=new v(0,0),T=Math.ceil(Math.sqrt(w.length)),C=0,D=0,L=0,O=new d(0,0),A=0;A<w.length;A++){A%T==0&&(L=0,D=C,A!=0&&(D+=u.DEFAULT_COMPONENT_SEPERATION),C=0);var I=w[A],M=g.findCenterOfTree(I);x.x=L,x.y=D,O=E.radialLayout(I,M,x),O.y>C&&(C=Math.floor(O.y)),L=Math.floor(O.x+u.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(c.WORLD_CENTER_X-O.x/2,c.WORLD_CENTER_Y-O.y/2))},E.radialLayout=function(w,x,T){var C=Math.max(this.maxDiagonalInTree(w),u.DEFAULT_RADIAL_SEPARATION);E.branchRadialLayout(x,null,0,359,0,C);var D=p.calculateBounds(w),L=new b;L.setDeviceOrgX(D.getMinX()),L.setDeviceOrgY(D.getMinY()),L.setWorldOrgX(T.x),L.setWorldOrgY(T.y);for(var O=0;O<w.length;O++){var A=w[O];A.transform(L)}var I=new d(D.getMaxX(),D.getMaxY());return L.inverseTransformPoint(I)},E.branchRadialLayout=function(w,x,T,C,D,L){var O=(C-T+1)/2;O<0&&(O+=180);var A=(O+T)%360,I=A*y.TWO_PI/360,M=Math.cos(I),P=D*Math.cos(I),R=D*Math.sin(I);w.setCenter(P,R);var k=[];k=k.concat(w.getEdges());var B=k.length;x!=null&&B--;for(var F=0,U=k.length,V,G=w.getEdgesBetween(x);G.length>1;){var $=G[0];G.splice(0,1);var j=k.indexOf($);j>=0&&k.splice(j,1),U--,B--}x!=null?V=(k.indexOf(G[0])+1)%U:V=0;for(var Q=Math.abs(C-T)/B,H=V;F!=B;H=++H%U){var te=k[H].getOtherEnd(w);if(te!=x){var _=(T+F*Q)%360,z=(_+Q)%360;E.branchRadialLayout(te,w,_,z,D+L,L),F++}}},E.maxDiagonalInTree=function(w){for(var x=m.MIN_VALUE,T=0;T<w.length;T++){var C=w[T],D=C.getDiagonal();D>x&&(x=D)}return x},E.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},E.prototype.groupZeroDegreeMembers=function(){var w=this,x={};this.memberGroups={},this.idToDummyNode={};for(var T=[],C=this.graphManager.getAllNodes(),D=0;D<C.length;D++){var L=C[D],O=L.getParent();this.getNodeDegreeWithChildren(L)===0&&(O.id==null||!this.getToBeTiled(O))&&T.push(L)}for(var D=0;D<T.length;D++){var L=T[D],A=L.getParent().id;typeof x[A]>"u"&&(x[A]=[]),x[A]=x[A].concat(L)}Object.keys(x).forEach(function(I){if(x[I].length>1){var M="DummyCompound_"+I;w.memberGroups[M]=x[I];var P=x[I][0].getParent(),R=new o(w.graphManager);R.id=M,R.paddingLeft=P.paddingLeft||0,R.paddingRight=P.paddingRight||0,R.paddingBottom=P.paddingBottom||0,R.paddingTop=P.paddingTop||0,w.idToDummyNode[M]=R;var k=w.getGraphManager().add(w.newGraph(),R),B=P.getChild();B.add(R);for(var F=0;F<x[I].length;F++){var U=x[I][F];B.remove(U),k.add(U)}}})},E.prototype.clearCompounds=function(){var w={},x={};this.performDFSOnCompounds();for(var T=0;T<this.compoundOrder.length;T++)x[this.compoundOrder[T].id]=this.compoundOrder[T],w[this.compoundOrder[T].id]=[].concat(this.compoundOrder[T].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[T].getChild()),this.compoundOrder[T].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(w,x)},E.prototype.clearZeroDegreeMembers=function(){var w=this,x=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(T){var C=w.idToDummyNode[T];x[T]=w.tileNodes(w.memberGroups[T],C.paddingLeft+C.paddingRight),C.rect.width=x[T].width,C.rect.height=x[T].height})},E.prototype.repopulateCompounds=function(){for(var w=this.compoundOrder.length-1;w>=0;w--){var x=this.compoundOrder[w],T=x.id,C=x.paddingLeft,D=x.paddingTop;this.adjustLocations(this.tiledMemberPack[T],x.rect.x,x.rect.y,C,D)}},E.prototype.repopulateZeroDegreeMembers=function(){var w=this,x=this.tiledZeroDegreePack;Object.keys(x).forEach(function(T){var C=w.idToDummyNode[T],D=C.paddingLeft,L=C.paddingTop;w.adjustLocations(x[T],C.rect.x,C.rect.y,D,L)})},E.prototype.getToBeTiled=function(w){var x=w.id;if(this.toBeTiled[x]!=null)return this.toBeTiled[x];var T=w.getChild();if(T==null)return this.toBeTiled[x]=!1,!1;for(var C=T.getNodes(),D=0;D<C.length;D++){var L=C[D];if(this.getNodeDegree(L)>0)return this.toBeTiled[x]=!1,!1;if(L.getChild()==null){this.toBeTiled[L.id]=!1;continue}if(!this.getToBeTiled(L))return this.toBeTiled[x]=!1,!1}return this.toBeTiled[x]=!0,!0},E.prototype.getNodeDegree=function(w){for(var x=w.id,T=w.getEdges(),C=0,D=0;D<T.length;D++){var L=T[D];L.getSource().id!==L.getTarget().id&&(C=C+1)}return C},E.prototype.getNodeDegreeWithChildren=function(w){var x=this.getNodeDegree(w);if(w.getChild()==null)return x;for(var T=w.getChild().getNodes(),C=0;C<T.length;C++){var D=T[C];x+=this.getNodeDegreeWithChildren(D)}return x},E.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},E.prototype.fillCompexOrderByDFS=function(w){for(var x=0;x<w.length;x++){var T=w[x];T.getChild()!=null&&this.fillCompexOrderByDFS(T.getChild().getNodes()),this.getToBeTiled(T)&&this.compoundOrder.push(T)}},E.prototype.adjustLocations=function(w,x,T,C,D){x+=C,T+=D;for(var L=x,O=0;O<w.rows.length;O++){var A=w.rows[O];x=L;for(var I=0,M=0;M<A.length;M++){var P=A[M];P.rect.x=x,P.rect.y=T,x+=P.rect.width+w.horizontalPadding,P.rect.height>I&&(I=P.rect.height)}T+=I+w.verticalPadding}},E.prototype.tileCompoundMembers=function(w,x){var T=this;
vendor: 6,464 bytes, line 1
1this.tiledMemberPack=[],Object.keys(w).forEach(function(C){var D=x[C];T.tiledMemberPack[C]=T.tileNodes(w[C],D.paddingLeft+D.paddingRight),D.rect.width=T.tiledMemberPack[C].width,D.rect.height=T.tiledMemberPack[C].height})},E.prototype.tileNodes=function(w,x){var T=u.TILING_PADDING_VERTICAL,C=u.TILING_PADDING_HORIZONTAL,D={rows:[],rowWidth:[],rowHeight:[],width:0,height:x,verticalPadding:T,horizontalPadding:C};w.sort(function(A,I){return A.rect.width*A.rect.height>I.rect.width*I.rect.height?-1:A.rect.width*A.rect.height<I.rect.width*I.rect.height?1:0});for(var L=0;L<w.length;L++){var O=w[L];D.rows.length==0?this.insertNodeToRow(D,O,0,x):this.canAddHorizontal(D,O.rect.width,O.rect.height)?this.insertNodeToRow(D,O,this.getShortestRowIndex(D),x):this.insertNodeToRow(D,O,D.rows.length,x),this.shiftToLastRow(D)}return D},E.prototype.insertNodeToRow=function(w,x,T,C){var D=C;if(T==w.rows.length){var L=[];w.rows.push(L),w.rowWidth.push(D),w.rowHeight.push(0)}var O=w.rowWidth[T]+x.rect.width;w.rows[T].length>0&&(O+=w.horizontalPadding),w.rowWidth[T]=O,w.width<O&&(w.width=O);var A=x.rect.height;T>0&&(A+=w.verticalPadding);var I=0;A>w.rowHeight[T]&&(I=w.rowHeight[T],w.rowHeight[T]=A,I=w.rowHeight[T]-I),w.height+=I,w.rows[T].push(x)},E.prototype.getShortestRowIndex=function(w){for(var x=-1,T=Number.MAX_VALUE,C=0;C<w.rows.length;C++)w.rowWidth[C]<T&&(x=C,T=w.rowWidth[C]);return x},E.prototype.getLongestRowIndex=function(w){for(var x=-1,T=Number.MIN_VALUE,C=0;C<w.rows.length;C++)w.rowWidth[C]>T&&(x=C,T=w.rowWidth[C]);return x},E.prototype.canAddHorizontal=function(w,x,T){var C=this.getShortestRowIndex(w);if(C<0)return!0;var D=w.rowWidth[C];if(D+w.horizontalPadding+x<=w.width)return!0;var L=0;w.rowHeight[C]<T&&C>0&&(L=T+w.verticalPadding-w.rowHeight[C]);var O;w.width-D>=x+w.horizontalPadding?O=(w.height+L)/(D+x+w.horizontalPadding):O=(w.height+L)/w.width,L=T+w.verticalPadding;var A;return w.width<x?A=(w.height+L)/x:A=(w.height+L)/w.width,A<1&&(A=1/A),O<1&&(O=1/O),O<A},E.prototype.shiftToLastRow=function(w){var x=this.getLongestRowIndex(w),T=w.rowWidth.length-1,C=w.rows[x],D=C[C.length-1],L=D.width+w.horizontalPadding;if(w.width-w.rowWidth[T]>L&&x!=T){C.splice(-1,1),w.rows[T].push(D),w.rowWidth[x]=w.rowWidth[x]-L,w.rowWidth[T]=w.rowWidth[T]+L,w.width=w.rowWidth[instance.getLongestRowIndex(w)];for(var O=Number.MIN_VALUE,A=0;A<C.length;A++)C[A].height>O&&(O=C[A].height);x>0&&(O+=w.verticalPadding);var I=w.rowHeight[x]+w.rowHeight[T];w.rowHeight[x]=O,w.rowHeight[T]<D.height+w.verticalPadding&&(w.rowHeight[T]=D.height+w.verticalPadding);var M=w.rowHeight[x]+w.rowHeight[T];w.height+=M-I,this.shiftToLastRow(w)}},E.prototype.tilingPreLayout=function(){u.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},E.prototype.tilingPostLayout=function(){u.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},E.prototype.reduceTrees=function(){for(var w=[],x=!0,T;x;){var C=this.graphManager.getAllNodes(),D=[];x=!1;for(var L=0;L<C.length;L++)T=C[L],T.getEdges().length==1&&!T.getEdges()[0].isInterGraph&&T.getChild()==null&&(D.push([T,T.getEdges()[0],T.getOwner()]),x=!0);if(x==!0){for(var O=[],A=0;A<D.length;A++)D[A][0].getEdges().length==1&&(O.push(D[A]),D[A][0].getOwner().remove(D[A][0]));w.push(O),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=w},E.prototype.growTree=function(w){for(var x=w.length,T=w[x-1],C,D=0;D<T.length;D++)C=T[D],this.findPlaceforPrunedNode(C),C[2].add(C[0]),C[2].add(C[1],C[1].source,C[1].target);w.splice(w.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},E.prototype.findPlaceforPrunedNode=function(w){var x,T,C=w[0];C==w[1].source?T=w[1].target:T=w[1].source;var D=T.startX,L=T.finishX,O=T.startY,A=T.finishY,I=0,M=0,P=0,R=0,k=[I,P,M,R];if(O>0)for(var B=D;B<=L;B++)k[0]+=this.grid[B][O-1].length+this.grid[B][O].length-1;if(L<this.grid.length-1)for(var B=O;B<=A;B++)k[1]+=this.grid[L+1][B].length+this.grid[L][B].length-1;if(A<this.grid[0].length-1)for(var B=D;B<=L;B++)k[2]+=this.grid[B][A+1].length+this.grid[B][A].length-1;if(D>0)for(var B=O;B<=A;B++)k[3]+=this.grid[D-1][B].length+this.grid[D][B].length-1;for(var F=m.MAX_VALUE,U,V,G=0;G<k.length;G++)k[G]<F?(F=k[G],U=1,V=G):k[G]==F&&U++;if(U==3&&F==0)k[0]==0&&k[1]==0&&k[2]==0?x=1:k[0]==0&&k[1]==0&&k[3]==0?x=0:k[0]==0&&k[2]==0&&k[3]==0?x=3:k[1]==0&&k[2]==0&&k[3]==0&&(x=2);else if(U==2&&F==0){var $=Math.floor(Math.random()*2);k[0]==0&&k[1]==0?$==0?x=0:x=1:k[0]==0&&k[2]==0?$==0?x=0:x=2:k[0]==0&&k[3]==0?$==0?x=0:x=3:k[1]==0&&k[2]==0?$==0?x=1:x=2:k[1]==0&&k[3]==0?$==0?x=1:x=3:$==0?x=2:x=3}else if(U==4&&F==0){var $=Math.floor(Math.random()*4);x=$}else x=V;x==0?C.setCenter(T.getCenterX(),T.getCenterY()-T.getHeight()/2-h.DEFAULT_EDGE_LENGTH-C.getHeight()/2):x==1?C.setCenter(T.getCenterX()+T.getWidth()/2+h.DEFAULT_EDGE_LENGTH+C.getWidth()/2,T.getCenterY()):x==2?C.setCenter(T.getCenterX(),T.getCenterY()+T.getHeight()/2+h.DEFAULT_EDGE_LENGTH+C.getHeight()/2):C.setCenter(T.getCenterX()-T.getWidth()/2-h.DEFAULT_EDGE_LENGTH-C.getWidth()/2,T.getCenterY())},e.exports=E},function(e,r,a){"use strict";var n={};n.layoutBase=a(0),n.CoSEConstants=a(1),n.CoSEEdge=a(2),n.CoSEGraph=a(3),n.CoSEGraphManager=a(4),n.CoSELayout=a(6),n.CoSENode=a(5),e.exports=n}])})});var sl=Gn((Fa,_i)=>{"use strict";f(function(e,r){typeof Fa=="object"&&typeof _i=="object"?_i.exports=r($i()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof Fa=="object"?Fa.cytoscapeCoseBilkent=r($i()):e.cytoscapeCoseBilkent=r(e.coseBase)},"webpackUniversalModuleDefinition")(Fa,function(t){return function(e){var r={};function a(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,a),i.l=!0,i.exports}return f(a,"__webpack_require__"),a.m=e,a.c=r,a.i=function(n){return n},a.d=function(n,i,s){a.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:s})},a.n=function(n){var i=n&&n.__esModule?f(function(){return n.default},"getDefault"):f(function(){return n},"getModuleExports");return a.d(i,"a",i),i},a.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},a.p="",a(a.s=1)}([function(e,r){e.exports=t},function(e,r,a){"use strict";var n=a(0).layoutBase.LayoutConstants,i=a(0).layoutBase.FDLayoutConstants,s=a(0).CoSEConstants,o=a(0).CoSELayout,l=a(0).CoSENode,u=a(0).layoutBase.PointD,h=a(0).layoutBase.DimensionD,c={ready:f(function(){},"ready"),stop:f(function(){}
vendor: 4,654 bytes, line 1
1,"stop"),quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function v(y,p){var b={};for(var E in y)b[E]=y[E];for(var E in p)b[E]=p[E];return b}f(v,"extend");function d(y){this.options=v(c,y),g(this.options)}f(d,"_CoSELayout");var g=f(function(p){p.nodeRepulsion!=null&&(s.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=p.nodeRepulsion),p.idealEdgeLength!=null&&(s.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=p.idealEdgeLength),p.edgeElasticity!=null&&(s.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=p.edgeElasticity),p.nestingFactor!=null&&(s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=p.nestingFactor),p.gravity!=null&&(s.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=p.gravity),p.numIter!=null&&(s.MAX_ITERATIONS=i.MAX_ITERATIONS=p.numIter),p.gravityRange!=null&&(s.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=p.gravityRange),p.gravityCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=p.gravityCompound),p.gravityRangeCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=p.gravityRangeCompound),p.initialEnergyOnIncremental!=null&&(s.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=p.initialEnergyOnIncremental),p.quality=="draft"?n.QUALITY=0:p.quality=="proof"?n.QUALITY=2:n.QUALITY=1,s.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=p.nodeDimensionsIncludeLabels,s.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=!p.randomize,s.ANIMATE=i.ANIMATE=n.ANIMATE=p.animate,s.TILE=p.tile,s.TILING_PADDING_VERTICAL=typeof p.tilingPaddingVertical=="function"?p.tilingPaddingVertical.call():p.tilingPaddingVertical,s.TILING_PADDING_HORIZONTAL=typeof p.tilingPaddingHorizontal=="function"?p.tilingPaddingHorizontal.call():p.tilingPaddingHorizontal},"getUserOptions");d.prototype.run=function(){var y,p,b=this.options,E=this.idToLNode={},S=this.layout=new o,w=this;w.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var x=S.newGraphManager();this.gm=x;var T=this.options.eles.nodes(),C=this.options.eles.edges();this.root=x.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(T),S);for(var D=0;D<C.length;D++){var L=C[D],O=this.idToLNode[L.data("source")],A=this.idToLNode[L.data("target")];if(O!==A&&O.getEdgesBetween(A).length==0){var I=x.add(S.newEdge(),O,A);I.id=L.id()}}var M=f(function(k,B){typeof k=="number"&&(k=B);var F=k.data("id"),U=w.idToLNode[F];return{x:U.getRect().getCenterX(),y:U.getRect().getCenterY()}},"getPositions"),P=f(function R(){for(var k=f(function(){b.fit&&b.cy.fit(b.eles,b.padding),y||(y=!0,w.cy.one("layoutready",b.ready),w.cy.trigger({type:"layoutready",layout:w}))},"afterReposition"),B=w.options.refresh,F,U=0;U<B&&!F;U++)F=w.stopped||w.layout.tick();if(F){S.checkLayoutSuccess()&&!S.isSubLayout&&S.doPostLayout(),S.tilingPostLayout&&S.tilingPostLayout(),S.isLayoutFinished=!0,w.options.eles.nodes().positions(M),k(),w.cy.one("layoutstop",w.options.stop),w.cy.trigger({type:"layoutstop",layout:w}),p&&cancelAnimationFrame(p),y=!1;return}var V=w.layout.getPositionsData();b.eles.nodes().positions(function(G,$){if(typeof G=="number"&&(G=$),!G.isParent()){for(var j=G.id(),Q=V[j],H=G;Q==null&&(Q=V[H.data("parent")]||V["DummyCompound_"+H.data("parent")],V[j]=Q,H=H.parent()[0],H!=null););return Q!=null?{x:Q.x,y:Q.y}:{x:G.position("x"),y:G.position("y")}}}),k(),p=requestAnimationFrame(R)},"iterateAnimated");return S.addListener("layoutstarted",function(){w.options.animate==="during"&&(p=requestAnimationFrame(P))}),S.runLayout(),this.options.animate!=="during"&&(w.options.eles.nodes().not(":parent").layoutPositions(w,w.options,M),y=!1),this},d.prototype.getTopMostNodes=function(y){for(var p={},b=0;b<y.length;b++)p[y[b].id()]=!0;var E=y.filter(function(S,w){typeof S=="number"&&(S=w);for(var x=S.parent()[0];x!=null;){if(p[x.id()])return!1;x=x.parent()[0]}return!0});return E},d.prototype.processChildrenList=function(y,p,b){for(var E=p.length,S=0;S<E;S++){var w=p[S],x=w.children(),T,C=w.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(w.outerWidth()!=null&&w.outerHeight()!=null?T=y.add(new l(b.graphManager,new u(w.position("x")-C.w/2,w.position("y")-C.h/2),new h(p
vendor: 6,965 bytes, lines 1-3
1arseFloat(C.w),parseFloat(C.h)))):T=y.add(new l(this.graphManager)),T.id=w.data("id"),T.paddingLeft=parseInt(w.css("padding")),T.paddingTop=parseInt(w.css("padding")),T.paddingRight=parseInt(w.css("padding")),T.paddingBottom=parseInt(w.css("padding")),this.options.nodeDimensionsIncludeLabels&&w.isParent()){var D=w.boundingBox({includeLabels:!0,includeNodes:!1}).w,L=w.boundingBox({includeLabels:!0,includeNodes:!1}).h,O=w.css("text-halign");T.labelWidth=D,T.labelHeight=L,T.labelPos=O}if(this.idToLNode[w.data("id")]=T,isNaN(T.rect.x)&&(T.rect.x=0),isNaN(T.rect.y)&&(T.rect.y=0),x!=null&&x.length>0){var A;A=b.getGraphManager().add(b.newGraph(),T),this.processChildrenList(A,x,b)}}},d.prototype.stop=function(){return this.stopped=!0,this};var m=f(function(p){p("layout","cose-bilkent",d)},"register");typeof cytoscape<"u"&&m(cytoscape),e.exports=m}])})});var zn=function(){var t=f(function(S,w,x,T){for(x=x||{},T=S.length;T--;x[S[T]]=w);return x},"o"),e=[1,4],r=[1,13],a=[1,12],n=[1,15],i=[1,16],s=[1,20],o=[1,19],l=[6,7,8],u=[1,26],h=[1,24],c=[1,25],v=[6,7,11],d=[1,6,13,15,16,19,22],g=[1,33],m=[1,34],y=[1,6,7,11,13,15,16,19,22],p={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:f(function(w,x,T,C,D,L,O){var A=L.length-1;switch(D){case 6:case 7:return C;case 8:C.getLogger().trace("Stop NL ");break;case 9:C.getLogger().trace("Stop EOF ");break;case 11:C.getLogger().trace("Stop NL2 ");break;case 12:C.getLogger().trace("Stop EOF2 ");break;case 15:C.getLogger().info("Node: ",L[A].id),C.addNode(L[A-1].length,L[A].id,L[A].descr,L[A].type);break;case 16:C.getLogger().trace("Icon: ",L[A]),C.decorateNode({icon:L[A]});break;case 17:case 21:C.decorateNode({class:L[A]});break;case 18:C.getLogger().trace("SPACELIST");break;case 19:C.getLogger().trace("Node: ",L[A].id),C.addNode(0,L[A].id,L[A].descr,L[A].type);break;case 20:C.decorateNode({icon:L[A]});break;case 25:C.getLogger().trace("node found ..",L[A-2]),this.$={id:L[A-1],descr:L[A-1],type:C.getType(L[A-2],L[A])};break;case 26:this.$={id:L[A],descr:L[A],type:C.nodeType.DEFAULT};break;case 27:C.getLogger().trace("node found ..",L[A-3]),this.$={id:L[A-3],descr:L[A-1],type:C.getType(L[A-2],L[A])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:a,14:14,15:n,16:i,17:17,18:18,19:s,22:o},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:a,14:14,15:n,16:i,17:17,18:18,19:s,22:o},{6:r,9:22,12:11,13:a,14:14,15:n,16:i,17:17,18:18,19:s,22:o},{6:u,7:h,10:23,11:c},t(v,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:o}),t(v,[2,18]),t(v,[2,19]),t(v,[2,20]),t(v,[2,21]),t(v,[2,23]),t(v,[2,24]),t(v,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:h,10:32,11:c},{1:[2,7],6:r,12:21,13:a,14:14,15:n,16:i,17:17,18:18,19:s,22:o},t(d,[2,14],{7:g,11:m}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(v,[2,15]),t(v,[2,16]),t(v,[2,17]),{20:[1,35]},{21:[1,36]},t(d,[2,13],{7:g,11:m}),t(y,[2,11]),t(y,[2,12]),{21:[1,37]},t(v,[2,25]),t(v,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:f(function(w,x){if(x.recoverable)this.trace(w);else{var T=new Error(w);throw T.hash=x,T}},"parseError"),parse:f(function(w){var x=this,T=[0],C=[],D=[null],L=[],O=this.table,A="",I=0,M=0,P=0,R=2,k=1,B=L.slice.call(arguments,1),F=Object.create(this.lexer),U={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(U.yy[V]=this.yy[V]);F.setInput(w,U.yy),U.yy.lexer=F,U.yy.parser=this,typeof F.yylloc>"u"&&(F.yylloc={});var G=F.yylloc;L.push(G);var $=F.options&&F.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(ue){T.length=T.length-2*ue,D.length=D.length-ue,L.length=L.length-ue}f(j,"popStack");function Q(){var ue;return ue=C.pop()||F.lex()||k,typeof ue!="number"&&(ue instanceof Array&&(C=ue,ue=C.pop()),ue=x.symbols_[ue]||ue),ue}f(Q,"lex");for(var H,te,_,z,Z,K,ie={},de,re,se,le;;){if(_=T[T.length-1],this.defaultActions[_]?z=this.defaultActions[_]:((H===null||typeof H>"u")&&(H=Q()),z=O[_]&&O[_][H]),typeof z>"u"||!z.length||!z[0]){var ce="";le=[];for(de in O[_])this.terminals_[de]&&de>R&&le.push("'"+this.terminals_[de]+"'");F.showPosition?ce="Parse error on line "+(I+1)+`: 2`+F.showPosition()+` 3Expecting `+le.join(", ")+", got '"+(this.terminals_[H]||H)+"'":ce="Parse error on line "+(I+1)+": Unexpected "+(H==k?"end of input":"'"+(this.terminals_[H]||H)+"'"),this.parseError(ce,{text:F.match,token:this.terminals_[H]||H,line:F.yylineno,loc:G,expected:le})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+H);switch(z[0]){case 1:T.push(H),D.push(F.yytext),L.push(F.yylloc),T.push(z[1]),H=null,te?(H=te,te=null):(M=F.yyleng,A=F.yytext,I=F.yylineno,G=F.yylloc,P>0&&P--);break;case 2:if(re=this.productions_[z[1]][1],ie.$=D[D.length-re],ie._$={first_line:L[L.length-(re||1)].first_line,last_line:L[L.length-1].last_line,first_column:L[L.length-(re||1)].first_column,last_column:L[L.length-1].last_column},$&&(ie._$.range=[L[L.length-(re||1)].range[0],L[L.length-1].range[1]]),K=this.performAction.apply(ie,[A,M,I,U.yy,z[1],D,L].concat(B)),typeof K<"u")return K;re&&(T=T.slice(0,-1*re*2),D=D.slice(0,-1*re),L=L.slice(0,-1*re)),T.push(this.productions_[z[1]][0]),D.push(ie.$),L.push(ie._$),se=O[T[T.length-2]][T[T.length-1]],T.push(se);break;case 3:return!0}}return!0},"parse")},b=function(){var S={EOF:1,parseError:f(function(x,T){if(this.yy.parser)this.yy.parser.parseError(x,T);else throw new Error(x)},"parseError"),setInput:f(function(w,x){return this.yy=x||this.yy||{},this._input=w,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var x=w.match(/(?:\r\n?|\n).*/g);return x?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},"input"),unput:f(function(w){var x=w.length,T=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;
vendor: 5,400 bytes, lines 3-6
3var C=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),T.length-1&&(this.yylineno-=T.length-1);var D=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:T?(T.length===C.length?this.yylloc.first_column:0)+C[C.length-T.length].length-T[0].length:this.yylloc.first_column-x},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-x]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). 4`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(w){this.unput(this.match.slice(w))},"less"),pastInput:f(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var w=this.pastInput(),x=new Array(w.length+1).join("-");return w+this.upcomingInput()+` 5`+x+"^"},"showPosition"),test_match:f(function(w,x){var T,C,D;if(this.options.backtrack_lexer&&(D={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(D.yylloc.range=this.yylloc.range.slice(0))),C=w[0].match(/(?:\r\n?|\n).*/g),C&&(this.yylineno+=C.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:C?C[C.length-1].length-C[C.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+w[0].length},this.yytext+=w[0],this.match+=w[0],this.matches=w,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(w[0].length),this.matched+=w[0],T=this.performAction.call(this,this.yy,this,x,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),T)return T;if(this._backtrack){for(var L in D)this[L]=D[L];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,x,T,C;this._more||(this.yytext="",this.match="");for(var D=this._currentRules(),L=0;L<D.length;L++)if(T=this._input.match(this.rules[D[L]]),T&&(!x||T[0].length>x[0].length)){if(x=T,C=L,this.options.backtrack_lexer){if(w=this.test_match(T,D[L]),w!==!1)return w;if(this._backtrack){x=!1;continue}else return!1}else if(!this.options.flex)break}return x?(w=this.test_match(x,D[C]),w!==!1?w:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. 6`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(function(){var x=this.next();return x||this.lex()},"lex"),begin:f(function(x){this.conditionStack.push(x)},"begin"),popState:f(function(){var x=this.conditionStack.length-1;return x>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:f(function(x){return x=this.conditionStack.length-1-Math.abs(x||0),x>=0?this.conditionStack[x]:"INITIAL"},"topState"),pushState:f(function(x){this.begin(x)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(x,T,C,D){var L=D;switch(C){case 0:return x.getLogger().trace("Found comment",T.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:x.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return x.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:x.getLogger().trace("end icon"),this.popState();break;case 10:return x.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return x.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return x.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return x.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:x.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;
vendor: 30,040 bytes, lines 6-8
6case 25:return x.getLogger().trace("description:",T.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),x.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),x.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),x.getLogger().trace("node end ...",T.yytext),"NODE_DEND";break;case 30:return this.popState(),x.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),x.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),x.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),x.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),x.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return x.getLogger().trace("Long description:",T.yytext),20;break;case 36:return x.getLogger().trace("Long description:",T.yytext),20;break}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return S}();p.lexer=b;function E(){this.yy={}}return f(E,"Parser"),E.prototype=p,p.Parser=E,new E}();zn.parser=zn;var as=zn;var Lt=[],ns=0,Vn={},Cl=f(()=>{Lt=[],ns=0,Vn={}},"clear"),Dl=f(function(t){for(let e=Lt.length-1;e>=0;e--)if(Lt[e].level<t)return Lt[e];return null},"getParent"),Sl=f(()=>Lt.length>0?Lt[0]:null,"getMindmap"),Ll=f((t,e,r,a)=>{Yt.info("addNode",t,e,r,a);let n=ra(),i=n.mindmap?.padding??Sr.mindmap.padding;switch(a){case _e.ROUNDED_RECT:case _e.RECT:case _e.HEXAGON:i*=2}let s={id:ns++,nodeId:ta(e,n),level:t,descr:ta(r,n),type:a,children:[],width:n.mindmap?.maxNodeWidth??Sr.mindmap.maxNodeWidth,padding:i},o=Dl(t);if(o)o.children.push(s),Lt.push(s);else if(Lt.length===0)Lt.push(s);else throw new Error('There can be only one root. No parent could be found for ("'+s.descr+'")')},"addNode"),_e={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Al=f((t,e)=>{switch(Yt.debug("In get type",t,e),t){case"[":return _e.RECT;case"(":return e===")"?_e.ROUNDED_RECT:_e.CLOUD;case"((":return _e.CIRCLE;case")":return _e.CLOUD;case"))":return _e.BANG;case"{{":return _e.HEXAGON;default:return _e.DEFAULT}},"getType"),Ol=f((t,e)=>{Vn[t]=e},"setElementForId"),Ml=f(t=>{if(!t)return;let e=ra(),r=Lt[Lt.length-1];t.icon&&(r.icon=ta(t.icon,e)),t.class&&(r.class=ta(t.class,e))},"decorateNode"),Nl=f(t=>{switch(t){case _e.DEFAULT:return"no-border";case _e.RECT:return"rect";case _e.ROUNDED_RECT:return"rounded-rect";case _e.CIRCLE:return"circle";case _e.CLOUD:return"cloud";case _e.BANG:return"bang";case _e.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Il=f(()=>Yt,"getLogger"),kl=f(t=>Vn[t],"getElementById"),Rl={clear:Cl,addNode:Ll,getMindmap:Sl,nodeType:_e,getType:Al,setElementForId:Ol,decorateNode:Ml,type2Str:Nl,getLogger:Il,getElementById:kl},is=Rl;function qe(t){"@babel/helpers - typeof";return qe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe(t)}f(qe,"_typeof");function pi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}f(pi,"_classCallCheck");function ss(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}f(ss,"_defineProperties");function yi(t,e,r){return e&&ss(t.prototype,e),r&&ss(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}f(yi,"_createClass");function wo(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}f(wo,"_defineProperty$1");function At(t,e){return Pl(t)||Bl(t,e)||xo(t,e)||Fl()}f(At,"_slicedToArray");function Pl(t){if(Array.isArray(t))return t}f(Pl,"_arrayWithHoles");function Bl(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var a=[],n=!0,i=!1,s,o;try{for(r=r.call(t);!(n=(s=r.next()).done)&&(a.push(s.value),!(e&&a.length===e));n=!0);}catch(l){i=!0,o=l}finally{try{!n&&r.return!=null&&r.return()}finally{if(i)throw o}}return a}}f(Bl,"_iterableToArrayLimit");function xo(t,e){if(t){if(typeof t=="string")return os(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return os(t,e)}}f(xo,"_unsupportedIterableToArray");function os(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,a=new Array(e);r<e;r++)a[r]=t[r];return a}f(os,"_arrayLikeToArray");function Fl(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 7In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}f(Fl,"_nonIterableRest");function To(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=xo(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var a=0,n=f(function(){},"F");return{s:n,n:f(function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},"n"),e:f(function(l){throw l},"e"),f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. 8In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,s=!1,o;return{s:f(function(){r=r.call(t)},"s"),n:f(function(){var l=r.next();return i=l.done,l},"n"),e:f(function(l){s=!0,o=l},"e"),f:f(function(){try{!i&&r.return!=null&&r.return()}finally{if(s)throw o}},"f")}}f(To,"_createForOfIteratorHelper");var He=typeof window>"u"?null:window,us=He?He.navigator:null;He&&He.document;var Gl=qe(""),Co=qe({}),zl=qe(function(){}),Vl=typeof HTMLElement>"u"?"undefined":qe(HTMLElement),Sa=f(function(e){return e&&e.instanceString&&ze(e.instanceString)?e.instanceString():null},"instanceStr"),ge=f(function(e){return e!=null&&qe(e)==Gl},"string"),ze=f(function(e){return e!=null&&qe(e)===zl},"fn"),Re=f(function(e){return!yt(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},"array"),De=f(function(e){return e!=null&&qe(e)===Co&&!Re(e)&&e.constructor===Object},"plainObject"),Ul=f(function(e){return e!=null&&qe(e)===Co},"object"),oe=f(function(e){return e!=null&&qe(e)===qe(1)&&!isNaN(e)},"number"),Yl=f(function(e){return oe(e)&&Math.floor(e)===e},"integer"),on=f(function(e){if(Vl!=="undefined")return e!=null&&e instanceof HTMLElement},"htmlElement"),yt=f(function(e){return La(e)||Do(e)},"elementOrCollection"),La=f(function(e){return Sa(e)==="collection"&&e._private.single},"element"),Do=f(function(e){return Sa(e)==="collection"&&!e._private.single},"collection"),mi=f(function(e){return Sa(e)==="core"},"core"),So=f(function(e){return Sa(e)==="stylesheet"},"stylesheet"),$l=f(function(e){return Sa(e)==="event"},"event"),rr=f(function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},"emptyString"),_l=f(function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},"domElement"),Hl=f(function(e){return De(e)&&oe(e.x1)&&oe(e.x2)&&oe(e.y1)&&oe(e.y2)},"boundingBox"),Xl=f(function(e){return Ul(e)&&ze(e.then)},"promise"),ql=f(function(){return us&&us.userAgent.match(/msie|trident|edge/i)},"ms"),ga=f(function(e,r){r||(r=f(function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],s=0;s<arguments.length;s++)i.push(arguments[s]);return i.join("$")},"keyFn"));var a=f(function n(){var i=this,s=arguments,o,l=r.apply(i,s),u=n.cache;return(o=u[l])||(o=u[l]=e.apply(i,s)),o},"memoizedFn");return a.cache={},a},"memoize"),bi=ga(function(t){return t.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),mn=ga(function(t){return t.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),Lo=ga(function(t,e){return t+e[0].toUpperCase()+e.substring(1)},function(t,e){return t+"$"+e}),ls=f(function(e){return rr(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},"capitalize"),Xe="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",Wl="rgb[a]?\\(("+Xe+"[%]?)\\s*,\\s*("+Xe+"[%]?)\\s*,\\s*("+Xe+"[%]?)(?:\\s*,\\s*("+Xe+"))?\\)",Kl="rgb[a]?\\((?:"+Xe+"[%]?)\\s*,\\s*(?:"+Xe+"[%]?)\\s*,\\s*(?:"+Xe+"[%]?)(?:\\s*,\\s*(?:"+Xe+"))?\\)",Zl="hsl[a]?\\(("+Xe+")\\s*,\\s*("+Xe+"[%])\\s*,\\s*("+Xe+"[%])(?:\\s*,\\s*("+Xe+"))?\\)",Ql="hsl[a]?\\((?:"+Xe+")\\s*,\\s*(?:"+Xe+"[%])\\s*,\\s*(?:"+Xe+"[%])(?:\\s*,\\s*(?:"+Xe+"))?\\)",Jl="\\#[0-9a-fA-F]{3}",jl="\\#[0-9a-fA-F]{6}",Ao=f(function(e,r){return e<r?-1:e>r?1:0},"ascending"),ef=f(function(e,r){return-1*Ao(e,r)},"descending"),Ee=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r<e.length;r++){var a=e[r];if(a!=null)for(var n=Object.keys(a),i=0;i<n.length;i++){var s=n[i];t[s]=a[s]}}return t},tf=f(function(e){if(!(!(e.length===4||e.length===7)||e[0]!=="#")){var r=e.length===4,a,n,i,s=16;return r?(a=parseInt(e[1]+e[1],s),n=parseInt(e[2]+e[2],s),i=parseInt(e[3]+e[3],s)):(a=parseInt(e[1]+e[2],s),n=parseInt(e[3]+e[4],s),i=parseInt(e[5]+e[6],s)),[a,n,i]}},"hex2tuple"),rf=f(function(e){var r,a,n,i,s,o,l,u;function h(g,m,y){return y<0&&(y+=1),y>1&&(y-=1),y<1/6?g+(m-g)*6*y:y<1/2?m:y<2/3?g+(m-g)*(2/3-y)*6:g}f(h,"hue2rgb");var c=new RegExp("^"+Zl+"$").exec(e);if(c){if(a=parseInt(c[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,n=parseFloat(c[2]),n<0||n>100||(n=n/100,i=parseFloat(c[3]),i<0||i>100)||(i=i/100,s=c[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(n===0)o=l=u=Math.round(i*255);else{var v=i<.5?i*(1+n):i+n-i*n,d=2*i-v;o=Math.round(255*h(d,v,a+1/3)),l=Math.round(255*h(d,v,a)),u=Math.round(255*h(d,v,a-1/3))}r=[o,l,u,s]}return r},"hsl2tuple"),af=f(function(e){var r,a=new RegExp("^"+Wl+"$").exec(e);if(a){r=[];for(var n=[],i=1;i<=3;i++){var s=a[i];if(s[s.length-1]==="%"&&(n[i]=!0),s=parseFloat(s),n[i]&&(s=s/100*255),s<0||s>255)return;r.push(Math.floor(s))}var o=n[1]||n[2]||n[3],l=n[1]&&n[2]&&n[3];if(o&&!l)return;var u=a[4];if(u!==void 0){if(u=parseFloat(u),u<0||u>1)return;r.push(u)}}return r},"rgb2tuple"),nf=f(function(e){return of[e.toLowerCase()]},"colorname2tuple"),sf=f(function(e){return(Re(e)?e:null)||nf(e)||tf(e)||af(e)||rf(e)},"color2tuple"),of={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]},Oo=f(function(e){for(var r=e.map,a=e.keys,n=a.length,i=0;i<n;i++){var s=a[i];if(De(s))throw Error("Tried to set map with object key");i<a.length-1?(r[s]==null&&(r[s]={}),r=r[s]):r[s]=e.value}},"setMap"),Mo=f(function(e){for(var r=e.map,a=e.keys,n=a.length,i=0;i<n;i++){var s=a[i];if(De(s))throw Error("Tried to get map with object key");if(r=r[s],r==null)return r}return r},"getMap");function uf(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}f(uf,"isObject");var pr=uf,ua=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lf(t,e){return e={exports:{}},t(e,e.exports),e.exports}f(lf,"createCommonjsModule");var ff=typeof ua=="object"&&ua&&ua.Object===Object&&ua,hf=ff,cf=typeof self=="object"&&self&&self.Object===Object&&self,vf=hf||cf||Function("return this")(),bn=vf,df=f(function(){return bn.Date.now()},"now"),Un=df,gf=/\s/;function pf(t){for(var e=t.length;e--&&gf.test(t.charAt(e)););return e}f(pf,"trimmedEndIndex");var yf=pf,mf=/^\s+/;function bf(t){return t&&t.slice(0,yf(t)+1).replace(mf,"")}f(bf,"baseTrim");var Ef=bf,wf=bn.Symbol,zr=wf,No=Object.prototype,xf=No.hasOwnProperty,Tf=No.toString,aa=zr?zr.toStringTag:void 0;function Cf(t){var e=xf.call(t,aa),r=t[aa];try{t[aa]=void 0;var a=!0}catch{}var n=Tf.call(t);return a&&(e?t[aa]=r:delete t[aa]),n}f(Cf,"getRawTag");var Df=Cf,Sf=Object.prototype,Lf=Sf.toString;function Af(t){return Lf.call(t)}f(Af,"objectToString");var Of=Af,Mf="[object Null]",Nf="[object Undefined]",fs=zr?zr.toStringTag:void 0;function If(t){return t==null?t===void 0?Nf:Mf:fs&&fs in Object(t)?Df(t):Of(t)}f(If,"baseGetTag");var Io=If;function kf(t){return t!=null&&typeof t=="object"}f(kf,"isObjectLike");var Rf=kf,Pf="[object Symbol]";function Bf(t){return typeof t=="symbol"||Rf(t)&&Io(t)==Pf}f(Bf,"isSymbol");var Aa=Bf,hs=NaN,Ff=/^[-+]0x[0-9a-f]+$/i,Gf=/^0b[01]+$/i,zf=/^0o[0-7]+$/i,Vf=parseInt;function Uf(t){if(typeof t=="number")return t;if(Aa(t))return hs;if(pr(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=pr(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Ef(t);var r=Gf.test(t);return r||zf.test(t)?Vf(t.slice(2),r?2:8):Ff.test(t)?hs:+t}f(Uf,"toNumber");var cs=Uf,Yf="Expected a function",$f=Math.max,_f=Math.min;function Hf(t,e,r){var a,n,i,s,o,l,u=0,h=!1,c=!1,v=!0;if(typeof t!="function")throw new TypeError(Yf);e=cs(e)||0,pr(r)&&(h=!!r.leading,c="maxWait"in r,i=c?$f(cs(r.maxWait)||0,e):i,v="trailing"in r?!!r.trailing:v);function d(x){var T=a,C=n;return a=n=void 0,u=x,s=t.apply(C,T),s}f(d,"invokeFunc");function g(x){return u=x,o=setTimeout(p,e),h?d(x):s}f(g,"leadingEdge");function m(x){var T=x-l,C=x-u,D=e-T;return c?_f(D,i-C):D}f(m,"remainingWait");function y(x){var T=x-l,C=x-u;return l===void 0||T>=e||T<0||c&&C>=i}f(y,"shouldInvoke");function p(){var x=Un();if(y(x))return b(x);o=setTimeout(p,m(x))}f(p,"timerExpired");function b(x){return o=void 0,v&&a?d(x):(a=n=void 0,s)}f(b,"trailingEdge");function E(){o!==void 0&&clearTimeout(o),u=0,a=l=n=o=void 0}f(E,"cancel");function S(){return o===void 0?s:b(Un())}f(S,"flush");function w(){var x=Un(),T=y(x);if(a=arguments,n=this,l=x,T){if(o===void 0)return g(l);if(c)return clearTimeout(o),o=setTimeout(p,e),d(l)}return o===void 0&&(o=setTimeout(p,e)),s}return f(w,"debounced"),w.cancel=E,w.flush=S,w}f(Hf,"debounce");var En=Hf,Yn=He?He.performance:null,ko=Yn&&Yn.now?function(){return Yn.now()}:function(){return Date.now()},Xf=function(){if(He){if(He.requestAnimationFrame)return function(t){He.requestAnimationFrame(t)};if(He.mozRequestAnimationFrame)return function(t){He.mozRequestAnimationFrame(t)};if(He.webkitRequestAnimationFrame)return function(t){He.webkitRequestAnimationFrame(t)};if(He.msRequestAnimationFrame)return function(t){He.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(ko())},1e3/60)}}(),un=f(function(e){return Xf(e)},"requestAnimationFrame"),_t=ko,Ir=9261,Ro=65599,la=5381,Po=f(function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ir,a=r,n;n=e.next(),!n.done;)a=a*Ro+n.value|0;return a},"hashIterableInts"),pa=f(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ir;return r*Ro+e|0},"hashInt"),ya=f(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:la;return(r<<5)+r+e|0},"hashIntAlt"),qf=f(function(e,r){return e*2097152+r},"combineHashes"),Zt=f(function(e){return e[0]*2097152+e[1]},"combineHashesArray"),za=f(function(e,r){return[pa(e[0],r[0]),ya(e[1],r[1])]},"hashArrays"),Wf=f(function(e,r){var a={value:0,done:!1},n=0,i=e.length,s={next:f(function(){return n<i?a.value=e[n++]:a.done=!0,a},"next")};return Po(s,r)},"hashIntsArray"),yr=f(function(e,r){var a={value:0,done:!1},n=0,i=e.length,s={next:f(function(){return n<i?a.value=e.charCodeAt(n++):a.done=!0,a},"next")};return Po(s,r)},"hashString"),Bo=f(function(){return Kf(arguments)},"hashStrings"),Kf=f(function(e){for(var r,a=0;a<e.length;a++){var n=e[a];a===0?r=yr(n):r=yr(n,r)}return r},"hashStringsArray"),vs=!0,Zf=console.warn!=null,Qf=console.trace!=null,Ei=Number.MAX_SAFE_INTEGER||9007199254740991,Fo=f(function(){return!0},"trueify"),ln=f(function(){return!1},"falsify"),ds=f(function(){return 0},"zeroify"),wi=f(function(){},"noop"),Ve=f(function(e){throw new Error(e)},"error"),Go=f(function(e){if(e!==void 0)vs=!!e;else return vs},"warnings"),Ne=f(function(e){Go()&&(Zf?console.warn(e):(console.log(e),Qf&&console.trace()))},"warn"),Jf=f(function(e){return Ee({},e)},"clone"),Bt=f(function(e){return e==null?e:Re(e)?e.slice():De(e)?Jf(e):e},"copy"),jf=f(function(e){return e.slice()},"copyArray"),zo=f(function(e,r){for(r=e="";e++<36;r+=e*51&52?(e^15?8^Math.random()*(e^20?16:4):4).toString(16):"-");return r},"uuid"),eh={},Vo=f(function(){return eh},"staticEmptyObject"),rt=f(function(e){var r=Object.keys(e);return function(a){for(var n={},i=0;i<r.length;i++){var s=r[i],o=a?.[s];n[s]=o===void 0?e[s]:o}return n}},"defaults"),ar=f(function(e,r,a){for(var n=e.length-1;n>=0&&!(e[n]===r&&(e.splice(n,1),a));n--);},"removeFromArray"),xi=f(function(e){e.splice(0,e.length)},"clearArray"),th=f(function(e,r){for(var a=0;a<r.length;a++){var n=r[a];e.push(n)}},"push"),Mt=f(function(e,r,a){return a&&(r=Lo(a,r)),e[r]},"getPrefixedProperty"),Jt=f(function(e,r,a,n){a&&(r=Lo(a,r)),e[r]=n},"setPrefixedProperty"),rh=function(){function t(){pi(this,t),this._obj={}}return f(t,"ObjectMap"),yi(t,[{key:"set",value:f(function(r,a){return this._obj[r]=a,this},"set")},{key:"delete",value:f(function(r){return this._obj[r]=void 0,this},"_delete")},{key:"clear",value:f(function(){this._obj={}},"clear")},{key:"has",value:f(function(r){return this._obj[r]!==void 0},"has")},{key:"get",value:f(function(r){return this._obj[r]},"get")}]),t}(),Ft=typeof Map<"u"?Map:rh,ah="undefined",nh=function(){function t(e){if(pi(this,t),this._obj=Object.create(null),this.size=0,e!=null){var r;e.instanceString!=null&&e.instanceString()===this.instanceString()?r=e.toArray():r=e;for(var a=0;a<r.length;a++)this.add(r[a])}}return f(t,"ObjectSet"),yi(t,[{key:"instanceString",value:f(function(){return"set"},"instanceString")},{key:"add",value:f(function(r){var a=this._obj;a[r]!==1&&(a[r]=1,this.size++)},"add")},{key:"delete",value:f(function(r){var a=this._obj;a[r]===1&&(a[r]=0,this.size--)},"_delete")},{key:"clear",value:f(function(){this._obj=Object.create(null)},"clear")},{key:"has",value:f(function(r){return this._obj[r]===1},"has")},{key:"toArray",value:f(function(){var r=this;return Object.keys(this._obj).filter(function(a){return r.has(a)})},"toArray")},{key:"forEach",value:f(function(r,a){return this.toArray().forEach(r,a)},"forEach")}]),t}(),$r=(typeof Set>"u"?"undefined":qe(Set))!==ah?Set:nh,wn=f(function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!mi(e)){Ve("An element must have a core reference and parameters set");return}var n=r.group;if(n==null&&(r.data&&r.data.source!=null&&r.data.target!=null?n="edges":n="nodes"),n!=="nodes"&&n!=="edges"){Ve("An element must be of type `nodes` or `edges`; you specified `"+n+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:n,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?n==="edges":!!r.pannable,active:!1,classes:new $r,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(i.position.x==null&&(i.position.x=0),i.position.y==null&&(i.position.y=0),r.renderedPosition){var s=r.renderedPosition,o=e.pan(),l=e.zoom();i.position={x:(s.x-o.x)/l,y:(s.y-o.y)/l}}var u=[];Re(r.classes)?u=r.classes:ge(r.classes)&&(u=r.classes.split(/\s+/));for(var h=0,c=u.length;h<c;h++){var v=u[h];!v||v===""||i.classes.add(v)}this.createEmitter();var d=r.style||r.css;d&&(Ne("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(d)),(a===void 0||a)&&this.restore()},"Element"),gs=f(function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},f(function(a,n,i){var s;De(a)&&!yt(a)&&(s=a,a=s.roots||s.root,n=s.visit,i=s.directed),i=arguments.length===2&&!ze(n)?n:i,n=ze(n)?n:function(){};for(var o=this._private.cy,l=a=ge(a)?this.filter(a):a,u=[],h=[],c={},v={},d={},g=0,m,y=this.byGroup(),p=y.nodes,b=y.edges,E=0;E<l.length;E++){var S=l[E],w=S.id();S.isNode()&&(u.unshift(S),e.bfs&&(d[w]=!0,h.push(S)),v[w]=0)}for(var x=f(function(){var I=e.bfs?u.shift():u.pop(),M=I.id();if(e.dfs){if(d[M])return"continue";d[M]=!0,h.push(I)}var P=v[M],R=c[M],k=R!=null?R.source():null,B=R!=null?R.target():null,F=R==null?void 0:I.same(k)?B[0]:k[0],U=void 0;if(U=n(I,R,F,g++,P),U===!0)return m=I,"break";if(U===!1)return"break";for(var V=I.connectedEdges().filter(function(H){return(!i||H.source().same(I))&&b.has(H)}),G=0;G<V.length;G++){var $=V[G],j=$.connectedNodes().filter(function(H){return!H.same(I)&&p.has(H)}),Q=j.id();j.length!==0&&!d[Q]&&(j=j[0],u.push(j),e.bfs&&(d[Q]=!0,h.push(j)),c[Q]=$,v[Q]=v[M]+1)}},"_loop");u.length!==0;){var T=x();if(T!=="continue"&&T==="break")break}for(var C=o.collection(),D=0;D<h.length;D++){var L=h[D],O=c[L.id()];O!=null&&C.push(O),C.push(L)}return{path:o.collection(C),found:o.collection(m)}},"searchFn")},"defineSearch"),ma={breadthFirstSearch:gs({bfs:!0}),depthFirstSearch:gs({dfs:!0})};ma.bfs=ma.breadthFirstSearch;ma.dfs=ma.depthFirstSearch;var ih=lf(function(t,e){(function(){var r,a,n,i,s,o,l,u,h,c,v,d,g,m,y;n=Math.floor,c=Math.min,a=f(function(p,b){return p<b?-1:p>b?1:0},"defaultCmp"),h=f(function(p,b,E,S,w){var x;if(E==null&&(E=0),w==null&&(w=a),E<0)throw new Error("lo must be non-negative");for(S==null&&(S=p.length);E<S;)x=n((E+S)/2),w(b,p[x])<0?S=x:E=x+1;return[].splice.apply(p,[E,E-E].concat(b)),b},"insort"),o=f(function(p,b,E){return E==null&&(E=a),p.push(b),m(p,0,p.length-1,E)},"heappush"),s=f(function(p,b){var E,S;return b==null&&(b=a),E=p.pop(),p.length?(S=p[0],p[0]=E,y(p,0,b)):S=E,S},"heappop"),u=f(function(p,b,E){var S;return E==null&&(E=a),S=p[0],p[0]=b,y(p,0,E),S},"heapreplace"),l=f(function(p,b,E){var S;return E==null&&(E=a),p.length&&E(p[0],b)<0&&(S=[p[0],b],b=S[0],p[0]=S[1],y(p,0,E)),b},"heappushpop"),i=f(function(p,b){var E,S,w,x,T,C;for(b==null&&(b=a),x=function(){C=[];for(var D=0,L=n(p.length/2);0<=L?D<L:D>L;0<=L?D++:D--)C.push(D);return C}.apply(this).reverse(),T=[],S=0,w=x.length;S<w;S++)E=x[S],T.push(y(p,E,b));return T},"heapify"),g=f(function(p,b,E){var S;if(E==null&&(E=a),S=p.indexOf(b),S!==-1)return m(p,0,S,E),y(p,S,E)},"updateItem"),v=f(function(p,b,E){var S,w,x,T,C;if(E==null&&(E=a),w=p.slice(0,b),!w.length)return w;for(i(w,E),C=p.slice(b),x=0,T=C.length;x<T;x++)S=C[x],l(w,S,E);return w.sort(E).reverse()},"nlargest"),d=f(function(p,b,E){var S,w,x,T,C,D,L,O,A;if(E==null&&(E=a),b*10<=p.length){if(x=p.slice(0,b).sort(E),!x.length)return x;for(w=x[x.length-1],L=p.slice(b),T=0,D=L.length;T<D;T++)S=L[T],E(S,w)<0&&(h(x,S,0,null,E),x.pop(),w=x[x.length-1]);return x}for(i(p,E),A=[],C=0,O=c(b,p.length);0<=O?C<O:C>O;0<=O?++C:--C)A.push(s(p,E));return A},"nsmallest"),m=f(function(p,b,E,S){var w,x,T;for(S==null&&(S=a),w=p[E];E>b;){if(T=E-1>>1,x=p[T],S(w,x)<0){p[E]=x,E=T;continue}break}return p[E]=w},"_siftdown"),y=f(function(p,b,E){var S,w,x,T,C;for(E==null&&(E=a),w=p.length,C=b,x=p[b],S=2*b+1;S<w;)T=S+1,T<w&&!(E(p[S],p[T])<0)&&(S=T),p[b]=p[S],b=S,S=2*b+1;return p[b]=x,m(p,C,b,E)},"_siftup"),r=function(){p.push=o,p.pop=s,p.replace=u,p.pushpop=l,p.heapify=i,p.updateItem=g,p.nlargest=v,p.nsmallest=d;function p(b){this.cmp=b??a,this.nodes=[]}return f(p,"Heap"),p.prototype.push=function(b){return o(this.nodes,b,this.cmp)},p.prototype.pop=function(){return s(this.nodes,this.cmp)},p.prototype.peek=function(){return this.nodes[0]},p.prototype.contains=function(b){return this.nodes.indexOf(b)!==-1},p.prototype.replace=function(b){return u(this.nodes,b,this.cmp)},p.prototype.pushpop=function(b){return l(this.nodes,b,this.cmp)},p.prototype.heapify=function(){return i(this.nodes,this.cmp)},p.prototype.updateItem=function(b){return g(this.nodes,b,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 b;return b=new p,b.nodes=this.nodes.slice(0),b},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,b){return t.exports=b()}(this,function(){return r})}).call(ua)}),Oa=ih,sh=rt({root:null,weight:f(function(e){return 1},"weight"),directed:!1}),oh={dijkstra:f(function(e){if(!De(e)){var r=arguments;e={root:r[0],weight:r[1],directed:r[2]}}var a=sh(e),n=a.root,i=a.weight,s=a.directed,o=this,l=i,u=ge(n)?this.filter(n)[0]:n[0],h={},c={},v={},d=this.byGroup(),g=d.nodes,m=d.edges;m.unmergeBy(function(P){return P.isLoop()});for(var y=f(function(R){return h[R.id()]},"getDist"),p=f(function(R,k){h[R.id()]=k,b.updateItem(R)},"setDist"),b=new Oa(function(P,R){return y(P)-y(R)}),E=0;E<g.length;E++){var S=g[E];h[S.id()]=S.same(u)?0:1/0,b.push(S)}for(var w=f(function(R,k){for(var B=(s?R.edgesTo(k):R.edgesWith(k)).intersect(m),F=1/0,U,V=0;V<B.length;V++){var G=B[V],$=l(G);($<F||!U)&&(F=$,U=G)}return{edge:U,dist:F}},"distBetween");b.size()>0;){var x=b.pop(),T=y(x),C=x.id();if(v[C]=T,T!==1/0)for(var D=x.neighborhood().intersect(g),L=0;L<D.length;L++){var O=D[L],A=O.id(),I=w(x,O),M=T+I.dist;M<y(O)&&(p(O,M),c[A]={node:x,edge:I.edge})}}return{distanceTo:f(function(R){var k=ge(R)?g.filter(R)[0]:R[0];return v[k.id()]},"distanceTo"),pathTo:f(function(R){var k=ge(R)?g.filter(R)[0]:R[0],B=[],F=k,U=F.id();if(k.length>0)for(B.unshift(k);c[U];){var V=c[U];B.unshift(V.edge),B.unshift(V.node),F=V.node,U=F.id()}return o.spawn(B)},"pathTo")}},"dijkstra")},uh={kruskal:f(function(e){e=e||function(E){return 1};for(var r=this.byGroup(),a=r.nodes,n=r.edges,i=a.length,s=new Array(i),o=a,l=f(function(S){for(var w=0;w<s.length;w++){var x=s[w];if(x.has(S))return w}},"findSetIndex"),u=0;u<i;u++)s[u]=this.spawn(a[u]);for(var h=n.sort(function(E,S){return e(E)-e(S)}),c=0;c<h.length;c++){var v=h[c],d=v.source()[0],g=v.target()[0],m=l(d),y=l(g),p=s[m],b=s[y];
vendor: 5,871 bytes, line 8
8m!==y&&(o.merge(v),p.merge(b),s.splice(y,1))}return o},"kruskal")},lh=rt({root:null,goal:null,weight:f(function(e){return 1},"weight"),heuristic:f(function(e){return 0},"heuristic"),directed:!1}),fh={aStar:f(function(e){var r=this.cy(),a=lh(e),n=a.root,i=a.goal,s=a.heuristic,o=a.directed,l=a.weight;n=r.collection(n)[0],i=r.collection(i)[0];var u=n.id(),h=i.id(),c={},v={},d={},g=new Oa(function(U,V){return v[U.id()]-v[V.id()]}),m=new $r,y={},p={},b=f(function(V,G){g.push(V),m.add(G)},"addToOpenSet"),E,S,w=f(function(){E=g.pop(),S=E.id(),m.delete(S)},"popFromOpenSet"),x=f(function(V){return m.has(V)},"isInOpenSet");b(n,u),c[u]=0,v[u]=s(n);for(var T=0;g.size()>0;){if(w(),T++,S===h){for(var C=[],D=i,L=h,O=p[L];C.unshift(D),O!=null&&C.unshift(O),D=y[L],D!=null;)L=D.id(),O=p[L];return{found:!0,distance:c[S],path:this.spawn(C),steps:T}}d[S]=!0;for(var A=E._private.edges,I=0;I<A.length;I++){var M=A[I];if(this.hasElementWithId(M.id())&&!(o&&M.data("source")!==S)){var P=M.source(),R=M.target(),k=P.id()!==S?P:R,B=k.id();if(this.hasElementWithId(B)&&!d[B]){var F=c[S]+l(M);if(!x(B)){c[B]=F,v[B]=F+s(k),b(k,B),y[B]=E,p[B]=M;continue}F<c[B]&&(c[B]=F,v[B]=F+s(k),y[B]=E,p[B]=M)}}}}return{found:!1,distance:void 0,path:void 0,steps:T}},"aStar")},hh=rt({weight:f(function(e){return 1},"weight"),directed:!1}),ch={floydWarshall:f(function(e){for(var r=this.cy(),a=hh(e),n=a.weight,i=a.directed,s=n,o=this.byGroup(),l=o.nodes,u=o.edges,h=l.length,c=h*h,v=f(function($){return l.indexOf($)},"indexOf"),d=f(function($){return l[$]},"atIndex"),g=new Array(c),m=0;m<c;m++){var y=m%h,p=(m-y)/h;p===y?g[m]=0:g[m]=1/0}for(var b=new Array(c),E=new Array(c),S=0;S<u.length;S++){var w=u[S],x=w.source()[0],T=w.target()[0];if(x!==T){var C=v(x),D=v(T),L=C*h+D,O=s(w);if(g[L]>O&&(g[L]=O,b[L]=D,E[L]=w),!i){var A=D*h+C;!i&&g[A]>O&&(g[A]=O,b[A]=C,E[A]=w)}}}for(var I=0;I<h;I++)for(var M=0;M<h;M++)for(var P=M*h+I,R=0;R<h;R++){var k=M*h+R,B=I*h+R;g[P]+g[B]<g[k]&&(g[k]=g[P]+g[B],b[k]=b[P])}var F=f(function($){return(ge($)?r.filter($):$)[0]},"getArgEle"),U=f(function($){return v(F($))},"indexOfArgEle"),V={distance:f(function($,j){var Q=U($),H=U(j);return g[Q*h+H]},"distance"),path:f(function($,j){var Q=U($),H=U(j),te=d(Q);if(Q===H)return te.collection();if(b[Q*h+H]==null)return r.collection();var _=r.collection(),z=Q,Z;for(_.merge(te);Q!==H;)z=Q,Q=b[Q*h+H],Z=E[z*h+Q],_.merge(Z),_.merge(d(Q));return _},"path")};return V},"floydWarshall")},vh=rt({weight:f(function(e){return 1},"weight"),directed:!1,root:null}),dh={bellmanFord:f(function(e){var r=this,a=vh(e),n=a.weight,i=a.directed,s=a.root,o=n,l=this,u=this.cy(),h=this.byGroup(),c=h.edges,v=h.nodes,d=v.length,g=new Ft,m=!1,y=[];s=u.collection(s)[0],c.unmergeBy(function(ce){return ce.isLoop()});for(var p=c.length,b=f(function(ue){var ye=g.get(ue.id());return ye||(ye={},g.set(ue.id(),ye)),ye},"getInfo"),E=f(function(ue){return(ge(ue)?u.$(ue):ue)[0]},"getNodeFromTo"),S=f(function(ue){return b(E(ue)).dist},"distanceTo"),w=f(function(ue){for(var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s,Oe=E(ue),Te=[],xe=Oe;;){if(xe==null)return r.spawn();var Se=b(xe),ee=Se.edge,N=Se.pred;if(Te.unshift(xe[0]),xe.same(ye)&&Te.length>0)break;ee!=null&&Te.unshift(ee),xe=N}return l.spawn(Te)},"pathTo"),x=0;x<d;x++){var T=v[x],C=b(T);T.same(s)?C.dist=0:C.dist=1/0,C.pred=null,C.edge=null}for(var D=!1,L=f(function(ue,ye,Oe,Te,xe,Se){var ee=Te.dist+Se;ee<xe.dist&&!Oe.same(Te.edge)&&(xe.dist=ee,xe.pred=ue,xe.edge=Oe,D=!0)},"checkForEdgeReplacement"),O=1;O<d;O++){D=!1;for(var A=0;A<p;A++){var I=c[A],M=I.source(),P=I.target(),R=o(I),k=b(M),B=b(P);L(M,P,I,k,B,R),i||L(P,M,I,B,k,R)}if(!D)break}if(D)for(var F=[],U=0;U<p;U++){var V=c[U],G=V.source(),$=V.target(),j=o(V),Q=b(G).dist,H=b($).dist;if(Q+j<H||!i&&H+j<Q)if(m||(Ne("Graph contains a negative weight cycle for Bellman-Ford"),m=!0),e.findNegativeWeightCycles!==!1){var te=[];Q+j<H&&te.push(G),!i&&H+j<Q&&te.push($);for(var _=te.length,z=0;z<_;z++){var Z=te[z],K=[Z];K.push(b(Z).edge);for(var ie=b(Z).pred;K.indexOf(ie)===-1;)K.push(ie),K.push(b(ie).edge),ie=b(ie).pred;K=K.slice(K.indexOf(ie));for(var de=K[0].id(),re=0,se=2;se<K.length;se+=2)K[se].id()<de&&(de=K[se].id(),re=se);K=K.slice(re).concat(K.slice(0,re)),K.push(K[0]);var le=K.map(function(ce){return ce.id()}).join(",");F.indexOf(le)===-1&&(y.push(l.spawn(K)),F.push(le))}}else break}return{distanceTo:S,pathTo:w,hasNegativeWeightCycle:m,negativeWeightCycles:y}},"bellmanFord")},gh=Math.sqrt(2),ph=f(function(e,r,a){a.length===0&&Ve("Karger-Stein must be run on a connected (sub)graph");for(var n=a[e],i=n[1],s=n[2],o=r[i],l=r[s],u=a,h=u.length-1;h>=0;h--){var c=u[h],v=c[1],d=c[2];(r[v]===o&&r[d]===l||r[v]===l&&r[d]===o)&&u.splice(h,1)}for(var g=0;g<u.length;g++){var m=u[g];m[1]===l?(u[g]=m.slice(),u[g][1]=o):m[2]===l&&(u[g]=m.slice(),u[g][2]=o)}for(var y=0;y<r.length;y++)r[y]===l&&(r[y]=o);return u},"collapse"),$n=f(function(e,r,a,n){for(;a>n;){var i=Math.floor(Math.random()*r.length);r=ph(i,e,r),a--}return r},"contractUntil"),yh={kargerStein:f(function(){var e=this,r=this.byGroup(),a=r.nodes,n=r.edges;n.unmergeBy(function(B){return B.isLoop()});var i=a.length,s=n.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),l=Math.floor(i/gh);if(i<2){Ve("At least 2 nodes are required for Karger-Stein algorithm");return}for(var u=[],h=0;h<s;h++){var c=n[h];u.push([h,a.indexOf(c.source()),a.indexOf(c.target())])}for(var v=1/0,d=[],g=new Array(i),m=new Array(i),y=new Array(i),p=f(function(F,U){for(var V=0;V<i;V++)U[V]=F[V]},"copyNodesMap"),b=0;b<=o;b++){for(var E=0;E<i;E++)m[E]=E;var S=$n(m,u.slice(),i,l),w=S.slice();p(m,y);var x=$n(m,S,l,2),T=$n(y,w,l,2);x.length<=T.length&&x.length<v?(v=x.length,d=x,p(m,g)):T.length<=x.length&&T.length<v&&(v=T.length,d=T,p(y,g))}for(var C=this.spawn(d.map(function(B){return n[B[0]]})),D=this.spawn(),L=this.spawn(),O=g[0],A=0;A<g.length;A++){var I=g[A],M=a[A];
vendor: 7,139 bytes, line 8
8I===O?D.merge(M):L.merge(M)}var P=f(function(F){var U=e.spawn();return F.forEach(function(V){U.merge(V),V.connectedEdges().forEach(function(G){e.contains(G)&&!C.contains(G)&&U.merge(G)})}),U},"constructComponent"),R=[P(D),P(L)],k={cut:C,components:R,partition1:D,partition2:L};return k},"kargerStein")},mh=f(function(e){return{x:e.x,y:e.y}},"copyPosition"),xn=f(function(e,r,a){return{x:e.x*r+a.x,y:e.y*r+a.y}},"modelToRenderedPosition"),Uo=f(function(e,r,a){return{x:(e.x-a.x)/r,y:(e.y-a.y)/r}},"renderedToModelPosition"),kr=f(function(e){return{x:e[0],y:e[1]}},"array2point"),bh=f(function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=1/0,i=r;i<a;i++){var s=e[i];isFinite(s)&&(n=Math.min(s,n))}return n},"min"),Eh=f(function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=-1/0,i=r;i<a;i++){var s=e[i];isFinite(s)&&(n=Math.max(s,n))}return n},"max"),wh=f(function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=0,i=0,s=r;s<a;s++){var o=e[s];isFinite(o)&&(n+=o,i++)}return n/i},"mean"),xh=f(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;n?e=e.slice(r,a):(a<e.length&&e.splice(a,e.length-a),r>0&&e.splice(0,r));for(var o=0,l=e.length-1;l>=0;l--){var u=e[l];s?isFinite(u)||(e[l]=-1/0,o++):e.splice(l,1)}i&&e.sort(function(v,d){return v-d});var h=e.length,c=Math.floor(h/2);return h%2!==0?e[c+1+o]:(e[c-1+o]+e[c+o])/2},"median"),Th=f(function(e){return Math.PI*e/180},"deg2rad"),Va=f(function(e,r){return Math.atan2(r,e)-Math.PI/2},"getAngleFromDisp"),Ti=Math.log2||function(t){return Math.log(t)/Math.log(2)},Yo=f(function(e){return e>0?1:e<0?-1:0},"signum"),mr=f(function(e,r){return Math.sqrt(hr(e,r))},"dist"),hr=f(function(e,r){var a=r.x-e.x,n=r.y-e.y;return a*a+n*n},"sqdist"),Ch=f(function(e){for(var r=e.length,a=0,n=0;n<r;n++)a+=e[n];for(var i=0;i<r;i++)e[i]=e[i]/a;return e},"inPlaceSumNormalize"),Ze=f(function(e,r,a,n){return(1-n)*(1-n)*e+2*(1-n)*n*r+n*n*a},"qbezierAt"),Pr=f(function(e,r,a,n){return{x:Ze(e.x,r.x,a.x,n),y:Ze(e.y,r.y,a.y,n)}},"qbezierPtAt"),Dh=f(function(e,r,a,n){var i={x:r.x-e.x,y:r.y-e.y},s=mr(e,r),o={x:i.x/s,y:i.y/s};return a=a??0,n=n??a*s,{x:e.x+o.x*n,y:e.y+o.y*n}},"lineAt"),ba=f(function(e,r,a){return Math.max(e,Math.min(a,r))},"bound"),pt=f(function(e){if(e==null)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(e.x1!=null&&e.y1!=null){if(e.x2!=null&&e.y2!=null&&e.x2>=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},"makeBoundingBox"),Sh=f(function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},"copyBoundingBox"),Lh=f(function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},"clearBoundingBox"),Ah=f(function(e,r,a){return{x1:e.x1+r,x2:e.x2+r,y1:e.y1+a,y2:e.y2+a,w:e.w,h:e.h}},"shiftBoundingBox"),$o=f(function(e,r){e.x1=Math.min(e.x1,r.x1),e.x2=Math.max(e.x2,r.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r.y1),e.y2=Math.max(e.y2,r.y2),e.h=e.y2-e.y1},"updateBoundingBox"),Oh=f(function(e,r,a){e.x1=Math.min(e.x1,r),e.x2=Math.max(e.x2,r),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,a),e.y2=Math.max(e.y2,a),e.h=e.y2-e.y1},"expandBoundingBoxByPoint"),Qa=f(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=r,e.x2+=r,e.y1-=r,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},"expandBoundingBox"),Ja=f(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],a,n,i,s;if(r.length===1)a=n=i=s=r[0];else if(r.length===2)a=i=r[0],s=n=r[1];else if(r.length===4){var o=At(r,4);a=o[0],n=o[1],i=o[2],s=o[3]}return e.x1-=s,e.x2+=n,e.y1-=a,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},"expandBoundingBoxSides"),ps=f(function(e,r){e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},"assignBoundingBox"),Ci=f(function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2<r.x1||r.x2<e.x1||e.y2<r.y1||r.y2<e.y1||e.y1>r.y2||r.y1>e.y2)},"boundingBoxesIntersect"),Vr=f(function(e,r,a){return e.x1<=r&&r<=e.x2&&e.y1<=a&&a<=e.y2},"inBoundingBox"),Mh=f(function(e,r){return Vr(e,r.x,r.y)},"pointInBoundingBox"),_o=f(function(e,r){return Vr(e,r.x1,r.y1)&&Vr(e,r.x2,r.y2)},"boundingBoxInBoundingBox"),Ho=f(function(e,r,a,n,i,s,o){var l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",u=l==="auto"?br(i,s):l,h=i/2,c=s/2;u=Math.min(u,h,c);var v=u!==h,d=u!==c,g;if(v){var m=a-h+u-o,y=n-c-o,p=a+h-u+o,b=y;if(g=jt(e,r,a,n,m,y,p,b,!1),g.length>0)return g}if(d){var E=a+h+o,S=n-c+u-o,w=E,x=n+c-u+o;if(g=jt(e,r,a,n,E,S,w,x,!1),g.length>0)return g}if(v){var T=a-h+u-o,C=n+c+o,D=a+h-u+o,L=C;if(g=jt(e,r,a,n,T,C,D,L,!1),g.length>0)return g}if(d){var O=a-h-o,A=n-c+u-o,I=O,M=n+c-u+o;if(g=jt(e,r,a,n,O,A,I,M,!1),g.length>0)return g}var P;{var R=a-h+u,k=n-c+u;if(P=fa(e,r,a,n,R,k,u+o),P.length>0&&P[0]<=R&&P[1]<=k)return[P[0],P[1]]}{var B=a+h-u,F=n-c+u;if(P=fa(e,r,a,n,B,F,u+o),P.length>0&&P[0]>=B&&P[1]<=F)return[P[0],P[1]]}{var U=a+h-u,V=n+c-u;if(P=fa(e,r,a,n,U,V,u+o),P.length>0&&P[0]>=U&&P[1]>=V)return[P[0],P[1]]}{var G=a-h+u,$=n+c-u;if(P=fa(e,r,a,n,G,$,u+o),P.length>0&&P[0]<=G&&P[1]>=$)return[P[0],P[1]]}return[]},"roundRectangleIntersectLine"),Nh=f(function(e,r,a,n,i,s,o){var l=o,u=Math.min(a,i),h=Math.max(a,i),c=Math.min(n,s),v=Math.max(n,s);return u-l<=e&&e<=h+l&&c-l<=r&&r<=v+l},"inLineVicinity"),Ih=f(function(e,r,a,n,i,s,o,l,u){var h={x1:Math.min(a,o,i)-u,x2:Math.max(a,o,i)+u,y1:Math.min(n,l,s)-u,y2:Math.max(n,l,s)+u};return!(e<h.x1||e>h.x2||r<h.y1||r>h.y2)},"inBezierVicinity"),kh=f(function(e,r,a,n){a-=n;var i=r*r-4*e*a;if(i<0)return[];var s=Math.sqrt(i),o=2*e,l=(-r+s)/o,u=(-r-s)/o;return[l,u]},"solveQuadratic"),Rh=f(function(e,r,a,n,i){var s=1e-5;e===0&&(e=s),r/=e,a/=e,n/=e;var o,l,u,h,c,v,d,g;if(l=(3*a-r*r)/9,u=-(27*n)+r*(9*a-2*(r*r)),u/=54,o=l*l*l+u*u,i[1]=0,d=r/3,o>0){c=u+Math.sqrt(o),c=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3),v=u-Math.sqrt(o),v=v<0?-Math.pow(-v,1/3):Math.pow(v,1/3),i[0]=-d+c+v,d+=(c+v)/2,i[4]=i[2]=-d,d=Math.sqrt(3)*(-v+c)/2,i[3]=d,i[5]=-d;return}if(i[5]=i[3]=0,o===0){g=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3),i[0]=-d+2*g,i[4]=i[2]=-(g+d);return}l=-l,h=l*l*l,h=Math.acos(u/Math.sqrt(h)),g=2*Math.sqrt(l),i[0]=-d+g*Math.cos(h/3),i[2]=-d+g*Math.cos((h+2*Math.PI)/3),i[4]=-d+g*Math.cos((h+4*Math.PI)/3)},"solveCubic"),Ph=f(function(e,r,a,n,i,s,o,l){var u=1*a*a-4*a*i+2*a*o+4*i*i-4*i*o+o*o+n*n-4*n*s+2*n*l+4*s*s-4*s*l+l*l,h=1*9*a*i-3*a*a-3*a*o-6*i*i+3*i*o+9*n*s-3*n*n-3*n*l-6*s*s+3*s*l,c=1*3*a*a-6*a*i+a*o-a*e+2*i*i+2*i*e-o*e+3*n*n-6*n*s+n*l-n*r+2*s*s+2*s*r-l*r,v=1*a*i-a*a+a*e-i*e+n*s-n*n+n*r-s*r,d=[];Rh(u,h,c,v,d);for(var g=1e-7,m=[],y=0;y<6;y+=2)Math.abs(d[y+1])<g&&d[y]>=0&&d[y]<=1&&m.push(d[y]);m.push(1),m.push(0);for(var p=-1,b,E,S,w=0;w<m.length;
vendor: 2,368 bytes, line 8
8w++)b=Math.pow(1-m[w],2)*a+2*(1-m[w])*m[w]*i+m[w]*m[w]*o,E=Math.pow(1-m[w],2)*n+2*(1-m[w])*m[w]*s+m[w]*m[w]*l,S=Math.pow(b-e,2)+Math.pow(E-r,2),p>=0?S<p&&(p=S):p=S;return p},"sqdistToQuadraticBezier"),Bh=f(function(e,r,a,n,i,s){var o=[e-a,r-n],l=[i-a,s-n],u=l[0]*l[0]+l[1]*l[1],h=o[0]*o[0]+o[1]*o[1],c=o[0]*l[0]+o[1]*l[1],v=c*c/u;return c<0?h:v>u?(e-i)*(e-i)+(r-s)*(r-s):h-v},"sqdistToFiniteLine"),gt=f(function(e,r,a){for(var n,i,s,o,l,u=0,h=0;h<a.length/2;h++)if(n=a[h*2],i=a[h*2+1],h+1<a.length/2?(s=a[(h+1)*2],o=a[(h+1)*2+1]):(s=a[(h+1-a.length/2)*2],o=a[(h+1-a.length/2)*2+1]),!(n==e&&s==e))if(n>=e&&e>=s||n<=e&&e<=s)l=(e-n)/(s-n)*(o-i)+i,l>r&&u++;else continue;return u%2!==0},"pointInsidePolygonPoints"),Ht=f(function(e,r,a,n,i,s,o,l,u){var h=new Array(a.length),c;l[0]!=null?(c=Math.atan(l[1]/l[0]),l[0]<0?c=c+Math.PI/2:c=-c-Math.PI/2):c=l;for(var v=Math.cos(-c),d=Math.sin(-c),g=0;g<h.length/2;g++)h[g*2]=s/2*(a[g*2]*v-a[g*2+1]*d),h[g*2+1]=o/2*(a[g*2+1]*v+a[g*2]*d),h[g*2]+=n,h[g*2+1]+=i;var m;if(u>0){var y=hn(h,-u);m=fn(y)}else m=h;return gt(e,r,m)},"pointInsidePolygon"),Fh=f(function(e,r,a,n,i,s,o,l){for(var u=new Array(a.length*2),h=0;h<l.length;h++){var c=l[h];u[h*4+0]=c.startX,u[h*4+1]=c.startY,u[h*4+2]=c.stopX,u[h*4+3]=c.stopY;var v=Math.pow(c.cx-e,2)+Math.pow(c.cy-r,2);if(v<=Math.pow(c.radius,2))return!0}return gt(e,r,u)},"pointInsideRoundPolygon"),fn=f(function(e){for(var r=new Array(e.length/2),a,n,i,s,o,l,u,h,c=0;c<e.length/4;c++){a=e[c*4],n=e[c*4+1],i=e[c*4+2],s=e[c*4+3],c<e.length/4-1?(o=e[(c+1)*4],l=e[(c+1)*4+1],u=e[(c+1)*4+2],h=e[(c+1)*4+3]):(o=e[0],l=e[1],u=e[2],h=e[3]);var v=jt(a,n,i,s,o,l,u,h,!0);r[c*2]=v[0],r[c*2+1]=v[1]}return r},"joinLines"),hn=f(function(e,r){for(var a=new Array(e.length*2),n,i,s,o,l=0;l<e.length/2;l++){n=e[l*2],i=e[l*2+1],l<e.length/2-1?(s=e[(l+1)*2],o=e[(l+1)*2+1]):(s=e[0],o=e[1]);var u=o-i,h=-(s-n),c=Math.sqrt(u*u+h*h),v=u/c,d=h/c;a[l*4]=n+v*r,a[l*4+1]=i+d*r,a[l*4+2]=s+v*r,a[l*4+3]=o+d*r}return a},"expandPolygon"),Gh=f(function(e,r,a,n,i,s){var o=a-e,l=n-r;o/=i,l/=s;var u=Math.sqrt(o*o+l*l),h=u-1;if(h<0)return[];var c=h/u;return[(a-e)*c+e,(n-r)*c+r]},"intersectLineEllipse"),gr=f(function(e,r,a,n,i,s,o){return e-=i,r-=s,e/=a/2+o,r/=n/2+o,e*e+r*r<=1},"checkInEllipse"),fa=f(function(e,r,a,n,i,s,o){var l=[a-e,n-r],u=[e-i,r-s],h=l[0]*l[0]+l[1]*l[1],c=2*(u[0]*l[0]+u[1]*l[1]),v=u[0]*u[0]+u[1]*u[1]-o
vendor: 9,065 bytes, line 8
8*o,d=c*c-4*h*v;if(d<0)return[];var g=(-c+Math.sqrt(d))/(2*h),m=(-c-Math.sqrt(d))/(2*h),y=Math.min(g,m),p=Math.max(g,m),b=[];if(y>=0&&y<=1&&b.push(y),p>=0&&p<=1&&b.push(p),b.length===0)return[];var E=b[0]*l[0]+e,S=b[0]*l[1]+r;if(b.length>1){if(b[0]==b[1])return[E,S];var w=b[1]*l[0]+e,x=b[1]*l[1]+r;return[E,S,w,x]}else return[E,S]},"intersectLineCircle"),_n=f(function(e,r,a){return r<=e&&e<=a||a<=e&&e<=r?e:e<=r&&r<=a||a<=r&&r<=e?r:a},"midOfThree"),jt=f(function(e,r,a,n,i,s,o,l,u){var h=e-i,c=a-e,v=o-i,d=r-s,g=n-r,m=l-s,y=v*d-m*h,p=c*d-g*h,b=m*c-v*g;if(b!==0){var E=y/b,S=p/b,w=.001,x=0-w,T=1+w;return x<=E&&E<=T&&x<=S&&S<=T?[e+E*c,r+E*g]:u?[e+E*c,r+E*g]:[]}else return y===0||p===0?_n(e,a,o)===o?[o,l]:_n(e,a,i)===i?[i,s]:_n(i,o,a)===a?[a,n]:[]:[]},"finiteLinesIntersect"),Ea=f(function(e,r,a,n,i,s,o,l){var u=[],h,c=new Array(a.length),v=!0;s==null&&(v=!1);var d;if(v){for(var g=0;g<c.length/2;g++)c[g*2]=a[g*2]*s+n,c[g*2+1]=a[g*2+1]*o+i;if(l>0){var m=hn(c,-l);d=fn(m)}else d=c}else d=a;for(var y,p,b,E,S=0;S<d.length/2;S++)y=d[S*2],p=d[S*2+1],S<d.length/2-1?(b=d[(S+1)*2],E=d[(S+1)*2+1]):(b=d[0],E=d[1]),h=jt(e,r,n,i,y,p,b,E),h.length!==0&&u.push(h[0],h[1]);return u},"polygonIntersectLine"),zh=f(function(e,r,a,n,i,s,o,l,u){var h=[],c,v=new Array(a.length*2);u.forEach(function(b,E){E===0?(v[v.length-2]=b.startX,v[v.length-1]=b.startY):(v[E*4-2]=b.startX,v[E*4-1]=b.startY),v[E*4]=b.stopX,v[E*4+1]=b.stopY,c=fa(e,r,n,i,b.cx,b.cy,b.radius),c.length!==0&&h.push(c[0],c[1])});for(var d=0;d<v.length/4;d++)c=jt(e,r,n,i,v[d*4],v[d*4+1],v[d*4+2],v[d*4+3],!1),c.length!==0&&h.push(c[0],c[1]);if(h.length>2){for(var g=[h[0],h[1]],m=Math.pow(g[0]-e,2)+Math.pow(g[1]-r,2),y=1;y<h.length/2;y++){var p=Math.pow(h[y*2]-e,2)+Math.pow(h[y*2+1]-r,2);p<=m&&(g[0]=h[y*2],g[1]=h[y*2+1],m=p)}return g}return h},"roundPolygonIntersectLine"),Ua=f(function(e,r,a){var n=[e[0]-r[0],e[1]-r[1]],i=Math.sqrt(n[0]*n[0]+n[1]*n[1]),s=(i-a)/i;return s<0&&(s=1e-5),[r[0]+s*n[0],r[1]+s*n[1]]},"shortenIntersection"),ct=f(function(e,r){var a=ei(e,r);return a=Xo(a),a},"generateUnitNgonPointsFitToSquare"),Xo=f(function(e){for(var r,a,n=e.length/2,i=1/0,s=1/0,o=-1/0,l=-1/0,u=0;u<n;u++)r=e[2*u],a=e[2*u+1],i=Math.min(i,r),o=Math.max(o,r),s=Math.min(s,a),l=Math.max(l,a);for(var h=2/(o-i),c=2/(l-s),v=0;v<n;v++)r=e[2*v]=e[2*v]*h,a=e[2*v+1]=e[2*v+1]*c,i=Math.min(i,r),o=Math.max(o,r),s=Math.min(s,a),l=Math.max(l,a);if(s<-1)for(var d=0;d<n;d++)a=e[2*d+1]=e[2*d+1]+(-1-s);return e},"fitPolygonToSquare"),ei=f(function(e,r){var a=1/e*2*Math.PI,n=e%2===0?Math.PI/2+a/2:Math.PI/2;n+=r;for(var i=new Array(e*2),s,o=0;o<e;o++)s=o*a+n,i[2*o]=Math.cos(s),i[2*o+1]=Math.sin(-s);return i},"generateUnitNgonPoints"),br=f(function(e,r){return Math.min(e/4,r/4,8)},"getRoundRectangleRadius"),qo=f(function(e,r){return Math.min(e/10,r/10,8)},"getRoundPolygonRadius"),Di=f(function(){return 8},"getCutRectangleCornerLength"),Vh=f(function(e,r,a){return[e-2*r+a,2*(r-e),e]},"bezierPtsToQuadCoeff"),ti=f(function(e,r){return{heightOffset:Math.min(15,.05*r),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}},"getBarrelCurveConstants"),Uh=rt({dampingFactor:.8,precision:1e-6,iterations:200,weight:f(function(e){return 1},"weight")}),Yh={pageRank:f(function(e){for(var r=Uh(e),a=r.dampingFactor,n=r.precision,i=r.iterations,s=r.weight,o=this._private.cy,l=this.byGroup(),u=l.nodes,h=l.edges,c=u.length,v=c*c,d=h.length,g=new Array(v),m=new Array(c),y=(1-a)/c,p=0;p<c;p++){for(var b=0;b<c;b++){var E=p*c+b;g[E]=0}m[p]=0}for(var S=0;S<d;S++){var w=h[S],x=w.data("source"),T=w.data("target");if(x!==T){var C=u.indexOfId(x),D=u.indexOfId(T),L=s(w),O=D*c+C;g[O]+=L,m[C]+=L}}for(var A=1/c+y,I=0;I<c;I++)if(m[I]===0)for(var M=0;M<c;M++){var P=M*c+I;g[P]=A}else for(var R=0;R<c;R++){var k=R*c+I;g[k]=g[k]/m[I]+y}for(var B=new Array(c),F=new Array(c),U,V=0;V<c;V++)B[V]=1;for(var G=0;G<i;G++){for(var $=0;$<c;$++)F[$]=0;for(var j=0;j<c;j++)for(var Q=0;Q<c;Q++){var H=j*c+Q;F[j]+=g[H]*B[Q]}Ch(F),U=B,B=F,F=U;for(var te=0,_=0;_<c;_++){var z=U[_]-B[_];te+=z*z}if(te<n)break}var Z={rank:f(function(ie){return ie=o.collection(ie)[0],B[u.indexOf(ie)]},"rank")};return Z},"pageRank")},ys=rt({root:null,weight:f(function(e){return 1},"weight"),directed:!1,alpha:0}),Br={degreeCentralityNormalized:f(function(e){e=ys(e);var r=this.cy(),a=this.nodes(),n=a.length;if(e.directed){for(var h={},c={},v=0,d=0,g=0;g<n;g++){var m=a[g],y=m.id();e.root=m;var p=this.degreeCentrality(e);v<p.indegree&&(v=p.indegree),d<p.outdegree&&(d=p.outdegree),h[y]=p.indegree,c[y]=p.outdegree}return{indegree:f(function(E){return v==0?0:(ge(E)&&(E=r.filter(E)),h[E.id()]/v)},"indegree"),outdegree:f(function(E){return d===0?0:(ge(E)&&(E=r.filter(E)),c[E.id()]/d)},"outdegree")}}else{for(var i={},s=0,o=0;o<n;o++){var l=a[o];e.root=l;var u=this.degreeCentrality(e);s<u.degree&&(s=u.degree),i[l.id()]=u.degree}return{degree:f(function(E){return s===0?0:(ge(E)&&(E=r.filter(E)),i[E.id()]/s)},"degree")}}},"degreeCentralityNormalized"),degreeCentrality:f(function(e){e=ys(e);var r=this.cy(),a=this,n=e,i=n.root,s=n.weight,o=n.directed,l=n.alpha;if(i=r.collection(i)[0],o){for(var d=i.connectedEdges(),g=d.filter(function(x){return x.target().same(i)&&a.has(x)}),m=d.filter(function(x){return x.source().same(i)&&a.has(x)}),y=g.length,p=m.length,b=0,E=0,S=0;S<g.length;S++)b+=s(g[S]);for(var w=0;w<m.length;w++)E+=s(m[w]);return{indegree:Math.pow(y,1-l)*Math.pow(b,l),outdegree:Math.pow(p,1-l)*Math.pow(E,l)}}else{for(var u=i.connectedEdges().intersection(a),h=u.length,c=0,v=0;v<u.length;v++)c+=s(u[v]);return{degree:Math.pow(h,1-l)*Math.pow(c,l)}}},"degreeCentrality")};Br.dc=Br.degreeCentrality;Br.dcn=Br.degreeCentralityNormalised=Br.degreeCentralityNormalized;var ms=rt({harmonic:!0,weight:f(function(){return 1},"weight"),directed:!1,root:null}),Fr={closenessCentralityNormalized:f(function(e){for(var r=ms(e),a=r.harmonic,n=r.weight,i=r.directed,s=this.cy(),o={},l=0,u=this.nodes(),h=this.floydWarshall({weight:n,directed:i}),c=0;c<u.length;c++){for(var v=0,d=u[c],g=0;g<u.length;g++)if(c!==g){var m=h.distance(d,u[g]);a?v+=1/m:v+=m}a||(v=1/v),l<v&&(l=v),o[d.id()]=v}return{closeness:f(function(p){return l==0?0:(ge(p)?p=s.filter(p)[0].id():p=p.id(),o[p]/l)},"closeness")}},"closenessCentralityNormalized"),closenessCentrality:f(function(e){var r=ms(e),a=r.root,n=r.weight,i=r.directed,s=r.harmonic;a=this.filter(a)[0];for(var o=this.dijkstra({root:a,weight:n,directed:i}),l=0,u=this.nodes(),h=0;h<u.length;h++){var c=u[h];if(!c.same(a)){var v=o.distanceTo(c);s?l+=1/v:l+=v}}return s?l:1/l},"closenessCentrality")};Fr.cc=Fr.closenessCentrality;Fr.ccn=Fr.closenessCentralityNormalised=Fr.closenessCentralityNormalized;var $h=rt({weight:null,directed:!1}),ri={betweennessCentrality:f(function(e){for(var r=$h(e),a=r.directed,n=r.weight,i=n!=null,s=this.cy(),o=this.nodes(),l={},u={},h=0,c={set:f(function(E,S){u[E]=S,S>h&&(h=S)},"set"),get:f(function(E){return u[E]},"get")},v=0;v<o.length;v++){var d=o[v],g=d.id();a?l[g]=d.outgoers().nodes():l[g]=d.openNeighborhood().nodes(),c.set(g,0)}for(var m=f(function(E){for(var S=o[E].id(),w=[],x={},T={},C={},D=new Oa(function(Q,H){return C[Q]-C[H]}),L=0;L<o.length;L++){var O=o[L].id();x[O]=[],T[O]=0,C[O]=1/0}for(T[S]=1,C[S]=0,D.push(S);!D.empty();){var A=D.pop();if(w.push(A),i)for(var I=0;I<l[A].length;I++){var M=l[A][I],P=s.getElementById(A),R=void 0;P.edgesTo(M).length>0?R=P.edgesTo(M)[0]:R=M.edgesTo(P)[0];var k=n(R);M=M.id(),C[M]>C[A]+k&&(C[M]=C[A]+k,D.nodes.indexOf(M)<0?D.push(M):D.updateItem(M),T[M]=0,x[M]=[]),C[M]==C[A]+k&&(T[M]=T[M]+T[A],x[M].push(A))}else for(var B=0;B<l[A].length;B++){var F=l[A][B].id();C[F]==1/0&&(D.push(F),C[F]=C[A]+1),C[F]==C[A]+1&&(T[F]=T[F]+T[A],x[F].push(A))}}for(var U={},V=0;V<o.length;V++)U[o[V].id()]=0;for(;w.length>0;){for(var G=w.pop(),$=0;$<x[G].length;$++){var j=x[G][$];U[j]=U[j]+T[j]/T[G]*(1+U[G])}G!=o[E].id()&&c.set(G,c.get(G)+U[G])}},"_loop"),y=0;y<o.length;y++)m(y);var p={betweenness:f(function(E){var S=s.collection(E).id();return c.get(S)},"betweenness"),betweennessNormalized:f(function(E){if(h==0)return 0;var S=s.collection(E).id();return c.get(S)/h},"betweennessNormalized")};return p.betweennessNormalised=p.betweennessNormalized,p},"betweennessCentrality")};ri.bc=ri.betweennessCentrality;var _h=rt({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(t){return 1}]}),Hh=f(function(e){return _h(e)},"setOptions"),Xh=f(function(e,r){for(var a=0,n=0;n<r.length;n++)a+=r[n](e);return a},"getSimilarity"),qh=f(function(e,r,a){for(var n=0;n<r;n++)e[n*r+n]=a},"addLoops"),Wo=f(function(e,r){for(var a,n=0;n<r;n++){a=0;for(var i=0;i<r;i++)a+=e[i*r+n];for(var s=0;s<r;s++)e[s*r+n]=e[s*r+n]/a}},"normalize"),Wh=f(function(e,r,a){for(var n=new Array(a*a),i=0;i<a;i++){for(var s=0;s<a;s++)n[i*a+s]=0;for(var o=0;o<a;o++)for(var l=0;l<a;l++)n[i*a+l]+=e[i*a+o]*r[o*a+l]}return n},"mmult"),Kh=f(function(e,r,a){for(var n=e.slice(0),i=1;i<a;i++)e=Wh(e,n,r);return e},"expand"),Zh=f(function(e,r,a){for(var n=new Array(r*r),i=0;i<r*r;i++)n[i]=Math.pow(e[i],a);return Wo(n,r),n},"inflate"),Qh=f(function(e,r,a,n){for(var i=0;i<a;
vendor: 6,454 bytes, line 8
8i++){var s=Math.round(e[i]*Math.pow(10,n))/Math.pow(10,n),o=Math.round(r[i]*Math.pow(10,n))/Math.pow(10,n);if(s!==o)return!1}return!0},"hasConverged"),Jh=f(function(e,r,a,n){for(var i=[],s=0;s<r;s++){for(var o=[],l=0;l<r;l++)Math.round(e[s*r+l]*1e3)/1e3>0&&o.push(a[l]);o.length!==0&&i.push(n.collection(o))}return i},"assign"),jh=f(function(e,r){for(var a=0;a<e.length;a++)if(!r[a]||e[a].id()!==r[a].id())return!1;return!0},"isDuplicate"),ec=f(function(e){for(var r=0;r<e.length;r++)for(var a=0;a<e.length;a++)r!=a&&jh(e[r],e[a])&&e.splice(a,1);return e},"removeDuplicates"),bs=f(function(e){for(var r=this.nodes(),a=this.edges(),n=this.cy(),i=Hh(e),s={},o=0;o<r.length;o++)s[r[o].id()]=o;for(var l=r.length,u=l*l,h=new Array(u),c,v=0;v<u;v++)h[v]=0;for(var d=0;d<a.length;d++){var g=a[d],m=s[g.source().id()],y=s[g.target().id()],p=Xh(g,i.attributes);h[m*l+y]+=p,h[y*l+m]+=p}qh(h,l,i.multFactor),Wo(h,l);for(var b=!0,E=0;b&&E<i.maxIterations;)b=!1,c=Kh(h,l,i.expandFactor),h=Zh(c,l,i.inflateFactor),Qh(h,c,u,4)||(b=!0),E++;var S=Jh(h,l,r,n);return S=ec(S),S},"markovClustering"),tc={markovClustering:bs,mcl:bs},rc=f(function(e){return e},"identity"),Ko=f(function(e,r){return Math.abs(r-e)},"absDiff"),Es=f(function(e,r,a){return e+Ko(r,a)},"addAbsDiff"),ws=f(function(e,r,a){return e+Math.pow(a-r,2)},"addSquaredDiff"),ac=f(function(e){return Math.sqrt(e)},"sqrt"),nc=f(function(e,r,a){return Math.max(e,Ko(r,a))},"maxAbsDiff"),na=f(function(e,r,a,n,i){for(var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:rc,o=n,l,u,h=0;h<e;h++)l=r(h),u=a(h),o=i(o,l,u);return s(o)},"getDistance"),Ur={euclidean:f(function(e,r,a){return e>=2?na(e,r,a,0,ws,ac):na(e,r,a,0,Es)},"euclidean"),squaredEuclidean:f(function(e,r,a){return na(e,r,a,0,ws)},"squaredEuclidean"),manhattan:f(function(e,r,a){return na(e,r,a,0,Es)},"manhattan"),max:f(function(e,r,a){return na(e,r,a,-1/0,nc)},"max")};Ur["squared-euclidean"]=Ur.squaredEuclidean;Ur.squaredeuclidean=Ur.squaredEuclidean;function Tn(t,e,r,a,n,i){var s;return ze(t)?s=t:s=Ur[t]||Ur.euclidean,e===0&&ze(t)?s(n,i):s(e,r,a,n,i)}f(Tn,"clusteringDistance");var ic=rt({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),Si=f(function(e){return ic(e)},"setOptions"),cn=f(function(e,r,a,n,i){var s=i!=="kMedoids",o=s?function(c){return a[c]}:function(c){return n[c](a)},l=f(function(v){return n[v](r)},"getQ"),u=a,h=r;return Tn(e,n.length,o,l,u,h)},"getDist"),Hn=f(function(e,r,a){for(var n=a.length,i=new Array(n),s=new Array(n),o=new Array(r),l=null,u=0;u<n;u++)i[u]=e.min(a[u]).value,s[u]=e.max(a[u]).value;for(var h=0;h<r;h++){l=[];for(var c=0;c<n;c++)l[c]=Math.random()*(s[c]-i[c])+i[c];o[h]=l}return o},"randomCentroids"),Zo=f(function(e,r,a,n,i){for(var s=1/0,o=0,l=0;l<r.length;l++){var u=cn(a,e,r[l],n,i);u<s&&(s=u,o=l)}return o},"classify"),Qo=f(function(e,r,a){for(var n=[],i=null,s=0;s<r.length;s++)i=r[s],a[i.id()]===e&&n.push(i);return n},"buildCluster"),sc=f(function(e,r,a){return Math.abs(r-e)<=a},"haveValuesConverged"),oc=f(function(e,r,a){for(var n=0;n<e.length;n++)for(var i=0;i<e[n].length;i++){var s=Math.abs(e[n][i]-r[n][i]);if(s>a)return!1}return!0},"haveMatricesConverged"),uc=f(function(e,r,a){for(var n=0;n<a;n++)if(e===r[n])return!0;return!1},"seenBefore"),xs=f(function(e,r){var a=new Array(r);if(e.length<50)for(var n=0;n<r;n++){for(var i=e[Math.floor(Math.random()*e.length)];uc(i,a,n);)i=e[Math.floor(Math.random()*e.length)];a[n]=i}else for(var s=0;s<r;s++)a[s]=e[Math.floor(Math.random()*e.length)];return a},"randomMedoids"),Ts=f(function(e,r,a){for(var n=0,i=0;i<r.length;i++)n+=cn("manhattan",r[i],e,a,"kMedoids");return n},"findCost"),lc=f(function(e){var r=this.cy(),a=this.nodes(),n=null,i=Si(e),s=new Array(i.k),o={},l;i.testMode?typeof i.testCentroids=="number"?(i.testCentroids,l=Hn(a,i.k,i.attributes)):qe(i.testCentroids)==="object"?l=i.testCentroids:l=Hn(a,i.k,i.attributes):l=Hn(a,i.k,i.attributes);for(var u=!0,h=0;u&&h<i.maxIterations;){for(var c=0;c<a.length;c++)n=a[c],o[n.id()]=Zo(n,l,i.distance,i.attributes,"kMeans");u=!1;for(var v=0;v<i.k;v++){var d=Qo(v,a,o);if(d.length!==0){for(var g=i.attributes.length,m=l[v],y=new Array(g),p=new Array(g),b=0;b<g;b++){p[b]=0;for(var E=0;E<d.length;E++)n=d[E],p[b]+=i.attributes[b](n);y[b]=p[b]/d.length,sc(y[b],m[b],i.sensitivityThreshold)||(u=!0)}l[v]=y,s[v]=r.collection(d)}}h++}return s},"kMeans"),fc=f(function(e){var r=this.cy(),a=this.nodes(),n=null,i=Si(e),s=new Array(i.k),o,l={},u,h=new Array(i.k);i.testMode?typeof i.testCentroids=="number"||(qe(i.testCentroids)==="object"?o=i.testCentroids:o=xs(a,i.k)):o=xs(a,i.k);for(var c=!0,v=0;c&&v<i.maxIterations;){for(var d=0;d<a.length;d++)n=a[d],l[n.id()]=Zo(n,o,i.distance,i.attributes,"kMedoids");c=!1;for(var g=0;g<o.length;g++){var m=Qo(g,a,l);if(m.length!==0){h[g]=Ts(o[g],m,i.attributes);for(var y=0;y<m.length;y++)u=Ts(m[y],m,i.attributes),u<h[g]&&(h[g]=u,o[g]=m[y],c=!0);s[g]=r.collection(m)}}v++}return s},"kMedoids"),hc=f(function(e,r,a,n,i){for(var s,o,l=0;l<r.length;l++)for(var u=0;u<e.length;u++)n[l][u]=Math.pow(a[l][u],i.m);for(var h=0;h<e.length;h++)for(var c=0;c<i.attributes.length;c++){s=0,o=0;for(var v=0;v<r.length;v++)s+=n[v][h]*i.attributes[c](r[v]),o+=n[v][h];e[h][c]=s/o}},"updateCentroids"),cc=f(function(e,r,a,n,i){for(var s=0;s<e.length;s++)r[s]=e[s].slice();for(var o,l,u,h=2/(i.m-1),c=0;c<a.length;c++)for(var v=0;v<n.length;v++){o=0;for(var d=0;d<a.length;d++)l=cn(i.distance,n[v],a[c],i.attributes,"cmeans"),u=cn(i.distance,n[v],a[d],i.attributes,"cmeans"),o+=Math.pow(l/u,h);e[v][c]=1/o}},"updateMembership"),vc=f(function(e,r,a,n){for(var i=new Array(a.k),s=0;s<i.length;s++)i[s]=[];for(var o,l,u=0;u<r.length;u++){o=-1/0,l=-1;for(var h=0;h<r[0].length;h++)r[u][h]>o&&(o=r[u][h],l=h);i[l].push(e[u])}for(var c=0;c<i.length;c++)i[c]=n.collection(i[c]);return i},"assign"),Cs=f(function(e){var r=this.cy(),a=this.nodes(),n=Si(e),i,s,o,l,u;l=new Array(a.length);for(var h=0;h<a.length;h++)l[h]=new Array(n.k);o=new Array(a.length);for(var c=0;c<a.length;c++)o[c]=new Array(n.k);for(var v=0;v<a.length;v++){for(var d=0,g=0;g<n.k;g++)o[v][g]=Math.random(),d+=o[v][g];for(var m=0;m<n.k;m++)o[v][m]=o[v][m]/d}s=new Array(n.k);for(var y=0;y<n.k;y++)s[y]=new Array(n.attributes.length);u=new Array(a.length);for(var p=0;p<a.length;p++)u[p]=new Array(n.k);for(var b=!0,E=0;b&&E<n.maxIterations;)b=!1,hc(s,a,o,u,n),cc(o,l,s,a,n),oc(o,l,n.sensitivityThreshold)||(b=!0),E++;
vendor: 4,880 bytes, line 8
8return i=vc(a,o,n,r),{clusters:i,degreeOfMembership:o}},"fuzzyCMeans"),dc={kMeans:lc,kMedoids:fc,fuzzyCMeans:Cs,fcm:Cs},gc=rt({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),pc={single:"min",complete:"max"},yc=f(function(e){var r=gc(e),a=pc[r.linkage];return a!=null&&(r.linkage=a),r},"setOptions"),Ds=f(function(e,r,a,n,i){for(var s=0,o=1/0,l,u=i.attributes,h=f(function(D,L){return Tn(i.distance,u.length,function(O){return u[O](D)},function(O){return u[O](L)},D,L)},"getDist"),c=0;c<e.length;c++){var v=e[c].key,d=a[v][n[v]];d<o&&(s=v,o=d)}if(i.mode==="threshold"&&o>=i.threshold||i.mode==="dendrogram"&&e.length===1)return!1;var g=r[s],m=r[n[s]],y;i.mode==="dendrogram"?y={left:g,right:m,key:g.key}:y={value:g.value.concat(m.value),key:g.key},e[g.index]=y,e.splice(m.index,1),r[g.key]=y;for(var p=0;p<e.length;p++){var b=e[p];g.key===b.key?l=1/0:i.linkage==="min"?(l=a[g.key][b.key],a[g.key][b.key]>a[m.key][b.key]&&(l=a[m.key][b.key])):i.linkage==="max"?(l=a[g.key][b.key],a[g.key][b.key]<a[m.key][b.key]&&(l=a[m.key][b.key])):i.linkage==="mean"?l=(a[g.key][b.key]*g.size+a[m.key][b.key]*m.size)/(g.size+m.size):i.mode==="dendrogram"?l=h(b.value,g.value):l=h(b.value[0],g.value[0]),a[g.key][b.key]=a[b.key][g.key]=l}for(var E=0;E<e.length;E++){var S=e[E].key;if(n[S]===g.key||n[S]===m.key){for(var w=S,x=0;x<e.length;x++){var T=e[x].key;a[S][T]<a[S][w]&&(w=T)}n[S]=w}e[E].index=E}return g.key=m.key=g.index=m.index=null,!0},"mergeClosest"),Ya=f(function t(e,r,a){e&&(e.value?r.push(e.value):(e.left&&t(e.left,r),e.right&&t(e.right,r)))},"getAllChildren"),mc=f(function t(e,r){if(!e)return"";if(e.left&&e.right){var a=t(e.left,r),n=t(e.right,r),i=r.add({group:"nodes",data:{id:a+","+n}});return r.add({group:"edges",data:{source:a,target:i.id()}}),r.add({group:"edges",data:{source:n,target:i.id()}}),i.id()}else if(e.value)return e.value.id()},"buildDendrogram"),bc=f(function t(e,r,a){if(!e)return[];var n=[],i=[],s=[];return r===0?(e.left&&Ya(e.left,n),e.right&&Ya(e.right,i),s=n.concat(i),[a.collection(s)]):r===1?e.value?[a.collection(e.value)]:(e.left&&Ya(e.left,n),e.right&&Ya(e.right,i),[a.collection(n),a.collection(i)]):e.value?[a.collection(e.value)]:(e.left&&(n=t(e.left,r-1,a)),e.right&&(i=t(e.right,r-1,a)),n.concat(i))},"buildClustersFromTree"),Ss=f(function(e){for(var r=this.cy(),a=this.nodes(),n=yc(e),i=n.attributes,s=f(function(E,S){return Tn(n.distance,i.length,function(w){return i[w](E)},function(w){return i[w](S)},E,S)},"getDist"),o=[],l=[],u=[],h=[],c=0;c<a.length;c++){var v={value:n.mode==="dendrogram"?a[c]:[a[c]],key:c,index:c};o[c]=v,h[c]=v,l[c]=[],u[c]=0}for(var d=0;d<o.length;d++)for(var g=0;g<=d;g++){var m=void 0;n.mode==="dendrogram"?m=d===g?1/0:s(o[d].value,o[g].value):m=d===g?1/0:s(o[d].value[0],o[g].value[0]),l[d][g]=m,l[g][d]=m,m<l[d][u[d]]&&(u[d]=g)}for(var y=Ds(o,h,l,u,n);y;)y=Ds(o,h,l,u,n);var p;return n.mode==="dendrogram"?(p=bc(o[0],n.dendrogramDepth,r),n.addDendrogram&&mc(o[0],r)):(p=new Array(o.length),o.forEach(function(b,E){b.key=b.index=null,p[E]=r.collection(b.value)})),p},"hierarchicalClustering"),Ec={hierarchicalClustering:Ss,hca:Ss},wc=rt({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),xc=f(function(e){var r=e.damping,a=e.preference;.5<=r&&r<1||Ve("Damping must range on [0.5, 1). Got: ".concat(r));var n=["median","mean","min","max"];return n.some(function(i){return i===a})||oe(a)||Ve("Preference must be one of [".concat(n.map(function(i){return"'".concat(i,"'")}).join(", "),"] or a number. Got: ").concat(a)),wc(e)},"setOptions"),Tc=f(function(e,r,a,n){var i=f(function(o,l){return n[l](o)},"attr");return-Tn(e,n.length,function(s){return i(r,s)},function(s){return i(a,s)},r,a)},"getSimilarity"),Cc=f(function(e,r){var a=null;return r==="median"?a=xh(e):r==="mean"?a=wh(e):r==="min"?a=bh(e):r==="max"?a=Eh(e):a=r,a},"getPreference"),Dc=f(function(e,r,a){for(var n=[],i=0;i<e;i++)r[i*e+i]+a[i*e+i]>0&&n.push(i);return n},"findExemplars"),Ls=f(function(e,r,a){for(var n=[],i=0;i<e;i++){for(var s=-1,o=-1/0,l=0;l<a.length;l++){var u=a[l];r[i*e+u]>o&&(s=u,o=r[i*e+u])}s>0&&n.push(s)}for(var h=0;h<a.length;h++)n[a[h]]=a[h];return n},"assignClusters"),Sc=f(function(e,r,a){for(var n=Ls(e,r,a),i=0;i<a.length;i++){for(var s=[],o=0;o<n.length;o++)n[o]===a[i]&&s.push(o);for(var l=-1,u=-1/0,h=0;h<s.length;h++){for(var c=0,v=0;v<s.length;v++)c+=r[s[v]*e+s[h]];c>u&&(l=h,u=c)}a[i]=s[l]}return n=Ls(e,r,a),n},"assign"),As=f(function(e){for(var r=this.cy(),a=this.nodes(),n=xc(e),i={},s=0;s<a.length;s++)i[a[s].id()]=s;var o,l,u,h,c,v;o=a.length,l=o*o,u=new Array(l);for(var d=0;d<l;d++)u[d]=-1/0;for(var g=0;g<o;g++)for(var m=0;m<o;m++)g!==m&&(u[g*o+m]=Tc(n.distance,a[g],a[m],n.attributes));h=Cc(u,n.preference);for(var y=0;y<o;y++)u[y*o+y]=h;c=new Array(l);for(var p=0;p<l;p++)c[p]=0;
vendor: 3,107 bytes, line 8
8v=new Array(l);for(var b=0;b<l;b++)v[b]=0;for(var E=new Array(o),S=new Array(o),w=new Array(o),x=0;x<o;x++)E[x]=0,S[x]=0,w[x]=0;for(var T=new Array(o*n.minIterations),C=0;C<T.length;C++)T[C]=0;var D;for(D=0;D<n.maxIterations;D++){for(var L=0;L<o;L++){for(var O=-1/0,A=-1/0,I=-1,M=0,P=0;P<o;P++)E[P]=c[L*o+P],M=v[L*o+P]+u[L*o+P],M>=O?(A=O,O=M,I=P):M>A&&(A=M);for(var R=0;R<o;R++)c[L*o+R]=(1-n.damping)*(u[L*o+R]-O)+n.damping*E[R];c[L*o+I]=(1-n.damping)*(u[L*o+I]-A)+n.damping*E[I]}for(var k=0;k<o;k++){for(var B=0,F=0;F<o;F++)E[F]=v[F*o+k],S[F]=Math.max(0,c[F*o+k]),B+=S[F];B-=S[k],S[k]=c[k*o+k],B+=S[k];for(var U=0;U<o;U++)v[U*o+k]=(1-n.damping)*Math.min(0,B-S[U])+n.damping*E[U];v[k*o+k]=(1-n.damping)*(B-S[k])+n.damping*E[k]}for(var V=0,G=0;G<o;G++){var $=v[G*o+G]+c[G*o+G]>0?1:0;T[D%n.minIterations*o+G]=$,V+=$}if(V>0&&(D>=n.minIterations-1||D==n.maxIterations-1)){for(var j=0,Q=0;Q<o;Q++){w[Q]=0;for(var H=0;H<n.minIterations;H++)w[Q]+=T[H*o+Q];(w[Q]===0||w[Q]===n.minIterations)&&j++}if(j===o)break}}for(var te=Dc(o,c,v),_=Sc(o,u,te),z={},Z=0;Z<te.length;Z++)z[te[Z]]=[];for(var K=0;K<a.length;K++){var ie=i[a[K].id()],de=_[ie];de!=null&&z[de].push(a[K])}for(var re=new Array(te.length),se=0;se<te.length;se++)re[se]=r.collection(z[te[se]]);return re},"affinityPropagation"),Lc={affinityPropagation:As,ap:As},Ac=rt({root:void 0,directed:!1}),Oc={hierholzer:f(function(e){if(!De(e)){var r=arguments;e={root:r[0],directed:r[1]}}var a=Ac(e),n=a.root,i=a.directed,s=this,o=!1,l,u,h;n&&(h=ge(n)?this.filter(n)[0].id():n[0].id());var c={},v={};i?s.forEach(function(b){var E=b.id();if(b.isNode()){var S=b.indegree(!0),w=b.outdegree(!0),x=S-w,T=w-S;x==1?l?o=!0:l=E:T==1?u?o=!0:u=E:(T>1||x>1)&&(o=!0),c[E]=[],b.outgoers().forEach(function(C){C.isEdge()&&c[E].push(C.id())})}else v[E]=[void 0,b.target().id()]}):s.forEach(function(b){var E=b.id();if(b.isNode()){var S=b.degree(!0);S%2&&(l?u?o=!0:u=E:l=E),c[E]=[],b.connectedEdges().forEach(function(w){return c[E].push(w.id())})}else v[E]=[b.source().id(),b.target().id()]});var d={found:!1,trail:void 0};if(o)return d;if(u&&l)if(i){if(h&&u!=h)return d;h=u}else{if(h&&u!=h&&l!=h)return d;h||(h=u)}else h||(h=s[0].id());var g=f(function(E){for(var S=E,w=[E],x,T,C;c[S].length;)x=c[S].shift(),T=v[x][0],C=v[x][1],S!=C?(c[C]=c[C].filter(function(D){return D!=x}),S=C):!i&&S!=T&&(c[T]=c[T].filter(function(D){return D!=x}),S=T),w.unshift(x),w.unshift(S);return w},"walk"),m=[],y=[];for(y=g(h);y.length!=1;)c[y[0]].length==0?(m.unshift(s.getElementById(y.shift())),m.unshift(s.getElementById(y.shift()))):y=g(y.shift()).concat(y);m.unshift(s.getElementById(y.shift()));for(var p in c)if(c[p].length)return d;return d.found=!0,d.trail=this.spawn(m,!0),d},"hierholzer")},$a=f(function(){var e=this,r={},a=0,n=0,i=[],s=[],o={},l=f(function(v,d){for(var g=s.length-1,m=[],y=e.spawn();s[g].x!=v||s[g].y!=d;)m.push(s.pop().edge),g--;m.push(s.pop().edge),m.forEach(function(p){var b=p.connectedNodes().intersection(e);y.merge(p),b.forEach(function(E){var S=E.id(),w=E.connectedEdges().intersection(e);y.merge(E),r[S].cutVertex?y.merge(w.filter(function(x){return x.isLoop()}
vendor: 9,503 bytes, line 8
8)):y.merge(w)})}),i.push(y)},"buildComponent"),u=f(function c(v,d,g){v===g&&(n+=1),r[d]={id:a,low:a++,cutVertex:!1};var m=e.getElementById(d).connectedEdges().intersection(e);if(m.size()===0)i.push(e.spawn(e.getElementById(d)));else{var y,p,b,E;m.forEach(function(S){y=S.source().id(),p=S.target().id(),b=y===d?p:y,b!==g&&(E=S.id(),o[E]||(o[E]=!0,s.push({x:d,y:b,edge:S})),b in r?r[d].low=Math.min(r[d].low,r[b].id):(c(v,b,d),r[d].low=Math.min(r[d].low,r[b].low),r[d].id<=r[b].low&&(r[d].cutVertex=!0,l(d,b))))})}},"biconnectedSearch");e.forEach(function(c){if(c.isNode()){var v=c.id();v in r||(n=0,u(v,v),r[v].cutVertex=n>1)}});var h=Object.keys(r).filter(function(c){return r[c].cutVertex}).map(function(c){return e.getElementById(c)});return{cut:e.spawn(h),components:i}},"hopcroftTarjanBiconnected"),Mc={hopcroftTarjanBiconnected:$a,htbc:$a,htb:$a,hopcroftTarjanBiconnectedComponents:$a},_a=f(function(){var e=this,r={},a=0,n=[],i=[],s=e.spawn(e),o=f(function l(u){i.push(u),r[u]={index:a,low:a++,explored:!1};var h=e.getElementById(u).connectedEdges().intersection(e);if(h.forEach(function(m){var y=m.target().id();y!==u&&(y in r||l(y),r[y].explored||(r[u].low=Math.min(r[u].low,r[y].low)))}),r[u].index===r[u].low){for(var c=e.spawn();;){var v=i.pop();if(c.merge(e.getElementById(v)),r[v].low=r[u].index,r[v].explored=!0,v===u)break}var d=c.edgesWith(c),g=c.merge(d);n.push(g),s=s.difference(g)}},"stronglyConnectedSearch");return e.forEach(function(l){if(l.isNode()){var u=l.id();u in r||o(u)}}),{cut:s,components:n}},"tarjanStronglyConnected"),Nc={tarjanStronglyConnected:_a,tsc:_a,tscc:_a,tarjanStronglyConnectedComponents:_a},Jo={};[ma,oh,uh,fh,ch,dh,yh,Yh,Br,Fr,ri,tc,dc,Ec,Lc,Oc,Mc,Nc].forEach(function(t){Ee(Jo,t)});var jo=0,eu=1,tu=2,Xt=f(function t(e){if(!(this instanceof t))return new t(e);this.id="Thenable/1.0.7",this.state=jo,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))},"api");Xt.prototype={fulfill:f(function(e){return Os(this,eu,"fulfillValue",e)},"fulfill"),reject:f(function(e){return Os(this,tu,"rejectReason",e)},"reject"),then:f(function(e,r){var a=this,n=new Xt;return a.onFulfilled.push(Ns(e,n,"fulfill")),a.onRejected.push(Ns(r,n,"reject")),ru(a),n.proxy},"then")};var Os=f(function(e,r,a,n){return e.state===jo&&(e.state=r,e[a]=n,ru(e)),e},"deliver"),ru=f(function(e){e.state===eu?Ms(e,"onFulfilled",e.fulfillValue):e.state===tu&&Ms(e,"onRejected",e.rejectReason)},"execute"),Ms=f(function(e,r,a){if(e[r].length!==0){var n=e[r];e[r]=[];var i=f(function(){for(var o=0;o<n.length;o++)n[o](a)},"func");typeof setImmediate=="function"?setImmediate(i):setTimeout(i,0)}},"execute_handlers"),Ns=f(function(e,r,a){return function(n){if(typeof e!="function")r[a].call(r,n);else{var i;try{i=e(n)}catch(s){r.reject(s);return}Ic(r,i)}}},"resolver"),Ic=f(function t(e,r){if(e===r||e.proxy===r){e.reject(new TypeError("cannot resolve promise with itself"));return}var a;if(qe(r)==="object"&&r!==null||typeof r=="function")try{a=r.then}catch(i){e.reject(i);return}if(typeof a=="function"){var n=!1;try{a.call(r,function(i){n||(n=!0,i===r?e.reject(new TypeError("circular thenable chain")):t(e,i))},function(i){n||(n=!0,e.reject(i))})}catch(i){n||e.reject(i)}return}e.fulfill(r)},"resolve");Xt.all=function(t){return new Xt(function(e,r){for(var a=new Array(t.length),n=0,i=f(function(l,u){a[l]=u,n++,n===t.length&&e(a)},"fulfill"),s=0;s<t.length;s++)(function(o){var l=t[o],u=l!=null&&l.then!=null;if(u)l.then(function(c){i(o,c)},function(c){r(c)});else{var h=l;i(o,h)}})(s)})};Xt.resolve=function(t){return new Xt(function(e,r){e(t)})};Xt.reject=function(t){return new Xt(function(e,r){r(t)})};var _r=typeof Promise<"u"?Promise:Xt,ai=f(function(e,r,a){var n=mi(e),i=!n,s=this._private=Ee({duration:1e3},r,a);if(s.target=e,s.style=s.style||s.css,s.started=!1,s.playing=!1,s.hooked=!1,s.applying=!1,s.progress=0,s.completes=[],s.frames=[],s.complete&&ze(s.complete)&&s.completes.push(s.complete),i){var o=e.position();s.startPosition=s.startPosition||{x:o.x,y:o.y},s.startStyle=s.startStyle||e.cy().style().getAnimationStartStyle(e,s.style)}if(n){var l=e.pan();s.startPan={x:l.x,y:l.y},s.startZoom=e.zoom()}this.length=1,this[0]=this},"Animation"),Er=ai.prototype;Ee(Er,{instanceString:f(function(){return"animation"},"instanceString"),hook:f(function(){var e=this._private;if(!e.hooked){var r,a=e.target._private.animation;e.queue?r=a.queue:r=a.current,r.push(this),yt(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0}return this},"hook"),play:f(function(){var e=this._private;return e.progress===1&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},"play"),playing:f(function(){return this._private.playing},"playing"),apply:f(function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},"apply"),applying:f(function(){return this._private.applying},"applying"),pause:f(function(){var e=this._private;return e.playing=!1,e.started=!1,this},"pause"),stop:f(function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},"stop"),rewind:f(function(){return this.progress(0)},"rewind"),fastforward:f(function(){return this.progress(1)},"fastforward"),time:f(function(e){var r=this._private;return e===void 0?r.progress*r.duration:this.progress(e/r.duration)},"time"),progress:f(function(e){var r=this._private,a=r.playing;return e===void 0?r.progress:(a&&this.pause(),r.progress=e,r.started=!1,a&&this.play(),this)},"progress"),completed:f(function(){return this._private.progress===1},"completed"),reverse:f(function(){var e=this._private,r=e.playing;r&&this.pause(),e.progress=1-e.progress,e.started=!1;var a=f(function(u,h){var c=e[u];c!=null&&(e[u]=e[h],e[h]=c)},"swap");if(a("zoom","startZoom"),a("pan","startPan"),a("position","startPosition"),e.style)for(var n=0;n<e.style.length;n++){var i=e.style[n],s=i.name,o=e.startStyle[s];e.startStyle[s]=i,e.style[n]=o}return r&&this.play(),this},"reverse"),promise:f(function(e){var r=this._private,a;switch(e){case"frame":a=r.frames;break;default:case"complete":case"completed":a=r.completes}return new _r(function(n,i){a.push(function(){n()})})},"promise")});Er.complete=Er.completed;Er.run=Er.play;Er.running=Er.playing;var kc={animated:f(function(){return f(function(){var r=this,a=r.length!==void 0,n=a?r:[r],i=this._private.cy||this;if(!i.styleEnabled())return!1;var s=n[0];if(s)return s._private.animation.current.length>0},"animatedImpl")},"animated"),clearQueue:f(function(){return f(function(){var r=this,a=r.length!==void 0,n=a?r:[r],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var s=0;s<n.length;s++){var o=n[s];o._private.animation.queue=[]}return this},"clearQueueImpl")},"clearQueue"),delay:f(function(){return f(function(r,a){var n=this._private.cy||this;return n.styleEnabled()?this.animate({delay:r,duration:r,complete:a}):this},"delayImpl")},"delay"),delayAnimation:f(function(){return f(function(r,a){var n=this._private.cy||this;return n.styleEnabled()?this.animation({delay:r,duration:r,complete:a}):this},"delayAnimationImpl")},"delayAnimation"),animation:f(function(){return f(function(r,a){var n=this,i=n.length!==void 0,s=i?n:[n],o=this._private.cy||this,l=!i,u=!l;if(!o.styleEnabled())return this;var h=o.style();r=Ee({},r,a);var c=Object.keys(r).length===0;if(c)return new ai(s[0],r);switch(r.duration===void 0&&(r.duration=400),r.duration){case"slow":r.duration=600;break;case"fast":r.duration=200;break}if(u&&(r.style=h.getPropsList(r.style||r.css),r.css=void 0),u&&r.renderedPosition!=null){var v=r.renderedPosition,d=o.pan(),g=o.zoom();r.position=Uo(v,g,d)}if(l&&r.panBy!=null){var m=r.panBy,y=o.pan();r.pan={x:y.x+m.x,y:y.y+m.y}}var p=r.center||r.centre;if(l&&p!=null){var b=o.getCenterPan(p.eles,r.zoom);b!=null&&(r.pan=b)}if(l&&r.fit!=null){var E=r.fit,S=o.getFitViewport(E.eles||E.boundingBox,E.padding);S!=null&&(r.pan=S.pan,r.zoom=S.zoom)}if(l&&De(r.zoom)){var w=o.getZoomedViewport(r.zoom);w!=null?(w.zoomed&&(r.zoom=w.zoom),w.panned&&(r.pan=w.pan)):r.zoom=null}return new ai(s[0],r)},"animationImpl")},"animation"),animate:f(function(){return f(function(r,a){var n=this,i=n.length!==void 0,s=i?n:[n],o=this._private.cy||this;if(!o.styleEnabled())return this;a&&(r=Ee({},r,a));for(var l=0;l<s.length;l++){var u=s[l],h=u.animated()&&(r.queue===void 0||r.queue),c=u.animation(r,h?{queue:!0}:void 0);c.play()}return this},"animateImpl")},"animate"),stop:f(function(){return f(function(r,a){var n=this,i=n.length!==void 0,s=i?n:[n],o=this._private.cy||this;if(!o.styleEnabled())return this;for(var l=0;l<s.length;l++){for(var u=s[l],h=u._private,c=h.animation.current,v=0;v<c.length;v++){var d=c[v],g=d._private;a&&(g.duration=0)}r&&(h.animation.queue=[]),a||(h.animation.current=[])}return o.notify("draw"),this},"stopImpl")},"stop")},Rc=Array.isArray,Cn=Rc,Pc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bc=/^\w*$/;function Fc(t,e){if(Cn(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Aa(t)?!0:Bc.test(t)||!Pc.test(t)||e!=null&&t in Object(e)}f(Fc,"isKey");var Gc=Fc,zc="[object AsyncFunction]",Vc="[object Function]",Uc="[object GeneratorFunction]",Yc="[object Proxy]";function $c(t){if(!pr(t))return!1;var e=Io(t);return e==Vc||e==Uc||e==zc||e==Yc}f($c,"isFunction");var _c=$c,Hc=bn["__core-js_shared__"],Xn=Hc,Is=function(){var t=/[^.]+$/.exec(Xn&&Xn.keys&&Xn.keys.IE_PROTO||"");
vendor: 4,137 bytes, line 8
8return t?"Symbol(src)_1."+t:""}();function Xc(t){return!!Is&&Is in t}f(Xc,"isMasked");var qc=Xc,Wc=Function.prototype,Kc=Wc.toString;function Zc(t){if(t!=null){try{return Kc.call(t)}catch{}try{return t+""}catch{}}return""}f(Zc,"toSource");var Qc=Zc,Jc=/[\\^$.*+?()[\]{}|]/g,jc=/^\[object .+?Constructor\]$/,ev=Function.prototype,tv=Object.prototype,rv=ev.toString,av=tv.hasOwnProperty,nv=RegExp("^"+rv.call(av).replace(Jc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function iv(t){if(!pr(t)||qc(t))return!1;var e=_c(t)?nv:jc;return e.test(Qc(t))}f(iv,"baseIsNative");var sv=iv;function ov(t,e){return t?.[e]}f(ov,"getValue$1");var uv=ov;function lv(t,e){var r=uv(t,e);return sv(r)?r:void 0}f(lv,"getNative");var Li=lv,fv=Li(Object,"create"),wa=fv;function hv(){this.__data__=wa?wa(null):{},this.size=0}f(hv,"hashClear");var cv=hv;function vv(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}f(vv,"hashDelete");var dv=vv,gv="__lodash_hash_undefined__",pv=Object.prototype,yv=pv.hasOwnProperty;function mv(t){var e=this.__data__;if(wa){var r=e[t];return r===gv?void 0:r}return yv.call(e,t)?e[t]:void 0}f(mv,"hashGet");var bv=mv,Ev=Object.prototype,wv=Ev.hasOwnProperty;function xv(t){var e=this.__data__;return wa?e[t]!==void 0:wv.call(e,t)}f(xv,"hashHas");var Tv=xv,Cv="__lodash_hash_undefined__";function Dv(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=wa&&e===void 0?Cv:e,this}f(Dv,"hashSet");var Sv=Dv;function Hr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}f(Hr,"Hash");Hr.prototype.clear=cv;Hr.prototype.delete=dv;Hr.prototype.get=bv;Hr.prototype.has=Tv;Hr.prototype.set=Sv;var ks=Hr;function Lv(){this.__data__=[],this.size=0}f(Lv,"listCacheClear");var Av=Lv;function Ov(t,e){return t===e||t!==t&&e!==e}f(Ov,"eq");var au=Ov;function Mv(t,e){for(var r=t.length;r--;)if(au(t[r][0],e))return r;return-1}f(Mv,"assocIndexOf");var Dn=Mv,Nv=Array.prototype,Iv=Nv.splice;function kv(t){var e=this.__data__,r=Dn(e,t);if(r<0)return!1;var a=e.length-1;return r==a?e.pop():Iv.call(e,r,1),--this.size,!0}f(kv,"listCacheDelete");var Rv=kv;function Pv(t){var e=this.__data__,r=Dn(e,t);return r<0?void 0:e[r][1]}f(Pv,"listCacheGet");var Bv=Pv;function Fv(t){return Dn(this.__data__,t)>-1}f(Fv,"listCacheHas");var Gv=Fv;function zv(t,e){var r=this.__data__,a=Dn(r,t);return a<0?(++this.size,r.push([t,e])):r[a][1]=e,this}f(zv,"listCacheSet");var Vv=zv;function Xr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}f(Xr,"ListCache");Xr.prototype.clear=Av;Xr.prototype.delete=Rv;Xr.prototype.get=Bv;Xr.prototype.has=Gv;Xr.prototype.set=Vv;var Uv=Xr,Yv=Li(bn,"Map"),$v=Yv;function _v(){this.size=0,this.__data__={hash:new ks,map:new($v||Uv),string:new ks}}f(_v,"mapCacheClear");var Hv=_v;function Xv(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}f(Xv,"isKeyable");var qv=Xv;function Wv(t,e){var r=t.__data__;return qv(e)?r[typeof e=="string"?"string":"hash"]:r.map}f(Wv,"getMapData");var Sn=Wv;function Kv(t){var e=Sn(this,t).delete(t);return this.size-=e?1:0,e}f(Kv,"mapCacheDelete");var Zv=Kv;function Qv(t){return Sn(this,t).get(t)}f(Qv,"mapCacheGet");var Jv=Qv;function jv(t){return Sn(this,t).has(t)}f(jv,"mapCacheHas");var ed=jv;function td(t,e){var r=Sn(this,t),a=r.size;return r.set(t,e),this.size+=r.size==a?0:1,this}f(td,"mapCacheSet");var rd=td;function qr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}f(qr,"MapCache");qr.prototype.clear=Hv;qr.prototype.delete=Zv;qr.prototype.get=Jv;qr.prototype.has=ed;qr.prototype.set=rd;var nu=qr,ad="Expected a function";function Ai(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(ad);var r=f(function(){var a=arguments,n=e?e.apply(this,a):a[0],i=r.cache;if(i.has(n))return i.get(n);var s=t.apply(this,a);return r.cache=i.set(n,s)||i,s},"memoized");return r.cache=new(Ai.Cache||nu),r}f(Ai,"memoize");Ai.Cache=nu;var nd=Ai,id=500;function sd(t){var e=nd(t,function(a){return r.size===id&&r.clear(),a}
vendor: 4,901 bytes, line 8
8),r=e.cache;return e}f(sd,"memoizeCapped");var od=sd,ud=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ld=/\\(\\)?/g,fd=od(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(ud,function(r,a,n,i){e.push(n?i.replace(ld,"$1"):a||r)}),e}),iu=fd;function hd(t,e){for(var r=-1,a=t==null?0:t.length,n=Array(a);++r<a;)n[r]=e(t[r],r,t);return n}f(hd,"arrayMap");var su=hd,cd=1/0,Rs=zr?zr.prototype:void 0,Ps=Rs?Rs.toString:void 0;function ou(t){if(typeof t=="string")return t;if(Cn(t))return su(t,ou)+"";if(Aa(t))return Ps?Ps.call(t):"";var e=t+"";return e=="0"&&1/t==-cd?"-0":e}f(ou,"baseToString");var vd=ou;function dd(t){return t==null?"":vd(t)}f(dd,"toString$1");var uu=dd;function gd(t,e){return Cn(t)?t:Gc(t,e)?[t]:iu(uu(t))}f(gd,"castPath");var lu=gd,pd=1/0;function yd(t){if(typeof t=="string"||Aa(t))return t;var e=t+"";return e=="0"&&1/t==-pd?"-0":e}f(yd,"toKey");var Oi=yd;function md(t,e){e=lu(e,t);for(var r=0,a=e.length;t!=null&&r<a;)t=t[Oi(e[r++])];return r&&r==a?t:void 0}f(md,"baseGet");var bd=md;function Ed(t,e,r){var a=t==null?void 0:bd(t,e);return a===void 0?r:a}f(Ed,"get");var wd=Ed,xd=function(){try{var t=Li(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Bs=xd;function Td(t,e,r){e=="__proto__"&&Bs?Bs(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}f(Td,"baseAssignValue");var Cd=Td,Dd=Object.prototype,Sd=Dd.hasOwnProperty;function Ld(t,e,r){var a=t[e];(!(Sd.call(t,e)&&au(a,r))||r===void 0&&!(e in t))&&Cd(t,e,r)}f(Ld,"assignValue");var Ad=Ld,Od=9007199254740991,Md=/^(?:0|[1-9]\d*)$/;function Nd(t,e){var r=typeof t;return e=e??Od,!!e&&(r=="number"||r!="symbol"&&Md.test(t))&&t>-1&&t%1==0&&t<e}f(Nd,"isIndex");var Id=Nd;function kd(t,e,r,a){if(!pr(t))return t;e=lu(e,t);for(var n=-1,i=e.length,s=i-1,o=t;o!=null&&++n<i;){var l=Oi(e[n]),u=r;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(n!=s){var h=o[l];u=a?a(h,l,o):void 0,u===void 0&&(u=pr(h)?h:Id(e[n+1])?[]:{})}Ad(o,l,u),o=o[l]}return t}f(kd,"baseSet");var Rd=kd;function Pd(t,e,r){return t==null?t:Rd(t,e,r)}f(Pd,"set");var Bd=Pd;function Fd(t,e){var r=-1,a=t.length;for(e||(e=Array(a));++r<a;)e[r]=t[r];return e}f(Fd,"copyArray");var Gd=Fd;function zd(t){return Cn(t)?su(t,Oi):Aa(t)?[t]:Gd(iu(uu(t)))}f(zd,"toPath");var Vd=zd,Ud={data:f(function(e){var r={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:f(function(n){},"beforeGet"),beforeSet:f(function(n,i){},"beforeSet"),onSet:f(function(n){},"onSet"),canSet:f(function(n){return!0},"canSet")};return e=Ee({},r,e),f(function(n,i){var s=e,o=this,l=o.length!==void 0,u=l?o:[o],h=l?o[0]:o;if(ge(n)){var c=n.indexOf(".")!==-1,v=c&&Vd(n);if(s.allowGetting&&i===void 0){var d;return h&&(s.beforeGet(h),v&&h._private[s.field][n]===void 0?d=wd(h._private[s.field],v):d=h._private[s.field][n]),d}else if(s.allowSetting&&i!==void 0){var g=!s.immutableKeys[n];if(g){var m=wo({},n,i);s.beforeSet(o,m);for(var y=0,p=u.length;y<p;y++){var b=u[y];s.canSet(b)&&(v&&h._private[s.field][n]===void 0?Bd(b._private[s.field],v,i):b._private[s.field][n]=i)}s.updateStyle&&o.updateStyle(),s.onSet(o),s.settingTriggersEvent&&o[s.triggerFnName](s.settingEvent)}}}else if(s.allowSetting&&De(n)){var E=n,S,w,x=Object.keys(E);s.beforeSet(o,E);for(var T=0;T<x.length;T++){S=x[T],w=E[S];var C=!s.immutableKeys[S];if(C)for(var D=0;D<u.length;D++){var L=u[D];s.canSet(L)&&(L._private[s.field][S]=w)}}s.updateStyle&&o.updateStyle(),s.onSet(o),s.settingTriggersEvent&&o[s.triggerFnName](s.settingEvent)}else if(s.allowBinding&&ze(n)){var O=n;o.on(s.bindingEvent,O)}else if(s.allowGetting&&n===void 0){var A;return h&&(s.beforeGet(h),A=h._private[s.field]),A}return o},"dataImpl")},"data"),removeData:f(function(e){var r={field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}};return e=Ee({},r,e),f(function(n){var i=e,s=this,o=s.length!==void 0,l=o?s:[s];if(ge(n)){for(var u=n.split(/\s+/),h=u.length,c=0;c<h;c++){var v=u[c];if(!rr(v)){var d=!i.immutableKeys[v];if(d)for(var g=0,m=l.length;g<m;g++)l[g]._private[i.field][v]=void 0}}i.triggerEvent&&s[i.triggerFnName](i.event)}else if(n===void 0){for(var y=0,p=l.length;y<p;y++)for(var b=l[y]._private[i.field],E=Object.keys(b),S=0;S<E.length;S++){var w=E[S],x=!i.immutableKeys[w];x&&(b[w]=void 0)}i.triggerEvent&&s[i.triggerFnName](i.event)}return s},"removeDataImpl")},"removeData")},Yd={eventAliasesOn:f(function(e){var r=e;r.addListener=r.listen=r.bind=r.on,r.unlisten=r.unbind=r.off=r.removeListener,r.trigger=r.emit,r.pon=r.promiseOn=function(a,n){var i=this,s=Array.prototype.slice.call(arguments,0);return new _r(function(o,l){var u=f(function(d){i.off.apply(i,c),o(d)},"callback"),h=s.concat([u]),c=h.concat([]);i.on.apply(i,h)})}},"eventAliasesOn")},Me={};
vendor: 27,428 bytes, line 8
8[kc,Ud,Yd].forEach(function(t){Ee(Me,t)});var $d={animate:Me.animate(),animation:Me.animation(),animated:Me.animated(),clearQueue:Me.clearQueue(),delay:Me.delay(),delayAnimation:Me.delayAnimation(),stop:Me.stop()},ja={classes:f(function(e){var r=this;if(e===void 0){var a=[];return r[0]._private.classes.forEach(function(g){return a.push(g)}),a}else Re(e)||(e=(e||"").match(/\S+/g)||[]);for(var n=[],i=new $r(e),s=0;s<r.length;s++){for(var o=r[s],l=o._private,u=l.classes,h=!1,c=0;c<e.length;c++){var v=e[c],d=u.has(v);if(!d){h=!0;break}}h||(h=u.size!==e.length),h&&(l.classes=i,n.push(o))}return n.length>0&&this.spawn(n).updateStyle().emit("class"),r},"classes"),addClass:f(function(e){return this.toggleClass(e,!0)},"addClass"),hasClass:f(function(e){var r=this[0];return r!=null&&r._private.classes.has(e)},"hasClass"),toggleClass:f(function(e,r){Re(e)||(e=e.match(/\S+/g)||[]);for(var a=this,n=r===void 0,i=[],s=0,o=a.length;s<o;s++)for(var l=a[s],u=l._private.classes,h=!1,c=0;c<e.length;c++){var v=e[c],d=u.has(v),g=!1;r||n&&!d?(u.add(v),g=!0):(!r||n&&d)&&(u.delete(v),g=!0),!h&&g&&(i.push(l),h=!0)}return i.length>0&&this.spawn(i).updateStyle().emit("class"),a},"toggleClass"),removeClass:f(function(e){return this.toggleClass(e,!1)},"removeClass"),flashClass:f(function(e,r){var a=this;if(r==null)r=250;else if(r===0)return a;return a.addClass(e),setTimeout(function(){a.removeClass(e)},r),a},"flashClass")};ja.className=ja.classNames=ja.classes;var Ce={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:Xe,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Ce.variable="(?:[\\w-.]|(?:\\\\"+Ce.metaChar+"))+";Ce.className="(?:[\\w-]|(?:\\\\"+Ce.metaChar+"))+";Ce.value=Ce.string+"|"+Ce.number;Ce.id=Ce.variable;(function(){var t,e,r;for(t=Ce.comparatorOp.split("|"),r=0;r<t.length;r++)e=t[r],Ce.comparatorOp+="|@"+e;for(t=Ce.comparatorOp.split("|"),r=0;r<t.length;r++)e=t[r],!(e.indexOf("!")>=0)&&e!=="="&&(Ce.comparatorOp+="|\\!"+e)})();var Ie=f(function(){return{checks:[]}},"newQuery"),fe={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},ni=[{selector:":selected",matches:f(function(e){return e.selected()},"matches")},{selector:":unselected",matches:f(function(e){return!e.selected()},"matches")},{selector:":selectable",matches:f(function(e){return e.selectable()},"matches")},{selector:":unselectable",matches:f(function(e){return!e.selectable()},"matches")},{selector:":locked",matches:f(function(e){return e.locked()},"matches")},{selector:":unlocked",matches:f(function(e){return!e.locked()},"matches")},{selector:":visible",matches:f(function(e){return e.visible()},"matches")},{selector:":hidden",matches:f(function(e){return!e.visible()},"matches")},{selector:":transparent",matches:f(function(e){return e.transparent()},"matches")},{selector:":grabbed",matches:f(function(e){return e.grabbed()},"matches")},{selector:":free",matches:f(function(e){return!e.grabbed()},"matches")},{selector:":removed",matches:f(function(e){return e.removed()},"matches")},{selector:":inside",matches:f(function(e){return!e.removed()},"matches")},{selector:":grabbable",matches:f(function(e){return e.grabbable()},"matches")},{selector:":ungrabbable",matches:f(function(e){return!e.grabbable()},"matches")},{selector:":animated",matches:f(function(e){return e.animated()},"matches")},{selector:":unanimated",matches:f(function(e){return!e.animated()},"matches")},{selector:":parent",matches:f(function(e){return e.isParent()},"matches")},{selector:":childless",matches:f(function(e){return e.isChildless()},"matches")},{selector:":child",matches:f(function(e){return e.isChild()},"matches")},{selector:":orphan",matches:f(function(e){return e.isOrphan()},"matches")},{selector:":nonorphan",matches:f(function(e){return e.isChild()},"matches")},{selector:":compound",matches:f(function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()},"matches")},{selector:":loop",matches:f(function(e){return e.isLoop()},"matches")},{selector:":simple",matches:f(function(e){return e.isSimple()},"matches")},{selector:":active",matches:f(function(e){return e.active()},"matches")},{selector:":inactive",matches:f(function(e){return!e.active()},"matches")},{selector:":backgrounding",matches:f(function(e){return e.backgrounding()},"matches")},{selector:":nonbackgrounding",matches:f(function(e){return!e.backgrounding()},"matches")}].sort(function(t,e){return ef(t.selector,e.selector)}),_d=function(){for(var t={},e,r=0;r<ni.length;r++)e=ni[r],t[e.selector]=e.matches;return t}(),Hd=f(function(e,r){return _d[e](r)},"stateSelectorMatches"),Xd="("+ni.map(function(t){return t.selector}).join("|")+")",Lr=f(function(e){return e.replace(new RegExp("\\\\("+Ce.metaChar+")","g"),function(r,a){return a})},"cleanMetaChars"),Qt=f(function(e,r,a){e[e.length-1]=a},"replaceLastQuery"),ii=[{name:"group",query:!0,regex:"("+Ce.group+")",populate:f(function(e,r,a){var n=At(a,1),i=n[0];r.checks.push({type:fe.GROUP,value:i==="*"?i:i+"s"})},"populate")},{name:"state",query:!0,regex:Xd,populate:f(function(e,r,a){var n=At(a,1),i=n[0];r.checks.push({type:fe.STATE,value:i})},"populate")},{name:"id",query:!0,regex:"\\#("+Ce.id+")",populate:f(function(e,r,a){var n=At(a,1),i=n[0];r.checks.push({type:fe.ID,value:Lr(i)})},"populate")},{name:"className",query:!0,regex:"\\.("+Ce.className+")",populate:f(function(e,r,a){var n=At(a,1),i=n[0];r.checks.push({type:fe.CLASS,value:Lr(i)})},"populate")},{name:"dataExists",query:!0,regex:"\\[\\s*("+Ce.variable+")\\s*\\]",populate:f(function(e,r,a){var n=At(a,1),i=n[0];r.checks.push({type:fe.DATA_EXIST,field:Lr(i)})},"populate")},{name:"dataCompare",query:!0,regex:"\\[\\s*("+Ce.variable+")\\s*("+Ce.comparatorOp+")\\s*("+Ce.value+")\\s*\\]",populate:f(function(e,r,a){var n=At(a,3),i=n[0],s=n[1],o=n[2],l=new RegExp("^"+Ce.string+"$").exec(o)!=null;l?o=o.substring(1,o.length-1):o=parseFloat(o),r.checks.push({type:fe.DATA_COMPARE,field:Lr(i),operator:s,value:o})},"populate")},{name:"dataBool",query:!0,regex:"\\[\\s*("+Ce.boolOp+")\\s*("+Ce.variable+")\\s*\\]",populate:f(function(e,r,a){var n=At(a,2),i=n[0],s=n[1];r.checks.push({type:fe.DATA_BOOL,field:Lr(s),operator:i})},"populate")},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+Ce.meta+")\\s*("+Ce.comparatorOp+")\\s*("+Ce.number+")\\s*\\]\\]",populate:f(function(e,r,a){var n=At(a,3),i=n[0],s=n[1],o=n[2];r.checks.push({type:fe.META_COMPARE,field:Lr(i),operator:s,value:parseFloat(o)})},"populate")},{name:"nextQuery",separator:!0,regex:Ce.separator,populate:f(function(e,r){var a=e.currentSubject,n=e.edgeCount,i=e.compoundCount,s=e[e.length-1];a!=null&&(s.subject=a,e.currentSubject=null),s.edgeCount=n,s.compoundCount=i,e.edgeCount=0,e.compoundCount=0;var o=e[e.length++]=Ie();return o},"populate")},{name:"directedEdge",separator:!0,regex:Ce.directedEdge,populate:f(function(e,r){if(e.currentSubject==null){var a=Ie(),n=r,i=Ie();return a.checks.push({type:fe.DIRECTED_EDGE,source:n,target:i}),Qt(e,r,a),e.edgeCount++,i}else{var s=Ie(),o=r,l=Ie();return s.checks.push({type:fe.NODE_SOURCE,source:o,target:l}),Qt(e,r,s),e.edgeCount++,l}},"populate")},{name:"undirectedEdge",separator:!0,regex:Ce.undirectedEdge,populate:f(function(e,r){if(e.currentSubject==null){var a=Ie(),n=r,i=Ie();return a.checks.push({type:fe.UNDIRECTED_EDGE,nodes:[n,i]}),Qt(e,r,a),e.edgeCount++,i}else{var s=Ie(),o=r,l=Ie();return s.checks.push({type:fe.NODE_NEIGHBOR,node:o,neighbor:l}),Qt(e,r,s),l}},"populate")},{name:"child",separator:!0,regex:Ce.child,populate:f(function(e,r){if(e.currentSubject==null){var a=Ie(),n=Ie(),i=e[e.length-1];return a.checks.push({type:fe.CHILD,parent:i,child:n}),Qt(e,r,a),e.compoundCount++,n}else if(e.currentSubject===r){var s=Ie(),o=e[e.length-1],l=Ie(),u=Ie(),h=Ie(),c=Ie();return s.checks.push({type:fe.COMPOUND_SPLIT,left:o,right:l,subject:u}),u.checks=r.checks,r.checks=[{type:fe.TRUE}],c.checks.push({type:fe.TRUE}),l.checks.push({type:fe.PARENT,parent:c,child:h}),Qt(e,o,s),e.currentSubject=u,e.compoundCount++,h}else{var v=Ie(),d=Ie(),g=[{type:fe.PARENT,parent:v,child:d}];return v.checks=r.checks,r.checks=g,e.compoundCount++,d}},"populate")},{name:"descendant",separator:!0,regex:Ce.descendant,populate:f(function(e,r){if(e.currentSubject==null){var a=Ie(),n=Ie(),i=e[e.length-1];return a.checks.push({type:fe.DESCENDANT,ancestor:i,descendant:n}),Qt(e,r,a),e.compoundCount++,n}else if(e.currentSubject===r){var s=Ie(),o=e[e.length-1],l=Ie(),u=Ie(),h=Ie(),c=Ie();return s.checks.push({type:fe.COMPOUND_SPLIT,left:o,right:l,subject:u}),u.checks=r.checks,r.checks=[{type:fe.TRUE}],c.checks.push({type:fe.TRUE}),l.checks.push({type:fe.ANCESTOR,ancestor:c,descendant:h}),Qt(e,o,s),e.currentSubject=u,e.compoundCount++,h}else{var v=Ie(),d=Ie(),g=[{type:fe.ANCESTOR,ancestor:v,descendant:d}];return v.checks=r.checks,r.checks=g,e.compoundCount++,d}},"populate")},{name:"subject",modifier:!0,regex:Ce.subject,populate:f(function(e,r){if(e.currentSubject!=null&&e.currentSubject!==r)return Ne("Redefinition of subject in selector `"+e.toString()+"`"),!1;e.currentSubject=r;var a=e[e.length-1],n=a.checks[0],i=n==null?null:n.type;i===fe.DIRECTED_EDGE?n.type=fe.NODE_TARGET:i===fe.UNDIRECTED_EDGE&&(n.type=fe.NODE_NEIGHBOR,n.node=n.nodes[1],n.neighbor=n.nodes[0],n.nodes=null)},"populate")}];ii.forEach(function(t){return t.regexObj=new RegExp("^"+t.regex)});var qd=f(function(e){for(var r,a,n,i=0;i<ii.length;i++){var s=ii[i],o=s.name,l=e.match(s.regexObj);if(l!=null){a=l,r=s,n=o;var u=l[0];e=e.substring(u.length);break}}return{expr:r,match:a,name:n,remaining:e}},"consumeExpr"),Wd=f(function(e){var r=e.match(/^\s+/);if(r){var a=r[0];e=e.substring(a.length)}return e},"consumeWhitespace"),Kd=f(function(e){var r=this,a=r.inputText=e,n=r[0]=Ie();for(r.length=1,a=Wd(a);;){var i=qd(a);if(i.expr==null)return Ne("The selector `"+e+"`is invalid"),!1;var s=i.match.slice(1),o=i.expr.populate(r,n,s);if(o===!1)return!1;if(o!=null&&(n=o),a=i.remaining,a.match(/^\s*$/))break}var l=r[r.length-1];r.currentSubject!=null&&(l.subject=r.currentSubject),l.edgeCount=r.edgeCount,l.compoundCount=r.compoundCount;for(var u=0;u<r.length;u++){var h=r[u];if(h.compoundCount>0&&h.edgeCount>0)return Ne("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(h.edgeCount>1)return Ne("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;h.edgeCount===1&&Ne("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},"parse"),Zd=f(function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=f(function(h){return h??""},"clean"),r=f(function(h){return ge(h)?'"'+h+'"':e(h)},"cleanVal"),a=f(function(h){return" "+h+" "},"space"),n=f(function(h,c){var v=h.type,d=h.value;switch(v){case fe.GROUP:{var g=e(d);return g.substring(0,g.length-1)}case fe.DATA_COMPARE:{var m=h.field,y=h.operator;return"["+m+a(e(y))+r(d)+"]"}case fe.DATA_BOOL:{var p=h.operator,b=h.field;return"["+e(p)+b+"]"}case fe.DATA_EXIST:{var E=h.field;return"["+E+"]"}case fe.META_COMPARE:{var S=h.operator,w=h.field;return"[["+w+a(e(S))+r(d)+"]]"}case fe.STATE:return d;case fe.ID:return"#"+d;case fe.CLASS:return"."+d;case fe.PARENT:case fe.CHILD:return i(h.parent,c)+a(">")+i(h.child,c);case fe.ANCESTOR:case fe.DESCENDANT:return i(h.ancestor,c)+" "+i(h.descendant,c);case fe.COMPOUND_SPLIT:{var x=i(h.left,c),T=i(h.subject,c),C=i(h.right,c);return x+(x.length>0?" ":"")+T+C}case fe.TRUE:return""}},"checkToString"),i=f(function(h,c){return h.checks.reduce(function(v,d,g){return v+(c===h&&g===0?"$":"")+n(d,c)},"")},"queryToString"),s="",o=0;o<this.length;o++){var l=this[o];s+=i(l,l.subject),this.length>1&&o<this.length-1&&(s+=", ")}return this.toStringCache=s,s},"toString"),Qd={parse:Kd,toString:Zd},fu=f(function(e,r,a){var n,i=ge(e),s=oe(e),o=ge(a),l,u,h=!1,c=!1,v=!1;switch(r.indexOf("!")>=0&&(r=r.replace("!",""),c=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),h=!0),(i||o||h)&&(l=!i&&!s?"":""+e,u=""+a),h&&(e=l=l.toLowerCase(),a=u=u.toLowerCase()),r){case"*=":n=l.indexOf(u)>=0;break;case"$=":n=l.indexOf(u,l.length-u.length)>=0;break;case"^=":n=l.indexOf(u)===0;break;case"=":n=e===a;break;case">":v=!0,n=e>a;break;case">=":v=!0,n=e>=a;break;case"<":v=!0,n=e<a;break;case"<=":v=!0,n=e<=a;break;default:n=!1;break}return c&&(e!=null||!v)&&(n=!n),n},"valCmp"),Jd=f(function(e,r){switch(r){case"?":return!!e;case"!":return!e;case"^":return e===void 0}},"boolCmp"),jd=f(function(e){return e!==void 0},"existCmp"),Mi=f(function(e,r){return e.data(r)},"data"),eg=f(function(e,r){return e[r]()},"meta"),Ue=[],Fe=f(function(e,r){return e.checks.every(function(a){return Ue[a.type](a,r)})},"matches");Ue[fe.GROUP]=function(t,e){var r=t.value;return r==="*"||r===e.group()};Ue[fe.STATE]=function(t,e){var r=t.value;return Hd(r,e)};Ue[fe.ID]=function(t,e){var r=t.value;return e.id()===r};Ue[fe.CLASS]=function(t,e){var r=t.value;return e.hasClass(r)};Ue[fe.META_COMPARE]=function(t,e){var r=t.field,a=t.operator,n=t.value;return fu(eg(e,r),a,n)};Ue[fe.DATA_COMPARE]=function(t,e){var r=t.field,a=t.operator,n=t.value;return fu(Mi(e,r),a,n)};Ue[fe.DATA_BOOL]=function(t,e){var r=t.field,a=t.operator;return Jd(Mi(e,r),a)};Ue[fe.DATA_EXIST]=function(t,e){var r=t.field;return t.operator,jd(Mi(e,r))};Ue[fe.UNDIRECTED_EDGE]=function(t,e){var r=t.nodes[0],a=t.nodes[1],n=e.source(),i=e.target();return Fe(r,n)&&Fe(a,i)||Fe(a,n)&&Fe(r,i)};Ue[fe.NODE_NEIGHBOR]=function(t,e){return Fe(t.node,e)&&e.neighborhood().some(function(r){return r.isNode()&&Fe(t.neighbor,r)})};Ue[fe.DIRECTED_EDGE]=function(t,e){return Fe(t.source,e.source())&&Fe(t.target,e.target())};Ue[fe.NODE_SOURCE]=function(t,e){return Fe(t.source,e)&&e.outgoers().some(function(r){return r.isNode()&&Fe(t.target,r)})};Ue[fe.NODE_TARGET]=function(t,e){return Fe(t.target,e)&&e.incomers().some(function(r){return r.isNode()&&Fe(t.source,r)})};Ue[fe.CHILD]=function(t,e){return Fe(t.child,e)&&Fe(t.parent,e.parent())};Ue[fe.PARENT]=function(t,e){return Fe(t.parent,e)&&e.children().some(function(r){return Fe(t.child,r)})};Ue[fe.DESCENDANT]=function(t,e){return Fe(t.descendant,e)&&e.ancestors().some(function(r){return Fe(t.ancestor,r)})};Ue[fe.ANCESTOR]=function(t,e){return Fe(t.ancestor,e)&&e.descendants().some(function(r){return Fe(t.descendant,r)})};Ue[fe.COMPOUND_SPLIT]=function(t,e){return Fe(t.subject,e)&&Fe(t.left,e)&&Fe(t.right,e)};Ue[fe.TRUE]=function(){return!0};Ue[fe.COLLECTION]=function(t,e){var r=t.value;return r.has(e)};Ue[fe.FILTER]=function(t,e){var r=t.value;return r(e)};var tg=f(function(e){var r=this;if(r.length===1&&r[0].checks.length===1&&r[0].checks[0].type===fe.ID)return e.getElementById(r[0].checks[0].value).collection();var a=f(function(i){for(var s=0;s<r.length;s++){var o=r[s];if(Fe(o,i))return!0}return!1},"selectorFunction");return r.text()==null&&(a=f(function(){return!0},"selectorFunction")),e.filter(a)},"filter"),rg=f(function(e){for(var r=this,a=0;a<r.length;a++){var n=r[a];if(Fe(n,e))return!0}return!1},"matches"),ag={matches:rg,filter:tg},nr=f(function(e){this.inputText=e,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,e==null||ge(e)&&e.match(/^\s*$/)||(yt(e)?this.addQuery({checks:[{type:fe.COLLECTION,value:e.collection()}]}):ze(e)?this.addQuery({checks:[{type:fe.FILTER,value:e}]}):ge(e)?this.parse(e)||(this.invalid=!0):Ve("A selector must be created from a string; found "))},"Selector"),ir=nr.prototype;[Qd,ag].forEach(function(t){return Ee(ir,t)});ir.text=function(){return this.inputText};ir.size=function(){return this.length};ir.eq=function(t){return this[t]};ir.sameText=function(t){return!this.invalid&&!t.invalid&&this.text()===t.text()};ir.addQuery=function(t){this[this.length++]=t};ir.selector=ir.toString;var er={allAre:f(function(e){var r=new nr(e);return this.every(function(a){return r.matches(a)})},"allAre"),is:f(function(e){var r=new nr(e);return this.some(function(a){return r.matches(a)})},"is"),some:f(function(e,r){for(var a=0;a<this.length;a++){var n=r?e.apply(r,[this[a],a,this]):e(this[a],a,this);if(n)return!0}return!1},"some"),every:f(function(e,r){for(var a=0;a<this.length;a++){var n=r?e.apply(r,[this[a],a,this]):e(this[a],a,this);if(!n)return!1}return!0},"every"),same:f(function(e){if(this===e)return!0;e=this.cy().collection(e);var r=this.length,a=e.length;return r!==a?!1:r===1?this[0]===e[0]:this.every(function(n){return e.hasElementWithId(n.id())})},"same"),anySame:f(function(e){return e=this.cy().collection(e),this.some(function(r){return e.hasElementWithId(r.id())})},"anySame"),allAreNeighbors:f(function(e){e=this.cy().collection(e);var r=this.neighborhood();return e.every(function(a){return r.hasElementWithId(a.id())})},"allAreNeighbors"),contains:f(function(e){e=this.cy().collection(e);var r=this;return e.every(function(a){return r.hasElementWithId(a.id())})},"contains")};er.allAreNeighbours=er.allAreNeighbors;er.has=er.contains;er.equal=er.equals=er.same;var xt=f(function(e,r){return f(function(n,i,s,o){var l=n,u=this,h;if(l==null?h="":yt(l)&&l.length===1&&(h=l.id()),u.length===1&&h){var c=u[0]._private,v=c.traversalCache=c.traversalCache||{},d=v[r]=v[r]||[],g=yr(h),m=d[g];return m||(d[g]=e.call(u,n,i,s,o))}else return e.call(u,n,i,s,o)},"traversalCache")},"cache"),Yr={parent:f(function(e){var r=[];if(this.length===1){var a=this[0]._private.parent;if(a)return a}for(var n=0;n<this.length;n++){var i=this[n],s=i._private.parent;s&&r.push(s)}return this.spawn(r,!0).filter(e)},"parent"),parents:f(function(e){for(var r=[],a=this.parent();a.nonempty();){for(var n=0;n<a.length;n++){var i=a[n];r.push(i)}a=a.parent()}return this.spawn(r,!0).filter(e)},"parents"),commonAncestors:f(function(e){for(var r,a=0;a<this.length;a++){var n=this[a],i=n.parents();r=r||i,r=r.intersect(i)}return r.filter(e)},"commonAncestors"),orphans:f(function(e){return this.stdFilter(function(r){return r.isOrphan()}).filter(e)},"orphans"),nonorphans:f(function(e){return this.stdFilter(function(r){return r.isChild()}).filter(e)},"nonorphans"),children:xt(function(t){for(var e=[],r=0;r<this.length;r++)for(var a=this[r],n=a._private.children,i=0;i<n.length;i++)e.push(n[i]);return this.spawn(e,!0).filter(t)},"children"),siblings:f(function(e){return this.parent().children().not(this).filter(e)},"siblings"),isParent:f(function(){var e=this[0];if(e)return e.isNode()&&e._private.children.length!==0},"isParent"),isChildless:f(function(){var e=this[0];if(e)return e.isNode()&&e._private.children.length===0},"isChildless"),isChild:f(function(){var e=this[0];if(e)return e.isNode()&&e._private.parent!=null},"isChild"),isOrphan:f(function(){var e=this[0];if(e)return e.isNode()&&e._private.parent==null},"isOrphan"),descendants:f(function(e){var r=[];function a(n){for(var i=0;i<n.length;i++){var s=n[i];r.push(s),s.children().nonempty()&&a(s.children())}}return f(a,"add"),a(this.children()),this.spawn(r,!0).filter(e)},"descendants")};function Ni(t,e,r,a){for(var n=[],i=new $r,s=t.cy(),o=s.hasCompoundNodes(),l=0;l<t.length;l++){var u=t[l];r?n.push(u):o&&a(n,i,u)}for(;n.length>0;){var h=n.shift();e(h),i.add(h.id()),o&&a(n,i,h)}return t}f(Ni,"forEachCompound");function hu(t,e,r){if(r.isParent())for(var a=r._private.children,n=0;n<a.length;n++){var i=a[n];e.has(i.id())||t.push(i)}}f(hu,"addChildren");Yr.forEachDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return Ni(this,t,e,hu)};function cu(t,e,r){if(r.isChild()){var a=r._private.parent;e.has(a.id())||t.push(a)}}f(cu,"addParent");Yr.forEachUp=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return Ni(this,t,e,cu)};function ng(t,e,r){cu(t,e,r),hu(t,e,r)}f(ng,"addParentAndChildren");Yr.forEachUpAndDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return Ni(this,t,e,ng)};Yr.ancestors=Yr.parents;var xa,vu;xa=vu={data:Me.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:Me.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Me.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Me.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Me.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Me.removeData({field:"rscratch",triggerEvent:!1}),id:f(function(){var e=this[0];if(e)return e._private.data.id},"id")};xa.attr=xa.data;xa.removeAttr=xa.removeData;var ig=vu,Ln={};function qn(t){return function(e){var r=this;if(e===void 0&&(e=!0),r.length!==0)if(r.isNode()&&!r.removed()){for(var a=0,n=r[0],i=n._private.edges,s=0;s<i.length;s++){var o=i[s];!e&&o.isLoop()||(a+=t(n,o))}return a}else return}}f(qn,"defineDegreeFunction");Ee(Ln,{degree:qn(function(t,e){return e.source().same(e.target())?2:1}),indegree:qn(function(t,e){return e.target().same(t)?1:0}),outdegree:qn(function(t,e){return e.source().same(t)?1:0})});function Ar(t,e){return function(r){for(var a,n=this.nodes(),i=0;i<n.length;i++){var s=n[i],o=s[t](r);o!==void 0&&(a===void 0||e(o,a))&&(a=o)}return a}}f(Ar,"defineDegreeBoundsFunction");Ee(Ln,{minDegree:Ar("degree",function(t,e){return t<e}),maxDegree:Ar("degree",function(t,e){return t>e}),minIndegree:Ar("indegree",function(t,e){return t<e}),maxIndegree:Ar("indegree",function(t,e){return t>e}),minOutdegree:Ar("outdegree",function(t,e){return t<e}),maxOutdegree:Ar("outdegree",function(t,e){return t>e})});Ee(Ln,{totalDegree:f(function(e){for(var r=0,a=this.nodes(),n=0;n<a.length;n++)r+=a[n].degree(e);return r},"totalDegree")});var Nt,du,gu=f(function(e,r,a){for(var n=0;n<e.length;n++){var i=e[n];if(!i.locked()){var s=i._private.position,o={x:r.x!=null?r.x-s.x:0,y:r.y!=null?r.y-s.y:0};i.isParent()&&!(o.x===0&&o.y===0)&&i.children().shift(o,a),i.dirtyBoundingBoxCache()}}},"beforePositionSet"),Fs={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:f(function(e){e.updateCompoundBounds()},"beforeGet"),beforeSet:f(function(e,r){gu(e,r,!1)},"beforeSet"),onSet:f(function(e){e.dirtyCompoundBoundsCache()},"onSet"),canSet:f(function(e){return!e.locked()},"canSet")};Nt=du={position:Me.data(Fs),silentPosition:Me.data(Ee({},Fs,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:f(function(e,r){gu(e,r,!0)},"beforeSet"),onSet:f(function(e){e.dirtyCompoundBoundsCache()},"onSet")})),positions:f(function(e,r){if(De(e))r?this.silentPosition(e):this.position(e);else if(ze(e)){var a=e,n=this.cy();n.startBatch();for(var i=0;i<this.length;i++){var s=this[i],o=void 0;(o=a(s,i))&&(r?s.silentPosition(o):s.position(o))}n.endBatch()}return this},"positions"),silentPositions:f(function(e){return this.positions(e,!0)},"silentPositions"),shift:f(function(e,r,a){var n;if(De(e)?(n={x:oe(e.x)?e.x:0,y:oe(e.y)?e.y:0},a=r):ge(e)&&oe(r)&&(n={x:0,y:0},n[e]=r),n!=null){var i=this.cy();i.startBatch();for(var s=0;s<this.length;s++){var o=this[s];if(!(i.hasCompoundNodes()&&o.isChild()&&o.ancestors().anySame(this))){var l=o.position(),u={x:l.x+n.x,y:l.y+n.y};a?o.silentPosition(u):o.position(u)}}i.endBatch()}return this},"shift"),silentShift:f(function(e,r){return De(e)?this.shift(e,!0):ge(e)&&oe(r)&&this.shift(e,r,!0),this},"silentShift"),renderedPosition:f(function(e,r){var a=this[0],n=this.cy(),i=n.zoom(),s=n.pan(),o=De(e)?e:void 0,l=o!==void 0||r!==void 0&&ge(e);if(a&&a.isNode())if(l)for(var u=0;u<this.length;u++){var h=this[u];r!==void 0?h.position(e,(r-s[e])/i):o!==void 0&&h.position(Uo(o,i,s))}else{var c=a.position();return o=xn(c,i,s),e===void 0?o:o[e]}else if(!l)return;return this},"renderedPosition"),relativePosition:f(function(e,r){var a=this[0],n=this.cy(),i=De(e)?e:void 0,s=i!==void 0||r!==void 0&&ge(e),o=n.hasCompoundNodes();if(a&&a.isNode())if(s)for(var l=0;l<this.length;l++){var u=this[l],h=o?u.parent():null,c=h&&h.length>0,v=c;c&&(h=h[0]);var d=v?h.position():{x:0,y:0};r!==void 0?u.position(e,r+d[e]):i!==void 0&&u.position({x:i.x+d.x,y:i.y+d.y})}else{var g=a.position(),m=o?a.parent():null,y=m&&m.length>0,p=y;y&&(m=m[0]);var b=p?m.position():{x:0,y:0};return i={x:g.x-b.x,y:g.y-b.y},e===void 0?i:i[e]}else if(!s)return;return this},"relativePosition")};Nt.modelPosition=Nt.point=Nt.position;Nt.modelPositions=Nt.points=Nt.positions;Nt.renderedPoint=Nt.renderedPosition;Nt.relativePoint=Nt.relativePosition;var sg=du,Gr,or;Gr=or={};or.renderedBoundingBox=function(t){var e=this.boundingBox(t),r=this.cy(),a=r.zoom(),n=r.pan(),i=e.x1*a+n.x,s=e.x2*a+n.x,o=e.y1*a+n.y,l=e.y2*a+n.y;return{x1:i,x2:s,y1:o,y2:l,w:s-i,h:l-o}};or.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(r){if(r.isParent()){var a=r._private;a.compoundBoundsClean=!1,a.bbCache=null,t||r.emitAndNotify("bounds")}}),this)};or.updateCompoundBounds=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function r(s){if(!s.isParent())return;var o=s._private,l=s.children(),u=s.pstyle("compound-sizing-wrt-labels").value==="include",h={width:{val:s.pstyle("min-width").pfValue,left:s.pstyle("min-width-bias-left"),right:s.pstyle("min-width-bias-right")},height:{val:s.pstyle("min-height").pfValue,top:s.pstyle("min-height-bias-top"),bottom:s.pstyle("min-height-bias-bottom")}},c=l.boundingBox({includeLabels:u,includeOverlays:!1,useCache:!1}),v=o.position;(c.w===0||c.h===0)&&(c={w:s.pstyle("width").pfValue,h:s.pstyle("height").pfValue},c.x1=v.x-c.w/2,c.x2=v.x+c.w/2,c.y1=v.y-c.h/2,c.y2=v.y+c.h/2);function d(D,L,O){var A=0,I=0,M=L+O;return D>0&&M>0&&(A=L/M*D,I=O/M*D),{biasDiff:A,biasComplementDiff:I}}f(d,"computeBiasValues");function g(D,L,O,A){if(O.units==="%")switch(A){case"width":return D>0?O.pfValue*D:0;case"height":return L>0?O.pfValue*L:0;case"average":return D>0&&L>0?O.pfValue*(D+L)/2:0;case"min":return D>0&&L>0?D>L?O.pfValue*L:O.pfValue*D:0;case"max":return D>0&&L>0?D>L?O.pfValue*D:O.pfValue*L:0;default:return 0}else return O.units==="px"?O.pfValue:0}f(g,"computePaddingValues");var m=h.width.left.value;h.width.left.units==="px"&&h.width.val>0&&(m=m*100/h.width.val);var y=h.width.right.value;h.width.right.units==="px"&&h.width.val>0&&(y=y*100/h.width.val);
vendor: 10,065 bytes, line 8
8var p=h.height.top.value;h.height.top.units==="px"&&h.height.val>0&&(p=p*100/h.height.val);var b=h.height.bottom.value;h.height.bottom.units==="px"&&h.height.val>0&&(b=b*100/h.height.val);var E=d(h.width.val-c.w,m,y),S=E.biasDiff,w=E.biasComplementDiff,x=d(h.height.val-c.h,p,b),T=x.biasDiff,C=x.biasComplementDiff;o.autoPadding=g(c.w,c.h,s.pstyle("padding"),s.pstyle("padding-relative-to").value),o.autoWidth=Math.max(c.w,h.width.val),v.x=(-S+c.x1+c.x2+w)/2,o.autoHeight=Math.max(c.h,h.height.val),v.y=(-T+c.y1+c.y2+C)/2}f(r,"update");for(var a=0;a<this.length;a++){var n=this[a],i=n._private;(!i.compoundBoundsClean||t)&&(r(n),e.batching()||(i.compoundBoundsClean=!0))}return this};var wt=f(function(e){return e===1/0||e===-1/0?0:e},"noninf"),Ot=f(function(e,r,a,n,i){n-r===0||i-a===0||r==null||a==null||n==null||i==null||(e.x1=r<e.x1?r:e.x1,e.x2=n>e.x2?n:e.x2,e.y1=a<e.y1?a:e.y1,e.y2=i>e.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},"updateBounds"),cr=f(function(e,r){return r==null?e:Ot(e,r.x1,r.y1,r.x2,r.y2)},"updateBoundsFromBox"),ia=f(function(e,r,a){return Mt(e,r,a)},"prefixedProperty"),Ha=f(function(e,r,a){if(!r.cy().headless()){var n=r._private,i=n.rstyle,s=i.arrowWidth/2,o=r.pstyle(a+"-arrow-shape").value,l,u;if(o!=="none"){a==="source"?(l=i.srcX,u=i.srcY):a==="target"?(l=i.tgtX,u=i.tgtY):(l=i.midX,u=i.midY);var h=n.arrowBounds=n.arrowBounds||{},c=h[a]=h[a]||{};c.x1=l-s,c.y1=u-s,c.x2=l+s,c.y2=u+s,c.w=c.x2-c.x1,c.h=c.y2-c.y1,Qa(c,1),Ot(e,c.x1,c.y1,c.x2,c.y2)}}},"updateBoundsFromArrow"),Wn=f(function(e,r,a){if(!r.cy().headless()){var n;a?n=a+"-":n="";var i=r._private,s=i.rstyle,o=r.pstyle(n+"label").strValue;if(o){var l=r.pstyle("text-halign"),u=r.pstyle("text-valign"),h=ia(s,"labelWidth",a),c=ia(s,"labelHeight",a),v=ia(s,"labelX",a),d=ia(s,"labelY",a),g=r.pstyle(n+"text-margin-x").pfValue,m=r.pstyle(n+"text-margin-y").pfValue,y=r.isEdge(),p=r.pstyle(n+"text-rotation"),b=r.pstyle("text-outline-width").pfValue,E=r.pstyle("text-border-width").pfValue,S=E/2,w=r.pstyle("text-background-padding").pfValue,x=2,T=c,C=h,D=C/2,L=T/2,O,A,I,M;if(y)O=v-D,A=v+D,I=d-L,M=d+L;else{switch(l.value){case"left":O=v-C,A=v;break;case"center":O=v-D,A=v+D;break;case"right":O=v,A=v+C;break}switch(u.value){case"top":I=d-T,M=d;break;case"center":I=d-L,M=d+L;break;case"bottom":I=d,M=d+T;break}}O+=g-Math.max(b,S)-w-x,A+=g+Math.max(b,S)+w+x,I+=m-Math.max(b,S)-w-x,M+=m+Math.max(b,S)+w+x;var P=a||"main",R=i.labelBounds,k=R[P]=R[P]||{};k.x1=O,k.y1=I,k.x2=A,k.y2=M,k.w=A-O,k.h=M-I;var B=y&&p.strValue==="autorotate",F=p.pfValue!=null&&p.pfValue!==0;if(B||F){var U=B?ia(i.rstyle,"labelAngle",a):p.pfValue,V=Math.cos(U),G=Math.sin(U),$=(O+A)/2,j=(I+M)/2;if(!y){switch(l.value){case"left":$=A;break;case"right":$=O;break}switch(u.value){case"top":j=M;break;case"bottom":j=I;break}}var Q=f(function(de,re){return de=de-$,re=re-j,{x:de*V-re*G+$,y:de*G+re*V+j}},"rotate"),H=Q(O,I),te=Q(O,M),_=Q(A,I),z=Q(A,M);O=Math.min(H.x,te.x,_.x,z.x),A=Math.max(H.x,te.x,_.x,z.x),I=Math.min(H.y,te.y,_.y,z.y),M=Math.max(H.y,te.y,_.y,z.y)}var Z=P+"Rot",K=R[Z]=R[Z]||{};K.x1=O,K.y1=I,K.x2=A,K.y2=M,K.w=A-O,K.h=M-I,Ot(e,O,I,A,M),Ot(i.labelBounds.all,O,I,A,M)}return e}},"updateBoundsFromLabel"),og=f(function(e,r){if(!r.cy().headless()){var a=r.pstyle("outline-opacity").value,n=r.pstyle("outline-width").value;if(a>0&&n>0){var i=r.pstyle("outline-offset").value,s=r.pstyle("shape").value,o=n+i,l=(e.w+o*2)/e.w,u=(e.h+o*2)/e.h,h=0,c=0;["diamond","pentagon","round-triangle"].includes(s)?(l=(e.w+o*2.4)/e.w,c=-o/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(s)?l=(e.w+o*2.4)/e.w:s==="star"?(l=(e.w+o*2.8)/e.w,u=(e.h+o*2.6)/e.h,c=-o/3.8):s==="triangle"?(l=(e.w+o*2.8)/e.w,u=(e.h+o*2.4)/e.h,c=-o/1.4):s==="vee"&&(l=(e.w+o*4.4)/e.w,u=(e.h+o*3.8)/e.h,c=-o*.5);var v=e.h*u-e.h,d=e.w*l-e.w;if(Ja(e,[Math.ceil(v/2),Math.ceil(d/2)]),h!=0||c!==0){var g=Ah(e,h,c);$o(e,g)}}}},"updateBoundsFromOutline"),ug=f(function(e,r){var a=e._private.cy,n=a.styleEnabled(),i=a.headless(),s=pt(),o=e._private,l=e.isNode(),u=e.isEdge(),h,c,v,d,g,m,y=o.rstyle,p=l&&n?e.pstyle("bounds-expansion").pfValue:[0],b=f(function(le){return le.pstyle("display").value!=="none"},"isDisplayed"),E=!n||b(e)&&(!u||b(e.source())&&b(e.target()));if(E){var S=0,w=0;n&&r.includeOverlays&&(S=e.pstyle("overlay-opacity").value,S!==0&&(w=e.pstyle("overlay-padding").value));var x=0,T=0;n&&r.includeUnderlays&&(x=e.pstyle("underlay-opacity").value,x!==0&&(T=e.pstyle("underlay-padding").value));var C=Math.max(w,T),D=0,L=0;if(n&&(D=e.pstyle("width").pfValue,L=D/2),l&&r.includeNodes){var O=e.position();g=O.x,m=O.y;var A=e.outerWidth(),I=A/2,M=e.outerHeight(),P=M/2;h=g-I,c=g+I,v=m-P,d=m+P,Ot(s,h,v,c,d),n&&r.includeOutlines&&og(s,e)}else if(u&&r.includeEdges)if(n&&!i){var R=e.pstyle("curve-style").strValue;if(h=Math.min(y.srcX,y.midX,y.tgtX),c=Math.max(y.srcX,y.midX,y.tgtX),v=Math.min(y.srcY,y.midY,y.tgtY),d=Math.max(y.srcY,y.midY,y.tgtY),h-=L,c+=L,v-=L,d+=L,Ot(s,h,v,c,d),R==="haystack"){var k=y.haystackPts;if(k&&k.length===2){if(h=k[0].x,v=k[0].y,c=k[1].x,d=k[1].y,h>c){var B=h;h=c,c=B}if(v>d){var F=v;v=d,d=F}Ot(s,h-L,v-L,c+L,d+L)}}else if(R==="bezier"||R==="unbundled-bezier"||R.endsWith("segments")||R.endsWith("taxi")){var U;switch(R){case"bezier":case"unbundled-bezier":U=y.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":U=y.linePts;break}if(U!=null)for(var V=0;V<U.length;V++){var G=U[V];h=G.x-L,c=G.x+L,v=G.y-L,d=G.y+L,Ot(s,h,v,c,d)}}}else{var $=e.source(),j=$.position(),Q=e.target(),H=Q.position();if(h=j.x,c=H.x,v=j.y,d=H.y,h>c){var te=h;h=c,c=te}if(v>d){var _=v;v=d,d=_}h-=L,c+=L,v-=L,d+=L,Ot(s,h,v,c,d)}if(n&&r.includeEdges&&u&&(Ha(s,e,"mid-source"),Ha(s,e,"mid-target"),Ha(s,e,"source"),Ha(s,e,"target")),n){var z=e.pstyle("ghost").value==="yes";if(z){var Z=e.pstyle("ghost-offset-x").pfValue,K=e.pstyle("ghost-offset-y").pfValue;Ot(s,s.x1+Z,s.y1+K,s.x2+Z,s.y2+K)}}var ie=o.bodyBounds=o.bodyBounds||{};ps(ie,s),Ja(ie,p),Qa(ie,1),n&&(h=s.x1,c=s.x2,v=s.y1,d=s.y2,Ot(s,h-C,v-C,c+C,d+C));var de=o.overlayBounds=o.overlayBounds||{};ps(de,s),Ja(de,p),Qa(de,1);var re=o.labelBounds=o.labelBounds||{};re.all!=null?Lh(re.all):re.all=pt(),n&&r.includeLabels&&(r.includeMainLabels&&Wn(s,e,null),u&&(r.includeSourceLabels&&Wn(s,e,"source"),r.includeTargetLabels&&Wn(s,e,"target")))}return s.x1=wt(s.x1),s.y1=wt(s.y1),s.x2=wt(s.x2),s.y2=wt(s.y2),s.w=wt(s.x2-s.x1),s.h=wt(s.y2-s.y1),s.w>0&&s.h>0&&E&&(Ja(s,p),Qa(s,1)),s},"boundingBoxImpl"),pu=f(function(e){var r=0,a=f(function(s){return(s?1:0)<<r++},"tf"),n=0;return n+=a(e.incudeNodes),n+=a(e.includeEdges),n+=a(e.includeLabels),n+=a(e.includeMainLabels),n+=a(e.includeSourceLabels),n+=a(e.includeTargetLabels),n+=a(e.includeOverlays),n+=a(e.includeOutlines),n},"getKey"),yu=f(function(e){if(e.isEdge()){var r=e.source().position(),a=e.target().position(),n=f(function(s){return Math.round(s)},"r");return Wf([n(r.x),n(r.y),n(a.x),n(a.y)])}else return 0},"getBoundingBoxPosKey"),Gs=f(function(e,r){var a=e._private,n,i=e.isEdge(),s=r==null?zs:pu(r),o=s===zs,l=yu(e),u=a.bbCachePosKey===l,h=r.useCache&&u,c=f(function(m){return m._private.bbCache==null||m._private.styleDirty},"isDirty"),v=!h||c(e)||i&&c(e.source())||c(e.target());if(v?(u||e.recalculateRenderedStyle(h),n=ug(e,Ta),a.bbCache=n,a.bbCachePosKey=l):n=a.bbCache,!o){var d=e.isNode();n=pt(),(r.includeNodes&&d||r.includeEdges&&!d)&&(r.includeOverlays?cr(n,a.overlayBounds):cr(n,a.bodyBounds)),r.includeLabels&&(r.includeMainLabels&&(!i||r.includeSourceLabels&&r.includeTargetLabels)?cr(n,a.labelBounds.all):(r.includeMainLabels&&cr(n,a.labelBounds.mainRot),r.includeSourceLabels&&cr(n,a.labelBounds.sourceRot),r.includeTargetLabels&&cr(n,a.labelBounds.targetRot))),n.w=n.x2-n.x1,n.h=n.y2-n.y1}return n},"cachedBoundingBoxImpl"),Ta={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},zs=pu(Ta),Vs=rt(Ta);or.boundingBox=function(t){var e;if(this.length===1&&this[0]._private.bbCache!=null&&!this[0]._private.styleDirty&&(t===void 0||t.useCache===void 0||t.useCache===!0))t===void 0?t=Ta:t=Vs(t),e=Gs(this[0],t);else{e=pt(),t=t||Ta;var r=Vs(t),a=this,n=a.cy(),i=n.styleEnabled();if(i)for(var s=0;s<a.length;s++){var o=a[s],l=o._private,u=yu(o),h=l.bbCachePosKey===u,c=r.useCache&&h&&!l.styleDirty;o.recalculateRenderedStyle(c)}this.updateCompoundBounds(!t.useCache);for(var v=0;v<a.length;v++){var d=a[v];cr(e,Gs(d,r))}}return e.x1=wt(e.x1),e.y1=wt(e.y1),e.x2=wt(e.x2),e.y2=wt(e.y2),e.w=wt(e.x2-e.x1),e.h=wt(e.y2-e.y1),e};or.dirtyBoundingBoxCache=function(){for(var t=0;t<this.length;t++){var e=this[t]._private;e.bbCache=null,e.bbCachePosKey=null,e.bodyBounds=null,e.overlayBounds=null,e.labelBounds.all=null,e.labelBounds.source=null,e.labelBounds.target=null,e.labelBounds.main=null,e.labelBounds.sourceRot=null,e.labelBounds.targetRot=null,e.labelBounds.mainRot=null,e.arrowBounds.source=null,e.arrowBounds.target=null,e.arrowBounds["mid-source"]=null,e.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this};or.boundingBoxAt=function(t){var e=this.nodes(),r=this.cy(),a=r.hasCompoundNodes(),n=r.collection();if(a&&(n=e.filter(function(u){return u.isParent()}),e=e.not(n)),De(t)){var i=t;t=f(function(){return i},"fn")}var s=f(function(h,c){return h._private.bbAtOldPos=t(h,c)},"storeOldPos"),o=f(function(h){return h._private.bbAtOldPos},"getOldPos");r.startBatch(),e.forEach(s).silentPositions(t),a&&(n.dirtyCompoundBoundsCache(),n.dirtyBoundingBoxCache(),n.updateCompoundBounds(!0));var l=Sh(this.boundingBox({useCache:!1}));return e.silentPositions(o),a&&(n.dirtyCompoundBoundsCache(),n.dirtyBoundingBoxCache(),n.updateCompoundBounds(!0)),r.endBatch(),l};Gr.boundingbox=Gr.bb=Gr.boundingBox;Gr.renderedBoundingbox=Gr.renderedBoundingBox;var lg=or,ha,Ma;ha=Ma={};var mu=f(function(e){e.uppercaseName=ls(e.name),e.autoName="auto"+e.uppercaseName,e.labelName="label"+e.uppercaseName,e.outerName="outer"+e.uppercaseName,e.uppercaseOuterName=ls(e.outerName),ha[e.name]=f(function(){var a=this[0],n=a._private,i=n.
vendor: 56,424 bytes, line 8
8cy,s=i._private.styleEnabled;if(a)if(s){if(a.isParent())return a.updateCompoundBounds(),n[e.autoName]||0;var o=a.pstyle(e.name);switch(o.strValue){case"label":return a.recalculateRenderedStyle(),n.rstyle[e.labelName]||0;default:return o.pfValue}}else return 1},"dimImpl"),ha["outer"+e.uppercaseName]=f(function(){var a=this[0],n=a._private,i=n.cy,s=i._private.styleEnabled;if(a)if(s){var o=a[e.name](),l=a.pstyle("border-width").pfValue,u=2*a.padding();return o+l+u}else return 1},"outerDimImpl"),ha["rendered"+e.uppercaseName]=f(function(){var a=this[0];if(a){var n=a[e.name]();return n*this.cy().zoom()}},"renderedDimImpl"),ha["rendered"+e.uppercaseOuterName]=f(function(){var a=this[0];if(a){var n=a[e.outerName]();return n*this.cy().zoom()}},"renderedOuterDimImpl")},"defineDimFns");mu({name:"width"});mu({name:"height"});Ma.padding=function(){var t=this[0],e=t._private;return t.isParent()?(t.updateCompoundBounds(),e.autoPadding!==void 0?e.autoPadding:t.pstyle("padding").pfValue):t.pstyle("padding").pfValue};Ma.paddedHeight=function(){var t=this[0];return t.height()+2*t.padding()};Ma.paddedWidth=function(){var t=this[0];return t.width()+2*t.padding()};var fg=Ma,hg=f(function(e,r){if(e.isEdge())return r(e)},"ifEdge"),cg=f(function(e,r){if(e.isEdge()){var a=e.cy();return xn(r(e),a.zoom(),a.pan())}},"ifEdgeRenderedPosition"),vg=f(function(e,r){if(e.isEdge()){var a=e.cy(),n=a.pan(),i=a.zoom();return r(e).map(function(s){return xn(s,i,n)})}},"ifEdgeRenderedPositions"),dg=f(function(e){return e.renderer().getControlPoints(e)},"controlPoints"),gg=f(function(e){return e.renderer().getSegmentPoints(e)},"segmentPoints"),pg=f(function(e){return e.renderer().getSourceEndpoint(e)},"sourceEndpoint"),yg=f(function(e){return e.renderer().getTargetEndpoint(e)},"targetEndpoint"),mg=f(function(e){return e.renderer().getEdgeMidpoint(e)},"midpoint"),Us={controlPoints:{get:dg,mult:!0},segmentPoints:{get:gg,mult:!0},sourceEndpoint:{get:pg},targetEndpoint:{get:yg},midpoint:{get:mg}},bg=f(function(e){return"rendered"+e[0].toUpperCase()+e.substr(1)},"renderedName"),Eg=Object.keys(Us).reduce(function(t,e){var r=Us[e],a=bg(e);return t[e]=function(){return hg(this,r.get)},r.mult?t[a]=function(){return vg(this,r.get)}:t[a]=function(){return cg(this,r.get)},t},{}),wg=Ee({},sg,lg,fg,Eg);var bu=f(function(e,r){this.recycle(e,r)},"Event");function sa(){return!1}f(sa,"returnFalse");function Xa(){return!0}f(Xa,"returnTrue");bu.prototype={instanceString:f(function(){return"event"},"instanceString"),recycle:f(function(e,r){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=sa,e!=null&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?Xa:sa):e!=null&&e.type?r=e:this.type=e,r!=null&&(this.originalEvent=r.originalEvent,this.type=r.type!=null?r.type:this.type,this.cy=r.cy,this.target=r.target,this.position=r.position,this.renderedPosition=r.renderedPosition,this.namespace=r.namespace,this.layout=r.layout),this.cy!=null&&this.position!=null&&this.renderedPosition==null){var a=this.position,n=this.cy.zoom(),i=this.cy.pan();this.renderedPosition={x:a.x*n+i.x,y:a.y*n+i.y}}this.timeStamp=e&&e.timeStamp||Date.now()},"recycle"),preventDefault:f(function(){this.isDefaultPrevented=Xa;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},"preventDefault"),stopPropagation:f(function(){this.isPropagationStopped=Xa;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},"stopPropagation"),stopImmediatePropagation:f(function(){this.isImmediatePropagationStopped=Xa,this.stopPropagation()},"stopImmediatePropagation"),isDefaultPrevented:sa,isPropagationStopped:sa,isImmediatePropagationStopped:sa};var Eu=/^([^.]+)(\.(?:[^.]+))?$/,xg=".*",wu={qualifierCompare:f(function(e,r){return e===r},"qualifierCompare"),eventMatches:f(function(){return!0},"eventMatches"),addEventFields:f(function(){},"addEventFields"),callbackContext:f(function(e){return e},"callbackContext"),beforeEmit:f(function(){},"beforeEmit"),afterEmit:f(function(){},"afterEmit"),bubble:f(function(){return!1},"bubble"),parent:f(function(){return null},"parent"),context:null},Ys=Object.keys(wu),Tg={};function An(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tg,e=arguments.length>1?arguments[1]:void 0,r=0;r<Ys.length;r++){var a=Ys[r];this[a]=t[a]||wu[a]}this.context=e||this.context,this.listeners=[],this.emitting=0}f(An,"Emitter");var sr=An.prototype,xu=f(function(e,r,a,n,i,s,o){ze(n)&&(i=n,n=null),o&&(s==null?s=o:s=Ee({},s,o));for(var l=Re(a)?a:a.split(/\s+/),u=0;u<l.length;u++){var h=l[u];if(!rr(h)){var c=h.match(Eu);if(c){var v=c[1],d=c[2]?c[2]:null,g=r(e,h,v,d,n,i,s);if(g===!1)break}}}},"forEachEvent"),$s=f(function(e,r){return e.addEventFields(e.context,r),new bu(r.type,r)},"makeEventObj"),Cg=f(function(e,r,a){if($l(a)){r(e,a);return}else if(De(a)){r(e,$s(e,a));return}for(var n=Re(a)?a:a.split(/\s+/),i=0;i<n.length;i++){var s=n[i];if(!rr(s)){var o=s.match(Eu);if(o){var l=o[1],u=o[2]?o[2]:null,h=$s(e,{type:l,namespace:u,target:e.context});r(e,h)}}}},"forEachEventObj");sr.on=sr.addListener=function(t,e,r,a,n){return xu(this,function(i,s,o,l,u,h,c){ze(h)&&i.listeners.push({event:s,callback:h,type:o,namespace:l,qualifier:u,conf:c})},t,e,r,a,n),this};sr.one=function(t,e,r,a){return this.on(t,e,r,a,{one:!0})};sr.removeListener=sr.off=function(t,e,r,a){var n=this;this.emitting!==0&&(this.listeners=jf(this.listeners));for(var i=this.listeners,s=f(function(u){var h=i[u];xu(n,function(c,v,d,g,m,y){if((h.type===d||t==="*")&&(!g&&h.namespace!==".*"||h.namespace===g)&&(!m||c.qualifierCompare(h.qualifier,m))&&(!y||h.callback===y))return i.splice(u,1),!1},t,e,r,a)},"_loop"),o=i.length-1;o>=0;o--)s(o);return this};sr.removeAllListeners=function(){return this.removeListener("*")};sr.emit=sr.trigger=function(t,e,r){var a=this.listeners,n=a.length;return this.emitting++,Re(e)||(e=[e]),Cg(this,function(i,s){r!=null&&(a=[{event:s.event,type:s.type,namespace:s.namespace,callback:r}],n=a.length);for(var o=f(function(h){var c=a[h];if(c.type===s.type&&(!c.namespace||c.namespace===s.namespace||c.namespace===xg)&&i.eventMatches(i.context,c,s)){var v=[s];e!=null&&th(v,e),i.beforeEmit(i.context,c,s),c.conf&&c.conf.one&&(i.listeners=i.listeners.filter(function(m){return m!==c}));var d=i.callbackContext(i.context,c,s),g=c.callback.apply(d,v);i.afterEmit(i.context,c,s),g===!1&&(s.stopPropagation(),s.preventDefault())}},"_loop2"),l=0;l<n;l++)o(l);i.bubble(i.context)&&!s.isPropagationStopped()&&i.parent(i.context).emit(s,e)},t),this.emitting--,this};var Dg={qualifierCompare:f(function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},"qualifierCompare"),eventMatches:f(function(e,r,a){var n=r.qualifier;return n!=null?e!==a.target&&La(a.target)&&n.matches(a.target):!0},"eventMatches"),addEventFields:f(function(e,r){r.cy=e.cy(),r.target=e},"addEventFields"),callbackContext:f(function(e,r,a){return r.qualifier!=null?a.target:e},"callbackContext"),beforeEmit:f(function(e,r){r.conf&&r.conf.once&&r.conf.onceCollection.removeListener(r.event,r.qualifier,r.callback)},"beforeEmit"),bubble:f(function(){return!0},"bubble"),parent:f(function(e){return e.isChild()?e.parent():e.cy()},"parent")},qa=f(function(e){return ge(e)?new nr(e):e},"argSelector"),Tu={createEmitter:f(function(){for(var e=0;e<this.length;e++){var r=this[e],a=r._private;a.emitter||(a.emitter=new An(Dg,r))}return this},"createEmitter"),emitter:f(function(){return this._private.emitter},"emitter"),on:f(function(e,r,a){for(var n=qa(r),i=0;i<this.length;i++){var s=this[i];s.emitter().on(e,n,a)}return this},"on"),removeListener:f(function(e,r,a){for(var n=qa(r),i=0;i<this.length;i++){var s=this[i];s.emitter().removeListener(e,n,a)}return this},"removeListener"),removeAllListeners:f(function(){for(var e=0;e<this.length;e++){var r=this[e];r.emitter().removeAllListeners()}return this},"removeAllListeners"),one:f(function(e,r,a){for(var n=qa(r),i=0;i<this.length;i++){var s=this[i];s.emitter().one(e,n,a)}return this},"one"),once:f(function(e,r,a){for(var n=qa(r),i=0;i<this.length;i++){var s=this[i];s.emitter().on(e,n,a,{once:!0,onceCollection:this})}},"once"),emit:f(function(e,r){for(var a=0;a<this.length;a++){var n=this[a];n.emitter().emit(e,r)}return this},"emit"),emitAndNotify:f(function(e,r){if(this.length!==0)return this.cy().notify(e,this),this.emit(e,r),this},"emitAndNotify")};Me.eventAliasesOn(Tu);var Cu={nodes:f(function(e){return this.filter(function(r){return r.isNode()}).filter(e)},"nodes"),edges:f(function(e){return this.filter(function(r){return r.isEdge()}).filter(e)},"edges"),byGroup:f(function(){for(var e=this.spawn(),r=this.spawn(),a=0;a<this.length;a++){var n=this[a];n.isNode()?e.push(n):r.push(n)}return{nodes:e,edges:r}},"byGroup"),filter:f(function(e,r){if(e===void 0)return this;if(ge(e)||yt(e))return new nr(e).filter(this);if(ze(e)){for(var a=this.spawn(),n=this,i=0;i<n.length;i++){var s=n[i],o=r?e.apply(r,[s,i,n]):e(s,i,n);o&&a.push(s)}return a}return this.spawn()},"filter"),not:f(function(e){if(e){ge(e)&&(e=this.filter(e));for(var r=this.spawn(),a=0;a<this.length;a++){var n=this[a],i=e.has(n);i||r.push(n)}return r}else return this},"not"),absoluteComplement:f(function(){var e=this.cy();return e.mutableElements().not(this)},"absoluteComplement"),intersect:f(function(e){if(ge(e)){var r=e;return this.filter(r)}for(var a=this.spawn(),n=this,i=e,s=this.length<e.length,o=s?n:i,l=s?i:n,u=0;u<o.length;u++){var h=o[u];l.has(h)&&a.push(h)}return a},"intersect"),xor:f(function(e){var r=this._private.cy;ge(e)&&(e=r.$(e));var a=this.spawn(),n=this,i=e,s=f(function(l,u){for(var h=0;h<l.length;h++){var c=l[h],v=c._private.data.id,d=u.hasElementWithId(v);d||a.push(c)}},"add");return s(n,i),s(i,n),a},"xor"),diff:f(function(e){var r=this._private.cy;ge(e)&&(e=r.$(e));var a=this.spawn(),n=this.spawn(),i=this.spawn(),s=this,o=e,l=f(function(h,c,v){for(var d=0;d<h.length;d++){var g=h[d],m=g._private.data.id,y=c.hasElementWithId(m);y?i.merge(g):v.push(g)}},"add");return l(s,o,a),l(o,s,n),{left:a,right:n,both:i}},"diff"),add:f(function(e){var r=this._private.cy;if(!e)return this;if(ge(e)){var a=e;e=r.mutableElements().filter(a)}for(var n=this.spawnSelf(),i=0;i<e.length;i++){var s=e[i],o=!this.has(s);o&&n.push(s)}return n},"add"),merge:f(function(e){var r=this._private,a=r.cy;if(!e)return this;if(e&&ge(e)){var n=e;e=a.mutableElements().filter(n)}for(var i=r.map,s=0;s<e.length;s++){var o=e[s],l=o._private.data.id,u=!i.has(l);if(u){var h=this.length++;this[h]=o,i.set(l,{ele:o,index:h})}}return this},"merge"),unmergeAt:f(function(e){var r=this[e],a=r.id(),n=this._private,i=n.map;this[e]=void 0,i.delete(a);var s=e===this.length-1;if(this.length>1&&!s){var o=this.length-1,l=this[o],u=l._private.data.id;this[o]=void 0,this[e]=l,i.set(u,{ele:l,index:e})}return this.length--,this},"unmergeAt"),unmergeOne:f(function(e){e=e[0];var r=this._private,a=e._private.data.id,n=r.map,i=n.get(a);if(!i)return this;var s=i.index;return this.unmergeAt(s),this},"unmergeOne"),unmerge:f(function(e){var r=this._private.cy;if(!e)return this;if(e&&ge(e)){var a=e;e=r.mutableElements().filter(a)}for(var n=0;n<e.length;n++)this.unmergeOne(e[n]);return this},"unmerge"),unmergeBy:f(function(e){for(var r=this.length-1;r>=0;r--){var a=this[r];e(a)&&this.unmergeAt(r)}return this},"unmergeBy"),map:f(function(e,r){for(var a=[],n=this,i=0;i<n.length;i++){var s=n[i],o=r?e.apply(r,[s,i,n]):e(s,i,n);a.push(o)}return a},"map"),reduce:f(function(e,r){for(var a=r,n=this,i=0;i<n.length;i++)a=e(a,n[i],i,n);return a},"reduce"),max:f(function(e,r){for(var a=-1/0,n,i=this,s=0;s<i.length;s++){var o=i[s],l=r?e.apply(r,[o,s,i]):e(o,s,i);l>a&&(a=l,n=o)}return{value:a,ele:n}},"max"),min:f(function(e,r){for(var a=1/0,n,i=this,s=0;s<i.length;s++){var o=i[s],l=r?e.apply(r,[o,s,i]):e(o,s,i);l<a&&(a=l,n=o)}return{value:a,ele:n}},"min")},Ae=Cu;Ae.u=Ae["|"]=Ae["+"]=Ae.union=Ae.or=Ae.add;Ae["\\"]=Ae["!"]=Ae["-"]=Ae.difference=Ae.relativeComplement=Ae.subtract=Ae.not;Ae.n=Ae["&"]=Ae["."]=Ae.and=Ae.intersection=Ae.intersect;Ae["^"]=Ae["(+)"]=Ae["(-)"]=Ae.symmetricDifference=Ae.symdiff=Ae.xor;Ae.fnFilter=Ae.filterFn=Ae.stdFilter=Ae.filter;Ae.complement=Ae.abscomp=Ae.absoluteComplement;var Sg={isNode:f(function(){return this.group()==="nodes"},"isNode"),isEdge:f(function(){return this.group()==="edges"},"isEdge"),isLoop:f(function(){return this.isEdge()&&this.source()[0]===this.target()[0]},"isLoop"),isSimple:f(function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},"isSimple"),group:f(function(){var e=this[0];if(e)return e._private.group},"group")},Du=f(function(e,r){var a=e.cy(),n=a.hasCompoundNodes();function i(h){var c=h.pstyle("z-compound-depth");return c.value==="auto"?n?h.zDepth():0:c.value==="bottom"?-1:c.value==="top"?Ei:0}f(i,"getDepth");var s=i(e)-i(r);if(s!==0)return s;function o(h){var c=h.pstyle("z-index-compare");return c.value==="auto"&&h.isNode()?1:0}f(o,"getEleDepth");var l=o(e)-o(r);if(l!==0)return l;var u=e.pstyle("z-index").value-r.pstyle("z-index").value;return u!==0?u:e.poolIndex()-r.poolIndex()},"zIndexSort"),vn={forEach:f(function(e,r){if(ze(e))for(var a=this.length,n=0;n<a;n++){var i=this[n],s=r?e.apply(r,[i,n,this]):e(i,n,this);if(s===!1)break}return this},"forEach"),toArray:f(function(){for(var e=[],r=0;r<this.length;r++)e.push(this[r]);return e},"toArray"),slice:f(function(e,r){var a=[],n=this.length;r==null&&(r=n),e==null&&(e=0),e<0&&(e=n+e),r<0&&(r=n+r);for(var i=e;i>=0&&i<r&&i<n;i++)a.push(this[i]);return this.spawn(a)},"slice"),size:f(function(){return this.length},"size"),eq:f(function(e){return this[e]||this.spawn()},"eq"),first:f(function(){return this[0]||this.spawn()},"first"),last:f(function(){return this[this.length-1]||this.spawn()},"last"),empty:f(function(){return this.length===0},"empty"),nonempty:f(function(){return!this.empty()},"nonempty"),sort:f(function(e){if(!ze(e))return this;var r=this.toArray().sort(e);return this.spawn(r)},"sort"),sortByZIndex:f(function(){return this.sort(Du)},"sortByZIndex"),zDepth:f(function(){var e=this[0];if(e){var r=e._private,a=r.group;if(a==="nodes"){var n=r.data.parent?e.parents().size():0;return e.isParent()?n:Ei-1}else{var i=r.source,s=r.target,o=i.zDepth(),l=s.zDepth();return Math.max(o,l,0)}}},"zDepth")};vn.each=vn.forEach;var Lg=f(function(){var e="undefined",r=(typeof Symbol>"u"?"undefined":qe(Symbol))!=e&&qe(Symbol.iterator)!=e;r&&(vn[Symbol.iterator]=function(){var a=this,n={value:void 0,done:!1},i=0,s=this.length;return wo({next:f(function(){return i<s?n.value=a[i++]:(n.value=void 0,n.done=!0),n},"next")},Symbol.iterator,function(){return this})})},"defineSymbolIterator");Lg();var Ag=rt({nodeDimensionsIncludeLabels:!1}),en={layoutDimensions:f(function(e){e=Ag(e);var r;if(!this.takesUpSpace())r={w:0,h:0};else if(e.nodeDimensionsIncludeLabels){var a=this.boundingBox();r={w:a.w,h:a.h}}else r={w:this.outerWidth(),h:this.outerHeight()};return(r.w===0||r.h===0)&&(r.w=r.h=1),r},"layoutDimensions"),layoutPositions:f(function(e,r,a){var n=this.nodes().filter(function(w){return!w.isParent()}),i=this.cy(),s=r.eles,o=f(function(x){return x.id()},"getMemoizeKey"),l=ga(a,o);e.emit({type:"layoutstart",layout:e}),e.animations=[];var u=f(function(x,T,C){var D={x:T.x1+T.w/2,y:T.y1+T.h/2},L={x:(C.x-D.x)*x,y:(C.y-D.y)*x};return{x:D.x+L.x,y:D.y+L.y}},"calculateSpacing"),h=r.spacingFactor&&r.spacingFactor!==1,c=f(function(){if(!h)return null;for(var x=pt(),T=0;T<n.length;T++){var C=n[T],D=l(C,T);Oh(x,D.x,D.y)}return x},"spacingBb"),v=c(),d=ga(function(w,x){var T=l(w,x);if(h){var C=Math.abs(r.spacingFactor);T=u(C,v,T)}return r.transform!=null&&(T=r.transform(w,T)),T},o);if(r.animate){for(var g=0;g<n.length;g++){var m=n[g],y=d(m,g),p=r.animateFilter==null||r.animateFilter(m,g);if(p){var b=m.animation({position:y,duration:r.animationDuration,easing:r.animationEasing});e.animations.push(b)}else m.position(y)}if(r.fit){var E=i.animation({fit:{boundingBox:s.boundingBoxAt(d),padding:r.padding},duration:r.animationDuration,easing:r.animationEasing});e.animations.push(E)}else if(r.zoom!==void 0&&r.pan!==void 0){var S=i.animation({zoom:r.zoom,pan:r.pan,duration:r.animationDuration,easing:r.animationEasing});e.animations.push(S)}e.animations.forEach(function(w){return w.play()}),e.one("layoutready",r.ready),e.emit({type:"layoutready",layout:e}),_r.all(e.animations.map(function(w){return w.promise()})).then(function(){e.one("layoutstop",r.stop),e.emit({type:"layoutstop",layout:e})})}else n.positions(d),r.fit&&i.fit(r.eles,r.padding),r.zoom!=null&&i.zoom(r.zoom),r.pan&&i.pan(r.pan),e.one("layoutready",r.ready),e.emit({type:"layoutready",layout:e}),e.one("layoutstop",r.stop),e.emit({type:"layoutstop",layout:e});return this},"layoutPositions"),layout:f(function(e){var r=this.cy();return r.makeLayout(Ee({},e,{eles:this}))},"layout")};en.createLayout=en.makeLayout=en.layout;function Su(t,e,r){var a=r._private,n=a.styleCache=a.styleCache||[],i;return(i=n[t])!=null||(i=n[t]=e(r)),i}f(Su,"styleCache");function On(t,e){return t=yr(t),f(function(a){return Su(t,e,a)},"cachedStyleFunction")}f(On,"cacheStyleFunction");function Mn(t,e){t=yr(t);var r=f(function(n){return e.call(n)},"selfFn");return f(function(){var n=this[0];if(n)return Su(t,r,n)},"cachedPrototypeStyleFunction")}f(Mn,"cachePrototypeStyleFunction");var et={recalculateRenderedStyle:f(function(e){var r=this.cy(),a=r.renderer(),n=r.styleEnabled();return a&&n&&a.recalculateRenderedStyle(this,e),this},"recalculateRenderedStyle"),dirtyStyleCache:f(function(){var e=this.cy(),r=f(function(i){return i._private.styleCache=null},"dirty");if(e.hasCompoundNodes()){var a;a=this.spawnSelf().merge(this.descendants()).merge(this.parents()),a.merge(a.connectedEdges()),a.forEach(r)}else this.forEach(function(n){r(n),n.connectedEdges().forEach(r)});return this},"dirtyStyleCache"),updateStyle:f(function(e){var r=this._private.cy;if(!r.styleEnabled())return this;if(r.batching()){var a=r._private.batchStyleEles;return a.merge(this),this}var n=r.hasCompoundNodes(),i=this;e=!!(e||e===void 0),n&&(i=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var s=i;return e?s.emitAndNotify("style"):s.emit("style"),i.forEach(function(o){return o._private.styleDirty=!0}),this},"updateStyle"),cleanStyle:f(function(){var e=this.cy();if(e.styleEnabled())for(var r=0;r<this.length;r++){var a=this[r];a._private.styleDirty&&(a._private.styleDirty=!1,e.style().apply(a))}},"cleanStyle"),parsedStyle:f(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,a=this[0],n=a.cy();if(n.styleEnabled()&&a){this.cleanStyle();var i=a._private.style[e];return i??(r?n.style().getDefaultProperty(e):null)}},"parsedStyle"),numericStyle:f(function(e){var r=this[0];if(r.cy().styleEnabled()&&r){var a=r.pstyle(e);return a.pfValue!==void 0?a.pfValue:a.value}},"numericStyle"),numericStyleUnits:f(function(e){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(e).units},"numericStyleUnits"),renderedStyle:f(function(e){var r=this.cy();if(!r.styleEnabled())return this;var a=this[0];if(a)return r.style().getRenderedStyle(a,e)},"renderedStyle"),style:f(function(e,r){var a=this.cy();if(!a.styleEnabled())return this;var n=!1,i=a.style();if(De(e)){var s=e;i.applyBypass(this,s,n),this.emitAndNotify("style")}else if(ge(e))if(r===void 0){var o=this[0];return o?i.getStylePropertyValue(o,e):void 0}else i.applyBypass(this,e,r,n),this.emitAndNotify("style");else if(e===void 0){var l=this[0];return l?i.getRawStyle(l):void 0}return this},"style"),removeStyle:f(function(e){var r=this.cy();if(!r.styleEnabled())return this;var a=!1,n=r.style(),i=this;if(e===void 0)for(var s=0;s<i.length;s++){var o=i[s];n.removeAllBypasses(o,a)}else{e=e.split(/\s+/);for(var l=0;l<i.length;l++){var u=i[l];n.removeBypasses(u,e,a)}}return this.emitAndNotify("style"),this},"removeStyle"),show:f(function(){return this.css("display","element"),this},"show"),hide:f(function(){return this.css("display","none"),this},"hide"),effectiveOpacity:f(function(){var e=this.cy();if(!e.styleEnabled())return 1;var r=e.hasCompoundNodes(),a=this[0];if(a){var n=a._private,i=a.pstyle("opacity").value;if(!r)return i;var s=n.data.parent?a.parents():null;if(s)for(var o=0;o<s.length;o++){var l=s[o],u=l.pstyle("opacity").value;i=u*i}return i}},"effectiveOpacity"),transparent:f(function(){var e=this.cy();if(!e.styleEnabled())return!1;var r=this[0],a=r.cy().hasCompoundNodes();if(r)return a?r.effectiveOpacity()===0:r.pstyle("opacity").value===0},"transparent"),backgrounding:f(function(){var e=this.cy();if(!e.styleEnabled())return!1;var r=this[0];return!!r._private.backgrounding},"backgrounding")};function Kn(t,e){var r=t._private,a=r.data.parent?t.parents():null;if(a)for(var n=0;n<a.length;n++){var i=a[n];if(!e(i))return!1}return!0}f(Kn,"checkCompound");function Ii(t){var e=t.ok,r=t.edgeOkViaNode||t.ok,a=t.parentOk||t.ok;return function(){var n=this.cy();if(!n.styleEnabled())return!0;var i=this[0],s=n.hasCompoundNodes();if(i){var o=i._private;if(!e(i))return!1;if(i.isNode())return!s||Kn(i,a);var l=o.source,u=o.target;return r(l)&&(!s||Kn(l,r))&&(l===u||r(u)&&(!s||Kn(u,r)))}}}f(Ii,"defineDerivedStateFunction");var Wr=On("eleTakesUpSpace",function(t){return t.pstyle("display").value==="element"&&t.width()!==0&&(t.isNode()?t.height()!==0:!0)});et.takesUpSpace=Mn("takesUpSpace",Ii({ok:Wr}));var Og=On("eleInteractive",function(t){return t.pstyle("events").value==="yes"&&t.pstyle("visibility").value==="visible"&&Wr(t)}),Mg=On("parentInteractive",function(t){return t.pstyle("visibility").value==="visible"&&Wr(t)});et.interactive=Mn("interactive",Ii({ok:Og,parentOk:Mg,edgeOkViaNode:Wr}));et.noninteractive=function(){var t=this[0];if(t)return!t.interactive()};var Ng=On("eleVisible",function(t){return t.pstyle("visibility").value==="visible"&&t.pstyle("opacity").pfValue!==0&&Wr(t)}),Ig=Wr;et.visible=Mn("visible",Ii({ok:Ng,edgeOkViaNode:Ig}));et.hidden=function(){var t=this[0];if(t)return!t.visible()};et.isBundledBezier=Mn("isBundledBezier",function(){return this.cy().styleEnabled()?!this.removed()&&this.pstyle("curve-style").value==="bezier"&&this.takesUpSpace():!1});et.bypass=et.css=et.style;et.renderedCss=et.renderedStyle;et.removeBypass=et.removeCss=et.removeStyle;et.pstyle=et.parsedStyle;var tr={};function _s(t){return function(){var e=arguments,r=[];if(e.length===2){var a=e[0],n=e[1];this.on(t.event,a,n)}else if(e.length===1&&ze(e[0])){var i=e[0];this.on(t.event,i)}else if(e.length===0||e.length===1&&Re(e[0])){for(var s=e.length===1?e[0]:null,o=0;o<this.length;o++){var l=this[o],u=!t.ableField||l._private[t.ableField],h=l._private[t.field]!=t.value;if(t.overrideAble){var c=t.overrideAble(l);if(c!==void 0&&(u=c,!c))return this}u&&(l._private[t.field]=t.value,h&&r.push(l))}var v=this.spawn(r);v.updateStyle(),v.emit(t.event),s&&v.emit(s)}return this}}f(_s,"defineSwitchFunction");function Kr(t){tr[t.field]=function(){var e=this[0];if(e){if(t.overrideField){var r=t.overrideField(e);if(r!==void 0)return r}return e._private[t.field]}},tr[t.on]=_s({event:t.on,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!0}),tr[t.off]=_s({event:t.off,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!1})}f(Kr,"defineSwitchSet");Kr({field:"locked",overrideField:f(function(e){return e.cy().autolock()?!0:void 0},"overrideField"),on:"lock",off:"unlock"});Kr({field:"grabbable",overrideField:f(function(e){return e.cy().autoungrabify()||e.pannable()?!1:void 0},"overrideField"),on:"grabify",off:"ungrabify"});Kr({field:"selected",ableField:"selectable",overrideAble:f(function(e){return e.cy().autounselectify()?!1:void 0},"overrideAble"),on:"select",off:"unselect"});Kr({field:"selectable",overrideField:f(function(e){return e.cy().autounselectify()?!1:void 0},"overrideField"),on:"selectify",off:"unselectify"});tr.deselect=tr.unselect;tr.grabbed=function(){var t=this[0];if(t)return t._private.grabbed};Kr({field:"active",on:"activate",off:"unactivate"});Kr({field:"pannable",on:"panify",off:"unpanify"});tr.inactive=function(){var t=this[0];if(t)return!t._private.active};var st={},Hs=f(function(e){return f(function(a){for(var n=this,i=[],s=0;s<n.length;s++){var o=n[s];if(o.isNode()){for(var l=!1,u=o.connectedEdges(),h=0;h<u.length;h++){var c=u[h],v=c.source(),d=c.target();if(e.noIncomingEdges&&d===o&&v!==o||e.noOutgoingEdges&&v===o&&d!==o){l=!0;break}}l||i.push(o)}}return this.spawn(i,!0).filter(a)},"dagExtremityImpl")},"defineDagExtremity"),Xs=f(function(e){return function(r){for(var a=this,n=[],i=0;i<a.length;i++){var s=a[i];if(s.isNode())for(var o=s.connectedEdges(),l=0;l<o.length;l++){var u=o[l],h=u.source(),c=u.target();e.outgoing&&h===s?(n.push(u),n.push(c)):e.incoming&&c===s&&(n.push(u),n.push(h))}}return this.spawn(n,!0).filter(r)}},"defineDagOneHop"),qs=f(function(e){return function(r){for(var a=this,n=[],i={};;){var s=e.outgoing?a.outgoers():a.incomers();if(s.length===0)break;for(var o=!1,l=0;l<s.length;l++){var u=s[l],h=u.id();i[h]||(i[h]=!0,n.push(u),o=!0)}if(!o)break;a=s}return this.spawn(n,!0).filter(r)}},"defineDagAllHops");st.clearTraversalCache=function(){for(var t=0;t<this.length;t++)this[t]._private.traversalCache=null};Ee(st,{roots:Hs({noIncomingEdges:!0}),leaves:Hs({noOutgoingEdges:!0}),outgoers:xt(Xs({outgoing:!0}),"outgoers"),successors:qs({outgoing:!0}),incomers:xt(Xs({incoming:!0}),"incomers"),predecessors:qs({incoming:!0})});Ee(st,{neighborhood:xt(function(t){for(var e=[],r=this.nodes(),a=0;a<r.length;a++)for(var n=r[a],i=n.connectedEdges(),s=0;s<i.length;s++){var o=i[s],l=o.source(),u=o.target(),h=n===l?u:l;h.length>0&&e.push(h[0]),e.push(o[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:f(function(e){return this.neighborhood().add(this).filter(e)},"closedNeighborhood"),openNeighborhood:f(function(e){return this.neighborhood(e)},"openNeighborhood")});st.neighbourhood=st.neighborhood;st.closedNeighbourhood=st.closedNeighborhood;st.openNeighbourhood=st.openNeighborhood;Ee(st,{source:xt(f(function(e){var r=this[0],a;return r&&(a=r._private.source||r.cy().collection()),a&&e?a.filter(e):a},"sourceImpl"),"source"),target:xt(f(function(e){var r=this[0],a;return r&&(a=r._private.target||r.cy().collection()),a&&e?a.filter(e):a},"targetImpl"),"target"),sources:Ws({attr:"source"}),targets:Ws({attr:"target"})});function Ws(t){return f(function(r){for(var a=[],n=0;n<this.length;n++){var i=this[n],s=i._private[t.attr];s&&a.push(s)}return this.spawn(a,!0).filter(r)},"sourceImpl")}f(Ws,"defineSourceFunction");Ee(st,{edgesWith:xt(Ks(),"edgesWith"),edgesTo:xt(Ks({thisIsSrc:!0}),"edgesTo")});function Ks(t){return f(function(r){var a=[],n=this._private.cy,i=t||{};ge(r)&&(r=n.$(r));for(var s=0;s<r.length;s++)for(var o=r[s]._private.edges,l=0;l<o.length;l++){var u=o[l],h=u._private.data,c=this.hasElementWithId(h.source)&&r.hasElementWithId(h.target),v=r.hasElementWithId(h.source)&&this.hasElementWithId(h.target),d=c||v;d&&((i.thisIsSrc||i.thisIsTgt)&&(i.thisIsSrc&&!c||i.thisIsTgt&&!v)||a.push(u))}return this.spawn(a,!0)},"edgesWithImpl")}f(Ks,"defineEdgesWithFunction");Ee(st,{connectedEdges:xt(function(t){for(var e=[],r=this,a=0;a<r.length;a++){var n=r[a];if(n.isNode())for(var i=n._private.edges,s=0;s<i.length;s++){var o=i[s];e.push(o)}}return this.spawn(e,!0).filter(t)},"connectedEdges"),connectedNodes:xt(function(t){for(var e=[],r=this,a=0;a<r.length;a++){var n=r[a];n.isEdge()&&(e.push(n.source()[0]),e.push(n.target()[0]))}return this.spawn(e,!0).filter(t)},"connectedNodes"),parallelEdges:xt(Zs(),"parallelEdges"),codirectedEdges:xt(Zs({codirected:!0}),"codirectedEdges")});function Zs(t){var e={codirected:!1};return t=Ee({},e,t),f(function(a){for(var n=[],i=this.edges(),s=t,o=0;o<i.length;o++)for(var l=i[o],u=l._private,h=u.source,c=h._private.data.id,v=u.data.target,d=h._private.edges,g=0;g<d.length;g++){var m=d[g],y=m._private.data,p=y.target,b=y.source,E=p===v&&b===c,S=c===p&&v===b;(s.codirected&&E||!s.codirected&&(E||S))&&n.push(m)}return this.spawn(n,!0).filter(a)},"parallelEdgesImpl")}f(Zs,"defineParallelEdgesFunction");Ee(st,{components:f(function(e){var r=this,a=r.cy(),n=a.collection(),i=e==null?r.nodes():e.nodes(),s=[];e!=null&&i.empty()&&(i=e.sources());var o=f(function(h,c){n.merge(h),i.unmerge(h),c.merge(h)},"visitInComponent");if(i.empty())return r.spawn();var l=f(function(){var h=a.collection();s.push(h);var c=i[0];o(c,h),r.bfs({directed:!1,roots:c,visit:f(function(d){return o(d,h)},"visit")}),h.forEach(function(v){v.connectedEdges().forEach(function(d){r.has(d)&&h.has(d.source())&&h.has(d.target())&&h.merge(d)})})},"_loop");do l();while(i.length>0);return s},"components"),component:f(function(){var e=this[0];return e.cy().mutableElements().components(e)[0]},"component")});st.componentsOf=st.components;var tt=f(function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){Ve("A collection must have a reference to the core");return}var i=new Ft,s=!1;if(!r)r=[];else if(r.length>0&&De(r[0])&&!La(r[0])){s=!0;for(var o=[],l=new $r,u=0,h=r.length;u<h;u++){var c=r[u];c.data==null&&(c.data={});var v=c.data;if(v.id==null)v.id=zo();else if(e.hasElementWithId(v.id)||l.has(v.id))continue;var d=new wn(e,c,!1);o.push(d),l.add(v.id)}r=o}this.length=0;for(var g=0,m=r.length;g<m;g++){var y=r[g][0];if(y!=null){var p=y._private.data.id;(!a||!i.has(p))&&(a&&i.set(p,{index:this.length,ele:y}),this[this.length]=y,this.length++)}}this._private={eles:this,cy:e,get map(){return this.lazyMap==null&&this.rebuildMap(),this.lazyMap},set map(b){this.lazyMap=b},rebuildMap:f(function(){for(var E=this.lazyMap=new Ft,S=this.eles,w=0;w<S.length;w++){var x=S[w];E.set(x.id(),{index:w,ele:x})}},"rebuildMap")},a&&(this._private.map=i),s&&!n&&this.restore()},"Collection"),Be=wn.prototype=tt.prototype=Object.create(Array.prototype);Be.instanceString=function(){return"collection"};Be.spawn=function(t,e){return new tt(this.cy(),t,e)};Be.spawnSelf=function(){return this.spawn(this)};Be.cy=function(){return this._private.cy};Be.renderer=function(){return this._private.cy.renderer()};Be.element=function(){return this[0]};Be.collection=function(){return Do(this)?this:new tt(this._private.cy,[this])};Be.unique=function(){return new tt(this._private.cy,this,!0)};Be.hasElementWithId=function(t){return t=""+t,this._private.map.has(t)};Be.getElementById=function(t){t=""+t;var e=this._private.cy,r=this._private.map.get(t);return r?r.ele:new tt(e)};Be.$id=Be.getElementById;Be.poolIndex=function(){var t=this._private.cy,e=t._private.elements,r=this[0]._private.data.id;return e._private.map.get(r).index};Be.indexOf=function(t){var e=t[0]._private.data.id;return this._private.map.get(e).index};Be.indexOfId=function(t){return t=""+t,this._private.map.get(t).index};Be.json=function(t){var e=this.element(),r=this.cy();if(e==null&&t)return this;if(e!=null){var a=e._private;if(De(t)){if(r.startBatch(),t.data){e.data(t.data);var n=a.data;if(e.isEdge()){var i=!1,s={},o=t.data.source,l=t.data.target;o!=null&&o!=n.source&&(s.source=""+o,i=!0),l!=null&&l!=n.target&&(s.target=""+l,i=!0),i&&(e=e.move(s))}else{var u="parent"in t.data,h=t.data.parent;u&&(h!=null||n.parent!=null)&&h!=n.parent&&(h===void 0&&(h=null),h!=null&&(h=""+h),e=e.move({parent:h}))}}t.position&&e.position(t.position);var c=f(function(m,y,p){var b=t[m];b!=null&&b!==a[m]&&(b?e[y]():e[p]())},"checkSwitch");return c("removed","remove","restore"),c("selected","select","unselect"),c("selectable","selectify","unselectify"),c("locked","lock","unlock"),c("grabbable","grabify","ungrabify"),c("pannable","panify","unpanify"),t.classes!=null&&e.classes(t.classes),r.endBatch(),this}else if(t===void 0){var v={data:Bt(a.data),position:Bt(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};v.classes="";var d=0;return a.classes.forEach(function(g){return v.classes+=d++===0?g:" "+g}),v}}};Be.jsons=function(){for(var t=[],e=0;e<this.length;e++){var r=this[e],a=r.json();t.push(a)}return t};Be.clone=function(){for(var t=this.cy(),e=[],r=0;r<this.length;r++){var a=this[r],n=a.json(),i=new wn(t,n,!1);e.push(i)}return new tt(t,e)};Be.copy=Be.clone;Be.restore=function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,a=r.cy(),n=a._private,i=[],s=[],o,l=0,u=r.length;l<u;l++){var h=r[l];e&&!h.removed()||(h.isNode()?i.push(h):s.push(h))}o=i.concat(s);var c,v=f(function(){o.splice(c,1),c--},"removeFromElements");for(c=0;c<o.length;c++){var d=o[c],g=d._private,m=g.data;if(d.clearTraversalCache(),!(!e&&!g.removed)){if(m.id===void 0)m.id=zo();else if(oe(m.id))m.id=""+m.id;else if(rr(m.id)||!ge(m.id)){Ve("Can not create element with invalid string ID `"+m.id+"`"),v();continue}else if(a.hasElementWithId(m.id)){Ve("Can not create second element with ID `"+m.id+"`"),v();continue}}var y=m.id;if(d.isNode()){var p=g.position;p.x==null&&(p.x=0),p.y==null&&(p.y=0)}if(d.isEdge()){for(var b=d,E=["source","target"],S=E.length,w=!1,x=0;x<S;x++){var T=E[x],C=m[T];oe(C)&&(C=m[T]=""+m[T]),C==null||C===""?(Ve("Can not create edge `"+y+"` with unspecified "+T),w=!0):a.hasElementWithId(C)||(Ve("Can not create edge `"+y+"` with nonexistant "+T+" `"+C+"`"),w=!0)}if(w){v();continue}var D=a.getElementById(m.source),L=a.getElementById(m.target);D.same(L)?D._private.edges.push(b):(D._private.edges.push(b),L._private.edges.push(b)),b._private.source=D,b._private.target=L}g.map=new Ft,g.map.set(y,{ele:d,index:0}),g.removed=!1,e&&a.addToPool(d)}for(var O=0;O<i.length;O++){var A=i[O],I=A._private.data;oe(I.parent)&&(I.parent=""+I.parent);var M=I.parent,P=M!=null;if(P||A._private.parent){var R=A._private.parent?a.collection().merge(A._private.parent):a.getElementById(M);if(R.empty())I.parent=void 0;else if(R[0].removed())Ne("Node added with missing parent, reference to parent removed"),I.parent=void 0,A._private.parent=null;else{for(var k=!1,B=R;!B.empty();){if(A.same(B)){k=!0,I.parent=void 0;break}B=B.parent()}k||(R[0]._private.children.push(A),A._private.parent=R[0],n.hasCompoundNodes=!0)}}}if(o.length>0){for(var F=o.length===r.length?r:new tt(a,o),U=0;U<F.length;U++){var V=F[U];V.isNode()||(V.parallelEdges().clearTraversalCache(),V.source().clearTraversalCache(),V.target().clearTraversalCache())}var G;n.hasCompoundNodes?G=a.collection().merge(F).merge(F.connectedNodes()).merge(F.parent()):G=F,G.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(t),t?F.emitAndNotify("add"):e&&F.emit("add")}return r};Be.removed=function(){var t=this[0];return t&&t._private.removed};Be.inside=function(){var t=this[0];return t&&!t._private.removed};Be.remove=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,a=[],n={},i=r._private.cy;function s(M){for(var P=M._private.edges,R=0;R<P.length;R++)l(P[R])}f(s,"addConnectedEdges");function o(M){for(var P=M._private.children,R=0;R<P.length;R++)l(P[R])}f(o,"addChildren");function l(M){var P=n[M.id()];e&&M.removed()||P||(n[M.id()]=!0,M.isNode()?(a.push(M),s(M),o(M)):a.unshift(M))}f(l,"add");for(var u=0,h=r.length;u<h;u++){var c=r[u];l(c)}function v(M,P){var R=M._private.edges;ar(R,P),M.clearTraversalCache()}f(v,"removeEdgeRef");function d(M){M.clearTraversalCache()}f(d,"removeParallelRef");var g=[];g.ids={};function m(M,P){P=P[0],M=M[0];var R=M._private.children,k=M.id();ar(R,P),P._private.parent=null,g.ids[k]||(g.ids[k]=!0,g.push(M))}f(m,"removeChildRef"),r.dirtyCompoundBoundsCache(),e&&i.removeFromPool(a);for(var y=0;y<a.length;y++){var p=a[y];if(p.isEdge()){var b=p.source()[0],E=p.target()[0];v(b,p),v(E,p);for(var S=p.parallelEdges(),w=0;w<S.length;w++){var x=S[w];d(x),x.isBundledBezier()&&x.dirtyBoundingBoxCache()}}else{var T=p.parent();T.length!==0&&m(T,p)}e&&(p._private.removed=!0)}var C=i._private.elements;i._private.hasCompoundNodes=!1;for(var D=0;D<C.length;D++){var L=C[D];if(L.isParent()){i._private.hasCompoundNodes=!0;break}}var O=new tt(this.cy(),a);O.size()>0&&(t?O.emitAndNotify("remove"):e&&O.emit("remove"));for(var A=0;A<g.length;A++){var I=g[A];(!e||!I.removed())&&I.updateStyle()}return O};Be.move=function(t){var e=this._private.cy,r=this,a=!1,n=!1,i=f(function(g){return g==null?g:""+g},"toString");if(t.source!==void 0||t.target!==void 0){var s=i(t.source),o=i(t.target),l=s!=null&&e.hasElementWithId(s),u=o!=null&&e.hasElementWithId(o);(l||u)&&(e.batch(function(){r.remove(a,n),r.emitAndNotify("moveout");for(var d=0;d<r.length;d++){var g=r[d],m=g._private.data;g.isEdge()&&(l&&(m.source=s),u&&(m.target=o))}r.restore(a,n)}),r.emitAndNotify("move"))}else if(t.parent!==void 0){var h=i(t.parent),c=h===null||e.hasElementWithId(h);if(c){var v=h===null?void 0:h;e.batch(function(){var d=r.remove(a,n);d.emitAndNotify("moveout");for(var g=0;g<r.length;g++){var m=r[g],y=m._private.data;m.isNode()&&(y.parent=v)}d.restore(a,n)}),r.emitAndNotify("move")}}return this};[Jo,$d,ja,er,Yr,ig,Ln,wg,Tu,Cu,Sg,vn,en,et,tr,st].forEach(function(t){Ee(Be,t)});var kg={add:f(function(e){var r,a=this;if(yt(e)){var n=e;if(n._private.cy===a)r=n.restore();else{for(var i=[],s=0;s<n.length;s++){var o=n[s];i.push(o.json())}r=new tt(a,i)}}else if(Re(e)){var l=e;r=new tt(a,l)}else if(De(e)&&(Re(e.nodes)||Re(e.edges))){for(var u=e,h=[],c=["nodes","edges"],v=0,d=c.length;v<d;v++){var g=c[v],m=u[g];if(Re(m))for(var y=0,p=m.length;y<p;y++){var b=Ee({group:g},m[y]);h.push(b)}}r=new tt(a,h)}else{var E=e;r=new wn(a,E).collection()}return r},"add"),remove:f(function(e){if(!yt(e)){if(ge(e)){var r=e;e=this.$(r)}}return e.remove()},"remove")};function Rg(t,e,r,a){var n=4,i=.001,s=1e-7,o=10,l=11,u=1/(l-1),h=typeof Float32Array<"u";if(arguments.length!==4)return!1;for(var c=0;c<4;++c)if(typeof arguments[c]!="number"||isNaN(arguments[c])||!isFinite(arguments[c]))return!1;t=Math.min(t,1),r=Math.min(r,1),t=Math.max(t,0),r=Math.max(r,0);var v=h?new Float32Array(l):new Array(l);function d(L,O){return 1-3*O+3*L}f(d,"A");function g(L,O){return 3*O-6*L}f(g,"B");function m(L){return 3*L}f(m,"C");function y(L,O,A){return((d(O,A)*L+g(O,A))*L+m(O))*L}f(y,"calcBezier");function p(L,O,A){return 3*d(O,A)*L*L+2*g(O,A)*L+m(O)}f(p,"getSlope");function b(L,O){for(var A=0;A<n;++A){var I=p(O,t,r);if(I===0)return O;var M=y(O,t,r)-L;O-=M/I}return O}f(b,"newtonRaphsonIterate");function E(){for(var L=0;L<l;++L)v[L]=y(L*u,t,r)}f(E,"calcSampleValues");function S(L,O,A){var I,M,P=0;do M=O+(A-O)/2,I=y(M,t,r)-L,I>0?A=M:O=M;while(Math.abs(I)>s&&++P<o);return M}f(S,"binarySubdivide");function w(L){for(var O=0,A=1,I=l-1;A!==I&&v[A]<=L;++A)O+=u;--A;var M=(L-v[A])/(v[A+1]-v[A]),P=O+M*u,R=p(P,t,r);return R>=i?b(L,P):R===0?P:S(L,O,O+u)}f(w,"getTForX");var x=!1;function T(){x=!0,(t!==e||r!==a)&&E()}f(T,"precompute");var C=f(function(O){return x||T(),t===e&&r===a?O:O===0?0:O===1?1:y(w(O),e,a)},"f");C.getControlPoints=function(){return[{x:t,y:e},{x:r,y:a}]};var D="generateBezier("+[t,e,r,a]+")";return C.toString=function(){return D},C}f(Rg,"generateCubicBezier");var Pg=function(){function t(a){return-a.tension*a.x-a.friction*a.v}f(t,"springAccelerationForState");function e(a,n,i){var s={x:a.x+i.dx*n,v:a.v+i.dv*n,tension:a.tension,friction:a.friction};return{dx:s.v,dv:t(s)}}f(e,"springEvaluateStateWithDerivative");function r(a,n){var i={dx:a.v,dv:t(a)},s=e(a,n*.5,i),o=e(a,n*.5,s),l=e(a,n,o),u=1/6*(i.dx+2*(s.dx+o.dx)+l.dx),h=1/6*(i.dv+2*(s.dv+o.dv)+l.dv);return a.x=a.x+u*n,a.v=a.v+h*n,a}return f(r,"springIntegrateState"),f(function a(n,i,s){var o={x:-1,v:0,tension:null,friction:null},l=[0],u=0,h=1/1e4,c=16/1e3,v,d,g;for(n=parseFloat(n)||500,i=parseFloat(i)||20,s=s||null,o.tension=n,o.friction=i,v=s!==null,v?(u=a(n,i),d=u/s*c):d=c;g=r(g||o,d),l.push(1+g.x),u+=16,Math.abs(g.x)>h&&Math.abs(g.v)>h;);return v?function(m){return l[m*(l.length-1)|0]}:u},"springRK4Factory")}(),Pe=f(function(e,r,a,n){var i=Rg(e,r,a,n);return function(s,o,l){return s+(o-s)*i(l)}},"cubicBezier"),tn={linear:f(function(e,r,a){return e+(r-e)*a},"linear"),ease:Pe(.25,.1,.25,1),"ease-in":Pe(.42,0,1,1),"ease-out":Pe(0,0,.58,1),"ease-in-out":Pe(.42,0,.58,1),"ease-in-sine":Pe(.47,0,.745,.715),"ease-out-sine":Pe(.39,.575,.565,1),"ease-in-out-sine":Pe(.445,.05,.55,.95),"ease-in-quad":Pe(.55,.085,.68,.53),"ease-out-quad":Pe(.25,.46,.45,.94),"ease-in-out-quad":Pe(.455,.03,.515,.955),"ease-in-cubic":Pe(.55,.055,.675,.19),"ease-out-cubic":Pe(.215,.61,.355,1),"ease-in-out-cubic":Pe(.645,.045,.355,1),"ease-in-quart":Pe(.895,.03,.685,.22),"ease-out-quart":Pe(.165,.84,.44,1),"ease-in-out-quart":Pe(.77,0,.175,1),"ease-in-quint":Pe(.755,.05,.855,.06),"ease-out-quint":Pe(.23,1,.32,1),"ease-in-out-quint":Pe(.86,0,.07,1),"ease-in-expo":Pe(.95,.05,.795,.035),"ease-out-expo":Pe(.19,1,.22,1),"ease-in-out-expo":Pe(1,0,0,1),"ease-in-circ":Pe(.6,.04,.98,.335),"ease-out-circ":Pe(.075,.82,.165,1),"ease-in-out-circ":Pe(.785,.135,.15,.86),spring:f(function(e,r,a){if(a===0)return tn.linear;var n=Pg(e,r,a);return function(i,s,o){return i+(s-i)*n(o)}},"spring"),"cubic-bezier":Pe};function Qs(t,e,r,a,n){if(a===1||e===r)return r;var i=n(e,r,a);return t==null||((t.roundValue||t.color)&&(i=Math.round(i)),t.min!==void 0&&(i=Math.max(i,t.min)),t.max!==void 0&&(i=Math.min(i,t.max))),i}f(Qs,"getEasedValue");function Js(t,e){return t.pfValue!=null||t.value!=null?t.pfValue!=null&&(e==null||e.type.units!=="%")?t.pfValue:t.value:t}f(Js,"getValue");function Or(t,e,r,a,n){var i=n!=null?n.type:null;r<0?r=0:r>1&&(r=1);var s=Js(t,n),o=Js(e,n);if(oe(s)&&oe(o))return Qs(i,s,o,r,a);if(Re(s)&&Re(o)){for(var l=[],u=0;u<o.length;u++){var h=s[u],c=o[u];if(h!=null&&c!=null){var v=Qs(i,h,c,r,a);l.push(v)}else l.push(c)}return l}}f(Or,"ease");function Bg(t,e,r,a){var n=!a,i=t._private,s=e._private,o=s.easing,l=s.startTime,u=a?t:t.cy(),h=u.style();if(!s.easingImpl)if(o==null)s.easingImpl=tn.linear;else{var c;if(ge(o)){var v=h.parse("transition-timing-function",o);c=v.value}else c=o;var d,g;ge(c)?(d=c,g=[]):(d=c[1],g=c.slice(2).map(function(F){return+F})),g.length>0?(d==="spring"&&g.push(s.duration),s.easingImpl=tn[d].apply(null,g)):s.easingImpl=tn[d]}var m=s.easingImpl,y;if(s.duration===0?y=1:y=(r-l)/s.duration,s.applying&&(y=s.progress),y<0?y=0:y>1&&(y=1),s.delay==null){var p=s.startPosition,b=s.position;if(b&&n&&!t.locked()){var E={};oa(p.x,b.x)&&(E.x=Or(p.x,b.x,y,m)),oa(p.y,b.y)&&(E.y=Or(p.y,b.y,y,m)),t.position(E)}var S=s.startPan,w=s.pan,x=i.pan,T=w!=null&&a;T&&(oa(S.x,w.x)&&(x.x=Or(S.x,w.x,y,m)),oa(S.y,w.y)&&(x.y=Or(S.y,w.y,y,m)),t.emit("pan"));var C=s.startZoom,D=s.zoom,L=D!=null&&a;L&&(oa(C,D)&&(i.zoom=ba(i.minZoom,Or(C,D,y,m),i.maxZoom)),t.emit("zoom")),(T||L)&&t.emit("viewport");var O=s.style;if(O&&O.length>0&&n){for(var A=0;A<O.length;A++){var I=O[A],M=I.name,P=I,R=s.startStyle[M],k=h.properties[R.name],B=Or(R,P,y,m,k);h.overrideBypass(t,M,B)}t.emit("style")}}return s.progress=y,y}f(Bg,"step$1");function oa(t,e){return t==null||e==null?!1:oe(t)&&oe(e)?!0:!!(t&&e)}f(oa,"valid");function Fg(t,e,r,a){var n=e._private;n.started=!0,n.startTime=r-n.progress*n.duration}f(Fg,"startAnimation");function js(t,e){var r=e._private.aniEles,a=[];function n(h,c){var v=h._private,d=v.animation.current,g=v.animation.queue,m=!1;if(d.length===0){var y=g.shift();y&&d.push(y)}for(var p=f(function(x){for(var T=x.length-1;T>=0;T--){var C=x[T];C()}x.splice(0,x.length)},"callbacks"),b=d.length-1;b>=0;b--){var E=d[b],S=E._private;if(S.stopped){d.splice(b,1),S.hooked=!1,S.playing=!1,S.started=!1,p(S.frames);continue}!S.playing&&!S.applying||(S.playing&&S.applying&&(S.applying=!1),S.started||Fg(h,E,t),Bg(h,E,t,c),S.applying&&(S.applying=!1),p(S.frames),S.step!=null&&S.step(t),E.completed()&&(d.splice(b,1),S.hooked=!1,S.playing=!1,S.started=!1,p(S.completes)),m=!0)}return!c&&d.length===0&&g.length===0&&a.push(h),m}f(n,"stepOne");for(var i=!1,s=0;s<r.length;s++){var o=r[s],l=n(o);i=i||l}var u=n(e,!0);(i||u)&&(r.length>0?e.notify("draw",r):e.notify("draw")),r.unmerge(a),e.emit("step")}f(js,"stepAll");var Gg={animate:Me.animate(),animation:Me.animation(),animated:Me.animated(),clearQueue:Me.clearQueue(),delay:Me.delay(),delayAnimation:Me.delayAnimation(),stop:Me.stop(),addToAnimationPool:f(function(e){var r=this;r.styleEnabled()&&r._private.aniEles.merge(e)},"addToAnimationPool"),stopAnimationLoop:f(function(){this._private.animationsRunning=!1},"stopAnimationLoop"),startAnimationLoop:f(function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function r(){e._private.animationsRunning&&un(f(function(i){js(i,e),r()},"animationStep"))}f(r,"headlessStep");var a=e.renderer();a&&a.beforeRender?a.beforeRender(f(function(i,s){js(s,e)},"rendererAnimationStep"),a.beforeRenderPriorities.animations):r()},"startAnimationLoop")},zg={qualifierCompare:f(function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},"qualifierCompare"),eventMatches:f(function(e,r,a){var n=r.qualifier;return n!=null?e!==a.target&&La(a.target)&&n.matches(a.target):!0},"eventMatches"),addEventFields:f(function(e,r){r.cy=e,r.target=e},"addEventFields"),callbackContext:f(function(e,r,a){return r.qualifier!=null?a.target:e},"callbackContext")},Wa=f(function(e){return ge(e)?new nr(e):e},"argSelector"),Lu={createEmitter:f(function(){var e=this._private;return e.emitter||(e.emitter=new An(zg,this)),this},"createEmitter"),emitter:f(function(){return this._private.emitter},"emitter"),on:f(function(e,r,a){return this.emitter().on(e,Wa(r),a),this},"on"),removeListener:f(function(e,r,a){return this.emitter().removeListener(e,Wa(r),a),this},"removeListener"),removeAllListeners:f(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),one:f(function(e,r,a){return this.emitter().one(e,Wa(r),a),this},"one"),once:f(function(e,r,a){return this.emitter().one(e,Wa(r),a),this},"once"),emit:f(function(e,r){return this.emitter().emit(e,r),this},"emit"),emitAndNotify:f(function(e,r){return this.emit(e),this.notify(e,r),this},"emitAndNotify")};Me.eventAliasesOn(Lu);var si={png:f(function(e){var r=this._private.renderer;return e=e||{},r.png(e)},"png"),jpg:f(function(e){var r=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",r.jpg(e)},"jpg")};si.jpeg=si.jpg;var rn={layout:f(function(e){var r=this;if(e==null){Ve("Layout options must be specified to make a layout");return}if(e.name==null){Ve("A `name` must be specified to make a layout");return}var a=e.name,n=r.extension("layout",a);if(n==null){Ve("No such layout `"+a+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var i;ge(e.eles)?i=r.$(e.eles):i=e.eles!=null?e.eles:r.$();var s=new n(Ee({},e,{cy:r,eles:i}));return s},"layout")};rn.createLayout=rn.makeLayout=rn.layout;var Vg={notify:f(function(e,r){var a=this._private;if(this.batching()){a.batchNotifications=a.batchNotifications||{};var n=a.batchNotifications[e]=a.batchNotifications[e]||this.collection();r!=null&&n.merge(r);return}if(a.notificationsEnabled){var i=this.renderer();this.destroyed()||!i||i.notify(e,r)}},"notify"),notifications:f(function(e){var r=this._private;return e===void 0?r.notificationsEnabled:(r.notificationsEnabled=!!e,this)},"notifications"),noNotifications:f(function(e){this.notifications(!1),e(),this.notifications(!0)},"noNotifications"),batching:f(function(){return this._private.batchCount>0},"batching"),startBatch:f(function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},"startBatch"),endBatch:f(function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var r=this.renderer();Object.keys(e.batchNotifications).forEach(function(a){var n=e.batchNotifications[a];n.empty()?r.notify(a):r.notify(a,n)})}return this},"endBatch"),batch:f(function(e){return this.startBatch(),e(),this.endBatch(),this},"batch"),batchData:f(function(e){var r=this;return this.batch(function(){for(var a=Object.keys(e),n=0;n<a.length;n++){var i=a[n],s=e[i],o=r.getElementById(i);o.data(s)}})},"batchData")},Ug=rt({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1}),oi={renderTo:f(function(e,r,a,n){var i=this._private.renderer;return i.renderTo(e,r,a,n),this},"renderTo"),renderer:f(function(){return this._private.renderer},"renderer"),forceRender:f(function(){return this.notify("draw"),this},"forceRender"),resize:f(function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},"resize"),initRenderer:f(function(e){var r=this,a=r.extension("renderer",e.name);if(a==null){Ve("Can not initialise: No such renderer `".concat(e.name,"` found. Did you forget to import it and `cytoscape.use()` it?"));return}e.wheelSensitivity!==void 0&&Ne("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 n=Ug(e);n.cy=r,r._private.renderer=new a(n),this.notify("init")},"initRenderer"),destroyRenderer:f(function(){var e=this;e.notify("destroy");var r=e.container();if(r)for(r._cyreg=null;r.childNodes.length>0;)r.removeChild(r.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(a){var n=a._private;n.rscratch={},n.rstyle={},n.animation.current=[],n.animation.queue=[]})},"destroyRenderer"),onRender:f(function(e){return this.on("render",e)},"onRender"),offRender:f(function(e){return this.off("render",e)},"offRender")};oi.invalidateDimensions=oi.resize;var an={collection:f(function(e,r){return ge(e)?this.$(e):yt(e)?e.collection():Re(e)?(r||(r={}),new tt(this,e,r.unique,r.removed)):new tt(this)},"collection"),nodes:f(function(e){var r=this.$(function(a){return a.isNode()});return e?r.filter(e):r},"nodes"),edges:f(function(e){var r=this.$(function(a){return a.isEdge()});return e?r.filter(e):r},"edges"),$:f(function(e){var r=this._private.elements;return e?r.filter(e):r.spawnSelf()},"$"),mutableElements:f(function(){return this._private.elements},"mutableElements")};an.elements=an.filter=an.$;var ut={},va="t",Yg="f";ut.apply=function(t){for(var e=this,r=e._private,a=r.cy,n=a.collection(),i=0;i<t.length;i++){var s=t[i],o=e.getContextMeta(s);if(!o.empty){var l=e.getContextStyle(o),u=e.applyContextStyle(o,l,s);s._private.appliedInitStyle?e.updateTransitions(s,u.diffProps):s._private.appliedInitStyle=!0;var h=e.updateStyleHints(s);h&&n.push(s)}}return n};ut.getPropertiesDiff=function(t,e){var r=this,a=r._private.propDiffs=r._private.propDiffs||{},n=t+"-"+e,i=a[n];if(i)return i;for(var s=[],o={},l=0;l<r.length;l++){var u=r[l],h=t[l]===va,c=e[l]===va,v=h!==c,d=u.mappedProperties.length>0;if(v||c&&d){var g=void 0;v&&d||v?g=u.properties:d&&(g=u.mappedProperties);for(var m=0;m<g.length;m++){for(var y=g[m],p=y.name,b=!1,E=l+1;E<r.length;E++){var S=r[E],w=e[E]===va;if(w&&(b=S.properties[y.name]!=null,b))break}!o[p]&&!b&&(o[p]=!0,s.push(p))}}}return a[n]=s,s};ut.getContextMeta=function(t){for(var e=this,r="",a,n=t._private.styleCxtKey||"",i=0;i<e.length;i++){var s=e[i],o=s.selector&&s.selector.matches(t);o?r+=va:r+=Yg}return a=e.getPropertiesDiff(n,r),t._private.styleCxtKey=r,{key:r,diffPropNames:a,empty:a.length===0}};ut.getContextStyle=function(t){var e=t.key,r=this,a=this._private.contextStyles=this._private.contextStyles||{};if(a[e])return a[e];for(var n={_private:{key:e}},i=0;i<r.length;i++){var s=r[i],o=e[i]===va;if(o)for(var l=0;l<s.properties.length;l++){var u=s.properties[l];n[u.name]=u}}return a[e]=n,n};ut.applyContextStyle=function(t,e,r){for(var a=this,n=t.diffPropNames,i={},s=a.types,o=0;o<n.length;o++){var l=n[o],u=e[l],h=r.pstyle(l);if(!u)if(h)h.bypass?u={name:l,deleteBypassed:!0}:u={name:l,delete:!0};else continue;if(h!==u){if(u.mapped===s.fn&&h!=null&&h.mapping!=null&&h.mapping.value===u.value){var c=h.mapping,v=c.fnValue=u.value(r);if(v===c.prevFnValue)continue}var d=i[l]={prev:h};a.applyParsedProperty(r,u),d.next=r.pstyle(l),d.next&&d.next.bypass&&(d.next=d.next.bypassed)}}return{diffProps:i}};ut.updateStyleHints=function(t){var e=t._private,r=this,a=r.propertyGroupNames,n=r.propertyGroupKeys,i=f(function(K,ie,de){return r.getPropertiesHash(K,ie,de)},"propHash"),s=e.styleKey;if(t.removed())return!1;var o=e.group==="nodes",l=t._private.style;a=Object.keys(l);for(var u=0;u<n.length;u++){var h=n[u];e.styleKeys[h]=[Ir,la]}for(var c=f(function(K,ie){return e.styleKeys[ie][0]=pa(K,e.styleKeys[ie][0])},"updateGrKey1"),v=f(function(K,ie){return e.styleKeys[ie][1]=ya(K,e.styleKeys[ie][1])},"updateGrKey2"),d=f(function(K,ie){c(K,ie),v(K,ie)},"updateGrKey"),g=f(function(K,ie){for(var de=0;de<K.length;de++){var re=K.charCodeAt(de);c(re,ie),v(re,ie)}},"updateGrKeyWStr"),m=2e9,y=f(function(K){return-128<K&&K<128&&Math.floor(K)!==K?m-(K*1024|0):K},"cleanNum"),p=0;p<a.length;p++){var b=a[p],E=l[b];if(E!=null){var S=this.properties[b],w=S.type,x=S.groupKey,T=void 0;S.hashOverride!=null?T=S.hashOverride(t,E):E.pfValue!=null&&(T=E.pfValue);var C=S.enums==null?E.value:null,D=T!=null,L=C!=null,O=D||L,A=E.units;if(w.number&&O&&!w.multiple){var I=D?T:C;d(y(I),x),!D&&A!=null&&g(A,x)}else g(E.strValue,x)}}for(var M=[Ir,la],P=0;P<n.length;P++){var R=n[P],k=e.styleKeys[R];M[0]=pa(k[0],M[0]),M[1]=ya(k[1],M[1])}e.styleKey=qf(M[0],M[1]);var B=e.styleKeys;e.labelDimsKey=Zt(B.labelDimensions);var F=i(t,["label"],B.labelDimensions);if(e.labelKey=Zt(F),e.labelStyleKey=Zt(za(B.commonLabel,F)),!o){var U=i(t,["source-label"],B.labelDimensions);e.sourceLabelKey=Zt(U),e.sourceLabelStyleKey=Zt(za(B.commonLabel,U));var V=i(t,["target-label"],B.labelDimensions);e.targetLabelKey=Zt(V),e.targetLabelStyleKey=Zt(za(B.commonLabel,V))}if(o){var G=e.styleKeys,$=G.nodeBody,j=G.nodeBorder,Q=G.nodeOutline,H=G.backgroundImage,te=G.compound,_=G.pie,z=[$,j,Q,H,te,_].filter(function(Z){return Z!=null}).reduce(za,[Ir,la]);e.nodeKey=Zt(z),e.hasPie=_!=null&&_[0]!==Ir&&_[1]!==la}return s!==e.styleKey};ut.clearStyleHints=function(t){var e=t._private;e.styleCxtKey="",e.styleKeys={},e.styleKey=null,e.labelKey=null,e.labelStyleKey=null,e.sourceLabelKey=null,e.sourceLabelStyleKey=null,e.targetLabelKey=null,e.targetLabelStyleKey=null,e.nodeKey=null,e.hasPie=null};ut.applyParsedProperty=function(t,e){var r=this,a=e,n=t._private.style,i,s=r.types,o=r.properties[a.name].type,l=a.bypass,u=n[a.name],h=u&&u.bypass,c=t._private,v="mapping",d=f(function($){return $==null?null:$.pfValue!=null?$.pfValue:$.value},"getVal"),g=f(function(){var $=d(u),j=d(a);r.checkTriggers(t,a.name,$,j)},"checkTriggers");if(e.name==="curve-style"&&t.isEdge()&&(e.value!=="bezier"&&t.isLoop()||e.value==="haystack"&&(t.source().isParent()||t.target().isParent()))&&(a=e=this.parse(e.name,"bezier",l)),a.delete)return n[a.name]=void 0,g(),!0;if(a.deleteBypassed)return u?u.bypass?(u.bypassed=void 0,g(),!0):!1:(g(),!0);if(a.deleteBypass)return u?u.bypass?(n[a.name]=u.bypassed,g(),!0):!1:(g(),!0);var m=f(function(){Ne("Do not assign mappings to elements without corresponding data (i.e. ele `"+t.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")},"printMappingErr");switch(a.mapped){case s.mapData:{for(var y=a.field.split("."),p=c.data,b=0;b<y.length&&p;b++){var E=y[b];p=p[E]}if(p==null)return m(),!1;var S;if(oe(p)){var w=a.fieldMax-a.fieldMin;w===0?S=0:S=(p-a.fieldMin)/w}else return Ne("Do not use continuous mappers without specifying numeric data (i.e. `"+a.field+": "+p+"` for `"+t.id()+"` is non-numeric)"),!1;if(S<0?S=0:S>1&&(S=1),o.color){var x=a.valueMin[0],T=a.valueMax[0],C=a.valueMin[1],D=a.valueMax[1],L=a.valueMin[2],O=a.valueMax[2],A=a.valueMin[3]==null?1:a.valueMin[3],I=a.valueMax[3]==null?1:a.valueMax[3],M=[Math.round(x+(T-x)*S),Math.round(C+(D-C)*S),Math.round(L+(O-L)*S),Math.round(A+(I-A)*S)];i={bypass:a.bypass,name:a.name,value:M,strValue:"rgb("+M[0]+", "+M[1]+", "+M[2]+")"}}else if(o.number){var P=a.valueMin+(a.valueMax-a.valueMin)*S;i=this.parse(a.name,P,a.bypass,v)}else return!1;if(!i)return m(),!1;i.mapping=a,a=i;break}case s.data:{for(var R=a.field.split("."),k=c.data,B=0;B<R.length&&k;B++){var F=R[B];k=k[F]}if(k!=null&&(i=this.parse(a.name,k,a.bypass,v)),!i)return m(),!1;i.mapping=a,a=i;break}case s.fn:{var U=a.value,V=a.fnValue!=null?a.fnValue:U(t);
vendor: 2,462 bytes, line 8
8if(a.prevFnValue=V,V==null)return Ne("Custom function mappers may not return null (i.e. `"+a.name+"` for ele `"+t.id()+"` is null)"),!1;if(i=this.parse(a.name,V,a.bypass,v),!i)return Ne("Custom function mappers may not return invalid values for the property type (i.e. `"+a.name+"` for ele `"+t.id()+"` is invalid)"),!1;i.mapping=Bt(a),a=i;break}case void 0:break;default:return!1}return l?(h?a.bypassed=u.bypassed:a.bypassed=u,n[a.name]=a):h?u.bypassed=a:n[a.name]=a,g(),!0};ut.cleanElements=function(t,e){for(var r=0;r<t.length;r++){var a=t[r];if(this.clearStyleHints(a),a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),!e)a._private.style={};else for(var n=a._private.style,i=Object.keys(n),s=0;s<i.length;s++){var o=i[s],l=n[o];l!=null&&(l.bypass?l.bypassed=null:n[o]=null)}}};ut.update=function(){var t=this._private.cy,e=t.mutableElements();e.updateStyle()};ut.updateTransitions=function(t,e){var r=this,a=t._private,n=t.pstyle("transition-property").value,i=t.pstyle("transition-duration").pfValue,s=t.pstyle("transition-delay").pfValue;if(n.length>0&&i>0){for(var o={},l=!1,u=0;u<n.length;u++){var h=n[u],c=t.pstyle(h),v=e[h];if(v){var d=v.prev,g=d,m=v.next!=null?v.next:c,y=!1,p=void 0,b=1e-6;g&&(oe(g.pfValue)&&oe(m.pfValue)?(y=m.pfValue-g.pfValue,p=g.pfValue+b*y):oe(g.value)&&oe(m.value)?(y=m.value-g.value,p=g.value+b*y):Re(g.value)&&Re(m.value)&&(y=g.value[0]!==m.value[0]||g.value[1]!==m.value[1]||g.value[2]!==m.value[2],p=g.strValue),y&&(o[h]=m.strValue,this.applyBypass(t,h,p),l=!0))}}if(!l)return;a.transitioning=!0,new _r(function(E){s>0?t.delayAnimation(s).play().promise().then(E):E()}).then(function(){return t.animation({style:o,duration:i,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(t,n),t.emitAndNotify("style"),a.transitioning=!1})}else a.transitioning&&(this.removeBypasses(t,n),t.emitAndNotify("style"),a.transitioning=!1)};ut.checkTrigger=function(t,e,r,a,n,i){var s=this.properties[e],o=n(s);o!=null&&o(r,a)&&i(s)};ut.checkZOrderTrigger=function(t,e,r,a){var n=this;this.checkTrigger(t,e,r,a,function(i){return i.triggersZOrder},function(){n._private.cy.notify("zorder",t)})};ut.checkBoundsTrigger=function(t,e,r,a){this.checkTrigger(t,e,r,a,function(n){return n.triggersBounds},function(n){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache(),n.triggersBoundsOfParallelBeziers&&e==="curve-style"&&(r==="bezier"||a==="bezier")&&t.parallelEdges().forEac
vendor: 5,349 bytes, line 8
8h(function(i){i.isBundledBezier()&&i.dirtyBoundingBoxCache()}),n.triggersBoundsOfConnectedEdges&&e==="display"&&(r==="none"||a==="none")&&t.connectedEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})};ut.checkTriggers=function(t,e,r,a){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,a),this.checkBoundsTrigger(t,e,r,a)};var Na={};Na.applyBypass=function(t,e,r,a){var n=this,i=[],s=!0;if(e==="*"||e==="**"){if(r!==void 0)for(var o=0;o<n.properties.length;o++){var l=n.properties[o],u=l.name,h=this.parse(u,r,!0);h&&i.push(h)}}else if(ge(e)){var c=this.parse(e,r,!0);c&&i.push(c)}else if(De(e)){var v=e;a=r;for(var d=Object.keys(v),g=0;g<d.length;g++){var m=d[g],y=v[m];if(y===void 0&&(y=v[mn(m)]),y!==void 0){var p=this.parse(m,y,!0);p&&i.push(p)}}}else return!1;if(i.length===0)return!1;for(var b=!1,E=0;E<t.length;E++){for(var S=t[E],w={},x=void 0,T=0;T<i.length;T++){var C=i[T];if(a){var D=S.pstyle(C.name);x=w[C.name]={prev:D}}b=this.applyParsedProperty(S,Bt(C))||b,a&&(x.next=S.pstyle(C.name))}b&&this.updateStyleHints(S),a&&this.updateTransitions(S,w,s)}return b};Na.overrideBypass=function(t,e,r){e=bi(e);for(var a=0;a<t.length;a++){var n=t[a],i=n._private.style[e],s=this.properties[e].type,o=s.color,l=s.mutiple,u=i?i.pfValue!=null?i.pfValue:i.value:null;!i||!i.bypass?this.applyBypass(n,e,r):(i.value=r,i.pfValue!=null&&(i.pfValue=r),o?i.strValue="rgb("+r.join(",")+")":l?i.strValue=r.join(" "):i.strValue=""+r,this.updateStyleHints(n)),this.checkTriggers(n,e,u,r)}};Na.removeAllBypasses=function(t,e){return this.removeBypasses(t,this.propertyNames,e)};Na.removeBypasses=function(t,e,r){for(var a=!0,n=0;n<t.length;n++){for(var i=t[n],s={},o=0;o<e.length;o++){var l=e[o],u=this.properties[l],h=i.pstyle(u.name);if(!(!h||!h.bypass)){var c="",v=this.parse(l,c,!0),d=s[u.name]={prev:h};this.applyParsedProperty(i,v),d.next=i.pstyle(u.name)}}this.updateStyleHints(i),r&&this.updateTransitions(i,s,a)}};var ki={};ki.getEmSizeInPixels=function(){var t=this.containerCss("font-size");return t!=null?parseFloat(t):1};ki.containerCss=function(t){var e=this._private.cy,r=e.container(),a=e.window();if(a&&r&&a.getComputedStyle)return a.getComputedStyle(r).getPropertyValue(t)};var Gt={};Gt.getRenderedStyle=function(t,e){return e?this.getStylePropertyValue(t,e,!0):this.getRawStyle(t,!0)};Gt.getRawStyle=function(t,e){var r=this;if(t=t[0],t){for(var a={},n=0;n<r.properties.length;n++){var i=r.properties[n],s=r.getStylePropertyValue(t,i.name,e);s!=null&&(a[i.name]=s,a[mn(i.name)]=s)}return a}};Gt.getIndexedStyle=function(t,e,r,a){var n=t.pstyle(e)[r][a];return n??t.cy().style().getDefaultProperty(e)[r][0]};Gt.getStylePropertyValue=function(t,e,r){var a=this;if(t=t[0],t){var n=a.properties[e];n.alias&&(n=n.pointsTo);var i=n.type,s=t.pstyle(n.name);if(s){var o=s.value,l=s.units,u=s.strValue;if(r&&i.number&&o!=null&&oe(o)){var h=t.cy().zoom(),c=f(function(y){return y*h},"getRenderedValue"),v=f(function(y,p){return c(y)+p},"getValueStringWithUnits"),d=Re(o),g=d?l.every(function(m){return m!=null}):l!=null;return g?d?o.map(function(m,y){return v(m,l[y])}).join(" "):v(o,l):d?o.map(function(m){return ge(m)?m:""+c(m)}).join(" "):""+c(o)}else if(u!=null)return u}return null}};Gt.getAnimationStartStyle=function(t,e){for(var r={},a=0;a<e.length;a++){var n=e[a],i=n.name,s=t.pstyle(i);s!==void 0&&(De(s)?s=this.parse(i,s.strValue):s=this.parse(i,s)),s&&(r[i]=s)}return r};Gt.getPropsList=function(t){var e=this,r=[],a=t,n=e.properties;if(a)for(var i=Object.keys(a),s=0;s<i.length;s++){var o=i[s],l=a[o],u=n[o]||n[bi(o)],h=this.parse(u.name,l);h&&r.push(h)}return r};Gt.getNonDefaultPropertiesHash=function(t,e,r){var a=r.slice(),n,i,s,o,l,u;for(l=0;l<e.length;l++)if(n=e[l],i=t.pstyle(n,!1),i!=null)if(i.pfValue!=null)a[0]=pa(o,a[0]),a[1]=ya(o,a[1]);else for(s=i.strValue,u=0;u<s.length;u++)o=s.charCodeAt(u),a[0]=pa(o,a[0]),a[1]=ya(o,a[1]);return a};Gt.getPropertiesHash=Gt.getNonDefaultPropertiesHash;var Nn={};Nn.appendFromJson=function(t){for(var e=this,r=0;r<t.length;r++){var a=t[r],n=a.selector,i=a.style||a.css,s=Object.keys(i);e.selector(n);for(var o=0;o<s.length;o++){var l=s[o],u=i[l];e.css(l,u)}}return e};Nn.fromJson=function(t){var e=this;return e.resetToDefault(),e.appendFromJson(t),e};Nn.json=function(){for(var t=[],e=this.defaultLength;e<this.length;e++){for(var r=this[e],a=r.selector,n=r.properties,i={},s=0;s<n.length;s++){var o=n[s];i[o.name]=o.strValue}t.push({selector:a?a.toString():"core",style:i})}return t};var Ri={};Ri.appendFromString=function(t){var e=this,r=this,a=""+t,n,i,s;a=a.replace(/[/][*](\s|.)+?[*][/]/g,"");function o(){a.length>n.length?a=a.substr(n.length):a=""}f(o,"removeSelAndBlockFromRemaining");function l(){i.length>s.length?i=i.substr(s.length):i=""}for(f(l,"removePropAndValFromRem");;){var u=a.match(/^\s*$/);if(u)break;var h=a.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!h){Ne("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+a);break}n=h[0];var c=h[1];if(c!=="core"){var v=new nr(c);if(v.invalid){Ne("Skipping parsing of block: Invalid selector found in string stylesheet: "+c),o();continue}}var d=h[2],g=!1;i=d;for(var m=[];;){var y=i.match(/^\s*$/);if(y)break;var p=i.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!p){Ne("Skipping parsing of block: Invalid formatting of style property and value definitions foun
8d in:"+d),g=!0;break}s=p[0];var b=p[1],E=p[2],S=e.properties[b];if(!S){Ne("Skipping property: Invalid property name in: "+s),l();continue}var w=r.parse(b,E);if(!w){Ne("Skipping property: Invalid property definition in: "+s),l();continue}m.push({name:b,val:E}),l()}if(g){o();break}r.selector(c);for(var x=0;x<m.length;x++){var T=m[x];r.css(T.name,T.val)}o()}return r};Ri.fromString=function(t){var e=this;return e.resetToDefault(),e.appendFromString(t),e};var je={};(function(){var t=Xe,e=Kl,r=Ql,a=Jl,n=jl,i=f(function(z){return"^"+z+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},"data"),s=f(function(z){var Z=t+"|\\w+|"+e+"|"+r+"|"+a+"|"+n;return"^"+z+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+t+")\\s*\\,\\s*("+t+")\\s*,\\s*("+Z+")\\s*\\,\\s*("+Z+")\\)$"},"mapData"),o=[`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`,"^(none)$","^(.+)$"];je.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},percentages:{number:!0,min:0,max:100,units:"%",implicitUnits:"%",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},nonNegativeNumber:{number:!0,min:0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:["horizontal","leftward","rightward","vertical","upward","downward","auto"]},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials","null"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},bgContainment:{enums:["inside","over"],multiple:!0},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:["solid","linear-gradient","radial-gradient"]},bool:{enums:["yes","no"]},bools:{enums:["yes","no"],multiple:!0},lineStyle:{enums:["solid","dotted","dashed"]},lineCap:{enums:["butt","round","square"]},linePosition:{enums:["center","inside","outside"]},lineJoin:{enums:["round","bevel","miter"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","straight-triangle","taxi","round-segments","round-taxi"]},radiusType:{enums:["arc-radius","influence-radius"],multiple:!0},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textOverflowWrap:{enums:["whitespace","anywhere"]},textBackgroundShape:{enums:["rectangle","roundrectangle","round-rectangle"]},nodeShape:{enums:["rectangle","roundrectangle","round-rectangle","cutrectangle","cut-rectangle","bottomroundrectangle","bottom-round-rectangle","barrel","ellipse","triangle","round-triangle","square","pentagon","round-pentagon","hexagon","round-hexagon","concavehexagon","concave-hexagon","heptagon","round-heptagon","octagon","round-octagon","tag","round-tag","star","diamond","round-diamond","vee","rhomboid","right-rhomboid","polygon"]},overlayShape:{enums:["roundrectangle","round-rectangle","ellipse"]},cornerRadius:{number:!0,min:0,units:"px|em",implicitUnits:"px",enums:["auto"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","circle-triangle","triangle-cross","triangle-backcurve","vee","square","circle","diamond","chevron","
8none"]},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:i("data")},layoutData:{mapping:!0,regex:i("layoutData")},scratch:{mapping:!0,regex:i("scratch")},mapData:{mapping:!0,regex:s("mapData")},mapLayoutData:{mapping:!0,regex:s("mapLayoutData")},mapScratch:{mapping:!0,regex:s("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:o,singleRegexMatchValue:!0},urls:{regexes:o,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:f(function(z,Z){switch(z.length){case 2:return Z[0]!=="deg"&&Z[0]!=="rad"&&Z[1]!=="deg"&&Z[1]!=="rad";case 1:return ge(z[0])||Z[0]==="deg"||Z[0]==="rad";default:return!1}},"validate")},easing:{regexes:["^(spring)\\s*\\(\\s*("+t+")\\s*,\\s*("+t+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+t+")\\s*,\\s*("+t+")\\s*,\\s*("+t+")\\s*,\\s*("+t+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]},gradientDirection:{enums:["to-bottom","to-top","to-left","to-right","to-bottom-right","to-bottom-left","to-top-right","to-top-left","to-right-bottom","to-left-bottom","to-right-top","to-left-top"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:f(function(z){var Z=z.length;return Z===1||Z===2||Z===4},"validate")}};var l={zeroNonZero:f(function(z,Z){return(z==null||Z==null)&&z!==Z||z==0&&Z!=0?!0:z!=0&&Z==0},"zeroNonZero"),any:f(function(z,Z){return z!=Z},"any"),emptyNonEmpty:f(function(z,Z){var K=rr(z),ie=rr(Z);return K&&!ie||!K&&ie},"emptyNonEmpty")},u=je.types,h=[{name:"label",type:u.text,triggersBounds:l.any,triggersZOrder:l.emptyNonEmpty},{name:"text-rotation",type:u.textRotation,triggersBounds:l.any},{name:"text-margin-x",type:u.bidirectionalSize,triggersBounds:l.any},{name:"text-margin-y",type:u.bidirectionalSize,triggersBounds:l.any}],c=[{name:"source-label",type:u.text,triggersBounds:l.any},{name:"source-text-rotation",type:u.textRotation,triggersBounds:l.any},{name:"source-text-margin-x",type:u.bidirectionalSize,triggersBounds:l.any},{name:"source-text-margin-y",type:u.bidirectionalSize,triggersBounds:l.any},{name:"source-text-offset",type:u.size,triggersBounds:l.any}],v=[{name:"target-label",type:u.text,triggersBounds:l.any},{name:"target-text-rotation",type:u.textRotation,triggersBounds:l.any},{name:"target-text-margin-x",type:u.bidirectionalSize,triggersBounds:l.any},{name:"target-text-margin-y",type:u.bidirectionalSize,triggersBounds:l.any},{name:"target-text-offset",type:u.size,triggersBounds:l.any}],d=[{name:"font-family",type:u.fontFamily,triggersBounds:l.any},{name:"font-style",type:u.fontStyle,triggersBounds:l.any},{name:"font-weight",type:u.fontWeight,triggersBounds:l.any},{name:"font-size",type:u.size,triggersBounds:l.any},{name:"text-transform",type:u.textTransform,triggersBounds:l.any},{name:"text-wrap",type:u.textWrap,triggersBounds:l.any},{name:"text-overflow-wrap",type:u.textOverflowWrap,triggersBounds:l.any},{name:"text-max-width",type:u.size,triggersBounds:l.any},{name:"text-outline-width",type:u.size,triggersBounds:l.any},{name:"line-height",type:u.positiveNumber,triggersBounds:l.any}],g=[{name:"text-valign",type:u.valign,triggersBounds:l.any},{name:"text-halign",type:u.halign,triggersBounds:l.any},{name:"color",type:u.color},{name:"text-outline-color",type:u.color},{name:"text-outline-opacity",type:u.zeroOneNumber},{name:"text-background-color",type:u.color},{name:"text-background-opacity",type:u.zeroOneNumber},{name:"text-background-padding",type:u.size,triggersBounds:l.any},{name:"text-border-opacity",type:u.zeroOneNumber},{name:"text-border-color",type:u.color},{name:"text-border-width",type:u.size,triggersBounds:l.any},{name:"text-border-style",type:u.borderStyle,triggersBounds:l.any}
8,{name:"text-background-shape",type:u.textBackgroundShape,triggersBounds:l.any},{name:"text-justification",type:u.justification}],m=[{name:"events",type:u.bool,triggersZOrder:l.any},{name:"text-events",type:u.bool,triggersZOrder:l.any}],y=[{name:"display",type:u.display,triggersZOrder:l.any,triggersBounds:l.any,triggersBoundsOfConnectedEdges:!0},{name:"visibility",type:u.visibility,triggersZOrder:l.any},{name:"opacity",type:u.zeroOneNumber,triggersZOrder:l.zeroNonZero},{name:"text-opacity",type:u.zeroOneNumber},{name:"min-zoomed-font-size",type:u.size},{name:"z-compound-depth",type:u.zCompoundDepth,triggersZOrder:l.any},{name:"z-index-compare",type:u.zIndexCompare,triggersZOrder:l.any},{name:"z-index",type:u.number,triggersZOrder:l.any}],p=[{name:"overlay-padding",type:u.size,triggersBounds:l.any},{name:"overlay-color",type:u.color},{name:"overlay-opacity",type:u.zeroOneNumber,triggersBounds:l.zeroNonZero},{name:"overlay-shape",type:u.overlayShape,triggersBounds:l.any},{name:"overlay-corner-radius",type:u.cornerRadius}],b=[{name:"underlay-padding",type:u.size,triggersBounds:l.any},{name:"underlay-color",type:u.color},{name:"underlay-opacity",type:u.zeroOneNumber,triggersBounds:l.zeroNonZero},{name:"underlay-shape",type:u.overlayShape,triggersBounds:l.any},{name:"underlay-corner-radius",type:u.cornerRadius}],E=[{name:"transition-property",type:u.propList},{name:"transition-duration",type:u.time},{name:"transition-delay",type:u.time},{name:"transition-timing-function",type:u.easing}],S=f(function(z,Z){return Z.value==="label"?-z.poolIndex():Z.pfValue},"nodeSizeHashOverride"),w=[{name:"height",type:u.nodeSize,triggersBounds:l.any,hashOverride:S},{name:"width",type:u.nodeSize,triggersBounds:l.any,hashOverride:S},{name:"shape",type:u.nodeShape,triggersBounds:l.any},{name:"shape-polygon-points",type:u.polygonPointList,triggersBounds:l.any},{name:"corner-radius",type:u.cornerRadius},{name:"background-color",type:u.color},{name:"background-fill",type:u.fill},{name:"background-opacity",type:u.zeroOneNumber},{name:"background-blacken",type:u.nOneOneNumber},{name:"background-gradient-stop-colors",type:u.colors},{name:"background-gradient-stop-positions",type:u.percentages},{name:"background-gradient-direction",type:u.gradientDirection},{name:"padding",type:u.sizeMaybePercent,triggersBounds:l.any},{name:"padding-relative-to",type:u.paddingRelativeTo,triggersBounds:l.any},{name:"bounds-expansion",type:u.boundsExpansion,triggersBounds:l.any}],x=[{name:"border-color",type:u.color},{name:"border-opacity",type:u.zeroOneNumber},{name:"border-width",type:u.size,triggersBounds:l.any},{name:"border-style",type:u.borderStyle},{name:"border-cap",type:u.lineCap},{name:"border-join",type:u.lineJoin},{name:"border-dash-pattern",type:u.numbers},{name:"border-dash-offset",type:u.number},{name:"border-position",type:u.linePosition}],T=[{name:"outline-color",type:u.color},{name:"outline-opacity",type:u.zeroOneNumber},{name:"outline-width",type:u.size,triggersBounds:l.any},{name:"outline-style",type:u.borderStyle},{name:"outline-offset",type:u.size,triggersBounds:l.any}],C=[{name:"background-image",type:u.urls},{name:"background-image-crossorigin",type:u.bgCrossOrigin},{name:"background-image-opacity",type:u.zeroOneNumbers},{name:"background-image-containment",type:u.bgContainment},{name:"background-image-smoothing",type:u.bools},{name:"background-position-x",type:u.bgPos},{name:"background-position-y",type:u.bgPos},{name:"background-width-relative-to",type:u.bgRelativeTo},{name:"background-height-relative-to",type:u.bgRelativeTo},{name:"background-repeat",type:u.bgRepeat},{name:"background-fit",type:u.bgFit},{name:"background-clip",type:u.bgClip},{name:"background-width",type:u.bgWH},{name:"background-height",type:u.bgWH},{name:"background-offset-x",type:u.bgPos},{name:"background-offset-y",type:u.bgPos}],D=[{name:"position",type:u.position,triggersBounds:l.any},{name:"compound-sizing-wrt-labels",type:u.compoundIncludeLabels,triggersBounds:l.any},{name:"min-width",type:u.size,triggersBounds:l.any},{name:"min-width-bias-left",type:u.sizeMaybePercent,triggersBounds:l.any},{name:"min-width-bias-right",type:u.sizeMaybePercent,triggersBounds:l.any},{name:"min-height",type:u.size,triggersBounds:l.any},{name:"min-height-bias-top",type:u.sizeMaybePercent,triggersBounds:l.any},{name:"min-height-bias-bottom",type:u.sizeMaybePercent,triggersBounds:l.any}],L=[{name:"line-style",type:u.lineStyle},{name:"line-color",type:u.color},{name:"line-fill",type:u.fill},{name:"line-cap",type:u.lineCap},{name:"line-opacity",type:u.zeroOneNumber},{name:"line-dash-pattern",type:u.numbers},{name:"line-dash-offset",type:u.number},{name:"line-outline-width",type:u.size},{name:"line-outline-color",type:u.color},{name:"line-gradient-stop-colors",type:u.colors},{name:"line-gradient-stop-positions",type:u.percentages},{name:"curve-style",type:u.curveStyle,triggersBounds:l.any,triggersBoundsOfParallelBeziers:!0},{name:"haystack-radius",type:u.zeroOneNumber,triggersBounds:l.any},{name:"source-endpoint",type:u.edgeEndpoint,triggersBounds:l.any},{name:"target-endpoint",type:u.edgeEndpoint,triggersBounds:l.any},{name:"control-point-step-size",type:u.size,triggersBounds:l.any},{name:"control-point-distances",type:u.bidirectionalSizes,triggersBounds:l.any}
vendor: 7,125 bytes, line 8
8,{name:"control-point-weights",type:u.numbers,triggersBounds:l.any},{name:"segment-distances",type:u.bidirectionalSizes,triggersBounds:l.any},{name:"segment-weights",type:u.numbers,triggersBounds:l.any},{name:"segment-radii",type:u.numbers,triggersBounds:l.any},{name:"radius-type",type:u.radiusType,triggersBounds:l.any},{name:"taxi-turn",type:u.bidirectionalSizeMaybePercent,triggersBounds:l.any},{name:"taxi-turn-min-distance",type:u.size,triggersBounds:l.any},{name:"taxi-direction",type:u.axisDirection,triggersBounds:l.any},{name:"taxi-radius",type:u.number,triggersBounds:l.any},{name:"edge-distances",type:u.edgeDistances,triggersBounds:l.any},{name:"arrow-scale",type:u.positiveNumber,triggersBounds:l.any},{name:"loop-direction",type:u.angle,triggersBounds:l.any},{name:"loop-sweep",type:u.angle,triggersBounds:l.any},{name:"source-distance-from-node",type:u.size,triggersBounds:l.any},{name:"target-distance-from-node",type:u.size,triggersBounds:l.any}],O=[{name:"ghost",type:u.bool,triggersBounds:l.any},{name:"ghost-offset-x",type:u.bidirectionalSize,triggersBounds:l.any},{name:"ghost-offset-y",type:u.bidirectionalSize,triggersBounds:l.any},{name:"ghost-opacity",type:u.zeroOneNumber}],A=[{name:"selection-box-color",type:u.color},{name:"selection-box-opacity",type:u.zeroOneNumber},{name:"selection-box-border-color",type:u.color},{name:"selection-box-border-width",type:u.size},{name:"active-bg-color",type:u.color},{name:"active-bg-opacity",type:u.zeroOneNumber},{name:"active-bg-size",type:u.size},{name:"outside-texture-bg-color",type:u.color},{name:"outside-texture-bg-opacity",type:u.zeroOneNumber}],I=[];je.pieBackgroundN=16,I.push({name:"pie-size",type:u.sizeMaybePercent});for(var M=1;M<=je.pieBackgroundN;M++)I.push({name:"pie-"+M+"-background-color",type:u.color}),I.push({name:"pie-"+M+"-background-size",type:u.percent}),I.push({name:"pie-"+M+"-background-opacity",type:u.zeroOneNumber});var P=[],R=je.arrowPrefixes=["source","mid-source","target","mid-target"];[{name:"arrow-shape",type:u.arrowShape,triggersBounds:l.any},{name:"arrow-color",type:u.color},{name:"arrow-fill",type:u.arrowFill},{name:"arrow-width",type:u.arrowWidth}].forEach(function(_){R.forEach(function(z){var Z=z+"-"+_.name,K=_.type,ie=_.triggersBounds;P.push({name:Z,type:K,triggersBounds:ie})})},{});var k=je.properties=[].concat(m,E,y,p,b,O,g,d,h,c,v,w,x,T,C,I,D,L,P,A),B=je.propertyGroups={behavior:m,transition:E,visibility:y,overlay:p,underlay:b,ghost:O,commonLabel:g,labelDimensions:d,mainLabel:h,sourceLabel:c,targetLabel:v,nodeBody:w,nodeBorder:x,nodeOutline:T,backgroundImage:C,pie:I,compound:D,edgeLine:L,edgeArrow:P,core:A},F=je.propertyGroupNames={},U=je.propertyGroupKeys=Object.keys(B);U.forEach(function(_){F[_]=B[_].map(function(z){return z.name}),B[_].forEach(function(z){return z.groupKey=_})});var V=je.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"}];je.propertyNames=k.map(function(_){return _.name});for(var G=0;G<k.length;G++){var $=k[G];k[$.name]=$}for(var j=0;j<V.length;j++){var Q=V[j],H=k[Q.pointsTo],te={name:Q.name,alias:!0,pointsTo:H};k.push(te),k[Q.name]=te}})();je.getDefaultProperty=function(t){return this.getDefaultProperties()[t]};je.getDefaultProperties=function(){var t=this._private;if(t.defaultProperties!=null)return t.defaultProperties;for(var e=Ee({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125,events:"yes","text-events":"no","text-valign":"top","text-halign":"center","text-justification":"auto","line-height":1,color:"#000","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-overflow-wrap":"whitespace","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"overlay-shape":"round-rectangle","overlay-corner-radius":"auto","underlay-opacity":0,"underlay-color":"#000","underlay-padding":10,"underlay-shape":"round-rectangle","underlay-corner-radius":"auto","transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","background-blacken":0,"background-color":"#999","background-fill":"solid","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-image-containment":"inside","background-image-smoothing":"yes","background-position-x":"50%","background-position-y":"50%","background-offset-x":0,"background-offset-y":0,"background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid","border-dash-pattern":[4,2],"border-dash-offset":0,"border-cap":"butt","border-join":"miter","border-position":"center","outline-color":"#999","outline-opacity":1,"outline-width":0,"outline-offset":0,"outline-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1","corner-radius":"auto","bounds-expansion":0,"background-gradient-direction":"to-bottom","background-gradient-stop-colors":"#999","background-gradient-stop-positions":"0%",ghost:"no","ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}
8-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce(function(l,u){for(var h=1;h<=je.pieBackgroundN;h++){var c=u.name.replace("{{i}}",h),v=u.value;l[c]=v}return l},{}),{"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(l,u){return je.arrowPrefixes.forEach(function(h){var c=h+"-"+u.name,v=u.value;l[c]=v}),l},{})),r={},a=0;a<this.properties.length;a++){var n=this.properties[a];if(!n.pointsTo){var i=n.name,s=e[i],o=this.parse(i,s);r[i]=o}}return t.defaultProperties=r,t.defaultProperties};je.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 In={};In.parse=function(t,e,r,a){var n=this;if(ze(e))return n.parseImplWarn(t,e,r,a);var i=a==="mapping"||a===!0||a===!1||a==null?"dontcare":a,s=r?"t":"f",o=""+e,l=Bo(t,o,s,i),u=n.propCache=n.propCache||[],h;return(h=u[l])||(h=u[l]=n.parseImplWarn(t,e,r,a)),(r||a==="mapping")&&(h=Bt(h),h&&(h.value=Bt(h.value))),h};In.parseImplWarn=function(t,e,r,a){var n=this.parseImpl(t,e,r,a);return!n&&e!=null&&Ne("The style property `".concat(t,": ").concat(e,"` is invalid")),n&&(n.name==="width"||n.name==="height")&&e==="label"&&Ne("The style value of `label` is deprecated for `"+n.name+"`"),n};In.parseImpl=function(t,e,r,a){var n=this;t=bi(t);var i=n.properties[t],s=e,o=n.types;if(!i||e===void 0)return null;i.alias&&(i=i.pointsTo,t=i.name);var l=ge(e);l&&(e=e.trim());var u=i.type;if(!u)return null;if(r&&(e===""||e===null))return{name:t,value:e,bypass:!0,deleteBypass:!0};if(ze(e))return{name:t,value:e,strValue:"fn",mapped:o.fn,bypass:r};var h,c;if(!(!l||a||e.length<7||e[1]!=="a")){if(e.length>=7&&e[0]==="d"&&(h=new RegExp(o.data.regex).exec(e))){if(r)return!1;var v=o.data;return{name:t,value:h,strValue:""+e,mapped:v,field:h[1],bypass:r}}else if(e.length>=10&&e[0]==="m"&&(c=new RegExp(o.mapData.regex).exec(e))){if(r||u.multiple)return!1;var d=o.mapData;if(!(u.color||u.number))return!1;var g=this.parse(t,c[4]);if(!g||g.mapped)return!1;var m=this.parse(t,c[5]);if(!m||m.mapped)return!1;if(g.pfValue===m.pfValue||g.strValue===m.strValue)return Ne("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+g.strValue+"`"),this.parse(t,g.strValue);if(u.color){var y=g.value,p=m.value,b=y[0]===p[0]&&y[1]===p[1]&&y[2]===p[2]&&(y[3]===p[3]||(y[3]==null||y[3]===1)&&(p[3]==null||p[3]===1));if(b)return!1}return{name:t,value:c,strValue:""+e,mapped:d,field:c[1],fieldMin:parseFloat(c[2]),fieldMax:parseFloat(c[3]),valueMin:g.value,valueMax:m.value,bypass:r}}}if(u.multiple&&a!=="multiple"){var E;if(l?E=e.split(/\s+/):Re(e)?E=e:E=[e],u.evenMultiple&&E.length%2!==0)return null;for(var S=[],w=[],x=[],T="",C=!1,D=0;D<E.length;D++){var L=n.parse(t,E[D],r,"multiple");C=C||ge(L.value),S.push(L.value),x.push(L.pfValue!=null?L.pfValue:L.value),w.push(L.units),T+=(D>0?" ":"")+L.strValue}return u.validate&&!u.validate(S,w)?null:u.singleEnum&&C?S.length===1&&ge(S[0])?{name:t,value:S[0],strValue:S[0],bypass:r}:null:{name:t,value:S,pfValue:x,strValue:T,bypass:r,units:w}}var O=f(function(){for(var z=0;z<u.enums.length;z++){var Z=u.enums[z];if(Z===e)return{name:t,value:e,strValue:""+e,bypass:r}}return null},"checkEnums");if(u.number){var A,I="px";if(u.units&&(A=u.units),u.implicitUnits&&(I=u.implicitUnits),!u.unitless)if(l){var M="px|em"+(u.allowPercent?"|\\%":"");A&&(M=A);var P=e.match("^("+Xe+")("+M+")?$");P&&(e=P[1],A=P[2]||I)}else(!A||u.implicitUnits)&&(A=I);if(e=parseFloat(e),isNaN(e)&&u.enums===void 0)return null;if(isNaN(e)&&u.enums!==void 0)return e=s,O();if(u.integer&&!Yl(e)||u.min!==void 0&&(e<u.min||u.strictMin&&e===u.min)||u.max!==void 0&&(e>u.max||u.strictMax&&e===u.max))return null;var R={name:t,value:e,strValue:""+e+(A||""),units:A,bypass:r};return u.unitless||A!=="px"&&A!=="em"?R.pfValue=e:R.pfValue=A==="px"||!A?e:this.getEmSizeInPixels()*e,(A==="ms"||A==="s")&&(R.pfValue=A==="ms"?e:1e3*e),(A==="deg"||A==="rad")&&(R.pfValue=A==="rad"?e:Th(e)),A==="%"&&(R.pfValue=e/100),R}else if(u.propList){var k=[],B=""+e;if(B!=="none"){for(var F=B.split(/\s*,\s*|\s+/),U=0;U<F.length;U++){var V=F[U].trim();n.properties[V]?k.push(V):Ne("`"+V+"` is not a valid property name")}if(k.length===0)return null}return{name:t,value:k,strValue:k.length===0?"none":k.join(" "),bypass:r}}else if(u.color){var G=sf(e);return G?{name:t,value:G,pfValue:G,strValue:"rgb("+G[0]+","+G[1]+","+G[2]+")",bypass:r}:null}else if(u.regex||u.regexes){if(u.enums){var $=O();if($)return $}for(var j=u.regexes?u.regexes:[u.regex],Q=0;Q<j.length;Q++){var H=new RegExp(j[Q]),te=H.exec(e);if(te)return{name:t,value:u.singleRegexMatchValue?te[1]:te,strValue:""+e,bypass:r}}return null}else return u.string?{name:t,value:""+e,strValue:""+e,bypass:r}:u.enums?O():null};var it=f(function t(e){if(!(this instanceof t))return new t(e);if(!mi(e)){Ve("A style must have a core reference");return}this._private={cy:e,coreStyle:{}},this.length=0,this.resetToDefault()},"Style"),ot=it.prototype;
vendor: 4,182 bytes, line 8
8ot.instanceString=function(){return"style"};ot.clear=function(){for(var t=this._private,e=t.cy,r=e.elements(),a=0;a<this.length;a++)this[a]=void 0;return this.length=0,t.contextStyles={},t.propDiffs={},this.cleanElements(r,!0),r.forEach(function(n){var i=n[0]._private;i.styleDirty=!0,i.appliedInitStyle=!1}),this};ot.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this};ot.core=function(t){return this._private.coreStyle[t]||this.getDefaultProperty(t)};ot.selector=function(t){var e=t==="core"?null:new nr(t),r=this.length++;return this[r]={selector:e,properties:[],mappedProperties:[],index:r},this};ot.css=function(){var t=this,e=arguments;if(e.length===1)for(var r=e[0],a=0;a<t.properties.length;a++){var n=t.properties[a],i=r[n.name];i===void 0&&(i=r[mn(n.name)]),i!==void 0&&this.cssRule(n.name,i)}else e.length===2&&this.cssRule(e[0],e[1]);return this};ot.style=ot.css;ot.cssRule=function(t,e){var r=this.parse(t,e);if(r){var a=this.length-1;this[a].properties.push(r),this[a].properties[r.name]=r,r.name.match(/pie-(\d+)-background-size/)&&r.value&&(this._private.hasPie=!0),r.mapped&&this[a].mappedProperties.push(r);var n=!this[a].selector;n&&(this._private.coreStyle[r.name]=r)}return this};ot.append=function(t){return So(t)?t.appendToStyle(this):Re(t)?this.appendFromJson(t):ge(t)&&this.appendFromString(t),this};it.fromJson=function(t,e){var r=new it(t);return r.fromJson(e),r};it.fromString=function(t,e){return new it(t).fromString(e)};[ut,Na,ki,Gt,Nn,Ri,je,In].forEach(function(t){Ee(ot,t)});it.types=ot.types;it.properties=ot.properties;it.propertyGroups=ot.propertyGroups;it.propertyGroupNames=ot.propertyGroupNames;it.propertyGroupKeys=ot.propertyGroupKeys;var $g={style:f(function(e){if(e){var r=this.setStyle(e);r.update()}return this._private.style},"style"),setStyle:f(function(e){var r=this._private;return So(e)?r.style=e.generateStyle(this):Re(e)?r.style=it.fromJson(this,e):ge(e)?r.style=it.fromString(this,e):r.style=it(this),r.style},"setStyle"),updateStyle:f(function(){this.mutableElements().updateStyle()},"updateStyle")},_g="single",wr={autolock:f(function(e){if(e!==void 0)this._private.autolock=!!e;else return this._private.autolock;return this},"autolock"),autoungrabify:f(function(e){if(e!==void 0)this._private.autoungrabify=!!e;else return this._private.autoungrabify;return this},"autoungrabify"),autounselectify:f(function(e){if(e!==void 0)this._private.autounselectify=!!e;else return this._private.autounselectify;return this},"autounselectify"),selectionType:f(function(e){var r=this._private;if(r.selectionType==null&&(r.selectionType=_g),e!==void 0)(e==="additive"||e==="single")&&(r.selectionType=e);else return r.selectionType;return this},"selectionType"),panningEnabled:f(function(e){if(e!==void 0)this._private.panningEnabled=!!e;else return this._private.panningEnabled;return this},"panningEnabled"),userPanningEnabled:f(function(e){if(e!==void 0)this._private.userPanningEnabled=!!e;else return this._private.userPanningEnabled;return this},"userPanningEnabled"),zoomingEnabled:f(function(e){if(e!==void 0)this._private.zoomingEnabled=!!e;else return this._private.zoomingEnabled;return this},"zoomingEnabled"),userZoomingEnabled:f(function(e){if(e!==void 0)this._private.userZoomingEnabled=!!e;else return this._private.userZoomingEnabled;return this},"userZoomingEnabled"),boxSelectionEnabled:f(function(e){if(e!==void 0)this._private.boxSelectionEnabled=!!e;else return this._private.boxSelectionEnabled;return this},"boxSelectionEnabled"),pan:f(function(){var e=arguments,r=this._private.pan,a,n,i,s,o;switch(e.length){case 0:return r;case 1:if(ge(e[0]))return a=e[0],r[a];if(De(e[0])){if(!this._private.panningEnabled)return this;i=e[0],s=i.x,o=i.y,oe(s)&&(r.x=s),oe(o)&&(r.y=o),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;a=e[0],n=e[1],(a==="x"||a==="y")&&oe(n)&&(r[a]=n),this.emit("pan viewport");break}return this.notify("viewport"),this},"pan"),panBy:f(function(e,r){var a=arguments,n=this._private.pan,i,s,o,l,u;if(!this._private.panningEnabled)return this;switch(a.length){case 1:De(e)&&(o=a[0],l=o.x,u=o.y,oe(l)&&(n.x+=l),oe(u)&&(n.y+=u),this.emit
vendor: 4,510 bytes, line 8
8("pan viewport"));break;case 2:i=e,s=r,(i==="x"||i==="y")&&oe(s)&&(n[i]+=s),this.emit("pan viewport");break}return this.notify("viewport"),this},"panBy"),fit:f(function(e,r){var a=this.getFitViewport(e,r);if(a){var n=this._private;n.zoom=a.zoom,n.pan=a.pan,this.emit("pan zoom viewport"),this.notify("viewport")}return this},"fit"),getFitViewport:f(function(e,r){if(oe(e)&&r===void 0&&(r=e,e=void 0),!(!this._private.panningEnabled||!this._private.zoomingEnabled)){var a;if(ge(e)){var n=e;e=this.$(n)}else if(Hl(e)){var i=e;a={x1:i.x1,y1:i.y1,x2:i.x2,y2:i.y2},a.w=a.x2-a.x1,a.h=a.y2-a.y1}else yt(e)||(e=this.mutableElements());if(!(yt(e)&&e.empty())){a=a||e.boundingBox();var s=this.width(),o=this.height(),l;if(r=oe(r)?r:0,!isNaN(s)&&!isNaN(o)&&s>0&&o>0&&!isNaN(a.w)&&!isNaN(a.h)&&a.w>0&&a.h>0){l=Math.min((s-2*r)/a.w,(o-2*r)/a.h),l=l>this._private.maxZoom?this._private.maxZoom:l,l=l<this._private.minZoom?this._private.minZoom:l;var u={x:(s-l*(a.x1+a.x2))/2,y:(o-l*(a.y1+a.y2))/2};return{zoom:l,pan:u}}}}},"getFitViewport"),zoomRange:f(function(e,r){var a=this._private;if(r==null){var n=e;e=n.min,r=n.max}return oe(e)&&oe(r)&&e<=r?(a.minZoom=e,a.maxZoom=r):oe(e)&&r===void 0&&e<=a.maxZoom?a.minZoom=e:oe(r)&&e===void 0&&r>=a.minZoom&&(a.maxZoom=r),this},"zoomRange"),minZoom:f(function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},"minZoom"),maxZoom:f(function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},"maxZoom"),getZoomedViewport:f(function(e){var r=this._private,a=r.pan,n=r.zoom,i,s,o=!1;if(r.zoomingEnabled||(o=!0),oe(e)?s=e:De(e)&&(s=e.level,e.position!=null?i=xn(e.position,n,a):e.renderedPosition!=null&&(i=e.renderedPosition),i!=null&&!r.panningEnabled&&(o=!0)),s=s>r.maxZoom?r.maxZoom:s,s=s<r.minZoom?r.minZoom:s,o||!oe(s)||s===n||i!=null&&(!oe(i.x)||!oe(i.y)))return null;if(i!=null){var l=a,u=n,h=s,c={x:-h/u*(i.x-l.x)+i.x,y:-h/u*(i.y-l.y)+i.y};return{zoomed:!0,panned:!0,zoom:h,pan:c}}else return{zoomed:!0,panned:!1,zoom:s,pan:a}},"getZoomedViewport"),zoom:f(function(e){if(e===void 0)return this._private.zoom;var r=this.getZoomedViewport(e),a=this._private;return r==null||!r.zoomed?this:(a.zoom=r.zoom,r.panned&&(a.pan.x=r.pan.x,a.pan.y=r.pan.y),this.emit("zoom"+(r.panned?" pan":"")+" viewport"),this.notify("viewport"),this)},"zoom"),viewport:f(function(e){var r=this._private,a=!0,n=!0,i=[],s=!1,o=!1;if(!e)return this;if(oe(e.zoom)||(a=!1),De(e.pan)||(n=!1),!a&&!n)return this;if(a){var l=e.zoom;l<r.minZoom||l>r.maxZoom||!r.zoomingEnabled?s=!0:(r.zoom=l,i.push("zoom"))}if(n&&(!s||!e.cancelOnFailedZoom)&&r.panningEnabled){var u=e.pan;oe(u.x)&&(r.pan.x=u.x,o=!1),oe(u.y)&&(r.pan.y=u.y,o=!1),o||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},"viewport"),center:f(function(e){var r=this.getCenterPan(e);return r&&(this._private.pan=r,this.emit("pan viewport"),this.notify("viewport")),this},"center"),getCenterPan:f(function(e,r){if(this._private.panningEnabled){if(ge(e)){var a=e;e=this.mutableElements().filter(a)}else yt(e)||(e=this.mutableElements());if(e.length!==0){var n=e.boundingBox(),i=this.width(),s=this.height();r=r===void 0?this._private.zoom:r;var o={x:(i-r*(n.x1+n.x2))/2,y:(s-r*(n.y1+n.y2))/2};return o}}},"getCenterPan"),reset:f(function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},"reset"),invalidateSize:f(function(){this._private.sizeCache=null},"invalidateSize"),size:f(function(){var e=this._private,r=e.container,a=this;return e.sizeCache=e.sizeCache||(r?function(){var n=a.window().getComputedStyle(r),i=f(function(o){return parseFloat(n.getPropertyValue(o))},"val");return{width:r.clientWidth-i("padding-left")-i("padding-right"),height:r.clientHeight-i("padding-top")-i("padding-bottom")}}():{width:1,height:1})},"size"),width:f(function(){return this.size().width},"width"),height:f(function(){return this.size().height},"height"),extent:f(function(){var e=this._private.pan,r=this._private.zoom,a=this.renderedExtent(),n={x1:(a.x1-e.x)/r,x2:(a.x2-e.x)/r,y1:(a.y1-e.y)/r,y2:(a.y2-e.y)/r};return n.w=n.x2-n.x1,n.h=n.y2-n.y1,n},"extent"),renderedExtent:f(function(){var e=this.width(),r=this.height();return{x1:0,y1:0,x2:e,y2:r,w:e,h:r}},"renderedExtent"),multiClickDebounceTime:f(function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this},"multiClickDebounceTime")};wr.centre=wr.center;wr.autolockNodes=wr.autolock;
vendor: 5,518 bytes, line 8
8wr.autoungrabifyNodes=wr.autoungrabify;var Ca={data:Me.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Me.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Me.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Me.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Ca.attr=Ca.data;Ca.removeAttr=Ca.removeData;var Da=f(function(e){var r=this;e=Ee({},e);var a=e.container;a&&!on(a)&&on(a[0])&&(a=a[0]);var n=a?a._cyreg:null;n=n||{},n&&n.cy&&(n.cy.destroy(),n={});var i=n.readies=n.readies||[];a&&(a._cyreg=n),n.cy=r;var s=He!==void 0&&a!==void 0&&!e.headless,o=e;o.layout=Ee({name:s?"grid":"null"},o.layout),o.renderer=Ee({name:s?"canvas":"null"},o.renderer);var l=f(function(g,m,y){return m!==void 0?m:y!==void 0?y:g},"defVal"),u=this._private={container:a,ready:!1,options:o,elements:new tt(this),listeners:[],aniEles:new tt(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:l(!0,o.zoomingEnabled),userZoomingEnabled:l(!0,o.userZoomingEnabled),panningEnabled:l(!0,o.panningEnabled),userPanningEnabled:l(!0,o.userPanningEnabled),boxSelectionEnabled:l(!0,o.boxSelectionEnabled),autolock:l(!1,o.autolock,o.autolockNodes),autoungrabify:l(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:l(!1,o.autounselectify),styleEnabled:o.styleEnabled===void 0?s:o.styleEnabled,zoom:oe(o.zoom)?o.zoom:1,pan:{x:De(o.pan)&&oe(o.pan.x)?o.pan.x:0,y:De(o.pan)&&oe(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:l(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});var h=f(function(g,m){var y=g.some(Xl);if(y)return _r.all(g).then(m);m(g)},"loadExtData");u.styleEnabled&&r.setStyle([]);var c=Ee({},o,o.renderer);r.initRenderer(c);var v=f(function(g,m,y){r.notifications(!1);var p=r.mutableElements();p.length>0&&p.remove(),g!=null&&(De(g)||Re(g))&&r.add(g),r.one("layoutready",function(E){r.notifications(!0),r.emit(E),r.one("load",m),r.emitAndNotify("load")}).one("layoutstop",function(){r.one("done",y),r.emit("done")});var b=Ee({},r._private.options.layout);b.eles=r.elements(),r.layout(b).run()},"setElesAndLayout");h([o.style,o.elements],function(d){var g=d[0],m=d[1];u.styleEnabled&&r.style().append(g),v(m,function(){r.startAnimationLoop(),u.ready=!0,ze(o.ready)&&r.on("ready",o.ready);for(var y=0;y<i.length;y++){var p=i[y];r.on("ready",p)}n&&(n.readies=[]),r.emit("ready")},o.done)})},"Core"),dn=Da.prototype;Ee(dn,{instanceString:f(function(){return"core"},"instanceString"),isReady:f(function(){return this._private.ready},"isReady"),destroyed:f(function(){return this._private.destroyed},"destroyed"),ready:f(function(e){return this.isReady()?this.emitter().emit("ready",[],e):this.on("ready",e),this},"ready"),destroy:f(function(){var e=this;if(!e.destroyed())return e.stopAnimationLoop(),e.destroyRenderer(),this.emit("destroy"),e._private.destroyed=!0,e},"destroy"),hasElementWithId:f(function(e){return this._private.elements.hasElementWithId(e)},"hasElementWithId"),getElementById:f(function(e){return this._private.elements.getElementById(e)},"getElementById"),hasCompoundNodes:f(function(){return this._private.hasCompoundNodes},"hasCompoundNodes"),headless:f(function(){return this._private.renderer.isHeadless()},"headless"),styleEnabled:f(function(){return this._private.styleEnabled},"styleEnabled"),addToPool:f(function(e){return this._private.elements.merge(e),this},"addToPool"),removeFromPool:f(function(e){return this._private.elements.unmerge(e),this},"removeFromPool"),container:f(function(){return this._private.container||null},"container"),window:f(function(){var e=this._private.container;if(e==null)return He;var r=this._private.container.ownerDocument;return r===void 0||r==null?He:r.defaultView||He},"window"),mount:f(function(e){if(e!=null){var r=this,a=r._private,n=a.options;return!on(e)&&on(e[0])&&(e=e[0]),r.stopAnimationLoop(),r.destroyRenderer(),a.container=e,a.styleEnabled=!0,r.invalidateSize(),r.initRenderer(Ee({},n,n.renderer,{name:n.renderer.name==="null"?"canvas":n.renderer.name})),r.startAnimationLoop(),r.style(n.style),r.emit("mount"),r}},"mount"),unmount:f(function(){var e=this;return e.stopAnimationLoop(),e.destroyRenderer(),e.initRenderer({name:"null"}),e.emit("unmount"),e},"unmount"),options:f(function(){return Bt(this._private.options)},"options"),json:f(function(e){var r=this,a=r._private,n=r.mutableElements(),i=f(function(S){return r.getElementById(S.id())},"getFreshRef");if(De(e)){if(r.startBatch(),e.elements){var s={},o=f(function(S,w){for(var x=[],T=[],C=0;C<S.length;C++){var D=S[C];if(!D.data.id){Ne("cy.json() cannot handle elements without an ID attribute");continue}var L=""+D.data.id,O=r.getElementById(L);s[L]=!0,O.length!==0?T.push({ele:O,json:D}):(w&&(D.group=w),x.push(D))}r.add(x);for(var A=0;A<T.length;A++){var I=T[A],M=I.ele,P=I.json;M.json(P)}},"updateEles");if(Re(e.elements))o(e.elements);else for(var l=["nodes","edges"],u=0;u<l.length;u++){var h=l[u],c=e.elements[h];Re(c)&&o(c,h)}var v=r.collection();n.filter(function(E){return!s[E.id()]}
vendor: 4,131 bytes, line 8
8).forEach(function(E){E.isParent()?v.merge(E):E.remove()}),v.forEach(function(E){return E.children().move({parent:null})}),v.forEach(function(E){return i(E).remove()})}e.style&&r.style(e.style),e.zoom!=null&&e.zoom!==a.zoom&&r.zoom(e.zoom),e.pan&&(e.pan.x!==a.pan.x||e.pan.y!==a.pan.y)&&r.pan(e.pan),e.data&&r.data(e.data);for(var d=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],g=0;g<d.length;g++){var m=d[g];e[m]!=null&&r[m](e[m])}return r.endBatch(),this}else{var y=!!e,p={};y?p.elements=this.elements().map(function(E){return E.json()}):(p.elements={},n.forEach(function(E){var S=E.group();p.elements[S]||(p.elements[S]=[]),p.elements[S].push(E.json())})),this._private.styleEnabled&&(p.style=r.style().json()),p.data=Bt(r.data());var b=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=Bt(a.pan),p.boxSelectionEnabled=a.boxSelectionEnabled,p.renderer=Bt(b.renderer),p.hideEdgesOnViewport=b.hideEdgesOnViewport,p.textureOnViewport=b.textureOnViewport,p.wheelSensitivity=b.wheelSensitivity,p.motionBlur=b.motionBlur,p.multiClickDebounceTime=b.multiClickDebounceTime,p}},"json")});dn.$id=dn.getElementById;[kg,Gg,Lu,si,rn,Vg,oi,an,$g,wr,Ca].forEach(function(t){Ee(dn,t)});var Hg={fit:!0,directed:!1,padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:f(function(e,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:f(function(e,r){return r},"transform")},Xg={maximal:!1,acyclic:!1},Mr=f(function(e){return e.scratch("breadthfirst")},"getInfo"),eo=f(function(e,r){return e.scratch("breadthfirst",r)},"setInfo");function Au(t){this.options=Ee({},Hg,Xg,t)}f(Au,"BreadthFirstLayout");Au.prototype.run=function(){var t=this.options,e=t,r=t.cy,a=e.eles,n=a.nodes().filter(function(re){return!re.isParent()}),i=a,s=e.directed,o=e.acyclic||e.maximal||e.maximalAdjustments>0,l=pt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),u;if(yt(e.roots))u=e.roots;else if(Re(e.roots)){for(var h=[],c=0;c<e.roots.length;c++){var v=e.roots[c],d=r.getElementById(v);h.push(d)}u=r.collection(h)}else if(ge(e.roots))u=r.$(e.roots);else if(s)u=n.roots();else{var g=a.components();u=r.collection();for(var m=f(function(se){var le=g[se],ce=le.maxDegree(!1),ue=le.filter(function(ye){return ye.degree(!1)===ce});u=u.add(ue)},"_loop"),y=0;y<g.length;y++)m(y)}var p=[],b={},E=f(function(se,le){p[le]==null&&(p[le]=[]);var ce=p[le].length;p[le].push(se),eo(se,{index:ce,depth:le})},"addToDepth"),S=f(function(se,le){var ce=Mr(se),ue=ce.depth,ye=ce.index;p[ue][ye]=null,E(se,le)},"changeDepth");i.bfs({roots:u,directed:e.directed,visit:f(function(se,le,ce,ue,ye){var Oe=se[0],Te=Oe.id();E(Oe,ye),b[Te]=!0},"visit")});for(var w=[],x=0;x<n.length;x++){var T=n[x];b[T.id()]||w.push(T)}var C=f(function(se){for(var le=p[se],ce=0;ce<le.length;ce++){var ue=le[ce];if(ue==null){le.splice(ce,1),ce--;continue}eo(ue,{depth:se,index:ce})}},"assignDepthsAt"),D=f(function(){for(var se=0;se<p.length;se++)C(se)},"assignDepths"),L=f(function(se,le){for(var ce=Mr(se),ue=se.incomers().filter(function(N){return N.isNode()&&a.has(N)}),ye=-1,Oe=se.id(),Te=0;Te<ue.length;Te++){var xe=ue[Te],Se=Mr(xe);ye=Math.max(ye,Se.depth)}if(ce.depth<=ye){if(!e.acyclic&&le[Oe])return null;var ee=ye+1;return S(se,ee),le[Oe]=ee,!0}return!1},"adjustMaximally");if(s&&o){var O=[],A={},I=f(function(se){return O.push(se)},"enqueue"),M=f(function(){return O.shift()},"dequeue");for(n.forEach(function(re){return O.push(re)});O.length>0;){var P=M(),R=L(P,A);if(R)P.outgoers().filter(function(re){return re.isNode()&&a.has(re)}).forEach(I);else if(R===null){Ne("Detected double maximal shift for node `"+P.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal
8: true` only on DAGs.");break}}}D();var k=0;if(e.avoidOverlap)for(var B=0;B<n.length;B++){var F=n[B],U=F.layoutDimensions(e),V=U.w,G=U.h;k=Math.max(k,V,G)}var $={},j=f(function(se){if($[se.id()])return $[se.id()];for(var le=Mr(se).depth,ce=se.neighborhood(),ue=0,ye=0,Oe=0;Oe<ce.length;Oe++){var Te=ce[Oe];if(!(Te.isEdge()||Te.isParent()||!n.has(Te))){var xe=Mr(Te);if(xe!=null){var Se=xe.index,ee=xe.depth;if(!(Se==null||ee==null)){var N=p[ee].length;ee<le&&(ue+=Se/N,ye++)}}}}return ye=Math.max(1,ye),ue=ue/ye,ye===0&&(ue=0),$[se.id()]=ue,ue},"getWeightedPercent"),Q=f(function(se,le){var ce=j(se),ue=j(le),ye=ce-ue;return ye===0?Ao(se.id(),le.id()):ye},"sortFn");e.depthSort!==void 0&&(Q=e.depthSort);for(var H=0;H<p.length;H++)p[H].sort(Q),C(H);for(var te=[],_=0;_<w.length;_++)te.push(w[_]);p.unshift(te),D();for(var z=0,Z=0;Z<p.length;Z++)z=Math.max(p[Z].length,z);var K={x:l.x1+l.w/2,y:l.x1+l.h/2},ie=p.reduce(function(re,se){return Math.max(re,se.length)},0),de=f(function(se){var le=Mr(se),ce=le.depth,ue=le.index,ye=p[ce].length,Oe=Math.max(l.w/((e.grid?ie:ye)+1),k),Te=Math.max(l.h/(p.length+1),k),xe=Math.min(l.w/2/p.length,l.h/2/p.length);if(xe=Math.max(xe,k),e.circle){var ee=xe*ce+xe-(p.length>0&&p[0].length<=3?xe/2:0),N=2*Math.PI/p[ce].length*ue;return ce===0&&p[0].length===1&&(ee=1),{x:K.x+ee*Math.cos(N),y:K.y+ee*Math.sin(N)}}else{var Se={x:K.x+(ue+1-(ye+1)/2)*Oe,y:(ce+1)*Te};return Se}},"getPosition");return a.nodes().layoutPositions(this,e,de),this};var qg={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:f(function(e,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:f(function(e,r){return r},"transform")};function Ou(t){this.options=Ee({},qg,t)}f(Ou,"CircleLayout");Ou.prototype.run=function(){var t=this.options,e=t,r=t.cy,a=e.eles,n=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,i=a.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));for(var s=pt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=e.sweep===void 0?2*Math.PI-2*Math.PI/i.length:e.sweep,u=l/Math.max(1,i.length-1),h,c=0,v=0;v<i.length;v++){var d=i[v],g=d.layoutDimensions(e),m=g.w,y=g.h;c=Math.max(c,m,y)}if(oe(e.radius)?h=e.radius:i.length<=1?h=0:h=Math.min(s.h,s.w)/2-c,i.length>1&&e.avoidOverlap){c*=1.75;var p=Math.cos(u)-Math.cos(0),b=Math.sin(u)-Math.sin(0),E=Math.sqrt(c*c/(p*p+b*b));h=Math.max(E,h)}var S=f(function(x,T){var C=e.startAngle+T*u*(n?1:-1),D=h*Math.cos(C),L=h*Math.sin(C),O={x:o.x+D,y:o.y+L};return O},"getPos");return a.nodes().layoutPositions(this,e,S),this};var Wg={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:f(function(e){return e.degree()},"concentric"),levelWidth:f(function(e){return e.maxDegree()/4},"levelWidth"),animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:f(function(e,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:f(function(e,r){return r},"transform")};function Mu(t){this.options=Ee({},Wg,t)}f(Mu,"ConcentricLayout");Mu.prototype.run=function(){for(var t=this.options,e=t,r=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,a=t.cy,n=e.eles,i=n.nodes().not(":parent"),s=pt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:a.width(),h:a.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=[],u=0,h=0;h<i.length;h++){var c=i[h],v=void 0;v=e.concentric(c),l.push({value:v,node:c}),c._private.scratch.concentric=v}i.updateStyle();for(var d=0;d<i.length;d++){var g=i[d],m=g.layoutDimensions(e);u=Math.max(u,m.w,m.h)}l.sort(function(re,se){return se.value-re.value});for(var y=e.levelWidth(i),p=[[]],b=p[0],E=0;E<l.length;E++){var S=l[E];if(b.length>0){var w=Math.abs(b[0].value-S.value);w>=y&&(b=[],p.push(b))}b.push(S)}var x=u+e.minNodeSpacing;if(!e.avoidOverlap){var T=p.length>0&&p[0].length>1,C=Math.min(s.w,s.h)/2-x,D=C/(p.length+T?1:0);x=Math.min(x,D)}for(var L=0,O=0;O<p.length;O++){var A=p[O],I=e.sweep===void 0?2*Math.PI-2*Math.PI/A.length:e.sweep,M=A.dTheta=I/Math.max(1,A.length-1);if(A.length>
vendor: 20,910 bytes, line 8
81&&e.avoidOverlap){var P=Math.cos(M)-Math.cos(0),R=Math.sin(M)-Math.sin(0),k=Math.sqrt(x*x/(P*P+R*R));L=Math.max(k,L)}A.r=L,L+=x}if(e.equidistant){for(var B=0,F=0,U=0;U<p.length;U++){var V=p[U],G=V.r-F;B=Math.max(B,G)}F=0;for(var $=0;$<p.length;$++){var j=p[$];$===0&&(F=j.r),j.r=F,F+=B}}for(var Q={},H=0;H<p.length;H++)for(var te=p[H],_=te.dTheta,z=te.r,Z=0;Z<te.length;Z++){var K=te[Z],ie=e.startAngle+(r?1:-1)*_*Z,de={x:o.x+z*Math.cos(ie),y:o.y+z*Math.sin(ie)};Q[K.node.id()]=de}return n.nodes().layoutPositions(this,e,function(re){var se=re.id();return Q[se]}),this};var Zn,Kg={ready:f(function(){},"ready"),stop:f(function(){},"stop"),animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:f(function(e,r){return!0},"animateFilter"),animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:f(function(e){return 2048},"nodeRepulsion"),nodeOverlap:4,idealEdgeLength:f(function(e){return 32},"idealEdgeLength"),edgeElasticity:f(function(e){return 32},"edgeElasticity"),nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1};function kn(t){this.options=Ee({},Kg,t),this.options.layout=this;var e=this.options.eles.nodes(),r=this.options.eles.edges(),a=r.filter(function(n){var i=n.source().data("id"),s=n.target().data("id"),o=e.some(function(u){return u.data("id")===i}),l=e.some(function(u){return u.data("id")===s});return!o||!l});this.options.eles=this.options.eles.not(a)}f(kn,"CoseLayout");kn.prototype.run=function(){var t=this.options,e=t.cy,r=this;r.stopped=!1,(t.animate===!0||t.animate===!1)&&r.emit({type:"layoutstart",layout:r}),t.debug===!0?Zn=!0:Zn=!1;var a=Zg(e,r,t);Zn&&jg(a),t.randomize&&ep(a);var n=_t(),i=f(function(){tp(a,e,t),t.fit===!0&&e.fit(t.padding)},"refresh"),s=f(function(v){return!(r.stopped||v>=t.numIter||(rp(a,t),a.temperature=a.temperature*t.coolingFactor,a.temperature<t.minTemp))},"mainLoop"),o=f(function(){if(t.animate===!0||t.animate===!1)i(),r.one("layoutstop",t.stop),r.emit({type:"layoutstop",layout:r});else{var v=t.eles.nodes(),d=Nu(a,t,v);v.layoutPositions(r,t,d)}},"done"),l=0,u=!0;if(t.animate===!0){var h=f(function c(){for(var v=0;u&&v<t.refresh;)u=s(l),l++,v++;if(!u)ro(a,t),o();else{var d=_t();d-n>=t.animationThreshold&&i(),un(c)}},"frame");h()}else{for(;u;)u=s(l),l++;ro(a,t),o()}return this};kn.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};kn.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var Zg=f(function(e,r,a){for(var n=a.eles.edges(),i=a.eles.nodes(),s=pt(a.boundingBox?a.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:n.size(),temperature:a.initialTemp,clientWidth:s.w,clientHeight:s.h,boundingBox:s},l=a.eles.components(),u={},h=0;h<l.length;h++)for(var c=l[h],v=0;v<c.length;v++){var d=c[v];u[d.id()]=h}for(var h=0;h<o.nodeSize;h++){var g=i[h],m=g.layoutDimensions(a),y={};y.isLocked=g.locked(),y.id=g.data("id"),y.parentId=g.data("parent"),y.cmptId=u[g.id()],y.children=[],y.positionX=g.position("x"),y.positionY=g.position("y"),y.offsetX=0,y.offsetY=0,y.height=m.w,y.width=m.h,y.maxX=y.positionX+y.width/2,y.minX=y.positionX-y.width/2,y.maxY=y.positionY+y.height/2,y.minY=y.positionY-y.height/2,y.padLeft=parseFloat(g.style("padding")),y.padRight=parseFloat(g.style("padding")),y.padTop=parseFloat(g.style("padding")),y.padBottom=parseFloat(g.style("padding")),y.nodeRepulsion=ze(a.nodeRepulsion)?a.nodeRepulsion(g):a.nodeRepulsion,o.layoutNodes.push(y),o.idToIndex[y.id]=h}for(var p=[],b=0,E=-1,S=[],h=0;h<o.nodeSize;h++){var g=o.layoutNodes[h],w=g.parentId;w!=null?o.layoutNodes[o.idToIndex[w]].children.push(g.id):(p[++E]=g.id,S.push(g.id))}for(o.graphSet.push(S);b<=E;){var x=p[b++],T=o.idToIndex[x],d=o.layoutNodes[T],C=d.children;if(C.length>0){o.graphSet.push(C);for(var h=0;h<C.length;h++)p[++E]=C[h]}}for(var h=0;h<o.graphSet.length;h++)for(var D=o.graphSet[h],v=0;v<D.length;v++){var L=o.idToIndex[D[v]];o.indexToGraph[L]=h}for(var h=0;h<o.edgeSize;h++){var O=n[h],A={};A.id=O.data("id"),A.sourceId=O.data("source"),A.targetId=O.data("target");var I=ze(a.idealEdgeLength)?a.idealEdgeLength(O):a.idealEdgeLength,M=ze(a.edgeElasticity)?a.edgeElasticity(O):a.edgeElasticity,P=o.idToIndex[A.sourceId],R=o.idToIndex[A.targetId],k=o.indexToGraph[P],B=o.indexToGraph[R];if(k!=B){for(var F=Qg(A.sourceId,A.targetId,o),U=o.graphSet[F],V=0,y=o.layoutNodes[P];U.indexOf(y.id)===-1;)y=o.layoutNodes[o.idToIndex[y.parentId]],V++;for(y=o.layoutNodes[R];U.indexOf(y.id)===-1;)y=o.layoutNodes[o.idToIndex[y.parentId]],V++;I*=V*a.nestingFactor}A.idealLength=I,A.elasticity=M,o.layoutEdges.push(A)}return o},"createLayoutInfo"),Qg=f(function(e,r,a){var n=Jg(e,r,0,a);return 2>n.count?0:n.graph},"findLCA"),Jg=f(function t(e,r,a,n){var i=n.graphSet[a];if(-1<i.indexOf(e)&&-1<i.indexOf(r))return{count:2,graph:a};for(var s=0,o=0;o<i.length;o++){var l=i[o],u=n.idToIndex[l],h=n.layoutNodes[u].children;if(h.length!==0){var c=n.indexToGraph[n.idToIndex[h[0]]],v=t(e,r,c,n);if(v.count!==0)if(v.count===1){if(s++,s===2)break}else return v}}return{count:s,graph:a}},"findLCA_aux"),jg,ep=f(function(e,r){for(var a=e.clientWidth,n=e.clientHeight,i=0;i<e.nodeSize;i++){var s=e.layoutNodes[i];s.children.length===0&&!s.isLocked&&(s.positionX=Math.random()*a,s.positionY=Math.random()*n)}},"randomizePositions"),Nu=f(function(e,r,a){var n=e.boundingBox,i={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return r.boundingBox&&(a.forEach(function(s){var o=e.layoutNodes[e.idToIndex[s.data("id")]];i.x1=Math.min(i.x1,o.positionX),i.x2=Math.max(i.x2,o.positionX),i.y1=Math.min(i.y1,o.positionY),i.y2=Math.max(i.y2,o.positionY)}),i.w=i.x2-i.x1,i.h=i.y2-i.y1),function(s,o){var l=e.layoutNodes[e.idToIndex[s.data("id")]];if(r.boundingBox){var u=(l.positionX-i.x1)/i.w,h=(l.positionY-i.y1)/i.h;return{x:n.x1+u*n.w,y:n.y1+h*n.h}}else return{x:l.positionX,y:l.positionY}}},"getScaleInBoundsFn"),tp=f(function(e,r,a){var n=a.layout,i=a.eles.nodes(),s=Nu(e,a,i);i.positions(s),e.ready!==!0&&(e.ready=!0,n.one("layoutready",a.ready),n.emit({type:"layoutready",layout:this}))},"refreshPositions"),rp=f(function(e,r,a){ap(e,r),sp(e),op(e,r),up(e),lp(e)},"step"),ap=f(function(e,r){for(var a=0;a<e.graphSet.length;a++)for(var n=e.graphSet[a],i=n.length,s=0;s<i;s++)for(var o=e.layoutNodes[e.idToIndex[n[s]]],l=s+1;l<i;l++){var u=e.layoutNodes[e.idToIndex[n[l]]];np(o,u,e,r)}},"calculateNodeForces"),to=f(function(e){return-e+2*e*Math.random()},"randomDistance"),np=f(function(e,r,a,n){var i=e.cmptId,s=r.cmptId;if(!(i!==s&&!a.isCompound)){var o=r.positionX-e.positionX,l=r.positionY-e.positionY,u=1;o===0&&l===0&&(o=to(u),l=to(u));var h=ip(e,r,o,l);if(h>0)var c=n.nodeOverlap*h,v=Math.sqrt(o*o+l*l),d=c*o/v,g=c*l/v;else var m=gn(e,o,l),y=gn(r,-1*o,-1*l),p=y.x-m.x,b=y.y-m.y,E=p*p+b*b,v=Math.sqrt(E),c=(e.nodeRepulsion+r.nodeRepulsion)/E,d=c*p/v,g=c*b/v;e.isLocked||(e.offsetX-=d,e.offsetY-=g),r.isLocked||(r.offsetX+=d,r.offsetY+=g)}},"nodeRepulsion"),ip=f(function(e,r,a,n){if(a>0)var i=e.maxX-r.minX;else var i=r.maxX-e.minX;if(n>0)var s=e.maxY-r.minY;else var s=r.maxY-e.minY;return i>=0&&s>=0?Math.sqrt(i*i+s*s):0},"nodesOverlap"),gn=f(function(e,r,a){var n=e.positionX,i=e.positionY,s=e.height||1,o=e.width||1,l=a/r,u=s/o,h={};return r===0&&0<a||r===0&&0>a?(h.x=n,h.y=i+s/2,h):0<r&&-1*u<=l&&l<=u?(h.x=n+o/2,h.y=i+o*a/2/r,h):0>r&&-1*u<=l&&l<=u?(h.x=n-o/2,h.y=i-o*a/2/r,h):0<a&&(l<=-1*u||l>=u)?(h.x=n+s*r/2/a,h.y=i+s/2,h):(0>a&&(l<=-1*u||l>=u)&&(h.x=n-s*r/2/a,h.y=i-s/2),h)},"findClippingPoint"),sp=f(function(e,r){for(var a=0;a<e.edgeSize;a++){var n=e.layoutEdges[a],i=e.idToIndex[n.sourceId],s=e.layoutNodes[i],o=e.idToIndex[n.targetId],l=e.layoutNodes[o],u=l.positionX-s.positionX,h=l.positionY-s.positionY;if(!(u===0&&h===0)){var c=gn(s,u,h),v=gn(l,-1*u,-1*h),d=v.x-c.x,g=v.y-c.y,m=Math.sqrt(d*d+g*g),y=Math.pow(n.idealLength-m,2)/n.elasticity;if(m!==0)var p=y*d/m,b=y*g/m;else var p=0,b=0;s.isLocked||(s.offsetX+=p,s.offsetY+=b),l.isLocked||(l.offsetX-=p,l.offsetY-=b)}}},"calculateEdgeForces"),op=f(function(e,r){if(r.gravity!==0)for(var a=1,n=0;n<e.graphSet.length;n++){var i=e.graphSet[n],s=i.length;if(n===0)var o=e.clientHeight/2,l=e.clientWidth/2;else var u=e.layoutNodes[e.idToIndex[i[0]]],h=e.layoutNodes[e.idToIndex[u.parentId]],o=h.positionX,l=h.positionY;for(var c=0;c<s;c++){var v=e.layoutNodes[e.idToIndex[i[c]]];if(!v.isLocked){var d=o-v.positionX,g=l-v.positionY,m=Math.sqrt(d*d+g*g);if(m>a){var y=r.gravity*d/m,p=r.gravity*g/m;v.offsetX+=y,v.offsetY+=p}}}}},"calculateGravityForces"),up=f(function(e,r){var a=[],n=0,i=-1;for(a.push.apply(a,e.graphSet[0]),i+=e.graphSet[0].length;n<=i;){var s=a[n++],o=e.idToIndex[s],l=e.layoutNodes[o],u=l.children;if(0<u.length&&!l.isLocked){for(var h=l.offsetX,c=l.offsetY,v=0;v<u.length;v++){var d=e.layoutNodes[e.idToIndex[u[v]]];d.offsetX+=h,d.offsetY+=c,a[++i]=u[v]}l.offsetX=0,l.offsetY=0}}},"propagateForces"),lp=f(function(e,r){for(var a=0;a<e.nodeSize;a++){var n=e.layoutNodes[a];0<n.children.length&&(n.maxX=void 0,n.minX=void 0,n.maxY=void 0,n.minY=void 0)}for(var a=0;a<e.nodeSize;a++){var n=e.layoutNodes[a];if(!(0<n.children.length||n.isLocked)){var i=fp(n.offsetX,n.offsetY,e.temperature);n.positionX+=i.x,n.positionY+=i.y,n.offsetX=0,n.offsetY=0,n.minX=n.positionX-n.width,n.maxX=n.positionX+n.width,n.minY=n.positionY-n.height,n.maxY=n.positionY+n.height,hp(n,e)}}for(var a=0;a<e.nodeSize;a++){var n=e.layoutNodes[a];0<n.children.length&&!n.isLocked&&(n.positionX=(n.maxX+n.minX)/2,n.positionY=(n.maxY+n.minY)/2,n.width=n.maxX-n.minX,n.height=n.maxY-n.minY)}},"updatePositions"),fp=f(function(e,r,a){var n=Math.sqrt(e*e+r*r);if(n>a)var i={x:a*e/n,y:a*r/n};else var i={x:e,y:r};return i},"limitForce"),hp=f(function t(e,r){var a=e.parentId;if(a!=null){var n=r.layoutNodes[r.idToIndex[a]],i=!1;if((n.maxX==null||e.maxX+n.padRight>n.maxX)&&(n.maxX=e.maxX+n.padRight,i=!0),(n.minX==null||e.minX-n.padLeft<n.minX)&&(n.minX=e.minX-n.padLeft,i=!0),(n.maxY==null||e.maxY+n.padBottom>n.maxY)&&(n.maxY=e.maxY+n.padBottom,i=!0),(n.minY==null||e.minY-n.padTop<n.minY)&&(n.minY=e.minY-n.padTop,i=!0),i)return t(n,r)}},"updateAncestryBoundaries"),ro=f(function(e,r){for(var a=e.layoutNodes,n=[],i=0;i<a.length;i++){var s=a[i],o=s.cmptId,l=n[o]=n[o]||[];l.push(s)}for(var u=0,i=0;i<n.length;i++){var h=n[i];if(h){h.x1=1/0,h.x2=-1/0,h.y1=1/0,h.y2=-1/0;for(var c=0;c<h.length;c++){var v=h[c];h.x1=Math.min(h.x1,v.positionX-v.width/2),h.x2=Math.max(h.x2,v.positionX+v.width/2),h.y1=Math.min(h.y1,v.positionY-v.height/2),h.y2=Math.max(h.y2,v.positionY+v.height/2)}h.w=h.x2-h.x1,h.h=h.y2-h.y1,u+=h.w*h.h}}n.sort(function(b,E){return E.w*E.h-b.w*b.h});for(var d=0,g=0,m=0,y=0,p=Math.sqrt(u)*e.clientWidth/e.clientHeight,i=0;i<n.length;i++){var h=n[i];if(h){for(var c=0;c<h.length;c++){var v=h[c];v.isLocked||(v.positionX+=d-h.x1,v.positionY+=g-h.y1)}d+=h.w+r.componentSpacing,m+=h.w+r.componentSpacing,y=Math.max(y,h.h),m>p&&(g+=y+r.componentSpacing,d=0,m=0,y=0)}}},"separateComponents"),cp={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:f(function(e){},"position"),sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:f(function(e,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:f(function(e,r){return r},"transform")};function Iu(t){this.options=Ee({},cp,t)}f(Iu,"GridLayout");Iu.prototype.run=function(){var t=this.options,e=t,r=t.cy,a=e.eles,n=a.nodes().not(":parent");e.sort&&(n=n.sort(e.sort));var i=pt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(i.h===0||i.w===0)a.nodes().layoutPositions(this,e,function($){return{x:i.x1,y:i.y1}});else{var s=n.size(),o=Math.sqrt(s*i.h/i.w),l=Math.round(o),u=Math.round(i.w/i.h*o),h=f(function(j){if(j==null)return Math.min(l,u);var Q=Math.min(l,u);Q==l?l=j:u=j},"small"),c=f(function(j){if(j==null)return Math.max(l,u);var Q=Math.max(l,u);Q==l?l=j:u=j},"large"),v=e.rows,d=e.cols!=null?e.cols:e.columns;if(v!=null&&d!=null)l=v,u=d;else if(v!=null&&d==null)l=v,u=Math.ceil(s/l);else if(v==null&&d!=null)u=d,l=Math.ceil(s/u);else if(u*l>s){var g=h(),m=c();(g-1)*m>=s?h(g-1):(m-1)*g>=s&&c(m-1)}else for(;u*l<s;){var y=h(),p=c();(p+1)*y>=s?c(p+1):h(y+1)}var b=i.w/u,E=i.h/l;if(e.condense&&(b=0,E=0),e.avoidOverlap)for(var S=0;S<n.length;S++){var w=n[S],x=w._private.position;(x.x==null||x.y==null)&&(x.x=0,x.y=0);var T=w.layoutDimensions(e),C=e.avoidOverlapPadding,D=T.w+C,L=T.h+C;b=Math.max(b,D),E=Math.max(E,L)}for(var O={},A=f(function(j,Q){return!!O["c-"+j+"-"+Q]},"used"),I=f(function(j,Q){O["c-"+j+"-"+Q]=!0},"use"),M=0,P=0,R=f(function(){P++,P>=u&&(P=0,M++)},"moveToNextCell"),k={},B=0;B<n.length;B++){var F=n[B],U=e.position(F);if(U&&(U.row!==void 0||U.col!==void 0)){var V={row:U.row,col:U.col};if(V.col===void 0)for(V.col=0;A(V.row,V.col);)V.col++;else if(V.row===void 0)for(V.row=0;A(V.row,V.col);)V.row++;k[F.id()]=V,I(V.row,V.col)}}var G=f(function(j,Q){var H,te;if(j.locked()||j.isParent())return!1;var _=k[j.id()];if(_)H=_.col*b+b/2+i.x1,te=_.row*E+E/2+i.y1;else{for(;A(M,P);)R();H=P*b+b/2+i.x1,te=M*E+E/2+i.y1,I(M,P),R()}return{x:H,y:te}},"getPos");n.layoutPositions(this,e,G)}return this};var vp={ready:f(function(){},"ready"),stop:f(function(){},"stop")};function Pi(t){this.options=Ee({},vp,t)}f(Pi,"NullLayout");Pi.prototype.run=function(){var t=this.options,e=t.eles,r=this;return t.cy,r.emit("layoutstart"),e.nodes().positions(function(){return{x:0,y:0}}),r.one("layoutready",t.ready),r.emit("layoutready"),r.one("layoutstop",t.stop),r.emit("layoutstop"),this};Pi.prototype.stop=function(){return this};var dp={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:f(function(e,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:f(function(e,r){return r},"transform")};function ku(t){this.options=Ee({},dp,t)}f(ku,"PresetLayout");ku.prototype.run=function(){var t=this.options,e=t.eles,r=e.nodes(),a=ze(t.positions);function n(i){if(t.positions==null)return mh(i.position());if(a)return t.positions(i);var s=t.positions[i._private.data.id];return s??null}return f(n,"getPosition"),r.layoutPositions(this,t,function(i,s){var o=n(i);return i.locked()||o==null?!1:o}),this};var gp={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:f(function(e,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:f(function(e,r){return r},"transform")};function Ru(t){this.options=Ee({},gp,t)}f(Ru,"RandomLayout");Ru.prototype.run=function(){var t=this.options,e=t.cy,r=t.eles,a=pt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),n=f(function(s,o){return{x:a.x1+Math.round(Math.random()*a.w),y:a.y1+Math.round(Math.random()*a.h)}},"getPos");return r.nodes().layoutPositions(this,t,n),this};var pp=[{name:"breadthfirst",impl:Au},{name:"circle",impl:Ou},{name:"concentric",impl:Mu},{name:"cose",impl:kn},{name:"grid",impl:Iu},{name:"null",impl:Pi},{name:"preset",impl:ku},{name:"random",impl:Ru}];function Pu(t){this.options=t,this.notifications=0}f(Pu,"NullRenderer");var ao=f(function(){},"noop"),no=f(function(){throw new Error("A headless instance can not render images")},"throwImgErr");Pu.prototype={recalculateRenderedStyle:ao,notify:f(function(){this.notifications++},"notify"),init:ao,isHeadless:f(function(){return!0},"isHeadless"),png:no,jpg:no};var Bi={};Bi.arrowShapeWidth=.3;Bi.registerArrowShapes=function(){var t=this.arrowShapes={},e=this,r=f(function(u,h,c,v,d,g,m){var y=d.x-c/2-m,p=d.x+c/2+m,b=d.y-c/2-m,E=d.y+c/2+m,S=y<=u&&u<=p&&b<=h&&h<=E;return S},"bbCollide"),a=f(function(u,h,c,v,d){var g=u*Math.cos(v)-h*Math.sin(v),m=u*Math.sin(v)+h*Math.cos(v),y=g*c,p=m*c,b=y+d.x,E=p+d.y;return{x:b,y:E}},"transform"),n=f(function(u,h,c,v){for(var d=[],g=0;g<u.length;g+=2){var m=u[g],y=u[g+1];d.push(a(m,y,h,c,v))}return d},"transformPoints"),i=f(function(u){for(var h=[],c=0;c<u.length;c++){var v=u[c];h.push(v.x,v.y)}return h},"pointsToArr"),s=f(function(u){return u.pstyle("width").pfValue*u.pstyle("arrow-scale").pfValue*2},"standardGap"),o=f(function(u,h){ge(h)&&(h=t[h]),t[u]=Ee({name:u,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:f(function(v,d,g,m,y,p){var b=i(n(this.points,g+2*p,m,y)),E=gt(v,d,b);return E},"collide"),roughCollide:r,draw:f(function(v,d,g,m){var y=n(this.points,d,g,m);e.arrowShapeImpl("polygon")(v,y)},"draw"),spacing:f(function(v){return 0},"spacing"),gap:s},h)},"defineArrowShape");o("none",{collide:ln,roughCollide:ln,draw:wi,spacing:ds,gap:ds}),o("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),o("arrow","triangle"),o("triangle-backcurve",{points:t.triangle.points,controlPoint:[0,-.15],roughCollide:r,draw:f(function(u,h,c,v,d){var g=n(this.points,h,c,v),m=this.controlPoint,y=a(m[0],m[1],h,c,v);e.arrowShapeImpl(this.name)(u,g,y)},"draw"),gap:f(function(u){return s(u)*.8},"gap")}),o("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:f(function(u,h,c,v,d,g,m){var y=i(n(this.points,c+2*m,v,d)),p=i(n(this.pointsTee,c+2*m,v,d)),b=gt(u,h,y)||gt(u,h,p);return b},"collide"),draw:f(function(u,h,c,v,d){var g=n(this.points,h,c,v),m=n(this.pointsTee,h,c,v);e.arrowShapeImpl(this.name)(u,g,m)},"draw")}),o("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:f(function(u,h,c,v,d,g,m){var y=d,p=Math.pow(y.x-u,2)+Math.pow(y.y-h,2)<=Math.pow((c+2*m)*this.radius,2),b=i(n(this.points,c+2*m,v,d));return gt(u,h,b)||p},"collide"),draw:f(function(u,h,c,v,d){var g=n(this.pointsTr,h,c,v);e.arrowShapeImpl(this.name)(u,g,v.x,v.y,this.radius*h)},"draw"),spacing:f(function(u){return e.getArrowWidth(u.pstyle("width").pfValue,u.pstyle("arrow-scale").value)*this.radius},"spacing")}),o("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:f(function(u,h){var c=this.baseCrossLinePts.slice(),v=h/u,d=3,g=5;return c[d]=c[d]-v,c[g]=c[g]-v,c},"crossLinePts"),collide:f(function(u,h,c,v,d,g,m){var y=i(n(this.points,c+2*m,v,d)),p=i(n(this.crossLinePts(c,g),c+2*m,v,d)),b=gt(u,h,y)||gt(u,h,p);return b},"collide"),draw:f(function(u,h,c,v,d){var g=n(this.points,h,c,v),m=n(this.crossLinePts(h,d),h,c,v);e.arrowShapeImpl(this.name)(u,g,m)},"draw")}),o("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:f(function(u){return s(u)*.525},"gap")}),o("circle",{radius:.15,collide:f(function(u,h,c,v,d,g,m){var y=d,p=Math.pow(y.x-u,2)+Math.pow(y.y-h,2)<=Math.pow((c+2*m)*this.radius,2);return p},"collide"),draw:f(function(u,h,c,v,d){e.arrowShapeImpl(this.name)(u,v.x,v.y,this.radius*h)},"draw"),spacing:f(function(u){return e.getArrowWidth(u.pstyle("width").pfValue,u.pstyle("arrow-scale").value)*this.radius},"spacing")}),o("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:f(function(u){return 1},"spacing"),gap:f(function(u){return 1},"gap")}),o("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),o("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:f(function(u){return u.pstyle("width").pfValue*u.pstyle("arrow-scale").value},"gap")}),o("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:f(function(u){return .95*u.pstyle("width").pfValue*u.pstyle("arrow-scale").value},"gap")})};var Tr={};Tr.projectIntoViewport=function(t,e){var r=this.cy,a=this.findContainerClientCoords(),n=a[0],i=a[1],s=a[4],o=r.pan(),l=r.zoom(),u=((t-n)/s-o.x)/l,h=((e-i)/s-o.y)/l;return[u,h]};Tr.findContainerClientCoords=function(){if(this.containerBB)return this.containerBB;var t=this.container,e=t.getBoundingClientRect(),r=this.cy.window().getComputedStyle(t),a=f(function(p){return parseFloat(r.getPropertyValue(p))},"styleValue"),n={left:a("padding-left"),right:a("padding-right"),top:a("padding-top"),bottom:a("padding-bottom")},i={left:a("border-left-width"),right:a("border-right-width"),top:a("border-top-width"),bottom:a("border-bottom-width")},s=t.clientWidth,o=t.clientHeight,l=n.left+n.right,u=n.top+n.bottom,h=i.left+i.right,c=e.width/(s+h),v=s-l,d=o-u,g=e.left+n.left+i.left,m=e.top+n.top+i.top;return this.containerBB=[g,m,v,d,c]};Tr.invalidateContainerClientCoordsCache=function(){this.containerBB=null};Tr.findNearestElement=function(t,e,r,a){return this.findNearestElements(t,e,r,a)[0]};Tr.findNearestElements=function(t,e,r,a){var n=this,i=this,s=i.getCachedZSortedEles(),o=[],l=i.cy.zoom(),u=i.cy.hasCompoundNodes(),h=(a?24:8)/l,c=(a?8:2)/l,v=(a?8:2)/l,d=1/0,g,m;r&&(s=s.interactive);function y(T,C){if(T.isNode()){if(m)return;m=T,o.push(T)}if(T.isEdge()&&(C==null||C<d))if(g){if(g.pstyle("z-compound-depth").value===T.pstyle("z-compound-depth").value&&g.pstyle("z-compound-depth").value===T.pstyle("z-compound-depth").value){for(var D=0;D<o.length;
vendor: 10,391 bytes, line 8
8D++)if(o[D].isEdge()){o[D]=T,g=T,d=C??d;break}}}else o.push(T),g=T,d=C??d}f(y,"addEle");function p(T){var C=T.outerWidth()+2*c,D=T.outerHeight()+2*c,L=C/2,O=D/2,A=T.position(),I=T.pstyle("corner-radius").value==="auto"?"auto":T.pstyle("corner-radius").pfValue,M=T._private.rscratch;if(A.x-L<=t&&t<=A.x+L&&A.y-O<=e&&e<=A.y+O){var P=i.nodeShapes[n.getNodeShape(T)];if(P.checkPoint(t,e,0,C,D,A.x,A.y,I,M))return y(T,0),!0}}f(p,"checkNode");function b(T){var C=T._private,D=C.rscratch,L=T.pstyle("width").pfValue,O=T.pstyle("arrow-scale").value,A=L/2+h,I=A*A,M=A*2,B=C.source,F=C.target,P;if(D.edgeType==="segments"||D.edgeType==="straight"||D.edgeType==="haystack"){for(var R=D.allpts,k=0;k+3<R.length;k+=2)if(Nh(t,e,R[k],R[k+1],R[k+2],R[k+3],M)&&I>(P=Bh(t,e,R[k],R[k+1],R[k+2],R[k+3])))return y(T,P),!0}else if(D.edgeType==="bezier"||D.edgeType==="multibezier"||D.edgeType==="self"||D.edgeType==="compound"){for(var R=D.allpts,k=0;k+5<D.allpts.length;k+=4)if(Ih(t,e,R[k],R[k+1],R[k+2],R[k+3],R[k+4],R[k+5],M)&&I>(P=Ph(t,e,R[k],R[k+1],R[k+2],R[k+3],R[k+4],R[k+5])))return y(T,P),!0}for(var B=B||C.source,F=F||C.target,U=n.getArrowWidth(L,O),V=[{name:"source",x:D.arrowStartX,y:D.arrowStartY,angle:D.srcArrowAngle},{name:"target",x:D.arrowEndX,y:D.arrowEndY,angle:D.tgtArrowAngle},{name:"mid-source",x:D.midX,y:D.midY,angle:D.midsrcArrowAngle},{name:"mid-target",x:D.midX,y:D.midY,angle:D.midtgtArrowAngle}],k=0;k<V.length;k++){var G=V[k],$=i.arrowShapes[T.pstyle(G.name+"-arrow-shape").value],j=T.pstyle("width").pfValue;if($.roughCollide(t,e,U,G.angle,{x:G.x,y:G.y},j,h)&&$.collide(t,e,U,G.angle,{x:G.x,y:G.y},j,h))return y(T),!0}u&&o.length>0&&(p(B),p(F))}f(b,"checkEdge");function E(T,C,D){return Mt(T,C,D)}f(E,"preprop");function S(T,C){var D=T._private,L=v,O;C?O=C+"-":O="",T.boundingBox();var A=D.labelBounds[C||"main"],I=T.pstyle(O+"label").value,M=T.pstyle("text-events").strValue==="yes";if(!(!M||!I)){var P=E(D.rscratch,"labelX",C),R=E(D.rscratch,"labelY",C),k=E(D.rscratch,"labelAngle",C),B=T.pstyle(O+"text-margin-x").pfValue,F=T.pstyle(O+"text-margin-y").pfValue,U=A.x1-L-B,V=A.x2+L-B,G=A.y1-L-F,$=A.y2+L-F;if(k){var j=Math.cos(k),Q=Math.sin(k),H=f(function(de,re){return de=de-P,re=re-R,{x:de*j-re*Q+P,y:de*Q+re*j+R}},"rotate"),te=H(U,G),_=H(U,$),z=H(V,G),Z=H(V,$),K=[te.x+B,te.y+F,z.x+B,z.y+F,Z.x+B,Z.y+F,_.x+B,_.y+F];if(gt(t,e,K))return y(T),!0}else if(Vr(A,t,e))return y(T),!0}}f(S,"checkLabel");for(var w=s.length-1;w>=0;w--){var x=s[w];x.isNode()?p(x)||S(x):b(x)||S(x)||S(x,"source")||S(x,"target")}return o};Tr.getAllInBox=function(t,e,r,a){var n=this.getCachedZSortedEles().interactive,i=[],s=Math.min(t,r),o=Math.max(t,r),l=Math.min(e,a),u=Math.max(e,a);t=s,r=o,e=l,a=u;for(var h=pt({x1:t,y1:e,x2:r,y2:a}),c=0;c<n.length;c++){var v=n[c];if(v.isNode()){var d=v,g=d.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:!1});Ci(h,g)&&!_o(g,h)&&i.push(d)}else{var m=v,y=m._private,p=y.rscratch;if(p.startX!=null&&p.startY!=null&&!Vr(h,p.startX,p.startY)||p.endX!=null&&p.endY!=null&&!Vr(h,p.endX,p.endY))continue;if(p.edgeType==="bezier"||p.edgeType==="multibezier"||p.edgeType==="self"||p.edgeType==="compound"||p.edgeType==="segments"||p.edgeType==="haystack"){for(var b=y.rstyle.bezierPts||y.rstyle.linePts||y.rstyle.haystackPts,E=!0,S=0;S<b.length;S++)if(!Mh(h,b[S])){E=!1;break}E&&i.push(m)}else(p.edgeType==="haystack"||p.edgeType==="straight")&&i.push(m)}}return i};var pn={};pn.calculateArrowAngles=function(t){var e=t._private.rscratch,r=e.edgeType==="haystack",a=e.edgeType==="bezier",n=e.edgeType==="multibezier",i=e.edgeType==="segments",s=e.edgeType==="compound",o=e.edgeType==="self",l,u,h,c,v,d,p,b;if(r?(h=e.haystackPts[0],c=e.haystackPts[1],v=e.haystackPts[2],d=e.haystackPts[3]):(h=e.arrowStartX,c=e.arrowStartY,v=e.arrowEndX,d=e.arrowEndY),p=e.midX,b=e.midY,i)l=h-e.segpts[0],u=c-e.segpts[1];else if(n||s||o||a){var g=e.allpts,m=Ze(g[0],g[2],g[4],.1),y=Ze(g[1],g[3],g[5],.1);l=h-m,u=c-y}else l=h-p,u=c-b;e.srcArrowAngle=Va(l,u);var p=e.midX,b=e.midY;if(r&&(p=(h+v)/2,b=(c+d)/2),l=v-h,u=d-c,i){var g=e.allpts;if(g.length/2%2===0){var E=g.length/2,S=E-2;l=g[E]-g[S],u=g[E+1]-g[S+1]}else if(e.isRound)l=e.midVector[1],u=-e.midVector[0];else{var E=g.length/2-1,S=E-2;l=g[E]-g[S],u=g[E+1]-g[S+1]}}else if(n||s||o){var g=e.allpts,w=e.ctrlpts,x,T,C,D;if(w.length/2%2===0){var L=g.length/2-1,O=L+2,A=O+2;x=Ze(g[L],g[O],g[A],0),T=Ze(g[L+1],g[O+1],g[A+1],0),C=Ze(g[L],g[O],g[A],1e-4),D=Ze(g[L+1],g[O+1],g[A+1],1e-4)}else{var O=g.length/2-1,L=O-2,A=O+2;x=Ze(g[L],g[O],g[A],.4999),T=Ze(g[L+1],g[O+1],g[A+1],.4999),C=Ze(g[L],g[O],g[A],.5),D=Ze(g[L+1],g[O+1],g[A+1],.5)}l=C-x,u=D-T}if(e.midtgtArrowAngle=Va(l,u),e.midDispX=l,e.midDispY=u,l*=-1,u*=-1,i){var g=e.allpts;if(g.length/2%2!==0){if(!e.isRound){var E=g.length/2-1,I=E+2;l=-(g[I]-g[E]),u=-(g[I+1]-g[E+1])}}}if(e.midsrcArrowAngle=Va(l,u),i)l=v-e.segpts[e.segpts.length-2],u=d-e.segpts[e.segpts.length-1];else if(n||s||o||a){var g=e.allpts,M=g.length,m=Ze(g[M-6],g[M-4],g[M-2],.9),y=Ze(g[M-5],g[M-3],g[M-1],.9);l=v-m,u=d-y}else l=v-p,u=d-b;e.tgtArrowAngle=Va(l,u)};pn.getArrowWidth=pn.getArrowHeight=function(t,e){var r=this.arrowWidthCache=this.arrowWidthCache||{},a=r[t+", "+e];return a||(a=Math.max(Math.pow(t*13.37,.9),29)*e,r[t+", "+e]=a,a)};var ui,li,Pt={},Et={},io,so,dr,nn,$t,lr,vr,Rt,Nr,Ka,Bu,Fu,fi,hi,oo,uo=f(function(e,r,a){a.x=r.x-e.x,a.y=r.y-e.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)},"asVec"),yp=f(function(e,r){r.x=e.x*-1,r.y=e.y*-1,r.nx=e.nx*-1,r.ny=e.ny*-1,r.ang=e.ang>0?-(Math.PI-e.ang):Math.PI+e.ang},"invertVec"),mp=f(function(e,r,a,n,i){if(e!==oo?uo(r,e,Pt):yp(Et,Pt),uo(r,a,Et),io=Pt.nx*Et.ny-Pt.ny*Et.nx,so=Pt.nx*Et.nx-Pt.ny*-Et.ny,$t=Math.asin(Math.max(-1,Math.min(1,io))),Math.abs($t)<1e-6){ui=r.x,li=r.y,vr=Nr=0;return}dr=1,nn=!1,so<0?$t<0?$t=Math.PI+$t:($t=Math.PI-$t,dr=-1,nn=!0):$t>0&&(dr=-1,nn=!0),r.radius!==void 0?Nr=r.radius:Nr=n,lr=$t/2,Ka=Math.min(Pt.len/2,Et.len/2),i?(Rt=Math.abs(Math.cos(lr)*Nr/Math.sin(lr)),Rt>Ka?(Rt=Ka,vr=Math.abs(Rt*Math.sin(lr)/Math.cos(lr))):vr=Nr):(Rt=Math.min(Ka,Nr),vr=Math.abs(Rt*Math.sin(lr)/Math.cos(lr))),fi=r.x+Et.nx*Rt,hi=r.y+Et.ny*Rt,ui=fi-Et.ny*vr*dr,li=hi+Et.nx*vr*dr,Bu=r.x+Pt.nx*Rt,Fu=r.y+Pt.ny*Rt,oo=r},"calcCornerArc");function Gu(t,e){e.radius===0?t.lineTo(e.cx,e.cy):t.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}f(Gu,"drawPreparedRoundCorner");function Fi(t,e,r,a){var n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return a===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(mp(t,e,r,a,n),{cx:ui,cy:li,radius:vr,startX:Bu,startY:Fu,stopX:fi,stopY:hi,startAngle:Pt.ang+Math.PI/2*dr,endAngle:Et.ang-Math.PI/2*dr,counterClockwise:nn})}f(Fi,"getRoundCorner");var lt={};lt.findMidptPtsEtc=function(t,e){var r=e.posPts,a=e.intersectionPts,n=e.vectorNormInverse,i,s=t.pstyle("source-endpoint"),o=t.pstyle("target-endpoint"),l=s.units!=null&&o.units!=null,u=f(function(w,x,T,C){var D=C-x,L=T-w,O=Math.sqrt(L*L+D*D);return{x:-D/O,y:L/O}},"recalcVectorNormInverse"),h=t.pstyle("edge-distances").value;switch(h){case"node-position":i=r;break;case"intersection":i=a;break;case"endpoints":{if(l){var c=this.manualEndptToPx(t.source()[0],s),v=At(c,2),d=v[0],g=v[1],m=this.manualEndptToPx(t.target()[0],o),y=At(m,2),p=y[0],b=y[1],E={x1:d,y1:g,x2:p,y2:b};n=u(d,g,p,b),i=E}else Ne("Edge ".concat(t.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),i=a;break}}return{midptPts:i,vectorNormInverse:n}};lt.findHaystackPoints=function(t){for(var e=0;e<t.length;e++){var r=t[e],a=r._private,n=a.rscratch;if(!n.haystack){var i=Math.random()*2*Math.PI;n.source={x:Math.cos(i),y:Math.sin(i)},i=Math.random()*2*Math.PI,n.target={x:Math.cos(i),y:Math.sin(i)}}var s=a.source,o=a.target,l=s.position(),u=o.position(),h=s.width(),c=o.width(),v=s.height(),d=o.height(),g=r.pstyle("haystack-radius").value,m=g/2;n.haystackPts=n.allpts=[n.source.x*h*m+l.x,n.source.y*v*m+l.y,n.target.x*c*m+u.x,n.target.y*d*m+u.y],n.midX=(n.allpts[0]+n.allpts[2])/2,n.midY=(n.allpts[1]+n.allpts[3])/2,n.edgeType="haystack",n.haystack=!0,this.storeEdgeProjections(r),this.calculateArrowAngles(r),this.recalculateEdgeLabelProjections(r),this.calculateLabelAngles(r)}};lt.findSegmentsPoints=function(t,e){var r=t._private.rscratch,a=t.pstyle("segment-weights"),n=t.pstyle("segment-distances"),i=t.pstyle("segment-radii"),s=t.pstyle("radius-type"),o=Math.min(a.pfValue.length,n.pfValue.length),l=i.pfValue[i.pfValue.length-1],u=s.pfValue[s.pfValue.length-1];r.edgeType="segments",r.segpts=[],r.radii=[],r.isArcRadius=[];for(var h=0;h<o;h++){var c=a.pfValue[h],v=n.pfValue[h],d=1-c,g=c,m=this.findMidptPtsEtc(t,e),y=m.midptPts,p=m.vectorNormInverse,b={x:y.x1*d+y.x2*g,y:y.y1*d+y.y2*g};r.segpts.push(b.x+p.x*v,b.y+p.y*v),r.radii.push(i.pfValue[h]!==void 0?i.pfValue[h]:l),r.isArcRadius.push((s.pfValue[h]!==void 0?s.pfValue[h]:u)==="arc-radius")}};lt.findLoopPoints=function(t,e,r,a){var n=t._private.rscratch,i=e.dirCounts,s=e.srcPos,o=t.pstyle("control-point-distances"),l=o?o.pfValue[0]:void 0,u=t.pstyle("loop-direction").pfValue,h=t.pstyle("loop-sweep").pfValue,c=t.pstyle("control-point-step-size").pfValue;n.edgeType="self";var v=r,d=c;a&&(v=0,d=l);var g=u-Math.PI/2,m=g-h/2,y=g+h/2,p=u+"_"+h;v=i[p]===void 0?i[p]=0:++i[p],n.ctrlpts=[s.x+Math.cos(m)*1.4*d*(v/3+1),s.y+Math.sin(m)*1.4*d*(v/3+1),s.x+Math.cos(y)*1.4*d*(v/3+1),s.y+Math.sin(y)*1.4*d*(v/3+1)]};lt.findCompoundLoopPoints=function(t,e,r,a){var n=t._private.rscratch;n.edgeType="compound";var i=e.srcPos,s=e.tgtPos,o=e.srcW,l=e.srcH,u=e.tgtW,h=e.tgtH,c=t.pstyle("control-point-step-size").pfValue,v=t.pstyle("control-point-distances"),d=v?v.pfValue[0]:void 0,g=r,m=c;a&&(g=0,m=d);var y=50,p={x:i.x-o/2,y:i.y-l/2},b={x:s.x-u/2,y:s.y-h/2},E={x:Math.min(p.x,b.x),y:Math.min(p.y,b.y)},S=.5,w=Math.max(S,Math.log(o*.01)),x=Math.max(S,Math.log(u*.01));n.ctrlpts=[E.x,E.y-(1+Math.pow(y,1.12)/100)*m*(g/3+1)*w,E.x-(1+Math.pow(y,1.12)/100)*m*(g/3+1)*x,E.y]};lt.findStraightEdgePoints=function(t){t._private.rscratch.edgeType="straight"};lt.findBezierPoints=function(t,e,r,a,n){var i=t._private.rscratch,s=t.pstyle("control-point-step-size").pfValue,o=t.pstyle("control-point-distances"),l=t.pstyle("control-point-we
8ights"),u=o&&l?Math.min(o.value.length,l.value.length):1,h=o?o.pfValue[0]:void 0,c=l.value[0],v=a;i.edgeType=v?"multibezier":"bezier",i.ctrlpts=[];for(var d=0;d<u;d++){var g=(.5-e.eles.length/2+r)*s*(n?-1:1),m=void 0,y=Yo(g);v&&(h=o?o.pfValue[d]:s,c=l.value[d]),a?m=h:m=h!==void 0?y*h:void 0;var p=m!==void 0?m:g,b=1-c,E=c,S=this.findMidptPtsEtc(t,e),w=S.midptPts,x=S.vectorNormInverse,T={x:w.x1*b+w.x2*E,y:w.y1*b+w.y2*E};i.ctrlpts.push(T.x+x.x*p,T.y+x.y*p)}};lt.findTaxiPoints=function(t,e){var r=t._private.rscratch;r.edgeType="segments";var a="vertical",n="horizontal",i="leftward",s="rightward",o="downward",l="upward",u="auto",h=e.posPts,c=e.srcW,v=e.srcH,d=e.tgtW,g=e.tgtH,m=t.pstyle("edge-distances").value,y=m!=="node-position",p=t.pstyle("taxi-direction").value,b=p,E=t.pstyle("taxi-turn"),S=E.units==="%",w=E.pfValue,x=w<0,T=t.pstyle("taxi-turn-min-distance").pfValue,C=y?(c+d)/2:0,D=y?(v+g)/2:0,L=h.x2-h.x1,O=h.y2-h.y1,A=f(function(me,be){return me>0?Math.max(me-be,0):Math.min(me+be,0)},"subDWH"),I=A(L,C),M=A(O,D),P=!1;b===u?p=Math.abs(I)>Math.abs(M)?n:a:b===l||b===o?(p=a,P=!0):(b===i||b===s)&&(p=n,P=!0);var R=p===a,k=R?M:I,B=R?O:L,F=Yo(B),U=!1;!(P&&(S||x))&&(b===o&&B<0||b===l&&B>0||b===i&&B>0||b===s&&B<0)&&(F*=-1,k=F*Math.abs(k),U=!0);var V;if(S){var G=w<0?1+w:w;V=G*k}else{var $=w<0?k:0;V=$+w*F}var j=f(function(me){return Math.abs(me)<T||Math.abs(me)>=Math.abs(k)},"getIsTooClose"),Q=j(V),H=j(Math.abs(k)-Math.abs(V)),te=Q||H;if(te&&!U)if(R){var _=Math.abs(B)<=v/2,z=Math.abs(L)<=d/2;if(_){var Z=(h.x1+h.x2)/2,K=h.y1,ie=h.y2;r.segpts=[Z,K,Z,ie]}else if(z){var de=(h.y1+h.y2)/2,re=h.x1,se=h.x2;r.segpts=[re,de,se,de]}else r.segpts=[h.x1,h.y2]}else{var le=Math.abs(B)<=c/2,ce=Math.abs(O)<=g/2;if(le){var ue=(h.y1+h.y2)/2,ye=h.x1,Oe=h.x2;r.segpts=[ye,ue,Oe,ue]}else if(ce){var Te=(h.x1+h.x2)/2,xe=h.y1,Se=h.y2;r.segpts=[Te,xe,Te,Se]}else r.segpts=[h.x2,h.y1]}else if(R){var ee=h.y1+V+(y?v/2*F:0),N=h.x1,Y=h.x2;r.segpts=[N,ee,Y,ee]}else{var J=h.x1+V+(y?c/2*F:0),q=h.y1,X=h.y2;r.segpts=[J,q,J,X]}if(r.isRound){var ne=t.pstyle("taxi-radius").value,W=t.pstyle("radius-type").value[0]==="arc-radius";r.radii=new Array(r.segpts.length/2).fill(ne),r.isArcRadius=new Array(r.segpts.length/2).fill(W)}};lt.tryToCorrectInvalidPoints=function(t,e){var r=t._private.rscratch;if(r.edgeType==="bezier"){var a=e.srcPos,n=e.tgtPos,i=e.srcW,s=e.srcH,o=e.tgtW,l=e.tgtH,u=e.srcShape,h=e.tgtShape,c=e.srcCornerRadius,v=e.tgtCornerRadius,d=e.srcRs,g=e.tgtRs,m=!oe(r.startX)||!oe(r.startY),y=!oe(r.arrowStartX)||!oe(r.arrowStartY),p=!oe(r.endX)||!oe(r.endY),b=!oe(r.arrowEndX)||!oe(r.arrowEndY),E=3,S=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth,w=E*S,x=mr({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),T=x<w,C=mr({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.endX,y:r.endY}),D=C<w,L=!1;if(m||y||T){L=!0;var O={x:r.ctrlpts[0]-a.x,y:r.ctrlpts[1]-a.y},A=Math.sqrt(O.x*O.x+O.y*O.y),I={x:O.x/A,y:O.y/A},M=Math.max(i,s),P={x:r.ctrlpts[0]+I.x*2*M,y:r.ctrlpts[1]+I.y*2*M},R=u.intersectLine(a.x,a.y,i,s,P.x,P.y,0,c,d);T?(r.ctrlpts[0]=r.ctrlpts[0]+I.x*(w-x),r.ctrlpts[1]=r.ctrlpts[1]+I.y*(w-x)):(r.ctrlpts[0]=R[0]+I.x*w,r.ctrlpts[1]=R[1]+I.y*w)}if(p||b||D){L=!0;var k={x:r.ctrlpts[0]-n.x,y:r.ctrlpts[1]-n.y},B=Math.sqrt(k.x*k.x+k.y*k.y),F={x:k.x/B,y:k.y/B},U=Math.max(i,s),V={x:r.ctrlpts[0]+F.x*2*U,y:r.ctrlpts[1]+F.y*2*U},G=h.intersectLine(n.x,n.y,o,l,V.x,V.y,0,v,g);D?(r.ctrlpts[0]=r.ctrlpts[0]+F.x*(w-C),r.ctrlpts[1]=r.ctrlpts[1]+F.y*(w-C)):(r.ctrlpts[0]=G[0]+F.x*w,r.ctrlpts[1]=G[1]+F.y*w)}L&&this.findEndpoints(t)}};lt.storeAllpts=function(t){var e=t._private.rscratch;if(e.edgeType==="multibezier"||e.edgeType==="bezier"||e.edgeType==="self"||e.edgeType==="compound"){e.allpts=[],e.allpts.push(e.startX,e.startY);for(var r=0;r+1<e.ctrlpts.length;r+=2)e.allpts.push(e.ctrlpts[r],e.ctrlpts[r+1]),r+3<e.ctrlpts.length&&e.allpts.push((e.ctrlpts[r]+e.ctrlpts[r+2])/2,(e.ctrlpts[r+1]+e.ctrlpts[r+3])/2);e.allpts.push(e.endX,e.endY);var a,n;e.ctrlpts.length/2%2===0?(a=e.allpts.length/2-1,e.midX=e.allpts[a],e.midY=e.allpts[a+1]):(a=e.allpts.length/2-3,n=.5,e.midX=Ze(e.allpts[a],e.allpts[a+2],e.allpts[a+4],n),e.midY=Ze(e.allpts[a+1],e.allpts[a+3],e.allpts[a+5],n))}else if(e.edgeType==="straight")e.allpts=[e.startX,e.startY,e.endX,e.endY],e.midX=(e.startX+e.endX+e.arrowStartX+e.arrowEndX)/4,e.midY=(e.startY+e.endY+e.arrowStartY+e.arrowEndY)/4;else if(e.edgeType==="segments"){if(e.allpts=[],e.allpts.push(e.startX,e.startY),e.allpts.push.apply(e.allpts,e.segpts),e.allpts.push(e.endX,e.endY),e.isRound){e.roundCorners=[];for(var i=2;i+3<e.allpts.length;i+=2){var s=e.radii[i/2-1],o=e.isArcRadius[i/2-1];e.roundCorners.push(Fi({x:e.allpts[i-2],y:e.allpts[i-1]},{x:e.allpts[i],y:e.allpts[i+1],radius:s},{x:e.allpts[i+2],y:e.allpts[i+3]},s,o))}}if(e.segpts.length%4===0){var l=e.segpts.length/2,u=l-2;e.midX=(e.segpts[u]+e.segpts[l])/2,e.midY=(e.segpts[u+1]+e.segpts[l+1])/2}else{var h=e.segpts.length/2-1;if(!e.isRound)e.midX=e.segpts[h],e.midY=e.segpts[h+1];else{var c={x:e.segpts[h],y:e.segpts[h+1]}
vendor: 17,520 bytes, lines 8-11
8,v=e.roundCorners[h/2],d=[c.x-v.cx,c.y-v.cy],g=v.radius/Math.sqrt(Math.pow(d[0],2)+Math.pow(d[1],2));d=d.map(function(m){return m*g}),e.midX=v.cx+d[0],e.midY=v.cy+d[1],e.midVector=d}}}};lt.checkForInvalidEdgeWarning=function(t){var e=t[0]._private.rscratch;e.nodesOverlap||oe(e.startX)&&oe(e.startY)&&oe(e.endX)&&oe(e.endY)?e.loggedErr=!1:e.loggedErr||(e.loggedErr=!0,Ne("Edge `"+t.id()+"` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap."))};lt.findEdgeControlPoints=function(t){var e=this;if(!(!t||t.length===0)){for(var r=this,a=r.cy,n=a.hasCompoundNodes(),i={map:new Ft,get:f(function(T){var C=this.map.get(T[0]);return C!=null?C.get(T[1]):null},"get"),set:f(function(T,C){var D=this.map.get(T[0]);D==null&&(D=new Ft,this.map.set(T[0],D)),D.set(T[1],C)},"set")},s=[],o=[],l=0;l<t.length;l++){var u=t[l],h=u._private,c=u.pstyle("curve-style").value;if(!(u.removed()||!u.takesUpSpace())){if(c==="haystack"){o.push(u);continue}var v=c==="unbundled-bezier"||c.endsWith("segments")||c==="straight"||c==="straight-triangle"||c.endsWith("taxi"),d=c==="unbundled-bezier"||c==="bezier",g=h.source,m=h.target,y=g.poolIndex(),p=m.poolIndex(),b=[y,p].sort(),E=i.get(b);E==null&&(E={eles:[]},i.set(b,E),s.push(b)),E.eles.push(u),v&&(E.hasUnbundled=!0),d&&(E.hasBezier=!0)}}for(var S=f(function(T){var C=s[T],D=i.get(C),L=void 0;if(!D.hasUnbundled){var O=D.eles[0].parallelEdges().filter(function(J){return J.isBundledBezier()});xi(D.eles),O.forEach(function(J){return D.eles.push(J)}),D.eles.sort(function(J,q){return J.poolIndex()-q.poolIndex()})}var A=D.eles[0],I=A.source(),M=A.target();if(I.poolIndex()>M.poolIndex()){var P=I;I=M,M=P}var R=D.srcPos=I.position(),k=D.tgtPos=M.position(),B=D.srcW=I.outerWidth(),F=D.srcH=I.outerHeight(),U=D.tgtW=M.outerWidth(),V=D.tgtH=M.outerHeight(),G=D.srcShape=r.nodeShapes[e.getNodeShape(I)],$=D.tgtShape=r.nodeShapes[e.getNodeShape(M)],j=D.srcCornerRadius=I.pstyle("corner-radius").value==="auto"?"auto":I.pstyle("corner-radius").pfValue,Q=D.tgtCornerRadius=M.pstyle("corner-radius").value==="auto"?"auto":M.pstyle("corner-radius").pfValue,H=D.tgtRs=M._private.rscratch,te=D.srcRs=I._private.rscratch;D.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var _=0;_<D.eles.length;_++){var z=D.eles[_],Z=z[0]._private.rscratch,K=z.pstyle("curve-style").value,ie=K==="unbundled-bezier"||K.endsWith("segments")||K.endsWith("taxi"),de=!I.same(z.source());if(!D.calculatedIntersection&&I!==M&&(D.hasBezier||D.hasUnbundled)){D.calculatedIntersection=!0;var re=G.intersectLine(R.x,R.y,B,F,k.x,k.y,0,j,te),se=D.srcIntn=re,le=$.intersectLine(k.x,k.y,U,V,R.x,R.y,0,Q,H),ce=D.tgtIntn=le,ue=D.intersectionPts={x1:re[0],x2:le[0],y1:re[1],y2:le[1]},ye=D.posPts={x1:R.x,x2:k.x,y1:R.y,y2:k.y},Oe=le[1]-re[1],Te=le[0]-re[0],xe=Math.sqrt(Te*Te+Oe*Oe),Se=D.vector={x:Te,y:Oe},ee=D.vectorNorm={x:Se.x/xe,y:Se.y/xe},N={x:-ee.y,y:ee.x};D.nodesOverlap=!oe(xe)||$.checkPoint(re[0],re[1],0,U,V,k.x,k.y,Q,H)||G.checkPoint(le[0],le[1],0,B,F,R.x,R.y,j,te),D.vectorNormInverse=N,L={nodesOverlap:D.nodesOverlap,dirCounts:D.dirCounts,calculatedIntersection:!0,hasBezier:D.hasBezier,hasUnbundled:D.hasUnbundled,eles:D.eles,srcPos:k,tgtPos:R,srcW:U,srcH:V,tgtW:B,tgtH:F,srcIntn:ce,tgtIntn:se,srcShape:$,tgtShape:G,posPts:{x1:ye.x2,y1:ye.y2,x2:ye.x1,y2:ye.y1},intersectionPts:{x1:ue.x2,y1:ue.y2,x2:ue.x1,y2:ue.y1},vector:{x:-Se.x,y:-Se.y},vectorNorm:{x:-ee.x,y:-ee.y},vectorNormInverse:{x:-N.x,y:-N.y}}}var Y=de?L:D;Z.nodesOverlap=Y.nodesOverlap,Z.srcIntn=Y.srcIntn,Z.tgtIntn=Y.tgtIntn,Z.isRound=K.startsWith("round"),n&&(I.isParent()||I.isChild()||M.isParent()||M.isChild())&&(I.parents().anySame(M)||M.parents().anySame(I)||I.same(M)&&I.isParent())?e.findCompoundLoopPoints(z,Y,_,ie):I===M?e.findLoopPoints(z,Y,_,ie):K.endsWith("segments")?e.findSegmentsPoints(z,Y):K.endsWith("taxi")?e.findTaxiPoints(z,Y):K==="straight"||!ie&&D.eles.length%2===1&&_===Math.floor(D.eles.length/2)?e.findStraightEdgePoints(z):e.findBezierPoints(z,Y,_,ie,de),e.findEndpoints(z),e.tryToCorrectInvalidPoints(z,Y),e.checkForInvalidEdgeWarning(z),e.storeAllpts(z),e.storeEdgeProjections(z),e.calculateArrowAngles(z),e.recalculateEdgeLabelProjections(z),e.calculateLabelAngles(z)}},"_loop"),w=0;w<s.length;w++)S(w);this.findHaystackPoints(o)}};function zu(t){var e=[];if(t!=null){for(var r=0;r<t.length;r+=2){var a=t[r],n=t[r+1];e.push({x:a,y:n})}return e}}f(zu,"getPts");lt.getSegmentPoints=function(t){var e=t[0]._private.rscratch,r=e.edgeType;if(r==="segments")return this.recalculateRenderedStyle(t),zu(e.segpts)};lt.getControlPoints=function(t){var e=t[0]._private.rscratch,r=e.edgeType;if(r==="bezier"||r==="multibezier"||r==="self"||r==="compound")return this.recalculateRenderedStyle(t),zu(e.ctrlpts)};lt.getEdgeMidpoint=function(t){var e=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),{x:e.midX,y:e.midY}};var Ia={};Ia.manualEndptToPx=function(t,e){var r=this,a=t.position(),n=t.outerWidth(),i=t.outerHeight(),s=t._private.rscratch;if(e.value.length===2){var o=[e.pfValue[0],e.pfValue[1]];return e.units[0]==="%"&&(o[0]=o[0]*n),e.units[1]==="%"&&(o[1]=o[1]*i),o[0]+=a.x,o[1]+=a.y,o}else{var l=e.pfValue[0];l=-Math.PI/2+l;var u=2*Math.max(n,i),h=[a.x+Math.cos(l)*u,a.y+Math.sin(l)*u];return r.nodeShapes[this.getNodeShape(t)].intersectLine(a.x,a.y,n,i,h[0],h[1],0,t.pstyle("corner-radius").value==="auto"?"auto":t.pstyle("corner-radius").pfValue,s)}};Ia.findEndpoints=function(t){var e=this,r,a=t.source()[0],n=t.target()[0],i=a.position(),s=n.position(),o=t.pstyle("target-arrow-shape").value,l=t.pstyle("source-arrow-shape").value,u=t.pstyle("target-distance-from-node").pfValue,h=t.pstyle("source-distance-from-node").pfValue,c=a._private.rscratch,v=n._private.rscratch,d=t.pstyle("curve-style").value,g=t._private.rscratch,m=g.edgeType,y=d==="taxi",p=m==="self"||m==="compound",b=m==="bezier"||m==="multibezier"||p,E=m!=="bezier",S=m==="straight"||m==="segments",w=m==="segments",x=b||E||S,T=p||y,C=t.pstyle("source-endpoint"),D=T?"outside-to-node":C.value,L=a.pstyle("corner-radius").value==="auto"?"auto":a.pstyle("corner-radius").pfValue,O=t.pstyle("target-endpoint"),A=T?"outside-to-node":O.value,I=n.pstyle("corner-radius").value==="auto"?"auto":n.pstyle("corner-radius").pfValue;g.srcManEndpt=C,g.tgtManEndpt=O;var M,P,R,k;if(b){var B=[g.ctrlpts[0],g.ctrlpts[1]],F=E?[g.ctrlpts[g.ctrlpts.length-2],g.ctrlpts[g.ctrlpts.length-1]]:B;M=F,P=B}else if(S){var U=w?g.segpts.slice(0,2):[s.x,s.y],V=w?g.segpts.slice(g.segpts.length-2):[i.x,i.y];M=V,P=U}if(A==="inside-to-node")r=[s.x,s.y];else if(O.units)r=this.manualEndptToPx(n,O);else if(A==="outside-to-line")r=g.tgtIntn;else if(A==="outside-to-node"||A==="outside-to-node-or-label"?R=M:(A==="outside-to-line"||A==="outside-to-line-or-label")&&(R=[i.x,i.y]),r=e.nodeShapes[this.getNodeShape(n)].intersectLine(s.x,s.y,n.outerWidth(),n.outerHeight(),R[0],R[1],0,I,v),A==="outside-to-node-or-label"||A==="outside-to-line-or-label"){var G=n._private.rscratch,$=G.labelWidth,j=G.labelHeight,Q=G.labelX,H=G.labelY,te=$/2,_=j/2,z=n.pstyle("text-valign").value;z==="top"?H-=_:z==="bottom"&&(H+=_);var Z=n.pstyle("text-halign").value;Z==="left"?Q-=te:Z==="right"&&(Q+=te);var K=Ea(R[0],R[1],[Q-te,H-_,Q+te,H-_,Q+te,H+_,Q-te,H+_],s.x,s.y);if(K.length>0){var ie=i,de=hr(ie,kr(r)),re=hr(ie,kr(K)),se=de;if(re<de&&(r=K,se=re),K.length>2){var le=hr(ie,{x:K[2],y:K[3]});le<se&&(r=[K[2],K[3]])}}}var ce=Ua(r,M,e.arrowShapes[o].spacing(t)+u),ue=Ua(r,M,e.arrowShapes[o].gap(t)+u);if(g.endX=ue[0],g.endY=ue[1],g.arrowEndX=ce[0],g.arrowEndY=ce[1],D==="inside-to-node")r=[i.x,i.y];else if(C.units)r=this.manualEndptToPx(a,C);else if(D==="outside-to-line")r=g.srcIntn;else if(D==="outside-to-node"||D==="outside-to-node-or-label"?k=P:(D==="outside-to-line"||D==="outside-to-line-or-label")&&(k=[s.x,s.y]),r=e.nodeShapes[this.getNodeShape(a)].intersectLine(i.x,i.y,a.outerWidth(),a.outerHeight(),k[0],k[1],0,L,c),D==="outside-to-node-or-label"||D==="outside-to-line-or-label"){var ye=a._private.rscratch,Oe=ye.labelWidth,Te=ye.labelHeight,xe=ye.labelX,Se=ye.labelY,ee=Oe/2,N=Te/2,Y=a.pstyle("text-valign").value;Y==="top"?Se-=N:Y==="bottom"&&(Se+=N);var J=a.pstyle("text-halign").value;J==="left"?xe-=ee:J==="right"&&(xe+=ee);var q=Ea(k[0],k[1],[xe-ee,Se-N,xe+ee,Se-N,xe+ee,Se+N,xe-ee,Se+N],i.x,i.y);if(q.length>0){var X=s,ne=hr(X,kr(r)),W=hr(X,kr(q)),ae=ne;if(W<ne&&(r=[q[0],q[1]],ae=W),q.length>2){var me=hr(X,{x:q[2],y:q[3]});me<ae&&(r=[q[2],q[3]])}}}var be=Ua(r,P,e.arrowShapes[l].spacing(t)+h),ve=Ua(r,P,e.arrowShapes[l].gap(t)+h);g.startX=ve[0],g.startY=ve[1],g.arrowStartX=be[0],g.arrowStartY=be[1],x&&(!oe(g.startX)||!oe(g.startY)||!oe(g.endX)||!oe(g.endY)?g.badLine=!0:g.badLine=!1)};Ia.getSourceEndpoint=function(t){var e=t[0]._private.rscratch;switch(this.recalculateRenderedStyle(t),e.edgeType){case"haystack":return{x:e.haystackPts[0],y:e.haystackPts[1]};default:return{x:e.arrowStartX,y:e.arrowStartY}}};Ia.getTargetEndpoint=function(t){var e=t[0]._private.rscratch;switch(this.recalculateRenderedStyle(t),e.edgeType){case"haystack":return{x:e.haystackPts[2],y:e.haystackPts[3]};default:return{x:e.arrowEndX,y:e.arrowEndY}}};var Gi={};function bp(t,e,r){for(var a=f(function(u,h,c,v){return Ze(u,h,c,v)},"qbezierAt$1"),n=e._private,i=n.rstyle.bezierPts,s=0;s<t.bezierProjPcts.length;s++){var o=t.bezierProjPcts[s];i.push({x:a(r[0],r[2],r[4],o),y:a(r[1],r[3],r[5],o)})}}f(bp,"pushBezierPts");Gi.storeEdgeProjections=function(t){var e=t._private,r=e.rscratch,a=r.edgeType;if(e.rstyle.bezierPts=null,e.rstyle.linePts=null,e.rstyle.haystackPts=null,a==="multibezier"||a==="bezier"||a==="self"||a==="compound"){e.rstyle.bezierPts=[];for(var n=0;n+5<r.allpts.length;n+=4)bp(this,t,r.allpts.slice(n,n+6))}else if(a==="segments")for(var i=e.rstyle.linePts=[],n=0;n+1<r.allpts.length;n+=2)i.push({x:r.allpts[n],y:r.allpts[n+1]});else if(a==="haystack"){var s=r.haystackPts;e.rstyle.haystackPts=[{x:s[0],y:s[1]},{x:s[2],y:s[3]}]}e.rstyle.arrowWidth=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth};Gi.recalculateEdgeProjections=function(t){this.findEdgeControlPoints(t)};var zt={};zt.recalculateNodeLabelProjection=function(t){var e=t.pstyle("label").strValue;if(!rr(e)){var r,a,n=t._private,i=t.width(),s=t.height(),o=t.padding(),l=t.position(),u=t.pstyle("text-halign").strValue,h=t.pstyle("text-valign").strValue,c=n.rscratch,v=n.rstyle;switch(u){case"left":r=l.x-i/2-o;break;case"right":r=l.x+i/2+o;break;default:r=l.x}switch(h){case"top":a=l.y-s/2-o;break;case"bottom":a=l.y+s/2+o;break;default:a=l.y}c.labelX=r,c.labelY=a,v.labelX=r,v.labelY=a,this.calculateLabelAngles(t),this.applyLabelDimensions(t)}};var Vu=f(function(e,r){var a=Math.atan(r/e);return e===0&&a<0&&(a=a*-1),a},"lineAngleFromDelta"),Uu=f(function(e,r){var a=r.x-e.x,n=r.y-e.y;return Vu(a,n)},"lineAngle"),Ep=f(function(e,r,a,n){var i=ba(0,n-.001,1),s=ba(0,n+.001,1),o=Pr(e,r,a,i),l=Pr(e,r,a,s);return Uu(o,l)},"bezierAngle");zt.recalculateEdgeLabelProjections=function(t){var e,r=t._private,a=r.rscratch,n=this,i={mid:t.pstyle("label").strValue,source:t.pstyle("source-label").strValue,target:t.pstyle("target-label").strValue};if(i.mid||i.source||i.target){e={x:a.midX,y:a.midY};var s=f(function(c,v,d){Jt(r.rscratch,c,v,d),Jt(r.rstyle,c,v,d)},"setRs");s("labelX",null,e.x),s("labelY",null,e.y);var o=Vu(a.midDispX,a.midDispY);s("labelAutoAngle",null,o);var l=f(function h(){if(h.cache)return h.cache;for(var c=[],v=0;v+5<a.allpts.length;v+=4){var d={x:a.allpts[v],y:a.allpts[v+1]},g={x:a.allpts[v+2],y:a.allpts[v+3]},m={x:a.allpts[v+4],y:a.allpts[v+5]};c.push({p0:d,p1:g,p2:m,startDist:0,length:0,segments:[]})}var y=r.rstyle.bezierPts,p=n.bezierProjPcts.length;function b(T,C,D,L,O){var A=mr(C,D),I=T.segments[T.segments.length-1],M={p0:C,p1:D,t0:L,t1:O,startDist:I?I.startDist+I.length:0,length:A};T.segments.push(M),T.length+=A}f(b,"addSegment");for(var E=0;E<c.length;E++){var S=c[E],w=c[E-1];w&&(S.startDist=w.startDist+w.length),b(S,S.p0,y[E*p],0,n.bezierProjPcts[0]);for(var x=0;x<p-1;x++)b(S,y[E*p+x],y[E*p+x+1],n.bezierProjPcts[x],n.bezierProjPcts[x+1]);b(S,y[E*p+p-1],S.p2,n.bezierProjPcts[p-1],1)}return h.cache=c},"createControlPointInfo"),u=f(function(c){var v,d=c==="source";if(i[c]){var g=t.pstyle(c+"-text-offset").pfValue;switch(a.edgeType){case"self":case"compound":case"bezier":case"multibezier":{for(var m=l(),y,p=0,b=0,E=0;E<m.length;E++){for(var S=m[d?E:m.length-1-E],w=0;w<S.segments.length;w++){var x=S.segments[d?w:S.segments.length-1-w],T=E===m.length-1&&w===S.segments.length-1;if(p=b,b+=x.length,b>=g||T){y={cp:S,segment:x};break}}if(y)break}var C=y.cp,D=y.segment,L=(g-p)/D.length,O=D.t1-D.t0,A=d?D.t0+O*L:D.t1-O*L;A=ba(0,A,1),e=Pr(C.p0,C.p1,C.p2,A),v=Ep(C.p0,C.p1,C.p2,A);break}case"straight":case"segments":case"haystack":{for(var I=0,M,P,R,k,B=a.allpts.length,F=0;F+3<B&&(d?(R={x:a.allpts[F],y:a.allpts[F+1]},k={x:a.allpts[F+2],y:a.allpts[F+3]}):(R={x:a.allpts[B-2-F],y:a.allpts[B-1-F]},k={x:a.allpts[B-4-F],y:a.allpts[B-3-F]}),M=mr(R,k),P=I,I+=M,!(I>=g));F+=2);var U=g-P,V=U/M;V=ba(0,V,1),e=Dh(R,k,V),v=Uu(R,k);break}}s("labelX",c,e.x),s("labelY",c,e.y),s("labelAutoAngle",c,v)}},"calculateEndProjection");u("source"),u("target"),this.applyLabelDimensions(t)}};zt.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))};zt.applyPrefixedLabelDimensions=function(t,e){var r=t._private,a=this.getLabelText(t,e),n=this.calculateLabelDimensions(t,a),i=t.pstyle("line-height").pfValue,s=t.pstyle("text-wrap").strValue,o=Mt(r.rscratch,"labelWrapCachedLines",e)||[],l=s!=="wrap"?1:Math.max(o.length,1),u=n.height/l,h=u*i,c=n.width,v=n.height+(l-1)*(i-1)*u;Jt(r.rstyle,"labelWidth",e,c),Jt(r.rscratch,"labelWidth",e,c),Jt(r.rstyle,"labelHeight",e,v),Jt(r.rscratch,"labelHeight",e,v),Jt(r.rscratch,"labelLineHeight",e,h)};zt.getLabelText=function(t,e){var r=t._private,a=e?e+"-":"",n=t.pstyle(a+"label").strValue,i=t.pstyle("text-transform").value,s=f(function($,j){return j?(Jt(r.rscratch,$,e,j),j):Mt(r.rscratch,$,e)},"rscratch");if(!n)return"";i=="none"||(i=="uppercase"?n=n.toUpperCase():i=="lowercase"&&(n=n.toLowerCase()));var o=t.pstyle("text-wrap").value;if(o==="wrap"){var l=s("labelKey");if(l!=null&&s("labelWrapKey")===l)return s("labelWrapCachedText");for(var u="\u200B",h=n.split(` 9`),c=t.pstyle("text-max-width").pfValue,v=t.pstyle("text-overflow-wrap").value,d=v==="anywhere",g=[],m=/[\s\u200b]+|$/g,y=0;y<h.length;y++){var p=h[y],b=this.calculateLabelDimensions(t,p),E=b.width;if(d){var S=p.split("").join(u);p=S}if(E>c){var w=p.matchAll(m),x="",T=0,C=To(w),D;try{for(C.s();!(D=C.n()).done;){var L=D.value,O=L[0],A=p.substring(T,L.index);T=L.index+O.length;var I=x.length===0?A:x+A+O,M=this.calculateLabelDimensions(t,I),P=M.width;P<=c?x+=A+O:(x&&g.push(x),x=A+O)}}catch(G){C.e(G)}finally{C.f()}x.match(/^[\s\u200b]+$/)||g.push(x)}else g.push(p)}s("labelWrapCachedLines",g),n=s("labelWrapCachedText",g.join(` 10`)),s("labelWrapKey",l)}else if(o==="ellipsis"){var R=t.pstyle("text-max-width").pfValue,k="",B="\u2026",F=!1;if(this.calculateLabelDimensions(t,n).width<R)return n;for(var U=0;U<n.length;U++){var V=this.calculateLabelDimensions(t,k+n[U]+B).width;if(V>R)break;k+=n[U],U===n.length-1&&(F=!0)}return F||(k+=B),k}return n};zt.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;if(e==="auto")if(t.isNode())switch(r){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return e};zt.calculateLabelDimensions=function(t,e){var r=this,a=r.cy.window(),n=a.document,i=yr(e,t._private.labelDimsKey),s=r.labelDimCache||(r.labelDimCache=[]),o=s[i];if(o!=null)return o;var l=0,u=t.pstyle("font-style").strValue,h=t.pstyle("font-size").pfValue,c=t.pstyle("font-family").strValue,v=t.pstyle("font-weight").strValue,d=this.labelCalcCanvas,g=this.labelCalcCanvasContext;if(!d){d=this.labelCalcCanvas=n.createElement("canvas"),g=this.labelCalcCanvasContext=d.getContext("2d");var m=d.style;m.position="absolute",m.left="-9999px",m.top="-9999px",m.zIndex="-1",m.visibility="hidden",m.pointerEvents="none"}g.font="".concat(u," ").concat(v," ").concat(h,"px ").concat(c);for(var y=0,p=0,b=e.split(` 11`),E=0;E<b.length;E++){var S=b[E],w=g.measureText(S),x=Math.ceil(w.width),T=h;y=Math.max(x,y),p+=T}return y+=l,p+=l,s[i]={width:y,height:p}};zt.calculateLabelAngle=function(t,e){var r=t._private,a=r.rscratch,n=t.isEdge(),i=e?e+"-":"",s=t.pstyle(i+"text-rotation"),o=s.strValue;return o==="none"?0:n&&o==="autorotate"?a.labelAutoAngle:o==="autorotate"?0:s.pfValue};zt.calculateLabelAngles=function(t){var e=this,r=t.isEdge(),a=t._private,n=a.rscratch;n.labelAngle=e.calculateLabelAngle(t),r&&(n.sourceLabelAngle=e.calculateLabelAngle(t,"source"),n.targetLabelAngle=e.calculateLabelAngle(t,"target"))};var Yu={},lo=28,fo=!1;Yu.getNodeShape=function(t){var e=this,r=t.pstyle("shape").value;if(r==="cutrectangle"&&(t.width()<lo||t.height()<lo))return fo||(Ne("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),fo=!0),"rectangle";if(t.isParent())return r==="rectangle"||r==="roundrectangle"||r==="round-rectangle"||r==="cutrectangle"||r==="cut-rectangle"||r==="barrel"?r:"rectangle";if(r==="polygon"){var a=t.pstyle("shape-polygon-points").value;
vendor: 4,214 bytes, line 11
11return e.nodeShapes.makePolygon(a).name}return r};var Rn={};Rn.registerCalculationListeners=function(){var t=this.cy,e=t.collection(),r=this,a=f(function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(s),o)for(var l=0;l<s.length;l++){var u=s[l],h=u._private,c=h.rstyle;c.clean=!1,c.cleanConnected=!1}},"enqueue");r.binder(t).on("bounds.* dirty.*",f(function(s){var o=s.target;a(o)},"onDirtyBounds")).on("style.* background.*",f(function(s){var o=s.target;a(o,!1)},"onDirtyStyle"));var n=f(function(s){if(s){var o=r.onUpdateEleCalcsFns;e.cleanStyle();for(var l=0;l<e.length;l++){var u=e[l],h=u._private.rstyle;u.isNode()&&!h.cleanConnected&&(a(u.connectedEdges()),h.cleanConnected=!0)}if(o)for(var c=0;c<o.length;c++){var v=o[c];v(s,e)}r.recalculateRenderedStyle(e),e=t.collection()}},"updateEleCalcs");r.flushRenderedStyleQueue=function(){n(!0)},r.beforeRender(n,r.beforeRenderPriorities.eleCalcs)};Rn.onUpdateEleCalcs=function(t){var e=this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[];e.push(t)};Rn.recalculateRenderedStyle=function(t,e){var r=f(function(S){return S._private.rstyle.cleanConnected},"isCleanConnected"),a=[],n=[];if(!this.destroyed){e===void 0&&(e=!0);for(var i=0;i<t.length;i++){var s=t[i],o=s._private,l=o.rstyle;s.isEdge()&&(!r(s.source())||!r(s.target()))&&(l.clean=!1),!(e&&l.clean||s.removed())&&s.pstyle("display").value!=="none"&&(o.group==="nodes"?n.push(s):a.push(s),l.clean=!0)}for(var u=0;u<n.length;u++){var h=n[u],c=h._private,v=c.rstyle,d=h.position();this.recalculateNodeLabelProjection(h),v.nodeX=d.x,v.nodeY=d.y,v.nodeW=h.pstyle("width").pfValue,v.nodeH=h.pstyle("height").pfValue}this.recalculateEdgeProjections(a);for(var g=0;g<a.length;g++){var m=a[g],y=m._private,p=y.rstyle,b=y.rscratch;p.srcX=b.arrowStartX,p.srcY=b.arrowStartY,p.tgtX=b.arrowEndX,p.tgtY=b.arrowEndY,p.midX=b.midX,p.midY=b.midY,p.labelAngle=b.labelAngle,p.sourceLabelAngle=b.sourceLabelAngle,p.targetLabelAngle=b.targetLabelAngle}}};var Pn={};Pn.updateCachedGrabbedEles=function(){var t=this.cachedZSortedEles;if(t){t.drag=[],t.nondrag=[];for(var e=[],r=0;r<t.length;r++){var a=t[r],n=a._private.rscratch;a.grabbed()&&!a.isParent()?e.push(a):n.inDragLayer?t.drag.push(a):t.nondrag.push(a)}for(var r=0;r<e.length;r++){var a=e[r];t.drag.push(a)}}};Pn.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null};Pn.getCachedZSortedEles=function(t){if(t||!this.cachedZSortedEles){var e=this.cy.mutableElements().toArray();e.sort(Du),e.interactive=e.filter(function(r){return r.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()}else e=this.cachedZSortedEles;return e};var $u={};[Tr,pn,lt,Ia,Gi,zt,Yu,Rn,Pn].forEach(function(t){Ee($u,t)});var _u={};_u.getCachedImage=function(t,e,r){var a=this,n=a.imageCache=a.imageCache||{},i=n[t];if(i)return i.image.complete||i.image.addEventListener("load",r),i.image;i=n[t]=n[t]||{};var s=i.image=new Image;s.addEventListener("load",r),s.addEventListener("error",function(){s.error=!0});var o="data:",l=t.substring(0,o.length).toLowerCase()===o;return l||(e=e==="null"?null:e,s.crossOrigin=e),s.src=t,s};var Zr={};Zr.registerBinding=function(t,e,r,a){var n=Array.prototype.slice.apply(arguments,[1]),i=this.binder(t);return i.on.apply(i,n)};Zr.binder=function(t){var e=this,r=e.cy.window(),a=t===r||t===r.document||t===r.document.body||_l(t);if(e.supportsPassiveEvents==null){var n=!1;try{var i=Object.defineProperty({},"passive",{get:f(function(){return n=!0,!0},"get")});r.addEventListener("test",null,i)}catch{}e.supportsPassiveEvents=n}var s=f(function(l,u,h){var c=Array.prototype.slice.call(arguments);return a&&e.supportsPassiveEvents&&(c[2]={capture:h??!1,passive:!1,once:!1}),e.bindings.push({target:t,args:c}),(t.addEventListener||t.on).apply(t,c),this},"on");return{on:s,addEventListener:s,addListener:s,bind:s}};Zr.nodeIsDraggable=function(t){return t&&t.isNode()&&!t.locked()&&t.grabbable()};Zr.nodeIsGrabbable=function(t){return this.nodeIsDraggable(t)&&t.interactive()};Zr.load=function(){var t=this,e=t.cy.window(),r=f(function(N){return N.selected()},"isSelected"),a=f(function(N,Y,J,q){N==null&&(N=t.cy);for(var X=0;X<Y.length;X++){var ne=Y[X];N.emit({originalEvent:J,type:ne,position:q})}}
vendor: 24,703 bytes, line 11
11,"triggerEvents"),n=f(function(N){return N.shiftKey||N.metaKey||N.ctrlKey},"isMultSelKeyDown"),i=f(function(N,Y){var J=!0;if(t.cy.hasCompoundNodes()&&N&&N.pannable())for(var q=0;Y&&q<Y.length;q++){var N=Y[q];if(N.isNode()&&N.isParent()&&!N.pannable()){J=!1;break}}else J=!0;return J},"allowPanningPassthrough"),s=f(function(N){N[0]._private.grabbed=!0},"setGrabbed"),o=f(function(N){N[0]._private.grabbed=!1},"setFreed"),l=f(function(N){N[0]._private.rscratch.inDragLayer=!0},"setInDragLayer"),u=f(function(N){N[0]._private.rscratch.inDragLayer=!1},"setOutDragLayer"),h=f(function(N){N[0]._private.rscratch.isGrabTarget=!0},"setGrabTarget"),c=f(function(N){N[0]._private.rscratch.isGrabTarget=!1},"removeGrabTarget"),v=f(function(N,Y){var J=Y.addToList,q=J.has(N);!q&&N.grabbable()&&!N.locked()&&(J.merge(N),s(N))},"addToDragList"),d=f(function(N,Y){if(N.cy().hasCompoundNodes()&&!(Y.inDragLayer==null&&Y.addToList==null)){var J=N.descendants();Y.inDragLayer&&(J.forEach(l),J.connectedEdges().forEach(l)),Y.addToList&&v(J,Y)}},"addDescendantsToDrag"),g=f(function(N,Y){Y=Y||{};var J=N.cy().hasCompoundNodes();Y.inDragLayer&&(N.forEach(l),N.neighborhood().stdFilter(function(q){return!J||q.isEdge()}).forEach(l)),Y.addToList&&N.forEach(function(q){v(q,Y)}),d(N,Y),p(N,{inDragLayer:Y.inDragLayer}),t.updateCachedGrabbedEles()},"addNodesToDrag"),m=g,y=f(function(N){N&&(t.getCachedZSortedEles().forEach(function(Y){o(Y),u(Y),c(Y)}),t.updateCachedGrabbedEles())},"freeDraggedElements"),p=f(function(N,Y){if(!(Y.inDragLayer==null&&Y.addToList==null)&&N.cy().hasCompoundNodes()){var J=N.ancestors().orphans();if(!J.same(N)){var q=J.descendants().spawnSelf().merge(J).unmerge(N).unmerge(N.descendants()),X=q.connectedEdges();Y.inDragLayer&&(X.forEach(l),q.forEach(l)),Y.addToList&&q.forEach(function(ne){v(ne,Y)})}}},"updateAncestorsInDragLayer"),b=f(function(){document.activeElement!=null&&document.activeElement.blur!=null&&document.activeElement.blur()},"blurActiveDomElement"),E=typeof MutationObserver<"u",S=typeof ResizeObserver<"u";E?(t.removeObserver=new MutationObserver(function(ee){for(var N=0;N<ee.length;N++){var Y=ee[N],J=Y.removedNodes;if(J)for(var q=0;q<J.length;q++){var X=J[q];if(X===t.container){t.destroy();break}}}}),t.container.parentNode&&t.removeObserver.observe(t.container.parentNode,{childList:!0})):t.registerBinding(t.container,"DOMNodeRemoved",function(ee){t.destroy()});var w=En(function(){t.cy.resize()},100);E&&(t.styleObserver=new MutationObserver(w),t.styleObserver.observe(t.container,{attributes:!0})),t.registerBinding(e,"resize",w),S&&(t.resizeObserver=new ResizeObserver(w),t.resizeObserver.observe(t.container));var x=f(function(N,Y){for(;N!=null;)Y(N),N=N.parentNode},"forEachUp"),T=f(function(){t.invalidateContainerClientCoordsCache()},"invalidateCoords");x(t.container,function(ee){t.registerBinding(ee,"transitionend",T),t.registerBinding(ee,"animationend",T),t.registerBinding(ee,"scroll",T)}),t.registerBinding(t.container,"contextmenu",function(ee){ee.preventDefault()});var C=f(function(){return t.selection[4]!==0},"inBoxSelection"),D=f(function(N){for(var Y=t.findContainerClientCoords(),J=Y[0],q=Y[1],X=Y[2],ne=Y[3],W=N.touches?N.touches:[N],ae=!1,me=0;me<W.length;me++){var be=W[me];if(J<=be.clientX&&be.clientX<=J+X&&q<=be.clientY&&be.clientY<=q+ne){ae=!0;break}}if(!ae)return!1;for(var ve=t.container,we=N.target,he=we.parentNode,pe=!1;he;){if(he===ve){pe=!0;break}he=he.parentNode}return!!pe},"eventInContainer");t.registerBinding(t.container,"mousedown",f(function(N){if(D(N)&&!(t.hoverData.which===1&&N.which!==1)){N.preventDefault(),b(),t.hoverData.capture=!0,t.hoverData.which=N.which;var Y=t.cy,J=[N.clientX,N.clientY],q=t.projectIntoViewport(J[0],J[1]),X=t.selection,ne=t.findNearestElements(q[0],q[1],!0,!1),W=ne[0],ae=t.dragData.possibleDragElements;t.hoverData.mdownPos=q,t.hoverData.mdownGPos=J;var me=f(function(){t.hoverData.tapholdCancelled=!1,clearTimeout(t.hoverData.tapholdTimeout),t.hoverData.tapholdTimeout=setTimeout(function(){if(!t.hoverData.tapholdCancelled){var Ge=t.hoverData.down;Ge?Ge.emit({originalEvent:N,type:"taphold",position:{x:q[0],y:q[1]}}):Y.emit({originalEvent:N,type:"taphold",position:{x:q[0],y:q[1]}})}},t.tapholdDuration)},"checkForTaphold");if(N.which==3){t.hoverData.cxtStarted=!0;var be={originalEvent:N,type:"cxttapstart",position:{x:q[0],y:q[1]}};W?(W.activate(),W.emit(be),t.hoverData.down=W):Y.emit(be),t.hoverData.downTime=new Date().getTime(),t.hoverData.cxtDragged=!1}else if(N.which==1){W&&W.activate();{if(W!=null&&t.nodeIsGrabbable(W)){var ve=f(function(Ge){return{originalEvent:N,type:Ge,position:{x:q[0],y:q[1]}}},"makeEvent"),we=f(function(Ge){Ge.emit(ve("grab"))},"triggerGrab");if(h(W),!W.selected())ae=t.dragData.possibleDragElements=Y.collection(),m(W,{addToList:ae}),W.emit(ve("grabon")).emit(ve("grab"));else{ae=t.dragData.possibleDragElements=Y.collection();var he=Y.$(function(pe){return pe.isNode()&&pe.selected()&&t.nodeIsGrabbable(pe)});g(he,{addToList:ae}),W.emit(ve("grabon")),he.forEach(we)}t.redrawHint("eles",!0),t.redrawHint("drag",!0)}t.hoverData.down=W,t.hoverData.downs=ne,t.hoverData.downTime=new Date().getTime()}a(W,["mousedown","tapstart","vmousedown"],N,{x:q[0],y:q[1]}),W==null?(X[4]=1,t.data.bgActivePosistion={x:q[0],y:q[1]},t.redrawHint("select",!0),t.redraw()):W.pannable()&&(X[4]=1),me()}X[0]=X[2]=q[0],X[1]=X[3]=q[1]}},"mousedownHandler"),!1),t.registerBinding(e,"mousemove",f(function(N){var Y=t.hoverData.capture;if(!(!Y&&!D(N))){var J=!1,q=t.cy,X=q.zoom(),ne=[N.clientX,N.clientY],W=t.projectIntoViewport(ne[0],ne[1]),ae=t.hoverData.mdownPos,me=t.hoverData.mdownGPos,be=t.selection,ve=null;!t.hoverData.draggingEles&&!t.hoverData.dragging&&!t.hoverData.selecting&&(ve=t.findNearestElement(W[0],W[1],!0,!1));var we=t.hoverData.last,he=t.hoverData.down,pe=[W[0]-be[2],W[1]-be[3]],Ge=t.dragData.possibleDragElements,ke;if(me){var ft=ne[0]-me[0],Qe=ft*ft,Ye=ne[1]-me[1],vt=Ye*Ye,Je=Qe+vt;t.hoverData.isOverThresholdDrag=ke=Je>=t.desktopTapThreshold2}var ht=n(N);ke&&(t.hoverData.tapholdCancelled=!0);var Tt=f(function(){var kt=t.hoverData.dragDelta=t.hoverData.dragDelta||[];kt.length===0?(kt.push(pe[0]),kt.push(pe[1])):(kt[0]+=pe[0],kt[1]+=pe[1])},"updateDragDelta");J=!0,a(ve,["mousemove","vmousemove","tapdrag"],N,{x:W[0],y:W[1]});var bt=f(function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||q.emit({originalEvent:N,type:"boxstart",position:{x:W[0],y:W[1]}}),be[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()},"goIntoBoxMode");if(t.hoverData.which===3){if(ke){var dt={originalEvent:N,type:"cxtdrag",position:{x:W[0],y:W[1]}};he?he.emit(dt):q.emit(dt),t.hoverData.cxtDragged=!0,(!t.hoverData.cxtOver||ve!==t.hoverData.cxtOver)&&(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit({originalEvent:N,type:"cxtdragout",position:{x:W[0],y:W[1]}}),t.hoverData.cxtOver=ve,ve&&ve.emit({originalEvent:N,type:"cxtdragover",position:{x:W[0],y:W[1]}}))}}else if(t.hoverData.dragging){if(J=!0,q.panningEnabled()&&q.userPanningEnabled()){var It;if(t.hoverData.justStartedPan){var Ut=t.hoverData.mdownPos;It={x:(W[0]-Ut[0])*X,y:(W[1]-Ut[1])*X},t.hoverData.justStartedPan=!1}else It={x:pe[0]*X,y:pe[1]*X};q.panBy(It),q.emit("dragpan"),t.hoverData.dragged=!0}W=t.projectIntoViewport(N.clientX,N.clientY)}else if(be[4]==1&&(he==null||he.pannable())){if(ke){if(!t.hoverData.dragging&&q.boxSelectionEnabled()&&(ht||!q.panningEnabled()||!q.userPanningEnabled()))bt();else if(!t.hoverData.selecting&&q.panningEnabled()&&q.userPanningEnabled()){var Ct=i(he,t.hoverData.downs);Ct&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,be[4]=0,t.data.bgActivePosistion=kr(ae),t.redrawHint("select",!0),t.redraw())}he&&he.pannable()&&he.active()&&he.unactivate()}}else{if(he&&he.pannable()&&he.active()&&he.unactivate(),(!he||!he.grabbed())&&ve!=we&&(we&&a(we,["mouseout","tapdragout"],N,{x:W[0],y:W[1]}),ve&&a(ve,["mouseover","tapdragover"],N,{x:W[0],y:W[1]}),t.hoverData.last=ve),he)if(ke){if(q.boxSelectionEnabled()&&ht)he&&he.grabbed()&&(y(Ge),he.emit("freeon"),Ge.emit("free"),t.dragData.didDrag&&(he.emit("dragfreeon"),Ge.emit("dragfree"))),bt();else if(he&&he.grabbed()&&t.nodeIsDraggable(he)){var $e=!t.dragData.didDrag;$e&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||g(Ge,{inDragLayer:!0});var Ke={x:0,y:0};if(oe(pe[0])&&oe(pe[1])&&(Ke.x+=pe[0],Ke.y+=pe[1],$e)){var nt=t.hoverData.dragDelta;nt&&oe(nt[0])&&oe(nt[1])&&(Ke.x+=nt[0],Ke.y+=nt[1])}t.hoverData.draggingEles=!0,Ge.silentShift(Ke).emit("position drag"),t.redrawHint("drag",!0),t.redraw()}}else Tt();J=!0}if(be[2]=W[0],be[3]=W[1],J)return N.stopPropagation&&N.stopPropagation(),N.preventDefault&&N.preventDefault(),!1}},"mousemoveHandler"),!1);var L,O,A;t.registerBinding(e,"mouseup",f(function(N){if(!(t.hoverData.which===1&&N.which!==1&&t.hoverData.capture)){var Y=t.hoverData.capture;if(Y){t.hoverData.capture=!1;var J=t.cy,q=t.projectIntoViewport(N.clientX,N.clientY),X=t.selection,ne=t.findNearestElement(q[0],q[1],!0,!1),W=t.dragData.possibleDragElements,ae=t.hoverData.down,me=n(N);if(t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,ae&&ae.unactivate(),t.hoverData.which===3){var be={originalEvent:N,type:"cxttapend",position:{x:q[0],y:q[1]}};if(ae?ae.emit(be):J.emit(be),!t.hoverData.cxtDragged){var ve={originalEvent:N,type:"cxttap",position:{x:q[0],y:q[1]}};ae?ae.emit(ve):J.emit(ve)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(t.hoverData.which===1){if(a(ne,["mouseup","tapend","vmouseup"],N,{x:q[0],y:q[1]}),!t.dragData.didDrag&&!t.hoverData.dragged&&!t.hoverData.selecting&&!t.hoverData.isOverThresholdDrag&&(a(ae,["click","tap","vclick"],N,{x:q[0],y:q[1]}),O=!1,N.timeStamp-A<=J.multiClickDebounceTime()?(L&&clearTimeout(L),O=!0,A=null,a(ae,["dblclick","dbltap","vdblclick"],N,{x:q[0],y:q[1]})):(L=setTimeout(function(){O||a(ae,["oneclick","onetap","voneclick"],N,{x:q[0],y:q[1]})},J.multiClickDebounceTime()),A=N.timeStamp)),ae==null&&!t.dragData.didDrag&&!t.hoverData.selecting&&!t.hoverData.dragged&&!n(N)&&(J.$(r).unselect(["tapunselect"]),W.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=W=J.collection()),ne==ae&&!t.dragData.didDrag&&!t.hoverData.selecting&&ne!=null&&ne._private.selectable&&(t.hoverData.dragging||(J.selectionType()==="additive"||me?ne.selected()?ne.unselect(["tapunselect"]):ne.select(["tapselect"]):me||(J.$(r).unmerge(ne).unselect(["tapunselect"]),ne.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var we=J.collection(t.getAllInBox(X[0],X[1],X[2],X[3]));t.redrawHint("select",!0),we.length>0&&t.redrawHint("eles",!0),J.emit({type:"boxend",originalEvent:N,position:{x:q[0],y:q[1]}});var he=f(function(ke){return ke.selectable()&&!ke.selected()},"eleWouldBeSelected");J.selectionType()==="additive"||me||J.$(r).unmerge(we).unselect(),we.emit("box").stdFilter(he).select().emit("boxselect"),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!X[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var pe=ae&&ae.grabbed();y(W),pe&&(ae.emit("freeon"),W.emit("free"),t.dragData.didDrag&&(ae.emit("dragfreeon"),W.emit("dragfree")))}}X[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null}}},"mouseupHandler"),!1);var I=f(function(N){if(!t.scrollingPage){var Y=t.cy,J=Y.zoom(),q=Y.pan(),X=t.projectIntoViewport(N.clientX,N.clientY),ne=[X[0]*J+q.x,X[1]*J+q.y];if(t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.cxtStarted||C()){N.preventDefault();return}if(Y.panningEnabled()&&Y.userPanningEnabled()&&Y.zoomingEnabled()&&Y.userZoomingEnabled()){N.preventDefault(),t.data.wheelZooming=!0,clearTimeout(t.data.wheelTimeout),t.data.wheelTimeout=setTimeout(function(){t.data.wheelZooming=!1,t.redrawHint("eles",!0),t.redraw()},150);var W;N.deltaY!=null?W=N.deltaY/-250:N.wheelDeltaY!=null?W=N.wheelDeltaY/1e3:W=N.wheelDelta/1e3,W=W*t.wheelSensitivity;var ae=N.deltaMode===1;ae&&(W*=33);var me=Y.zoom()*Math.pow(10,W);N.type==="gesturechange"&&(me=t.gestureStartZoom*N.scale),Y.zoom({level:me,renderedPosition:{x:ne[0],y:ne[1]}}),Y.emit(N.type==="gesturechange"?"pinchzoom":"scrollzoom")}}},"wheelHandler");t.registerBinding(t.container,"wheel",I,!0),t.registerBinding(e,"scroll",f(function(N){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},"scrollHandler"),!0),t.registerBinding(t.container,"gesturestart",f(function(N){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||N.preventDefault()},"gestureStartHandler"),!0),t.registerBinding(t.container,"gesturechange",function(ee){t.hasTouchStarted||I(ee)},!0),t.registerBinding(t.container,"mouseout",f(function(N){var Y=t.projectIntoViewport(N.clientX,N.clientY);t.cy.emit({originalEvent:N,type:"mouseout",position:{x:Y[0],y:Y[1]}})},"mouseOutHandler"),!1),t.registerBinding(t.container,"mouseover",f(function(N){var Y=t.projectIntoViewport(N.clientX,N.clientY);t.cy.emit({originalEvent:N,type:"mouseover",position:{x:Y[0],y:Y[1]}})},"mouseOverHandler"),!1);var M,P,R,k,B,F,U,V,G,$,j,Q,H,te=f(function(N,Y,J,q){return Math.sqrt((J-N)*(J-N)+(q-Y)*(q-Y))},"distance"),_=f(function(N,Y,J,q){return(J-N)*(J-N)+(q-Y)*(q-Y)},"distanceSq"),z;t.registerBinding(t.container,"touchstart",z=f(function(N){if(t.hasTouchStarted=!0,!!D(N)){b(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var Y=t.cy,J=t.touchData.now,q=t.touchData.earlier;if(N.touches[0]){var X=t.projectIntoViewport(N.touches[0].clientX,N.touches[0].clientY);J[0]=X[0],J[1]=X[1]}if(N.touches[1]){var X=t.projectIntoViewport(N.touches[1].clientX,N.touches[1].clientY);J[2]=X[0],J[3]=X[1]}if(N.touches[2]){var X=t.projectIntoViewport(N.touches[2].clientX,N.touches[2].clientY);J[4]=X[0],J[5]=X[1]}if(N.touches[1]){t.touchData.singleTouchMoved=!0,y(t.dragData.touchDragEles);var ne=t.findContainerClientCoords();G=ne[0],$=ne[1],j=ne[2],Q=ne[3],M=N.touches[0].clientX-G,P=N.touches[0].clientY-$,R=N.touches[1].clientX-G,k=N.touches[1].clientY-$,H=0<=M&&M<=j&&0<=R&&R<=j&&0<=P&&P<=Q&&0<=k&&k<=Q;var W=Y.pan(),ae=Y.zoom();B=te(M,P,R,k),F=_(M,P,R,k),U=[(M+R)/2,(P+k)/2],V=[(U[0]-W.x)/ae,(U[1]-W.y)/ae];var me=200,be=me*me;if(F<be&&!N.touches[2]){var ve=t.findNearestElement(J[0],J[1],!0,!0),we=t.findNearestElement(J[2],J[3],!0,!0);ve&&ve.isNode()?(ve.activate().emit({originalEvent:N,type:"cxttapstart",position:{x:J[0],y:J[1]}}),t.touchData.start=ve):we&&we.isNode()?(we.activate().emit({originalEvent:N,type:"cxttapstart",position:{x:J[0],y:J[1]}}),t.touchData.start=we):Y.emit({originalEvent:N,type:"cxttapstart",position:{x:J[0],y:J[1]}}),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!0,t.touchData.cxtDragged=!1,t.data.bgActivePosistion=void 0,t.redraw();return}}if(N.touches[2])Y.boxSelectionEnabled()&&N.preventDefault();else if(!N.touches[1]){if(N.touches[0]){var he=t.findNearestElements(J[0],J[1],!0,!0),pe=he[0];if(pe!=null&&(pe.activate(),t.touchData.start=pe,t.touchData.starts=he,t.nodeIsGrabbable(pe))){var Ge=t.dragData.touchDragEles=Y.collection(),ke=null;t.redrawHint("eles",!0),t.redrawHint("drag",!0),pe.selected()?(ke=Y.$(function(Je){return Je.selected()&&t.nodeIsGrabbable(Je)}),g(ke,{addToList:Ge})):m(pe,{addToList:Ge}),h(pe);var ft=f(function(ht){return{originalEvent:N,type:ht,position:{x:J[0],y:J[1]}}},"makeEvent");pe.emit(ft("grabon")),ke?ke.forEach(function(Je){Je.emit(ft("grab"))}):pe.emit(ft("grab"))}a(pe,["touchstart","tapstart","vmousedown"],N,{x:J[0],y:J[1]}),pe==null&&(t.data.bgActivePosistion={x:X[0],y:X[1]},t.redrawHint("select",!0),t.redraw()),t.touchData.singleTouchMoved=!1,t.touchData.singleTouchStartTime=+new Date,clearTimeout(t.touchData.tapholdTimeout),t.touchData.tapholdTimeout=setTimeout(function(){t.touchData.singleTouchMoved===!1&&!t.pinching&&!t.touchData.selecting&&a(t.touchData.start,["taphold"],N,{x:J[0],y:J[1]})},t.tapholdDuration)}}if(N.touches.length>=1){for(var Qe=t.touchData.startPosition=[null,null,null,null,null,null],Ye=0;Ye<J.length;Ye++)Qe[Ye]=q[Ye]=J[Ye];var vt=N.touches[0];t.touchData.startGPosition=[vt.clientX,vt.clientY]}}},"touchstartHandler"),!1);var Z;t.registerBinding(e,"touchmove",Z=f(function(N){var Y=t.touchData.capture;if(!(!Y&&!D(N))){var J=t.selection,q=t.cy,X=t.touchData.now,ne=t.touchData.earlier,W=q.zoom();if(N.touches[0]){var ae=t.projectIntoViewport(N.touches[0].clientX,N.touches[0].clientY);X[0]=ae[0],X[1]=ae[1]}if(N.touches[1]){var ae=t.projectIntoViewport(N.touches[1].clientX,N.touches[1].clientY);X[2]=ae[0],X[3]=ae[1]}if(N.touches[2]){var ae=t.projectIntoViewport(N.touches[2].clientX,N.touches[2].clientY);X[4]=ae[0],X[5]=ae[1]}var me=t.touchData.startGPosition,be;if(Y&&N.touches[0]&&me){for(var ve=[],we=0;we<X.length;we++)ve[we]=X[we]-ne[we];var he=N.touches[0].clientX-me[0],pe=he*he,Ge=N.touches[0].clientY-me[1],ke=Ge*Ge,ft=pe+ke;be=ft>=t.touchTapThreshold2}if(Y&&t.touchData.cxt){N.preventDefault();var Qe=N.touches[0].clientX-G,Ye=N.touches[0].clientY-$,vt=N.touches[1].clientX-G,Je=N.touches[1].clientY-$,ht=_(Qe,Ye,vt,Je),Tt=ht/F,bt=150,dt=bt*bt,It=1.5,Ut=It*It;if(Tt>=Ut||ht>=dt){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var Ct={originalEvent:N,type:"cxttapend",position:{x:X[0],y:X[1]}};t.touchData.start?(t.touchData.start.unactivate().emit(Ct),t.touchData.start=null):q.emit(Ct)}}if(Y&&t.touchData.cxt){var Ct={originalEvent:N,type:"cxtdrag",position:{x:X[0],y:X[1]}};t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(Ct):q.emit(Ct),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var $e=t.findNearestElement(X[0],X[1],!0,!0);(!t.touchData.cxtOver||$e!==t.touchData.cxtOver)&&(t.touchData.cxtOver&&t.touchData.cxtOver.emit({originalEvent:N,type:"cxtdragout",position:{x:X[0],y:X[1]}}),t.touchData.cxtOver=$e,$e&&$e.emit({originalEvent:N,type:"cxtdragover",position:{x:X[0],y:X[1]}}))}else if(Y&&N.touches[2]&&q.boxSelectionEnabled())N.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||q.emit({originalEvent:N,type:"boxstart",position:{x:X[0],y:X[1]}}),t.touchData.selecting=!0,t.touchData.didSelect=!0,J[4]=1,!J||J.length===0||J[0]===void 0?(J[0]=(X[0]+X[2]+X[4])/3,J[1]=(X[1]+X[3]+X[5])/3,J[2]=(X[0]+X[2]+X[4])/3+1,J[3]=(X[1]+X[3]+X[5])/3+1):(J[2]=(X[0]+X[2]+X[4])/3,J[3]=(X[1]+X[3]+X[5])/3),t.redrawHint("select",!0),t.redraw();else if(Y&&N.touches[1]&&!t.touchData.didSelect&&q.zoomingEnabled()&&q.panningEnabled()&&q.userZoomingEnabled()&&q.userPanningEnabled()){N.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var Ke=t.dragData.touchDragEles;if(Ke){t.redrawHint("drag",!0);for(var nt=0;nt<Ke.length;nt++){var Dr=Ke[nt]._private;Dr.grabbed=!1,Dr.rscratch.inDragLayer=!1}}var kt=t.touchData.start,Qe=N.touches[0].clientX-G,Ye=N.touches[0].clientY-$,vt=N.touches[1].clientX-G,Je=N.touches[1].clientY-$,Hi=te(Qe,Ye,vt,Je),dl=Hi/B;if(H){var gl=Qe-M,pl=Ye-P,yl=vt-R,ml=Je-k,bl=(gl+yl)/2,El=(pl+ml)/2,jr=q.zoom(),Bn=jr*dl,Ga=q.pan(),Xi=V[0]*jr+Ga.x,qi=V[1]*jr+Ga.y,wl={x:-Bn/jr*(Xi-Ga.x-bl)+Xi,y:-Bn/jr*(qi-Ga.y-El)+qi};if(kt&&kt.active()){var Ke=t.dragData.touchDragEles;y(Ke),t.redrawHint("drag",!0),t.redrawHint("eles",!0),kt.unactivate().emit("freeon"),Ke.emit("free"),t.dragData.didDrag&&(kt.emit("dragfreeon"),Ke.emit("dragfree"))}q.viewport({zoom:Bn,pan:wl,cancelOnFailedZoom:!0}),q.emit("pinchzoom"),B=Hi,M=Qe,P=Ye,R=vt,k=Je,t.pinching=!0}if(N.touches[0]){var ae=t.projectIntoViewport(N.touches[0].clientX,N.touches[0].clientY);X[0]=ae[0],X[1]=ae[1]}if(N.touches[1]){var ae=t.projectIntoViewport(N.touches[1].clientX,N.touches[1].clientY);X[2]=ae[0],X[3]=ae[1]}if(N.touches[2]){var ae=t.projectIntoViewport(N.touches[2].clientX,N.touches[2].clientY);X[4]=ae[0],X[5]=ae[1]}}else if(N.touches[0]&&!t.touchData.didSelect){var Dt=t.touchData.start,Fn=t.touchData.last,$e;if(!t.hoverData.draggingEles&&!t.swipePanning&&($e=t.findNearestElement(X[0],X[1],!0,!0)),Y&&Dt!=null&&N.preventDefault(),Y&&Dt!=null&&t.nodeIsDraggable(Dt))if(be){var Ke=t.dragData.touchDragEles,Wi=!t.dragData.didDrag;Wi&&g(Ke,{inDragLayer:!0}),t.dragData.didDrag=!0;var ea={x:0,y:0};if(oe(ve[0])&&oe(ve[1])&&(ea.x+=ve[0],ea.y+=ve[1],Wi)){t.redrawHint("eles",!0);var St=t.touchData.dragDelta;St&&oe(St[0])&&oe(St[1])&&(ea.x+=St[0],ea.y+=St[1])}t.hoverData.draggingEles=!0,Ke.silentShift(ea).emit("position drag"),t.redrawHint("drag",!0),t.touchData.startPosition[0]==ne[0]&&t.touchData.startPosition[1]==ne[1]&&t.redrawHint("eles",!0),t.redraw()}else{var St=t.touchData.dragDelta=t.touchData.dragDelta||[];St.length===0?(St.push(ve[0]),St.push(ve[1])):(St[0]+=ve[0],St[1]+=ve[1])}if(a(Dt||$e,["touchmove","tapdrag","vmousemove"],N,{x:X[0],y:X[1]}),(!Dt||!Dt.grabbed())&&$e!=Fn&&(Fn&&Fn.emit({originalEvent:N,type:"tapdragout",position:{x:X[0],y:X[1]}}),$e&&$e.emit({originalEvent:N,type:"tapdragover",position:{x:X[0],y:X[1]}})),t.touchData.last=$e,Y)for(var nt=0;nt<X.length;nt++)X[nt]&&t.touchData.startPosition[nt]&&be&&(t.touchData.singleTouchMoved=!0);if(Y&&(Dt==null||Dt.pannable())&&q.panningEnabled()&&q.userPanningEnabled()){var xl=i(Dt,t.touchData.starts);xl&&(N.preventDefault(),t.data.bgActivePosistion||(t.data.bgActivePosistion=kr(t.touchData.startPosition)),t.swipePanning?(q.panBy({x:ve[0]*W,y:ve[1]*W}),q.emit("dragpan")):be&&(t.swipePanning=!0,q.panBy({x:he*W,y:Ge*W}),q.emit("dragpan"),Dt&&(Dt.unactivate(),t.redrawHint("select",!0),t.touchData.start=null)));var ae=t.projectIntoViewport(N.touches[0].clientX,N.touches[0].clientY);X[0]=ae[0],X[1]=ae[1]}}for(var we=0;we<X.length;we++)ne[we]=X[we];Y&&N.touches.length>0&&!t.hoverData.draggingEles&&!t.swipePanning&&t.data.bgActivePosistion!=null&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},"touchmoveHandler"),!1);var K;t.registerBinding(e,"touchcancel",K=f(function(N){var Y=t.touchData.start;t.touchData.capture=!1,Y&&Y.unactivate()},"touchcancelHandler"));var ie,de,re,se;if(t.registerBinding(e,"touchend",ie=f(function(N){var Y=t.touchData.start,J=t.touchData.capture;if(J)N.touches.length===0&&(t.touchData.capture=!1),N.preventDefault();else return;var q=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var X=t.cy,ne=X.zoom(),W=t.touchData.now,ae=t.touchData.earlier;if(N.touches[0]){var me=t.projectIntoViewport(N.touches[0].clientX,N.touches[0].clientY);W[0]=me[0],W[1]=me[1]}if(N.touches[1]){var me=t.projectIntoViewport(N.touches[1].clientX,N.touches[1].clientY);W[2]=me[0],W[3]=me[1]}if(N.touches[2]){var me=t.projectIntoViewport(N.touches[2].clientX,N.touches[2].clientY);W[4]=me[0],W[5]=me[1]}Y&&Y.unactivate();var be;if(t.touchData.cxt){if(be={originalEvent:N,type:"cxttapend",position:{x:W[0],y:W[1]}},Y?Y.emit(be):X.emit(be),!t.touchData.cxtDragged){var ve={originalEvent:N,type:"cxttap",position:{x:W[0],y:W[1]}};Y?Y.emit(ve):X.emit(ve)}t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,t.redraw();return}if(!N.touches[2]&&X.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var we=X.collection(t.getAllInBox(q[0],q[1],q[2],q[3]));q[0]=void 0,q[1]=void 0,q[2]=void 0,q[3]=void 0,q[4]=0,t.redrawHint("select",!0),X.emit({type:"boxend",originalEvent:N,position:{x:W[0],y:W[1]}});var he=f(function(dt){return dt.selectable()&&!dt.selected()},"eleWouldBeSelected");we.emit("box").stdFilter(he).select().emit("boxselect"),we.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(Y?.unactivate(),N.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(!N.touches[1]){if(!N.touches[0]){if(!N.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var pe=t.dragData.touchDragEles;if(Y!=null){var Ge=Y._private.grabbed;y(pe),t.redrawHint("drag",!0),t.redrawHint("eles",!0),Ge&&(Y.emit("freeon"),pe.emit("free"),t.dragData.didDrag&&(Y.emit("dragfreeon"),pe.emit("dragfree"))),a(Y,["touchend","tapend","vmouseup","tapdragout"],N,{x:W[0],y:W[1]}),Y.unactivate(),t.touchData.start=null}else{var ke=t.findNearestElement(W[0],W[1],!0,!0);a(ke,["touchend","tapend","vmouseup","tapdragout"],N,{x:W[0],y:W[1]})}var ft=t.touchData.startPosition[0]-W[0],Qe=ft*ft,Ye=t.touchData.startPosition[1]-W[1],vt=Ye*Ye,Je=Qe+vt,ht=Je*ne*ne;t.touchData.singleTouchMoved||(Y||X.$(":selected").unselect(["tapunselect"]),a(Y,["tap","vclick"],N,{x:W[0],y:W[1]}),de=!1,N.timeStamp-se<=X.multiClickDebounceTime()?(re&&clearTimeout(re),de=!0,se=null,a(Y,["dbltap","vdblclick"],N,{x:W[0],y:W[1]}
vendor: 13,472 bytes, line 11
11)):(re=setTimeout(function(){de||a(Y,["onetap","voneclick"],N,{x:W[0],y:W[1]})},X.multiClickDebounceTime()),se=N.timeStamp)),Y!=null&&!t.dragData.didDrag&&Y._private.selectable&&ht<t.touchTapThreshold2&&!t.pinching&&(X.selectionType()==="single"?(X.$(r).unmerge(Y).unselect(["tapunselect"]),Y.select(["tapselect"])):Y.selected()?Y.unselect(["tapunselect"]):Y.select(["tapselect"]),t.redrawHint("eles",!0)),t.touchData.singleTouchMoved=!0}}}for(var Tt=0;Tt<W.length;Tt++)ae[Tt]=W[Tt];t.dragData.didDrag=!1,N.touches.length===0&&(t.touchData.dragDelta=[],t.touchData.startPosition=[null,null,null,null,null,null],t.touchData.startGPosition=null,t.touchData.didSelect=!1),N.touches.length<2&&(N.touches.length===1&&(t.touchData.startGPosition=[N.touches[0].clientX,N.touches[0].clientY]),t.pinching=!1,t.redrawHint("eles",!0),t.redraw())},"touchendHandler"),!1),typeof TouchEvent>"u"){var le=[],ce=f(function(N){return{clientX:N.clientX,clientY:N.clientY,force:1,identifier:N.pointerId,pageX:N.pageX,pageY:N.pageY,radiusX:N.width/2,radiusY:N.height/2,screenX:N.screenX,screenY:N.screenY,target:N.target}},"makeTouch"),ue=f(function(N){return{event:N,touch:ce(N)}},"makePointer"),ye=f(function(N){le.push(ue(N))},"addPointer"),Oe=f(function(N){for(var Y=0;Y<le.length;Y++){var J=le[Y];if(J.event.pointerId===N.pointerId){le.splice(Y,1);return}}},"removePointer"),Te=f(function(N){var Y=le.filter(function(J){return J.event.pointerId===N.pointerId})[0];Y.event=N,Y.touch=ce(N)},"updatePointer"),xe=f(function(N){N.touches=le.map(function(Y){return Y.touch})},"addTouchesToEvent"),Se=f(function(N){return N.pointerType==="mouse"||N.pointerType===4},"pointerIsMouse");t.registerBinding(t.container,"pointerdown",function(ee){Se(ee)||(ee.preventDefault(),ye(ee),xe(ee),z(ee))}),t.registerBinding(t.container,"pointerup",function(ee){Se(ee)||(Oe(ee),xe(ee),ie(ee))}),t.registerBinding(t.container,"pointercancel",function(ee){Se(ee)||(Oe(ee),xe(ee),K(ee))}),t.registerBinding(t.container,"pointermove",function(ee){Se(ee)||(ee.preventDefault(),Te(ee),xe(ee),Z(ee))})}};var Wt={};Wt.generatePolygon=function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,draw:f(function(a,n,i,s,o,l){this.renderer.nodeShapeImpl("polygon",a,n,i,s,o,this.points)},"draw"),intersectLine:f(function(a,n,i,s,o,l,u,h){return Ea(o,l,this.points,a,n,i/2,s/2,u)},"intersectLine"),checkPoint:f(function(a,n,i,s,o,l,u,h){return Ht(a,n,this.points,l,u,s,o,[0,-1],i)},"checkPoint")}};Wt.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:f(function(e,r,a,n,i,s){this.renderer.nodeShapeImpl(this.name,e,r,a,n,i)},"draw"),intersectLine:f(function(e,r,a,n,i,s,o,l){return Gh(i,s,e,r,a/2+o,n/2+o)},"intersectLine"),checkPoint:f(function(e,r,a,n,i,s,o,l){return gr(e,r,n,i,s,o,a)},"checkPoint")}};Wt.generateRoundPolygon=function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,getOrCreateCorners:f(function(a,n,i,s,o,l,u){if(l[u]!==void 0&&l[u+"-cx"]===a&&l[u+"-cy"]===n)return l[u];l[u]=new Array(e.length/2),l[u+"-cx"]=a,l[u+"-cy"]=n;var h=i/2,c=s/2;o=o==="auto"?qo(i,s):o;for(var v=new Array(e.length/2),d=0;d<e.length/2;d++)v[d]={x:a+h*e[d*2],y:n+c*e[d*2+1]};var g,m,y,p,b=v.length;for(m=v[b-1],g=0;g<b;g++)y=v[g%b],p=v[(g+1)%b],l[u][g]=Fi(m,y,p,o),m=y,y=p;return l[u]},"getOrCreateCorners"),draw:f(function(a,n,i,s,o,l,u){this.renderer.nodeShapeImpl("round-polygon",a,n,i,s,o,this.points,this.getOrCreateCorners(n,i,s,o,l,u,"drawCorners"))},"draw"),intersectLine:f(function(a,n,i,s,o,l,u,h,c){return zh(o,l,this.points,a,n,i,s,u,this.getOrCreateCorners(a,n,i,s,h,c,"corners"))},"intersectLine"),checkPoint:f(function(a,n,i,s,o,l,u,h,c){return Fh(a,n,this.points,l,u,s,o,this.getOrCreateCorners(l,u,s,o,h,c,"corners"))},"checkPoint")}};Wt.generateRoundRectangle=function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:ct(4,0),draw:f(function(e,r,a,n,i,s){this.renderer.nodeShapeImpl(this.name,e,r,a,n,i,this.points,s)},"draw"),intersectLine:f(function(e,r,a,n,i,s,o,l){return Ho(i,s,e,r,a,n,o,l)},"intersectLine"),checkPoint:f(function(e,r,a,n,i,s,o,l){var u=n/2,h=i/2;l=l==="auto"?br(n,i):l,l=Math.min(u,h,l);var c=l*2;return!!(Ht(e,r,this.points,s,o,n,i-c,[0,-1],a)||Ht(e,r,this.points,s,o,n-c,i,[0,-1],a)||gr(e,r,c,c,s-u+l,o-h+l,a)||gr(e,r,c,c,s+u-l,o-h+l,a)||gr(e,r,c,c,s+u-l,o+h-l,a)||gr(e,r,c,c,s-u+l,o+h-l,a))},"checkPoint")}};Wt.generateCutRectangle=function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:Di(),points:ct(4,0),draw:f(function(e,r,a,n,i,s){this.renderer.nodeShapeImpl(this.name,e,r,a,n,i,null,s)},"draw"),generateCutTrianglePts:f(function(e,r,a,n,i){var s=i==="auto"?this.cornerLength:i,o=r/2,l=e/2,u=a-l,h=a+l,c=n-o,v=n+o;return{topLeft:[u,c+s,u+s,c,u+s,c+s],topRight:[h-s,c,h,c+s,h-s,c+s],bottomRight:[h,v-s,h-s,v,h-s,v-s],bottomLeft:[u+s,v,u,v-s,u+s,v-s]}},"generateCutTrianglePts"),intersectLine:f(function(e,r,a,n,i,s,o,l){var u=this.generateCutTrianglePts(a+2*o,n+2*o,e,r,l),h=[].concat.apply([],[u.topLeft.splice(0,4),u.topRight.splice(0,4),u.bottomRight.splice(0,4),u.bottomLeft.splice(0,4)]);return Ea(i,s,h,e,r)},"intersectLine"),checkPoint:f(function(e,r,a,n,i,s,o,l){var u=l==="auto"?this.cornerLength:l;if(Ht(e,r,this.points,s,o,n,i-2*u,[0,-1],a)||Ht(e,r,this.points,s,o,n-2*u,i,[0,-1],a))return!0;var h=this.generateCutTrianglePts(n,i,s,o);return gt(e,r,h.topLeft)||gt(e,r,h.topRight)||gt(e,r,h.bottomRight)||gt(e,r,h.bottomLeft)},"checkPoint")}};Wt.generateBarrel=function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:ct(4,0),draw:f(function(e,r,a,n,i,s){this.renderer.nodeShapeImpl(this.name,e,r,a,n,i)},"draw"),intersectLine:f(function(e,r,a,n,i,s,o,l){var u=.15,h=.5,c=.85,v=this.generateBarrelBezierPts(a+2*o,n+2*o,e,r),d=f(function(y){var p=Pr({x:y[0],y:y[1]},{x:y[2],y:y[3]},{x:y[4],y:y[5]},u),b=Pr({x:y[0],y:y[1]},{x:y[2],y:y[3]},{x:y[4],y:y[5]},h),E=Pr({x:y[0],y:y[1]},{x:y[2],y:y[3]},{x:y[4],y:y[5]},c);return[y[0],y[1],p.x,p.y,b.x,b.y,E.x,E.y,y[4],y[5]]},"approximateBarrelCurvePts"),g=[].concat(d(v.topLeft),d(v.topRight),d(v.bottomRight),d(v.bottomLeft));return Ea(i,s,g,e,r)},"intersectLine"),generateBarrelBezierPts:f(function(e,r,a,n){var i=r/2,s=e/2,o=a-s,l=a+s,u=n-i,h=n+i,c=ti(e,r),v=c.heightOffset,d=c.widthOffset,g=c.ctrlPtOffsetPct*e,m={topLeft:[o,u+v,o+g,u,o+d,u],topRight:[l-d,u,l-g,u,l,u+v],bottomRight:[l,h-v,l-g,h,l-d,h],bottomLeft:[o+d,h,o+g,h,o,h-v]};return m.topLeft.isTop=!0,m.topRight.isTop=!0,m.bottomLeft.isBottom=!0,m.bottomRight.isBottom=!0,m},"generateBarrelBezierPts"),checkPoint:f(function(e,r,a,n,i,s,o,l){var u=ti(n,i),h=u.heightOffset,c=u.widthOffset;if(Ht(e,r,this.points,s,o,n,i-2*h,[0,-1],a)||Ht(e,r,this.points,s,o,n-2*c,i,[0,-1],a))return!0;for(var v=this.generateBarrelBezierPts(n,i,s,o),d=f(function(C,D,L){var O=L[4],A=L[2],I=L[0],M=L[5],P=L[1],R=Math.min(O,I),k=Math.max(O,I),B=Math.min(M,P),F=Math.max(M,P);if(R<=C&&C<=k&&B<=D&&D<=F){var U=Vh(O,A,I),V=kh(U[0],U[1],U[2],C),G=V.filter(function($){return 0<=$&&$<=1});if(G.length>0)return G[0]}return null},"getCurveT"),g=Object.keys(v),m=0;m<g.length;m++){var y=g[m],p=v[y],b=d(e,r,p);if(b!=null){var E=p[5],S=p[3],w=p[1],x=Ze(E,S,w,b);if(p.isTop&&x<=r||p.isBottom&&r<=x)return!0}}return!1},"checkPoint")}};Wt.generateBottomRoundrectangle=function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:ct(4,0),draw:f(function(e,r,a,n,i,s){this.renderer.nodeShapeImpl(this.name,e,r,a,n,i,this.points,s)},"draw"),intersectLine:f(function(e,r,a,n,i,s,o,l){var u=e-(a/2+o),h=r-(n/2+o),c=h,v=e+(a/2+o),d=jt(i,s,e,r,u,h,v,c,!1);return d.length>0?d:Ho(i,s,e,r,a,n,o,l)},"intersectLine"),checkPoint:f(function(e,r,a,n,i,s,o,l){l=l==="auto"?br(n,i):l;var u=2*l;if(Ht(e,r,this.points,s,o,n,i-u,[0,-1],a)||Ht(e,r,this.points,s,o,n-u,i,[0,-1],a))return!0;var h=n/2+2*a,c=i/2+2*a,v=[s-h,o-c,s-h,o,s+h,o,s+h,o-c];return!!(gt(e,r,v)||gr(e,r,u,u,s+n/2-l,o+i/2-l,a)||gr(e,r,u,u,s-n/2+l,o+i/2-l,a))},"checkPoint")}};Wt.registerNodeShapes=function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",ct(3,0)),this.generateRoundPolygon("round-triangle",ct(3,0)),this.generatePolygon("rectangle",ct(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var r=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",r),this.generateRoundPolygon("round-diamond",r)}this.generatePolygon("pentagon",ct(5,0)),this.generateRoundPolygon("round-pentagon",ct(5,0)),this.generatePolygon("hexagon",ct(6,0)),this.generateRoundPolygon("round-hexagon",ct(6,0)),this.generatePolygon("heptagon",ct(7,0)),this.generateRoundPolygon("round-heptagon",ct(7,0)),this.generatePolygon("octagon",ct(8,0)),this.generateRoundPolygon("round-octagon",ct(8,0));var a=new Array(20);{var n=ei(5,0),i=ei(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o<i.length/2;o++)i[o*2]*=s,i[o*2+1]*=s;for(var o=0;o<20/4;o++)a[o*4]=n[o*2],a[o*4+1]=n[o*2+1],a[o*4+2]=i[o*2],a[o*4+3]=i[o*2+1]}a=Xo(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 l=[-1,-1,.25,-1,1,0,.25,1,-1,1];this.generatePolygon("tag",l),this.generateRoundPolygon("round-tag",l)}t.makePolygon=function(u){var h=u.join("$"),c="polygon-"+h,v;return(v=this[c])?v:e.generatePolygon(c,u)}};var ka={};ka.timeToRender=function(){return this.redrawTotalTime/this.redrawCount};ka.redraw=function(t){t=t||Vo();var e=this;e.averageRedrawTime===void 0&&(e.averageRedrawTime=0),e.lastRedrawTime===void 0&&(e.lastRedrawTime=0),e.lastDrawTime===void 0&&(e.lastDrawTime=0),e.requestedFrame=!0,e.renderOptions=t};ka.beforeRender=function(t,e){if(!this.destroyed){e==null&&Ve("Priority is not optional for beforeRender");var r=this.beforeRenderCallbacks;r.push({fn:t,priority:e}),r.sort(function(a,n){return n.priority-a.priority})}};var ho=f(function(e,r,a){for(var n=e.beforeRenderCallbacks,i=0;i<n.length;i++)n[i].fn(r,a)},"beforeRenderCallbacks");ka.startRenderLoop=function(){var t=this,e=t.cy;if(!t.renderLoopStarted){t.renderLoopStarted=!0;var r=f(function a(n){if(!t.destroyed){if(!e.batching())if(t.requestedFrame&&!t.skipFrame){ho(t,!0,n);var i=_t();t.render(t.renderOptions);var s=t.lastDrawTime=_t();t.averageRedrawTime===void 0&&(t.averageRedrawTime=s-i),t.redrawCount===void 0&&(t.redrawCount=0),t.redrawCount++,t.redrawTotalTime===void 0&&(t.redrawTotalTime=0);var o=s-i;t.redrawTotalTime+=o,t.lastRedrawTime=o,t.averageRedrawTime=t.averageRedrawTime/2+o/2,t.requestedFrame=!1}else ho(t,!1,n);t.skipFrame=!1,un(a)}},"renderFn");un(r)}};var wp=f(function(e){this.init(e)},"BaseRenderer"),Hu=wp,Qr=Hu.prototype;Qr.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"];Qr.init=function(t){var e=this;e.options=t,e.cy=t.cy;var r=e.container=t.cy.container(),a=e.cy.window();if(a){var n=a.document,i=n.head,s="__________cytoscape_stylesheet",o="__________cytoscape_container",l=n.getElementById(s)!=null;if(r.className.indexOf(o)<0&&(r.className=(r.className||"")+" "+o),!l){var u=n.createElement("style");u.id=s,u.textContent="."+o+" { position: relative; }",i.insertBefore(u,i.children[0])}var h=a.getComputedStyle(r),c=h.getPropertyValue("position");c==="static"&&Ne("A Cytoscape container has style position:static and so can not use UI extensions properly")}e.selection=[void 0,void 0,void 0,void 0,0],e.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],e.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},e.dragData={possibleDragElements:[]},e.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},e.redraws=0,e.showFps=t.showFps,e.debug=t.debug,e.hideEdgesOnViewport=t.hideEdgesOnViewport,e.textureOnViewport=t.textureOnViewport,e.wheelSensitivity=t.wheelSensitivity,e.motionBlurEnabled=t.motionBlur,e.forcedPixelRatio=oe(t.pixelRatio)?t.pixelRatio:null,e.motionBlur=t.motionBlur,e.motionBlurOpacity=t.motionBlurOpacity,e.motionBlurTransparency=1-e.motionBlurOpacity,e.motionBlurPxRatio=1,e.mbPxRBlurry=1,e.minMbLowQualFrames=4,e.fullQualityMb=!1,e.clearedForMotionBlur=[],e.desktopTapThreshold=t.desktopTapThreshold,e.desktopTapThreshold2=t.desktopTapThreshold*t.desktopTapThreshold,e.touchTapThreshold=t.touchTapThreshold,e.touchTapThreshold2=t.touchTapThreshold*t.touchTapThreshold,e.tapholdDuration=500,e.bindings=[],e.beforeRenderCallbacks=[],e.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},e.registerNodeShapes(),e.registerArrowShapes(),e.registerCalculationListeners()};Qr.notify=function(t,e){var r=this,a=r.cy;if(!this.destroyed){if(t==="init"){r.load();return}if(t==="destroy"){r.destroy();return}(t==="add"||t==="remove"||t==="move"&&a.hasCompoundNodes()||t==="load"||t==="zorder"||t==="mount")&&r.invalidateCachedZSortedEles(),t==="viewport"&&r.redrawHint("select",!0),(t==="load"||t==="resize"||t==="mount")&&(r.invali
vendor: 5,420 bytes, line 11
11dateContainerClientCoordsCache(),r.matchCanvasSize(r.container)),r.redrawHint("eles",!0),r.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()}};Qr.destroy=function(){var t=this;t.destroyed=!0,t.cy.stopAnimationLoop();for(var e=0;e<t.bindings.length;e++){var r=t.bindings[e],a=r,n=a.target;(n.off||n.removeEventListener).apply(n,a.args)}if(t.bindings=[],t.beforeRenderCallbacks=[],t.onUpdateEleCalcsFns=[],t.removeObserver&&t.removeObserver.disconnect(),t.styleObserver&&t.styleObserver.disconnect(),t.resizeObserver&&t.resizeObserver.disconnect(),t.labelCalcDiv)try{document.body.removeChild(t.labelCalcDiv)}catch{}};Qr.isHeadless=function(){return!1};[Bi,$u,_u,Zr,Wt,ka].forEach(function(t){Ee(Qr,t)});var Qn=1e3/60,Xu={setupDequeueing:f(function(e){return f(function(){var a=this,n=this.renderer;if(!a.dequeueingSetup){a.dequeueingSetup=!0;var i=En(function(){n.redrawHint("eles",!0),n.redrawHint("drag",!0),n.redraw()},e.deqRedrawThreshold),s=f(function(u,h){var c=_t(),v=n.averageRedrawTime,d=n.lastRedrawTime,g=[],m=n.cy.extent(),y=n.getPixelRatio();for(u||n.flushRenderedStyleQueue();;){var p=_t(),b=p-c,E=p-h;if(d<Qn){var S=Qn-(u?v:0);if(E>=e.deqFastCost*S)break}else if(u){if(b>=e.deqCost*d||b>=e.deqAvgCost*v)break}else if(E>=e.deqNoDrawCost*Qn)break;var w=e.deq(a,y,m);if(w.length>0)for(var x=0;x<w.length;x++)g.push(w[x]);else break}g.length>0&&(e.onDeqd(a,g),!u&&e.shouldRedraw(a,g,y,m)&&i())},"dequeue"),o=e.priority||wi;n.beforeRender(s,o(a))}},"setupDequeueingImpl")},"setupDequeueing")},xp=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ln;pi(this,t),this.idsByKey=new Ft,this.keyForId=new Ft,this.cachesByLvl=new Ft,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=r}return f(t,"ElementTextureCacheLookup"),yi(t,[{key:"getIdsFor",value:f(function(r){r==null&&Ve("Can not get id list for null key");var a=this.idsByKey,n=this.idsByKey.get(r);return n||(n=new $r,a.set(r,n)),n},"getIdsFor")},{key:"addIdForKey",value:f(function(r,a){r!=null&&this.getIdsFor(r).add(a)},"addIdForKey")},{key:"deleteIdForKey",value:f(function(r,a){r!=null&&this.getIdsFor(r).delete(a)},"deleteIdForKey")},{key:"getNumberOfIdsForKey",value:f(function(r){return r==null?0:this.getIdsFor(r).size},"getNumberOfIdsForKey")},{key:"updateKeyMappingFor",value:f(function(r){var a=r.id(),n=this.keyForId.get(a),i=this.getKey(r);this.deleteIdForKey(n,a),this.addIdForKey(i,a),this.keyForId.set(a,i)},"updateKeyMappingFor")},{key:"deleteKeyMappingFor",value:f(function(r){var a=r.id(),n=this.keyForId.get(a);this.deleteIdForKey(n,a),this.keyForId.delete(a)},"deleteKeyMappingFor")},{key:"keyHasChangedFor",value:f(function(r){var a=r.id(),n=this.keyForId.get(a),i=this.getKey(r);return n!==i},"keyHasChangedFor")},{key:"isInvalid",value:f(function(r){return this.keyHasChangedFor(r)||this.doesEleInvalidateKey(r)},"isInvalid")},{key:"getCachesAt",value:f(function(r){var a=this.cachesByLvl,n=this.lvls,i=a.get(r);return i||(i=new Ft,a.set(r,i),n.push(r)),i},"getCachesAt")},{key:"getCache",value:f(function(r,a){return this.getCachesAt(a).get(r)},"getCache")},{key:"get",value:f(function(r,a){var n=this.getKey(r),i=this.getCache(n,a);return i!=null&&this.updateKeyMappingFor(r),i},"get")},{key:"getForCachedKey",value:f(function(r,a){var n=this.keyForId.get(r.id()),i=this.getCache(n,a);return i},"getForCachedKey")},{key:"hasCache",value:f(function(r,a){return this.getCachesAt(a).has(r)},"hasCache")},{key:"has",value:f(function(r,a){var n=this.getKey(r);return this.hasCache(n,a)},"has")},{key:"setCache",value:f(function(r,a,n){n.key=r,this.getCachesAt(a).set(r,n)},"setCache")},{key:"set",value:f(function(r,a,n){var i=this.getKey(r);this.setCache(i,a,n),this.updateKeyMappingFor(r)},"set")},{key:"deleteCache",value:f(function(r,a){this.getCachesAt(a).delete(r)},"deleteCache")},{key:"delete",value:f(function(r,a){var n=this.getKey(r);this.deleteCache(n,a)},"_delete")},{key:"invalidateKey",value:f(function(r){var a=this;this.lvls.forEach(function(n){return a.deleteCache(r,n)})},"invalidateKey")},{key:"invalidate",value:f(function(r){var a=r.id(),n=this.keyForId.get(a);this.deleteKeyMappingFor(r);var i=this.doesEleInvalidateKey(r);return i&&this.invalidateKey(n),i||this.getNumberOfIdsForKey(n)===0},"invalidate")}]),t}(),co=25,Za=50,sn=-4,ci=3,Tp=7.99,Cp=8,Dp=1024,Sp=1024,Lp=1024,Ap=.2,Op=.8,Mp=10,Np=.15,Ip=.1,kp=.9,Rp=.9,Pp=100,Bp=1,Rr={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},Fp=rt({getKey:null,doesEleInvalidateKey:ln,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Fo,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),ca=f(function(e,r){var a=this;a.renderer=e,a.onDequeues=[];var n=Fp(r);Ee(a,n),a.lookup=new xp(n.getKey,n.doesEleInvalidateKey),a.setupDequeueing()},"ElementTextureCache"),We=ca.prototype;We.reasons=Rr;We.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]};We.getRetiredTextureQueue=function(t){var e=this,r=e.eleImgCaches.retired=e.eleImgCaches.retired||{},a=r[t]=r[t]||[];return a};We.getElementQueue=function(){var t=this,e=t.eleCacheQueue=t.eleCacheQueue||new Oa(function(r,a){return a.reqs-r.reqs});return e};We.getElementKeyToQueue=function(){var t=this,e=t.eleKeyToCacheQueue=t.eleKeyToCacheQueue||{};return e};We.getElement=function(t,e,r,a,n){var i=this,s=this.renderer,o=s.cy.zoom(),l=this.lookup;
vendor: 5,446 bytes, line 11
11if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed()||!i.allowEdgeTxrCaching&&t.isEdge()||!i.allowParentTxrCaching&&t.isParent())return null;if(a==null&&(a=Math.ceil(Ti(o*r))),a<sn)a=sn;else if(o>=Tp||a>ci)return null;var u=Math.pow(2,a),h=e.h*u,c=e.w*u,v=s.eleTextBiggerThanMin(t,u);if(!this.isVisible(t,v))return null;var d=l.get(t,a);if(d&&d.invalidated&&(d.invalidated=!1,d.texture.invalidatedWidth-=d.width),d)return d;var g;if(h<=co?g=co:h<=Za?g=Za:g=Math.ceil(h/Za)*Za,h>Lp||c>Sp)return null;var m=i.getTextureQueue(g),y=m[m.length-2],p=f(function(){return i.recycleTexture(g,c)||i.addTexture(g,c)},"addNewTxr");y||(y=m[m.length-1]),y||(y=p()),y.width-y.usedWidth<c&&(y=p());for(var b=f(function(R){return R&&R.scaledLabelShown===v},"scalableFrom"),E=n&&n===Rr.dequeue,S=n&&n===Rr.highQuality,w=n&&n===Rr.downscale,x,T=a+1;T<=ci;T++){var C=l.get(t,T);if(C){x=C;break}}var D=x&&x.level===a+1?x:null,L=f(function(){y.context.drawImage(D.texture.canvas,D.x,0,D.width,D.height,y.usedWidth,0,c,h)},"downscale");if(y.context.setTransform(1,0,0,1,0,0),y.context.clearRect(y.usedWidth,0,c,g),b(D))L();else if(b(x))if(S){for(var O=x.level;O>a;O--)D=i.getElement(t,e,r,O,Rr.downscale);L()}else return i.queueElement(t,x.level-1),x;else{var A;if(!E&&!S&&!w)for(var I=a-1;I>=sn;I--){var M=l.get(t,I);if(M){A=M;break}}if(b(A))return i.queueElement(t,a),A;y.context.translate(y.usedWidth,0),y.context.scale(u,u),this.drawElement(y.context,t,e,v,!1),y.context.scale(1/u,1/u),y.context.translate(-y.usedWidth,0)}return d={x:y.usedWidth,texture:y,level:a,scale:u,width:c,height:h,scaledLabelShown:v},y.usedWidth+=Math.ceil(c+Cp),y.eleCaches.push(d),l.set(t,a,d),i.checkTextureFullness(y),d};We.invalidateElements=function(t){for(var e=0;e<t.length;e++)this.invalidateElement(t[e])};We.invalidateElement=function(t){var e=this,r=e.lookup,a=[],n=r.isInvalid(t);if(n){for(var i=sn;i<=ci;i++){var s=r.getForCachedKey(t,i);s&&a.push(s)}var o=r.invalidate(t);if(o)for(var l=0;l<a.length;l++){var u=a[l],h=u.texture;h.invalidatedWidth+=u.width,u.invalidated=!0,e.checkTextureUtility(h)}e.removeFromQueue(t)}};We.checkTextureUtility=function(t){t.invalidatedWidth>=Ap*t.width&&this.retireTexture(t)};We.checkTextureFullness=function(t){var e=this,r=e.getTextureQueue(t.height);t.usedWidth/t.width>Op&&t.fullnessChecks>=Mp?ar(r,t):t.fullnessChecks++};We.retireTexture=function(t){var e=this,r=t.height,a=e.getTextureQueue(r),n=this.lookup;ar(a,t),t.retired=!0;for(var i=t.eleCaches,s=0;s<i.length;s++){var o=i[s];n.deleteCache(o.key,o.level)}xi(i);var l=e.getRetiredTextureQueue(r);l.push(t)};We.addTexture=function(t,e){var r=this,a=r.getTextureQueue(t),n={};return a.push(n),n.eleCaches=[],n.height=t,n.width=Math.max(Dp,e),n.usedWidth=0,n.invalidatedWidth=0,n.fullnessChecks=0,n.canvas=r.renderer.makeOffscreenCanvas(n.width,n.height),n.context=n.canvas.getContext("2d"),n};We.recycleTexture=function(t,e){for(var r=this,a=r.getTextureQueue(t),n=r.getRetiredTextureQueue(t),i=0;i<n.length;i++){var s=n[i];if(s.width>=e)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,xi(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),ar(n,s),a.push(s),s}};We.queueElement=function(t,e){var r=this,a=r.getElementQueue(),n=r.getElementKeyToQueue(),i=this.getKey(t),s=n[i];if(s)s.level=Math.max(s.level,e),s.eles.merge(t),s.reqs++,a.updateItem(s);else{var o={eles:t.spawn().merge(t),level:e,reqs:1,key:i};a.push(o),n[i]=o}};We.dequeue=function(t){for(var e=this,r=e.getElementQueue(),a=e.getElementKeyToQueue(),n=[],i=e.lookup,s=0;s<Bp&&r.size()>0;s++){var o=r.pop(),l=o.key,u=o.eles[0],h=i.hasCache(u,o.level);if(a[l]=null,h)continue;n.push(o);var c=e.getBoundingBox(u);e.getElement(u,c,t,o.level,Rr.dequeue)}return n};We.removeFromQueue=function(t){var e=this,r=e.getElementQueue(),a=e.getElementKeyToQueue(),n=this.getKey(t),i=a[n];i!=null&&(i.eles.length===1?(i.reqs=Ei,r.updateItem(i),r.pop(),a[n]=null):i.eles.unmerge(t))};We.onDequeue=function(t){this.onDequeues.push(t)};We.offDequeue=function(t){ar(this.onDequeues,t)};We.setupDequeueing=Xu.setupDequeueing({deqRedrawThreshold:Pp,deqCost:Np,deqAvgCost:Ip,deqNoDrawCost:kp,deqFastCost:Rp,deq:f(function(e,r,a){return e.dequeue(r,a)},"deq"),onDeqd:f(function(e,r){for(var a=0;a<e.onDequeues.length;a++){var n=e.onDequeues[a];n(r)}},"onDeqd"),shouldRedraw:f(function(e,r,a,n){for(var i=0;i<r.length;i++)for(var s=r[i].eles,o=0;o<s.length;o++){var l=s[o].boundingBox();if(Ci(l,n))return!0}return!1},"shouldRedraw"),priority:f(function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq},"priority")});var Gp=1,da=-4,yn=2,zp=3.99,Vp=50,Up=50,Yp=.15,$p=.1,_p=.9,Hp=.9,Xp=1,vo=250,qp=4e3*4e3,Wp=!0,qu=f(function(e){var r=this,a=r.renderer=e,n=a.cy;r.layersByLevel={},r.firstGet=!0,r.lastInvalidationTime=_t()-2*vo,r.skipping=!1,r.eleTxrDeqs=n.collection(),r.scheduleElementRefinement=En(function(){r.refineElementTextures(r.eleTxrDeqs),r.eleTxrDeqs.unmerge(r.eleTxrDeqs)},Up),a.beforeRender(function(s,o){o-r.lastInvalidationTime<=vo?r.skipping=!0:r.skipping=!1},a.beforeRenderPriorities.lyrTxrSkip);var i=f(function(o,l){return l.reqs-o.reqs},"qSort");r.layersQueue=new Oa(i),r.setupDequeueing()},"LayeredTextureCache"),at=qu.prototype,go=0,Kp=Math.pow(2,53)-1;at.makeLayer=function(t,e){var r=Math.pow(2,e),a=Math.ceil(t.w*r),n=Math.ceil(t.h*r),i=this.renderer.makeOffscreenCanvas(a,n),s={id:go=++go%Kp,bb:t,level:e,width:a,height:n,
vendor: 2,893 bytes, line 11
11canvas:i,context:i.getContext("2d"),eles:[],elesQueue:[],reqs:0},o=s.context,l=-s.bb.x1,u=-s.bb.y1;return o.scale(r,r),o.translate(l,u),s};at.getLayers=function(t,e,r){var a=this,n=a.renderer,i=n.cy,s=i.zoom(),o=a.firstGet;if(a.firstGet=!1,r==null){if(r=Math.ceil(Ti(s*e)),r<da)r=da;else if(s>=zp||r>yn)return null}a.validateLayersElesOrdering(r,t);var l=a.layersByLevel,u=Math.pow(2,r),h=l[r]=l[r]||[],c,v=a.levelIsComplete(r,t),d,g=f(function(){var L=f(function(P){if(a.validateLayersElesOrdering(P,t),a.levelIsComplete(P,t))return d=l[P],!0},"canUseAsTmpLvl"),O=f(function(P){if(!d)for(var R=r+P;da<=R&&R<=yn&&!L(R);R+=P);},"checkLvls");O(1),O(-1);for(var A=h.length-1;A>=0;A--){var I=h[A];I.invalid&&ar(h,I)}},"checkTempLevels");if(!v)g();else return h;var m=f(function(){if(!c){c=pt();for(var L=0;L<t.length;L++)$o(c,t[L].boundingBox())}return c},"getBb"),y=f(function(L){L=L||{};var O=L.after;m();var A=c.w*u*(c.h*u);if(A>qp)return null;var I=a.makeLayer(c,r);if(O!=null){var M=h.indexOf(O)+1;h.splice(M,0,I)}else(L.insert===void 0||L.insert)&&h.unshift(I);return I},"makeLayer");if(a.skipping&&!o)return null;for(var p=null,b=t.length/Gp,E=!o,S=0;S<t.length;S++){var w=t[S],x=w._private.rscratch,T=x.imgLayerCaches=x.imgLayerCaches||{},C=T[r];if(C){p=C;continue}if((!p||p.eles.length>=b||!_o(p.bb,w.boundingBox()))&&(p=y({insert:!0,after:p}),!p))return null;d||E?a.queueLayer(p,w):a.drawEleInLayer(p,w,r,e),p.eles.push(w),T[r]=p}return d||(E?null:h)};at.getEleLevelForLayerLevel=function(t,e){return t};at.drawEleInLayer=function(t,e,r,a){var n=this,i=this.renderer,s=t.context,o=e.boundingBox();o.w===0||o.h===0||!e.visible()||(r=n.getEleLevelForLayerLevel(r,a),i.setImgSmoothing(s,!1),i.drawCachedElement(s,e,null,null,r,Wp),i.setImgSmoothing(s,!0))};at.levelIsComplete=function(t,e){var r=this,a=r.layersByLevel[t];if(!a||a.length===0)return!1;for(var n=0,i=0;i<a.length;i++){var s=a[i];if(s.reqs>0||s.invalid)return!1;n+=s.eles.length}return n===e.length};at.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var a=0;a<r.length;a++){for(var n=r[a],i=-1,s=0;s<e.length;s++)if(n.eles[0]===e[s]){i=s;break}if(i<0){this.invalidateLayer(n);continue}for(var o=i,s=0;s<n.eles.length;s++)if(n.eles[s]!==e[o+s]){this.invalidateLayer(n);break}}};at.updateElementsInLayers=function(t,e){for(var r=this,a=La(t[0]),n=0;n<t.length;n++)for(var i=a?null:t[n],s=a?t[n]:t[n].ele,o=s._private.rscratch,l=o.imgLayerCaches=o.imgLayerCaches||{},u=da;u<=yn;u++){var h=l[u];h&&(i&&r.getEleLevelForLayerLevel(h.level)!==i.level||e(h,s,i))}};at.haveLayers=function(){for(var t=this,e=!1,r=da;r<=yn;r++){var a=t.layersByLevel[r];if(a&&a.length>0){e=!0;break}}return e};at.invalidateElements=function(t){var e=this;t.length!==0&&(e.lastInvalidationTime=_t(),!(t.length===0||!e.haveLayers())&&e.updateElementsInLayers(t,f(function(a,n,i){e.invalidateLayer(a)},"invalAssocLayers")))};
vendor: 11,903 bytes, line 11
11at.invalidateLayer=function(t){if(this.lastInvalidationTime=_t(),!t.invalid){var e=t.level,r=t.eles,a=this.layersByLevel[e];ar(a,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var n=0;n<r.length;n++){var i=r[n]._private.rscratch.imgLayerCaches;i&&(i[e]=null)}}};at.refineElementTextures=function(t){var e=this;e.updateElementsInLayers(t,f(function(a,n,i){var s=a.replacement;if(s||(s=a.replacement=e.makeLayer(a.bb,a.level),s.replaces=a,s.eles=a.eles),!s.reqs)for(var o=0;o<s.eles.length;o++)e.queueLayer(s,s.eles[o])},"refineEachEle"))};at.enqueueElementRefinement=function(t){this.eleTxrDeqs.merge(t),this.scheduleElementRefinement()};at.queueLayer=function(t,e){var r=this,a=r.layersQueue,n=t.elesQueue,i=n.hasId=n.hasId||{};if(!t.replacement){if(e){if(i[e.id()])return;n.push(e),i[e.id()]=!0}t.reqs?(t.reqs++,a.updateItem(t)):(t.reqs=1,a.push(t))}};at.dequeue=function(t){for(var e=this,r=e.layersQueue,a=[],n=0;n<Xp&&r.size()!==0;){var i=r.peek();if(i.replacement){r.pop();continue}if(i.replaces&&i!==i.replaces.replacement){r.pop();continue}if(i.invalid){r.pop();continue}var s=i.elesQueue.shift();s&&(e.drawEleInLayer(i,s,i.level,t),n++),a.length===0&&a.push(!0),i.elesQueue.length===0&&(r.pop(),i.reqs=0,i.replaces&&e.applyLayerReplacement(i),e.requestRedraw())}return a};at.applyLayerReplacement=function(t){var e=this,r=e.layersByLevel[t.level],a=t.replaces,n=r.indexOf(a);if(!(n<0||a.invalid)){r[n]=t;for(var i=0;i<t.eles.length;i++){var s=t.eles[i]._private,o=s.imgLayerCaches=s.imgLayerCaches||{};o&&(o[t.level]=t)}e.requestRedraw()}};at.requestRedraw=En(function(){var t=this.renderer;t.redrawHint("eles",!0),t.redrawHint("drag",!0),t.redraw()},100);at.setupDequeueing=Xu.setupDequeueing({deqRedrawThreshold:Vp,deqCost:Yp,deqAvgCost:$p,deqNoDrawCost:_p,deqFastCost:Hp,deq:f(function(e,r){return e.dequeue(r)},"deq"),onDeqd:wi,shouldRedraw:Fo,priority:f(function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq},"priority")});var Wu={},po;function Zp(t,e){for(var r=0;r<e.length;r++){var a=e[r];t.lineTo(a.x,a.y)}}f(Zp,"polygon");function Qp(t,e,r){for(var a,n=0;n<e.length;n++){var i=e[n];n===0&&(a=i),t.lineTo(i.x,i.y)}t.quadraticCurveTo(r.x,r.y,a.x,a.y)}f(Qp,"triangleBackcurve");function yo(t,e,r){t.beginPath&&t.beginPath();for(var a=e,n=0;n<a.length;n++){var i=a[n];t.lineTo(i.x,i.y)}var s=r,o=r[0];t.moveTo(o.x,o.y);for(var n=1;n<s.length;n++){var i=s[n];t.lineTo(i.x,i.y)}t.closePath&&t.closePath()}f(yo,"triangleTee");function Jp(t,e,r,a,n){t.beginPath&&t.beginPath(),t.arc(r,a,n,0,Math.PI*2,!1);var i=e,s=i[0];t.moveTo(s.x,s.y);for(var o=0;o<i.length;o++){var l=i[o];t.lineTo(l.x,l.y)}t.closePath&&t.closePath()}f(Jp,"circleTriangle");function jp(t,e,r,a){t.arc(e,r,a,0,Math.PI*2,!1)}f(jp,"circle");Wu.arrowShapeImpl=function(t){return(po||(po={polygon:Zp,"triangle-backcurve":Qp,"triangle-tee":yo,"circle-triangle":Jp,"triangle-cross":yo,circle:jp}))[t]};var Vt={};Vt.drawElement=function(t,e,r,a,n,i){var s=this;e.isNode()?s.drawNode(t,e,r,a,n,i):s.drawEdge(t,e,r,a,n,i)};Vt.drawElementOverlay=function(t,e){var r=this;e.isNode()?r.drawNodeOverlay(t,e):r.drawEdgeOverlay(t,e)};Vt.drawElementUnderlay=function(t,e){var r=this;e.isNode()?r.drawNodeUnderlay(t,e):r.drawEdgeUnderlay(t,e)};Vt.drawCachedElementPortion=function(t,e,r,a,n,i,s,o){var l=this,u=r.getBoundingBox(e);if(!(u.w===0||u.h===0)){var h=r.getElement(e,u,a,n,i);if(h!=null){var c=o(l,e);if(c===0)return;var v=s(l,e),d=u.x1,g=u.y1,m=u.w,y=u.h,p,b,E,S,w;if(v!==0){var x=r.getRotationPoint(e);E=x.x,S=x.y,t.translate(E,S),t.rotate(v),w=l.getImgSmoothing(t),w||l.setImgSmoothing(t,!0);var T=r.getRotationOffset(e);p=T.x,b=T.y}else p=d,b=g;var C;c!==1&&(C=t.globalAlpha,t.globalAlpha=C*c),t.drawImage(h.texture.canvas,h.x,0,h.width,h.height,p,b,m,y),c!==1&&(t.globalAlpha=C),v!==0&&(t.rotate(-v),t.translate(-E,-S),w||l.setImgSmoothing(t,!1))}else r.drawElement(t,e)}};var ey=f(function(){return 0},"getZeroRotation"),ty=f(function(e,r){return e.getTextAngle(r,null)},"getLabelRotation"),ry=f(function(e,r){return e.getTextAngle(r,"source")},"getSourceLabelRotation"),ay=f(function(e,r){return e.getTextAngle(r,"target")},"getTargetLabelRotation"),ny=f(function(e,r){return r.effectiveOpacity()},"getOpacity"),Jn=f(function(e,r){return r.pstyle("text-opacity").pfValue*r.effectiveOpacity()},"getTextOpacity");Vt.drawCachedElement=function(t,e,r,a,n,i){var s=this,o=s.data,l=o.eleTxrCache,u=o.lblTxrCache,h=o.slbTxrCache,c=o.tlbTxrCache,v=e.boundingBox(),d=i===!0?l.reasons.highQuality:null;if(!(v.w===0||v.h===0||!e.visible())&&(!a||Ci(v,a))){var g=e.isEdge(),m=e.element()._private.rscratch.badLine;s.drawElementUnderlay(t,e),s.drawCachedElementPortion(t,e,l,r,n,d,ey,ny),(!g||!m)&&s.drawCachedElementPortion(t,e,u,r,n,d,ty,Jn),g&&!m&&(s.drawCachedElementPortion(t,e,h,r,n,d,ry,Jn),s.drawCachedElementPortion(t,e,c,r,n,d,ay,Jn)),s.drawElementOverlay(t,e)}};Vt.drawElements=function(t,e){for(var r=this,a=0;a<e.length;a++){var n=e[a];r.drawElement(t,n)}};Vt.drawCachedElements=function(t,e,r,a){for(var n=this,i=0;i<e.length;i++){var s=e[i];n.drawCachedElement(t,s,r,a)}};Vt.drawCachedNodes=function(t,e,r,a){for(var n=this,i=0;i<e.length;i++){var s=e[i];s.isNode()&&n.drawCachedElement(t,s,r,a)}};Vt.drawLayeredElements=function(t,e,r,a){var n=this,i=n.data.lyrTxrCache.getLayers(e,r);if(i)for(var s=0;s<i.length;s++){var o=i[s],l=o.bb;l.w===0||l.h===0||t.drawImage(o.canvas,l.x1,l.y1,l.w,l.h)}else n.drawCachedElements(t,e,r,a)};var Kt={};Kt.drawEdge=function(t,e,r){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o=e._private.rscratch;if(!(i&&!e.visible())&&!(o.badLine||o.allpts==null||isNaN(o.allpts[0]))){var l;r&&(l=r,t.translate(-l.x1,-l.y1));var u=i?e.pstyle("opacity").value:1,h=i?e.pstyle("line-opacity").value:1,c=e.pstyle("curve-style").value,v=e.pstyle("line-style").value,d=e.pstyle("width").pfValue,g=e.pstyle("line-cap").value,m=e.pstyle("line-outline-width").value,y=e.pstyle("line-outline-color").value,p=u*h,b=u*h,E=f(function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p;c==="straight-triangle"?(s.eleStrokeStyle(t,e,P),s.drawEdgeTrianglePath(e,t,o.allpts)):(t.lineWidth=d,t.lineCap=g,s.eleStrokeStyle(t,e,P),s.drawEdgePath(e,t,o.allpts,v),t.lineCap="butt")},"drawLine"),S=f(function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p;if(t.lineWidth=d+m,t.lineCap=g,m>0)s.colorStrokeStyle(t,y[0],y[1],y[2],P);else{t.lineCap="butt";return}c==="straight-triangle"?s.drawEdgeTrianglePath(e,t,o.allpts):(s.drawEdgePath(e,t,o.allpts,v),t.lineCap="butt")},"drawLineOutline"),w=f(function(){n&&s.drawEdgeOverlay(t,e)},"drawOverlay"),x=f(function(){n&&s.drawEdgeUnderlay(t,e)},"drawUnderlay"),T=f(function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b;s.drawArrowheads(t,e,P)},"drawArrows"),C=f(function(){s.drawElementText(t,e,null,a)},"drawText");t.lineJoin="round";var D=e.pstyle("ghost").value==="yes";if(D){var L=e.pstyle("ghost-offset-x").pfValue,O=e.pstyle("ghost-offset-y").pfValue,A=e.pstyle("ghost-opacity").value,I=p*A;t.translate(L,O),E(I),T(I),t.translate(-L,-O)}else S();x(),E(),T(),w(),C(),r&&t.translate(l.x1,l.y1)}};var Ku=f(function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,a){if(a.visible()){var n=a.pstyle("".concat(e,"-opacity")).value;if(n!==0){var i=this,s=i.usePaths(),o=a._private.rscratch,l=a.pstyle("".concat(e,"-padding")).pfValue,u=2*l,h=a.pstyle("".concat(e,"-color")).value;r.lineWidth=u,o.edgeType==="self"&&!s?r.lineCap="butt":r.lineCap="round",i.colorStrokeStyle(r,h[0],h[1],h[2],n),i.drawEdgePath(a,r,o.allpts,"solid")}}}},"drawEdgeOverlayUnderlay");Kt.drawEdgeOverlay=Ku("overlay");Kt.drawEdgeUnderlay=Ku("underlay");Kt.drawEdgePath=function(t,e,r,a){var n=t._private.rscratch,i=e,s,o=!1,l=this.usePaths(),u=t.pstyle("line-dash-pattern").pfValue,h=t.pstyle("line-dash-offset").pfValue;if(l){var c=r.join("$"),v=n.pathCacheKey&&n.pathCacheKey===c;v?(s=e=n.pathCache,o=!0):(s=e=new Path2D,n.pathCacheKey=c,n.pathCache=s)}if(i.setLineDash)switch(a){case"dotted":i.setLineDash([1,1]);break;case"dashed":i.setLineDash(u),i.lineDashOffset=h;break;case"solid":i.setLineDash([]);break}if(!o&&!n.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(r[0],r[1]),n.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var d=2;d+3<r.length;d+=4)e.quadraticCurveTo(r[d],r[d+1],r[d+2],r[d+3]);break;case"straight":case"haystack":for(var g=2;g+1<r.length;g+=2)e.lineTo(r[g],r[g+1]);break;case"segments":if(n.isRound){var m=To(n.roundCorners),y;try{for(m.s();!(y=m.n()).done;){var p=y.value;Gu(e,p)}}catch(E){m.e(E)}finally{m.f()}e.lineTo(r[r.length-2],r[r.length-1])}else for(var b=2;b+1<r.length;b+=2)e.lineTo(r[b],r[b+1]);break}e=i,l?e.stroke(s):e.stroke(),e.setLineDash&&e.setLineDash([])};Kt.drawEdgeTrianglePath=function(t,e,r){e.fillStyle=e.strokeStyle;for(var a=t.pstyle("width").pfValue,n=0;n+1<r.length;n+=2){var i=[r[n+2]-r[n],r[n+3]-r[n+1]],s=Math.sqrt(i[0]*i[0]+i[1]*i[1]),o=[i[1]/s,-i[0]/s],l=[o[0]*a/2,o[1]*a/2];e.beginPath(),e.moveTo(r[n]-l[0],r[n+1]-l[1]),e.lineTo(r[n]+l[0],r[n+1]+l[1]),e.lineTo(r[n+2],r[n+3]),e.closePath(),e.fill()}};Kt.drawArrowheads=function(t,e,r){var a=e._private.rscratch,n=a.edgeType==="haystack";n||this.drawArrowhead(t,e,"source",a.arrowStartX,a.arrowStartY,a.srcArrowAngle,r),this.drawArrowhead(t,e,"mid-target",a.midX,a.midY,a.midtgtArrowAngle,r),this.drawArrowhead(t,e,"mid-source",a.midX,a.midY,a.midsrcArrowAngle,r),n||this.drawArrowhead(t,e,"target",a.arrowEndX,a.arrowEndY,a.tgtArrowAngle,r)};Kt.drawArrowhead=function(t,e,r,a,n,i,s){if(!(isNaN(a)||a==null||isNaN(n)||n==null||isNaN(i)||i==null)){var o=this,l=e.pstyle(r+"-arrow-shape").value;if(l!=="none"){var u=e.pstyle(r+"-arrow-fill").value==="hollow"?"both":"filled",h=e.pstyle(r+"-arrow-fill").value,c=e.pstyle("width").pfValue,v=e.pstyle(r+"-arrow-width"),d=v.value==="match-line"?c:v.pfValue;v.units==="%"&&(d*=c);var g=e.pstyle("opacity").value;s===void 0&&(s=g);var m=t.globalCompositeOperation;(s!==1||h==="hollow")&&(t.globalCompositeOperation="destination-out",o.colorFillStyle(t,255,255,255,1),o.colorStrokeStyle(t,255,255,255,1),o.drawArrowShape(e,t,u,c,l,d,a,n,i),t.globalCompositeOperation=m);var y=e.pstyle(r+"-arrow-color").value;o.colorFillStyle(t,y[0],y[1],y[2],s),o.colorStrokeStyle(t,y[0],y[1],y[2],s),o.drawArrowShape(e,t,h,c,l,d,a,n,i)}}};Kt.drawArrowShape=function(t,e,r,a,n,i,s,o,l){var u=this,h=this.usePaths()&&n!=="triangle-cross",c=!1,v,d=e,g={x:s,y:o},m=t.pstyle("arrow-scale").value,y=this.getArrowWidth(a,m),p=u.arrowShapes[n];if(h){var b=u.arrowPathCache=u.arrowPathCache||[],E=yr(n),S=b[E];S!=null?(v=e=S,c=!0):(v=e=new Path2D,b[E]=v)}c||(e.beginPath&&e.beginPath(),h?p.draw(e,1,0,{x:0,y:0},1):p.draw(e,y,l,g,a),e.closePath&&e.closePath()),e=d,h&&(e.translate(s,o),e.rotate(l),e.scale(y,y)),(r==="filled"||r==="both")&&(h?e.fill(v):e.fill()),(r==="hollow"||r==="both")&&(e.lineWidth=i/(h?y:1),e.lineJoin="miter",h?e.stroke(v):e.stroke()),h&&(e.scale(1/y,1/y),e.rotate(-l),e.translate(-s,-o))};var zi={};zi.safeDrawImage=function(t,e,r,a,n,i,s,o,l,u){if(!(n<=0||i<=0||l<=0||u<=0))try{t.drawImage(e,r,a,n,i,s,o,l,u)}catch(h){Ne(h)}};zi.drawInscribedImage=function(t,e,r,a,n){var i=this,s=r.position(),o=s.x,l=s.y,u=r.cy().style(),h=u.getIndexedStyle.bind(u),c=h(r,"background-fit","value",a),v=h(r,"background-repeat","value",a),d=r.width(),g=r.height(),m=r.padding()*2,y=d+(h(r,"background-width-relative-to","value",a)==="inner"?0:m),p=g+(h(r,"background-height-relative-to","value",a)==="inner"?0:m),b=r._private.rscratch,E=h(r,"background-clip","value",a),S=E==="node",w=h(r,"background-image-opacity","value",a)*n,x=h(r,"background-image-smoothing","value",a),T=r.pstyle("corner-radius").value;T!=="auto"&&(T=r.pstyle("corner-radius").pfValue);
vendor: 25,145 bytes, line 11
11var C=e.width||e.cachedW,D=e.height||e.cachedH;(C==null||D==null)&&(document.body.appendChild(e),C=e.cachedW=e.width||e.offsetWidth,D=e.cachedH=e.height||e.offsetHeight,document.body.removeChild(e));var L=C,O=D;if(h(r,"background-width","value",a)!=="auto"&&(h(r,"background-width","units",a)==="%"?L=h(r,"background-width","pfValue",a)*y:L=h(r,"background-width","pfValue",a)),h(r,"background-height","value",a)!=="auto"&&(h(r,"background-height","units",a)==="%"?O=h(r,"background-height","pfValue",a)*p:O=h(r,"background-height","pfValue",a)),!(L===0||O===0)){if(c==="contain"){var A=Math.min(y/L,p/O);L*=A,O*=A}else if(c==="cover"){var A=Math.max(y/L,p/O);L*=A,O*=A}var I=o-y/2,M=h(r,"background-position-x","units",a),P=h(r,"background-position-x","pfValue",a);M==="%"?I+=(y-L)*P:I+=P;var R=h(r,"background-offset-x","units",a),k=h(r,"background-offset-x","pfValue",a);R==="%"?I+=(y-L)*k:I+=k;var B=l-p/2,F=h(r,"background-position-y","units",a),U=h(r,"background-position-y","pfValue",a);F==="%"?B+=(p-O)*U:B+=U;var V=h(r,"background-offset-y","units",a),G=h(r,"background-offset-y","pfValue",a);V==="%"?B+=(p-O)*G:B+=G,b.pathCache&&(I-=o,B-=l,o=0,l=0);var $=t.globalAlpha;t.globalAlpha=w;var j=i.getImgSmoothing(t),Q=!1;if(x==="no"&&j?(i.setImgSmoothing(t,!1),Q=!0):x==="yes"&&!j&&(i.setImgSmoothing(t,!0),Q=!0),v==="no-repeat")S&&(t.save(),b.pathCache?t.clip(b.pathCache):(i.nodeShapes[i.getNodeShape(r)].draw(t,o,l,y,p,T,b),t.clip())),i.safeDrawImage(t,e,0,0,C,D,I,B,L,O),S&&t.restore();else{var H=t.createPattern(e,v);t.fillStyle=H,i.nodeShapes[i.getNodeShape(r)].draw(t,o,l,y,p,T,b),t.translate(I,B),t.fill(),t.translate(-I,-B)}t.globalAlpha=$,Q&&i.setImgSmoothing(t,j)}};var Cr={};Cr.eleTextBiggerThanMin=function(t,e){if(!e){var r=t.cy().zoom(),a=this.getPixelRatio(),n=Math.ceil(Ti(r*a));e=Math.pow(2,n)}var i=t.pstyle("font-size").pfValue*e,s=t.pstyle("min-zoomed-font-size").pfValue;return!(i<s)};Cr.drawElementText=function(t,e,r,a,n){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this;if(a==null){if(i&&!s.eleTextBiggerThanMin(e))return}else if(a===!1)return;if(e.isNode()){var o=e.pstyle("label");if(!o||!o.value)return;var l=s.getLabelJustification(e);t.textAlign=l,t.textBaseline="bottom"}else{var u=e.element()._private.rscratch.badLine,h=e.pstyle("label"),c=e.pstyle("source-label"),v=e.pstyle("target-label");if(u||(!h||!h.value)&&(!c||!c.value)&&(!v||!v.value))return;t.textAlign="center",t.textBaseline="bottom"}var d=!r,g;r&&(g=r,t.translate(-g.x1,-g.y1)),n==null?(s.drawText(t,e,null,d,i),e.isEdge()&&(s.drawText(t,e,"source",d,i),s.drawText(t,e,"target",d,i))):s.drawText(t,e,n,d,i),r&&t.translate(g.x1,g.y1)};Cr.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var r=0;r<this.fontCaches.length;r++)if(e=this.fontCaches[r],e.context===t)return e;return e={context:t},this.fontCaches.push(e),e};Cr.setupTextStyle=function(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=e.pstyle("font-style").strValue,n=e.pstyle("font-size").pfValue+"px",i=e.pstyle("font-family").strValue,s=e.pstyle("font-weight").strValue,o=r?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,l=e.pstyle("text-outline-opacity").value*o,u=e.pstyle("color").value,h=e.pstyle("text-outline-color").value;t.font=a+" "+s+" "+n+" "+i,t.lineJoin="round",this.colorFillStyle(t,u[0],u[1],u[2],o),this.colorStrokeStyle(t,h[0],h[1],h[2],l)};function jn(t,e,r,a,n){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,s=arguments.length>6?arguments[6]:void 0;t.beginPath(),t.moveTo(e+i,r),t.lineTo(e+a-i,r),t.quadraticCurveTo(e+a,r,e+a,r+i),t.lineTo(e+a,r+n-i),t.quadraticCurveTo(e+a,r+n,e+a-i,r+n),t.lineTo(e+i,r+n),t.quadraticCurveTo(e,r+n,e,r+n-i),t.lineTo(e,r+i),t.quadraticCurveTo(e,r,e+i,r),t.closePath(),s?t.stroke():t.fill()}f(jn,"roundRect");Cr.getTextAngle=function(t,e){var r,a=t._private,n=a.rscratch,i=e?e+"-":"",s=t.pstyle(i+"text-rotation"),o=Mt(n,"labelAngle",e);return s.strValue==="autorotate"?r=t.isEdge()?o:0:s.strValue==="none"?r=0:r=s.pfValue,r};Cr.drawText=function(t,e,r){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=e._private,s=i.rscratch,o=n?e.effectiveOpacity():1;if(!(n&&(o===0||e.pstyle("text-opacity").value===0))){r==="main"&&(r=null);var l=Mt(s,"labelX",r),u=Mt(s,"labelY",r),h,c,v=this.getLabelText(e,r);if(v!=null&&v!==""&&!isNaN(l)&&!isNaN(u)){this.setupTextStyle(t,e,n);var d=r?r+"-":"",g=Mt(s,"labelWidth",r),m=Mt(s,"labelHeight",r),y=e.pstyle(d+"text-margin-x").pfValue,p=e.pstyle(d+"text-margin-y").pfValue,b=e.isEdge(),E=e.pstyle("text-halign").value,S=e.pstyle("text-valign").value;b&&(E="center",S="center"),l+=y,u+=p;var w;switch(a?w=this.getTextAngle(e,r):w=0,w!==0&&(h=l,c=u,t.translate(h,c),t.rotate(w),l=0,u=0),S){case"top":break;case"center":u+=m/2;break;case"bottom":u+=m;break}var x=e.pstyle("text-background-opacity").value,T=e.pstyle("text-border-opacity").value,C=e.pstyle("text-border-width").pfValue,D=e.pstyle("text-background-padding").pfValue,L=e.pstyle("text-background-shape").strValue,O=L.indexOf("round")===0,A=2;if(x>0||C>0&&T>0){var I=l-D;switch(E){case"left":I-=g;break;case"center":I-=g/2;break}var M=u-m-D,P=g+2*D,R=m+2*D;if(x>0){var k=t.fillStyle,B=e.pstyle("text-background-color").value;t.fillStyle="rgba("+B[0]+","+B[1]+","+B[2]+","+x*o+")",O?jn(t,I,M,P,R,A):t.fillRect(I,M,P,R),t.fillStyle=k}if(C>0&&T>0){var F=t.strokeStyle,U=t.lineWidth,V=e.pstyle("text-border-color").value,G=e.pstyle("text-border-style").value;if(t.strokeStyle="rgba("+V[0]+","+V[1]+","+V[2]+","+T*o+")",t.lineWidth=C,t.setLineDash)switch(G){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=C/4,t.setLineDash([]);break;case"solid":t.setLineDash([]);break}if(O?jn(t,I,M,P,R,A,"stroke"):t.strokeRect(I,M,P,R),G==="double"){var $=C/2;O?jn(t,I+$,M+$,P-$*2,R-$*2,A,"stroke"):t.strokeRect(I+$,M+$,P-$*2,R-$*2)}t.setLineDash&&t.setLineDash([]),t.lineWidth=U,t.strokeStyle=F}}var j=2*e.pstyle("text-outline-width").pfValue;if(j>0&&(t.lineWidth=j),e.pstyle("text-wrap").value==="wrap"){var Q=Mt(s,"labelWrapCachedLines",r),H=Mt(s,"labelLineHeight",r),te=g/2,_=this.getLabelJustification(e);switch(_==="auto"||(E==="left"?_==="left"?l+=-g:_==="center"&&(l+=-te):E==="center"?_==="left"?l+=-te:_==="right"&&(l+=te):E==="right"&&(_==="center"?l+=te:_==="right"&&(l+=g))),S){case"top":u-=(Q.length-1)*H;break;case"center":case"bottom":u-=(Q.length-1)*H;break}for(var z=0;z<Q.length;z++)j>0&&t.strokeText(Q[z],l,u),t.fillText(Q[z],l,u),u+=H}else j>0&&t.strokeText(v,l,u),t.fillText(v,l,u);w!==0&&(t.rotate(-w),t.translate(-h,-c))}}};var Jr={};Jr.drawNode=function(t,e,r){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o,l,u=e._private,h=u.rscratch,c=e.position();if(!(!oe(c.x)||!oe(c.y))&&!(i&&!e.visible())){var v=i?e.effectiveOpacity():1,d=s.usePaths(),g,m=!1,y=e.padding();o=e.width()+2*y,l=e.height()+2*y;var p;r&&(p=r,t.translate(-p.x1,-p.y1));for(var b=e.pstyle("background-image"),E=b.value,S=new Array(E.length),w=new Array(E.length),x=0,T=0;T<E.length;T++){var C=E[T],D=S[T]=C!=null&&C!=="none";if(D){var L=e.cy().style().getIndexedStyle(e,"background-image-crossorigin","value",T);x++,w[T]=s.getCachedImage(C,L,function(){u.backgroundTimestamp=Date.now(),e.emitAndNotify("background")})}}var O=e.pstyle("background-blacken").value,A=e.pstyle("border-width").pfValue,I=e.pstyle("background-opacity").value*v,M=e.pstyle("border-color").value,P=e.pstyle("border-style").value,R=e.pstyle("border-join").value,k=e.pstyle("border-cap").value,B=e.pstyle("border-position").value,F=e.pstyle("border-dash-pattern").pfValue,U=e.pstyle("border-dash-offset").pfValue,V=e.pstyle("border-opacity").value*v,G=e.pstyle("outline-width").pfValue,$=e.pstyle("outline-color").value,j=e.pstyle("outline-style").value,Q=e.pstyle("outline-opacity").value*v,H=e.pstyle("outline-offset").value,te=e.pstyle("corner-radius").value;te!=="auto"&&(te=e.pstyle("corner-radius").pfValue);var _=f(function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:I;s.eleFillStyle(t,e,ne)},"setupShapeColor"),z=f(function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:V;s.colorStrokeStyle(t,M[0],M[1],M[2],ne)},"setupBorderColor"),Z=f(function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Q;s.colorStrokeStyle(t,$[0],$[1],$[2],ne)},"setupOutlineColor"),K=f(function(ne,W,ae,me){var be=s.nodePathCache=s.nodePathCache||[],ve=Bo(ae==="polygon"?ae+","+me.join(","):ae,""+W,""+ne,""+te),we=be[ve],he,pe=!1;return we!=null?(he=we,pe=!0,h.pathCache=he):(he=new Path2D,be[ve]=h.pathCache=he),{path:he,cacheHit:pe}},"getPath"),ie=e.pstyle("shape").strValue,de=e.pstyle("shape-polygon-points").pfValue;if(d){t.translate(c.x,c.y);var re=K(o,l,ie,de);g=re.path,m=re.cacheHit}var se=f(function(){if(!m){var ne=c;d&&(ne={x:0,y:0}),s.nodeShapes[s.getNodeShape(e)].draw(g||t,ne.x,ne.y,o,l,te,h)}d?t.fill(g):t.fill()},"drawShape"),le=f(function(){for(var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v,W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,ae=u.backgrounding,me=0,be=0;be<w.length;be++){var ve=e.cy().style().getIndexedStyle(e,"background-image-containment","value",be);if(W&&ve==="over"||!W&&ve==="inside"){me++;continue}S[be]&&w[be].complete&&!w[be].error&&(me++,s.drawInscribedImage(t,w[be],e,be,ne))}u.backgrounding=me!==x,ae!==u.backgrounding&&e.updateStyle(!1)},"drawImages"),ce=f(function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v;s.hasPie(e)&&(s.drawPie(t,e,W),ne&&(d||s.nodeShapes[s.getNodeShape(e)].draw(t,c.x,c.y,o,l,te,h)))},"drawPie"),ue=f(function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v,W=(O>0?O:-O)*ne,ae=O>0?0:255;O!==0&&(s.colorFillStyle(t,ae,ae,ae,W),d?t.fill(g):t.fill())},"darken"),ye=f(function(){if(A>0){if(t.lineWidth=A,t.lineCap=k,t.lineJoin=R,t.setLineDash)switch(P){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(F),t.lineDashOffset=U;break;case"solid":case"double":t.setLineDash([]);break}if(B!=="center"){if(t.save(),t.lineWidth*=2,B==="inside")d?t.clip(g):t.clip();else{var ne=new Path2D;ne.rect(-o/2-A,-l/2-A,o+2*A,l+2*A),ne.addPath(g),t.clip(ne,"evenodd")}d?t.stroke(g):t.stroke(),t.restore()}else d?t.stroke(g):t.stroke();if(P==="double"){t.lineWidth=A/3;var W=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",d?t.stroke(g):t.stroke(),t.globalCompositeOperation=W}t.setLineDash&&t.setLineDash([])}},"drawBorder"),Oe=f(function(){if(G>0){if(t.lineWidth=G,t.lineCap="butt",t.setLineDash)switch(j){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([]);break}var ne=c;d&&(ne={x:0,y:0});var W=s.getNodeShape(e),ae=A;B==="inside"&&(ae=0),B==="outside"&&(ae*=2);var me=(o+ae+(G+H))/o,be=(l+ae+(G+H))/l,ve=o*me,we=l*be,he=s.nodeShapes[W].points,pe;if(d){var Ge=K(ve,we,W,he);pe=Ge.path}if(W==="ellipse")s.drawEllipsePath(pe||t,ne.x,ne.y,ve,we);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(W)){var ke=0,ft=0,Qe=0;W==="round-diamond"?ke=(ae+H+G)*1.4:W==="round-heptagon"?(ke=(ae+H+G)*1.075,Qe=-(ae/2+H+G)/35):W==="round-hexagon"?ke=(ae+H+G)*1.12:W==="round-pentagon"?(ke=(ae+H+G)*1.13,Qe=-(ae/2+H+G)/15):W==="round-tag"?(ke=(ae+H+G)*1.12,ft=(ae/2+G+H)*.07):W==="round-triangle"&&(ke=(ae+H+G)*(Math.PI/2),Qe=-(ae+H/2+G)/Math.PI),ke!==0&&(me=(o+ke)/o,ve=o*me,["round-hexagon","round-tag"].includes(W)||(be=(l+ke)/l,we=l*be)),te=te==="auto"?qo(ve,we):te;for(var Ye=ve/2,vt=we/2,Je=te+(ae+G+H)/2,ht=new Array(he.length/2),Tt=new Array(he.length/2),bt=0;bt<he.length/2;bt++)ht[bt]={x:ne.x+ft+Ye*he[bt*2],y:ne.y+Qe+vt*he[bt*2+1]};var dt,It,Ut,Ct,$e=ht.length;for(It=ht[$e-1],dt=0;dt<$e;dt++)Ut=ht[dt%$e],Ct=ht[(dt+1)%$e],Tt[dt]=Fi(It,Ut,Ct,Je),It=Ut,Ut=Ct;s.drawRoundPolygonPath(pe||t,ne.x+ft,ne.y+Qe,o*me,l*be,he,Tt)}else if(["roundrectangle","round-rectangle"].includes(W))te=te==="auto"?br(ve,we):te,s.drawRoundRectanglePath(pe||t,ne.x,ne.y,ve,we,te+(ae+G+H)/2);else if(["cutrectangle","cut-rectangle"].includes(W))te=te==="auto"?Di():te,s.drawCutRectanglePath(pe||t,ne.x,ne.y,ve,we,null,te+(ae+G+H)/4);else if(["bottomroundrectangle","bottom-round-rectangle"].includes(W))te=te==="auto"?br(ve,we):te,s.drawBottomRoundRectanglePath(pe||t,ne.x,ne.y,ve,we,te+(ae+G+H)/2);else if(W==="barrel")s.drawBarrelPath(pe||t,ne.x,ne.y,ve,we);else if(W.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(W)){var Ke=(ae+G+H)/o;he=fn(hn(he,Ke)),s.drawPolygonPath(pe||t,ne.x,ne.y,o,l,he)}else{var nt=(ae+G+H)/o;he=fn(hn(he,-nt)),s.drawPolygonPath(pe||t,ne.x,ne.y,o,l,he)}if(d?t.stroke(pe):t.stroke(),j==="double"){t.lineWidth=ae/3;var Dr=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",d?t.stroke(pe):t.stroke(),t.globalCompositeOperation=Dr}t.setLineDash&&t.setLineDash([])}},"drawOutline"),Te=f(function(){n&&s.drawNodeOverlay(t,e,c,o,l)},"drawOverlay"),xe=f(function(){n&&s.drawNodeUnderlay(t,e,c,o,l)},"drawUnderlay"),Se=f(function(){s.drawElementText(t,e,null,a)},"drawText"),ee=e.pstyle("ghost").value==="yes";if(ee){var N=e.pstyle("ghost-offset-x").pfValue,Y=e.pstyle("ghost-offset-y").pfValue,J=e.pstyle("ghost-opacity").value,q=J*v;t.translate(N,Y),Z(),Oe(),_(J*I),se(),le(q,!0),z(J*V),ye(),ce(O!==0||A!==0),le(q,!1),ue(q),t.translate(-N,-Y)}d&&t.translate(-c.x,-c.y),xe(),d&&t.translate(c.x,c.y),Z(),Oe(),_(),se(),le(v,!0),z(),ye(),ce(O!==0||A!==0),le(v,!1),ue(),d&&t.translate(-c.x,-c.y),Se(),Te(),r&&t.translate(p.x1,p.y1)}};var Zu=f(function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,a,n,i,s){var o=this;if(a.visible()){var l=a.pstyle("".concat(e,"-padding")).pfValue,u=a.pstyle("".concat(e,"-opacity")).value,h=a.pstyle("".concat(e,"-color")).value,c=a.pstyle("".concat(e,"-shape")).value,v=a.pstyle("".concat(e,"-corner-radius")).value;if(u>0){if(n=n||a.position(),i==null||s==null){var d=a.padding();i=a.width()+2*d,s=a.height()+2*d}o.colorFillStyle(r,h[0],h[1],h[2],u),o.nodeShapes[c].draw(r,n.x,n.y,i+l*2,s+l*2,v),r.fill()}}}},"drawNodeOverlayUnderlay");Jr.drawNodeOverlay=Zu("overlay");Jr.drawNodeUnderlay=Zu("underlay");Jr.hasPie=function(t){return t=t[0],t._private.hasPie};Jr.drawPie=function(t,e,r,a){e=e[0],a=a||e.position();var n=e.cy().style(),i=e.pstyle("pie-size"),s=a.x,o=a.y,l=e.width(),u=e.height(),h=Math.min(l,u)/2,c=0,v=this.usePaths();v&&(s=0,o=0),i.units==="%"?h=h*i.pfValue:i.pfValue!==void 0&&(h=i.pfValue/2);for(var d=1;d<=n.pieBackgroundN;d++){var g=e.pstyle("pie-"+d+"-background-size").value,m=e.pstyle("pie-"+d+"-background-color").value,y=e.pstyle("pie-"+d+"-background-opacity").value*r,p=g/100;p+c>1&&(p=1-c);var b=1.5*Math.PI+2*Math.PI*c,E=2*Math.PI*p,S=b+E;g===0||c>=1||c+p>1||(t.beginPath(),t.moveTo(s,o),t.arc(s,o,h,b,S),t.closePath(),this.colorFillStyle(t,m[0],m[1],m[2],y),t.fill(),c+=p)}};var mt={},iy=100;mt.getPixelRatio=function(){var t=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),r=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/r};mt.paintCache=function(t){for(var e=this.paintCaches=this.paintCaches||[],r=!0,a,n=0;n<e.length;n++)if(a=e[n],a.context===t){r=!1;break}return r&&(a={context:t},e.push(a)),a};mt.createGradientStyleFor=function(t,e,r,a,n){var i,s=this.usePaths(),o=r.pstyle(e+"-gradient-stop-colors").value,l=r.pstyle(e+"-gradient-stop-positions").pfValue;if(a==="radial-gradient")if(r.isEdge()){var u=r.sourceEndpoint(),h=r.targetEndpoint(),c=r.midpoint(),v=mr(u,c),d=mr(h,c);i=t.createRadialGradient(c.x,c.y,0,c.x,c.y,Math.max(v,d))}else{var g=s?{x:0,y:0}:r.position(),m=r.paddedWidth(),y=r.paddedHeight();i=t.createRadialGradient(g.x,g.y,0,g.x,g.y,Math.max(m,y))}else if(r.isEdge()){var p=r.sourceEndpoint(),b=r.targetEndpoint();i=t.createLinearGradient(p.x,p.y,b.x,b.y)}else{var E=s?{x:0,y:0}:r.position(),S=r.paddedWidth(),w=r.paddedHeight(),x=S/2,T=w/2,C=r.pstyle("background-gradient-direction").value;switch(C){case"to-bottom":i=t.createLinearGradient(E.x,E.y-T,E.x,E.y+T);break;case"to-top":i=t.createLinearGradient(E.x,E.y+T,E.x,E.y-T);break;case"to-left":i=t.createLinearGradient(E.x+x,E.y,E.x-x,E.y);break;case"to-right":i=t.createLinearGradient(E.x-x,E.y,E.x+x,E.y);break;case"to-bottom-right":case"to-right-bottom":i=t.createLinearGradient(E.x-x,E.y-T,E.x+x,E.y+T);break;case"to-top-right":case"to-right-top":i=t.createLinearGradient(E.x-x,E.y+T,E.x+x,E.y-T);break;case"to-bottom-left":case"to-left-bottom":i=t.createLinearGradient(E.x+x,E.y-T,E.x-x,E.y+T);break;case"to-top-left":case"to-left-top":i=t.createLinearGradient(E.x+x,E.y+T,E.x-x,E.y-T);break}}if(!i)return null;for(var D=l.length===o.length,L=o.length,O=0;O<L;O++)i.addColorStop(D?l[O]:O/(L-1),"rgba("+o[O][0]+","+o[O][1]+","+o[O][2]+","+n+")");return i};mt.gradientFillStyle=function(t,e,r,a){var n=this.createGradientStyleFor(t,"background",e,r,a);if(!n)return null;t.fillStyle=n};mt.colorFillStyle=function(t,e,r,a,n){t.fillStyle="rgba("+e+","+r+","+a+","+n+")"};mt.eleFillStyle=function(t,e,r){var a=e.pstyle("background-fill").value;if(a==="linear-gradient"||a==="radial-gradient")this.gradientFillStyle(t,e,a,r);else{var n=e.pstyle("background-color").value;this.colorFillStyle(t,n[0],n[1],n[2],r)}};mt.gradientStrokeStyle=function(t,e,r,a){var n=this.createGradientStyleFor(t,"line",e,r,a);if(!n)return null;t.strokeStyle=n};mt.colorStrokeStyle=function(t,e,r,a,n){t.strokeStyle="rgba("+e+","+r+","+a+","+n+")"};mt.eleStrokeStyle=function(t,e,r){var a=e.pstyle("line-fill").value;if(a==="linear-gradient"||a==="radial-gradient")this.gradientStrokeStyle(t,e,a,r);else{var n=e.pstyle("line-color").value;this.colorStrokeStyle(t,n[0],n[1],n[2],r)}};mt.matchCanvasSize=function(t){var e=this,r=e.data,a=e.findContainerClientCoords(),n=a[2],i=a[3],s=e.getPixelRatio(),o=e.motionBlurPxRatio;(t===e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE]||t===e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG])&&(s=o);var l=n*s,u=i*s,h;if(!(l===e.canvasWidth&&u===e.canvasHeight)){e.fontCaches=null;var c=r.canvasContainer;c.style.width=n+"px",c.style.height=i+"px";for(var v=0;v<e.CANVAS_LAYERS;v++)h=r.canvases[v],h.width=l,h.height=u,h.style.width=n+"px",h.style.height=i+"px";for(var v=0;v<e.BUFFER_COUNT;v++)h=r.bufferCanvases[v],h.width=l,h.height=u,h.style.width=n+"px",h.style.height=i+"px";e.textureMult=1,s<=1&&(h=r.bufferCanvases[e.TEXTURE_BUFFER],e.textureMult=2,h.width=l*e.textureMult,h.height=u*e.textureMult),e.canvasWidth=l,e.canvasHeight=u}};mt.renderTo=function(t,e,r,a){this.render({forcedContext:t,forcedZoom:e,forcedPan:r,drawAllLayers:!0,forcedPxRatio:a})};mt.render=function(t){t=t||Vo();var e=t.forcedContext,r=t.drawAllLayers,a=t.drawOnlyNodeLayer,n=t.forcedZoom,i=t.forcedPan,s=this,o=t.forcedPxRatio===void 0?this.getPixelRatio():t.forcedPxRatio,l=s.cy,u=s.data,h=u.canvasNeedsRedraw,c=s.textureOnViewport&&!e&&(s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming),v=t.motionBlur!==void 0?t.motionBlur:s.motionBlur,d=s.motionBlurPxRatio,g=l.hasCompoundNodes(),m=s.hoverData.draggingEles,y=!!(s.hoverData.selecting||s.touchData.selecting);v=v&&!e&&s.motionBlurEnabled&&!y;var p=v;e||(s.prevPxRatio!==o&&(s.invalidateContainerClientCoordsCache(),s.matchCanvasSize(s.container),s.redrawHint("eles",!0),s.redrawHint("drag",!0)),s.prevPxRatio=o),!e&&s.motionBlurTimeout&&clearTimeout(s.motionBlurTimeout),v&&(s.mbFrames==null&&(s.mbFrames=0),s.mbFrames++,s.mbFrames<3&&(p=!1),s.mbFrames>s.minMbLowQualFrames&&(s.motionBlurPxRatio=s.mbPxRBlurry)),s.clearingMotionBlur&&(s.motionBlurPxRatio=1),s.textureDrawLastFrame&&!c&&(h[s.NODE]=!0,h[s.SELECT_BOX]=!0);var b=l.style(),E=l.zoom(),S=n!==void 0?n:E,w=l.pan(),x={x:w.x,y:w.y},T={zoom:E,pan:{x:w.x,y:w.y}},C=s.prevViewport,D=C===void 0||T.zoom!==C.zoom||T.pan.x!==C.pan.x||T.pan.y!==C.pan.y;!D&&!(m&&!g)&&(s.motionBlurPxRatio=1),i&&(x=i),S*=o,x.x*=o,x.y*=o;var L=s.getCachedZSortedEles();function O(re,se,le,ce,ue){var ye=re.globalCompositeOperation;re.globalCompositeOperation="destination-out",s.colorFillStyle(re,255,255,255,s.motionBlurTransparency),re.fillRect(se,le,ce,ue),re.globalCompositeOperation=ye}f(O,"mbclear");function A(re,se){var le,ce,ue,ye;!s.clearingMotionBlur&&(re===u.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]||re===u.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG])?(le={x:w.x*d,y:w.y*d},ce=E*d,ue=s.canvasWidth*d,ye=s.canvasHeight*d):(le=x,ce=S,ue=s.canvasWidth,ye=s.canvasHeight),re.setTransform(1,0,0,1,0,0),se==="motionBlur"?O(re,0,0,ue,ye):!e&&(se===void 0||se)&&re.clearRect(0,0,ue,ye),r||(re.translate(le.x,le.y),re.scale(ce,ce)),i&&re.translate(i.x,i.y),n&&re.scale(n,n)}if(f(A,"setContextTransform"),c||(s.textureDrawLastFrame=!1),c){if(s.textureDrawLastFrame=!0,!s.textureCache){s.textureCache={},s.textureCache.bb=l.mutableElements().boundingBox(),s.textureCache.texture=s.data.bufferCanvases[s.TEXTURE_BUFFER];var I=s.data.bufferContexts[s.TEXTURE_BUFFER];I.setTransform(1,0,0,1,0,0),I.clearRect(0,0,s.canvasWidth*s.textureMult,s.canvasHeight*s.textureMult),s.render({forcedContext:I,drawOnlyNodeLayer:!0,forcedPxRatio:o*s.textureMult});var T=s.textureCache.viewport={zoom:l.zoom(),pan:l.pan(),width:s.canvasWidth,height:s.canvasHeight};T.mpan={x:(0-T.pan.x)/T.zoom,y:(0-T.pan.y)/T.zoom}}h[s.DRAG]=!1,h[s.NODE]=!1;var M=u.contexts[s.NODE],P=s.textureCache.texture,T=s.textureCache.viewport;M.setTransform(1,0,0,1,0,0),v?O(M,0,0,T.width,T.height):M.clearRect(0,0,T.width,T.height);var R=b.core("outside-texture-bg-color").value,k=b.core("outside-texture-bg-opacity").value;s.colorFillStyle(M,R[0],R[1],R[2],k),M.fillRect(0,0,T.width,T.height);var E=l.zoom();A(M,!1),M.clearRect(T.mpan.x,T.mpan.y,T.width/T.zoom/o,T.height/T.zoom/o),M.drawImage(P,T.mpan.x,T.mpan.y,T.width/T.zoom/o,T.height/T.zoom/o)}else s.textureOnViewport&&!e&&(s.textureCache=null);var B=l.extent(),F=s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming||s.hoverData.draggingEles||s.cy.animated(),U=s.hideEdgesOnViewport&&F,V=[];if(V[s.NODE]=!h[s.NODE]&&v&&!s.clearedForMotionBlur[s.NODE]||s.clearingMotionBlur,V[s.NODE]&&(s.clearedForMotionBlur[s.NODE]=!0),V[s.DRAG]=!h[s.DRAG]&&v&&!s.clearedForMotionBlur[s.DRAG]||s.clearingMotionBlur,V[s.DRAG]&&(s.clearedForMotionBlur[s.DRAG]=!0),h[s.NODE]||r||a||V[s.NODE]){var G=v&&!V[s.NODE]&&d!==1,M=e||(G?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]:u.contexts[s.NODE]),$=v&&!G?"motionBlur":void 0;A(M,$),U?s.drawCachedNodes(M,L.nondrag,o,B):s.drawLayeredElements(M,L.nondrag,o,B),s.debug&&s.drawDebugPoints(M,L.nondrag),!r&&!v&&(h[s.NODE]=!1)}if(!a&&(h[s.DRAG]||r||V[s.DRAG])){var G=v&&!V[s.DRAG]&&d!==1,M=e||(G?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]:u.contexts[s.DRAG]);A(M,v&&!G?"motionBlur":void 0),U?s.drawCachedNodes(M,L.drag,o,B):s.drawCachedElements(M,L.drag,o,B),s.debug&&s.drawDebugPoints(M,L.drag),!r&&!v&&(h[s.DRAG]=!1)}if(s.showFps||!a&&h[s.SELECT_BOX]&&!r){var M=e||u.contexts[s.SELECT_BOX];if(A(M),s.selection[4]==1&&(s.hoverData.selecting||s.touchData.selecting)){var E=s.cy.zoom(),j=b.core("selection-box-border-width").value/E;M.lineWidth=j,M.fillStyle="rgba("+b.core("selection-box-color").value[0]+","+b.core("selection-box-color").value[1]+","+b.core("selection-box-color").value[2]+","+b.core("selection-box-opacity").value+")",M.fillRect(s.selection[0],s.selection[1],s.selection[2]-s.selection[0],s.selection[3]-s.selection[1]),j>0&&(M.strokeStyle="rgba("+b.core("selection-box-border-color").value[0]+","+b.core("selection-box-border-color").value[1]+","+b.core("selection-box-border-color").value[2]+","+b.core("selection-box-opacity").value+")",M.strokeRect(s.selection[0],s.selection[1],s.selection[2]-s.selection[0],s.selection[3]-s.selection[1]))}if(u.bgActivePosistion&&!s.hoverData.selecting){var E=s.cy.zoom(),Q=u.bgActivePosistion;M.fillStyle="rgba("+b.core("active-bg-color").value[0]+","+b.core("active-bg-color").value[1]+","+b.core("active-bg-color").value[2]+","+b.core("active-bg-opacity").value+")",M.beginPath(),M.arc(Q.x,Q.y,b.core("active-bg-size").pfValue/E,0,2*Math.PI),M.fill()}var H=s.lastRedrawTime;if(s.showFps&&H){H=Math.round(H);var te=Math.round(1e3/H);M.setTransform(1,0,0,1,0,0),M.fillStyle="rgba(255, 0, 0, 0.75)",M.strokeStyle="rgba(255, 0, 0, 0.75)",M.lineWidth=1,M.fillText("1 frame = "+H+" ms = "+te+" fps",0,20);var _=60;M.strokeRect(0,30,250,20),M.fillRect(0,30,250*Math.min(te/_,1),20)}r||(h[s.SELECT_BOX]=!1)}if(v&&d!==1){var z=u.contexts[s.NODE],Z=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_NODE],K=u.contexts[s.DRAG],ie=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_DRAG],de=f(function(se,le,ce){se.setTransform(1,0,0,1,0,0),ce||!p?se.clearRect(0,0,s.canvasWidth,s.canvasHeight):O(se,0,0,s.canvasWidth,s.canvasHeight);var ue=d;
vendor: 4,665 bytes, line 11
11se.drawImage(le,0,0,s.canvasWidth*ue,s.canvasHeight*ue,0,0,s.canvasWidth,s.canvasHeight)},"drawMotionBlur");(h[s.NODE]||V[s.NODE])&&(de(z,Z,V[s.NODE]),h[s.NODE]=!1),(h[s.DRAG]||V[s.DRAG])&&(de(K,ie,V[s.DRAG]),h[s.DRAG]=!1)}s.prevViewport=T,s.clearingMotionBlur&&(s.clearingMotionBlur=!1,s.motionBlurCleared=!0,s.motionBlur=!0),v&&(s.motionBlurTimeout=setTimeout(function(){s.motionBlurTimeout=null,s.clearedForMotionBlur[s.NODE]=!1,s.clearedForMotionBlur[s.DRAG]=!1,s.motionBlur=!1,s.clearingMotionBlur=!c,s.mbFrames=0,h[s.NODE]=!0,h[s.DRAG]=!0,s.redraw()},iy)),e||l.emit("render")};var ur={};ur.drawPolygonPath=function(t,e,r,a,n,i){var s=a/2,o=n/2;t.beginPath&&t.beginPath(),t.moveTo(e+s*i[0],r+o*i[1]);for(var l=1;l<i.length/2;l++)t.lineTo(e+s*i[l*2],r+o*i[l*2+1]);t.closePath()};ur.drawRoundPolygonPath=function(t,e,r,a,n,i,s){s.forEach(function(o){return Gu(t,o)}),t.closePath()};ur.drawRoundRectanglePath=function(t,e,r,a,n,i){var s=a/2,o=n/2,l=i==="auto"?br(a,n):Math.min(i,o,s);t.beginPath&&t.beginPath(),t.moveTo(e,r-o),t.arcTo(e+s,r-o,e+s,r,l),t.arcTo(e+s,r+o,e,r+o,l),t.arcTo(e-s,r+o,e-s,r,l),t.arcTo(e-s,r-o,e,r-o,l),t.lineTo(e,r-o),t.closePath()};ur.drawBottomRoundRectanglePath=function(t,e,r,a,n,i){var s=a/2,o=n/2,l=i==="auto"?br(a,n):i;t.beginPath&&t.beginPath(),t.moveTo(e,r-o),t.lineTo(e+s,r-o),t.lineTo(e+s,r),t.arcTo(e+s,r+o,e,r+o,l),t.arcTo(e-s,r+o,e-s,r,l),t.lineTo(e-s,r-o),t.lineTo(e,r-o),t.closePath()};ur.drawCutRectanglePath=function(t,e,r,a,n,i,s){var o=a/2,l=n/2,u=s==="auto"?Di():s;t.beginPath&&t.beginPath(),t.moveTo(e-o+u,r-l),t.lineTo(e+o-u,r-l),t.lineTo(e+o,r-l+u),t.lineTo(e+o,r+l-u),t.lineTo(e+o-u,r+l),t.lineTo(e-o+u,r+l),t.lineTo(e-o,r+l-u),t.lineTo(e-o,r-l+u),t.closePath()};ur.drawBarrelPath=function(t,e,r,a,n){var i=a/2,s=n/2,o=e-i,l=e+i,u=r-s,h=r+s,c=ti(a,n),v=c.widthOffset,d=c.heightOffset,g=c.ctrlPtOffsetPct*v;t.beginPath&&t.beginPath(),t.moveTo(o,u+d),t.lineTo(o,h-d),t.quadraticCurveTo(o+g,h,o+v,h),t.lineTo(l-v,h),t.quadraticCurveTo(l-g,h,l,h-d),t.lineTo(l,u+d),t.quadraticCurveTo(l-g,u,l-v,u),t.lineTo(o+v,u),t.quadraticCurveTo(o+g,u,o,u+d),t.closePath()};var mo=Math.sin(0),bo=Math.cos(0),vi={},di={},Qu=Math.PI/40;for(fr=0*Math.PI;fr<2*Math.PI;fr+=Qu)vi[fr]=Math.sin(fr),di[fr]=Math.cos(fr);var fr;ur.drawEllipsePath=function(t,e,r,a,n){if(t.beginPath&&t.beginPath(),t.ellipse)t.ellipse(e,r,a/2,n/2,0,0,2*Math.PI);else for(var i,s,o=a/2,l=n/2,u=0*Math.PI;u<2*Math.PI;u+=Qu)i=e-o*vi[u]*mo+o*di[u]*bo,s=r+l*di[u]*mo+l*vi[u]*bo,u===0?t.moveTo(i,s):t.lineTo(i,s);t.closePath()};var Ra={};Ra.createBuffer=function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,[r,r.getContext("2d")]};Ra.bufferCanvasImage=function(t){var e=this.cy,r=e.mutableElements(),a=r.boundingBox(),n=this.findContainerClientCoords(),i=t.full?Math.ceil(a.w):n[2],s=t.full?Math.ceil(a.h):n[3],o=oe(t.maxWidth)||oe(t.maxHeight),l=this.getPixelRatio(),u=1;if(t.scale!==void 0)i*=t.scale,s*=t.scale,u=t.scale;else if(o){var h=1/0,c=1/0;oe(t.maxWidth)&&(h=u*t.maxWidth/i),oe(t.maxHeight)&&(c=u*t.maxHeight/s),u=Math.min(h,c),i*=u,s*=u}o||(i*=l,s*=l,u*=l);var v=document.createElement("canvas");v.width=i,v.height=s,v.style.width=i+"px",v.style.height=s+"px";var d=v.getContext("2d");if(i>0&&s>0){d.clearRect(0,0,i,s),d.globalCompositeOperation="source-over";var g=this.getCachedZSortedEles();if(t.full)d.translate(-a.x1*u,-a.y1*u),d.scale(u,u),this.drawElements(d,g),d.scale(1/u,1/u),d.translate(a.x1*u,a.y1*u);else{var m=e.pan(),y={x:m.x*u,y:m.y*u};u*=e.zoom(),d.translate(y.x,y.y),d.scale(u,u),this.drawElements(d,g),d.scale(1/u,1/u),d.translate(-y.x,-y.y)}t.bg&&(d.globalCompositeOperation="destination-over",d.fillStyle=t.bg,d.rect(0,0,i,s),d.fill())}return v};function sy(t,e){for(var r=atob(t),a=new ArrayBuffer(r.length),n=new Uint8Array(a),i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return new Blob([a],{type:e})}f(sy,"b64ToBlob");function Eo(t){var e=t.indexOf(",");return t.substr(e+1)}f(Eo,"b64UriToB64");function Ju(t,e,r){var a=f(function(){return e.toDataURL(r,t.quality)},"getB64Uri");switch(t.output){case"blob-promise":return new _r(function(n,i){try{e.toBlob(function(s){s!=null?n(s):i(new Error("`canvas.toBlob()` sent a null value in its callback"))},r,t.quality)}catch(s){i(s)}});case"blob":return sy(Eo(a()),r);case"base64":return Eo(a());case"base64uri":default:return a()}}f(Ju,"output");Ra.png=function(t){return Ju(t,this.bufferCanvasImage(t),"image/png")};Ra.jpg=function(t){return Ju(t,this.bufferCanvasImage(t),"image/jpeg")};var ju={};ju.nodeShapeImpl=function(t,e,r,a,n,i,s,o){switch(t){case"ellipse":return this.drawEllipsePath(e,r,a,n,i);case"polygon":return this.drawPolygonPath(e,r,a,n,i,s);
vendor: 5,535 bytes, line 11
11case"round-polygon":return this.drawRoundPolygonPath(e,r,a,n,i,s,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,r,a,n,i,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,r,a,n,i,s,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,r,a,n,i,o);case"barrel":return this.drawBarrelPath(e,r,a,n,i)}};var oy=el,Le=el.prototype;Le.CANVAS_LAYERS=3;Le.SELECT_BOX=0;Le.DRAG=1;Le.NODE=2;Le.BUFFER_COUNT=3;Le.TEXTURE_BUFFER=0;Le.MOTIONBLUR_BUFFER_NODE=1;Le.MOTIONBLUR_BUFFER_DRAG=2;function el(t){var e=this,r=e.cy.window(),a=r.document;e.data={canvases:new Array(Le.CANVAS_LAYERS),contexts:new Array(Le.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Le.CANVAS_LAYERS),bufferCanvases:new Array(Le.BUFFER_COUNT),bufferContexts:new Array(Le.CANVAS_LAYERS)};var n="-webkit-tap-highlight-color",i="rgba(0,0,0,0)";e.data.canvasContainer=a.createElement("div");var s=e.data.canvasContainer.style;e.data.canvasContainer.style[n]=i,s.position="relative",s.zIndex="0",s.overflow="hidden";var o=t.cy.container();o.appendChild(e.data.canvasContainer),o.style[n]=i;var l={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};ql()&&(l["-ms-touch-action"]="none",l["touch-action"]="none");for(var u=0;u<Le.CANVAS_LAYERS;u++){var h=e.data.canvases[u]=a.createElement("canvas");e.data.contexts[u]=h.getContext("2d"),Object.keys(l).forEach(function(_){h.style[_]=l[_]}),h.style.position="absolute",h.setAttribute("data-id","layer"+u),h.style.zIndex=String(Le.CANVAS_LAYERS-u),e.data.canvasContainer.appendChild(h),e.data.canvasNeedsRedraw[u]=!1}e.data.topCanvas=e.data.canvases[0],e.data.canvases[Le.NODE].setAttribute("data-id","layer"+Le.NODE+"-node"),e.data.canvases[Le.SELECT_BOX].setAttribute("data-id","layer"+Le.SELECT_BOX+"-selectbox"),e.data.canvases[Le.DRAG].setAttribute("data-id","layer"+Le.DRAG+"-drag");for(var u=0;u<Le.BUFFER_COUNT;u++)e.data.bufferCanvases[u]=a.createElement("canvas"),e.data.bufferContexts[u]=e.data.bufferCanvases[u].getContext("2d"),e.data.bufferCanvases[u].style.position="absolute",e.data.bufferCanvases[u].setAttribute("data-id","buffer"+u),e.data.bufferCanvases[u].style.zIndex=String(-u-1),e.data.bufferCanvases[u].style.visibility="hidden";e.pathsEnabled=!0;var c=pt(),v=f(function(z){return{x:(z.x1+z.x2)/2,y:(z.y1+z.y2)/2}},"getBoxCenter"),d=f(function(z){return{x:-z.w/2,y:-z.h/2}},"getCenterOffset"),g=f(function(z){var Z=z[0]._private,K=Z.oldBackgroundTimestamp===Z.backgroundTimestamp;return!K},"backgroundTimestampHasChanged"),m=f(function(z){return z[0]._private.nodeKey},"getStyleKey"),y=f(function(z){return z[0]._private.labelStyleKey},"getLabelKey"),p=f(function(z){return z[0]._private.sourceLabelStyleKey},"getSourceLabelKey"),b=f(function(z){return z[0]._private.targetLabelStyleKey},"getTargetLabelKey"),E=f(function(z,Z,K,ie,de){return e.drawElement(z,Z,K,!1,!1,de)},"drawElement"),S=f(function(z,Z,K,ie,de){return e.drawElementText(z,Z,K,ie,"main",de)},"drawLabel"),w=f(function(z,Z,K,ie,de){return e.drawElementText(z,Z,K,ie,"source",de)},"drawSourceLabel"),x=f(function(z,Z,K,ie,de){return e.drawElementText(z,Z,K,ie,"target",de)},"drawTargetLabel"),T=f(function(z){return z.boundingBox(),z[0]._private.bodyBounds},"getElementBox"),C=f(function(z){return z.boundingBox(),z[0]._private.labelBounds.main||c},"getLabelBox"),D=f(function(z){return z.boundingBox(),z[0]._private.labelBounds.source||c},"getSourceLabelBox"),L=f(function(z){return z.boundingBox(),z[0]._private.labelBounds.target||c},"getTargetLabelBox"),O=f(function(z,Z){return Z},"isLabelVisibleAtScale"),A=f(function(z){return v(T(z))},"getElementRotationPoint"),I=f(function(z,Z,K){var ie=z?z+"-":"";return{x:Z.x+K.pstyle(ie+"text-margin-x").pfValue,y:Z.y+K.pstyle(ie+"text-margin-y").pfValue}},"addTextMargin"),M=f(function(z,Z,K){var ie=z[0]._private.rscratch;return{x:ie[Z],y:ie[K]}},"getRsPt"),P=f(function(z){return I("",M(z,"labelX","labelY"),z)},"getLabelRotationPoint"),R=f(function(z){return I("source",M(z,"sourceLabelX","sourceLabelY"),z)},"getSourceLabelRotationPoint"),k=f(function(z){return I("target",M(z,"targetLabelX","targetLabelY"),z)},"getTargetLabelRotationPoint"),B=f(function(z){return d(T(z))},"getElementRotationOffset"),F=f(function(z){return d(D(z))},"getSourceLabelRotationOffset"),U=f(function(z){return d(L(z))},"getTargetLabelRotationOffset"),V=f(function(z){var Z=C(z),K=d(C(z));if(z.isNode()){switch(z.pstyle("text-halign").value){case"left":K.x=-Z.w;break;case"right":K.x=0;break}switch(z.pstyle("text-valign").value){case"top":K.y=-Z.h;break;case"bottom":K.y=0;break}}return K},"getLabelRotationOffset"),G=e.data.eleTxrCache=new ca(e,{getKey:m,doesEleInvalidateKey:g,drawElement:E,getBoundingBox:T,getRotationPoint:A,getRotationOffset:B,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),$=e.data.lblTxrCache=new ca(e,{getKey:y,drawElement:S,getBoundingBox:C,getRotationPoint:P,getRotationOffset:V,isVisible:O}),j=e.data.slbTxrCache=new ca(e,{getKey:p,drawElement:w,getBoundingBox:D,getRotationPoint:R,getRotationOffset:F,isVisible:O}),Q=e.data.tlbTxrCache=new ca(e,{getKey:b,drawElement:x,getBoundingBox:L,getRotationPoint:k,getRotationOffset:U,isVisible:O}),H=e.data.lyrTxrCache=new qu(e);e.onUpdateEleCalcs(f(function(z,Z){G.invalidateElements(Z),$.invalidateElements(Z),j.invalidateElements(Z),Q.invalidateElements(Z),H.invalidateElements(Z);for(var K=0;K<Z.length;K++){var ie=Z[K]._private;
vendor: 4,559 bytes, line 11
11ie.oldBackgroundTimestamp=ie.backgroundTimestamp}},"invalidateTextureCaches"));var te=f(function(z){for(var Z=0;Z<z.length;Z++)H.enqueueElementRefinement(z[Z].ele)},"refineInLayers");G.onDequeue(te),$.onDequeue(te),j.onDequeue(te),Q.onDequeue(te)}f(el,"CanvasRenderer");Le.redrawHint=function(t,e){var r=this;switch(t){case"eles":r.data.canvasNeedsRedraw[Le.NODE]=e;break;case"drag":r.data.canvasNeedsRedraw[Le.DRAG]=e;break;case"select":r.data.canvasNeedsRedraw[Le.SELECT_BOX]=e;break}};var uy=typeof Path2D<"u";Le.path2dEnabled=function(t){if(t===void 0)return this.pathsEnabled;this.pathsEnabled=!!t};Le.usePaths=function(){return uy&&this.pathsEnabled};Le.setImgSmoothing=function(t,e){t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e)};Le.getImgSmoothing=function(t){return t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled};Le.makeOffscreenCanvas=function(t,e){var r;if((typeof OffscreenCanvas>"u"?"undefined":qe(OffscreenCanvas))!=="undefined")r=new OffscreenCanvas(t,e);else{var a=this.cy.window(),n=a.document;r=n.createElement("canvas"),r.width=t,r.height=e}return r};[Wu,Vt,Kt,zi,Cr,Jr,mt,ur,Ra,ju].forEach(function(t){Ee(Le,t)});var ly=[{name:"null",impl:Pu},{name:"base",impl:Hu},{name:"canvas",impl:oy}],fy=[{type:"layout",extensions:pp},{type:"renderer",extensions:ly}],tl={},rl={};function al(t,e,r){var a=r,n=f(function(C){Ne("Can not register `"+e+"` for `"+t+"` since `"+C+"` already exists in the prototype and can not be overridden")},"overrideErr");if(t==="core"){if(Da.prototype[e])return n(e);Da.prototype[e]=r}else if(t==="collection"){if(tt.prototype[e])return n(e);tt.prototype[e]=r}else if(t==="layout"){for(var i=f(function(C){this.options=C,r.call(this,C),De(this._private)||(this._private={}),this._private.cy=C.cy,this._private.listeners=[],this.createEmitter()},"Layout"),s=i.prototype=Object.create(r.prototype),o=[],l=0;l<o.length;l++){var u=o[l];s[u]=s[u]||function(){return this}}s.start&&!s.run?s.run=function(){return this.start(),this}:!s.start&&s.run&&(s.start=function(){return this.run(),this});var h=r.prototype.stop;s.stop=function(){var T=this.options;if(T&&T.animate){var C=this.animations;if(C)for(var D=0;D<C.length;D++)C[D].stop()}return h?h.call(this):this.emit("layoutstop"),this},s.destroy||(s.destroy=function(){return this}),s.cy=function(){return this._private.cy};var c=f(function(C){return C._private.cy},"getCy"),v={addEventFields:f(function(C,D){D.layout=C,D.cy=c(C),D.target=C},"addEventFields"),bubble:f(function(){return!0},"bubble"),parent:f(function(C){return c(C)},"parent")};Ee(s,{createEmitter:f(function(){return this._private.emitter=new An(v,this),this},"createEmitter"),emitter:f(function(){return this._private.emitter},"emitter"),on:f(function(C,D){return this.emitter().on(C,D),this},"on"),one:f(function(C,D){return this.emitter().one(C,D),this},"one"),once:f(function(C,D){return this.emitter().one(C,D),this},"once"),removeListener:f(function(C,D){return this.emitter().removeListener(C,D),this},"removeListener"),removeAllListeners:f(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),emit:f(function(C,D){return this.emitter().emit(C,D),this},"emit")}),Me.eventAliasesOn(s),a=i}else if(t==="renderer"&&e!=="null"&&e!=="base"){var d=nl("renderer","base"),g=d.prototype,m=r,y=r.prototype,p=f(function(){d.apply(this,arguments),m.apply(this,arguments)},"Renderer"),b=p.prototype;for(var E in g){var S=g[E],w=y[E]!=null;if(w)return n(E);b[E]=S}for(var x in y)b[x]=y[x];g.clientFunctions.forEach(function(T){b[T]=b[T]||function(){Ve("Renderer does not implement `renderer."+T+"()` on its prototype")}}),a=p}else if(t==="__proto__"||t==="constructor"||t==="prototype")return Ve(t+" is an illegal type to be registered, possibly lead to prototype pollutions");return Oo({map:tl,keys:[t,e],value:a})}f(al,"setExtension");function nl(t,e){return Mo({map:tl,keys:[t,e]})}f(nl,"getExtension");function hy(t,e,r,a,n){return Oo({map:rl,keys:[t,e,r,a],value:n})}f(hy,"setModule");function cy(t,e,r,a){return Mo({map:rl,keys:[t,e,r,a]})}f(cy,"getModule");var gi=f(function(){if(arguments.length===2)return nl.apply(null,arguments);if(arguments.length===3)return al.apply(null,arguments);if(arguments.length===4)return cy.apply(null,arguments);if(arguments.length===5)return hy.apply(null,arguments);Ve("Invalid extension access syntax")},"extension");Da.prototype.extension=gi;
vendor: 10,446 bytes, lines 11-118
11fy.forEach(function(t){t.extensions.forEach(function(e){al(t.type,e.name,e.impl)})});var il=f(function t(){if(!(this instanceof t))return new t;this.length=0},"Stylesheet"),xr=il.prototype;xr.instanceString=function(){return"stylesheet"};xr.selector=function(t){var e=this.length++;return this[e]={selector:t,properties:[]},this};xr.css=function(t,e){var r=this.length-1;if(ge(t))this[r].properties.push({name:t,value:e});else if(De(t))for(var a=t,n=Object.keys(a),i=0;i<n.length;i++){var s=n[i],o=a[s];if(o!=null){var l=it.properties[s]||it.properties[mn(s)];if(l!=null){var u=l.name,h=o;this[r].properties.push({name:u,value:h})}}}return this};xr.style=xr.css;xr.generateStyle=function(t){var e=new it(t);return this.appendToStyle(e)};xr.appendToStyle=function(t){for(var e=0;e<this.length;e++){var r=this[e],a=r.selector,n=r.properties;t.selector(a);for(var i=0;i<n.length;i++){var s=n[i];t.css(s.name,s.value)}}return t};var vy="3.30.1",qt=f(function(e){if(e===void 0&&(e={}),De(e))return new Da(e);if(ge(e))return gi.apply(gi,arguments)},"cytoscape");qt.use=function(t){var e=Array.prototype.slice.call(arguments,1);return e.unshift(qt),t.apply(null,e),this};qt.warnings=function(t){return Go(t)};qt.version=vy;qt.stylesheet=qt.Stylesheet=il;var ll=Tl(sl(),1);var dy=12,gy=f(function(t,e,r,a){e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 ${r.height-5} v${-r.height+2*5} q0,-5 5,-5 h${r.width-2*5} q5,0 5,5 v${r.height-5} H0 Z`),e.append("line").attr("class","node-line-"+a).attr("x1",0).attr("y1",r.height).attr("x2",r.width).attr("y2",r.height)},"defaultBkg"),py=f(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("width",r.width)},"rectBkg"),yy=f(function(t,e,r){let a=r.width,n=r.height,i=.15*a,s=.25*a,o=.35*a,l=.2*a;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${i},${i} 0 0,1 ${a*.25},${-1*a*.1} 12 a${o},${o} 1 0,1 ${a*.4},${-1*a*.1} 13 a${s},${s} 1 0,1 ${a*.35},${1*a*.2} 14 15 a${i},${i} 1 0,1 ${a*.15},${1*n*.35} 16 a${l},${l} 1 0,1 ${-1*a*.15},${1*n*.65} 17 18 a${s},${i} 1 0,1 ${-1*a*.25},${a*.15} 19 a${o},${o} 1 0,1 ${-1*a*.5},0 20 a${i},${i} 1 0,1 ${-1*a*.25},${-1*a*.15} 21 22 a${i},${i} 1 0,1 ${-1*a*.1},${-1*n*.35} 23 a${l},${l} 1 0,1 ${a*.1},${-1*n*.65} 24 25 H0 V0 Z`)},"cloudBkg"),my=f(function(t,e,r){let a=r.width,n=r.height,i=.15*a;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${i},${i} 1 0,0 ${a*.25},${-1*n*.1} 26 a${i},${i} 1 0,0 ${a*.25},0 27 a${i},${i} 1 0,0 ${a*.25},0 28 a${i},${i} 1 0,0 ${a*.25},${1*n*.1} 29 30 a${i},${i} 1 0,0 ${a*.15},${1*n*.33} 31 a${i*.8},${i*.8} 1 0,0 0,${1*n*.34} 32 a${i},${i} 1 0,0 ${-1*a*.15},${1*n*.33} 33 34 a${i},${i} 1 0,0 ${-1*a*.25},${n*.15} 35 a${i},${i} 1 0,0 ${-1*a*.25},0 36 a${i},${i} 1 0,0 ${-1*a*.25},0 37 a${i},${i} 1 0,0 ${-1*a*.25},${-1*n*.15} 38 39 a${i},${i} 1 0,0 ${-1*a*.1},${-1*n*.33} 40 a${i*.8},${i*.8} 1 0,0 0,${-1*n*.34} 41 a${i},${i} 1 0,0 ${a*.1},${-1*n*.33} 42 43 H0 V0 Z`)},"bangBkg"),by=f(function(t,e,r){e.append("circle").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("r",r.width/2)},"circleBkg");function Ey(t,e,r,a,n){return t.insert("polygon",":first-child").attr("points",a.map(function(i){return i.x+","+i.y}).join(" ")).attr("transform","translate("+(n.width-e)/2+", "+r+")")}f(Ey,"insertPolygonShape");var wy=f(function(t,e,r){let a=r.height,i=a/4,s=r.width-r.padding+2*i,o=[{x:i,y:0},{x:s-i,y:0},{x:s,y:-a/2},{x:s-i,y:-a},{x:i,y:-a},{x:0,y:-a/2}];Ey(e,s,a,o,r)},"hexagonBkg"),xy=f(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("rx",r.padding).attr("ry",r.padding).attr("width",r.width)},"roundedRectBkg"),ol=f(async function(t,e,r,a,n){let i=n.htmlLabels,s=a%(dy-1),o=e.append("g");r.section=s;let l="section-"+s;s<0&&(l+=" section-root"),o.attr("class",(r.class?r.class+" ":"")+"mindmap-node "+l);let u=o.append("g"),h=o.append("g"),c=r.descr.replace(/(<br\/*>)/g,` 44`);await ts(h,c,{useHtmlLabels:i,width:r.width,classes:"mindmap-node-label"},n),i||h.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");let v=h.node().getBBox(),[d]=es(n.fontSize);if(r.height=v.height+d*1.1*.5+r.padding,r.width=v.width+2*r.padding,r.icon)if(r.type===t.nodeType.CIRCLE)r.height+=50,r.width+=50,o.append("foreignObject").attr("height","50px").attr("width",r.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),h.attr("transform","translate("+r.width/2+", "+(r.height/2-1.5*r.padding)+")");else{r.width+=50;let g=r.height;r.height=Math.max(g,60);let m=Math.abs(r.height-g);o.append("foreignObject").attr("width","60px").attr("height",r.height).attr("style","text-align: center;margin-top:"+m/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),h.attr("transform","translate("+(25+r.width/2)+", "+(m/2+r.padding/2)+")")}else if(i){let g=(r.width-v.width)/2,m=(r.height-v.height)/2;h.attr("transform","translate("+g+", "+m+")")}else{let g=r.width/2,m=r.padding/2;h.attr("transform","translate("+g+", "+m+")")}switch(r.type){case t.nodeType.DEFAULT:gy(t,u,r,s);break;case t.nodeType.ROUNDED_RECT:xy(t,u,r,s);break;case t.nodeType.RECT:py(t,u,r,s);break;case t.nodeType.CIRCLE:u.attr("transform","translate("+r.width/2+", "+ +r.height/2+")"),by(t,u,r,s);break;case t.nodeType.CLOUD:yy(t,u,r,s);break;case t.nodeType.BANG:my(t,u,r,s);break;case t.nodeType.HEXAGON:wy(t,u,r,s);break}return t.setElementForId(r.id,o),r.height},"drawNode"),ul=f(function(t,e){let r=t.getElementById(e.id),a=e.x||0,n=e.y||0;r.attr("transform","translate("+a+","+n+")")},"positionNode");qt.use(ll.default);async function fl(t,e,r,a,n){await ol(t,e,r,a,n),r.children&&await Promise.all(r.children.map((i,s)=>fl(t,e,i,a<0?s:a,n)))}f(fl,"drawNodes");function Ty(t,e){e.edges().map((r,a)=>{let n=r.data();if(r[0]._private.bodyBounds){let i=r[0]._private.rscratch;Yt.trace("Edge: ",a,n),t.insert("path").attr("d",`M ${i.startX},${i.startY} L ${i.midX},${i.midY} L${i.endX},${i.endY} `).attr("class","edge section-edge-"+n.section+" edge-depth-"+n.depth)}})}f(Ty,"drawEdges");function hl(t,e,r,a){e.add({group:"nodes",data:{id:t.id.toString(),labelText:t.descr,height:t.height,width:t.width,level:a,nodeId:t.id,padding:t.padding,type:t.type},position:{x:t.x,y:t.y}}),t.children&&t.children.forEach(n=>{hl(n,e,r,a+1),e.add({group:"edges",data:{id:`${t.id}_${n.id}`,source:t.id,target:n.id,depth:a,section:n.section}})})}f(hl,"addNodes");function Cy(t,e){return new Promise(r=>{let a=ji("body").append("div").attr("id","cy").attr("style","display:none"),n=qt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});a.remove(),hl(t,n,e,0),n.nodes().forEach(function(i){i.layoutDimensions=()=>{let s=i.data();return{w:s.width,h:s.height}}}),n.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),n.ready(i=>{Yt.info("Ready",i),r(n)})})}f(Cy,"layoutMindmap");function Dy(t,e){e.nodes().map((r,a)=>{let n=r.data();n.x=r.position().x,n.y=r.position().y,ul(t,n);let i=t.getElementById(n.nodeId);Yt.info("Id:",a,"Position: (",r.position().x,", ",r.position().y,")",n),i.attr("transform",`translate(${r.position().x-n.width/2}, ${r.position().y-n.height/2})`),i.attr("attr",`apa-${a})`)})}f(Dy,"positionNodes");var Sy=f(async(t,e,r,a)=>{Yt.debug(`Rendering mindmap diagram 45`+t);let n=a.db,i=n.getMindmap();if(!i)return;let s=ra();s.htmlLabels=!1;let o=rs(e),l=o.append("g");l.attr("class","mindmap-edges");let u=o.append("g");u.attr("class","mindmap-nodes"),await fl(n,u,i,-1,s);let h=await Cy(i,s);Ty(l,h),Dy(n,h),Ji(void 0,o,s.mindmap?.padding??Sr.mindmap.padding,s.mindmap?.useMaxWidth??Sr.mindmap.useMaxWidth)},"draw"),cl={draw:Sy};var Ly=f(t=>{let e="";for(let r=0;r<t.THEME_COLOR_LIMIT;r++)t["lineColor"+r]=t["lineColor"+r]||t["cScaleInv"+r],Ki(t["lineColor"+r])?t["lineColor"+r]=Zi(t["lineColor"+r],20):t["lineColor"+r]=Qi(t["lineColor"+r],20);for(let r=0;r<t.THEME_COLOR_LIMIT;r++){let a=""+(17-3*r);e+=` 46 .section-${r-1} rect, .section-${r-1} path, .section-${r-1} circle, .section-${r-1} polygon, .section-${r-1} path { 47 fill: ${t["cScale"+r]}; 48 } 49 .section-${r-1} text { 50 fill: ${t["cScaleLabel"+r]}; 51 } 52 .node-icon-${r-1} { 53 font-size: 40px; 54 color: ${t["cScaleLabel"+r]}; 55 } 56 .section-edge-${r-1}{ 57 stroke: ${t["cScale"+r]}; 58 } 59 .edge-depth-${r-1}{ 60 stroke-width: ${a}; 61 } 62 .section-${r-1} line { 63 stroke: ${t["cScaleInv"+r]} ; 64 stroke-width: 3; 65 } 66 67 .disabled, .disabled circle, .disabled text { 68 fill: lightgray; 69 } 70 .disabled text { 71 fill: #efefef; 72 } 73 `}return e},"genSections"),Ay=f(t=>` 74 .edge { 75 stroke-width: 3; 76 } 77 ${Ly(t)} 78 .section-root rect, .section-root path, .section-root circle, .section-root polygon { 79 fill: ${t.git0}; 80 } 81 .section-root text { 82 fill: ${t.gitBranchLabel0}; 83 } 84 .icon-container { 85 height:100%; 86 display: flex; 87 justify-content: center; 88 align-items: center; 89 } 90 .edge { 91 fill: none; 92 } 93 .mindmap-node-label { 94 dy: 1em; 95 alignment-baseline: middle; 96 text-anchor: middle; 97 dominant-baseline: middle; 98 text-align: center; 99 } 100`,"getStyles"),vl=Ay;var lm={db:is,renderer:cl,parser:as,styles:vl};export{lm as diagram}; 101/*! Bundled license information: 102 103cytoscape/dist/cytoscape.esm.mjs: 104 (*! 105 Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable 106 Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) 107 Licensed under The MIT License (http://opensource.org/licenses/MIT) 108 *) 109 (*! 110 Event object based on jQuery events, MIT license 111 112 https://jquery.org/license/ 113 https://tldrlegal.com/license/mit-license 114 https://github.com/jquery/jquery/blob/master/src/event.js 115 *) 116 (*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License *) 117 (*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License *) 118*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.