UNPKG

vis-network

Version:

A dynamic, browser-based visualization library.

25 lines 535 kB
/** * vis-network - network * http://visjs.org/ * * A dynamic, browser-based visualization library. * * @version 5.2.1 * @date 2019-08-09T11:28:19Z * * @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):"function"==typeof define&&define.amd?define(["exports"],t):(e=e||self,t(e.vis={}))})(this,function(e){'use strict';var ao=Math.cos,so=Math.sin,ro=Math.round,lo=Math.pow,co=Math.ceil,uo=Math.abs,po=Math.PI,ho=Math.atan2,mo=Math.sqrt,go=Math.floor,yo=Math.max,fo=Math.min;function t(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function o(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}}function n(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function a(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function d(e){return _o(e)||vo(e)||ko()}function s(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function r(e,t){return t={exports:{}},e(t,t.exports),t.exports}function l(e,t){var o=t||0,n=Do;return n[e[o++]]+n[e[o++]]+n[e[o++]]+n[e[o++]]+"-"+n[e[o++]]+n[e[o++]]+"-"+n[e[o++]]+n[e[o++]]+"-"+n[e[o++]]+n[e[o++]]+"-"+n[e[o++]]+n[e[o++]]+n[e[o++]]+n[e[o++]]+n[e[o++]]+n[e[o++]]}function u(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=1<arguments.length?arguments[1]:void 0,o=2<arguments.length?arguments[2]:void 0,n=t&&o||0;"string"==typeof e&&(t="binary"===e?Array(16):void 0,e={});var i=e.random||(e.rng||Co)();if(i[6]=64|15&i[6],i[8]=128|63&i[8],t)for(var a=0;16>a;a++)t[n+a]=i[a];return t||l(i)}function p(e,t){var o=Object.keys(e);return Object.getOwnPropertySymbols&&o.push.apply(o,Object.getOwnPropertySymbols(e)),t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o}function h(e){for(var t=1,o;t<arguments.length;t++)o=null==arguments[t]?{}:arguments[t],t%2?p(o,!0).forEach(function(t){bo(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):p(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))});return e}function m(e){return e instanceof Number||"number"==typeof e}function g(e){if(e)for(;!0===e.hasChildNodes();){var t=e.firstChild;t&&(g(t),e.removeChild(t))}}function y(e){return e instanceof String||"string"==typeof e}function f(e){return"object"===So(e)&&null!==e}function b(e){if(e instanceof Date)return!0;if(y(e)){var t=Yo.exec(e);if(t)return!0;if(!isNaN(Date.parse(e)))return!0}return!1}function _(e){return Oo.isMoment(e)}function v(e,t,o,n){var i=!1;!0===n&&(i=null===t[o]&&e[o]!==void 0),i?delete e[o]:e[o]=t[o]}function k(e,t){var o=!!(2<arguments.length&&arguments[2]!==void 0)&&arguments[2];for(var n in e)if(t[n]!==void 0)if(null===t[n]||"object"!==So(t[n]))v(e,t,n,o);else{var i=e[n],a=t[n];f(i)&&f(a)&&k(i,a,o)}}function w(e,t){if(!Array.isArray(e))throw new Error("Array with property names expected as first argument");for(var o=arguments.length,n=Array(2<o?o-2:0),i=2;i<o;i++)n[i-2]=arguments[i];for(var a=0,d=n,s;a<d.length;a++){s=d[a];for(var r=0,l;r<e.length;r++)l=e[r],s&&Object.prototype.hasOwnProperty.call(s,l)&&(t[l]=s[l])}return t}function x(e,t,o){var n=!!(3<arguments.length&&arguments[3]!==void 0)&&arguments[3];if(Array.isArray(o))throw new TypeError("Arrays are not supported by deepExtend");for(var i=0,a;i<e.length;i++)if(a=e[i],Object.prototype.hasOwnProperty.call(o,a))if(o[a]&&o[a].constructor===Object)void 0===t[a]&&(t[a]={}),t[a].constructor===Object?O(t[a],o[a],!1,n):v(t,o,a,n);else if(Array.isArray(o[a]))throw new TypeError("Arrays are not supported by deepExtend");else v(t,o,a,n);return t}function S(e,t,o){var n=!!(3<arguments.length&&arguments[3]!==void 0)&&arguments[3];if(Array.isArray(o))throw new TypeError("Arrays are not supported by deepExtend");for(var a in o)if(Object.prototype.hasOwnProperty.call(o,a)&&-1===e.indexOf(a))if(o[a]&&o[a].constructor===Object)void 0===t[a]&&(t[a]={}),t[a].constructor===Object?O(t[a],o[a]):v(t,o,a,n);else if(Array.isArray(o[a])){t[a]=[];for(var d=0;d<o[a].length;d++)t[a].push(o[a][d])}else v(t,o,a,n);return t}function O(e,t){var o=!!(2<arguments.length&&arguments[2]!==void 0)&&arguments[2],n=!!(3<arguments.length&&arguments[3]!==void 0)&&arguments[3];for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)||!0===o)if(t[a]&&t[a].constructor===Object)void 0===e[a]&&(e[a]={}),e[a].constructor===Object?O(e[a],t[a],o):v(e,t,a,n);else if(Array.isArray(t[a])){e[a]=[];for(var d=0;d<t[a].length;d++)e[a].push(t[a][d])}else v(e,t,a,n);return e}function D(e,t){if(e.length!==t.length)return!1;for(var o=0,n=e.length;o<n;o++)if(e[o]!=t[o])return!1;return!0}function T(e,t){var o;if(void 0!==e){if(null===e)return null;if(!t)return e;if("string"!=typeof t&&!(t instanceof String))throw new Error("Type must be a string");switch(t){case"boolean":case"Boolean":return!!e;case"number":case"Number":return y(e)&&!isNaN(Date.parse(e))?Oo(e).valueOf():+e.valueOf();case"string":case"String":return e+"";case"Date":if(m(e))return new Date(e);if(e instanceof Date)return new Date(e.valueOf());if(_(e))return new Date(e.valueOf());if(y(e))return o=Yo.exec(e),o?new Date(+o[1]):Oo(new Date(e)).toDate();throw new Error("Cannot convert object of type "+C(e)+" to type Date");case"Moment":if(m(e))return Oo(e);if(e instanceof Date)return Oo(e.valueOf());if(_(e))return Oo(e);if(y(e))return o=Yo.exec(e),o?Oo(+o[1]):Oo(e);throw new Error("Cannot convert object of type "+C(e)+" to type Date");case"ISODate":if(m(e))return new Date(e);if(e instanceof Date)return e.toISOString();if(_(e))return e.toDate().toISOString();if(y(e))return o=Yo.exec(e),o?new Date(+o[1]).toISOString():Oo(e).format();throw new Error("Cannot convert object of type "+C(e)+" to type ISODate");case"ASPDate":if(m(e))return"/Date("+e+")/";if(e instanceof Date||_(e))return"/Date("+e.valueOf()+")/";if(y(e)){o=Yo.exec(e);var n;return n=o?new Date(+o[1]).valueOf():new Date(e).valueOf(),"/Date("+n+")/"}throw new Error("Cannot convert object of type "+C(e)+" to type ASPDate");default:throw new Error("Unknown type ".concat(t));}}}function C(e){var t=So(e);return"object"===t?null===e?"null":e instanceof Boolean?"Boolean":e instanceof Number?"Number":e instanceof String?"String":Array.isArray(e)?"Array":e instanceof Date?"Date":"Object":"number"===t?"Number":"boolean"===t?"Boolean":"string"===t?"String":void 0===t?"undefined":t}function E(e,t){return[].concat(wo(e),[t])}function M(e){return e.slice()}function I(e){return e.getBoundingClientRect().left}function P(e){return e.getBoundingClientRect().right}function F(e){return e.getBoundingClientRect().top}function Y(e,t){var o=e.className.split(" "),n=t.split(" ");o=o.concat(n.filter(function(e){return 0>o.indexOf(e)})),e.className=o.join(" ")}function z(e,t){var o=e.className.split(" "),n=t.split(" ");o=o.filter(function(e){return 0>n.indexOf(e)}),e.className=o.join(" ")}function N(e,t){if(Array.isArray(e))for(var o=e.length,n=0;n<o;n++)t(e[n],n,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t(e[a],a,e)}function R(e,t,o){return e[t]!==o&&(e[t]=o,!0)}function B(e){var t=!1;return function(){t||(t=!0,requestAnimationFrame(function(){t=!1,e()}))}}function H(e,t,o,n){e.addEventListener?(n===void 0&&(n=!1),"mousewheel"===t&&0<=navigator.userAgent.indexOf("Firefox")&&(t="DOMMouseScroll"),e.addEventListener(t,o,n)):e.attachEvent("on"+t,o)}function L(e,t,o,n){e.removeEventListener?(n===void 0&&(n=!1),"mousewheel"===t&&0<=navigator.userAgent.indexOf("Firefox")&&(t="DOMMouseScroll"),e.removeEventListener(t,o,n)):e.detachEvent("on"+t,o)}function A(e){if(e||(e=window.event),!e);else e.preventDefault?e.preventDefault():e.returnValue=!1}function W(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:window.event,t=null;if(!e);else e.target?t=e.target:e.srcElement&&(t=e.srcElement);return t instanceof Element?null!=t.nodeType&&3==t.nodeType&&(t=t.parentNode,!(t instanceof Element))?null:t:null}function j(e,t){for(var o=e;o;){if(o===t)return!0;if(o.parentNode)o=o.parentNode;else return!1}return!1}function U(e){var t;switch(e.length){case 3:case 4:return t=No.exec(e),t?{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16)}:null;case 6:case 7:return t=zo.exec(e),t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null;default:return null;}}function V(e,t){if(-1!==e.indexOf("rgba"))return e;if(-1!==e.indexOf("rgb")){var o=e.substr(e.indexOf("(")+1).replace(")","").split(",");return"rgba("+o[0]+","+o[1]+","+o[2]+","+t+")"}var n=U(e);return null==n?e:"rgba("+n.r+","+n.g+","+n.b+","+t+")"}function G(e,t,o){return"#"+(16777216+(e<<16)+(t<<8)+o).toString(16).slice(1)}function q(e,t){if(y(e)){var o=e;if(te(o)){var n=o.substr(4).substr(0,o.length-5).split(",").map(function(e){return parseInt(e)});o=G(n[0],n[1],n[2])}if(!0===ee(o)){var i=J(o),a={h:i.h,s:.8*i.s,v:fo(1,1.02*i.v)},d={h:i.h,s:fo(1,1.25*i.s),v:.8*i.v},s=$(d.h,d.s,d.v),r=$(a.h,a.s,a.v);return{background:o,border:s,highlight:{background:r,border:s},hover:{background:r,border:s}}}return{background:o,border:o,highlight:{background:o,border:o},hover:{background:o,border:o}}}if(t){var l={background:e.background||t.background,border:e.border||t.border,highlight:y(e.highlight)?{border:e.highlight,background:e.highlight}:{background:e.highlight&&e.highlight.background||t.highlight.background,border:e.highlight&&e.highlight.border||t.highlight.border},hover:y(e.hover)?{border:e.hover,background:e.hover}:{border:e.hover&&e.hover.border||t.hover.border,background:e.hover&&e.hover.background||t.hover.background}};return l}var c={background:e.background||void 0,border:e.border||void 0,highlight:y(e.highlight)?{border:e.highlight,background:e.highlight}:{background:e.highlight&&e.highlight.background||void 0,border:e.highlight&&e.highlight.border||void 0},hover:y(e.hover)?{border:e.hover,background:e.hover}:{border:e.hover&&e.hover.border||void 0,background:e.hover&&e.hover.background||void 0}};return c}function Z(e,t,o){e/=255,t/=255,o/=255;var n=fo(e,fo(t,o)),i=yo(e,yo(t,o));if(n===i)return{h:0,s:0,v:n};var a=e===n?t-o:o===n?e-t:o-e,d=e===n?3:o===n?1:5;return{h:60*(d-a/(i-n))/360,s:(i-n)/i,v:i}}function X(e,t){var o=Lo.split(e.style.cssText),n=Lo.split(t),i=h({},o,{},n);e.style.cssText=Lo.join(i)}function K(e,t){var o=Lo.split(e.style.cssText),n=Lo.split(t);for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&delete o[i];e.style.cssText=Lo.join(o)}function Q(e,o,n){var a=go(6*e),i=6*e-a,d=n*(1-o),s=n*(1-i*o),l=n*(1-(1-i)*o),t,c,u;switch(a%6){case 0:t=n,c=l,u=d;break;case 1:t=s,c=n,u=d;break;case 2:t=d,c=n,u=l;break;case 3:t=d,c=s,u=n;break;case 4:t=l,c=d,u=n;break;case 5:t=n,c=d,u=s;}return{r:go(255*t),g:go(255*c),b:go(255*u)}}function $(e,t,o){var n=Q(e,t,o);return G(n.r,n.g,n.b)}function J(e){var t=U(e);if(!t)throw new TypeError("'".concat(e,"' is not a valid color."));return Z(t.r,t.g,t.b)}function ee(e){var t=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e);return t}function te(e){e=e.replace(" ","");var t=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/i.test(e);return t}function oe(e){e=e.replace(" ","");var t=/rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(0?.{1,3})\)/i.test(e);return t}function ne(e,t){if(null!==t&&"object"===So(t)){for(var o=Object.create(t),n=0;n<e.length;n++)Object.prototype.hasOwnProperty.call(t,e[n])&&"object"==So(t[e[n]])&&(o[e[n]]=ie(t[e[n]]));return o}return null}function ie(e){if(null===e||"object"!==So(e))return null;if(e instanceof Element)return e;var t=Object.create(e);for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&"object"==So(e[o])&&(t[o]=ie(e[o]));return t}function ae(e,t){for(var o=0;o<e.length;o++){var n=e[o],a=void 0;for(a=o;0<a&&0>t(n,e[a-1]);a--)e[a]=e[a-1];e[a]=n}return e}function de(e,t,o){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:{},i=function(e){return null!==e&&e!==void 0},a=function(e){return null!==e&&"object"===So(e)};if(!a(e))throw new Error("Parameter mergeTarget must be an object");if(!a(t))throw new Error("Parameter options must be an object");if(!i(o))throw new Error("Parameter option must have a value");if(!a(n))throw new Error("Parameter globalOptions must be an object");var d=function(e,t,o){a(e[o])||(e[o]={});var n=t[o],i=e[o];for(var d in n)Object.prototype.hasOwnProperty.call(n,d)&&(i[d]=n[d])},s=t[o],r=a(n)&&!function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(n),l=r?n[o]:void 0,c=l?l.enabled:void 0;if(void 0!==s){if("boolean"==typeof s)return a(e[o])||(e[o]={}),void(e[o].enabled=s);if(null===s&&!a(e[o]))if(i(l))e[o]=Object.create(l);else return;if(a(s)){var u=!0;void 0===s.enabled?void 0!==c&&(u=l.enabled):u=s.enabled,d(e,t,o),e[o].enabled=u}}}function se(e,t,o,n){for(var i=0,a=0,d=e.length-1;a<=d&&i<1e4;){var s=go((a+d)/2),r=e[s],l=n===void 0?r[o]:r[o][n],c=t(l);if(0==c)return s;-1==c?a=s+1:d=s-1;i++}return-1}function re(e,t,o,n,i){var a=0,d=0,s=e.length-1,r,l,c,u;for(i=null==i?function(e,t){return e==t?0:e<t?-1:1}:i;d<=s&&10000>a;){if(u=go(.5*(s+d)),r=e[yo(0,u-1)][o],l=e[u][o],c=e[fo(e.length-1,u+1)][o],0==i(l,t))return u;if(0>i(r,t)&&0<i(l,t))return"before"==n?yo(0,u-1):u;if(0>i(l,t)&&0<i(c,t))return"before"==n?u:fo(e.length-1,u+1);0>i(l,t)?d=u+1:s=u-1,a++}return-1}function le(){var e=document.createElement("p");e.style.width="100%",e.style.height="200px";var t=document.createElement("div");t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.appendChild(e),document.body.appendChild(t);var o=e.offsetWidth;t.style.overflow="scroll";var n=e.offsetWidth;return o==n&&(n=t.clientWidth),document.body.removeChild(t),o-n}function ce(e,t){var o;Array.isArray(t)||(t=[t]);var n=!0,a=!1,d=void 0;try{for(var s=e[Symbol.iterator](),r,l;!(n=(r=s.next()).done);n=!0)if(l=r.value,l){o=l[t[0]];for(var c=1;c<t.length;c++)o&&(o=o[t[c]]);if("undefined"!=typeof o)break}}catch(e){a=!0,d=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw d}}return o}function ue(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function pe(e,t){return t={exports:{}},e(t,t.exports),t.exports}function he(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function me(e,t){for(var o=0,n;o<t.length;o++)n=t[o],n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}function ge(e,t,o){return t&&me(e.prototype,t),o&&me(e,o),e}function ye(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fe(e,t){return t&&("object"===Vo(t)||"function"==typeof t)?t:Zo(e)}function be(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&&Qo(e,t)}function _e(e,t){var o=t||0,n=Jo;return n[e[o++]]+n[e[o++]]+n[e[o++]]+n[e[o++]]+"-"+n[e[o++]]+n[e[o++]]+"-"+n[e[o++]]+n[e[o++]]+"-"+n[e[o++]]+n[e[o++]]+"-"+n[e[o++]]+n[e[o++]]+n[e[o++]]+n[e[o++]]+n[e[o++]]+n[e[o++]]}function ve(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=1<arguments.length?arguments[1]:void 0,o=2<arguments.length?arguments[2]:void 0,n=t&&o||0;"string"==typeof e&&(t="binary"===e?Array(16):void 0,e={});var i=e.random||(e.rng||tn)();if(i[6]=64|15&i[6],i[8]=128|63&i[8],t)for(var a=0;16>a;a++)t[n+a]=i[a];return t||_e(i)}function ke(e){return ke="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},ke(e)}function we(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function xe(e,t){return t={exports:{}},e(t,t.exports),t.exports}function Se(e){return e instanceof Number||"number"==typeof e}function Oe(e){return e instanceof String||"string"==typeof e}function De(e){return ln.isMoment(e)}function Te(e,t){var o;if(void 0!==e){if(null===e)return null;if(!t)return e;if("string"!=typeof t&&!(t instanceof String))throw new Error("Type must be a string");switch(t){case"boolean":case"Boolean":return!!e;case"number":case"Number":return Oe(e)&&!isNaN(Date.parse(e))?ln(e).valueOf():+e.valueOf();case"string":case"String":return e+"";case"Date":if(Se(e))return new Date(e);if(e instanceof Date)return new Date(e.valueOf());if(De(e))return new Date(e.valueOf());if(Oe(e))return o=bn.exec(e),o?new Date(+o[1]):ln(new Date(e)).toDate();throw new Error("Cannot convert object of type "+Ce(e)+" to type Date");case"Moment":if(Se(e))return ln(e);if(e instanceof Date)return ln(e.valueOf());if(De(e))return ln(e);if(Oe(e))return o=bn.exec(e),o?ln(+o[1]):ln(e);throw new Error("Cannot convert object of type "+Ce(e)+" to type Date");case"ISODate":if(Se(e))return new Date(e);if(e instanceof Date)return e.toISOString();if(De(e))return e.toDate().toISOString();if(Oe(e))return o=bn.exec(e),o?new Date(+o[1]).toISOString():ln(e).format();throw new Error("Cannot convert object of type "+Ce(e)+" to type ISODate");case"ASPDate":if(Se(e))return"/Date("+e+")/";if(e instanceof Date)return"/Date("+e.valueOf()+")/";if(Oe(e)){o=bn.exec(e);var n;return n=o?new Date(+o[1]).valueOf():new Date(e).valueOf(),"/Date("+n+")/"}throw new Error("Cannot convert object of type "+Ce(e)+" to type ASPDate");default:throw new Error("Unknown type ".concat(t));}}}function Ce(e){var t=ke(e);return"object"===t?null===e?"null":e instanceof Boolean?"Boolean":e instanceof Number?"Number":e instanceof String?"String":Array.isArray(e)?"Array":e instanceof Date?"Date":"Object":"number"===t?"Number":"boolean"===t?"Boolean":"string"===t?"String":void 0===t?"undefined":t}function Ee(e){return"string"==typeof e||"number"==typeof e}function Me(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}}function Ie(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function Pe(e,t){var o=Object.keys(e);return Object.getOwnPropertySymbols&&o.push.apply(o,Object.getOwnPropertySymbols(e)),t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o}function Fe(e){for(var t=1,o;t<arguments.length;t++)o=null==arguments[t]?{}:arguments[t],t%2?Pe(o,!0).forEach(function(t){Uo(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Pe(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))});return e}function Ye(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function ze(e,t){return t={exports:{}},e(t,t.exports),t.exports}function Ne(e){return Pn=e,qe()}function Re(){Fn=0,Yn=Pn.charAt(0)}function Be(){Fn++,Yn=Pn.charAt(Fn)}function He(){return Pn.charAt(Fn+1)}function Le(e){return Rn.test(e)}function Ae(e,t){if(e||(e={}),t)for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);return e}function We(e,t,n){for(var i=t.split("."),a=e;i.length;){var d=i.shift();i.length?(!a[d]&&(a[d]={}),a=a[d]):a[d]=n}}function je(e,t){for(var o=null,n=[e],a=e,d,s;a.parent;)n.push(a.parent),a=a.parent;if(a.nodes)for(d=0,s=a.nodes.length;d<s;d++)if(t.id===a.nodes[d].id){o=a.nodes[d];break}for(o||(o={id:t.id},e.node&&(o.attr=Ae(o.attr,e.node))),d=n.length-1;0<=d;d--){var r=n[d];r.nodes||(r.nodes=[]),-1===r.nodes.indexOf(o)&&r.nodes.push(o)}t.attr&&(o.attr=Ae(o.attr,t.attr))}function Ue(e,t){if(e.edges||(e.edges=[]),e.edges.push(t),e.edge){var o=Ae({},e.edge);t.attr=Ae(o,t.attr)}}function Ve(e,t,o,n,i){var a={from:t,to:o,type:n};return e.edge&&(a.attr=Ae({},e.edge)),a.attr=Ae(a.attr||{},i),null!=i&&i.hasOwnProperty("arrows")&&null!=i.arrows&&(a.arrows={to:{enabled:!0,type:i.arrows.type}},i.arrows=null),a}function Ge(){for(Nn=Mn.NULL,zn="";" "===Yn||"\t"===Yn||"\n"===Yn||"\r"===Yn;)Be();do{var e=!1;if("#"===Yn){for(var t=Fn-1;" "===Pn.charAt(t)||"\t"===Pn.charAt(t);)t--;if("\n"===Pn.charAt(t)||""===Pn.charAt(t)){for(;""!=Yn&&"\n"!=Yn;)Be();e=!0}}if("/"===Yn&&"/"===He()){for(;""!=Yn&&"\n"!=Yn;)Be();e=!0}if("/"===Yn&&"*"===He()){for(;""!=Yn;)if("*"===Yn&&"/"===He()){Be(),Be();break}else Be();e=!0}for(;" "===Yn||"\t"===Yn||"\n"===Yn||"\r"===Yn;)Be()}while(e);if(""===Yn)return void(Nn=Mn.DELIMITER);var o=Yn+He();if(In[o])return Nn=Mn.DELIMITER,zn=o,Be(),void Be();if(In[Yn])return Nn=Mn.DELIMITER,zn=Yn,void Be();if(Le(Yn)||"-"===Yn){for(zn+=Yn,Be();Le(Yn);)zn+=Yn,Be();return"false"===zn?zn=!1:"true"===zn?zn=!0:!isNaN(+zn)&&(zn=+zn),void(Nn=Mn.IDENTIFIER)}if("\""===Yn){for(Be();""!=Yn&&("\""!=Yn||"\""===Yn&&"\""===He());)"\""===Yn?(zn+=Yn,Be()):"\\"===Yn&&"n"===He()?(zn+="\n",Be()):zn+=Yn,Be();if("\""!=Yn)throw tt("End of string \" expected");return Be(),void(Nn=Mn.IDENTIFIER)}for(Nn=Mn.UNKNOWN;""!=Yn;)zn+=Yn,Be();throw new SyntaxError("Syntax error in part \""+ot(zn,30)+"\"")}function qe(){var e={};if(Re(),Ge(),"strict"===zn&&(e.strict=!0,Ge()),("graph"===zn||"digraph"===zn)&&(e.type=zn,Ge()),Nn===Mn.IDENTIFIER&&(e.id=zn,Ge()),"{"!=zn)throw tt("Angle bracket { expected");if(Ge(),Ze(e),"}"!=zn)throw tt("Angle bracket } expected");if(Ge(),""!==zn)throw tt("End of file expected");return Ge(),delete e.node,delete e.edge,delete e.graph,e}function Ze(e){for(;""!==zn&&"}"!=zn;)Xe(e),";"===zn&&Ge()}function Xe(e){var t=Ke(e);if(t)return void Je(e,t);var o=Qe(e);if(!o){if(Nn!=Mn.IDENTIFIER)throw tt("Identifier expected");var n=zn;if(Ge(),"="===zn){if(Ge(),Nn!=Mn.IDENTIFIER)throw tt("Identifier expected");e[n]=zn,Ge()}else $e(e,n)}}function Ke(e){var t=null;if("subgraph"===zn&&(t={},t.type="subgraph",Ge(),Nn===Mn.IDENTIFIER&&(t.id=zn,Ge())),"{"===zn){if(Ge(),t||(t={}),t.parent=e,t.node=e.node,t.edge=e.edge,t.graph=e.graph,Ze(t),"}"!=zn)throw tt("Angle bracket } expected");Ge(),delete t.node,delete t.edge,delete t.graph,delete t.parent,e.subgraphs||(e.subgraphs=[]),e.subgraphs.push(t)}return t}function Qe(e){return"node"===zn?(Ge(),e.node=et(),"node"):"edge"===zn?(Ge(),e.edge=et(),"edge"):"graph"===zn?(Ge(),e.graph=et(),"graph"):null}function $e(e,t){var o={id:t},n=et();n&&(o.attr=n),je(e,o),Je(e,t)}function Je(e,t){for(;"->"===zn||"--"===zn;){var o=zn,n;Ge();var i=Ke(e);if(i)n=i;else{if(Nn!=Mn.IDENTIFIER)throw tt("Identifier or subgraph expected");n=zn,je(e,{id:n}),Ge()}var a=et(),d=Ve(e,t,n,o,a);Ue(e,d),t=n}}function et(){for(var e=null,t={dashed:!0,solid:!1,dotted:[1,5]},o={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},n=[],a=[],d;"["===zn;){for(Ge(),e={};""!==zn&&"]"!=zn;){if(Nn!=Mn.IDENTIFIER)throw tt("Attribute name expected");var s=zn;if(Ge(),"="!=zn)throw tt("Equal sign = expected");if(Ge(),Nn!=Mn.IDENTIFIER)throw tt("Attribute value expected");var r=zn;"style"===s&&(r=t[r]);var l;"arrowhead"===s&&(l=o[r],s="arrows",r={to:{enabled:!0,type:l}}),"arrowtail"===s&&(l=o[r],s="arrows",r={from:{enabled:!0,type:l}}),n.push({attr:e,name:s,value:r}),a.push(s),Ge(),","==zn&&Ge()}if("]"!=zn)throw tt("Bracket ] expected");Ge()}if(a.includes("dir")){var c={arrows:{}};for(d=0;d<n.length;d++)if(!("arrows"===n[d].name))"dir"===n[d].name&&(c.dir=d);else if(null!=n[d].value.to)c.arrows.to=d;else if(null!=n[d].value.from)c.arrows.from=d;else throw tt("Invalid value of arrows");var u=n[c.dir].value;if(!a.includes("arrows"))if("both"===u)n.push({attr:n[c.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),c.arrows.to=n.length-1,n.push({attr:n[c.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),c.arrows.from=n.length-1;else if("forward"===u)n.push({attr:n[c.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),c.arrows.to=n.length-1;else if("back"===u)n.push({attr:n[c.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),c.arrows.from=n.length-1;else if("none"===u)n.push({attr:n[c.dir].attr,name:"arrows",value:""}),c.arrows.to=n.length-1;else throw tt("Invalid dir type \""+u+"\"");var p,h;if("both"===u)c.arrows.to&&c.arrows.from?(h=n[c.arrows.to].value.to.type,p=n[c.arrows.from].value.from.type,n[c.arrows.to]={attr:n[c.arrows.to].attr,name:n[c.arrows.to].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:p}}},n.splice(c.arrows.from,1)):c.arrows.to?(h=n[c.arrows.to].value.to.type,p="arrow",n[c.arrows.to]={attr:n[c.arrows.to].attr,name:n[c.arrows.to].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:p}}}):c.arrows.from&&(h="arrow",p=n[c.arrows.from].value.from.type,n[c.arrows.from]={attr:n[c.arrows.from].attr,name:n[c.arrows.from].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:p}}});else if("back"===u)c.arrows.to&&c.arrows.from?(h="",p=n[c.arrows.from].value.from.type,n[c.arrows.from]={attr:n[c.arrows.from].attr,name:n[c.arrows.from].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:p}}}):c.arrows.to?(h="",p="arrow",c.arrows.from=c.arrows.to,n[c.arrows.from]={attr:n[c.arrows.from].attr,name:n[c.arrows.from].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:p}}}):c.arrows.from&&(h="",p=n[c.arrows.from].value.from.type,n[c.arrows.to]={attr:n[c.arrows.from].attr,name:n[c.arrows.from].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:p}}}),n[c.arrows.from]={attr:n[c.arrows.from].attr,name:n[c.arrows.from].name,value:{from:{enabled:!0,type:n[c.arrows.from].value.from.type}}};else if("none"===u){var m;m=c.arrows.to?c.arrows.to:c.arrows.from,n[m]={attr:n[m].attr,name:n[m].name,value:""}}else if("forward"===u)c.arrows.to&&c.arrows.from?(h=n[c.arrows.to].value.to.type,p="",n[c.arrows.to]={attr:n[c.arrows.to].attr,name:n[c.arrows.to].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:p}}}):c.arrows.to?(h=n[c.arrows.to].value.to.type,p="",n[c.arrows.to]={attr:n[c.arrows.to].attr,name:n[c.arrows.to].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:p}}}):c.arrows.from&&(h="arrow",p="",c.arrows.to=c.arrows.from,n[c.arrows.to]={attr:n[c.arrows.to].attr,name:n[c.arrows.to].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:p}}}),n[c.arrows.to]={attr:n[c.arrows.to].attr,name:n[c.arrows.to].name,value:{to:{enabled:!0,type:n[c.arrows.to].value.to.type}}};else throw tt("Invalid dir type \""+u+"\"");n.splice(c.dir,1)}var g;if(a.includes("penwidth")){var y=[];for(g=n.length,d=0;d<g;d++)"width"!==n[d].name&&("penwidth"===n[d].name&&(n[d].name="width"),y.push(n[d]));n=y}for(g=n.length,d=0;d<g;d++)We(n[d].attr,n[d].name,n[d].value);return e}function tt(e){return new SyntaxError(e+", got \""+ot(zn,30)+"\" (char "+Fn+")")}function ot(e,t){return e.length<=t?e:e.substr(0,27)+"..."}function nt(e,t,o){Array.isArray(e)?e.forEach(function(e){Array.isArray(t)?t.forEach(function(t){o(e,t)}):o(e,t)}):Array.isArray(t)?t.forEach(function(t){o(e,t)}):o(e,t)}function it(e,t,o){for(var n=t.split("."),a=n.pop(),d=e,s=0,r;s<n.length;s++)r=n[s],r in d||(d[r]={}),d=d[r];return d[a]=o,e}function at(e,t){var o={};for(var n in e)if(e.hasOwnProperty(n)){var i=t[n];Array.isArray(i)?i.forEach(function(t){it(o,t,e[n])}):"string"==typeof i?it(o,i,e[n]):it(o,n,e[n])}return o}function dt(e,t){var o={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};null!=t&&(null!=t.fixed&&(o.nodes.fixed=t.fixed),null!=t.parseColor&&(o.nodes.parseColor=t.parseColor),null!=t.inheritColor&&(o.edges.inheritColor=t.inheritColor));var n=e.edges,i=n.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===o.edges.inheritColor&&(t.color=e.color),t}),a=e.nodes.map(function(e){var t={id:e.id,fixed:o.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===o.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});return{nodes:a,edges:i}}function st(){return st=Object.assign||function(e){for(var t=1,o;t<arguments.length;t++)for(var n in o=arguments[t],o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n]);return e},st.apply(this,arguments)}function rt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function lt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ct(e,t){for(var o=t[0].toUpperCase()+t.slice(1),n=0,a,d;n<qn.length;){if(a=qn[n],d=a?a+o:t,d in e)return d;n++}}function ut(){if(!ei)return!1;var e={},t=$n.CSS&&$n.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(o){return e[o]=!t||$n.CSS.supports("touch-action",o)}),e}function pt(e,t,o){if(e)if(e.forEach)e.forEach(t,o);else if(void 0!==e.length)for(n=0;n<e.length;)t.call(o,e[n],n,e),n++;else for(var n in e)e.hasOwnProperty(n)&&t.call(o,e[n],n,e)}function ht(e,t){return"function"===typeof e?e.apply(t?t[0]||void 0:void 0,t):e}function mt(e,t){return-1<e.indexOf(t)}function gt(e){if(mt(e,"none"))return"none";var t=mt(e,"pan-x"),o=mt(e,"pan-y");return t&&o?"none":t||o?t?"pan-x":"pan-y":mt(e,"manipulation")?"manipulation":"auto"}function yt(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function ft(e){var t=e.length;if(1===t)return{x:Xn(e[0].clientX),y:Xn(e[0].clientY)};for(var o=0,n=0,a=0;a<t;)o+=e[a].clientX,n+=e[a].clientY,a++;return{x:Xn(o/t),y:Xn(n/t)}}function bt(e){for(var t=[],o=0;o<e.pointers.length;)t[o]={clientX:Xn(e.pointers[o].clientX),clientY:Xn(e.pointers[o].clientY)},o++;return{timeStamp:Qn(),pointers:t,center:ft(t),deltaX:e.deltaX,deltaY:e.deltaY}}function _t(e,t,o){o||(o=Si);var n=t[o[0]]-e[o[0]],i=t[o[1]]-e[o[1]];return mo(n*n+i*i)}function vt(e,t,o){o||(o=Si);var n=t[o[0]]-e[o[0]],i=t[o[1]]-e[o[1]];return 180*ho(i,n)/po}function kt(e,t){return e===t?1:Kn(e)>=Kn(t)?0>e?2:4:0>t?8:16}function wt(e,t){var o=t.center,n=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};(t.eventType===1||a.eventType===4)&&(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},n=e.offsetDelta={x:o.x,y:o.y}),t.deltaX=i.x+(o.x-n.x),t.deltaY=i.y+(o.y-n.y)}function xt(e,t,o){return{x:t/e||0,y:o/e||0}}function St(e,t){return _t(t[0],t[1],Oi)/_t(e[0],e[1],Oi)}function Ot(e,t){return vt(t[1],t[0],Oi)+vt(e[1],e[0],Oi)}function Dt(e,t){var o=e.lastInterval||t,n=t.timeStamp-o.timeStamp,i,a,d,s;if(t.eventType!==8&&(n>25||o.velocity===void 0)){var r=t.deltaX-o.deltaX,l=t.deltaY-o.deltaY,c=xt(n,r,l);a=c.x,d=c.y,i=Kn(c.x)>Kn(c.y)?c.x:c.y,s=kt(r,l),e.lastInterval=t}else i=o.velocity,a=o.velocityX,d=o.velocityY,s=o.direction;t.velocity=i,t.velocityX=a,t.velocityY=d,t.direction=s}function Tt(e,t){var o=e.session,n=t.pointers,i=n.length;o.firstInput||(o.firstInput=bt(t)),1<i&&!o.firstMultiple?o.firstMultiple=bt(t):1===i&&(o.firstMultiple=!1);var a=o.firstInput,d=o.firstMultiple,s=d?d.center:a.center,r=t.center=ft(n);t.timeStamp=Qn(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=vt(s,r),t.distance=_t(s,r),wt(o,t),t.offsetDirection=kt(t.deltaX,t.deltaY);var l=xt(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=l.x,t.overallVelocityY=l.y,t.overallVelocity=Kn(l.x)>Kn(l.y)?l.x:l.y,t.scale=d?St(d.pointers,n):1,t.rotation=d?Ot(d.pointers,n):0,t.maxPointers=o.prevInput?t.pointers.length>o.prevInput.maxPointers?t.pointers.length:o.prevInput.maxPointers:t.pointers.length,Dt(o,t);var c=e.element;yt(t.srcEvent.target,c)&&(c=t.srcEvent.target),t.target=c}function Ct(e,t,o){var n=o.pointers.length,i=o.changedPointers.length,a=t&1&&0==n-i;o.isFirst=!!a,o.isFinal=!!(t&12&&0==n-i),a&&(e.session={}),o.eventType=t,Tt(e,o),e.emit("hammer.input",o),e.recognize(o),e.session.prevInput=o}function Et(e){return e.trim().split(/\s+/g)}function Mt(e,t,o){pt(Et(t),function(t){e.addEventListener(t,o,!1)})}function It(e,t,o){pt(Et(t),function(t){e.removeEventListener(t,o,!1)})}function Pt(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}function Ft(e,t,o){if(e.indexOf&&!o)return e.indexOf(t);for(var n=0;n<e.length;){if(o&&e[n][o]==t||!o&&e[n]===t)return n;n++}return-1}function Yt(e){return Array.prototype.slice.call(e,0)}function zt(e,t,o){for(var n=[],a=[],d=0,s;d<e.length;)s=t?e[d][t]:e[d],0>Ft(a,s)&&n.push(e[d]),a[d]=s,d++;return o&&(t?n=n.sort(function(e,o){return e[t]>o[t]}):n=n.sort()),n}function Nt(e,t){var o=Yt(e.touches),n=this.targetIds;if(3&t&&1===o.length)return n[o[0].identifier]=!0,[o,o];var a=Yt(e.changedTouches),d=[],s=this.target,r,l;if(l=o.filter(function(e){return yt(e.target,s)}),1===t)for(r=0;r<l.length;)n[l[r].identifier]=!0,r++;for(r=0;r<a.length;)n[a[r].identifier]&&d.push(a[r]),12&t&&delete n[a[r].identifier],r++;return d.length?[zt(l.concat(d),"identifier",!0),d]:void 0}function Rt(e){var t=e.changedPointers,o=t[0];if(o.identifier===this.primaryTouch){var n={x:o.clientX,y:o.clientY},a=this.lastTouches;this.lastTouches.push(n);var d=function(){var e=a.indexOf(n);-1<e&&a.splice(e,1)};setTimeout(d,2500)}}function Bt(e,t){e&1?(this.primaryTouch=t.changedPointers[0].identifier,Rt.call(this,t)):e&12&&Rt.call(this,t)}function Ht(e){for(var o=e.srcEvent.clientX,n=e.srcEvent.clientY,a=0;a<this.lastTouches.length;a++){var d=this.lastTouches[a],t=uo(o-d.x),s=uo(n-d.y);if(t<=25&&s<=25)return!0}return!1}function Lt(e){var t=e.options.inputClass,o;return o=t?t:ri?Pi:li?Yi:si?Ri:Ni,new o(e,Ct)}function At(e,t,o){return!!Array.isArray(e)&&(pt(e,o[t],o),!0)}function Wt(){return Vi++}function jt(e,t){var o=t.manager;return o?o.get(e):e}function Ut(e){if(e&16)return"cancel";return 8&e?"end":4&e?"move":2&e?"start":""}function Vt(e,t){var o=e.element;if(o.style){var n;pt(e.options.cssProps,function(i,a){n=ct(o.style,a),t?(e.oldCssProps[n]=o.style[n],o.style[n]=i):o.style[n]=e.oldCssProps[n]||""}),t||(e.oldCssProps={})}}function Gt(e,t){var o=document.createEvent("Event");o.initEvent(e,!0,!0),o.gesture=t,t.target.dispatchEvent(o)}function qt(e,t){var o=Yt(e.touches),n=Yt(e.changedTouches);return 12&t&&(o=zt(o.concat(n),"identifier",!0)),[o,n]}function Zt(e){if(e===16)return"down";return 8===e?"up":2===e?"left":4===e?"right":""}function Xt(t,o,n){return function(){var i=new Error("get-stack-trace"),e=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",a=window.console&&(window.console.warn||window.console.log);return a&&a.call(window.console,"DEPRECATED METHOD: "+o+"\n"+n+" AT \n",e),t.apply(this,arguments)}}function Kt(e,t,o){var n=t.prototype,i;i=e.prototype=Object.create(n),i.constructor=e,i._super=n,o&&Gn(i,o)}function Qt(e,t){return function(){return e.apply(t,arguments)}}function $t(e){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=ra(this.dom.overlay),this.hammer.on("tap",this._onTapOverlay.bind(this));var t=this;["tap","doubletap","press","pinch","pan","panstart","panmove","panend"].forEach(function(e){t.hammer.on(e,function(e){e.stopPropagation()})}),document&&document.body&&(this.onClick=function(o){Jt(o.target,e)||t.deactivate()},document.body.addEventListener("click",this.onClick)),this.keycharm!==void 0&&this.keycharm.destroy(),this.keycharm=jn(),this.escListener=this.deactivate.bind(this)}function Jt(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function eo(e,t){for(var o=0,n;o<t.length;o++)n=t[o],n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}function to(e,t){var o=[],n=!0,i=!1,a=void 0;try{for(var d=e[Symbol.iterator](),s;!(n=(s=d.next()).done)&&(o.push(s.value),!(t&&o.length===t));n=!0);}catch(e){i=!0,a=e}finally{try{n||null==d["return"]||d["return"]()}finally{if(i)throw a}}return o}function oo(e,t){return ya(e)||fa(e,t)||ba()}function no(){var e;window!==void 0&&(e=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),window.requestAnimationFrame=void 0===e?function(e){e()}:e}function io(e,t,o){var n=this;if(!(this instanceof io))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:ca,clickToUse:!1},Wo.extend(this.options,this.defaultOptions),this.body={container:e,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this),once:this.once.bind(this)},eventListeners:{onTap:function(){},onTouch:function(){},onDoubleTap:function(){},onHold:function(){},onDragStart:function(){},onDrag:function(){},onDragEnd:function(){},onMouseWheel:function(){},onPinch:function(){},onMouseMove:function(){},onRelease:function(){},onContext:function(){}},data:{nodes:null,edges:null},functions:{createNode:function(){},createEdge:function(){},getPointer:function(){}},modules:{},view:{scale:1,translation:{x:0,y:0}}},this.bindEventListeners(),this.images=new ma(function(){return n.body.emitter.emit("_requestRedraw")}),this.groups=new ga,this.canvas=new jd(this.body),this.selectionHandler=new Zd(this.body,this.canvas),this.interactionHandler=new qd(this.body,this.canvas,this.selectionHandler),this.view=new Ud(this.body,this.canvas),this.renderer=new Nd(this.body,this.canvas),this.physics=new Pd(this.body),this.layoutEngine=new os(this.body),this.clustering=new zd(this.body),this.manipulation=new ns(this.body,this.canvas,this.selectionHandler),this.nodesHandler=new td(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new xd(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new bs(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(o),this.setData(t)}for(var bo=t,_o=o,vo=n,ko=a,wo=d,xo="undefined"==typeof globalThis?"undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?{}:self:global:window:globalThis,So=r(function(e){function t(e){return t="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},t(e)}function o(n){return e.exports="function"==typeof Symbol&&"symbol"===t(Symbol.iterator)?o=function(e){return t(e)}:o=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":t(e)},o(n)}e.exports=o}),Oo=r(function(e){(function(t,o){e.exports=o()})(xo,function(){function t(){return Lt.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function n(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function i(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function a(e){return void 0===e}function d(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function r(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function l(e,t){var o=[],n;for(n=0;n<e.length;++n)o.push(t(e[n],n));return o}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e,t){for(var o in t)c(t,o)&&(e[o]=t[o]);return c(t,"toString")&&(e.toString=t.toString),c(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,o,n){return Ke(e,t,o,n,!0).utc()}function h(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function g(e){return null==e._pf&&(e._pf=h()),e._pf}function y(e){if(null==e._isValid){var t=g(e),o=At.call(t.parsedDateParts,function(e){return null!=e}),n=!isNaN(e._d.getTime())&&0>t.overflow&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&o);if(e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null==Object.isFrozen||!Object.isFrozen(e))e._isValid=n;else return n}return e._isValid}function f(e){var t=p(NaN);return null==e?g(t).userInvalidated=!0:u(g(t),e),t}function b(e,t){var o,n,d;if(a(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),a(t._i)||(e._i=t._i),a(t._f)||(e._f=t._f),a(t._l)||(e._l=t._l),a(t._strict)||(e._strict=t._strict),a(t._tzm)||(e._tzm=t._tzm),a(t._isUTC)||(e._isUTC=t._isUTC),a(t._offset)||(e._offset=t._offset),a(t._pf)||(e._pf=g(t)),a(t._locale)||(e._locale=t._locale),0<Wt.length)for(o=0;o<Wt.length;o++)n=Wt[o],d=t[n],a(d)||(e[n]=d);return e}function _(e){b(this,e),this._d=new Date(null==e._d?NaN:e._d.getTime()),this.isValid()||(this._d=new Date(NaN)),!1===jt&&(jt=!0,t.updateOffset(this),jt=!1)}function v(e){return e instanceof _||null!=e&&null!=e._isAMomentObject}function k(e){return 0>e?co(e)||0:go(e)}function w(e){var t=+e,o=0;return 0!=t&&isFinite(t)&&(o=k(t)),o}function x(e,t,o){var n=fo(e.length,t.length),a=uo(e.length-t.length),d=0,s;for(s=0;s<n;s++)(o&&e[s]!==t[s]||!o&&w(e[s])!==w(t[s]))&&d++;return d+a}function S(e){!1===t.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function O(e,o){var n=!0;return u(function(){if(null!=t.deprecationHandler&&t.deprecationHandler(null,e),n){for(var a=[],d=0,s;d<arguments.length;d++){if(s="","object"==typeof arguments[d]){for(var r in s+="\n["+d+"] ",arguments[0])s+=r+": "+arguments[0][r]+", ";s=s.slice(0,-2)}else s=arguments[d];a.push(s)}S(e+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+new Error().stack),n=!1}return o.apply(this,arguments)},o)}function D(e,o){null!=t.deprecationHandler&&t.deprecationHandler(e,o),Ut[e]||(S(o),Ut[e]=!0)}function T(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function C(e){var t,o;for(o in e)t=e[o],T(t)?this[o]=t:this["_"+o]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function E(e,t){var o=u({},e),i;for(i in t)c(t,i)&&(n(e[i])&&n(t[i])?(o[i]={},u(o[i],e[i]),u(o[i],t[i])):null==t[i]?delete o[i]:o[i]=t[i]);for(i in e)c(e,i)&&!c(t,i)&&n(e[i])&&(o[i]=u({},o[i]));return o}function M(e){null!=e&&this.set(e)}function I(e,t){var o=e.toLowerCase();qt[o]=qt[o+"s"]=qt[t]=e}function P(e){return"string"==typeof e?qt[e]||qt[e.toLowerCase()]:void 0}function F(e){var t={},o,n;for(n in e)c(e,n)&&(o=P(n),o&&(t[o]=e[n]));return t}function Y(e,t){Zt[e]=t}function z(e){var t=[];for(var o in e)t.push({unit:o,priority:Zt[o]});return t.sort(function(e,t){return e.priority-t.priority}),t}function N(e,t,o){var n=""+uo(e),i=t-n.length;return(0<=e?o?"+":"":"-")+lo(10,yo(0,i)).toString().substr(1)+n}function R(e,t,o,n){var i=n;"string"==typeof n&&(i=function(){return this[n]()}),e&&($t[e]=i),t&&($t[t[0]]=function(){return N(i.apply(this,arguments),t[1],t[2])}),o&&($t[o]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function B(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function H(e){var t=e.match(Xt),o,n;for(o=0,n=t.length;o<n;o++)t[o]=$t[t[o]]?$t[t[o]]:B(t[o]);return function(o){var a="",d;for(d=0;d<n;d++)a+=T(t[d])?t[d].call(o,e):t[d];return a}}function L(e,t){return e.isValid()?(t=A(t,e.localeData()),Qt[t]=Qt[t]||H(t),Qt[t](e)):e.localeData().invalidDate()}function A(e,t){function o(e){return t.longDateFormat(e)||e}var n=5;for(Kt.lastIndex=0;0<=n&&Kt.test(e);)e=e.replace(Kt,o),Kt.lastIndex=0,n-=1;return e}function W(e,t,o){So[e]=T(t)?t:function(e){return e&&o?o:t}}function j(e,t){return c(So,e)?So[e](t._strict,t._locale):new RegExp(U(e))}function U(e){return V(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,o,n,i){return t||o||n||i}))}function V(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function G(e,t){var o=t,n;for("string"==typeof e&&(e=[e]),d(t)&&(o=function(e,o){o[t]=w(e)}),n=0;n<e.length;n++)Oo[e[n]]=o}function q(e,t){G(e,function(e,o,n,i){n._w=n._w||{},t(e,n._w,n,i)})}function Z(e,t,o){null!=t&&c(Oo,e)&&Oo[e](t,o._a,o,e)}function X(e){return K(e)?366:365}function K(e){return 0==e%4&&0!=e%100||0==e%400}function Q(e,o){return function(n){return null==n?$(this,e):(J(this,e,n),t.updateOffset(this,o),this)}}function $(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function J(e,t,o){e.isValid()&&!isNaN(o)&&("FullYear"===t&&K(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](o,e.month(),oe(o,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](o))}function ee(e,t){if("object"==typeof e){e=F(e);for(var o=z(e),n=0;n<o.length;n++)this[o[n].unit](e[o[n].unit])}else if(e=P(e),T(this[e]))return this[e](t);return this}function te(e,t){return(e%t+t)%t}function oe(e,t){if(isNaN(e)||isNaN(t))return NaN;var o=te(t,12);return e+=(t-o)/12,1===o?K(e)?29:28:31-o%7%2}function ne(e,t,o){var n=e.toLocaleLowerCase(),a,d,s;if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],a=0;12>a;++a)s=p([2e3,a]),this._shortMonthsParse[a]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[a]=this.months(s,"").toLocaleLowerCase();return o?"MMM"===t?(d=Fo.call(this._shortMonthsParse,n),-1===d?null:d):(d=Fo.call(this._longMonthsParse,n),-1===d?null:d):"MMM"===t?(d=Fo.call(this._shortMonthsParse,n),-1!==d)?d:(d=Fo.call(this._longMonthsParse,n),-1===d?null:d):(d=Fo.call(this._longMonthsParse,n),-1!==d)?d:(d=Fo.call(this._shortMonthsParse,n),-1===d?null:d)}function ie(e,t,o){var n,a,d;if(this._monthsParseExact)return ne.call(this,e,t,o);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;12>n;n++){if(a=p([2e3,n]),o&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),o||this._monthsParse[n]||(d="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[n]=new RegExp(d.replace(".",""),"i")),o&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(o&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!o&&this._monthsParse[n].test(e))return n}}function ae(e,t){var o;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=w(t);else if(t=e.localeData().monthsParse(t),!d(t))return e;return o=fo(e.date(),oe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,o),e}function de(e){return null==e?$(this,"Month"):(ae(this,e),t.updateOffset(this,!0),this)}function se(){function e(e,t){return t.length-e.length}var t=[],o=[],n=[],a,d;for(a=0;12>a;a++)d=p([2e3,a]),t.push(this.monthsShort(d,"")),o.push(this.months(d,"")),n.push(this.months(d,"")),n.push(this.monthsShort(d,""));for(t.sort(e),o.sort(e),n.sort(e),a=0;12>a;a++)t[a]=V(t[a]),o[a]=V(o[a]);for(a=0;24>a;a++)n[a]=V(n[a]);this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function re(e,t,o,n,i,a,d){var s;return 100>e&&0<=e?(s=new Date(e+400,t,o,n,i,a,d),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,o,n,i,a,d),s}function le(e){var t;if(100>e&&0<=e){var o=Array.prototype.slice.call(arguments);o[0]=e+400,t=new Date(Date.UTC.apply(null,o)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function ce(e,t,o){var n=7+t-o,i=(7+le(e,0,n).getUTCDay()-t)%7;return-i+n-1}function ue(e,t,o,n,i){var a=ce(e,n,i),d=1+7*(t-1)+(7+o-n)%7+a,s,r;return 0>=d?(s=e-1,r=X(s)+d):d>X(e)?(s=e+1,r=d-X(e)):(s=e,r=d),{year:s,dayOfYear:r}}function pe(e,t,o){var n=ce(e.year(),t,o),i=go((e.dayOfYear()-n-1)/7)+1,a,d;return 1>i?(d=e.year()-1,a=i+he(d,t,o)):i>he(e.year(),t,o)?(a=i-he(e.year(),t,o),d=e.year()+1):(d=e.year(),a=i),{week:a,year:d}}function he(e,t,o){var n=ce(e,t,o),i=ce(e+1,t,o);return(X(e)-n+i)/7}function me(e,t){return"string"==typeof e?isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10):e}function ge(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function ye(e,t){return e.slice(t,7).concat(e.slice(0,t))}function fe(e,t,o){var n=e.toLocaleLowerCase(),a,d,s;if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],a=0;7>a;++a)s=p([2e3,1]).day(a),this._minWeekdaysParse[a]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[a]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[a]=this.weekdays(s,"").toLocaleLowerCase();return o?"dddd"===t?(d=Fo.call(this._weekdaysParse,n),-1===d?null:d):"ddd"===t?(d=Fo.call(this._shortWeekdaysParse,n),-1===d?null:d):(d=Fo.call(this._minWeekdaysParse,n),-1===d?null:d):"dddd"===t?(d=Fo.call(this._weekdaysParse,n),-1!==d)?d:(d=Fo.call(this._shortWeekdaysParse,n),-1!==d)?d:(d=Fo.call(this._minWeekdaysParse,n),-1===d?null:d):"ddd"===t?(d=Fo.call(this._shortWeekdaysParse,n),-1!==d)?d:(d=Fo.call(this._weekdaysParse,n),-1!==d)?d:(d=Fo.call(this._minWeekdaysParse,n),-1===d?null:d):(d=Fo.call(thi