vis-network
Version:
A dynamic, browser-based visualization library.
26 lines • 342 kB
JavaScript
/**
* vis-network - network
* http://visjs.org/
*
* A dynamic, browser-based visualization library.
*
* @version 6.2.0
* @date 2019-10-27T16:34:38Z
*
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
* @copyright (c) 2018-2019 visjs contributors, https://github.com/visjs
*
* @license
* vis.js is dual licensed under both
*
* 1. The Apache 2.0 License
* http://www.apache.org/licenses/LICENSE-2.0
*
* and
*
* 2. The MIT License
* http://opensource.org/licenses/MIT
*
* vis.js may be distributed under either license.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("core-js/modules/es.array.slice"),require("core-js/modules/es.array.splice"),require("vis-util"),require("core-js/modules/es.array.for-each"),require("core-js/modules/es.array.includes"),require("core-js/modules/es.array.index-of"),require("core-js/modules/es.function.name"),require("core-js/modules/es.number.constructor"),require("core-js/modules/es.regexp.exec"),require("core-js/modules/es.string.includes"),require("core-js/modules/es.string.split"),require("core-js/modules/web.dom-collections.for-each"),require("core-js/modules/es.array.map"),require("core-js/modules/es.string.fixed"),require("keycharm"),require("core-js/modules/es.array.concat"),require("core-js/modules/es.array.filter"),require("core-js/modules/es.array.join"),require("core-js/modules/es.array.sort"),require("core-js/modules/es.date.to-string"),require("core-js/modules/es.object.assign"),require("core-js/modules/es.object.keys"),require("core-js/modules/es.string.replace"),require("core-js/modules/es.string.trim"),require("core-js/modules/es.array.some"),require("vis-data"),require("core-js/modules/es.parse-float"),require("core-js/modules/es.parse-int"),require("core-js/modules/es.regexp.constructor"),require("core-js/modules/es.regexp.to-string"),require("core-js/modules/es.string.match"),require("core-js/modules/es.string.bold"),require("core-js/modules/es.array.iterator"),require("core-js/modules/es.object.to-string"),require("core-js/modules/web.dom-collections.iterator"),require("core-js/modules/es.array.fill"),require("core-js/modules/es.math.hypot"),require("core-js/modules/es.array.reverse"),require("core-js/modules/es.number.is-finite"),require("core-js/modules/es.symbol"),require("core-js/modules/es.symbol.description"),require("core-js/modules/es.symbol.iterator"),require("core-js/modules/es.array.every"),require("core-js/modules/es.set"),require("core-js/modules/es.string.iterator")):"function"==typeof define&&define.amd?define(["exports","core-js/modules/es.array.slice","core-js/modules/es.array.splice","vis-util","core-js/modules/es.array.for-each","core-js/modules/es.array.includes","core-js/modules/es.array.index-of","core-js/modules/es.function.name","core-js/modules/es.number.constructor","core-js/modules/es.regexp.exec","core-js/modules/es.string.includes","core-js/modules/es.string.split","core-js/modules/web.dom-collections.for-each","core-js/modules/es.array.map","core-js/modules/es.string.fixed","keycharm","core-js/modules/es.array.concat","core-js/modules/es.array.filter","core-js/modules/es.array.join","core-js/modules/es.array.sort","core-js/modules/es.date.to-string","core-js/modules/es.object.assign","core-js/modules/es.object.keys","core-js/modules/es.string.replace","core-js/modules/es.string.trim","core-js/modules/es.array.some","vis-data","core-js/modules/es.parse-float","core-js/modules/es.parse-int","core-js/modules/es.regexp.constructor","core-js/modules/es.regexp.to-string","core-js/modules/es.string.match","core-js/modules/es.string.bold","core-js/modules/es.array.iterator","core-js/modules/es.object.to-string","core-js/modules/web.dom-collections.iterator","core-js/modules/es.array.fill","core-js/modules/es.math.hypot","core-js/modules/es.array.reverse","core-js/modules/es.number.is-finite","core-js/modules/es.symbol","core-js/modules/es.symbol.description","core-js/modules/es.symbol.iterator","core-js/modules/es.array.every","core-js/modules/es.set","core-js/modules/es.string.iterator"],t):t((e=e||self).vis=e.vis||{},null,null,e.vis,null,null,null,null,null,null,null,null,null,null,null,e.keycharm,null,null,null,null,null,null,null,null,null,null,e.vis)}(this,(function(e,t,i,o,n,s,r,a,h,d,l,c,u,p,v,f,g,y,m,b,w,k,_,x,E,O,C){"use strict";var T="default"in o?o.default:o;f=f&&f.hasOwnProperty("default")?f.default:f,"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.circle=function(e,t,i){this.beginPath(),this.arc(e,t,i,0,2*Math.PI,!1),this.closePath()},CanvasRenderingContext2D.prototype.square=function(e,t,i){this.beginPath(),this.rect(e-i,t-i,2*i,2*i),this.closePath()},CanvasRenderingContext2D.prototype.triangle=function(e,t,i){this.beginPath(),t+=.275*(i*=1.15);var o=2*i,n=o/2,s=Math.sqrt(3)/6*o,r=Math.sqrt(o*o-n*n);this.moveTo(e,t-(r-s)),this.lineTo(e+n,t+s),this.lineTo(e-n,t+s),this.lineTo(e,t-(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.triangleDown=function(e,t,i){this.beginPath(),t-=.275*(i*=1.15);var o=2*i,n=o/2,s=Math.sqrt(3)/6*o,r=Math.sqrt(o*o-n*n);this.moveTo(e,t+(r-s)),this.lineTo(e+n,t-s),this.lineTo(e-n,t-s),this.lineTo(e,t+(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.star=function(e,t,i){this.beginPath(),t+=.1*(i*=.82);for(var o=0;o<10;o++){var n=o%2==0?1.3*i:.5*i;this.lineTo(e+n*Math.sin(2*o*Math.PI/10),t-n*Math.cos(2*o*Math.PI/10))}this.closePath()},CanvasRenderingContext2D.prototype.diamond=function(e,t,i){this.beginPath(),this.lineTo(e,t+i),this.lineTo(e+i,t),this.lineTo(e,t-i),this.lineTo(e-i,t),this.closePath()},CanvasRenderingContext2D.prototype.roundRect=function(e,t,i,o,n){var s=Math.PI/180;i-2*n<0&&(n=i/2),o-2*n<0&&(n=o/2),this.beginPath(),this.moveTo(e+n,t),this.lineTo(e+i-n,t),this.arc(e+i-n,t+n,n,270*s,360*s,!1),this.lineTo(e+i,t+o-n),this.arc(e+i-n,t+o-n,n,0,90*s,!1),this.lineTo(e+n,t+o),this.arc(e+n,t+o-n,n,90*s,180*s,!1),this.lineTo(e,t+n),this.arc(e+n,t+n,n,180*s,270*s,!1),this.closePath()},CanvasRenderingContext2D.prototype.ellipse_vis=function(e,t,i,o){var n=i/2*.5522848,s=o/2*.5522848,r=e+i,a=t+o,h=e+i/2,d=t+o/2;this.beginPath(),this.moveTo(e,d),this.bezierCurveTo(e,d-s,h-n,t,h,t),this.bezierCurveTo(h+n,t,r,d-s,r,d),this.bezierCurveTo(r,d+s,h+n,a,h,a),this.bezierCurveTo(h-n,a,e,d+s,e,d),this.closePath()},CanvasRenderingContext2D.prototype.database=function(e,t,i,o){var n=o*(1/3),s=i/2*.5522848,r=n/2*.5522848,a=e+i,h=t+n,d=e+i/2,l=t+n/2,c=t+(o-n/2),u=t+o;this.beginPath(),this.moveTo(a,l),this.bezierCurveTo(a,l+r,d+s,h,d,h),this.bezierCurveTo(d-s,h,e,l+r,e,l),this.bezierCurveTo(e,l-r,d-s,t,d,t),this.bezierCurveTo(d+s,t,a,l-r,a,l),this.lineTo(a,c),this.bezierCurveTo(a,c+r,d+s,u,d,u),this.bezierCurveTo(d-s,u,e,c+r,e,c),this.lineTo(e,l)},CanvasRenderingContext2D.prototype.dashedLine=function(e,t,i,o,n){this.beginPath(),this.moveTo(e,t);for(var s=n.length,r=i-e,a=o-t,h=a/r,d=Math.sqrt(r*r+a*a),l=0,c=!0,u=0,p=+n[0];d>=.1;)(p=+n[l++%s])>d&&(p=d),u=Math.sqrt(p*p/(1+h*h)),e+=u=r<0?-u:u,t+=h*u,!0===c?this.lineTo(e,t):this.moveTo(e,t),d-=p,c=!c},CanvasRenderingContext2D.prototype.hexagon=function(e,t,i){this.beginPath();var o=2*Math.PI/6;this.moveTo(e+i,t);for(var n=1;n<6;n++)this.lineTo(e+i*Math.cos(o*n),t+i*Math.sin(o*n));this.closePath()});"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function D(e,t){return e(t={exports:{}},t.exports),t.exports}function S(e){return e&&e.default||e}var M=D((function(e){function t(e){if(e)return function(e){for(var i in t.prototype)e[i]=t.prototype[i];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function i(){this.off(e,i),t.apply(this,arguments)}return i.fn=t,this.on(e,i),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i,o=this._callbacks["$"+e];if(!o)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var n=0;n<o.length;n++)if((i=o[n])===t||i.fn===t){o.splice(n,1);break}return 0===o.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),i=this._callbacks["$"+e],o=1;o<arguments.length;o++)t[o-1]=arguments[o];if(i){o=0;for(var n=(i=i.slice(0)).length;o<n;++o)i[o].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}}));function I(e){return N=e,function(){var e={};A=0,void(R=N.charAt(0)),Z(),"strict"===j&&(e.strict=!0,Z());"graph"!==j&&"digraph"!==j||(e.type=j,Z());L===F.IDENTIFIER&&(e.id=j,Z());if("{"!=j)throw ie("Angle bracket { expected");if(Z(),$(e),"}"!=j)throw ie("Angle bracket } expected");if(Z(),""!==j)throw ie("End of file expected");return Z(),delete e.node,delete e.edge,delete e.graph,e}()}var B={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},z=Object.create(B);z.color="color.color",z.style="dashes";var F={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},P={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},N="",A=0,R="",j="",L=F.NULL;function H(){A++,R=N.charAt(A)}function W(){return N.charAt(A+1)}var q=/[a-zA-Z_0-9.:#]/;function V(e){return q.test(e)}function U(e,t){if(e||(e={}),t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}function Y(e,t,i){for(var o=t.split("."),n=e;o.length;){var s=o.shift();o.length?(n[s]||(n[s]={}),n=n[s]):n[s]=i}}function X(e,t){for(var i,o,n=null,s=[e],r=e;r.parent;)s.push(r.parent),r=r.parent;if(r.nodes)for(i=0,o=r.nodes.length;i<o;i++)if(t.id===r.nodes[i].id){n=r.nodes[i];break}for(n||(n={id:t.id},e.node&&(n.attr=U(n.attr,e.node))),i=s.length-1;i>=0;i--){var a=s[i];a.nodes||(a.nodes=[]),-1===a.nodes.indexOf(n)&&a.nodes.push(n)}t.attr&&(n.attr=U(n.attr,t.attr))}function G(e,t){if(e.edges||(e.edges=[]),e.edges.push(t),e.edge){var i=U({},e.edge);t.attr=U(i,t.attr)}}function K(e,t,i,o,n){var s={from:t,to:i,type:o};return e.edge&&(s.attr=U({},e.edge)),s.attr=U(s.attr||{},n),null!=n&&n.hasOwnProperty("arrows")&&null!=n.arrows&&(s.arrows={to:{enabled:!0,type:n.arrows.type}},n.arrows=null),s}function Z(){for(L=F.NULL,j="";" "===R||"\t"===R||"\n"===R||"\r"===R;)H();do{var e=!1;if("#"===R){for(var t=A-1;" "===N.charAt(t)||"\t"===N.charAt(t);)t--;if("\n"===N.charAt(t)||""===N.charAt(t)){for(;""!=R&&"\n"!=R;)H();e=!0}}if("/"===R&&"/"===W()){for(;""!=R&&"\n"!=R;)H();e=!0}if("/"===R&&"*"===W()){for(;""!=R;){if("*"===R&&"/"===W()){H(),H();break}H()}e=!0}for(;" "===R||"\t"===R||"\n"===R||"\r"===R;)H()}while(e);if(""!==R){var i=R+W();if(P[i])return L=F.DELIMITER,j=i,H(),void H();if(P[R])return L=F.DELIMITER,j=R,void H();if(V(R)||"-"===R){for(j+=R,H();V(R);)j+=R,H();return"false"===j?j=!1:"true"===j?j=!0:isNaN(Number(j))||(j=Number(j)),void(L=F.IDENTIFIER)}if('"'===R){for(H();""!=R&&('"'!=R||'"'===R&&'"'===W());)'"'===R?(j+=R,H()):"\\"===R&&"n"===W()?(j+="\n",H()):j+=R,H();if('"'!=R)throw ie('End of string " expected');return H(),void(L=F.IDENTIFIER)}for(L=F.UNKNOWN;""!=R;)j+=R,H();throw new SyntaxError('Syntax error in part "'+oe(j,30)+'"')}L=F.DELIMITER}function $(e){for(;""!==j&&"}"!=j;)J(e),";"===j&&Z()}function J(e){var t=Q(e);if(t)ee(e,t);else if(!function(e){if("node"===j)return Z(),e.node=te(),"node";if("edge"===j)return Z(),e.edge=te(),"edge";if("graph"===j)return Z(),e.graph=te(),"graph";return null}(e)){if(L!=F.IDENTIFIER)throw ie("Identifier expected");var i=j;if(Z(),"="===j){if(Z(),L!=F.IDENTIFIER)throw ie("Identifier expected");e[i]=j,Z()}else!function(e,t){var i={id:t},o=te();o&&(i.attr=o);X(e,i),ee(e,t)}(e,i)}}function Q(e){var t=null;if("subgraph"===j&&((t={}).type="subgraph",Z(),L===F.IDENTIFIER&&(t.id=j,Z())),"{"===j){if(Z(),t||(t={}),t.parent=e,t.node=e.node,t.edge=e.edge,t.graph=e.graph,$(t),"}"!=j)throw ie("Angle bracket } expected");Z(),delete t.node,delete t.edge,delete t.graph,delete t.parent,e.subgraphs||(e.subgraphs=[]),e.subgraphs.push(t)}return t}function ee(e,t){for(;"->"===j||"--"===j;){var i,o=j;Z();var n=Q(e);if(n)i=n;else{if(L!=F.IDENTIFIER)throw ie("Identifier or subgraph expected");X(e,{id:i=j}),Z()}G(e,K(e,t,i,o,te())),t=i}}function te(){for(var e,t,i=null,o={dashed:!0,solid:!1,dotted:[1,5]},n={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},s=new Array,r=new Array;"["===j;){for(Z(),i={};""!==j&&"]"!=j;){if(L!=F.IDENTIFIER)throw ie("Attribute name expected");var a=j;if(Z(),"="!=j)throw ie("Equal sign = expected");if(Z(),L!=F.IDENTIFIER)throw ie("Attribute value expected");var h=j;"style"===a&&(h=o[h]),"arrowhead"===a&&(a="arrows",h={to:{enabled:!0,type:n[h]}}),"arrowtail"===a&&(a="arrows",h={from:{enabled:!0,type:n[h]}}),s.push({attr:i,name:a,value:h}),r.push(a),Z(),","==j&&Z()}if("]"!=j)throw ie("Bracket ] expected");Z()}if(r.includes("dir")){var d={arrows:{}};for(e=0;e<s.length;e++)if("arrows"===s[e].name)if(null!=s[e].value.to)d.arrows.to=e;else{if(null==s[e].value.from)throw ie("Invalid value of arrows");d.arrows.from=e}else"dir"===s[e].name&&(d.dir=e);var l,c,u=s[d.dir].value;if(!r.includes("arrows"))if("both"===u)s.push({attr:s[d.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),d.arrows.to=s.length-1,s.push({attr:s[d.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),d.arrows.from=s.length-1;else if("forward"===u)s.push({attr:s[d.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),d.arrows.to=s.length-1;else if("back"===u)s.push({attr:s[d.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),d.arrows.from=s.length-1;else{if("none"!==u)throw ie('Invalid dir type "'+u+'"');s.push({attr:s[d.dir].attr,name:"arrows",value:""}),d.arrows.to=s.length-1}if("both"===u)d.arrows.to&&d.arrows.from?(c=s[d.arrows.to].value.to.type,l=s[d.arrows.from].value.from.type,s[d.arrows.to]={attr:s[d.arrows.to].attr,name:s[d.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}},s.splice(d.arrows.from,1)):d.arrows.to?(c=s[d.arrows.to].value.to.type,l="arrow",s[d.arrows.to]={attr:s[d.arrows.to].attr,name:s[d.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}}):d.arrows.from&&(c="arrow",l=s[d.arrows.from].value.from.type,s[d.arrows.from]={attr:s[d.arrows.from].attr,name:s[d.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}});else if("back"===u)d.arrows.to&&d.arrows.from?(c="",l=s[d.arrows.from].value.from.type,s[d.arrows.from]={attr:s[d.arrows.from].attr,name:s[d.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}}):d.arrows.to?(c="",l="arrow",d.arrows.from=d.arrows.to,s[d.arrows.from]={attr:s[d.arrows.from].attr,name:s[d.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}}):d.arrows.from&&(c="",l=s[d.arrows.from].value.from.type,s[d.arrows.to]={attr:s[d.arrows.from].attr,name:s[d.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}}),s[d.arrows.from]={attr:s[d.arrows.from].attr,name:s[d.arrows.from].name,value:{from:{enabled:!0,type:s[d.arrows.from].value.from.type}}};else if("none"===u){var p;s[p=d.arrows.to?d.arrows.to:d.arrows.from]={attr:s[p].attr,name:s[p].name,value:""}}else{if("forward"!==u)throw ie('Invalid dir type "'+u+'"');d.arrows.to&&d.arrows.from?(c=s[d.arrows.to].value.to.type,l="",s[d.arrows.to]={attr:s[d.arrows.to].attr,name:s[d.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}}):d.arrows.to?(c=s[d.arrows.to].value.to.type,l="",s[d.arrows.to]={attr:s[d.arrows.to].attr,name:s[d.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}}):d.arrows.from&&(c="arrow",l="",d.arrows.to=d.arrows.from,s[d.arrows.to]={attr:s[d.arrows.to].attr,name:s[d.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}}),s[d.arrows.to]={attr:s[d.arrows.to].attr,name:s[d.arrows.to].name,value:{to:{enabled:!0,type:s[d.arrows.to].value.to.type}}}}s.splice(d.dir,1)}if(r.includes("penwidth")){var v=[];for(t=s.length,e=0;e<t;e++)"width"!==s[e].name&&("penwidth"===s[e].name&&(s[e].name="width"),v.push(s[e]));s=v}for(t=s.length,e=0;e<t;e++)Y(s[e].attr,s[e].name,s[e].value);return i}function ie(e){return new SyntaxError(e+', got "'+oe(j,30)+'" (char '+A+")")}function oe(e,t){return e.length<=t?e:e.substr(0,27)+"..."}function ne(e,t,i){for(var o=t.split("."),n=o.pop(),s=e,r=0;r<o.length;r++){var a=o[r];a in s||(s[a]={}),s=s[a]}return s[n]=i,e}function se(e,t){var i={};for(var o in e)if(e.hasOwnProperty(o)){var n=t[o];Array.isArray(n)?n.forEach((function(t){ne(i,t,e[o])})):ne(i,"string"==typeof n?n:o,e[o])}return i}var re=I,ae=function(e){var t=I(e),i={nodes:[],edges:[],options:{}};if(t.nodes&&t.nodes.forEach((function(e){var t={id:e.id,label:String(e.label||e.id)};U(t,se(e.attr,B)),t.image&&(t.shape="image"),i.nodes.push(t)})),t.edges){var o=function(e){var t={from:e.from,to:e.to};return U(t,se(e.attr,z)),null==t.arrows&&"->"===e.type&&(t.arrows="to"),t};t.edges.forEach((function(e){var t,n,s,r,a;t=e.from instanceof Object?e.from.nodes:{id:e.from},n=e.to instanceof Object?e.to.nodes:{id:e.to},e.from instanceof Object&&e.from.edges&&e.from.edges.forEach((function(e){var t=o(e);i.edges.push(t)})),s=t,r=n,a=function(t,n){var s=K(i,t.id,n.id,e.type,e.attr),r=o(s);i.edges.push(r)},Array.isArray(s)?s.forEach((function(e){Array.isArray(r)?r.forEach((function(t){a(e,t)})):a(e,r)})):Array.isArray(r)?r.forEach((function(e){a(s,e)})):a(s,r),e.to instanceof Object&&e.to.edges&&e.to.edges.forEach((function(e){var t=o(e);i.edges.push(t)}))}))}return t.attr&&(i.options=t.attr),i},he={parseDOT:re,DOTToGraph:ae},de=Object.freeze({__proto__:null,default:he,__moduleExports:he,parseDOT:re,DOTToGraph:ae});function le(e,t){var i={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};null!=t&&(null!=t.fixed&&(i.nodes.fixed=t.fixed),null!=t.parseColor&&(i.nodes.parseColor=t.parseColor),null!=t.inheritColor&&(i.edges.inheritColor=t.inheritColor));var o=e.edges.map((function(e){var t={from:e.source,id:e.id,to:e.target};return null!=e.attributes&&(t.attributes=e.attributes),null!=e.label&&(t.label=e.label),null!=e.attributes&&null!=e.attributes.title&&(t.title=e.attributes.title),"Directed"===e.type&&(t.arrows="to"),e.color&&!1===i.edges.inheritColor&&(t.color=e.color),t}));return{nodes:e.nodes.map((function(e){var t={id:e.id,fixed:i.nodes.fixed&&null!=e.x&&null!=e.y};return null!=e.attributes&&(t.attributes=e.attributes),null!=e.label&&(t.label=e.label),null!=e.size&&(t.size=e.size),null!=e.attributes&&null!=e.attributes.title&&(t.title=e.attributes.title),null!=e.title&&(t.title=e.title),null!=e.x&&(t.x=e.x),null!=e.y&&(t.y=e.y),null!=e.color&&(!0===i.nodes.parseColor?t.color=e.color:t.color={background:e.color,border:e.color,highlight:{background:e.color,border:e.color},hover:{background:e.color,border:e.color}}),t})),edges:o}}var ce=Object.freeze({__proto__:null,parseGephi:le}),ue=Object.freeze({__proto__:null,default:void 0});function pe(e){return(pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fe(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ge(e,t,i){return t&&fe(e.prototype,t),i&&fe(e,i),e}function ye(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function me(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function be(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?me(i,!0).forEach((function(t){ye(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):me(i).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function we(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_e(e,t)}function ke(e){return(ke=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _e(e,t){return(_e=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xe(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ee(e,t,i){return(Ee="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var o=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ke(e)););return e}(e,t);if(o){var n=Object.getOwnPropertyDescriptor(o,t);return n.get?n.get.call(i):n.value}})(e,t,i||e)}function Oe(e){throw new Error('"'+e+'" is read-only')}function Ce(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=e[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){n=!0,s=e}finally{try{o||null==a.return||a.return()}finally{if(n)throw s}}return i}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Te(){return(Te=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e}).apply(this,arguments)}function De(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Se(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Me,Ie="function"!=typeof Object.assign?function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;i<arguments.length;i++){var o=arguments[i];if(null!=o)for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])}return t}:Object.assign,Be=["","webkit","Moz","MS","ms","o"],ze="undefined"==typeof document?{style:{}}:document.createElement("div"),Fe="function",Pe=Math.round,Ne=Math.abs,Ae=Date.now;function Re(e,t){for(var i,o,n=t[0].toUpperCase()+t.slice(1),s=0;s<Be.length;){if((o=(i=Be[s])?i+n:t)in e)return o;s++}}Me="undefined"==typeof window?{}:window;var je=Re(ze.style,"touchAction"),Le=void 0!==je;var He="auto",We="manipulation",qe="none",Ve="pan-x",Ue="pan-y",Ye=function(){if(!Le)return!1;var e={},t=Me.CSS&&Me.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(i){return e[i]=!t||Me.CSS.supports("touch-action",i)})),e}(),Xe="ontouchstart"in Me,Ge=void 0!==Re(Me,"PointerEvent"),Ke=Xe&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),Ze="touch",$e="mouse",Je=25,Qe=1,et=2,tt=4,it=8,ot=1,nt=2,st=4,rt=8,at=16,ht=nt|st,dt=rt|at,lt=ht|dt,ct=["x","y"],ut=["clientX","clientY"];function pt(e,t,i){var o;if(e)if(e.forEach)e.forEach(t,i);else if(void 0!==e.length)for(o=0;o<e.length;)t.call(i,e[o],o,e),o++;else for(o in e)e.hasOwnProperty(o)&&t.call(i,e[o],o,e)}function vt(e,t){return pe(e)===Fe?e.apply(t&&t[0]||void 0,t):e}function ft(e,t){return e.indexOf(t)>-1}var gt=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){"compute"===e&&(e=this.compute()),Le&&this.manager.element.style&&Ye[e]&&(this.manager.element.style[je]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return pt(this.manager.recognizers,(function(t){vt(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(ft(e,qe))return qe;var t=ft(e,Ve),i=ft(e,Ue);return t&&i?qe:t||i?t?Ve:Ue:ft(e,We)?We:He}(e.join(" "))},t.preventDefaults=function(e){var t=e.srcEvent,i=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var o=this.actions,n=ft(o,qe)&&!Ye[qe],s=ft(o,Ue)&&!Ye[Ue],r=ft(o,Ve)&&!Ye[Ve];if(n){var a=1===e.pointers.length,h=e.distance<2,d=e.deltaTime<250;if(a&&h&&d)return}if(!r||!s)return n||s&&i&ht||r&&i&dt?this.preventSrc(t):void 0}},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function yt(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function mt(e){var t=e.length;if(1===t)return{x:Pe(e[0].clientX),y:Pe(e[0].clientY)};for(var i=0,o=0,n=0;n<t;)i+=e[n].clientX,o+=e[n].clientY,n++;return{x:Pe(i/t),y:Pe(o/t)}}function bt(e){for(var t=[],i=0;i<e.pointers.length;)t[i]={clientX:Pe(e.pointers[i].clientX),clientY:Pe(e.pointers[i].clientY)},i++;return{timeStamp:Ae(),pointers:t,center:mt(t),deltaX:e.deltaX,deltaY:e.deltaY}}function wt(e,t,i){i||(i=ct);var o=t[i[0]]-e[i[0]],n=t[i[1]]-e[i[1]];return Math.sqrt(o*o+n*n)}function kt(e,t,i){i||(i=ct);var o=t[i[0]]-e[i[0]],n=t[i[1]]-e[i[1]];return 180*Math.atan2(n,o)/Math.PI}function _t(e,t){return e===t?ot:Ne(e)>=Ne(t)?e<0?nt:st:t<0?rt:at}function xt(e,t,i){return{x:t/e||0,y:i/e||0}}function Et(e,t){var i=e.session,o=t.pointers,n=o.length;i.firstInput||(i.firstInput=bt(t)),n>1&&!i.firstMultiple?i.firstMultiple=bt(t):1===n&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,h=t.center=mt(o);t.timeStamp=Ae(),t.deltaTime=t.timeStamp-s.timeStamp,t.angle=kt(a,h),t.distance=wt(a,h),function(e,t){var i=t.center,o=e.offsetDelta||{},n=e.prevDelta||{},s=e.prevInput||{};t.eventType!==Qe&&s.eventType!==tt||(n=e.prevDelta={x:s.deltaX||0,y:s.deltaY||0},o=e.offsetDelta={x:i.x,y:i.y}),t.deltaX=n.x+(i.x-o.x),t.deltaY=n.y+(i.y-o.y)}(i,t),t.offsetDirection=_t(t.deltaX,t.deltaY);var d,l,c=xt(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=c.x,t.overallVelocityY=c.y,t.overallVelocity=Ne(c.x)>Ne(c.y)?c.x:c.y,t.scale=r?(d=r.pointers,wt((l=o)[0],l[1],ut)/wt(d[0],d[1],ut)):1,t.rotation=r?function(e,t){return kt(t[1],t[0],ut)+kt(e[1],e[0],ut)}(r.pointers,o):0,t.maxPointers=i.prevInput?t.pointers.length>i.prevInput.maxPointers?t.pointers.length:i.prevInput.maxPointers:t.pointers.length,function(e,t){var i,o,n,s,r=e.lastInterval||t,a=t.timeStamp-r.timeStamp;if(t.eventType!==it&&(a>Je||void 0===r.velocity)){var h=t.deltaX-r.deltaX,d=t.deltaY-r.deltaY,l=xt(a,h,d);o=l.x,n=l.y,i=Ne(l.x)>Ne(l.y)?l.x:l.y,s=_t(h,d),e.lastInterval=t}else i=r.velocity,o=r.velocityX,n=r.velocityY,s=r.direction;t.velocity=i,t.velocityX=o,t.velocityY=n,t.direction=s}(i,t);var u=e.element;yt(t.srcEvent.target,u)&&(u=t.srcEvent.target),t.target=u}function Ot(e,t,i){var o=i.pointers.length,n=i.changedPointers.length,s=t&Qe&&o-n==0,r=t&(tt|it)&&o-n==0;i.isFirst=!!s,i.isFinal=!!r,s&&(e.session={}),i.eventType=t,Et(e,i),e.emit("hammer.input",i),e.recognize(i),e.session.prevInput=i}function Ct(e){return e.trim().split(/\s+/g)}function Tt(e,t,i){pt(Ct(t),(function(t){e.addEventListener(t,i,!1)}))}function Dt(e,t,i){pt(Ct(t),(function(t){e.removeEventListener(t,i,!1)}))}function St(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var Mt=function(){function e(e,t){var i=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){vt(e.options.enable,[e])&&i.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&Tt(this.element,this.evEl,this.domHandler),this.evTarget&&Tt(this.target,this.evTarget,this.domHandler),this.evWin&&Tt(St(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&Dt(this.element,this.evEl,this.domHandler),this.evTarget&&Dt(this.target,this.evTarget,this.domHandler),this.evWin&&Dt(St(this.element),this.evWin,this.domHandler)},e}();function It(e,t,i){if(e.indexOf&&!i)return e.indexOf(t);for(var o=0;o<e.length;){if(i&&e[o][i]==t||!i&&e[o]===t)return o;o++}return-1}var Bt={pointerdown:Qe,pointermove:et,pointerup:tt,pointercancel:it,pointerout:it},zt={2:Ze,3:"pen",4:$e,5:"kinect"},Ft="pointerdown",Pt="pointermove pointerup pointercancel";Me.MSPointerEvent&&!Me.PointerEvent&&(Ft="MSPointerDown",Pt="MSPointerMove MSPointerUp MSPointerCancel");var Nt=function(e){function t(){var i,o=t.prototype;return o.evEl=Ft,o.evWin=Pt,(i=e.apply(this,arguments)||this).store=i.manager.session.pointerEvents=[],i}return De(t,e),t.prototype.handler=function(e){var t=this.store,i=!1,o=e.type.toLowerCase().replace("ms",""),n=Bt[o],s=zt[e.pointerType]||e.pointerType,r=s===Ze,a=It(t,e.pointerId,"pointerId");n&Qe&&(0===e.button||r)?a<0&&(t.push(e),a=t.length-1):n&(tt|it)&&(i=!0),a<0||(t[a]=e,this.callback(this.manager,n,{pointers:t,changedPointers:[e],pointerType:s,srcEvent:e}),i&&t.splice(a,1))},t}(Mt);function At(e){return Array.prototype.slice.call(e,0)}function Rt(e,t,i){for(var o=[],n=[],s=0;s<e.length;){var r=t?e[s][t]:e[s];It(n,r)<0&&o.push(e[s]),n[s]=r,s++}return i&&(o=t?o.sort((function(e,i){return e[t]>i[t]})):o.sort()),o}var jt={touchstart:Qe,touchmove:et,touchend:tt,touchcancel:it},Lt="touchstart touchmove touchend touchcancel",Ht=function(e){function t(){var i;return t.prototype.evTarget=Lt,(i=e.apply(this,arguments)||this).targetIds={},i}return De(t,e),t.prototype.handler=function(e){var t=jt[e.type],i=Wt.call(this,e,t);i&&this.callback(this.manager,t,{pointers:i[0],changedPointers:i[1],pointerType:Ze,srcEvent:e})},t}(Mt);function Wt(e,t){var i,o,n=At(e.touches),s=this.targetIds;if(t&(Qe|et)&&1===n.length)return s[n[0].identifier]=!0,[n,n];var r=At(e.changedTouches),a=[],h=this.target;if(o=n.filter((function(e){return yt(e.target,h)})),t===Qe)for(i=0;i<o.length;)s[o[i].identifier]=!0,i++;for(i=0;i<r.length;)s[r[i].identifier]&&a.push(r[i]),t&(tt|it)&&delete s[r[i].identifier],i++;return a.length?[Rt(o.concat(a),"identifier",!0),a]:void 0}var qt={mousedown:Qe,mousemove:et,mouseup:tt},Vt="mousedown",Ut="mousemove mouseup",Yt=function(e){function t(){var i,o=t.prototype;return o.evEl=Vt,o.evWin=Ut,(i=e.apply(this,arguments)||this).pressed=!1,i}return De(t,e),t.prototype.handler=function(e){var t=qt[e.type];t&Qe&&0===e.button&&(this.pressed=!0),t&et&&1!==e.which&&(t=tt),this.pressed&&(t&tt&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:$e,srcEvent:e}))},t}(Mt),Xt=2500,Gt=25;function Kt(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var i={x:t.clientX,y:t.clientY},o=this.lastTouches;this.lastTouches.push(i);setTimeout((function(){var e=o.indexOf(i);e>-1&&o.splice(e,1)}),Xt)}}function Zt(e,t){e&Qe?(this.primaryTouch=t.changedPointers[0].identifier,Kt.call(this,t)):e&(tt|it)&&Kt.call(this,t)}function $t(e){for(var t=e.srcEvent.clientX,i=e.srcEvent.clientY,o=0;o<this.lastTouches.length;o++){var n=this.lastTouches[o],s=Math.abs(t-n.x),r=Math.abs(i-n.y);if(s<=Gt&&r<=Gt)return!0}return!1}var Jt=function(){return function(e){function t(t,i){var o;return(o=e.call(this,t,i)||this).handler=function(e,t,i){var n=i.pointerType===Ze,s=i.pointerType===$e;if(!(s&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(n)Zt.call(Se(Se(o)),t,i);else if(s&&$t.call(Se(Se(o)),i))return;o.callback(e,t,i)}},o.touch=new Ht(o.manager,o.handler),o.mouse=new Yt(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}return De(t,e),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(Mt)}();function Qt(e,t,i){return!!Array.isArray(e)&&(pt(e,i[t],i),!0)}var ei=1,ti=2,ii=4,oi=8,ni=oi,si=16,ri=1;function ai(e,t){var i=t.manager;return i?i.get(e):e}function hi(e){return e&si?"cancel":e&oi?"end":e&ii?"move":e&ti?"start":""}var di=function(){function e(e){void 0===e&&(e={}),this.options=Te({enable:!0},e),this.id=ri++,this.manager=null,this.state=ei,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return Ie(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(Qt(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=ai(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return Qt(e,"dropRecognizeWith",this)?this:(e=ai(e,this),delete this.simultaneous[e.id],this)},t.requireFailure=function(e){if(Qt(e,"requireFailure",this))return this;var t=this.requireFail;return-1===It(t,e=ai(e,this))&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(Qt(e,"dropRequireFailure",this))return this;e=ai(e,this);var t=It(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,i=this.state;function o(i){t.manager.emit(i,e)}i<oi&&o(t.options.event+hi(i)),o(t.options.event),e.additionalEvent&&o(e.additionalEvent),i>=oi&&o(t.options.event+hi(i))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=32},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(32|ei)))return!1;e++}return!0},t.recognize=function(e){var t=Ie({},e);if(!vt(this.options.enable,[this,t]))return this.reset(),void(this.state=32);this.state&(ni|si|32)&&(this.state=ei),this.state=this.process(t),this.state&(ti|ii|oi|si)&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),li={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function ci(e,t){var i,o=e.element;o.style&&(pt(e.options.cssProps,(function(n,s){i=Re(o.style,s),t?(e.oldCssProps[i]=o.style[i],o.style[i]=n):o.style[i]=e.oldCssProps[i]||""})),t||(e.oldCssProps={}))}var ui=function(){function e(e,t){var i,o=this;this.options=Ie({},li,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((i=this).options.inputClass||(Ge?Nt:Ke?Ht:Xe?Jt:Yt))(i,Ot),this.touchAction=new gt(this,this.options.touchAction),ci(this,!0),pt(this.options.recognizers,(function(e){var t=o.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}var t=e.prototype;return t.set=function(e){return Ie(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?2:1},t.recognize=function(e){var t=this.session;if(!t.stopped){var i;this.touchAction.preventDefaults(e);var o=this.recognizers,n=t.curRecognizer;(!n||n&&n.state&ni)&&(t.curRecognizer=null,n=null);for(var s=0;s<o.length;)i=o[s],2===t.stopped||n&&i!==n&&!i.canRecognizeWith(n)?i.reset():i.recognize(e),!n&&i.state&(ti|ii|oi)&&(t.curRecognizer=i,n=i),s++}},t.get=function(e){if(e instanceof di)return e;for(var t=this.recognizers,i=0;i<t.length;i++)if(t[i].options.event===e)return t[i];return null},t.add=function(e){if(Qt(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(Qt(e,"remove",this))return this;var t=this.get(e);if(e){var i=this.recognizers,o=It(i,t);-1!==o&&(i.splice(o,1),this.touchAction.update())}return this},t.on=function(e,t){if(void 0===e||void 0===t)return this;var i=this.handlers;return pt(Ct(e),(function(e){i[e]=i[e]||[],i[e].push(t)})),this},t.off=function(e,t){if(void 0===e)return this;var i=this.handlers;return pt(Ct(e),(function(e){t?i[e]&&i[e].splice(It(i[e],t),1):delete i[e]})),this},t.emit=function(e,t){this.options.domEvents&&function(e,t){var i=document.createEvent("Event");i.initEvent(e,!0,!0),i.gesture=t,t.target.dispatchEvent(i)}(e,t);var i=this.handlers[e]&&this.handlers[e].slice();if(i&&i.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var o=0;o<i.length;)i[o](t),o++}},t.destroy=function(){this.element&&ci(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),pi={touchstart:Qe,touchmove:et,touchend:tt,touchcancel:it},vi="touchstart",fi="touchstart touchmove touchend touchcancel",gi=function(e){function t(){var i,o=t.prototype;return o.evTarget=vi,o.evWin=fi,(i=e.apply(this,arguments)||this).started=!1,i}return De(t,e),t.prototype.handler=function(e){var t=pi[e.type];if(t===Qe&&(this.started=!0),this.started){var i=yi.call(this,e,t);t&(tt|it)&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:i[0],changedPointers:i[1],pointerType:Ze,srcEvent:e})}},t}(Mt);function yi(e,t){var i=At(e.touches),o=At(e.changedTouches);return t&(tt|it)&&(i=Rt(i.concat(o),"identifier",!0)),[i,o]}var mi=function(e){function t(t){return void 0===t&&(t={}),e.call(this,Te({pointers:1},t))||this}De(t,e);var i=t.prototype;return i.attrTest=function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},i.process=function(e){var t=this.state,i=e.eventType,o=t&(ti|ii),n=this.attrTest(e);return o&&(i&it||!n)?t|si:o||n?i&tt?t|oi:t&ti?t|ii:ti:32},t}(di),bi=function(e){function t(t){var i;return void 0===t&&(t={}),(i=e.call(this,Te({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this).pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}De(t,e);var i=t.prototype;return i.getTouchAction=function(){return[We]},i.process=function(e){var t=this,i=this.options,o=e.pointers.length===i.pointers,n=e.distance<i.threshold,s=e.deltaTime<i.time;if(this.reset(),e.eventType&Qe&&0===this.count)return this.failTimeout();if(n&&s&&o){if(e.eventType!==tt)return this.failTimeout();var r=!this.pTime||e.timeStamp-this.pTime<i.interval,a=!this.pCenter||wt(this.pCenter,e.center)<i.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&r?this.count+=1:this.count=1,this._input=e,0===this.count%i.taps)return this.hasRequireFailures()?(this._timer=setTimeout((function(){t.state=ni,t.tryEmit()}),i.interval),ti):ni}return 32},i.failTimeout=function(){var e=this;return this._timer=setTimeout((function(){e.state=32}),this.options.interval),32},i.reset=function(){clearTimeout(this._timer)},i.emit=function(){this.state===ni&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(di);function wi(e){return e===at?"down":e===rt?"up":e===nt?"left":e===st?"right":""}var ki=function(e){function t(t){var i;return void 0===t&&(t={}),(i=e.call(this,Te({event:"pan",threshold:10,pointers:1,direction:lt},t))||this).pX=null,i.pY=null,i}De(t,e);var i=t.prototype;return i.getTouchAction=function(){var e=this.options.direction,t=[];return e&ht&&t.push(Ue),e&dt&&t.push(Ve),t},i.directionTest=function(e){var t=this.options,i=!0,o=e.distance,n=e.direction,s=e.deltaX,r=e.deltaY;return n&t.direction||(t.direction&ht?(n=0===s?ot:s<0?nt:st,i=s!==this.pX,o=Math.abs(e.deltaX)):(n=0===r?ot:r<0?rt:at,i=r!==this.pY,o=Math.abs(e.deltaY))),e.direction=n,i&&o>t.threshold&&n&t.direction},i.attrTest=function(e){return mi.prototype.attrTest.call(this,e)&&(this.state&ti||!(this.state&ti)&&this.directionTest(e))},i.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var i=wi(t.direction);i&&(t.additionalEvent=this.options.event+i),e.prototype.emit.call(this,t)},t}(mi),_i=function(e){function t(t){return void 0===t&&(t={}),e.call(this,Te({event:"swipe",threshold:10,velocity:.3,direction:ht|dt,pointers:1},t))||this}De(t,e);var i=t.prototype;return i.getTouchAction=function(){return ki.prototype.getTouchAction.call(this)},i.attrTest=function(t){var i,o=this.options.direction;return o&(ht|dt)?i=t.overallVelocity:o&ht?i=t.overallVelocityX:o&dt&&(i=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&o&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&Ne(i)>this.options.velocity&&t.eventType&tt},i.emit=function(e){var t=wi(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(mi),xi=function(e){function t(t){return void 0===t&&(t={}),e.call(this,Te({event:"pinch",threshold:0,pointers:2},t))||this}De(t,e);var i=t.prototype;return i.getTouchAction=function(){return[qe]},i.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ti)},i.emit=function(t){if(1!==t.scale){var i=t.scale<1?"in":"out";t.additionalEvent=this.options.event+i}e.prototype.emit.call(this,t)},t}(mi),Ei=function(e){function t(t){return void 0===t&&(t={}),e.call(this,Te({event:"rotate",threshold:0,pointers:2},t))||this}De(t,e);var i=t.prototype;return i.getTouchAction=function(){return[qe]},i.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ti)},t}(mi),Oi=function(e){function t(t){var i;return void 0===t&&(t={}),(i=e.call(this,Te({event:"press",pointers:1,time:251,threshold:9},t))||this)._timer=null,i._input=null,i}De(t,e);var i=t.prototype;return i.getTouchAction=function(){return[He]},i.process=function(e){var t=this,i=this.options,o=e.pointers.length===i.pointers,n=e.distance<i.threshold,s=e.deltaTime>i.time;if(this._input=e,!n||!o||e.eventType&(tt|it)&&!s)this.reset();else if(e.eventType&Qe)this.reset(),this._timer=setTimeout((function(){t.state=ni,t.tryEmit()}),i.time);else if(e.eventType&tt)return ni;return 32},i.reset=function(){clearTimeout(this._timer)},i.emit=function(e){this.state===ni&&(e&&e.eventType&tt?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=Ae(),this.manager.emit(this.options.event,this._input)))},t}(di);function Ci(e,t,i){var o="DEPRECATED METHOD: "+t+"\n"+i+" AT \n";return function(){var t=new Error("get-stack-trace"),i=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",n=window.console&&(window.console.warn||window.console.log);return n&&n.call(window.console,o,i),e.apply(this,arguments)}}var Ti=Ci((function(e,t,i){for(var o=Object.keys(t),n=0;n<o.length;)(!i||i&&void 0===e[o[n]])&&(e[o[n]]=t[o[n]]),n++;return e}),"extend","Use `assign`."),Di=Ci((function(e,t){return Ti(e,t,!0)}),"merge","Use `assign`.");function Si(e,t,i){var o,n=t.prototype;(o=e.prototype=Object.create(n)).constructor=e,o._super=n,i&&Ie(o,i)}function Mi(e,t){return function(){return e.apply(t,arguments)}}var Ii=function(){var e=function(e,t){return void 0===t&&(t={}),new ui(e,Te({recognizers:[[Ei,{enable:!1}],[xi,{enable:!1},["rotate"]],[_i,{direction:ht}],[ki,{direction:ht},["swipe"]],[bi],[bi,{event:"doubletap",taps:2},["tap"]],[Oi]]},t))};return e.VERSION="2.0.15",e.DIRECTION_ALL=lt,e.DIRECTION_DOWN=at,e.DIRECTION_LEFT=nt,e.DIRECTION_RIGHT=st,e.DIRECTION_UP=rt,e.DIRECTION_HORIZONTAL=ht,e.DIRECTION_VERTICAL=dt,e.DIRECTION_NONE=ot,e.DIRECTION_DOWN=at,e.INPUT_START=Qe,e.INPUT_MOVE=et,e.INPUT_END=tt,e.INPUT_CANCEL=it,e.STATE_POSSIBLE=ei,e.STATE_BEGAN=ti,e.STATE_CHANGED=ii,e.STATE_ENDED=oi,e.STATE_RECOGNIZED=ni,e.STATE_CANCELLED=si,e.STATE_FAILED=32,e.Manager=ui,e.Input=Mt,e.TouchAction=gt,e.TouchInput=Ht,e.MouseInput=Yt,e.PointerEventInput=Nt,e.TouchMouseInput=Jt,e.SingleTouchInput=gi,e.Recognizer=di,e.AttrRecognizer=mi,e.Tap=bi,e.Pan=ki,e.Swipe=_i,e.Pinch=xi,e.Rotate=Ei,e.Press=Oi,e.on=Tt,e.off=Dt,e.each=pt,e.merge=Di,e.extend=Ti,e.bindFn=Mi,e.assign=Ie,e.inherit=Si,e.bindFn=Mi,e.prefixed=Re,e.toArray=At,e.inArray=It,e.uniqueArray=Rt,e.splitStr=Ct,e.boolOrFn=vt,e.hasParent=yt,e.addEventListeners=Tt,e.removeEventListeners=Dt,e.defaults=li,e}(),Bi=S(Object.freeze({__proto__:null,default:Ii,INPUT_START:Qe,INPUT_MOVE:et,INPUT_END:tt,INPUT_CANCEL:it,STATE_POSSIBLE:ei,STATE_BEGAN:ti,STATE_CHANGED:ii,STATE_ENDED:oi,STATE_RECOGNIZED:ni,STATE_CANCELLED:si,STATE_FAILED:32,DIRECTION_NONE:ot,DIRECTION_LEFT:nt,DIRECTION_RIGHT:st,DIRECTION_UP:rt,DIRECTION_DOWN:at,DIRECTION_HORIZONTAL:ht,DIRECTION_VERTICAL:dt,DIRECTION_ALL:lt,Manager:ui,Input:Mt,TouchAction:gt,TouchInput:Ht,MouseInput:Yt,PointerEventInput:Nt,TouchMouseInput:Jt,SingleTouchInput:gi,Recognizer:di,AttrRecognizer:mi,Tap:bi,Pan:ki,Swipe:_i,Pinch:xi,Rotate:Ei,Press:Oi,on:Tt,off:Dt,each:pt,merge:Di,extend:Ti,assign:Ie,inherit:Si,bindFn:Mi,prefixed:Re,toArray:At,inArray:It,uniqueArray:Rt,splitStr:Ct,boolOrFn:vt,hasParent:yt,addEventListeners:Tt,removeEventListeners:Dt,defaults:li})),zi=D((function(e){if("undefined"!=typeof window){var t=window.Hammer||Bi;e.exports=t}else e.exports=function(){return{on:e=function(){},off:e,destroy:e,emit:e,get:function(t){return{set:e}}};var e}}));function Fi(e){var t=this;this.active=!1,this.dom={container:e},this.dom.overlay=document.createElement("div"),this.dom.overlay.className="vis-overlay",this.dom.container.appendChild(this.dom.overlay),this.hammer=zi(this.dom.overlay),this.hammer.on("tap",this._onTapOverlay.bind(this));["tap","doubletap","press","pinch","pan","panstart","panmove","panend"].forEach((function(e){t.hammer.on(e,(function(e){e.srcEvent.stopPropagation()}))})),document&&document.body&&(this.onClick=function(i){(function(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1})(i.target,e)||t.deactivate()},document.body.addEventListener("click",this.onClick)),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=f(),this.escListener=this.deactivate.bind(this)}S(ue),M(Fi.prototype),Fi.current=null,Fi.prototype.destroy=function(){this.deactivate(),this.dom.overlay.parentNode.removeChild(this.dom.overlay),this.onClick&&document.body.removeEventListener("click",this.onClick),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=null,this.hammer.destroy(),this.hammer=null},Fi.prototype.activate=function(){Fi.current&&Fi.current.deactivate(),Fi.current=this,this.active=!0,this.dom.overlay.style.display="none",T.addClassName(this.dom.container,"vis-active"),this.emit("change"),this.emit("activate"),this.keycharm.bind("esc",this.escListener)},Fi.prototype.deactivate=function(){this.active=!1,this.dom.overlay.style.display="block",T.removeClassName(this.dom.container,"vis-active"),this.keycharm.unbind("esc",this.escListener),this.emit("change"),this.emit("deactivate")},Fi.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};var Pi,Ni=Fi,Ai=D((function(e,t){t.en={edit:"Edit",del:"Delete selected",back:"Back",addNode:"Add Node",addEdge:"Add Edge",editNode:"Edit Node",editEdge:"Edit Edge",addDescription:"Click in an empty space to place a new node.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",createEdgeError:"Cannot link edges to a cluster.",deleteClusterError:"Clusters cannot be deleted.",editClusterError:"Clusters cannot be edited."},t.en_EN=t.en,t.en_US=t.en,t.de={edit:"Editieren",del:"Lösche Auswahl",back:"Zurück",addNode:"Knoten hinzufügen",addEdge:"Kante hinzufügen",editNode:"Knoten editieren",editEdge:"Kante editieren",addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",deleteClusterError:"Cluster können nicht gelöscht werden.",editClusterError:"Cluster können nicht editiert werden."},t.de_DE=t.de,t.es={edit:"Editar",del:"Eliminar selección",back:"Atrás",addNode:"Añadir nodo",addEdge:"Añadir arista",editNode:"Editar nodo",editEdge:"Editar arista",addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",createEdgeError:"No se puede conectar una arista a un grupo.",deleteClusterError:"No es posible eliminar grupos.",editClusterError:"No es posible editar grupos."},t.es_ES=t.es,t.it={edit:"Modifica",del:"Cancella la selezione",back:"Indietro",addNode:"Aggiungi un nodo",addEdge:"Aggiungi un vertice",editNode:"Modifica il nodo",editEdge:"Modifica il vertice",addDescription:"Clicca per aggiungere un nuovo nodo",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",createEdgeError:"Non si possono collegare vertici ad un cluster",deleteClusterError:"I cluster non possono essere cancellati",editClusterError:"I clusters non possono essere modificati."},t.it_IT=t.it,t.nl={edit:"Wijzigen",del:"Selectie verwijderen",back:"Terug",addNode:"Node toevoegen",addEdge:"Link toevoegen",editNode:"Node wijzigen",editEdge:"Link wijzigen",addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",createEdgeError:"Kan geen link maken naar een cluster.",deleteClusterError:"Clusters kunnen niet worden verwijderd.",editClusterError:"Clusters kunnen niet worden aangepast."},t.nl_NL