(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[5083],{83416:function(cn){/**
 * vis.js
 * https://github.com/almende/vis
 *
 * A dynamic, browser-based visualization library.
 *
 * @version 4.25.0
 * @date    2018-09-20
 *
 * @license
 * Copyright (C) 2011-2017 Almende B.V, http://almende.com
 *
 * Vis.js is dual licensed under both
 *
 * * The Apache 2.0 License
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * and
 *
 * * The MIT License
 *   http://opensource.org/licenses/MIT
 *
 * Vis.js may be distributed under either license.
 */(function(k,h){cn.exports=h()})(typeof self<"u"?self:this,function(){return function(L){var k={};function h(w){if(k[w])return k[w].exports;var p=k[w]={i:w,l:!1,exports:{}};return L[w].call(p.exports,p,p.exports,h),p.l=!0,p.exports}return h.m=L,h.c=k,h.d=function(w,p,S){h.o(w,p)||Object.defineProperty(w,p,{configurable:!1,enumerable:!0,get:S})},h.n=function(w){var p=w&&w.__esModule?function(){return w.default}:function(){return w};return h.d(p,"a",p),p},h.o=function(w,p){return Object.prototype.hasOwnProperty.call(w,p)},h.p="",h(h.s=85)}([function(L,k,h){"use strict";k.__esModule=!0,k.default=function(w,p){if(!(w instanceof p))throw new TypeError("Cannot call a class as a function")}},function(L,k,h){"use strict";k.__esModule=!0;var w=h(130),p=S(w);function S(M){return M&&M.__esModule?M:{default:M}}k.default=function(){function M(x,I){for(var T=0;T<I.length;T++){var R=I[T];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),(0,p.default)(x,R.key,R)}}return function(x,I,T){return I&&M(x.prototype,I),T&&M(x,T),x}}()},function(L,k,h){"use strict";var w=h(58),p=C(w),S=h(31),M=C(S),x=h(9),I=C(x),T=h(7),R=C(T);function C(e){return e&&e.__esModule?e:{default:e}}var m=h(71),c=h(119);k.isNumber=function(e){return e instanceof Number||typeof e=="number"},k.recursiveDOMDelete=function(e){if(e)for(;e.hasChildNodes()===!0;)k.recursiveDOMDelete(e.firstChild),e.removeChild(e.firstChild)},k.isString=function(e){return e instanceof String||typeof e=="string"},k.isDate=function(e){if(e instanceof Date)return!0;if(k.isString(e)){var t=s.exec(e);if(t)return!0;if(!isNaN(Date.parse(e)))return!0}return!1},k.randomUUID=function(){return c.v4()};function u(e,t,n,i){var r=!1;i===!0&&(r=t[n]===null&&e[n]!==void 0),r?delete e[n]:e[n]=t[n]}k.fillIfDefined=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(var i in e)t[i]!==void 0&&(t[i]===null||(0,R.default)(t[i])!=="object"?u(e,t,i,n):(0,R.default)(e[i])==="object"&&k.fillIfDefined(e[i],t[i],n))},k.extend=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)n.hasOwnProperty(i)&&(e[i]=n[i])}return e},k.selectiveExtend=function(e,t){if(!Array.isArray(e))throw new Error("Array with property names expected as first argument");for(var n=2;n<arguments.length;n++)for(var i=arguments[n],r=0;r<e.length;r++){var l=e[r];i&&i.hasOwnProperty(l)&&(t[l]=i[l])}return t},k.selectiveDeepExtend=function(e,t,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Array.isArray(n))throw new TypeError("Arrays are not supported by deepExtend");for(var r=0;r<e.length;r++){var l=e[r];if(n.hasOwnProperty(l))if(n[l]&&n[l].constructor===Object)t[l]===void 0&&(t[l]={}),t[l].constructor===Object?k.deepExtend(t[l],n[l],!1,i):u(t,n,l,i);else{if(Array.isArray(n[l]))throw new TypeError("Arrays are not supported by deepExtend");u(t,n,l,i)}}return t},k.selectiveNotDeepExtend=function(e,t,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Array.isArray(n))throw new TypeError("Arrays are not supported by deepExtend");for(var r in n)if(n.hasOwnProperty(r)&&e.indexOf(r)===-1)if(n[r]&&n[r].constructor===Object)t[r]===void 0&&(t[r]={}),t[r].constructor===Object?k.deepExtend(t[r],n[r]):u(t,n,r,i);else if(Array.isArray(n[r])){t[r]=[];for(var l=0;l<n[r].length;l++)t[r].push(n[r][l])}else u(t,n,r,i);return t},k.deepExtend=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(var r in t)if(t.hasOwnProperty(r)||n===!0)if(t[r]&&t[r].constructor===Object)e[r]===void 0&&(e[r]={}),e[r].constructor===Object?k.deepExtend(e[r],t[r],n):u(e,t,r,i);else if(Array.isArray(t[r])){e[r]=[];for(var l=0;l<t[r].length;l++)e[r].push(t[r][l])}else u(e,t,r,i);return e},k.equalArray=function(e,t){if(e.length!=t.length)return!1;for(var n=0,i=e.length;n<i;n++)if(e[n]!=t[n])return!1;return!0},k.convert=function(e,t){var n;if(e!==void 0){if(e===null)return null;if(!t)return e;if(typeof t!="string"&&!(t instanceof String))throw new Error("Type must be a string");switch(t){case"boolean":case"Boolean":return!!e;case"number":case"Number":return k.isString(e)&&!isNaN(Date.parse(e))?m(e).valueOf():Number(e.valueOf());case"string":case"String":return String(e);case"Date":if(k.isNumber(e))return new Date(e);if(e instanceof Date)return new Date(e.valueOf());if(m.isMoment(e))return new Date(e.valueOf());if(k.isString(e))return n=s.exec(e),n?new Date(Number(n[1])):m(new Date(e)).toDate();throw new Error("Cannot convert object of type "+k.getType(e)+" to type Date");case"Moment":if(k.isNumber(e))return m(e);if(e instanceof Date)return m(e.valueOf());if(m.isMoment(e))return m(e);if(k.isString(e))return n=s.exec(e),m(n?Number(n[1]):e);throw new Error("Cannot convert object of type "+k.getType(e)+" to type Date");case"ISODate":if(k.isNumber(e))return new Date(e);if(e instanceof Date)return e.toISOString();if(m.isMoment(e))return e.toDate().toISOString();if(k.isString(e))return n=s.exec(e),n?new Date(Number(n[1])).toISOString():m(e).format();throw new Error("Cannot convert object of type "+k.getType(e)+" to type ISODate");case"ASPDate":if(k.isNumber(e))return"/Date("+e+")/";if(e instanceof Date)return"/Date("+e.valueOf()+")/";if(k.isString(e)){n=s.exec(e);var i;return n?i=new Date(Number(n[1])).valueOf():i=new Date(e).valueOf(),"/Date("+i+")/"}else throw new Error("Cannot convert object of type "+k.getType(e)+" to type ASPDate");default:throw new Error('Unknown type "'+t+'"')}}};var s=/^\/?Date\((\-?\d+)/i;k.getType=function(e){var t=typeof e>"u"?"undefined":(0,R.default)(e);return t=="object"?e===null?"null":e instanceof Boolean?"Boolean":e instanceof Number?"Number":e instanceof String?"String":Array.isArray(e)?"Array":e instanceof Date?"Date":"Object":t=="number"?"Number":t=="boolean"?"Boolean":t=="string"?"String":t===void 0?"undefined":t},k.copyAndExtendArray=function(e,t){for(var n=[],i=0;i<e.length;i++)n.push(e[i]);return n.push(t),n},k.copyArray=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t},k.getAbsoluteLeft=function(e){return e.getBoundingClientRect().left},k.getAbsoluteRight=function(e){return e.getBoundingClientRect().right},k.getAbsoluteTop=function(e){return e.getBoundingClientRect().top},k.addClassName=function(e,t){var n=e.className.split(" "),i=t.split(" ");n=n.concat(i.filter(function(r){return n.indexOf(r)<0})),e.className=n.join(" ")},k.removeClassName=function(e,t){var n=e.className.split(" "),i=t.split(" ");n=n.filter(function(r){return i.indexOf(r)<0}),e.className=n.join(" ")},k.forEach=function(e,t){var n,i;if(Array.isArray(e))for(n=0,i=e.length;n<i;n++)t(e[n],n,e);else for(n in e)e.hasOwnProperty(n)&&t(e[n],n,e)},k.toArray=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t},k.updateProperty=function(e,t,n){return e[t]!==n?(e[t]=n,!0):!1},k.throttle=function(e){var t=!1;return function(){t||(t=!0,requestAnimationFrame(function(){t=!1,e()}))}},k.addEventListener=function(e,t,n,i){e.addEventListener?(i===void 0&&(i=!1),t==="mousewheel"&&navigator.userAgent.indexOf("Firefox")>=0&&(t="DOMMouseScroll"),e.addEventListener(t,n,i)):e.attachEvent("on"+t,n)},k.removeEventListener=function(e,t,n,i){e.removeEventListener?(i===void 0&&(i=!1),t==="mousewheel"&&navigator.userAgent.indexOf("Firefox")>=0&&(t="DOMMouseScroll"),e.removeEventListener(t,n,i)):e.detachEvent("on"+t,n)},k.preventDefault=function(e){e||(e=window.event),e.preventDefault?e.preventDefault():e.returnValue=!1},k.getTarget=function(e){e||(e=window.event);var t;return e.target?t=e.target:e.srcElement&&(t=e.srcElement),t.nodeType!=null&&t.nodeType==3&&(t=t.parentNode),t},k.hasParent=function(e,t){for(var n=e;n;){if(n===t)return!0;n=n.parentNode}return!1},k.option={},k.option.asBoolean=function(e,t){return typeof e=="function"&&(e=e()),e!=null?e!=!1:t||null},k.option.asNumber=function(e,t){return typeof e=="function"&&(e=e()),e!=null?Number(e)||t||null:t||null},k.option.asString=function(e,t){return typeof e=="function"&&(e=e()),e!=null?String(e):t||null},k.option.asSize=function(e,t){return typeof e=="function"&&(e=e()),k.isString(e)?e:k.isNumber(e)?e+"px":t||null},k.option.asElement=function(e,t){return typeof e=="function"&&(e=e()),e||t||null},k.hexToRGB=function(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,function(i,r,l,d){return r+r+l+l+d+d});var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?{r:parseInt(n[1],16),g:parseInt(n[2],16),b:parseInt(n[3],16)}:null},k.overrideOpacity=function(e,t){var n;return e.indexOf("rgba")!=-1?e:e.indexOf("rgb")!=-1?(n=e.substr(e.indexOf("(")+1).replace(")","").split(","),"rgba("+n[0]+","+n[1]+","+n[2]+","+t+")"):(n=k.hexToRGB(e),n==null?e:"rgba("+n.r+","+n.g+","+n.b+","+t+")")},k.RGBToHex=function(e,t,n){return"#"+((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},k.parseColor=function(e){var t;if(k.isString(e)===!0){if(k.isValidRGB(e)===!0){var n=e.substr(4).substr(0,e.length-5).split(",").map(function(v){return parseInt(v)});e=k.RGBToHex(n[0],n[1],n[2])}if(k.isValidHex(e)===!0){var i=k.hexToHSV(e),r={h:i.h,s:i.s*.8,v:Math.min(1,i.v*1.02)},l={h:i.h,s:Math.min(1,i.s*1.25),v:i.v*.8},d=k.HSVToHex(l.h,l.s,l.v),a=k.HSVToHex(r.h,r.s,r.v);t={background:e,border:d,highlight:{background:a,border:d},hover:{background:a,border:d}}}else t={background:e,border:e,highlight:{background:e,border:e},hover:{background:e,border:e}}}else t={},t.background=e.background||void 0,t.border=e.border||void 0,k.isString(e.highlight)?t.highlight={border:e.highlight,background:e.highlight}:(t.highlight={},t.highlight.background=e.highlight&&e.highlight.background||void 0,t.highlight.border=e.highlight&&e.highlight.border||void 0),k.isString(e.hover)?t.hover={border:e.hover,background:e.hover}:(t.hover={},t.hover.background=e.hover&&e.hover.background||void 0,t.hover.border=e.hover&&e.hover.border||void 0);return t},k.RGBToHSV=function(e,t,n){e=e/255,t=t/255,n=n/255;var i=Math.min(e,Math.min(t,n)),r=Math.max(e,Math.max(t,n));if(i==r)return{h:0,s:0,v:i};var l=e==i?t-n:n==i?e-t:n-e,d=e==i?3:n==i?1:5,a=60*(d-l/(r-i))/360,v=(r-i)/r,y=r;return{h:a,s:v,v:y}};var f={split:function(t){var n={};return t.split(";").forEach(function(i){if(i.trim()!=""){var r=i.split(":"),l=r[0].trim(),d=r[1].trim();n[l]=d}}),n},join:function(t){return(0,I.default)(t).map(function(n){return n+": "+t[n]}).join("; ")}};k.addCssText=function(e,t){var n=f.split(e.style.cssText),i=f.split(t),r=k.extend(n,i);e.style.cssText=f.join(r)},k.removeCssText=function(e,t){var n=f.split(e.style.cssText),i=f.split(t);for(var r in i)i.hasOwnProperty(r)&&delete n[r];e.style.cssText=f.join(n)},k.HSVToRGB=function(e,t,n){var i,r,l,d=Math.floor(e*6),a=e*6-d,v=n*(1-t),y=n*(1-a*t),b=n*(1-(1-a)*t);switch(d%6){case 0:i=n,r=b,l=v;break;case 1:i=y,r=n,l=v;break;case 2:i=v,r=n,l=b;break;case 3:i=v,r=y,l=n;break;case 4:i=b,r=v,l=n;break;case 5:i=n,r=v,l=y;break}return{r:Math.floor(i*255),g:Math.floor(r*255),b:Math.floor(l*255)}},k.HSVToHex=function(e,t,n){var i=k.HSVToRGB(e,t,n);return k.RGBToHex(i.r,i.g,i.b)},k.hexToHSV=function(e){var t=k.hexToRGB(e);return k.RGBToHSV(t.r,t.g,t.b)},k.isValidHex=function(e){var t=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e);return t},k.isValidRGB=function(e){e=e.replace(" ","");var t=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/i.test(e);return t},k.isValidRGBA=function(e){e=e.replace(" ","");var t=/rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(.{1,3})\)/i.test(e);return t},k.selectiveBridgeObject=function(e,t){if(t!==null&&(typeof t>"u"?"undefined":(0,R.default)(t))==="object"){for(var n=(0,M.default)(t),i=0;i<e.length;i++)t.hasOwnProperty(e[i])&&(0,R.default)(t[e[i]])=="object"&&(n[e[i]]=k.bridgeObject(t[e[i]]));return n}else return null},k.bridgeObject=function(e){if(e!==null&&(typeof e>"u"?"undefined":(0,R.default)(e))==="object"){var t=(0,M.default)(e);if(e instanceof Element)t=e;else{t=(0,M.default)(e);for(var n in e)e.hasOwnProperty(n)&&(0,R.default)(e[n])=="object"&&(t[n]=k.bridgeObject(e[n]))}return t}else return null},k.insertSort=function(e,t){for(var n=0;n<e.length;n++){for(var i=e[n],r=n;r>0&&t(i,e[r-1])<0;r--)e[r]=e[r-1];e[r]=i}return e},k.mergeOptions=function(e,t,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},r=function(E){return E!=null},l=function(E){return E!==null&&(typeof E>"u"?"undefined":(0,R.default)(E))==="object"},d=function(E){for(var A in E)if(E.hasOwnProperty(A))return!1;return!0};if(!l(e))throw new Error("Parameter mergeTarget must be an object");if(!l(t))throw new Error("Parameter options must be an object");if(!r(n))throw new Error("Parameter option must have a value");if(!l(i))throw new Error("Parameter globalOptions must be an object");var a=function(E,A,Y){l(E[Y])||(E[Y]={});var X=A[Y],U=E[Y];for(var Z in X)X.hasOwnProperty(Z)&&(U[Z]=X[Z])},v=t[n],y=l(i)&&!d(i),b=y?i[n]:void 0,P=b?b.enabled:void 0;if(v!==void 0){if(typeof v=="boolean"){l(e[n])||(e[n]={}),e[n].enabled=v;return}if(v===null&&!l(e[n]))if(r(b))e[n]=(0,M.default)(b);else return;if(l(v)){var D=!0;v.enabled!==void 0?D=v.enabled:P!==void 0&&(D=b.enabled),a(e,t,n),e[n].enabled=D}}},k.binarySearchCustom=function(e,t,n,i){for(var r=1e4,l=0,d=0,a=e.length-1;d<=a&&l<r;){var v=Math.floor((d+a)/2),y=e[v],b=i===void 0?y[n]:y[n][i],P=t(b);if(P==0)return v;P==-1?d=v+1:a=v-1,l++}return-1},k.binarySearchValue=function(e,t,n,i,r){var l=1e4,d=0,a=0,v=e.length-1,y,b,P,D;for(r=r??function(O,E){return O==E?0:O<E?-1:1};a<=v&&d<l;){if(D=Math.floor(.5*(v+a)),y=e[Math.max(0,D-1)][n],b=e[D][n],P=e[Math.min(e.length-1,D+1)][n],r(b,t)==0)return D;if(r(y,t)<0&&r(b,t)>0)return i=="before"?Math.max(0,D-1):D;if(r(b,t)<0&&r(P,t)>0)return i=="before"?D:Math.min(e.length-1,D+1);r(b,t)<0?a=D+1:v=D-1,d++}return-1},k.easingFunctions={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:-1+(4-2*t)*t},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}},k.getScrollBarWidth=function(){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 n=e.offsetWidth;t.style.overflow="scroll";var i=e.offsetWidth;return n==i&&(i=t.clientWidth),document.body.removeChild(t),n-i},k.topMost=function(e,t){var n=void 0;Array.isArray(t)||(t=[t]);var i=!0,r=!1,l=void 0;try{for(var d=(0,p.default)(e),a;!(i=(a=d.next()).done);i=!0){var v=a.value;if(v){n=v[t[0]];for(var y=1;y<t.length;y++)n&&(n=n[t[y]]);if(typeof n<"u")break}}}catch(b){r=!0,l=b}finally{try{!i&&d.return&&d.return()}finally{if(r)throw l}}return n}},function(L,k,h){L.exports={default:h(145),__esModule:!0}},function(L,k,h){"use strict";k.__esModule=!0;var w=h(7),p=S(w);function S(M){return M&&M.__esModule?M:{default:M}}k.default=function(M,x){if(!M)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&((typeof x>"u"?"undefined":(0,p.default)(x))==="object"||typeof x=="function")?x:M}},function(L,k,h){"use strict";k.__esModule=!0;var w=h(147),p=T(w),S=h(31),M=T(S),x=h(7),I=T(x);function T(R){return R&&R.__esModule?R:{default:R}}k.default=function(R,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+(typeof C>"u"?"undefined":(0,I.default)(C)));R.prototype=(0,M.default)(C&&C.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),C&&(p.default?(0,p.default)(R,C):R.__proto__=C)}},function(L,k){var h=L.exports={version:"2.5.7"};typeof __e=="number"&&(__e=h)},function(L,k,h){"use strict";k.__esModule=!0;var w=h(104),p=I(w),S=h(106),M=I(S),x=typeof M.default=="function"&&typeof p.default=="symbol"?function(T){return typeof T}:function(T){return T&&typeof M.default=="function"&&T.constructor===M.default&&T!==M.default.prototype?"symbol":typeof T};function I(T){return T&&T.__esModule?T:{default:T}}k.default=typeof M.default=="function"&&x(p.default)==="symbol"?function(T){return typeof T>"u"?"undefined":x(T)}:function(T){return T&&typeof M.default=="function"&&T.constructor===M.default&&T!==M.default.prototype?"symbol":typeof T>"u"?"undefined":x(T)}},function(L,k,h){var w=h(44)("wks"),p=h(29),S=h(10).Symbol,M=typeof S=="function",x=L.exports=function(I){return w[I]||(w[I]=M&&S[I]||(M?S:p)("Symbol."+I))};x.store=w},function(L,k,h){L.exports={default:h(102),__esModule:!0}},function(L,k){var h=L.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=h)},function(L,k,h){var w=h(10),p=h(6),S=h(61),M=h(19),x=h(14),I="prototype",T=function(R,C,m){var c=R&T.F,u=R&T.G,s=R&T.S,f=R&T.P,e=R&T.B,t=R&T.W,n=u?p:p[C]||(p[C]={}),i=n[I],r=u?w:s?w[C]:(w[C]||{})[I],l,d,a;u&&(m=C);for(l in m)d=!c&&r&&r[l]!==void 0,!(d&&x(n,l))&&(a=d?r[l]:m[l],n[l]=u&&typeof r[l]!="function"?m[l]:e&&d?S(a,w):t&&r[l]==a?function(v){var y=function(b,P,D){if(this instanceof v){switch(arguments.length){case 0:return new v;case 1:return new v(b);case 2:return new v(b,P)}return new v(b,P,D)}return v.apply(this,arguments)};return y[I]=v[I],y}(a):f&&typeof a=="function"?S(Function.call,a):a,f&&((n.virtual||(n.virtual={}))[l]=a,R&T.R&&i&&!i[l]&&M(i,l,a)))};T.F=1,T.G=2,T.S=4,T.P=8,T.B=16,T.W=32,T.U=64,T.R=128,L.exports=T},function(L,k,h){var w=h(20),p=h(62),S=h(40),M=Object.defineProperty;k.f=h(13)?Object.defineProperty:function(I,T,R){if(w(I),T=S(T,!0),w(R),p)try{return M(I,T,R)}catch{}if("get"in R||"set"in R)throw TypeError("Accessors not supported!");return"value"in R&&(I[T]=R.value),I}},function(L,k,h){L.exports=!h(22)(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},function(L,k){var h={}.hasOwnProperty;L.exports=function(w,p){return h.call(w,p)}},function(L,k,h){"use strict";k.__esModule=!0;var w=h(136),p=x(w),S=h(58),M=x(S);function x(I){return I&&I.__esModule?I:{default:I}}k.default=function(){function I(T,R){var C=[],m=!0,c=!1,u=void 0;try{for(var s=(0,M.default)(T),f;!(m=(f=s.next()).done)&&(C.push(f.value),!(R&&C.length===R));m=!0);}catch(e){c=!0,u=e}finally{try{!m&&s.return&&s.return()}finally{if(c)throw u}}return C}return function(T,R){if(Array.isArray(T))return T;if((0,p.default)(Object(T)))return I(T,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(7),p=T(w),S=h(0),M=T(S),x=h(1),I=T(x);function T(C){return C&&C.__esModule?C:{default:C}}var R=function(){function C(m,c,u){(0,M.default)(this,C),this.body=c,this.labelModule=u,this.setOptions(m),this.top=void 0,this.left=void 0,this.height=void 0,this.width=void 0,this.radius=void 0,this.margin=void 0,this.refreshNeeded=!0,this.boundingBox={top:0,left:0,right:0,bottom:0}}return(0,I.default)(C,[{key:"setOptions",value:function(c){this.options=c}},{key:"_setMargins",value:function(c){this.margin={},this.options.margin&&((0,p.default)(this.options.margin)=="object"?(this.margin.top=this.options.margin.top,this.margin.right=this.options.margin.right,this.margin.bottom=this.options.margin.bottom,this.margin.left=this.options.margin.left):(this.margin.top=this.options.margin,this.margin.right=this.options.margin,this.margin.bottom=this.options.margin,this.margin.left=this.options.margin)),c.adjustSizes(this.margin)}},{key:"_distanceToBorder",value:function(c,u){var s=this.options.borderWidth;return this.resize(c),Math.min(Math.abs(this.width/2/Math.cos(u)),Math.abs(this.height/2/Math.sin(u)))+s}},{key:"enableShadow",value:function(c,u){u.shadow&&(c.shadowColor=u.shadowColor,c.shadowBlur=u.shadowSize,c.shadowOffsetX=u.shadowX,c.shadowOffsetY=u.shadowY)}},{key:"disableShadow",value:function(c,u){u.shadow&&(c.shadowColor="rgba(0,0,0,0)",c.shadowBlur=0,c.shadowOffsetX=0,c.shadowOffsetY=0)}},{key:"enableBorderDashes",value:function(c,u){if(u.borderDashes!==!1)if(c.setLineDash!==void 0){var s=u.borderDashes;s===!0&&(s=[5,15]),c.setLineDash(s)}else console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,u.borderDashes=!1}},{key:"disableBorderDashes",value:function(c,u){u.borderDashes!==!1&&(c.setLineDash!==void 0?c.setLineDash([0]):(console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,u.borderDashes=!1))}},{key:"needsRefresh",value:function(c,u){return this.refreshNeeded===!0?(this.refreshNeeded=!1,!0):this.width===void 0||this.labelModule.differentState(c,u)}},{key:"initContextForDraw",value:function(c,u){var s=u.borderWidth/this.body.view.scale;c.lineWidth=Math.min(this.width,s),c.strokeStyle=u.borderColor,c.fillStyle=u.color}},{key:"performStroke",value:function(c,u){var s=u.borderWidth/this.body.view.scale;c.save(),s>0&&(this.enableBorderDashes(c,u),c.stroke(),this.disableBorderDashes(c,u)),c.restore()}},{key:"performFill",value:function(c,u){this.enableShadow(c,u),c.fill(),this.disableShadow(c,u),this.performStroke(c,u)}},{key:"_addBoundingBoxMargin",value:function(c){this.boundingBox.left-=c,this.boundingBox.top-=c,this.boundingBox.bottom+=c,this.boundingBox.right+=c}},{key:"_updateBoundingBox",value:function(c,u,s,f,e){s!==void 0&&this.resize(s,f,e),this.left=c-this.width/2,this.top=u-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"updateBoundingBox",value:function(c,u,s,f,e){this._updateBoundingBox(c,u,s,f,e)}},{key:"getDimensionsFromLabel",value:function(c,u,s){this.textSize=this.labelModule.getTextSize(c,u,s);var f=this.textSize.width,e=this.textSize.height,t=14;return f===0&&(f=t,e=t),{width:f,height:e}}}]),C}();k.default=R},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(16),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r){return(0,M.default)(this,t),(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r))}return(0,I.default)(t,[{key:"resize",value:function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(r,l)){this.labelModule.getTextSize(i,r,l);var a=2*d.size;this.width=a,this.height=a,this.radius=.5*this.width}}},{key:"_drawShape",value:function(i,r,l,d,a,v,y,b){if(this.resize(i,v,y,b),this.left=d-this.width/2,this.top=a-this.height/2,this.initContextForDraw(i,b),i[r](d,a,b.size),this.performFill(i,b),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(i.font=(v?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),i.fillStyle=this.options.icon.color||"black",i.textAlign="center",i.textBaseline="middle",i.fillText(this.options.icon.code,d,a)),this.options.label!==void 0){this.labelModule.calculateLabelSize(i,v,y,d,a,"hanging");var P=a+.5*this.height+.5*this.labelModule.size.height;this.labelModule.draw(i,d,P,v,y,"hanging")}this.updateBoundingBox(d,a)}},{key:"updateBoundingBox",value:function(i,r){this.boundingBox.top=r-this.options.size,this.boundingBox.left=i-this.options.size,this.boundingBox.right=i+this.options.size,this.boundingBox.bottom=r+this.options.size,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}]),t}(u.default);k.default=f},function(L,k,h){var w=h(59),p=h(39);L.exports=function(S){return w(p(S))}},function(L,k,h){var w=h(12),p=h(28);L.exports=h(13)?function(S,M,x){return w.f(S,M,p(1,x))}:function(S,M,x){return S[M]=x,S}},function(L,k,h){var w=h(21);L.exports=function(p){if(!w(p))throw TypeError(p+" is not an object!");return p}},function(L,k){L.exports=function(h){return typeof h=="object"?h!==null:typeof h=="function"}},function(L,k){L.exports=function(h){try{return!!h()}catch{return!0}}},function(L,k,h){L.exports={default:h(123),__esModule:!0}},function(L,k,h){"use strict";function w(){var M=function(){};return{on:M,off:M,destroy:M,emit:M,get:function(I){return{set:M}}}}if(typeof window<"u"){var p=h(127),S=window.Hammer||h(128);L.exports=p(S,{preventDefault:"mouse"})}else L.exports=function(){return w()}},function(L,k){L.exports={}},function(L,k,h){var w=h(65),p=h(45);L.exports=Object.keys||function(M){return w(M,p)}},function(L,k){L.exports=!0},function(L,k){L.exports=function(h,w){return{enumerable:!(h&1),configurable:!(h&2),writable:!(h&4),value:w}}},function(L,k){var h=0,w=Math.random();L.exports=function(p){return"Symbol(".concat(p===void 0?"":p,")_",(++h+w).toString(36))}},function(L,k,h){var w=h(39);L.exports=function(p){return Object(w(p))}},function(L,k,h){L.exports={default:h(100),__esModule:!0}},function(L,k){k.f={}.propertyIsEnumerable},function(L,k,h){"use strict";var w=h(23),p=T(w),S=h(7),M=T(S),x=h(9),I=T(x);function T(c){return c&&c.__esModule?c:{default:c}}var R=h(2),C=h(72);function m(c,u){if(c&&!Array.isArray(c)&&(u=c,c=null),this._options=u||{},this._data={},this.length=0,this._fieldId=this._options.fieldId||"id",this._type={},this._options.type)for(var s=(0,I.default)(this._options.type),f=0,e=s.length;f<e;f++){var t=s[f],n=this._options.type[t];n=="Date"||n=="ISODate"||n=="ASPDate"?this._type[t]="Date":this._type[t]=n}this._subscribers={},c&&this.add(c),this.setOptions(u)}m.prototype.setOptions=function(c){c&&c.queue!==void 0&&(c.queue===!1?this._queue&&(this._queue.destroy(),delete this._queue):(this._queue||(this._queue=C.extend(this,{replace:["add","update","remove"]})),(0,M.default)(c.queue)==="object"&&this._queue.setOptions(c.queue)))},m.prototype.on=function(c,u){var s=this._subscribers[c];s||(s=[],this._subscribers[c]=s),s.push({callback:u})},m.prototype.off=function(c,u){var s=this._subscribers[c];s&&(this._subscribers[c]=s.filter(function(f){return f.callback!=u}))},m.prototype._trigger=function(c,u,s){if(c=="*")throw new Error("Cannot trigger event *");var f=[];c in this._subscribers&&(f=f.concat(this._subscribers[c])),"*"in this._subscribers&&(f=f.concat(this._subscribers["*"]));for(var e=0,t=f.length;e<t;e++){var n=f[e];n.callback&&n.callback(c,u,s||null)}},m.prototype.add=function(c,u){var s=[],f,e=this;if(Array.isArray(c))for(var t=0,n=c.length;t<n;t++)f=e._addItem(c[t]),s.push(f);else if(c&&(typeof c>"u"?"undefined":(0,M.default)(c))==="object")f=e._addItem(c),s.push(f);else throw new Error("Unknown dataType");return s.length&&this._trigger("add",{items:s},u),s},m.prototype.update=function(c,u){var s=[],f=[],e=[],t=[],n=this,i=n._fieldId,r=function(y){var b=y[i];if(n._data[b]){var P=R.extend({},n._data[b]);b=n._updateItem(y),f.push(b),t.push(y),e.push(P)}else b=n._addItem(y),s.push(b)};if(Array.isArray(c))for(var l=0,d=c.length;l<d;l++)c[l]&&(0,M.default)(c[l])==="object"?r(c[l]):console.warn("Ignoring input item, which is not an object at index "+l);else if(c&&(typeof c>"u"?"undefined":(0,M.default)(c))==="object")r(c);else throw new Error("Unknown dataType");if(s.length&&this._trigger("add",{items:s},u),f.length){var a={items:f,oldData:e,data:t};this._trigger("update",a,u)}return s.concat(f)},m.prototype.get=function(c){var u=this,s,f,e,t=R.getType(arguments[0]);t=="String"||t=="Number"?(s=arguments[0],e=arguments[1]):t=="Array"?(f=arguments[0],e=arguments[1]):e=arguments[0];var n;if(e&&e.returnType){var i=["Array","Object"];n=i.indexOf(e.returnType)==-1?"Array":e.returnType}else n="Array";var r=e&&e.type||this._options.type,l=e&&e.filter,d=[],a,v,y,b,P;if(s!=null)a=u._getItem(s,r),a&&l&&!l(a)&&(a=null);else if(f!=null)for(b=0,P=f.length;b<P;b++)a=u._getItem(f[b],r),(!l||l(a))&&d.push(a);else for(v=(0,I.default)(this._data),b=0,P=v.length;b<P;b++)y=v[b],a=u._getItem(y,r),(!l||l(a))&&d.push(a);if(e&&e.order&&s==null&&this._sort(d,e.order),e&&e.fields){var D=e.fields;if(s!=null)a=this._filterFields(a,D);else for(b=0,P=d.length;b<P;b++)d[b]=this._filterFields(d[b],D)}if(n=="Object"){var O={},E;for(b=0,P=d.length;b<P;b++)E=d[b],O[E.id]=E;return O}else return s!=null?a:d},m.prototype.getIds=function(c){var u=this._data,s=c&&c.filter,f=c&&c.order,e=c&&c.type||this._options.type,t=(0,I.default)(u),n,i,r,l,d,a=[];if(s)if(f){for(d=[],n=0,i=t.length;n<i;n++)r=t[n],l=this._getItem(r,e),s(l)&&d.push(l);for(this._sort(d,f),n=0,i=d.length;n<i;n++)a.push(d[n][this._fieldId])}else for(n=0,i=t.length;n<i;n++)r=t[n],l=this._getItem(r,e),s(l)&&a.push(l[this._fieldId]);else if(f){for(d=[],n=0,i=t.length;n<i;n++)r=t[n],d.push(u[r]);for(this._sort(d,f),n=0,i=d.length;n<i;n++)a.push(d[n][this._fieldId])}else for(n=0,i=t.length;n<i;n++)r=t[n],l=u[r],a.push(l[this._fieldId]);return a},m.prototype.getDataSet=function(){return this},m.prototype.forEach=function(c,u){var s=u&&u.filter,f=u&&u.type||this._options.type,e=this._data,t=(0,I.default)(e),n,i,r,l;if(u&&u.order){var d=this.get(u);for(n=0,i=d.length;n<i;n++)r=d[n],l=r[this._fieldId],c(r,l)}else for(n=0,i=t.length;n<i;n++)l=t[n],r=this._getItem(l,f),(!s||s(r))&&c(r,l)},m.prototype.map=function(c,u){var s=u&&u.filter,f=u&&u.type||this._options.type,e=[],t=this._data,n=(0,I.default)(t),i,r,l,d;for(i=0,r=n.length;i<r;i++)l=n[i],d=this._getItem(l,f),(!s||s(d))&&e.push(c(d,l));return u&&u.order&&this._sort(e,u.order),e},m.prototype._filterFields=function(c,u){if(!c)return c;var s={},f=(0,I.default)(c),e=f.length,t,n;if(Array.isArray(u))for(t=0;t<e;t++)n=f[t],u.indexOf(n)!=-1&&(s[n]=c[n]);else for(t=0;t<e;t++)n=f[t],u.hasOwnProperty(n)&&(s[u[n]]=c[n]);return s},m.prototype._sort=function(c,u){if(R.isString(u)){var s=u;c.sort(function(f,e){var t=f[s],n=e[s];return t>n?1:t<n?-1:0})}else if(typeof u=="function")c.sort(u);else throw new TypeError("Order must be a function or a string")},m.prototype.remove=function(c,u){var s=[],f=[],e=[],t,n,i,r;for(e=Array.isArray(c)?c:[c],t=0,n=e.length;t<n;t++)r=this._remove(e[t]),r&&(i=r[this._fieldId],i!=null&&(s.push(i),f.push(r)));return s.length&&this._trigger("remove",{items:s,oldData:f},u),s},m.prototype._remove=function(c){var u,s;return R.isNumber(c)||R.isString(c)?s=c:c&&(typeof c>"u"?"undefined":(0,M.default)(c))==="object"&&(s=c[this._fieldId]),s!==void 0&&this._data[s]?(u=this._data[s],delete this._data[s],this.length--,u):null},m.prototype.clear=function(c){var u,s,f=(0,I.default)(this._data),e=[];for(u=0,s=f.length;u<s;u++)e.push(this._data[f[u]]);return this._data={},this.length=0,this._trigger("remove",{items:f,oldData:e},c),f},m.prototype.max=function(c){var u=this._data,s=(0,I.default)(u),f=null,e=null,t,n;for(t=0,n=s.length;t<n;t++){var i=s[t],r=u[i],l=r[c];l!=null&&(!f||l>e)&&(f=r,e=l)}return f},m.prototype.min=function(c){var u=this._data,s=(0,I.default)(u),f=null,e=null,t,n;for(t=0,n=s.length;t<n;t++){var i=s[t],r=u[i],l=r[c];l!=null&&(!f||l<e)&&(f=r,e=l)}return f},m.prototype.distinct=function(c){var u=this._data,s=(0,I.default)(u),f=[],e=this._options.type&&this._options.type[c]||null,t=0,n,i,r;for(n=0,r=s.length;n<r;n++){var l=s[n],d=u[l],a=d[c],v=!1;for(i=0;i<t;i++)if(f[i]==a){v=!0;break}!v&&a!==void 0&&(f[t]=a,t++)}if(e)for(n=0,r=f.length;n<r;n++)f[n]=R.convert(f[n],e);return f},m.prototype._addItem=function(c){var u=c[this._fieldId];if(u!=null){if(this._data[u])throw new Error("Cannot add item: item with id "+u+" already exists")}else u=R.randomUUID(),c[this._fieldId]=u;var s={},f=(0,I.default)(c),e,t;for(e=0,t=f.length;e<t;e++){var n=f[e],i=this._type[n];s[n]=R.convert(c[n],i)}return this._data[u]=s,this.length++,u},m.prototype._getItem=function(c,u){var s,f,e,t,n=this._data[c];if(!n)return null;var i={},r=(0,I.default)(n);if(u)for(e=0,t=r.length;e<t;e++)s=r[e],f=n[s],i[s]=R.convert(f,u[s]);else for(e=0,t=r.length;e<t;e++)s=r[e],f=n[s],i[s]=f;return i[this._fieldId]||(i[this._fieldId]=n.id),i},m.prototype._updateItem=function(c){var u=c[this._fieldId];if(u==null)throw new Error("Cannot update item: item has no id (item: "+(0,p.default)(c)+")");var s=this._data[u];if(!s)throw new Error("Cannot update item: no item with id "+u+" found");for(var f=(0,I.default)(c),e=0,t=f.length;e<t;e++){var n=f[e],i=this._type[n];s[n]=R.convert(c[n],i)}return u},L.exports=m},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(0),p=x(w),S=h(1),M=x(S);function x(D){return D&&D.__esModule?D:{default:D}}var I=h(2),T=h(77).default,R=h(35).default,C=h(144).default,m=h(151).default,c=h(152).default,u=h(153).default,s=h(154).default,f=h(155).default,e=h(156).default,t=h(157).default,n=h(158).default,i=h(159).default,r=h(160).default,l=h(161).default,d=h(162).default,a=h(163).default,v=h(164).default,y=h(54),b=y.printStyle,P=function(){function D(O,E,A,Y,X,U){(0,p.default)(this,D),this.options=I.bridgeObject(X),this.globalOptions=X,this.defaultOptions=U,this.body=E,this.edges=[],this.id=void 0,this.imagelist=A,this.grouplist=Y,this.x=void 0,this.y=void 0,this.baseSize=this.options.size,this.baseFontSize=this.options.font.size,this.predefinedPosition=!1,this.selected=!1,this.hover=!1,this.labelModule=new T(this.body,this.options,!1),this.setOptions(O)}return(0,M.default)(D,[{key:"attachEdge",value:function(E){this.edges.indexOf(E)===-1&&this.edges.push(E)}},{key:"detachEdge",value:function(E){var A=this.edges.indexOf(E);A!=-1&&this.edges.splice(A,1)}},{key:"setOptions",value:function(E){var A=this.options.shape;if(E){if(E.id!==void 0&&(this.id=E.id),this.id===void 0)throw new Error("Node must have an id");D.checkMass(E,this.id),E.x!==void 0&&(E.x===null?(this.x=void 0,this.predefinedPosition=!1):(this.x=parseInt(E.x),this.predefinedPosition=!0)),E.y!==void 0&&(E.y===null?(this.y=void 0,this.predefinedPosition=!1):(this.y=parseInt(E.y),this.predefinedPosition=!0)),E.size!==void 0&&(this.baseSize=E.size),E.value!==void 0&&(E.value=parseFloat(E.value)),D.parseOptions(this.options,E,!0,this.globalOptions,this.grouplist);var Y=[E,this.options,this.defaultOptions];return this.chooser=R.choosify("node",Y),this._load_images(),this.updateLabelModule(E),this.updateShape(A),E.hidden!==void 0||E.physics!==void 0}}},{key:"_load_images",value:function(){if((this.options.shape==="circularImage"||this.options.shape==="image")&&this.options.image===void 0)throw new Error("Option image must be defined for node type '"+this.options.shape+"'");if(this.options.image!==void 0){if(this.imagelist===void 0)throw new Error("Internal Error: No images provided");if(typeof this.options.image=="string")this.imageObj=this.imagelist.load(this.options.image,this.options.brokenImage,this.id);else{if(this.options.image.unselected===void 0)throw new Error("No unselected image provided");this.imageObj=this.imagelist.load(this.options.image.unselected,this.options.brokenImage,this.id),this.options.image.selected!==void 0?this.imageObjAlt=this.imagelist.load(this.options.image.selected,this.options.brokenImage,this.id):this.imageObjAlt=void 0}}}},{key:"getFormattingValues",value:function(){var E={color:this.options.color.background,borderWidth:this.options.borderWidth,borderColor:this.options.color.border,size:this.options.size,borderDashes:this.options.shapeProperties.borderDashes,borderRadius:this.options.shapeProperties.borderRadius,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y};return this.selected||this.hover?this.chooser===!0?this.selected?(E.borderWidth*=2,E.color=this.options.color.highlight.background,E.borderColor=this.options.color.highlight.border,E.shadow=this.options.shadow.enabled):this.hover&&(E.color=this.options.color.hover.background,E.borderColor=this.options.color.hover.border,E.shadow=this.options.shadow.enabled):typeof this.chooser=="function"&&(this.chooser(E,this.options.id,this.selected,this.hover),E.shadow===!1&&(E.shadowColor!==this.options.shadow.color||E.shadowSize!==this.options.shadow.size||E.shadowX!==this.options.shadow.x||E.shadowY!==this.options.shadow.y)&&(E.shadow=!0)):E.shadow=this.options.shadow.enabled,E}},{key:"updateLabelModule",value:function(E){(this.options.label===void 0||this.options.label===null)&&(this.options.label=""),D.updateGroupOptions(this.options,E,this.grouplist);var A=this.grouplist.get(this.options.group,!1),Y=[E,this.options,A,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,Y),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateShape",value:function(E){if(E===this.options.shape&&this.shape)this.shape.setOptions(this.options,this.imageObj,this.imageObjAlt);else switch(this.options.shape){case"box":this.shape=new C(this.options,this.body,this.labelModule);break;case"circle":this.shape=new m(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new c(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"database":this.shape=new u(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new s(this.options,this.body,this.labelModule);break;case"dot":this.shape=new f(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new e(this.options,this.body,this.labelModule);break;case"icon":this.shape=new t(this.options,this.body,this.labelModule);break;case"image":this.shape=new n(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new i(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new r(this.options,this.body,this.labelModule);break;case"star":this.shape=new l(this.options,this.body,this.labelModule);break;case"text":this.shape=new d(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new a(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new v(this.options,this.body,this.labelModule);break;default:this.shape=new e(this.options,this.body,this.labelModule);break}this.needsRefresh()}},{key:"select",value:function(){this.selected=!0,this.needsRefresh()}},{key:"unselect",value:function(){this.selected=!1,this.needsRefresh()}},{key:"needsRefresh",value:function(){this.shape.refreshNeeded=!0}},{key:"getTitle",value:function(){return this.options.title}},{key:"distanceToBorder",value:function(E,A){return this.shape.distanceToBorder(E,A)}},{key:"isFixed",value:function(){return this.options.fixed.x&&this.options.fixed.y}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"getLabelSize",value:function(){return this.labelModule.size()}},{key:"setValueRange",value:function(E,A,Y){if(this.options.value!==void 0){var X=this.options.scaling.customScalingFunction(E,A,Y,this.options.value),U=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){var Z=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+X*Z}this.options.size=this.options.scaling.min+X*U}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}},{key:"draw",value:function(E){var A=this.getFormattingValues();this.shape.draw(E,this.x,this.y,this.selected,this.hover,A)}},{key:"updateBoundingBox",value:function(E){this.shape.updateBoundingBox(this.x,this.y,E)}},{key:"resize",value:function(E){var A=this.getFormattingValues();this.shape.resize(E,this.selected,this.hover,A)}},{key:"getItemsOnPoint",value:function(E){var A=[];return this.labelModule.visible()&&R.pointInRect(this.labelModule.getSize(),E)&&A.push({nodeId:this.id,labelId:0}),R.pointInRect(this.shape.boundingBox,E)&&A.push({nodeId:this.id}),A}},{key:"isOverlappingWith",value:function(E){return this.shape.left<E.right&&this.shape.left+this.shape.width>E.left&&this.shape.top<E.bottom&&this.shape.top+this.shape.height>E.top}},{key:"isBoundingBoxOverlappingWith",value:function(E){return this.shape.boundingBox.left<E.right&&this.shape.boundingBox.right>E.left&&this.shape.boundingBox.top<E.bottom&&this.shape.boundingBox.bottom>E.top}}],[{key:"updateGroupOptions",value:function(E,A,Y){if(Y!==void 0){var X=E.group;if(A!==void 0&&A.group!==void 0&&X!==A.group)throw new Error("updateGroupOptions: group values in options don't match.");var U=typeof X=="number"||typeof X=="string"&&X!="";if(U){var Z=Y.get(X),re=["font"];A!==void 0&&A.color!==void 0&&A.color!=null&&re.push("color"),I.selectiveNotDeepExtend(re,E,Z),E.color=I.parseColor(E.color)}}}},{key:"parseOptions",value:function(E,A){var Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,X=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},U=arguments[4],Z=["color","fixed","shadow"];if(I.selectiveNotDeepExtend(Z,E,A,Y),D.checkMass(A),I.mergeOptions(E,A,"shadow",X),A.color!==void 0&&A.color!==null){var re=I.parseColor(A.color);I.fillIfDefined(E.color,re)}else Y===!0&&A.color===null&&(E.color=I.bridgeObject(X.color));A.fixed!==void 0&&A.fixed!==null&&(typeof A.fixed=="boolean"?(E.fixed.x=A.fixed,E.fixed.y=A.fixed):(A.fixed.x!==void 0&&typeof A.fixed.x=="boolean"&&(E.fixed.x=A.fixed.x),A.fixed.y!==void 0&&typeof A.fixed.y=="boolean"&&(E.fixed.y=A.fixed.y))),Y===!0&&A.font===null&&(E.font=I.bridgeObject(X.font)),D.updateGroupOptions(E,A,U),A.scaling!==void 0&&I.mergeOptions(E.scaling,A.scaling,"label",X.scaling)}},{key:"checkMass",value:function(E,A){if(E.mass!==void 0&&E.mass<=0){var Y="";A!==void 0&&(Y=" in node id: "+A),console.log("%cNegative or zero mass disallowed"+Y+", setting mass to 1.",b),E.mass=1}}}]),D}();k.default=P},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(7),p=T(w),S=h(0),M=T(S),x=h(1),I=T(x);function T(m){return m&&m.__esModule?m:{default:m}}var R=h(2),C=function(){function m(){(0,M.default)(this,m)}return(0,I.default)(m,null,[{key:"choosify",value:function(u,s){var f=["node","edge","label"],e=!0,t=R.topMost(s,"chosen");if(typeof t=="boolean")e=t;else if((typeof t>"u"?"undefined":(0,p.default)(t))==="object"){if(f.indexOf(u)===-1)throw new Error("choosify: subOption '"+u+"' should be one of '"+f.join("', '")+"'");var n=R.topMost(s,["chosen",u]);(typeof n=="boolean"||typeof n=="function")&&(e=n)}return e}},{key:"pointInRect",value:function(u,s,f){if(u.width<=0||u.height<=0)return!1;if(f!==void 0){var e={x:s.x-f.x,y:s.y-f.y};if(f.angle!==0){var t=-f.angle,n={x:Math.cos(t)*e.x-Math.sin(t)*e.y,y:Math.sin(t)*e.x+Math.cos(t)*e.y};s=n}else s=e}var i=u.x+u.width,r=u.y+u.width;return u.left<s.x&&i>s.x&&u.top<s.y&&r>s.y}},{key:"isValidLabel",value:function(u){return typeof u=="string"&&u!==""}}]),m}();k.default=C},function(L,k,h){"use strict";k.onTouch=function(w,p){p.inputHandler=function(S){S.isFirst&&p(S)},w.on("hammer.input",p.inputHandler)},k.onRelease=function(w,p){return p.inputHandler=function(S){S.isFinal&&p(S)},w.on("hammer.input",p.inputHandler)},k.offTouch=function(w,p){w.off("hammer.input",p.inputHandler)},k.offRelease=k.offTouch,k.disablePreventDefaultVertically=function(w){var p="pan-y";return w.getTouchAction=function(){return[p]},w}},function(L,k,h){h(87);for(var w=h(10),p=h(19),S=h(25),M=h(8)("toStringTag"),x="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),I=0;I<x.length;I++){var T=x[I],R=w[T],C=R&&R.prototype;C&&!C[M]&&p(C,M,T),S[T]=S.Array}},function(L,k){var h={}.toString;L.exports=function(w){return h.call(w).slice(8,-1)}},function(L,k){L.exports=function(h){if(h==null)throw TypeError("Can't call method on  "+h);return h}},function(L,k,h){var w=h(21);L.exports=function(p,S){if(!w(p))return p;var M,x;if(S&&typeof(M=p.toString)=="function"&&!w(x=M.call(p))||typeof(M=p.valueOf)=="function"&&!w(x=M.call(p))||!S&&typeof(M=p.toString)=="function"&&!w(x=M.call(p)))return x;throw TypeError("Can't convert object to primitive value")}},function(L,k,h){var w=h(20),p=h(92),S=h(45),M=h(43)("IE_PROTO"),x=function(){},I="prototype",T=function(){var R=h(63)("iframe"),C=S.length,m="<",c=">",u;for(R.style.display="none",h(96).appendChild(R),R.src="javascript:",u=R.contentWindow.document,u.open(),u.write(m+"script"+c+"document.F=Object"+m+"/script"+c),u.close(),T=u.F;C--;)delete T[I][S[C]];return T()};L.exports=Object.create||function(C,m){var c;return C!==null?(x[I]=w(C),c=new x,x[I]=null,c[M]=C):c=T(),m===void 0?c:p(c,m)}},function(L,k){var h=Math.ceil,w=Math.floor;L.exports=function(p){return isNaN(p=+p)?0:(p>0?w:h)(p)}},function(L,k,h){var w=h(44)("keys"),p=h(29);L.exports=function(S){return w[S]||(w[S]=p(S))}},function(L,k,h){var w=h(6),p=h(10),S="__core-js_shared__",M=p[S]||(p[S]={});(L.exports=function(x,I){return M[x]||(M[x]=I!==void 0?I:{})})("versions",[]).push({version:w.version,mode:h(27)?"pure":"global",copyright:"\xA9 2018 Denis Pushkarev (zloirock.ru)"})},function(L,k){L.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(L,k,h){var w=h(12).f,p=h(14),S=h(8)("toStringTag");L.exports=function(M,x,I){M&&!p(M=I?M:M.prototype,S)&&w(M,S,{configurable:!0,value:x})}},function(L,k,h){"use strict";var w=h(97)(!0);h(60)(String,"String",function(p){this._t=String(p),this._i=0},function(){var p=this._t,S=this._i,M;return S>=p.length?{value:void 0,done:!0}:(M=w(p,S),this._i+=M.length,{value:M,done:!1})})},function(L,k,h){k.f=h(8)},function(L,k,h){var w=h(10),p=h(6),S=h(27),M=h(48),x=h(12).f;L.exports=function(I){var T=p.Symbol||(p.Symbol=S?{}:w.Symbol||{});I.charAt(0)!="_"&&!(I in T)&&x(T,I,{value:M.f(I)})}},function(L,k){k.f=Object.getOwnPropertySymbols},function(L,k,h){"use strict";var w=h(9),p=S(w);function S(T){return T&&T.__esModule?T:{default:T}}var M=h(2),x=h(33);function I(T,R){this._data=null,this._ids={},this.length=0,this._options=R||{},this._fieldId="id",this._subscribers={};var C=this;this.listener=function(){C._onEvent.apply(C,arguments)},this.setData(T)}I.prototype.setData=function(T){var R,C,m,c,u;if(this._data){for(this._data.off&&this._data.off("*",this.listener),R=this._data.getIds({filter:this._options&&this._options.filter}),u=[],m=0,c=R.length;m<c;m++)u.push(this._data._data[R[m]]);this._ids={},this.length=0,this._trigger("remove",{items:R,oldData:u})}if(this._data=T,this._data){for(this._fieldId=this._options.fieldId||this._data&&this._data.options&&this._data.options.fieldId||"id",R=this._data.getIds({filter:this._options&&this._options.filter}),m=0,c=R.length;m<c;m++)C=R[m],this._ids[C]=!0;this.length=R.length,this._trigger("add",{items:R}),this._data.on&&this._data.on("*",this.listener)}},I.prototype.refresh=function(){var T,R,C,m=this._data.getIds({filter:this._options&&this._options.filter}),c=(0,p.default)(this._ids),u={},s=[],f=[],e=[];for(R=0,C=m.length;R<C;R++)T=m[R],u[T]=!0,this._ids[T]||(s.push(T),this._ids[T]=!0);for(R=0,C=c.length;R<C;R++)T=c[R],u[T]||(f.push(T),e.push(this._data._data[T]),delete this._ids[T]);this.length+=s.length-f.length,s.length&&this._trigger("add",{items:s}),f.length&&this._trigger("remove",{items:f,oldData:e})},I.prototype.get=function(T){var R=this,C,m,c,u=M.getType(arguments[0]);u=="String"||u=="Number"||u=="Array"?(C=arguments[0],m=arguments[1],c=arguments[2]):(m=arguments[0],c=arguments[1]);var s=M.extend({},this._options,m);this._options.filter&&m&&m.filter&&(s.filter=function(e){return R._options.filter(e)&&m.filter(e)});var f=[];return C!=null&&f.push(C),f.push(s),f.push(c),this._data&&this._data.get.apply(this._data,f)},I.prototype.getIds=function(T){var R;if(this._data){var C=this._options.filter,m;T&&T.filter?C?m=function(u){return C(u)&&T.filter(u)}:m=T.filter:m=C,R=this._data.getIds({filter:m,order:T&&T.order})}else R=[];return R},I.prototype.map=function(T,R){var C=[];if(this._data){var m=this._options.filter,c;R&&R.filter?m?c=function(s){return m(s)&&R.filter(s)}:c=R.filter:c=m,C=this._data.map(T,{filter:c,order:R&&R.order})}else C=[];return C},I.prototype.getDataSet=function(){for(var T=this;T instanceof I;)T=T._data;return T||null},I.prototype._onEvent=function(T,R,C){var m,c,u,s,f=R&&R.items,e=[],t=[],n=[],i=[],r=[],l=[];if(f&&this._data){switch(T){case"add":for(m=0,c=f.length;m<c;m++)u=f[m],s=this.get(u),s&&(this._ids[u]=!0,e.push(u));break;case"update":for(m=0,c=f.length;m<c;m++)u=f[m],s=this.get(u),s?this._ids[u]?(t.push(u),r.push(R.data[m]),i.push(R.oldData[m])):(this._ids[u]=!0,e.push(u)):this._ids[u]&&(delete this._ids[u],n.push(u),l.push(R.oldData[m]));break;case"remove":for(m=0,c=f.length;m<c;m++)u=f[m],this._ids[u]&&(delete this._ids[u],n.push(u),l.push(R.oldData[m]));break}this.length+=e.length-n.length,e.length&&this._trigger("add",{items:e},C),t.length&&this._trigger("update",{items:t,oldData:i,data:r},C),n.length&&this._trigger("remove",{items:n,oldData:l},C)}},I.prototype.on=x.prototype.on,I.prototype.off=x.prototype.off,I.prototype._trigger=x.prototype._trigger,I.prototype.subscribe=I.prototype.on,I.prototype.unsubscribe=I.prototype.off,L.exports=I},function(L,k,h){"use strict";var w,p,S;(function(M,x){p=[],w=x,S=typeof w=="function"?w.apply(k,p):w,S!==void 0&&(L.exports=S)})(this,function(){function M(x){var I=x&&x.preventDefault||!1,T=x&&x.container||window,R={},C={keydown:{},keyup:{}},m={},c;for(c=97;c<=122;c++)m[String.fromCharCode(c)]={code:65+(c-97),shift:!1};for(c=65;c<=90;c++)m[String.fromCharCode(c)]={code:c,shift:!0};for(c=0;c<=9;c++)m[""+c]={code:48+c,shift:!1};for(c=1;c<=12;c++)m["F"+c]={code:111+c,shift:!1};for(c=0;c<=9;c++)m["num"+c]={code:96+c,shift:!1};m["num*"]={code:106,shift:!1},m["num+"]={code:107,shift:!1},m["num-"]={code:109,shift:!1},m["num/"]={code:111,shift:!1},m["num."]={code:110,shift:!1},m.left={code:37,shift:!1},m.up={code:38,shift:!1},m.right={code:39,shift:!1},m.down={code:40,shift:!1},m.space={code:32,shift:!1},m.enter={code:13,shift:!1},m.shift={code:16,shift:void 0},m.esc={code:27,shift:!1},m.backspace={code:8,shift:!1},m.tab={code:9,shift:!1},m.ctrl={code:17,shift:!1},m.alt={code:18,shift:!1},m.delete={code:46,shift:!1},m.pageup={code:33,shift:!1},m.pagedown={code:34,shift:!1},m["="]={code:187,shift:!1},m["-"]={code:189,shift:!1},m["]"]={code:221,shift:!1},m["["]={code:219,shift:!1};var u=function(e){f(e,"keydown")},s=function(e){f(e,"keyup")},f=function(e,t){if(C[t][e.keyCode]!==void 0){for(var n=C[t][e.keyCode],i=0;i<n.length;i++)(n[i].shift===void 0||n[i].shift==!0&&e.shiftKey==!0||n[i].shift==!1&&e.shiftKey==!1)&&n[i].fn(e);I==!0&&e.preventDefault()}};return R.bind=function(e,t,n){if(n===void 0&&(n="keydown"),m[e]===void 0)throw new Error("unsupported key: "+e);C[n][m[e].code]===void 0&&(C[n][m[e].code]=[]),C[n][m[e].code].push({fn:t,shift:m[e].shift})},R.bindAll=function(e,t){t===void 0&&(t="keydown");for(var n in m)m.hasOwnProperty(n)&&R.bind(n,e,t)},R.getKey=function(e){for(var t in m)if(m.hasOwnProperty(t)){if(e.shiftKey==!0&&m[t].shift==!0&&e.keyCode==m[t].code)return t;if(e.shiftKey==!1&&m[t].shift==!1&&e.keyCode==m[t].code)return t;if(e.keyCode==m[t].code&&t=="shift")return t}return"unknown key, currently not supported"},R.unbind=function(e,t,n){if(n===void 0&&(n="keydown"),m[e]===void 0)throw new Error("unsupported key: "+e);if(t!==void 0){var i=[],r=C[n][m[e].code];if(r!==void 0)for(var l=0;l<r.length;l++)r[l].fn==t&&r[l].shift==m[e].shift||i.push(C[n][m[e].code][l]);C[n][m[e].code]=i}else C[n][m[e].code]=[]},R.reset=function(){C={keydown:{},keyup:{}}},R.destroy=function(){C={keydown:{},keyup:{}},T.removeEventListener("keydown",u,!0),T.removeEventListener("keyup",s,!0)},T.addEventListener("keydown",u,!0),T.addEventListener("keyup",s,!0),R}return M})},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(16),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r){(0,M.default)(this,t);var l=(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r));return l.labelOffset=0,l.selected=!1,l}return(0,I.default)(t,[{key:"setOptions",value:function(i,r,l){this.options=i,r===void 0&&l===void 0||this.setImages(r,l)}},{key:"setImages",value:function(i,r){r&&this.selected?(this.imageObj=r,this.imageObjAlt=i):(this.imageObj=i,this.imageObjAlt=r)}},{key:"switchImages",value:function(i){var r=i&&!this.selected||!i&&this.selected;if(this.selected=i,this.imageObjAlt!==void 0&&r){var l=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=l}}},{key:"_resizeImage",value:function(){var i,r;if(this.options.shapeProperties.useImageSize===!1){var l=1,d=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?l=this.imageObj.width/this.imageObj.height:d=this.imageObj.height/this.imageObj.width),i=this.options.size*2*l,r=this.options.size*2*d}else i=this.imageObj.width,r=this.imageObj.height;this.width=i,this.height=r,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(i,r,l,d){this.initContextForDraw(i,d),i.circle(r,l,d.size),this.performFill(i,d)}},{key:"_drawImageAtPosition",value:function(i,r){if(this.imageObj.width!=0){i.globalAlpha=1,this.enableShadow(i,r);var l=1;this.options.shapeProperties.interpolation===!0&&(l=this.imageObj.width/this.width/this.body.view.scale),this.imageObj.drawImageAtPosition(i,l,this.left,this.top,this.width,this.height),this.disableShadow(i,r)}}},{key:"_drawImageLabel",value:function(i,r,l,d,a){var v,y=0;if(this.height!==void 0){y=this.height*.5;var b=this.labelModule.getTextSize(i,d,a);b.lineCount>=1&&(y+=b.height/2)}v=l+y,this.options.label&&(this.labelOffset=y),this.labelModule.draw(i,r,v,d,a,"hanging")}}]),t}(u.default);k.default=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.printStyle=void 0;var w=h(23),p=c(w),S=h(7),M=c(S),x=h(9),I=c(x),T=h(0),R=c(T),C=h(1),m=c(C);function c(n){return n&&n.__esModule?n:{default:n}}var u=h(2),s=!1,f=void 0,e="background: #FFeeee; color: #dd0000",t=function(){function n(){(0,R.default)(this,n)}return(0,m.default)(n,null,[{key:"validate",value:function(r,l,d){s=!1,f=l;var a=l;return d!==void 0&&(a=l[d]),n.parse(r,a,[]),s}},{key:"parse",value:function(r,l,d){for(var a in r)r.hasOwnProperty(a)&&n.check(a,r,l,d)}},{key:"check",value:function(r,l,d,a){if(d[r]===void 0&&d.__any__===void 0){n.getSuggestion(r,d,a);return}var v=r,y=!0;d[r]===void 0&&d.__any__!==void 0&&(v="__any__",y=n.getType(l[r])==="object");var b=d[v];y&&b.__type__!==void 0&&(b=b.__type__),n.checkFields(r,l,d,v,b,a)}},{key:"checkFields",value:function(r,l,d,a,v,y){var b=function(E){console.log("%c"+E+n.printLocation(y,r),e)},P=n.getType(l[r]),D=v[P];D!==void 0?n.getType(D)==="array"&&D.indexOf(l[r])===-1?(b('Invalid option detected in "'+r+'". Allowed values are:'+n.print(D)+' not "'+l[r]+'". '),s=!0):P==="object"&&a!=="__any__"&&(y=u.copyAndExtendArray(y,r),n.parse(l[r],d[a],y)):v.any===void 0&&(b('Invalid type received for "'+r+'". Expected: '+n.print((0,I.default)(v))+". Received ["+P+'] "'+l[r]+'"'),s=!0)}},{key:"getType",value:function(r){var l=typeof r>"u"?"undefined":(0,M.default)(r);return l==="object"?r===null?"null":r instanceof Boolean?"boolean":r instanceof Number?"number":r instanceof String?"string":Array.isArray(r)?"array":r instanceof Date?"date":r.nodeType!==void 0?"dom":r._isAMomentObject===!0?"moment":"object":l==="number"?"number":l==="boolean"?"boolean":l==="string"?"string":l===void 0?"undefined":l}},{key:"getSuggestion",value:function(r,l,d){var a=n.findInOptions(r,l,d,!1),v=n.findInOptions(r,f,[],!0),y=8,b=4,P=void 0;a.indexMatch!==void 0?P=" in "+n.printLocation(a.path,r,"")+'Perhaps it was incomplete? Did you mean: "'+a.indexMatch+`"?

`:v.distance<=b&&a.distance>v.distance?P=" in "+n.printLocation(a.path,r,"")+"Perhaps it was misplaced? Matching option found at: "+n.printLocation(v.path,v.closestMatch,""):a.distance<=y?P='. Did you mean "'+a.closestMatch+'"?'+n.printLocation(a.path,r):P=". Did you mean one of these: "+n.print((0,I.default)(l))+n.printLocation(d,r),console.log('%cUnknown option detected: "'+r+'"'+P,e),s=!0}},{key:"findInOptions",value:function(r,l,d){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,v=1e9,y="",b=[],P=r.toLowerCase(),D=void 0;for(var O in l){var E=void 0;if(l[O].__type__!==void 0&&a===!0){var A=n.findInOptions(r,l[O],u.copyAndExtendArray(d,O));v>A.distance&&(y=A.closestMatch,b=A.path,v=A.distance,D=A.indexMatch)}else O.toLowerCase().indexOf(P)!==-1&&(D=O),E=n.levenshteinDistance(r,O),v>E&&(y=O,b=u.copyArray(d),v=E)}return{closestMatch:y,path:b,distance:v,indexMatch:D}}},{key:"printLocation",value:function(r,l){for(var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at: 
`,a=`

`+d+`options = {
`,v=0;v<r.length;v++){for(var y=0;y<v+1;y++)a+="  ";a+=r[v]+`: {
`}for(var b=0;b<r.length+1;b++)a+="  ";a+=l+`
`;for(var P=0;P<r.length+1;P++){for(var D=0;D<r.length-P;D++)a+="  ";a+=`}
`}return a+`

`}},{key:"print",value:function(r){return(0,p.default)(r).replace(/(\")|(\[)|(\])|(,"__type__")/g,"").replace(/(\,)/g,", ")}},{key:"levenshteinDistance",value:function(r,l){if(r.length===0)return l.length;if(l.length===0)return r.length;var d=[],a;for(a=0;a<=l.length;a++)d[a]=[a];var v;for(v=0;v<=r.length;v++)d[0][v]=v;for(a=1;a<=l.length;a++)for(v=1;v<=r.length;v++)l.charAt(a-1)==r.charAt(v-1)?d[a][v]=d[a-1][v-1]:d[a][v]=Math.min(d[a-1][v-1]+1,Math.min(d[a][v-1]+1,d[a-1][v]+1));return d[l.length][r.length]}}]),n}();k.default=t,k.printStyle=e},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(23),p=c(w),S=h(7),M=c(S),x=h(31),I=c(x),T=h(0),R=c(T),C=h(1),m=c(C);function c(l){return l&&l.__esModule?l:{default:l}}var u=h(2),s=h(77).default,f=h(35).default,e=h(166).default,t=h(168).default,n=h(169).default,i=h(170).default,r=function(){function l(d,a,v,y){if((0,R.default)(this,l),a===void 0)throw new Error("No body provided");this.options=u.bridgeObject(v),this.globalOptions=v,this.defaultOptions=y,this.body=a,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new s(this.body,this.options,!0),this.setOptions(d)}return(0,m.default)(l,[{key:"setOptions",value:function(a){if(a){l.parseOptions(this.options,a,!0,this.globalOptions),a.id!==void 0&&(this.id=a.id),a.from!==void 0&&(this.fromId=a.from),a.to!==void 0&&(this.toId=a.to),a.title!==void 0&&(this.title=a.title),a.value!==void 0&&(a.value=parseFloat(a.value));var v=[a,this.options,this.defaultOptions];this.chooser=f.choosify("edge",v),this.updateLabelModule(a);var y=this.updateEdgeType();return this._setInteractionWidths(),this.connect(),(a.hidden!==void 0||a.physics!==void 0)&&(y=!0),y}}},{key:"getFormattingValues",value:function(){var a=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,v=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,y=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,b=this.options.color.inherit,P={toArrow:a,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,middleArrow:y,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,fromArrow:v,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,arrowStrikethrough:this.options.arrowStrikethrough,color:b?void 0:this.options.color.color,inheritsColor:b,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(this.chooser===!0){if(this.selected){var D=this.options.selectionWidth;typeof D=="function"?P.width=D(P.width):typeof D=="number"&&(P.width+=D),P.width=Math.max(P.width,.3/this.body.view.scale),P.color=this.options.color.highlight,P.shadow=this.options.shadow.enabled}else if(this.hover){var O=this.options.hoverWidth;typeof O=="function"?P.width=O(P.width):typeof O=="number"&&(P.width+=O),P.width=Math.max(P.width,.3/this.body.view.scale),P.color=this.options.color.hover,P.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(P,this.options.id,this.selected,this.hover),P.color!==void 0&&(P.inheritsColor=!1),P.shadow===!1&&(P.shadowColor!==this.options.shadow.color||P.shadowSize!==this.options.shadow.size||P.shadowX!==this.options.shadow.x||P.shadowY!==this.options.shadow.y)&&(P.shadow=!0));else P.shadow=this.options.shadow.enabled,P.width=Math.max(P.width,.3/this.body.view.scale);return P}},{key:"updateLabelModule",value:function(a){var v=[a,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,v),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateEdgeType",value:function(){var a=this.options.smooth,v=!1,y=!0;return this.edgeType!==void 0&&((this.edgeType instanceof t&&a.enabled===!0&&a.type==="dynamic"||this.edgeType instanceof e&&a.enabled===!0&&a.type==="cubicBezier"||this.edgeType instanceof n&&a.enabled===!0&&a.type!=="dynamic"&&a.type!=="cubicBezier"||this.edgeType instanceof i&&a.type.enabled===!1)&&(y=!1),y===!0&&(v=this.cleanup())),y===!0?a.enabled===!0?a.type==="dynamic"?(v=!0,this.edgeType=new t(this.options,this.body,this.labelModule)):a.type==="cubicBezier"?this.edgeType=new e(this.options,this.body,this.labelModule):this.edgeType=new n(this.options,this.body,this.labelModule):this.edgeType=new i(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),v}},{key:"connect",value:function(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=this.from!==void 0&&this.to!==void 0,this.connected===!0?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}},{key:"disconnect",value:function(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}},{key:"getTitle",value:function(){return this.title}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"setValueRange",value:function(a,v,y){if(this.options.value!==void 0){var b=this.options.scaling.customScalingFunction(a,v,y,this.options.value),P=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){var D=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+b*D}this.options.width=this.options.scaling.min+b*P}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}},{key:"_setInteractionWidths",value:function(){typeof this.options.hoverWidth=="function"?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,typeof this.options.selectionWidth=="function"?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}},{key:"draw",value:function(a){var v=this.getFormattingValues();if(!v.hidden){var y=this.edgeType.getViaNode(),b={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,v.fromArrow&&(b.from=this.edgeType.getArrowData(a,"from",y,this.selected,this.hover,v),v.arrowStrikethrough===!1&&(this.edgeType.fromPoint=b.from.core)),v.toArrow&&(b.to=this.edgeType.getArrowData(a,"to",y,this.selected,this.hover,v),v.arrowStrikethrough===!1&&(this.edgeType.toPoint=b.to.core)),v.middleArrow&&(b.middle=this.edgeType.getArrowData(a,"middle",y,this.selected,this.hover,v)),this.edgeType.drawLine(a,v,this.selected,this.hover,y),this.drawArrows(a,b,v),this.drawLabel(a,y)}}},{key:"drawArrows",value:function(a,v,y){y.fromArrow&&this.edgeType.drawArrowHead(a,y,this.selected,this.hover,v.from),y.middleArrow&&this.edgeType.drawArrowHead(a,y,this.selected,this.hover,v.middle),y.toArrow&&this.edgeType.drawArrowHead(a,y,this.selected,this.hover,v.to)}},{key:"drawLabel",value:function(a,v){if(this.options.label!==void 0){var y=this.from,b=this.to;if(this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(a,this.selected,this.hover),y.id!=b.id){this.labelModule.pointToSelf=!1;var P=this.edgeType.getPoint(.5,v);a.save();var D=this._getRotation(a);D.angle!=0&&(a.translate(D.x,D.y),a.rotate(D.angle)),this.labelModule.draw(a,P.x,P.y,this.selected,this.hover),a.restore()}else{this.labelModule.pointToSelf=!0;var O,E,A=this.options.selfReferenceSize;y.shape.width>y.shape.height?(O=y.x+y.shape.width*.5,E=y.y-A):(O=y.x+A,E=y.y-y.shape.height*.5),P=this._pointOnCircle(O,E,A,.125),this.labelModule.draw(a,P.x,P.y,this.selected,this.hover)}}}},{key:"getItemsOnPoint",value:function(a){var v=[];if(this.labelModule.visible()){var y=this._getRotation();f.pointInRect(this.labelModule.getSize(),a,y)&&v.push({edgeId:this.id,labelId:0})}var b={left:a.x,top:a.y};return this.isOverlappingWith(b)&&v.push({edgeId:this.id}),v}},{key:"isOverlappingWith",value:function(a){if(this.connected){var v=10,y=this.from.x,b=this.from.y,P=this.to.x,D=this.to.y,O=a.left,E=a.top,A=this.edgeType.getDistanceToEdge(y,b,P,D,O,E);return A<v}else return!1}},{key:"_getRotation",value:function(a){var v=this.edgeType.getViaNode(),y=this.edgeType.getPoint(.5,v);a!==void 0&&this.labelModule.calculateLabelSize(a,this.selected,this.hover,y.x,y.y);var b={x:y.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible()||this.options.font.align==="horizontal")return b;var P=this.from.y-this.to.y,D=this.from.x-this.to.x,O=Math.atan2(P,D);return(O<-1&&D<0||O>0&&D<0)&&(O+=Math.PI),b.angle=O,b}},{key:"_pointOnCircle",value:function(a,v,y,b){var P=b*2*Math.PI;return{x:a+y*Math.cos(P),y:v-y*Math.sin(P)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}},{key:"remove",value:function(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}},{key:"endPointsValid",value:function(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}}],[{key:"parseOptions",value:function(a,v){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},P=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,D=["arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","to","title","value","width","font","chosen","widthConstraint"];if(u.selectiveDeepExtend(D,a,v,y),f.isValidLabel(v.label)?a.label=v.label:a.label=void 0,u.mergeOptions(a,v,"smooth",b),u.mergeOptions(a,v,"shadow",b),u.mergeOptions(a,v,"background",b),v.dashes!==void 0&&v.dashes!==null?a.dashes=v.dashes:y===!0&&v.dashes===null&&(a.dashes=(0,I.default)(b.dashes)),v.scaling!==void 0&&v.scaling!==null?(v.scaling.min!==void 0&&(a.scaling.min=v.scaling.min),v.scaling.max!==void 0&&(a.scaling.max=v.scaling.max),u.mergeOptions(a.scaling,v.scaling,"label",b.scaling)):y===!0&&v.scaling===null&&(a.scaling=(0,I.default)(b.scaling)),v.arrows!==void 0&&v.arrows!==null)if(typeof v.arrows=="string"){var O=v.arrows.toLowerCase();a.arrows.to.enabled=O.indexOf("to")!=-1,a.arrows.middle.enabled=O.indexOf("middle")!=-1,a.arrows.from.enabled=O.indexOf("from")!=-1}else if((0,M.default)(v.arrows)==="object")u.mergeOptions(a.arrows,v.arrows,"to",b.arrows),u.mergeOptions(a.arrows,v.arrows,"middle",b.arrows),u.mergeOptions(a.arrows,v.arrows,"from",b.arrows);else throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+(0,p.default)(v.arrows));else y===!0&&v.arrows===null&&(a.arrows=(0,I.default)(b.arrows));if(v.color!==void 0&&v.color!==null){var E=v.color,A=a.color;if(P)u.deepExtend(A,b.color,!1,y);else for(var Y in A)A.hasOwnProperty(Y)&&delete A[Y];if(u.isString(A))A.color=A,A.highlight=A,A.hover=A,A.inherit=!1,E.opacity===void 0&&(A.opacity=1);else{var X=!1;E.color!==void 0&&(A.color=E.color,X=!0),E.highlight!==void 0&&(A.highlight=E.highlight,X=!0),E.hover!==void 0&&(A.hover=E.hover,X=!0),E.inherit!==void 0&&(A.inherit=E.inherit),E.opacity!==void 0&&(A.opacity=Math.min(1,Math.max(0,E.opacity))),X===!0?A.inherit=!1:A.inherit===void 0&&(A.inherit="from")}}else y===!0&&v.color===null&&(a.color=u.bridgeObject(b.color));y===!0&&v.font===null&&(a.font=u.bridgeObject(b.font))}}]),l}();k.default=r},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(79),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r){return(0,M.default)(this,t),(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r))}return(0,I.default)(t,[{key:"_findBorderPositionBezier",value:function(i,r){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates(),d=10,a=0,v=0,y=1,b,P,D,O,E,A=.2,Y=this.to,X=!1;for(i.id===this.from.id&&(Y=this.from,X=!0);v<=y&&a<d;){var U=(v+y)*.5;if(b=this.getPoint(U,l),P=Math.atan2(Y.y-b.y,Y.x-b.x),D=Y.distanceToBorder(r,P),O=Math.sqrt(Math.pow(b.x-Y.x,2)+Math.pow(b.y-Y.y,2)),E=D-O,Math.abs(E)<A)break;E<0?X===!1?v=U:y=U:X===!1?y=U:v=U,a++}return b.t=U,b}},{key:"_getDistanceToBezierEdge",value:function(i,r,l,d,a,v,y){var b=1e9,P=void 0,D=void 0,O=void 0,E=void 0,A=void 0,Y=i,X=r;for(D=1;D<10;D++)O=.1*D,E=Math.pow(1-O,2)*i+2*O*(1-O)*y.x+Math.pow(O,2)*l,A=Math.pow(1-O,2)*r+2*O*(1-O)*y.y+Math.pow(O,2)*d,D>0&&(P=this._getDistanceToLine(Y,X,E,A,a,v),b=P<b?P:b),Y=E,X=A;return b}},{key:"_bezierCurve",value:function(i,r,l,d){var a=l!==void 0&&l.x!==void 0,v=d!==void 0&&d.x!==void 0;i.beginPath(),i.moveTo(this.fromPoint.x,this.fromPoint.y),a&&v?i.bezierCurveTo(l.x,l.y,d.x,d.y,this.toPoint.x,this.toPoint.y):a?i.quadraticCurveTo(l.x,l.y,this.toPoint.x,this.toPoint.y):i.lineTo(this.toPoint.x,this.toPoint.y),this.drawBackground(i,r),this.enableShadow(i,r),i.stroke(),this.disableShadow(i,r)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}}]),t}(u.default);k.default=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(0),p=x(w),S=h(1),M=x(S);function x(R){return R&&R.__esModule?R:{default:R}}var I=h(2),T=function(){function R(){(0,p.default)(this,R)}return(0,M.default)(R,null,[{key:"getRange",value:function(m){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],u=1e9,s=-1e9,f=1e9,e=-1e9,t;if(c.length>0)for(var n=0;n<c.length;n++)t=m[c[n]],f>t.shape.boundingBox.left&&(f=t.shape.boundingBox.left),e<t.shape.boundingBox.right&&(e=t.shape.boundingBox.right),u>t.shape.boundingBox.top&&(u=t.shape.boundingBox.top),s<t.shape.boundingBox.bottom&&(s=t.shape.boundingBox.bottom);return f===1e9&&e===-1e9&&u===1e9&&s===-1e9&&(u=0,s=0,f=0,e=0),{minX:f,maxX:e,minY:u,maxY:s}}},{key:"getRangeCore",value:function(m){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],u=1e9,s=-1e9,f=1e9,e=-1e9,t;if(c.length>0)for(var n=0;n<c.length;n++)t=m[c[n]],f>t.x&&(f=t.x),e<t.x&&(e=t.x),u>t.y&&(u=t.y),s<t.y&&(s=t.y);return f===1e9&&e===-1e9&&u===1e9&&s===-1e9&&(u=0,s=0,f=0,e=0),{minX:f,maxX:e,minY:u,maxY:s}}},{key:"findCenter",value:function(m){return{x:.5*(m.maxX+m.minX),y:.5*(m.maxY+m.minY)}}},{key:"cloneOptions",value:function(m,c){var u={};return c===void 0||c==="node"?(I.deepExtend(u,m.options,!0),u.x=m.x,u.y=m.y,u.amountOfConnections=m.edges.length):I.deepExtend(u,m.options,!0),u}}]),R}();k.default=T},function(L,k,h){L.exports={default:h(86),__esModule:!0}},function(L,k,h){var w=h(38);L.exports=Object("z").propertyIsEnumerable(0)?Object:function(p){return w(p)=="String"?p.split(""):Object(p)}},function(L,k,h){"use strict";var w=h(27),p=h(11),S=h(64),M=h(19),x=h(25),I=h(91),T=h(46),R=h(66),C=h(8)("iterator"),m=!([].keys&&"next"in[].keys()),c="@@iterator",u="keys",s="values",f=function(){return this};L.exports=function(e,t,n,i,r,l,d){I(n,t,i);var a=function(Z){if(!m&&Z in P)return P[Z];switch(Z){case u:return function(){return new n(this,Z)};case s:return function(){return new n(this,Z)}}return function(){return new n(this,Z)}},v=t+" Iterator",y=r==s,b=!1,P=e.prototype,D=P[C]||P[c]||r&&P[r],O=D||a(r),E=r?y?a("entries"):O:void 0,A=t=="Array"&&P.entries||D,Y,X,U;if(A&&(U=R(A.call(new e)),U!==Object.prototype&&U.next&&(T(U,v,!0),!w&&typeof U[C]!="function"&&M(U,C,f))),y&&D&&D.name!==s&&(b=!0,O=function(){return D.call(this)}),(!w||d)&&(m||b||!P[C])&&M(P,C,O),x[t]=O,x[v]=f,r)if(Y={values:y?O:a(s),keys:l?O:a(u),entries:E},d)for(X in Y)X in P||S(P,X,Y[X]);else p(p.P+p.F*(m||b),t,Y);return Y}},function(L,k,h){var w=h(90);L.exports=function(p,S,M){if(w(p),S===void 0)return p;switch(M){case 1:return function(x){return p.call(S,x)};case 2:return function(x,I){return p.call(S,x,I)};case 3:return function(x,I,T){return p.call(S,x,I,T)}}return function(){return p.apply(S,arguments)}}},function(L,k,h){L.exports=!h(13)&&!h(22)(function(){return Object.defineProperty(h(63)("div"),"a",{get:function(){return 7}}).a!=7})},function(L,k,h){var w=h(21),p=h(10).document,S=w(p)&&w(p.createElement);L.exports=function(M){return S?p.createElement(M):{}}},function(L,k,h){L.exports=h(19)},function(L,k,h){var w=h(14),p=h(18),S=h(93)(!1),M=h(43)("IE_PROTO");L.exports=function(x,I){var T=p(x),R=0,C=[],m;for(m in T)m!=M&&w(T,m)&&C.push(m);for(;I.length>R;)w(T,m=I[R++])&&(~S(C,m)||C.push(m));return C}},function(L,k,h){var w=h(14),p=h(30),S=h(43)("IE_PROTO"),M=Object.prototype;L.exports=Object.getPrototypeOf||function(x){return x=p(x),w(x,S)?x[S]:typeof x.constructor=="function"&&x instanceof x.constructor?x.constructor.prototype:x instanceof Object?M:null}},function(L,k,h){var w=h(38),p=h(8)("toStringTag"),S=w(function(){return arguments}())=="Arguments",M=function(x,I){try{return x[I]}catch{}};L.exports=function(x){var I,T,R;return x===void 0?"Undefined":x===null?"Null":typeof(T=M(I=Object(x),p))=="string"?T:S?w(I):(R=w(I))=="Object"&&typeof I.callee=="function"?"Arguments":R}},function(L,k,h){var w=h(11),p=h(6),S=h(22);L.exports=function(M,x){var I=(p.Object||{})[M]||Object[M],T={};T[M]=x(I),w(w.S+w.F*S(function(){I(1)}),"Object",T)}},function(L,k,h){var w=h(65),p=h(45).concat("length","prototype");k.f=Object.getOwnPropertyNames||function(M){return w(M,p)}},function(L,k,h){var w=h(32),p=h(28),S=h(18),M=h(40),x=h(14),I=h(62),T=Object.getOwnPropertyDescriptor;k.f=h(13)?T:function(C,m){if(C=S(C),m=M(m,!0),I)try{return T(C,m)}catch{}if(x(C,m))return p(!w.f.call(C,m),C[m])}},function(L,k,h){"use strict";L.exports=typeof window<"u"&&window.moment||h(116)},function(L,k,h){"use strict";function w(p){this.delay=null,this.max=1/0,this._queue=[],this._timeout=null,this._extended=null,this.setOptions(p)}w.prototype.setOptions=function(p){p&&typeof p.delay<"u"&&(this.delay=p.delay),p&&typeof p.max<"u"&&(this.max=p.max),this._flushIfNeeded()},w.extend=function(p,S){var M=new w(S);if(p.flush!==void 0)throw new Error("Target object already has a property flush");p.flush=function(){M.flush()};var x=[{name:"flush",original:void 0}];if(S&&S.replace)for(var I=0;I<S.replace.length;I++){var T=S.replace[I];x.push({name:T,original:p[T]}),M.replace(p,T)}return M._extended={object:p,methods:x},M},w.prototype.destroy=function(){if(this.flush(),this._extended){for(var p=this._extended.object,S=this._extended.methods,M=0;M<S.length;M++){var x=S[M];x.original?p[x.name]=x.original:delete p[x.name]}this._extended=null}},w.prototype.replace=function(p,S){var M=this,x=p[S];if(!x)throw new Error("Method "+S+" undefined");p[S]=function(){for(var I=[],T=0;T<arguments.length;T++)I[T]=arguments[T];M.queue({args:I,fn:x,context:this})}},w.prototype.queue=function(p){typeof p=="function"?this._queue.push({fn:p}):this._queue.push(p),this._flushIfNeeded()},w.prototype._flushIfNeeded=function(){if(this._queue.length>this.max&&this.flush(),clearTimeout(this._timeout),this.queue.length>0&&typeof this.delay=="number"){var p=this;this._timeout=setTimeout(function(){p.flush()},this.delay)}},w.prototype.flush=function(){for(;this._queue.length>0;){var p=this._queue.shift();p.fn.apply(p.context||p.fn,p.args||[])}},L.exports=w},function(L,k){L.exports=h;function h(p){if(p)return w(p)}function w(p){for(var S in h.prototype)p[S]=h.prototype[S];return p}h.prototype.on=h.prototype.addEventListener=function(p,S){return this._callbacks=this._callbacks||{},(this._callbacks[p]=this._callbacks[p]||[]).push(S),this},h.prototype.once=function(p,S){var M=this;this._callbacks=this._callbacks||{};function x(){M.off(p,x),S.apply(this,arguments)}return x.fn=S,this.on(p,x),this},h.prototype.off=h.prototype.removeListener=h.prototype.removeAllListeners=h.prototype.removeEventListener=function(p,S){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var M=this._callbacks[p];if(!M)return this;if(arguments.length==1)return delete this._callbacks[p],this;for(var x,I=0;I<M.length;I++)if(x=M[I],x===S||x.fn===S){M.splice(I,1);break}return this},h.prototype.emit=function(p){this._callbacks=this._callbacks||{};var S=[].slice.call(arguments,1),M=this._callbacks[p];if(M){M=M.slice(0);for(var x=0,I=M.length;x<I;++x)M[x].apply(this,S)}return this},h.prototype.listeners=function(p){return this._callbacks=this._callbacks||{},this._callbacks[p]||[]},h.prototype.hasListeners=function(p){return!!this.listeners(p).length}},function(L,k,h){"use strict";var w=h(31),p=S(w);function S(G){return G&&G.__esModule?G:{default:G}}function M(G){return C=G,b()}var x={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},I=(0,p.default)(x);I.color="color.color",I.style="dashes";var T={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},R={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},C="",m=0,c="",u="",s=T.NULL;function f(){m=0,c=C.charAt(0)}function e(){m++,c=C.charAt(m)}function t(){return C.charAt(m+1)}var n=/[a-zA-Z_0-9.:#]/;function i(G){return n.test(G)}function r(G,V){if(G||(G={}),V)for(var Q in V)V.hasOwnProperty(Q)&&(G[Q]=V[Q]);return G}function l(G,V,Q){for(var K=V.split("."),J=G;K.length;){var _=K.shift();K.length?(J[_]||(J[_]={}),J=J[_]):J[_]=Q}}function d(G,V){for(var Q,K,J=null,_=[G],ee=G;ee.parent;)_.push(ee.parent),ee=ee.parent;if(ee.nodes){for(Q=0,K=ee.nodes.length;Q<K;Q++)if(V.id===ee.nodes[Q].id){J=ee.nodes[Q];break}}for(J||(J={id:V.id},G.node&&(J.attr=r(J.attr,G.node))),Q=_.length-1;Q>=0;Q--){var ue=_[Q];ue.nodes||(ue.nodes=[]),ue.nodes.indexOf(J)===-1&&ue.nodes.push(J)}V.attr&&(J.attr=r(J.attr,V.attr))}function a(G,V){if(G.edges||(G.edges=[]),G.edges.push(V),G.edge){var Q=r({},G.edge);V.attr=r(Q,V.attr)}}function v(G,V,Q,K,J){var _={from:V,to:Q,type:K};return G.edge&&(_.attr=r({},G.edge)),_.attr=r(_.attr||{},J),J!=null&&J.hasOwnProperty("arrows")&&(_.arrows={to:{enabled:!0,type:J.arrows.type}},J.arrows=null),_}function y(){for(s=T.NULL,u="";c===" "||c==="	"||c===`
`||c==="\r";)e();do{var G=!1;if(c==="#"){for(var V=m-1;C.charAt(V)===" "||C.charAt(V)==="	";)V--;if(C.charAt(V)===`
`||C.charAt(V)===""){for(;c!=""&&c!=`
`;)e();G=!0}}if(c==="/"&&t()==="/"){for(;c!=""&&c!=`
`;)e();G=!0}if(c==="/"&&t()==="*"){for(;c!="";)if(c==="*"&&t()==="/"){e(),e();break}else e();G=!0}for(;c===" "||c==="	"||c===`
`||c==="\r";)e()}while(G);if(c===""){s=T.DELIMITER;return}var Q=c+t();if(R[Q]){s=T.DELIMITER,u=Q,e(),e();return}if(R[c]){s=T.DELIMITER,u=c,e();return}if(i(c)||c==="-"){for(u+=c,e();i(c);)u+=c,e();u==="false"?u=!1:u==="true"?u=!0:isNaN(Number(u))||(u=Number(u)),s=T.IDENTIFIER;return}if(c==='"'){for(e();c!=""&&(c!='"'||c==='"'&&t()==='"');)c==='"'?(u+=c,e()):c==="\\"&&t()==="n"?(u+=`
`,e()):u+=c,e();if(c!='"')throw Z('End of string " expected');e(),s=T.IDENTIFIER;return}for(s=T.UNKNOWN;c!="";)u+=c,e();throw new SyntaxError('Syntax error in part "'+re(u,30)+'"')}function b(){var G={};if(f(),y(),u==="strict"&&(G.strict=!0,y()),(u==="graph"||u==="digraph")&&(G.type=u,y()),s===T.IDENTIFIER&&(G.id=u,y()),u!="{")throw Z("Angle bracket { expected");if(y(),P(G),u!="}")throw Z("Angle bracket } expected");if(y(),u!=="")throw Z("End of file expected");return y(),delete G.node,delete G.edge,delete G.graph,G}function P(G){for(;u!==""&&u!="}";)D(G),u===";"&&y()}function D(G){var V=O(G);if(V){Y(G,V);return}var Q=E(G);if(!Q){if(s!=T.IDENTIFIER)throw Z("Identifier expected");var K=u;if(y(),u==="="){if(y(),s!=T.IDENTIFIER)throw Z("Identifier expected");G[K]=u,y()}else A(G,K)}}function O(G){var V=null;if(u==="subgraph"&&(V={},V.type="subgraph",y(),s===T.IDENTIFIER&&(V.id=u,y())),u==="{"){if(y(),V||(V={}),V.parent=G,V.node=G.node,V.edge=G.edge,V.graph=G.graph,P(V),u!="}")throw Z("Angle bracket } expected");y(),delete V.node,delete V.edge,delete V.graph,delete V.parent,G.subgraphs||(G.subgraphs=[]),G.subgraphs.push(V)}return V}function E(G){return u==="node"?(y(),G.node=U(),"node"):u==="edge"?(y(),G.edge=U(),"edge"):u==="graph"?(y(),G.graph=U(),"graph"):null}function A(G,V){var Q={id:V},K=U();K&&(Q.attr=K),d(G,Q),Y(G,V)}function Y(G,V){for(;u==="->"||u==="--";){var Q,K=u;y();var J=O(G);if(J)Q=J;else{if(s!=T.IDENTIFIER)throw Z("Identifier or subgraph expected");Q=u,d(G,{id:Q}),y()}var _=U(),ee=v(G,V,Q,K,_);a(G,ee),V=Q}}function X(G,V){var Q;if(G.includes("dir")){var K={};for(K.arrows={},Q=0;Q<V.length;Q++)if(V[Q].name==="arrows")if(V[Q].value.to!=null)K.arrows.to=Q;else if(V[Q].value.from!=null)K.arrows.from=Q;else throw Z("Invalid value of arrows");else V[Q].name==="dir"&&(K.dir=Q);var J=V[K.dir].value;if(!G.includes("arrows"))if(J==="both")V.push({attr:V[K.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),K.arrows.to=V.length-1,V.push({attr:V[K.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),K.arrows.from=V.length-1;else if(J==="forward")V.push({attr:V[K.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),K.arrows.to=V.length-1;else if(J==="back")V.push({attr:V[K.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),K.arrows.from=V.length-1;else if(J==="none")V.push({attr:V[K.dir].attr,name:"arrows",value:""}),K.arrows.to=V.length-1;else throw Z('Invalid dir type "'+J+'"');var _,ee;if(J==="both")K.arrows.to&&K.arrows.from?(ee=V[K.arrows.to].value.to.type,_=V[K.arrows.from].value.from.type,V[K.arrows.to]={attr:V[K.arrows.to].attr,name:V[K.arrows.to].name,value:{to:{enabled:!0,type:ee},from:{enabled:!0,type:_}}},V.splice(K.arrows.from,1)):K.arrows.to?(ee=V[K.arrows.to].value.to.type,_="arrow",V[K.arrows.to]={attr:V[K.arrows.to].attr,name:V[K.arrows.to].name,value:{to:{enabled:!0,type:ee},from:{enabled:!0,type:_}}}):K.arrows.from&&(ee="arrow",_=V[K.arrows.from].value.from.type,V[K.arrows.from]={attr:V[K.arrows.from].attr,name:V[K.arrows.from].name,value:{to:{enabled:!0,type:ee},from:{enabled:!0,type:_}}});else if(J==="back")K.arrows.to&&K.arrows.from?(ee="",_=V[K.arrows.from].value.from.type,V[K.arrows.from]={attr:V[K.arrows.from].attr,name:V[K.arrows.from].name,value:{to:{enabled:!0,type:ee},from:{enabled:!0,type:_}}}):K.arrows.to?(ee="",_="arrow",K.arrows.from=K.arrows.to,V[K.arrows.from]={attr:V[K.arrows.from].attr,name:V[K.arrows.from].name,value:{to:{enabled:!0,type:ee},from:{enabled:!0,type:_}}}):K.arrows.from&&(ee="",_=V[K.arrows.from].value.from.type,V[K.arrows.to]={attr:V[K.arrows.from].attr,name:V[K.arrows.from].name,value:{to:{enabled:!0,type:ee},from:{enabled:!0,type:_}}}),V[K.arrows.from]={attr:V[K.arrows.from].attr,name:V[K.arrows.from].name,value:{from:{enabled:!0,type:V[K.arrows.from].value.from.type}}};else if(J==="none"){var ue;K.arrows.to?ue=K.arrows.to:ue=K.arrows.from,V[ue]={attr:V[ue].attr,name:V[ue].name,value:""}}else if(J==="forward")K.arrows.to&&K.arrows.from?(ee=V[K.arrows.to].value.to.type,_="",V[K.arrows.to]={attr:V[K.arrows.to].attr,name:V[K.arrows.to].name,value:{to:{enabled:!0,type:ee},from:{enabled:!0,type:_}}}):K.arrows.to?(ee=V[K.arrows.to].value.to.type,_="",V[K.arrows.to]={attr:V[K.arrows.to].attr,name:V[K.arrows.to].name,value:{to:{enabled:!0,type:ee},from:{enabled:!0,type:_}}}):K.arrows.from&&(ee="arrow",_="",K.arrows.to=K.arrows.from,V[K.arrows.to]={attr:V[K.arrows.to].attr,name:V[K.arrows.to].name,value:{to:{enabled:!0,type:ee},from:{enabled:!0,type:_}}}),V[K.arrows.to]={attr:V[K.arrows.to].attr,name:V[K.arrows.to].name,value:{to:{enabled:!0,type:V[K.arrows.to].value.to.type}}};else throw Z('Invalid dir type "'+J+'"');V.splice(K.dir,1)}return V}function U(){for(var G,V=null,Q={dashed:!0,solid:!1,dotted:[1,5]},K={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},J=new Array,_=new Array;u==="[";){for(y(),V={};u!==""&&u!="]";){if(s!=T.IDENTIFIER)throw Z("Attribute name expected");var ee=u;if(y(),u!="=")throw Z("Equal sign = expected");if(y(),s!=T.IDENTIFIER)throw Z("Attribute value expected");var ue=u;ee==="style"&&(ue=Q[ue]);var pe;ee==="arrowhead"&&(pe=K[ue],ee="arrows",ue={to:{enabled:!0,type:pe}}),ee==="arrowtail"&&(pe=K[ue],ee="arrows",ue={from:{enabled:!0,type:pe}}),J.push({attr:V,name:ee,value:ue}),_.push(ee),y(),u==","&&y()}if(u!="]")throw Z("Bracket ] expected");y()}J=X(_,J);var Te;if(_.includes("penwidth")){var Ee=[];for(Te=J.length,G=0;G<Te;G++)J[G].name!=="width"&&(J[G].name==="penwidth"&&(J[G].name="width"),Ee.push(J[G]));J=Ee}for(Te=J.length,G=0;G<Te;G++)l(J[G].attr,J[G].name,J[G].value);return V}function Z(G){return new SyntaxError(G+', got "'+re(u,30)+'" (char '+m+")")}function re(G,V){return G.length<=V?G:G.substr(0,27)+"..."}function le(G,V,Q){Array.isArray(G)?G.forEach(function(K){Array.isArray(V)?V.forEach(function(J){Q(K,J)}):Q(K,V)}):Array.isArray(V)?V.forEach(function(K){Q(G,K)}):Q(G,V)}function he(G,V,Q){for(var K=V.split("."),J=K.pop(),_=G,ee=0;ee<K.length;ee++){var ue=K[ee];ue in _||(_[ue]={}),_=_[ue]}return _[J]=Q,G}function ce(G,V){var Q={};for(var K in G)if(G.hasOwnProperty(K)){var J=V[K];Array.isArray(J)?J.forEach(function(_){he(Q,_,G[K])}):typeof J=="string"?he(Q,J,G[K]):he(Q,K,G[K])}return Q}function se(G){var V=M(G),Q={nodes:[],edges:[],options:{}};if(V.nodes&&V.nodes.forEach(function(J){var _={id:J.id,label:String(J.label||J.id)};r(_,ce(J.attr,x)),_.image&&(_.shape="image"),Q.nodes.push(_)}),V.edges){var K=function(_){var ee={from:_.from,to:_.to};return r(ee,ce(_.attr,I)),ee.arrows==null&&_.type==="->"&&(ee.arrows="to"),ee};V.edges.forEach(function(J){var _,ee;J.from instanceof Object?_=J.from.nodes:_={id:J.from},J.to instanceof Object?ee=J.to.nodes:ee={id:J.to},J.from instanceof Object&&J.from.edges&&J.from.edges.forEach(function(ue){var pe=K(ue);Q.edges.push(pe)}),le(_,ee,function(ue,pe){var Te=v(Q,ue.id,pe.id,J.type,J.attr),Ee=K(Te);Q.edges.push(Ee)}),J.to instanceof Object&&J.to.edges&&J.to.edges.forEach(function(ue){var pe=K(ue);Q.edges.push(pe)})})}return V.attr&&(Q.options=V.attr),Q}k.parseDOT=M,k.DOTToGraph=se},function(L,k,h){"use strict";function w(p,S){var M=[],x=[],I={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};S!==void 0&&(S.fixed!==void 0&&(I.nodes.fixed=S.fixed),S.parseColor!==void 0&&(I.nodes.parseColor=S.parseColor),S.inheritColor!==void 0&&(I.edges.inheritColor=S.inheritColor));for(var T=p.edges,R=p.nodes,C=0;C<T.length;C++){var m={},c=T[C];m.id=c.id,m.from=c.source,m.to=c.target,m.attributes=c.attributes,m.label=c.label,m.title=c.attributes!==void 0?c.attributes.title:void 0,c.type==="Directed"&&(m.arrows="to"),c.color&&I.inheritColor===!1&&(m.color=c.color),M.push(m)}for(var u=0;u<R.length;u++){var s={},f=R[u];s.id=f.id,s.attributes=f.attributes,s.x=f.x,s.y=f.y,s.label=f.label,s.title=f.attributes!==void 0?f.attributes.title:f.title,I.nodes.parseColor===!0?s.color=f.color:s.color=f.color!==void 0?{background:f.color,border:f.color,highlight:{background:f.color,border:f.color},hover:{background:f.color,border:f.color}}:void 0,s.size=f.size,s.fixed=I.nodes.fixed&&f.x!==void 0&&f.y!==void 0,x.push(s)}return{nodes:x,edges:M}}k.parseGephi=w},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(0),p=T(w),S=h(1),M=T(S),x=h(133),I=T(x);function T(C){return C&&C.__esModule?C:{default:C}}var R=function(){function C(m){(0,p.default)(this,C),this.images={},this.imageBroken={},this.callback=m}return(0,M.default)(C,[{key:"_tryloadBrokenUrl",value:function(c,u,s){if(!(c===void 0||s===void 0)){if(u===void 0){console.warn("No broken url image defined");return}s.onerror=function(){console.error("Could not load brokenImage:",u)},s.image.src=u}}},{key:"_redrawWithImage",value:function(c){this.callback&&this.callback(c)}},{key:"load",value:function(c,u){var s=this,f=this.images[c];if(f)return f;var e=new I.default;return this.images[c]=e,e.image.onload=function(){s._fixImageCoordinates(e.image),e.init(),s._redrawWithImage(e)},e.image.onerror=function(){console.error("Could not load image:",c),s._tryloadBrokenUrl(c,u,e)},e.image.src=c,e}},{key:"_fixImageCoordinates",value:function(c){c.width===0&&(document.body.appendChild(c),c.width=c.offsetWidth,c.height=c.offsetHeight,document.body.removeChild(c))}}]),C}();k.default=R},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(15),p=C(w),S=h(7),M=C(S),x=h(0),I=C(x),T=h(1),R=C(T);function C(e){return e&&e.__esModule?e:{default:e}}var m=h(2),c=h(35).default,u=h(139).default,s=["bold","ital","boldital","mono"],f=function(){function e(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;(0,I.default)(this,e),this.body=t,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(n),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=i}return(0,R.default)(e,[{key:"setOptions",value:function(n){if(this.elementOptions=n,this.initFontOptions(n.font),c.isValidLabel(n.label)?this.labelDirty=!0:n.label="",n.font!==void 0&&n.font!==null){if(typeof n.font=="string")this.baseSize=this.fontOptions.size;else if((0,M.default)(n.font)==="object"){var i=n.font.size;i!==void 0&&(this.baseSize=i)}}}},{key:"initFontOptions",value:function(n){var i=this;if(m.forEach(s,function(r){i.fontOptions[r]={}}),e.parseFontString(this.fontOptions,n)){this.fontOptions.vadjust=0;return}m.forEach(n,function(r,l){r!=null&&(typeof r>"u"?"undefined":(0,M.default)(r))!=="object"&&(i.fontOptions[l]=r)})}},{key:"constrain",value:function(n){var i={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},r=m.topMost(n,"widthConstraint");if(typeof r=="number")i.maxWdt=Number(r),i.minWdt=Number(r);else if((typeof r>"u"?"undefined":(0,M.default)(r))==="object"){var l=m.topMost(n,["widthConstraint","maximum"]);typeof l=="number"&&(i.maxWdt=Number(l));var d=m.topMost(n,["widthConstraint","minimum"]);typeof d=="number"&&(i.minWdt=Number(d))}var a=m.topMost(n,"heightConstraint");if(typeof a=="number")i.minHgt=Number(a);else if((typeof a>"u"?"undefined":(0,M.default)(a))==="object"){var v=m.topMost(n,["heightConstraint","minimum"]);typeof v=="number"&&(i.minHgt=Number(v));var y=m.topMost(n,["heightConstraint","valign"]);typeof y=="string"&&(y==="top"||y==="bottom")&&(i.valign=y)}return i}},{key:"update",value:function(n,i){this.setOptions(n,!0),this.propagateFonts(i),m.deepExtend(this.fontOptions,this.constrain(i)),this.fontOptions.chooser=c.choosify("label",i)}},{key:"adjustSizes",value:function(n){var i=n?n.right+n.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=i,this.fontOptions.minWdt-=i);var r=n?n.top+n.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=r)}},{key:"addFontOptionsToPile",value:function(n,i){for(var r=0;r<i.length;++r)this.addFontToPile(n,i[r])}},{key:"addFontToPile",value:function(n,i){if(i!==void 0&&!(i.font===void 0||i.font===null)){var r=i.font;n.push(r)}}},{key:"getBasicOptions",value:function(n){for(var i={},r=0;r<n.length;++r){var l=n[r],d={};e.parseFontString(d,l)&&(l=d),m.forEach(l,function(a,v){a!==void 0&&(i.hasOwnProperty(v)||(s.indexOf(v)!==-1?i[v]={}:i[v]=a))})}return i}},{key:"getFontOption",value:function(n,i,r){for(var l=void 0,d=0;d<n.length;++d){var a=n[d];if(a.hasOwnProperty(i)){if(l=a[i],l==null)continue;var v={};if(e.parseFontString(v,l)&&(l=v),l.hasOwnProperty(r))return l[r]}}if(this.fontOptions.hasOwnProperty(r))return this.fontOptions[r];throw new Error("Did not find value for multi-font for property: '"+r+"'")}},{key:"getFontOptions",value:function(n,i){for(var r={},l=["color","size","face","mod","vadjust"],d=0;d<l.length;++d){var a=l[d];r[a]=this.getFontOption(n,i,a)}return r}},{key:"propagateFonts",value:function(n){var i=this,r=[];this.addFontOptionsToPile(r,n),this.fontOptions=this.getBasicOptions(r);for(var l=function(v){var y=s[v],b=i.fontOptions[y],P=i.getFontOptions(r,y);m.forEach(P,function(D,O){b[O]=D}),b.size=Number(b.size),b.vadjust=Number(b.vadjust)},d=0;d<s.length;++d)l(d)}},{key:"draw",value:function(n,i,r,l,d){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label!==void 0){var v=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&v<this.elementOptions.scaling.label.drawThreshold-1||(v>=this.elementOptions.scaling.label.maxVisible&&(v=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(n,l,d,i,r,a),this._drawBackground(n),this._drawText(n,i,this.size.yLine,a,v))}}},{key:"_drawBackground",value:function(n){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){n.fillStyle=this.fontOptions.background;var i=this.getSize();n.fillRect(i.left,i.top,i.width,i.height)}}},{key:"_drawText",value:function(n,i,r){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",d=arguments[4],a=this._setAlignment(n,i,r,l),v=(0,p.default)(a,2);i=v[0],r=v[1],n.textAlign="left",i=i-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(r-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(r+=(this.size.height-this.size.labelHeight)/2));for(var y=0;y<this.lineCount;y++){var b=this.lines[y];if(b&&b.blocks){var P=0;this.isEdgeLabel||this.fontOptions.align==="center"?P+=(this.size.width-b.width)/2:this.fontOptions.align==="right"&&(P+=this.size.width-b.width);for(var D=0;D<b.blocks.length;D++){var O=b.blocks[D];n.font=O.font;var E=this._getColor(O.color,d,O.strokeColor),A=(0,p.default)(E,2),Y=A[0],X=A[1];O.strokeWidth>0&&(n.lineWidth=O.strokeWidth,n.strokeStyle=X,n.lineJoin="round"),n.fillStyle=Y,O.strokeWidth>0&&n.strokeText(O.text,i+P,r+O.vadjust),n.fillText(O.text,i+P,r+O.vadjust),P+=O.width}r+=b.height}}}},{key:"_setAlignment",value:function(n,i,r,l){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){i=0,r=0;var d=2;this.fontOptions.align==="top"?(n.textBaseline="alphabetic",r-=2*d):this.fontOptions.align==="bottom"?(n.textBaseline="hanging",r+=2*d):n.textBaseline="middle"}else n.textBaseline=l;return[i,r]}},{key:"_getColor",value:function(n,i,r){var l=n||"#000000",d=r||"#ffffff";if(i<=this.elementOptions.scaling.label.drawThreshold){var a=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-i)));l=m.overrideOpacity(l,a),d=m.overrideOpacity(d,a)}return[l,d]}},{key:"getTextSize",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(n,i,r),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}},{key:"getSize",value:function(){var n=2,i=this.size.left,r=this.size.top-.5*n;if(this.isEdgeLabel){var l=-this.size.width*.5;switch(this.fontOptions.align){case"middle":i=l,r=-this.size.height*.5;break;case"top":i=l,r=-(this.size.height+n);break;case"bottom":i=l,r=n;break}}var d={left:i,top:r,width:this.size.width,height:this.size.height};return d}},{key:"calculateLabelSize",value:function(n,i,r){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";this._processLabel(n,i,r),this.size.left=l-this.size.width*.5,this.size.top=d-this.size.height*.5,this.size.yLine=d+(1-this.lineCount)*.5*this.fontOptions.size,a==="hanging"&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}},{key:"getFormattingValues",value:function(n,i,r,l){var d=function(b,P,D){return P==="normal"?D==="mod"?"":b[D]:b[P][D]!==void 0?b[P][D]:b[D]},a={color:d(this.fontOptions,l,"color"),size:d(this.fontOptions,l,"size"),face:d(this.fontOptions,l,"face"),mod:d(this.fontOptions,l,"mod"),vadjust:d(this.fontOptions,l,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(i||r)&&(l==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?a.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(a,this.elementOptions.id,i,r));var v="";return a.mod!==void 0&&a.mod!==""&&(v+=a.mod+" "),v+=a.size+"px "+a.face,n.font=v.replace(/"/g,""),a.font=n.font,a.height=a.size,a}},{key:"differentState",value:function(n,i){return n!==this.selectedState||i!==this.hoverState}},{key:"_processLabelText",value:function(n,i,r,l){var d=new u(n,this,i,r);return d.process(l)}},{key:"_processLabel",value:function(n,i,r){if(!(this.labelDirty===!1&&!this.differentState(i,r))){var l=this._processLabelText(n,i,r,this.elementOptions.label);this.fontOptions.minWdt>0&&l.width<this.fontOptions.minWdt&&(l.width=this.fontOptions.minWdt),this.size.labelHeight=l.height,this.fontOptions.minHgt>0&&l.height<this.fontOptions.minHgt&&(l.height=this.fontOptions.minHgt),this.lines=l.lines,this.lineCount=l.lines.length,this.size.width=l.width,this.size.height=l.height,this.selectedState=i,this.hoverState=r,this.labelDirty=!1}}},{key:"visible",value:function(){if(this.size.width===0||this.size.height===0||this.elementOptions.label===void 0)return!1;var n=this.fontOptions.size*this.body.view.scale;return!(n<this.elementOptions.scaling.label.drawThreshold-1)}}],[{key:"parseFontString",value:function(n,i){if(!i||typeof i!="string")return!1;var r=i.split(" ");return n.size=r[0].replace("px",""),n.face=r[1],n.color=r[2],!0}}]),e}();k.default=f},function(L,k,h){L.exports={default:h(141),__esModule:!0}},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(15),p=T(w),S=h(0),M=T(S),x=h(1),I=T(x);function T(c){return c&&c.__esModule?c:{default:c}}var R=h(2),C=h(80).default,m=function(){function c(u,s,f){(0,M.default)(this,c),this.body=s,this.labelModule=f,this.options={},this.setOptions(u),this.colorDirty=!0,this.color={},this.selectionWidth=2,this.hoverWidth=1.5,this.fromPoint=this.from,this.toPoint=this.to}return(0,I.default)(c,[{key:"connect",value:function(){this.from=this.body.nodes[this.options.from],this.to=this.body.nodes[this.options.to]}},{key:"cleanup",value:function(){return!1}},{key:"setOptions",value:function(s){this.options=s,this.from=this.body.nodes[this.options.from],this.to=this.body.nodes[this.options.to],this.id=this.options.id}},{key:"drawLine",value:function(s,f,e,t,n){s.strokeStyle=this.getColor(s,f,e,t),s.lineWidth=f.width,f.dashes!==!1?this._drawDashedLine(s,f,n):this._drawLine(s,f,n)}},{key:"_drawLine",value:function(s,f,e,t,n){if(this.from!=this.to)this._line(s,f,e,t,n);else{var i=this._getCircleData(s),r=(0,p.default)(i,3),l=r[0],d=r[1],a=r[2];this._circle(s,f,l,d,a)}}},{key:"_drawDashedLine",value:function(s,f,e,t,n){s.lineCap="round";var i=[5,5];if(Array.isArray(f.dashes)===!0&&(i=f.dashes),s.setLineDash!==void 0){if(s.save(),s.setLineDash(i),s.lineDashOffset=0,this.from!=this.to)this._line(s,f,e);else{var r=this._getCircleData(s),l=(0,p.default)(r,3),d=l[0],a=l[1],v=l[2];this._circle(s,f,d,a,v)}s.setLineDash([0]),s.lineDashOffset=0,s.restore()}else{if(this.from!=this.to)s.dashedLine(this.from.x,this.from.y,this.to.x,this.to.y,i);else{var y=this._getCircleData(s),b=(0,p.default)(y,3),P=b[0],D=b[1],O=b[2];this._circle(s,f,P,D,O)}this.enableShadow(s,f),s.stroke(),this.disableShadow(s,f)}}},{key:"findBorderPosition",value:function(s,f,e){return this.from!=this.to?this._findBorderPosition(s,f,e):this._findBorderPositionCircle(s,f,e)}},{key:"findBorderPositions",value:function(s){var f={},e={};if(this.from!=this.to)f=this._findBorderPosition(this.from,s),e=this._findBorderPosition(this.to,s);else{var t=this._getCircleData(s).slice(0,2),n=(0,p.default)(t,2),i=n[0],r=n[1];f=this._findBorderPositionCircle(this.from,s,{x:i,y:r,low:.25,high:.6,direction:-1}),e=this._findBorderPositionCircle(this.from,s,{x:i,y:r,low:.6,high:.8,direction:1})}return{from:f,to:e}}},{key:"_getCircleData",value:function(s){var f=void 0,e=void 0,t=this.from,n=this.options.selfReferenceSize;return s!==void 0&&t.shape.width===void 0&&t.shape.resize(s),t.shape.width>t.shape.height?(f=t.x+t.shape.width*.5,e=t.y-n):(f=t.x+n,e=t.y-t.shape.height*.5),[f,e,n]}},{key:"_pointOnCircle",value:function(s,f,e,t){var n=t*2*Math.PI;return{x:s+e*Math.cos(n),y:f-e*Math.sin(n)}}},{key:"_findBorderPositionCircle",value:function(s,f,e){for(var t=e.x,n=e.y,i=e.low,r=e.high,l=e.direction,d=10,a=0,v=this.options.selfReferenceSize,y=void 0,b=void 0,P=void 0,D=void 0,O=void 0,E=.05,A=(i+r)*.5;i<=r&&a<d&&(A=(i+r)*.5,y=this._pointOnCircle(t,n,v,A),b=Math.atan2(s.y-y.y,s.x-y.x),P=s.distanceToBorder(f,b),D=Math.sqrt(Math.pow(y.x-s.x,2)+Math.pow(y.y-s.y,2)),O=P-D,!(Math.abs(O)<E));)O>0?l>0?i=A:r=A:l>0?r=A:i=A,a++;return y.t=A,y}},{key:"getLineWidth",value:function(s,f){return s===!0?Math.max(this.selectionWidth,.3/this.body.view.scale):f===!0?Math.max(this.hoverWidth,.3/this.body.view.scale):Math.max(this.options.width,.3/this.body.view.scale)}},{key:"getColor",value:function(s,f,e,t){if(f.inheritsColor!==!1){if(f.inheritsColor==="both"&&this.from.id!==this.to.id){var n=s.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),i=void 0,r=void 0;return i=this.from.options.color.highlight.border,r=this.to.options.color.highlight.border,this.from.selected===!1&&this.to.selected===!1?(i=R.overrideOpacity(this.from.options.color.border,f.opacity),r=R.overrideOpacity(this.to.options.color.border,f.opacity)):this.from.selected===!0&&this.to.selected===!1?r=this.to.options.color.border:this.from.selected===!1&&this.to.selected===!0&&(i=this.from.options.color.border),n.addColorStop(0,i),n.addColorStop(1,r),n}return f.inheritsColor==="to"?R.overrideOpacity(this.to.options.color.border,f.opacity):R.overrideOpacity(this.from.options.color.border,f.opacity)}else return R.overrideOpacity(f.color,f.opacity)}},{key:"_circle",value:function(s,f,e,t,n){this.enableShadow(s,f),s.beginPath(),s.arc(e,t,n,0,2*Math.PI,!1),s.stroke(),this.disableShadow(s,f)}},{key:"getDistanceToEdge",value:function(s,f,e,t,n,i,r,l){var d=0;if(this.from!=this.to)d=this._getDistanceToEdge(s,f,e,t,n,i,r);else{var a=this._getCircleData(void 0),v=(0,p.default)(a,3),y=v[0],b=v[1],P=v[2],D=y-n,O=b-i;d=Math.abs(Math.sqrt(D*D+O*O)-P)}return d}},{key:"_getDistanceToLine",value:function(s,f,e,t,n,i){var r=e-s,l=t-f,d=r*r+l*l,a=((n-s)*r+(i-f)*l)/d;a>1?a=1:a<0&&(a=0);var v=s+a*r,y=f+a*l,b=v-n,P=y-i;return Math.sqrt(b*b+P*P)}},{key:"getArrowData",value:function(s,f,e,t,n,i){var r=void 0,l=void 0,d=void 0,a=void 0,v=void 0,y=void 0,b=void 0,P=i.width;if(f==="from"?(d=this.from,a=this.to,v=.1,y=i.fromArrowScale,b=i.fromArrowType):f==="to"?(d=this.to,a=this.from,v=-.1,y=i.toArrowScale,b=i.toArrowType):(d=this.to,a=this.from,y=i.middleArrowScale,b=i.middleArrowType),d!=a)if(f!=="middle")if(this.options.smooth.enabled===!0){l=this.findBorderPosition(d,s,{via:e});var D=this.getPoint(Math.max(0,Math.min(1,l.t+v)),e);r=Math.atan2(l.y-D.y,l.x-D.x)}else r=Math.atan2(d.y-a.y,d.x-a.x),l=this.findBorderPosition(d,s);else r=Math.atan2(d.y-a.y,d.x-a.x),l=this.getPoint(.5,e);else{var O=this._getCircleData(s),E=(0,p.default)(O,3),A=E[0],Y=E[1],X=E[2];f==="from"?(l=this.findBorderPosition(this.from,s,{x:A,y:Y,low:.25,high:.6,direction:-1}),r=l.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI):f==="to"?(l=this.findBorderPosition(this.from,s,{x:A,y:Y,low:.6,high:1,direction:1}),r=l.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI):(l=this._pointOnCircle(A,Y,X,.175),r=3.9269908169872414)}f==="middle"&&y<0&&(P*=-1);var U=15*y+3*P,Z=l.x-U*.9*Math.cos(r),re=l.y-U*.9*Math.sin(r),le={x:Z,y:re};return{point:l,core:le,angle:r,length:U,type:b}}},{key:"drawArrowHead",value:function(s,f,e,t,n){s.strokeStyle=this.getColor(s,f,e,t),s.fillStyle=s.strokeStyle,s.lineWidth=f.width,C.draw(s,n),this.enableShadow(s,f),s.fill(),this.disableShadow(s,f)}},{key:"enableShadow",value:function(s,f){f.shadow===!0&&(s.shadowColor=f.shadowColor,s.shadowBlur=f.shadowSize,s.shadowOffsetX=f.shadowX,s.shadowOffsetY=f.shadowY)}},{key:"disableShadow",value:function(s,f){f.shadow===!0&&(s.shadowColor="rgba(0,0,0,0)",s.shadowBlur=0,s.shadowOffsetX=0,s.shadowOffsetY=0)}},{key:"drawBackground",value:function(s,f){if(f.background!==!1){var e=["strokeStyle","lineWidth","dashes"],t={};e.forEach(function(n){t[n]=s[n]}),s.strokeStyle=f.backgroundColor,s.lineWidth=f.backgroundSize,this.setStrokeDashed(s,f.backgroundDashes),s.stroke(),e.forEach(function(n){s[n]=t[n]}),this.setStrokeDashed(s,f.dashes)}}},{key:"setStrokeDashed",value:function(s,f){if(f!==!1)if(s.setLineDash!==void 0){var e=[5,5];Array.isArray(f)===!0&&(e=f),s.setLineDash(e)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else s.setLineDash!==void 0?s.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}]),c}();k.default=m},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=c(w),S=h(4),M=c(S),x=h(5),I=c(x),T=h(0),R=c(T),C=h(1),m=c(C);function c(b){return b&&b.__esModule?b:{default:b}}var u=function(){function b(){(0,R.default)(this,b)}return(0,m.default)(b,null,[{key:"transform",value:function(D,O){D instanceof Array||(D=[D]);for(var E=O.point.x,A=O.point.y,Y=O.angle,X=O.length,U=0;U<D.length;++U){var Z=D[U],re=Z.x*Math.cos(Y)-Z.y*Math.sin(Y),le=Z.x*Math.sin(Y)+Z.y*Math.cos(Y);Z.x=E+X*re,Z.y=A+X*le}}},{key:"drawPath",value:function(D,O){D.beginPath(),D.moveTo(O[0].x,O[0].y);for(var E=1;E<O.length;++E)D.lineTo(O[E].x,O[E].y);D.closePath()}}]),b}(),s=function(b){(0,I.default)(P,b);function P(){return(0,R.default)(this,P),(0,M.default)(this,(P.__proto__||(0,p.default)(P)).apply(this,arguments))}return(0,m.default)(P,null,[{key:"draw",value:function(O,E){var A=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];u.transform(A,E),u.drawPath(O,A)}}]),P}(u),f=function(){function b(){(0,R.default)(this,b)}return(0,m.default)(b,null,[{key:"draw",value:function(D,O){var E=[{x:-1,y:0},{x:0,y:.3},{x:-.4,y:0},{x:0,y:-.3}];u.transform(E,O),u.drawPath(D,E)}}]),b}(),e=function(){function b(){(0,R.default)(this,b)}return(0,m.default)(b,null,[{key:"draw",value:function(D,O){var E={x:-.4,y:0};u.transform(E,O),D.strokeStyle=D.fillStyle,D.fillStyle="rgba(0, 0, 0, 0)";var A=Math.PI,Y=O.angle-A/2,X=O.angle+A/2;D.beginPath(),D.arc(E.x,E.y,O.length*.4,Y,X,!1),D.stroke()}}]),b}(),t=function(){function b(){(0,R.default)(this,b)}return(0,m.default)(b,null,[{key:"draw",value:function(D,O){var E={x:-.3,y:0};u.transform(E,O),D.strokeStyle=D.fillStyle,D.fillStyle="rgba(0, 0, 0, 0)";var A=Math.PI,Y=O.angle+A/2,X=O.angle+3*A/2;D.beginPath(),D.arc(E.x,E.y,O.length*.4,Y,X,!1),D.stroke()}}]),b}(),n=function(){function b(){(0,R.default)(this,b)}return(0,m.default)(b,null,[{key:"draw",value:function(D,O){var E=[{x:.02,y:0},{x:-1,y:.3},{x:-1,y:-.3}];u.transform(E,O),u.drawPath(D,E)}}]),b}(),i=function(){function b(){(0,R.default)(this,b)}return(0,m.default)(b,null,[{key:"draw",value:function(D,O){var E=[{x:0,y:.3},{x:0,y:-.3},{x:-1,y:0}];u.transform(E,O),u.drawPath(D,E)}}]),b}(),r=function(){function b(){(0,R.default)(this,b)}return(0,m.default)(b,null,[{key:"draw",value:function(D,O){var E={x:-.4,y:0};u.transform(E,O),D.circle(E.x,E.y,O.length*.4)}}]),b}(),l=function(){function b(){(0,R.default)(this,b)}return(0,m.default)(b,null,[{key:"draw",value:function(D,O){var E=[{x:0,y:.5},{x:0,y:-.5},{x:-.15,y:-.5},{x:-.15,y:.5}];u.transform(E,O),u.drawPath(D,E)}}]),b}(),d=function(){function b(){(0,R.default)(this,b)}return(0,m.default)(b,null,[{key:"draw",value:function(D,O){var E=[{x:0,y:.3},{x:0,y:-.3},{x:-.6,y:-.3},{x:-.6,y:.3}];u.transform(E,O),u.drawPath(D,E)}}]),b}(),a=function(){function b(){(0,R.default)(this,b)}return(0,m.default)(b,null,[{key:"draw",value:function(D,O){var E=[{x:0,y:0},{x:-.5,y:-.3},{x:-1,y:0},{x:-.5,y:.3}];u.transform(E,O),u.drawPath(D,E)}}]),b}(),v=function(){function b(){(0,R.default)(this,b)}return(0,m.default)(b,null,[{key:"draw",value:function(D,O){var E=[{x:-1,y:.3},{x:-.5,y:0},{x:-1,y:-.3},{x:0,y:0}];u.transform(E,O),u.drawPath(D,E)}}]),b}(),y=function(){function b(){(0,R.default)(this,b)}return(0,m.default)(b,null,[{key:"draw",value:function(D,O){var E;switch(O.type&&(E=O.type.toLowerCase()),E){case"circle":r.draw(D,O);break;case"box":d.draw(D,O);break;case"crow":f.draw(D,O);break;case"curve":e.draw(D,O);break;case"diamond":a.draw(D,O);break;case"inv_curve":t.draw(D,O);break;case"triangle":n.draw(D,O);break;case"inv_triangle":i.draw(D,O);break;case"bar":l.draw(D,O);break;case"vee":v.draw(D,O);break;case"arrow":default:s.draw(D,O)}}}]),b}();k.default=y},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(0),p=x(w),S=h(1),M=x(S);function x(T){return T&&T.__esModule?T:{default:T}}var I=function(){function T(R,C,m){(0,p.default)(this,T),this.body=R,this.physicsBody=C,this.barnesHutTree,this.setOptions(m),this.randomSeed=5}return(0,M.default)(T,[{key:"setOptions",value:function(C){this.options=C,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}},{key:"seededRandom",value:function(){var C=Math.sin(this.randomSeed++)*1e4;return C-Math.floor(C)}},{key:"solve",value:function(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){var C=void 0,m=this.body.nodes,c=this.physicsBody.physicsNodeIndices,u=c.length,s=this._formBarnesHutTree(m,c);this.barnesHutTree=s;for(var f=0;f<u;f++)C=m[c[f]],C.options.mass>0&&this._getForceContributions(s.root,C)}}},{key:"_getForceContributions",value:function(C,m){this._getForceContribution(C.children.NW,m),this._getForceContribution(C.children.NE,m),this._getForceContribution(C.children.SW,m),this._getForceContribution(C.children.SE,m)}},{key:"_getForceContribution",value:function(C,m){if(C.childrenCount>0){var c=void 0,u=void 0,s=void 0;c=C.centerOfMass.x-m.x,u=C.centerOfMass.y-m.y,s=Math.sqrt(c*c+u*u),s*C.calcSize>this.thetaInversed?this._calculateForces(s,c,u,m,C):C.childrenCount===4?this._getForceContributions(C,m):C.children.data.id!=m.id&&this._calculateForces(s,c,u,m,C)}}},{key:"_calculateForces",value:function(C,m,c,u,s){C===0&&(C=.1,m=C),this.overlapAvoidanceFactor<1&&u.shape.radius&&(C=Math.max(.1+this.overlapAvoidanceFactor*u.shape.radius,C-u.shape.radius));var f=this.options.gravitationalConstant*s.mass*u.options.mass/Math.pow(C,3),e=m*f,t=c*f;this.physicsBody.forces[u.id].x+=e,this.physicsBody.forces[u.id].y+=t}},{key:"_formBarnesHutTree",value:function(C,m){for(var c=void 0,u=m.length,s=C[m[0]].x,f=C[m[0]].y,e=C[m[0]].x,t=C[m[0]].y,n=1;n<u;n++){var i=C[m[n]],r=i.x,l=i.y;i.options.mass>0&&(r<s&&(s=r),r>e&&(e=r),l<f&&(f=l),l>t&&(t=l))}var d=Math.abs(e-s)-Math.abs(t-f);d>0?(f-=.5*d,t+=.5*d):(s+=.5*d,e-=.5*d);var a=1e-5,v=Math.max(a,Math.abs(e-s)),y=.5*v,b=.5*(s+e),P=.5*(f+t),D={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:b-y,maxX:b+y,minY:P-y,maxY:P+y},size:v,calcSize:1/v,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(D.root);for(var O=0;O<u;O++)c=C[m[O]],c.options.mass>0&&this._placeInTree(D.root,c);return D}},{key:"_updateBranchMass",value:function(C,m){var c=C.centerOfMass,u=C.mass+m.options.mass,s=1/u;c.x=c.x*C.mass+m.x*m.options.mass,c.x*=s,c.y=c.y*C.mass+m.y*m.options.mass,c.y*=s,C.mass=u;var f=Math.max(Math.max(m.height,m.radius),m.width);C.maxWidth=C.maxWidth<f?f:C.maxWidth}},{key:"_placeInTree",value:function(C,m,c){(c!=!0||c===void 0)&&this._updateBranchMass(C,m);var u=C.children.NW.range,s=void 0;u.maxX>m.x?u.maxY>m.y?s="NW":s="SW":u.maxY>m.y?s="NE":s="SE",this._placeInRegion(C,m,s)}},{key:"_placeInRegion",value:function(C,m,c){var u=C.children[c];switch(u.childrenCount){case 0:u.children.data=m,u.childrenCount=1,this._updateBranchMass(u,m);break;case 1:u.children.data.x===m.x&&u.children.data.y===m.y?(m.x+=this.seededRandom(),m.y+=this.seededRandom()):(this._splitBranch(u),this._placeInTree(u,m));break;case 4:this._placeInTree(u,m);break}}},{key:"_splitBranch",value:function(C){var m=null;C.childrenCount===1&&(m=C.children.data,C.mass=0,C.centerOfMass.x=0,C.centerOfMass.y=0),C.childrenCount=4,C.children.data=null,this._insertRegion(C,"NW"),this._insertRegion(C,"NE"),this._insertRegion(C,"SW"),this._insertRegion(C,"SE"),m!=null&&this._placeInTree(C,m)}},{key:"_insertRegion",value:function(C,m){var c=void 0,u=void 0,s=void 0,f=void 0,e=.5*C.size;switch(m){case"NW":c=C.range.minX,u=C.range.minX+e,s=C.range.minY,f=C.range.minY+e;break;case"NE":c=C.range.minX+e,u=C.range.maxX,s=C.range.minY,f=C.range.minY+e;break;case"SW":c=C.range.minX,u=C.range.minX+e,s=C.range.minY+e,f=C.range.maxY;break;case"SE":c=C.range.minX+e,u=C.range.maxX,s=C.range.minY+e,f=C.range.maxY;break}C.children[m]={centerOfMass:{x:0,y:0},mass:0,range:{minX:c,maxX:u,minY:s,maxY:f},size:.5*C.size,calcSize:2*C.calcSize,children:{data:null},maxWidth:0,level:C.level+1,childrenCount:0}}},{key:"_debug",value:function(C,m){this.barnesHutTree!==void 0&&(C.lineWidth=1,this._drawBranch(this.barnesHutTree.root,C,m))}},{key:"_drawBranch",value:function(C,m,c){c===void 0&&(c="#FF0000"),C.childrenCount===4&&(this._drawBranch(C.children.NW,m),this._drawBranch(C.children.NE,m),this._drawBranch(C.children.SE,m),this._drawBranch(C.children.SW,m)),m.strokeStyle=c,m.beginPath(),m.moveTo(C.range.minX,C.range.minY),m.lineTo(C.range.maxX,C.range.minY),m.stroke(),m.beginPath(),m.moveTo(C.range.maxX,C.range.minY),m.lineTo(C.range.maxX,C.range.maxY),m.stroke(),m.beginPath(),m.moveTo(C.range.maxX,C.range.maxY),m.lineTo(C.range.minX,C.range.maxY),m.stroke(),m.beginPath(),m.moveTo(C.range.minX,C.range.maxY),m.lineTo(C.range.minX,C.range.minY),m.stroke()}}]),T}();k.default=I},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(0),p=x(w),S=h(1),M=x(S);function x(T){return T&&T.__esModule?T:{default:T}}var I=function(){function T(R,C,m){(0,p.default)(this,T),this.body=R,this.physicsBody=C,this.setOptions(m)}return(0,M.default)(T,[{key:"setOptions",value:function(C){this.options=C}},{key:"solve",value:function(){for(var C=void 0,m=void 0,c=void 0,u=void 0,s=this.body.nodes,f=this.physicsBody.physicsNodeIndices,e=this.physicsBody.forces,t=0;t<f.length;t++){var n=f[t];u=s[n],C=-u.x,m=-u.y,c=Math.sqrt(C*C+m*m),this._calculateForces(c,C,m,e,u)}}},{key:"_calculateForces",value:function(C,m,c,u,s){var f=C===0?0:this.options.centralGravity/C;u[s.id].x=m*f,u[s.id].y=c*f}}]),T}();k.default=I},function(L,k,h){L.exports=h(188)},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w="string",p="boolean",S="number",M="array",x="object",I="dom",T="any",R=["arrow","circle","bar"],C={configure:{enabled:{boolean:p},filter:{boolean:p,string:w,array:M,function:"function"},container:{dom:I},showButton:{boolean:p},__type__:{object:x,boolean:p,string:w,array:M,function:"function"}},edges:{arrows:{to:{enabled:{boolean:p},scaleFactor:{number:S},type:{string:R},__type__:{object:x,boolean:p}},middle:{enabled:{boolean:p},scaleFactor:{number:S},type:{string:R},__type__:{object:x,boolean:p}},from:{enabled:{boolean:p},scaleFactor:{number:S},type:{string:R},__type__:{object:x,boolean:p}},__type__:{string:["from","to","middle"],object:x}},arrowStrikethrough:{boolean:p},background:{enabled:{boolean:p},color:{string:w},size:{number:S},dashes:{boolean:p,array:M},__type__:{object:x,boolean:p}},chosen:{label:{boolean:p,function:"function"},edge:{boolean:p,function:"function"},__type__:{object:x,boolean:p}},color:{color:{string:w},highlight:{string:w},hover:{string:w},inherit:{string:["from","to","both"],boolean:p},opacity:{number:S},__type__:{object:x,string:w}},dashes:{boolean:p,array:M},font:{color:{string:w},size:{number:S},face:{string:w},background:{string:w},strokeWidth:{number:S},strokeColor:{string:w},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:S},multi:{boolean:p,string:w},bold:{color:{string:w},size:{number:S},face:{string:w},mod:{string:w},vadjust:{number:S},__type__:{object:x,string:w}},boldital:{color:{string:w},size:{number:S},face:{string:w},mod:{string:w},vadjust:{number:S},__type__:{object:x,string:w}},ital:{color:{string:w},size:{number:S},face:{string:w},mod:{string:w},vadjust:{number:S},__type__:{object:x,string:w}},mono:{color:{string:w},size:{number:S},face:{string:w},mod:{string:w},vadjust:{number:S},__type__:{object:x,string:w}},__type__:{object:x,string:w}},hidden:{boolean:p},hoverWidth:{function:"function",number:S},label:{string:w,undefined:"undefined"},labelHighlightBold:{boolean:p},length:{number:S,undefined:"undefined"},physics:{boolean:p},scaling:{min:{number:S},max:{number:S},label:{enabled:{boolean:p},min:{number:S},max:{number:S},maxVisible:{number:S},drawThreshold:{number:S},__type__:{object:x,boolean:p}},customScalingFunction:{function:"function"},__type__:{object:x}},selectionWidth:{function:"function",number:S},selfReferenceSize:{number:S},shadow:{enabled:{boolean:p},color:{string:w},size:{number:S},x:{number:S},y:{number:S},__type__:{object:x,boolean:p}},smooth:{enabled:{boolean:p},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:S},forceDirection:{string:["horizontal","vertical","none"],boolean:p},__type__:{object:x,boolean:p}},title:{string:w,undefined:"undefined"},width:{number:S},widthConstraint:{maximum:{number:S},__type__:{object:x,boolean:p,number:S}},value:{number:S,undefined:"undefined"},__type__:{object:x}},groups:{useDefaultGroups:{boolean:p},__any__:"get from nodes, will be overwritten below",__type__:{object:x}},interaction:{dragNodes:{boolean:p},dragView:{boolean:p},hideEdgesOnDrag:{boolean:p},hideEdgesOnZoom:{boolean:p},hideNodesOnDrag:{boolean:p},hover:{boolean:p},keyboard:{enabled:{boolean:p},speed:{x:{number:S},y:{number:S},zoom:{number:S},__type__:{object:x}},bindToWindow:{boolean:p},__type__:{object:x,boolean:p}},multiselect:{boolean:p},navigationButtons:{boolean:p},selectable:{boolean:p},selectConnectedEdges:{boolean:p},hoverConnectedEdges:{boolean:p},tooltipDelay:{number:S},zoomView:{boolean:p},zoomSpeed:{number:S},__type__:{object:x}},layout:{randomSeed:{undefined:"undefined",number:S},improvedLayout:{boolean:p},hierarchical:{enabled:{boolean:p},levelSeparation:{number:S},nodeSpacing:{number:S},treeSpacing:{number:S},blockShifting:{boolean:p},edgeMinimization:{boolean:p},parentCentralization:{boolean:p},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},__type__:{object:x,boolean:p}},__type__:{object:x}},manipulation:{enabled:{boolean:p},initiallyActive:{boolean:p},addNode:{boolean:p,function:"function"},addEdge:{boolean:p,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:x,boolean:p,function:"function"}},deleteNode:{boolean:p,function:"function"},deleteEdge:{boolean:p,function:"function"},controlNodeStyle:"get from nodes, will be overwritten below",__type__:{object:x,boolean:p}},nodes:{borderWidth:{number:S},borderWidthSelected:{number:S,undefined:"undefined"},brokenImage:{string:w,undefined:"undefined"},chosen:{label:{boolean:p,function:"function"},node:{boolean:p,function:"function"},__type__:{object:x,boolean:p}},color:{border:{string:w},background:{string:w},highlight:{border:{string:w},background:{string:w},__type__:{object:x,string:w}},hover:{border:{string:w},background:{string:w},__type__:{object:x,string:w}},__type__:{object:x,string:w}},fixed:{x:{boolean:p},y:{boolean:p},__type__:{object:x,boolean:p}},font:{align:{string:w},color:{string:w},size:{number:S},face:{string:w},background:{string:w},strokeWidth:{number:S},strokeColor:{string:w},vadjust:{number:S},multi:{boolean:p,string:w},bold:{color:{string:w},size:{number:S},face:{string:w},mod:{string:w},vadjust:{number:S},__type__:{object:x,string:w}},boldital:{color:{string:w},size:{number:S},face:{string:w},mod:{string:w},vadjust:{number:S},__type__:{object:x,string:w}},ital:{color:{string:w},size:{number:S},face:{string:w},mod:{string:w},vadjust:{number:S},__type__:{object:x,string:w}},mono:{color:{string:w},size:{number:S},face:{string:w},mod:{string:w},vadjust:{number:S},__type__:{object:x,string:w}},__type__:{object:x,string:w}},group:{string:w,number:S,undefined:"undefined"},heightConstraint:{minimum:{number:S},valign:{string:w},__type__:{object:x,boolean:p,number:S}},hidden:{boolean:p},icon:{face:{string:w},code:{string:w},size:{number:S},color:{string:w},__type__:{object:x}},id:{string:w,number:S},image:{selected:{string:w,undefined:"undefined"},unselected:{string:w,undefined:"undefined"},__type__:{object:x,string:w}},label:{string:w,undefined:"undefined"},labelHighlightBold:{boolean:p},level:{number:S,undefined:"undefined"},margin:{top:{number:S},right:{number:S},bottom:{number:S},left:{number:S},__type__:{object:x,number:S}},mass:{number:S},physics:{boolean:p},scaling:{min:{number:S},max:{number:S},label:{enabled:{boolean:p},min:{number:S},max:{number:S},maxVisible:{number:S},drawThreshold:{number:S},__type__:{object:x,boolean:p}},customScalingFunction:{function:"function"},__type__:{object:x}},shadow:{enabled:{boolean:p},color:{string:w},size:{number:S},x:{number:S},y:{number:S},__type__:{object:x,boolean:p}},shape:{string:["ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},shapeProperties:{borderDashes:{boolean:p,array:M},borderRadius:{number:S},interpolation:{boolean:p},useImageSize:{boolean:p},useBorderWithImage:{boolean:p},__type__:{object:x}},size:{number:S},title:{string:w,dom:I,undefined:"undefined"},value:{number:S,undefined:"undefined"},widthConstraint:{minimum:{number:S},maximum:{number:S},__type__:{object:x,boolean:p,number:S}},x:{number:S},y:{number:S},__type__:{object:x}},physics:{enabled:{boolean:p},barnesHut:{gravitationalConstant:{number:S},centralGravity:{number:S},springLength:{number:S},springConstant:{number:S},damping:{number:S},avoidOverlap:{number:S},__type__:{object:x}},forceAtlas2Based:{gravitationalConstant:{number:S},centralGravity:{number:S},springLength:{number:S},springConstant:{number:S},damping:{number:S},avoidOverlap:{number:S},__type__:{object:x}},repulsion:{centralGravity:{number:S},springLength:{number:S},springConstant:{number:S},nodeDistance:{number:S},damping:{number:S},__type__:{object:x}},hierarchicalRepulsion:{centralGravity:{number:S},springLength:{number:S},springConstant:{number:S},nodeDistance:{number:S},damping:{number:S},__type__:{object:x}},maxVelocity:{number:S},minVelocity:{number:S},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:p},iterations:{number:S},updateInterval:{number:S},onlyDynamicEdges:{boolean:p},fit:{boolean:p},__type__:{object:x,boolean:p}},timestep:{number:S},adaptiveTimestep:{boolean:p},__type__:{object:x,boolean:p}},autoResize:{boolean:p},clickToUse:{boolean:p},locale:{string:w},locales:{__any__:{any:T},__type__:{object:x}},height:{string:w},width:{string:w},__type__:{object:x}};C.groups.__any__=C.nodes,C.manipulation.controlNodeStyle=C.nodes;var m={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown","hexagon"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0,zoomSpeed:1},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01]}};k.allOptions=C,k.configureOptions=m},function(L,k,h){"use strict";var w=h(2);w.extend(k,h(121))},function(L,k,h){h(37),h(47),L.exports=h(98)},function(L,k,h){"use strict";var w=h(88),p=h(89),S=h(25),M=h(18);L.exports=h(60)(Array,"Array",function(x,I){this._t=M(x),this._i=0,this._k=I},function(){var x=this._t,I=this._k,T=this._i++;return!x||T>=x.length?(this._t=void 0,p(1)):I=="keys"?p(0,T):I=="values"?p(0,x[T]):p(0,[T,x[T]])},"values"),S.Arguments=S.Array,w("keys"),w("values"),w("entries")},function(L,k){L.exports=function(){}},function(L,k){L.exports=function(h,w){return{value:w,done:!!h}}},function(L,k){L.exports=function(h){if(typeof h!="function")throw TypeError(h+" is not a function!");return h}},function(L,k,h){"use strict";var w=h(41),p=h(28),S=h(46),M={};h(19)(M,h(8)("iterator"),function(){return this}),L.exports=function(x,I,T){x.prototype=w(M,{next:p(1,T)}),S(x,I+" Iterator")}},function(L,k,h){var w=h(12),p=h(20),S=h(26);L.exports=h(13)?Object.defineProperties:function(x,I){p(x);for(var T=S(I),R=T.length,C=0,m;R>C;)w.f(x,m=T[C++],I[m]);return x}},function(L,k,h){var w=h(18),p=h(94),S=h(95);L.exports=function(M){return function(x,I,T){var R=w(x),C=p(R.length),m=S(T,C),c;if(M&&I!=I){for(;C>m;)if(c=R[m++],c!=c)return!0}else for(;C>m;m++)if((M||m in R)&&R[m]===I)return M||m||0;return!M&&-1}}},function(L,k,h){var w=h(42),p=Math.min;L.exports=function(S){return S>0?p(w(S),9007199254740991):0}},function(L,k,h){var w=h(42),p=Math.max,S=Math.min;L.exports=function(M,x){return M=w(M),M<0?p(M+x,0):S(M,x)}},function(L,k,h){var w=h(10).document;L.exports=w&&w.documentElement},function(L,k,h){var w=h(42),p=h(39);L.exports=function(S){return function(M,x){var I=String(p(M)),T=w(x),R=I.length,C,m;return T<0||T>=R?S?"":void 0:(C=I.charCodeAt(T),C<55296||C>56319||T+1===R||(m=I.charCodeAt(T+1))<56320||m>57343?S?I.charAt(T):C:S?I.slice(T,T+2):(C-55296<<10)+(m-56320)+65536)}}},function(L,k,h){var w=h(20),p=h(99);L.exports=h(6).getIterator=function(S){var M=p(S);if(typeof M!="function")throw TypeError(S+" is not iterable!");return w(M.call(S))}},function(L,k,h){var w=h(67),p=h(8)("iterator"),S=h(25);L.exports=h(6).getIteratorMethod=function(M){if(M!=null)return M[p]||M["@@iterator"]||S[w(M)]}},function(L,k,h){h(101);var w=h(6).Object;L.exports=function(S,M){return w.create(S,M)}},function(L,k,h){var w=h(11);w(w.S,"Object",{create:h(41)})},function(L,k,h){h(103),L.exports=h(6).Object.keys},function(L,k,h){var w=h(30),p=h(26);h(68)("keys",function(){return function(M){return p(w(M))}})},function(L,k,h){L.exports={default:h(105),__esModule:!0}},function(L,k,h){h(47),h(37),L.exports=h(48).f("iterator")},function(L,k,h){L.exports={default:h(107),__esModule:!0}},function(L,k,h){h(108),h(113),h(114),h(115),L.exports=h(6).Symbol},function(L,k,h){"use strict";var w=h(10),p=h(14),S=h(13),M=h(11),x=h(64),I=h(109).KEY,T=h(22),R=h(44),C=h(46),m=h(29),c=h(8),u=h(48),s=h(49),f=h(110),e=h(111),t=h(20),n=h(21),i=h(18),r=h(40),l=h(28),d=h(41),a=h(112),v=h(70),y=h(12),b=h(26),P=v.f,D=y.f,O=a.f,E=w.Symbol,A=w.JSON,Y=A&&A.stringify,X="prototype",U=c("_hidden"),Z=c("toPrimitive"),re={}.propertyIsEnumerable,le=R("symbol-registry"),he=R("symbols"),ce=R("op-symbols"),se=Object[X],G=typeof E=="function",V=w.QObject,Q=!V||!V[X]||!V[X].findChild,K=S&&T(function(){return d(D({},"a",{get:function(){return D(this,"a",{value:7}).a}})).a!=7})?function(ve,ie,ae){var ge=P(se,ie);ge&&delete se[ie],D(ve,ie,ae),ge&&ve!==se&&D(se,ie,ge)}:D,J=function(ve){var ie=he[ve]=d(E[X]);return ie._k=ve,ie},_=G&&typeof E.iterator=="symbol"?function(ve){return typeof ve=="symbol"}:function(ve){return ve instanceof E},ee=function(ie,ae,ge){return ie===se&&ee(ce,ae,ge),t(ie),ae=r(ae,!0),t(ge),p(he,ae)?(ge.enumerable?(p(ie,U)&&ie[U][ae]&&(ie[U][ae]=!1),ge=d(ge,{enumerable:l(0,!1)})):(p(ie,U)||D(ie,U,l(1,{})),ie[U][ae]=!0),K(ie,ae,ge)):D(ie,ae,ge)},ue=function(ie,ae){t(ie);for(var ge=f(ae=i(ae)),be=0,de=ge.length,Re;de>be;)ee(ie,Re=ge[be++],ae[Re]);return ie},pe=function(ie,ae){return ae===void 0?d(ie):ue(d(ie),ae)},Te=function(ie){var ae=re.call(this,ie=r(ie,!0));return this===se&&p(he,ie)&&!p(ce,ie)?!1:ae||!p(this,ie)||!p(he,ie)||p(this,U)&&this[U][ie]?ae:!0},Ee=function(ie,ae){if(ie=i(ie),ae=r(ae,!0),!(ie===se&&p(he,ae)&&!p(ce,ae))){var ge=P(ie,ae);return ge&&p(he,ae)&&!(p(ie,U)&&ie[U][ae])&&(ge.enumerable=!0),ge}},ke=function(ie){for(var ae=O(i(ie)),ge=[],be=0,de;ae.length>be;)!p(he,de=ae[be++])&&de!=U&&de!=I&&ge.push(de);return ge},Me=function(ie){for(var ae=ie===se,ge=O(ae?ce:i(ie)),be=[],de=0,Re;ge.length>de;)p(he,Re=ge[de++])&&(!ae||p(se,Re))&&be.push(he[Re]);return be};G||(E=function(){if(this instanceof E)throw TypeError("Symbol is not a constructor!");var ie=m(arguments.length>0?arguments[0]:void 0),ae=function(ge){this===se&&ae.call(ce,ge),p(this,U)&&p(this[U],ie)&&(this[U][ie]=!1),K(this,ie,l(1,ge))};return S&&Q&&K(se,ie,{configurable:!0,set:ae}),J(ie)},x(E[X],"toString",function(){return this._k}),v.f=Ee,y.f=ee,h(69).f=a.f=ke,h(32).f=Te,h(50).f=Me,S&&!h(27)&&x(se,"propertyIsEnumerable",Te,!0),u.f=function(ve){return J(c(ve))}),M(M.G+M.W+M.F*!G,{Symbol:E});for(var Ie="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Ye=0;Ie.length>Ye;)c(Ie[Ye++]);for(var Se=b(c.store),je=0;Se.length>je;)s(Se[je++]);M(M.S+M.F*!G,"Symbol",{for:function(ve){return p(le,ve+="")?le[ve]:le[ve]=E(ve)},keyFor:function(ie){if(!_(ie))throw TypeError(ie+" is not a symbol!");for(var ae in le)if(le[ae]===ie)return ae},useSetter:function(){Q=!0},useSimple:function(){Q=!1}}),M(M.S+M.F*!G,"Object",{create:pe,defineProperty:ee,defineProperties:ue,getOwnPropertyDescriptor:Ee,getOwnPropertyNames:ke,getOwnPropertySymbols:Me}),A&&M(M.S+M.F*(!G||T(function(){var ve=E();return Y([ve])!="[null]"||Y({a:ve})!="{}"||Y(Object(ve))!="{}"})),"JSON",{stringify:function(ie){for(var ae=[ie],ge=1,be,de;arguments.length>ge;)ae.push(arguments[ge++]);if(de=be=ae[1],!(!n(be)&&ie===void 0||_(ie)))return e(be)||(be=function(Re,Be){if(typeof de=="function"&&(Be=de.call(this,Re,Be)),!_(Be))return Be}),ae[1]=be,Y.apply(A,ae)}}),E[X][Z]||h(19)(E[X],Z,E[X].valueOf),C(E,"Symbol"),C(Math,"Math",!0),C(w.JSON,"JSON",!0)},function(L,k,h){var w=h(29)("meta"),p=h(21),S=h(14),M=h(12).f,x=0,I=Object.isExtensible||function(){return!0},T=!h(22)(function(){return I(Object.preventExtensions({}))}),R=function(s){M(s,w,{value:{i:"O"+ ++x,w:{}}})},C=function(s,f){if(!p(s))return typeof s=="symbol"?s:(typeof s=="string"?"S":"P")+s;if(!S(s,w)){if(!I(s))return"F";if(!f)return"E";R(s)}return s[w].i},m=function(s,f){if(!S(s,w)){if(!I(s))return!0;if(!f)return!1;R(s)}return s[w].w},c=function(s){return T&&u.NEED&&I(s)&&!S(s,w)&&R(s),s},u=L.exports={KEY:w,NEED:!1,fastKey:C,getWeak:m,onFreeze:c}},function(L,k,h){var w=h(26),p=h(50),S=h(32);L.exports=function(M){var x=w(M),I=p.f;if(I)for(var T=I(M),R=S.f,C=0,m;T.length>C;)R.call(M,m=T[C++])&&x.push(m);return x}},function(L,k,h){var w=h(38);L.exports=Array.isArray||function(S){return w(S)=="Array"}},function(L,k,h){var w=h(18),p=h(69).f,S={}.toString,M=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],x=function(I){try{return p(I)}catch{return M.slice()}};L.exports.f=function(T){return M&&S.call(T)=="[object Window]"?x(T):p(w(T))}},function(L,k){},function(L,k,h){h(49)("asyncIterator")},function(L,k,h){h(49)("observable")},function(L,k,h){(function(w){var p;//! moment.js
(function(S,M){w.exports=M()})(this,function(){"use strict";var S;function M(){return S.apply(null,arguments)}function x(o){S=o}function I(o){return o instanceof Array||Object.prototype.toString.call(o)==="[object Array]"}function T(o){return o!=null&&Object.prototype.toString.call(o)==="[object Object]"}function R(o){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(o).length===0;var g;for(g in o)if(o.hasOwnProperty(g))return!1;return!0}function C(o){return o===void 0}function m(o){return typeof o=="number"||Object.prototype.toString.call(o)==="[object Number]"}function c(o){return o instanceof Date||Object.prototype.toString.call(o)==="[object Date]"}function u(o,g){var F=[],B;for(B=0;B<o.length;++B)F.push(g(o[B],B));return F}function s(o,g){return Object.prototype.hasOwnProperty.call(o,g)}function f(o,g){for(var F in g)s(g,F)&&(o[F]=g[F]);return s(g,"toString")&&(o.toString=g.toString),s(g,"valueOf")&&(o.valueOf=g.valueOf),o}function e(o,g,F,B){return ji(o,g,F,B,!0).utc()}function t(){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 n(o){return o._pf==null&&(o._pf=t()),o._pf}var i;Array.prototype.some?i=Array.prototype.some:i=function(o){for(var g=Object(this),F=g.length>>>0,B=0;B<F;B++)if(B in g&&o.call(this,g[B],B,g))return!0;return!1};function r(o){if(o._isValid==null){var g=n(o),F=i.call(g.parsedDateParts,function(H){return H!=null}),B=!isNaN(o._d.getTime())&&g.overflow<0&&!g.empty&&!g.invalidMonth&&!g.invalidWeekday&&!g.weekdayMismatch&&!g.nullInput&&!g.invalidFormat&&!g.userInvalidated&&(!g.meridiem||g.meridiem&&F);if(o._strict&&(B=B&&g.charsLeftOver===0&&g.unusedTokens.length===0&&g.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(o))o._isValid=B;else return B}return o._isValid}function l(o){var g=e(NaN);return o!=null?f(n(g),o):n(g).userInvalidated=!0,g}var d=M.momentProperties=[];function a(o,g){var F,B,H;if(C(g._isAMomentObject)||(o._isAMomentObject=g._isAMomentObject),C(g._i)||(o._i=g._i),C(g._f)||(o._f=g._f),C(g._l)||(o._l=g._l),C(g._strict)||(o._strict=g._strict),C(g._tzm)||(o._tzm=g._tzm),C(g._isUTC)||(o._isUTC=g._isUTC),C(g._offset)||(o._offset=g._offset),C(g._pf)||(o._pf=n(g)),C(g._locale)||(o._locale=g._locale),d.length>0)for(F=0;F<d.length;F++)B=d[F],H=g[B],C(H)||(o[B]=H);return o}var v=!1;function y(o){a(this,o),this._d=new Date(o._d!=null?o._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),v===!1&&(v=!0,M.updateOffset(this),v=!1)}function b(o){return o instanceof y||o!=null&&o._isAMomentObject!=null}function P(o){return o<0?Math.ceil(o)||0:Math.floor(o)}function D(o){var g=+o,F=0;return g!==0&&isFinite(g)&&(F=P(g)),F}function O(o,g,F){var B=Math.min(o.length,g.length),H=Math.abs(o.length-g.length),$=0,q;for(q=0;q<B;q++)(F&&o[q]!==g[q]||!F&&D(o[q])!==D(g[q]))&&$++;return $+H}function E(o){M.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+o)}function A(o,g){var F=!0;return f(function(){if(M.deprecationHandler!=null&&M.deprecationHandler(null,o),F){for(var B=[],H,$=0;$<arguments.length;$++){if(H="",typeof arguments[$]=="object"){H+=`
[`+$+"] ";for(var q in arguments[0])H+=q+": "+arguments[0][q]+", ";H=H.slice(0,-2)}else H=arguments[$];B.push(H)}E(o+`
Arguments: `+Array.prototype.slice.call(B).join("")+`
`+new Error().stack),F=!1}return g.apply(this,arguments)},g)}var Y={};function X(o,g){M.deprecationHandler!=null&&M.deprecationHandler(o,g),Y[o]||(E(g),Y[o]=!0)}M.suppressDeprecationWarnings=!1,M.deprecationHandler=null;function U(o){return o instanceof Function||Object.prototype.toString.call(o)==="[object Function]"}function Z(o){var g,F;for(F in o)g=o[F],U(g)?this[F]=g:this["_"+F]=g;this._config=o,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function re(o,g){var F=f({},o),B;for(B in g)s(g,B)&&(T(o[B])&&T(g[B])?(F[B]={},f(F[B],o[B]),f(F[B],g[B])):g[B]!=null?F[B]=g[B]:delete F[B]);for(B in o)s(o,B)&&!s(g,B)&&T(o[B])&&(F[B]=f({},F[B]));return F}function le(o){o!=null&&this.set(o)}var he;Object.keys?he=Object.keys:he=function(o){var g,F=[];for(g in o)s(o,g)&&F.push(g);return F};var ce={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function se(o,g,F){var B=this._calendar[o]||this._calendar.sameElse;return U(B)?B.call(g,F):B}var G={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function V(o){var g=this._longDateFormat[o],F=this._longDateFormat[o.toUpperCase()];return g||!F?g:(this._longDateFormat[o]=F.replace(/MMMM|MM|DD|dddd/g,function(B){return B.slice(1)}),this._longDateFormat[o])}var Q="Invalid date";function K(){return this._invalidDate}var J="%d",_=/\d{1,2}/;function ee(o){return this._ordinal.replace("%d",o)}var ue={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function pe(o,g,F,B){var H=this._relativeTime[F];return U(H)?H(o,g,F,B):H.replace(/%d/i,o)}function Te(o,g){var F=this._relativeTime[o>0?"future":"past"];return U(F)?F(g):F.replace(/%s/i,g)}var Ee={};function ke(o,g){var F=o.toLowerCase();Ee[F]=Ee[F+"s"]=Ee[g]=o}function Me(o){return typeof o=="string"?Ee[o]||Ee[o.toLowerCase()]:void 0}function Ie(o){var g={},F,B;for(B in o)s(o,B)&&(F=Me(B),F&&(g[F]=o[B]));return g}var Ye={};function Se(o,g){Ye[o]=g}function je(o){var g=[];for(var F in o)g.push({unit:F,priority:Ye[F]});return g.sort(function(B,H){return B.priority-H.priority}),g}function ve(o,g,F){var B=""+Math.abs(o),H=g-B.length,$=o>=0;return($?F?"+":"":"-")+Math.pow(10,Math.max(0,H)).toString().substr(1)+B}var ie=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ae=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ge={},be={};function de(o,g,F,B){var H=B;typeof B=="string"&&(H=function(){return this[B]()}),o&&(be[o]=H),g&&(be[g[0]]=function(){return ve(H.apply(this,arguments),g[1],g[2])}),F&&(be[F]=function(){return this.localeData().ordinal(H.apply(this,arguments),o)})}function Re(o){return o.match(/\[[\s\S]/)?o.replace(/^\[|\]$/g,""):o.replace(/\\/g,"")}function Be(o){var g=o.match(ie),F,B;for(F=0,B=g.length;F<B;F++)be[g[F]]?g[F]=be[g[F]]:g[F]=Re(g[F]);return function(H){var $="",q;for(q=0;q<B;q++)$+=U(g[q])?g[q].call(H,o):g[q];return $}}function dt(o,g){return o.isValid()?(g=Ut(g,o.localeData()),ge[g]=ge[g]||Be(g),ge[g](o)):o.localeData().invalidDate()}function Ut(o,g){var F=5;function B(H){return g.longDateFormat(H)||H}for(ae.lastIndex=0;F>=0&&ae.test(o);)o=o.replace(ae,B),ae.lastIndex=0,F-=1;return o}var Gt=/\d/,We=/\d\d/,Dt=/\d{3}/,Xt=/\d{4}/,xt=/[+-]?\d{6}/,De=/\d\d?/,li=/\d\d\d\d?/,di=/\d\d\d\d\d\d?/,ut=/\d{1,3}/,$t=/\d{1,4}/,Pt=/[+-]?\d{1,6}/,ui=/\d+/,Et=/[+-]?\d+/,Kt=/Z|[+-]\d\d:?\d\d/gi,Ft=/Z|[+-]\d\d(?::?\d\d)?/gi,bi=/[+-]?\d+(\.\d{1,3})?/,kt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,It={};function fe(o,g,F){It[o]=U(g)?g:function(B,H){return B&&F?F:g}}function wi(o,g){return s(It,o)?It[o](g._strict,g._locale):new RegExp(Ci(o))}function Ci(o){return Ze(o.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(g,F,B,H,$){return F||B||H||$}))}function Ze(o){return o.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var jt={};function xe(o,g){var F,B=g;for(typeof o=="string"&&(o=[o]),m(g)&&(B=function(H,$){$[g]=D(H)}),F=0;F<o.length;F++)jt[o[F]]=B}function vt(o,g){xe(o,function(F,B,H,$){H._w=H._w||{},g(F,H._w,H,$)})}function Zt(o,g,F){g!=null&&s(jt,o)&&jt[o](g,F._a,F,o)}var Xe=0,Qe=1,Je=2,Ne=3,Ue=4,_e=5,rt=6,Qt=7,ht=8;de("Y",0,0,function(){var o=this.year();return o<=9999?""+o:"+"+o}),de(0,["YY",2],0,function(){return this.year()%100}),de(0,["YYYY",4],0,"year"),de(0,["YYYYY",5],0,"year"),de(0,["YYYYYY",6,!0],0,"year"),ke("year","y"),Se("year",1),fe("Y",Et),fe("YY",De,We),fe("YYYY",$t,Xt),fe("YYYYY",Pt,xt),fe("YYYYYY",Pt,xt),xe(["YYYYY","YYYYYY"],Xe),xe("YYYY",function(o,g){g[Xe]=o.length===2?M.parseTwoDigitYear(o):D(o)}),xe("YY",function(o,g){g[Xe]=M.parseTwoDigitYear(o)}),xe("Y",function(o,g){g[Xe]=parseInt(o,10)});function tt(o){return st(o)?366:365}function st(o){return o%4===0&&o%100!==0||o%400===0}M.parseTwoDigitYear=function(o){return D(o)+(D(o)>68?1900:2e3)};var St=gt("FullYear",!0);function Jt(){return st(this.year())}function gt(o,g){return function(F){return F!=null?(Ot(this,o,F),M.updateOffset(this,g),this):Rt(this,o)}}function Rt(o,g){return o.isValid()?o._d["get"+(o._isUTC?"UTC":"")+g]():NaN}function Ot(o,g,F){o.isValid()&&!isNaN(F)&&(g==="FullYear"&&st(o.year())&&o.month()===1&&o.date()===29?o._d["set"+(o._isUTC?"UTC":"")+g](F,o.month(),ot(F,o.month())):o._d["set"+(o._isUTC?"UTC":"")+g](F))}function Ge(o){return o=Me(o),U(this[o])?this[o]():this}function mt(o,g){if(typeof o=="object"){o=Ie(o);for(var F=je(o),B=0;B<F.length;B++)this[F[B].unit](o[F[B].unit])}else if(o=Me(o),U(this[o]))return this[o](g);return this}function at(o,g){return(o%g+g)%g}var Oe;Array.prototype.indexOf?Oe=Array.prototype.indexOf:Oe=function(o){var g;for(g=0;g<this.length;++g)if(this[g]===o)return g;return-1};function ot(o,g){if(isNaN(o)||isNaN(g))return NaN;var F=at(g,12);return o+=(g-F)/12,F===1?st(o)?29:28:31-F%7%2}de("M",["MM",2],"Mo",function(){return this.month()+1}),de("MMM",0,0,function(o){return this.localeData().monthsShort(this,o)}),de("MMMM",0,0,function(o){return this.localeData().months(this,o)}),ke("month","M"),Se("month",8),fe("M",De),fe("MM",De,We),fe("MMM",function(o,g){return g.monthsShortRegex(o)}),fe("MMMM",function(o,g){return g.monthsRegex(o)}),xe(["M","MM"],function(o,g){g[Qe]=D(o)-1}),xe(["MMM","MMMM"],function(o,g,F,B){var H=F._locale.monthsParse(o,B,F._strict);H!=null?g[Qe]=H:n(F).invalidMonth=o});var $e=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,it="January_February_March_April_May_June_July_August_September_October_November_December".split("_");function hi(o,g){return o?I(this._months)?this._months[o.month()]:this._months[(this._months.isFormat||$e).test(g)?"format":"standalone"][o.month()]:I(this._months)?this._months:this._months.standalone}var _t="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Bt(o,g){return o?I(this._monthsShort)?this._monthsShort[o.month()]:this._monthsShort[$e.test(g)?"format":"standalone"][o.month()]:I(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Ke(o,g,F){var B,H,$,q=o.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],B=0;B<12;++B)$=e([2e3,B]),this._shortMonthsParse[B]=this.monthsShort($,"").toLocaleLowerCase(),this._longMonthsParse[B]=this.months($,"").toLocaleLowerCase();return F?g==="MMM"?(H=Oe.call(this._shortMonthsParse,q),H!==-1?H:null):(H=Oe.call(this._longMonthsParse,q),H!==-1?H:null):g==="MMM"?(H=Oe.call(this._shortMonthsParse,q),H!==-1?H:(H=Oe.call(this._longMonthsParse,q),H!==-1?H:null)):(H=Oe.call(this._longMonthsParse,q),H!==-1?H:(H=Oe.call(this._shortMonthsParse,q),H!==-1?H:null))}function Nt(o,g,F){var B,H,$;if(this._monthsParseExact)return Ke.call(this,o,g,F);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),B=0;B<12;B++){if(H=e([2e3,B]),F&&!this._longMonthsParse[B]&&(this._longMonthsParse[B]=new RegExp("^"+this.months(H,"").replace(".","")+"$","i"),this._shortMonthsParse[B]=new RegExp("^"+this.monthsShort(H,"").replace(".","")+"$","i")),!F&&!this._monthsParse[B]&&($="^"+this.months(H,"")+"|^"+this.monthsShort(H,""),this._monthsParse[B]=new RegExp($.replace(".",""),"i")),F&&g==="MMMM"&&this._longMonthsParse[B].test(o))return B;if(F&&g==="MMM"&&this._shortMonthsParse[B].test(o))return B;if(!F&&this._monthsParse[B].test(o))return B}}function At(o,g){var F;if(!o.isValid())return o;if(typeof g=="string"){if(/^\d+$/.test(g))g=D(g);else if(g=o.localeData().monthsParse(g),!m(g))return o}return F=Math.min(o.date(),ot(o.year(),g)),o._d["set"+(o._isUTC?"UTC":"")+"Month"](g,F),o}function zt(o){return o!=null?(At(this,o),M.updateOffset(this,!0),this):Rt(this,"Month")}function qt(){return ot(this.year(),this.month())}var ei=kt;function Lt(o){return this._monthsParseExact?(s(this,"_monthsRegex")||ti.call(this),o?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=ei),this._monthsShortStrictRegex&&o?this._monthsShortStrictRegex:this._monthsShortRegex)}var ft=kt;function Ei(o){return this._monthsParseExact?(s(this,"_monthsRegex")||ti.call(this),o?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=ft),this._monthsStrictRegex&&o?this._monthsStrictRegex:this._monthsRegex)}function ti(){function o(q,me){return me.length-q.length}var g=[],F=[],B=[],H,$;for(H=0;H<12;H++)$=e([2e3,H]),g.push(this.monthsShort($,"")),F.push(this.months($,"")),B.push(this.months($,"")),B.push(this.monthsShort($,""));for(g.sort(o),F.sort(o),B.sort(o),H=0;H<12;H++)g[H]=Ze(g[H]),F[H]=Ze(F[H]);for(H=0;H<24;H++)B[H]=Ze(B[H]);this._monthsRegex=new RegExp("^("+B.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+F.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+g.join("|")+")","i")}function ii(o,g,F,B,H,$,q){var me=new Date(o,g,F,B,H,$,q);return o<100&&o>=0&&isFinite(me.getFullYear())&&me.setFullYear(o),me}function pt(o){var g=new Date(Date.UTC.apply(null,arguments));return o<100&&o>=0&&isFinite(g.getUTCFullYear())&&g.setUTCFullYear(o),g}function Ht(o,g,F){var B=7+g-F,H=(7+pt(o,0,B).getUTCDay()-g)%7;return-H+B-1}function fi(o,g,F,B,H){var $=(7+F-B)%7,q=Ht(o,B,H),me=1+7*(g-1)+$+q,Ce,ze;return me<=0?(Ce=o-1,ze=tt(Ce)+me):me>tt(o)?(Ce=o+1,ze=me-tt(o)):(Ce=o,ze=me),{year:Ce,dayOfYear:ze}}function N(o,g,F){var B=Ht(o.year(),g,F),H=Math.floor((o.dayOfYear()-B-1)/7)+1,$,q;return H<1?(q=o.year()-1,$=H+z(q,g,F)):H>z(o.year(),g,F)?($=H-z(o.year(),g,F),q=o.year()+1):(q=o.year(),$=H),{week:$,year:q}}function z(o,g,F){var B=Ht(o,g,F),H=Ht(o+1,g,F);return(tt(o)-B+H)/7}de("w",["ww",2],"wo","week"),de("W",["WW",2],"Wo","isoWeek"),ke("week","w"),ke("isoWeek","W"),Se("week",5),Se("isoWeek",5),fe("w",De),fe("ww",De,We),fe("W",De),fe("WW",De,We),vt(["w","ww","W","WW"],function(o,g,F,B){g[B.substr(0,1)]=D(o)});function W(o){return N(o,this._week.dow,this._week.doy).week}var j={dow:0,doy:6};function te(){return this._week.dow}function oe(){return this._week.doy}function ye(o){var g=this.localeData().week(this);return o==null?g:this.add((o-g)*7,"d")}function Ae(o){var g=N(this,1,4).week;return o==null?g:this.add((o-g)*7,"d")}de("d",0,"do","day"),de("dd",0,0,function(o){return this.localeData().weekdaysMin(this,o)}),de("ddd",0,0,function(o){return this.localeData().weekdaysShort(this,o)}),de("dddd",0,0,function(o){return this.localeData().weekdays(this,o)}),de("e",0,0,"weekday"),de("E",0,0,"isoWeekday"),ke("day","d"),ke("weekday","e"),ke("isoWeekday","E"),Se("day",11),Se("weekday",11),Se("isoWeekday",11),fe("d",De),fe("e",De),fe("E",De),fe("dd",function(o,g){return g.weekdaysMinRegex(o)}),fe("ddd",function(o,g){return g.weekdaysShortRegex(o)}),fe("dddd",function(o,g){return g.weekdaysRegex(o)}),vt(["dd","ddd","dddd"],function(o,g,F,B){var H=F._locale.weekdaysParse(o,B,F._strict);H!=null?g.d=H:n(F).invalidWeekday=o}),vt(["d","e","E"],function(o,g,F,B){g[B]=D(o)});function Le(o,g){return typeof o!="string"?o:isNaN(o)?(o=g.weekdaysParse(o),typeof o=="number"?o:null):parseInt(o,10)}function Ve(o,g){return typeof o=="string"?g.weekdaysParse(o)%7||7:isNaN(o)?null:o}var qe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");function vn(o,g){return o?I(this._weekdays)?this._weekdays[o.day()]:this._weekdays[this._weekdays.isFormat.test(g)?"format":"standalone"][o.day()]:I(this._weekdays)?this._weekdays:this._weekdays.standalone}var Wi="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");function gn(o){return o?this._weekdaysShort[o.day()]:this._weekdaysShort}var mn="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function pn(o){return o?this._weekdaysMin[o.day()]:this._weekdaysMin}function yn(o,g,F){var B,H,$,q=o.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],B=0;B<7;++B)$=e([2e3,1]).day(B),this._minWeekdaysParse[B]=this.weekdaysMin($,"").toLocaleLowerCase(),this._shortWeekdaysParse[B]=this.weekdaysShort($,"").toLocaleLowerCase(),this._weekdaysParse[B]=this.weekdays($,"").toLocaleLowerCase();return F?g==="dddd"?(H=Oe.call(this._weekdaysParse,q),H!==-1?H:null):g==="ddd"?(H=Oe.call(this._shortWeekdaysParse,q),H!==-1?H:null):(H=Oe.call(this._minWeekdaysParse,q),H!==-1?H:null):g==="dddd"?(H=Oe.call(this._weekdaysParse,q),H!==-1||(H=Oe.call(this._shortWeekdaysParse,q),H!==-1)?H:(H=Oe.call(this._minWeekdaysParse,q),H!==-1?H:null)):g==="ddd"?(H=Oe.call(this._shortWeekdaysParse,q),H!==-1||(H=Oe.call(this._weekdaysParse,q),H!==-1)?H:(H=Oe.call(this._minWeekdaysParse,q),H!==-1?H:null)):(H=Oe.call(this._minWeekdaysParse,q),H!==-1||(H=Oe.call(this._weekdaysParse,q),H!==-1)?H:(H=Oe.call(this._shortWeekdaysParse,q),H!==-1?H:null))}function bn(o,g,F){var B,H,$;if(this._weekdaysParseExact)return yn.call(this,o,g,F);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),B=0;B<7;B++){if(H=e([2e3,1]).day(B),F&&!this._fullWeekdaysParse[B]&&(this._fullWeekdaysParse[B]=new RegExp("^"+this.weekdays(H,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[B]=new RegExp("^"+this.weekdaysShort(H,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[B]=new RegExp("^"+this.weekdaysMin(H,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[B]||($="^"+this.weekdays(H,"")+"|^"+this.weekdaysShort(H,"")+"|^"+this.weekdaysMin(H,""),this._weekdaysParse[B]=new RegExp($.replace(".",""),"i")),F&&g==="dddd"&&this._fullWeekdaysParse[B].test(o))return B;if(F&&g==="ddd"&&this._shortWeekdaysParse[B].test(o))return B;if(F&&g==="dd"&&this._minWeekdaysParse[B].test(o))return B;if(!F&&this._weekdaysParse[B].test(o))return B}}function wn(o){if(!this.isValid())return o!=null?this:NaN;var g=this._isUTC?this._d.getUTCDay():this._d.getDay();return o!=null?(o=Le(o,this.localeData()),this.add(o-g,"d")):g}function Cn(o){if(!this.isValid())return o!=null?this:NaN;var g=(this.day()+7-this.localeData()._week.dow)%7;return o==null?g:this.add(o-g,"d")}function En(o){if(!this.isValid())return o!=null?this:NaN;if(o!=null){var g=Ve(o,this.localeData());return this.day(this.day()%7?g:g-7)}else return this.day()||7}var kn=kt;function Sn(o){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||ki.call(this),o?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=kn),this._weekdaysStrictRegex&&o?this._weekdaysStrictRegex:this._weekdaysRegex)}var On=kt;function Mn(o){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||ki.call(this),o?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=On),this._weekdaysShortStrictRegex&&o?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}var Tn=kt;function Dn(o){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||ki.call(this),o?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Tn),this._weekdaysMinStrictRegex&&o?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function ki(){function o(et,ai){return ai.length-et.length}var g=[],F=[],B=[],H=[],$,q,me,Ce,ze;for($=0;$<7;$++)q=e([2e3,1]).day($),me=this.weekdaysMin(q,""),Ce=this.weekdaysShort(q,""),ze=this.weekdays(q,""),g.push(me),F.push(Ce),B.push(ze),H.push(me),H.push(Ce),H.push(ze);for(g.sort(o),F.sort(o),B.sort(o),H.sort(o),$=0;$<7;$++)F[$]=Ze(F[$]),B[$]=Ze(B[$]),H[$]=Ze(H[$]);this._weekdaysRegex=new RegExp("^("+H.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+B.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+F.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+g.join("|")+")","i")}function Si(){return this.hours()%12||12}function xn(){return this.hours()||24}de("H",["HH",2],0,"hour"),de("h",["hh",2],0,Si),de("k",["kk",2],0,xn),de("hmm",0,0,function(){return""+Si.apply(this)+ve(this.minutes(),2)}),de("hmmss",0,0,function(){return""+Si.apply(this)+ve(this.minutes(),2)+ve(this.seconds(),2)}),de("Hmm",0,0,function(){return""+this.hours()+ve(this.minutes(),2)}),de("Hmmss",0,0,function(){return""+this.hours()+ve(this.minutes(),2)+ve(this.seconds(),2)});function Yi(o,g){de(o,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),g)})}Yi("a",!0),Yi("A",!1),ke("hour","h"),Se("hour",13);function Vi(o,g){return g._meridiemParse}fe("a",Vi),fe("A",Vi),fe("H",De),fe("h",De),fe("k",De),fe("HH",De,We),fe("hh",De,We),fe("kk",De,We),fe("hmm",li),fe("hmmss",di),fe("Hmm",li),fe("Hmmss",di),xe(["H","HH"],Ne),xe(["k","kk"],function(o,g,F){var B=D(o);g[Ne]=B===24?0:B}),xe(["a","A"],function(o,g,F){F._isPm=F._locale.isPM(o),F._meridiem=o}),xe(["h","hh"],function(o,g,F){g[Ne]=D(o),n(F).bigHour=!0}),xe("hmm",function(o,g,F){var B=o.length-2;g[Ne]=D(o.substr(0,B)),g[Ue]=D(o.substr(B)),n(F).bigHour=!0}),xe("hmmss",function(o,g,F){var B=o.length-4,H=o.length-2;g[Ne]=D(o.substr(0,B)),g[Ue]=D(o.substr(B,2)),g[_e]=D(o.substr(H)),n(F).bigHour=!0}),xe("Hmm",function(o,g,F){var B=o.length-2;g[Ne]=D(o.substr(0,B)),g[Ue]=D(o.substr(B))}),xe("Hmmss",function(o,g,F){var B=o.length-4,H=o.length-2;g[Ne]=D(o.substr(0,B)),g[Ue]=D(o.substr(B,2)),g[_e]=D(o.substr(H))});function Pn(o){return(o+"").toLowerCase().charAt(0)==="p"}var Fn=/[ap]\.?m?\.?/i;function In(o,g,F){return o>11?F?"pm":"PM":F?"am":"AM"}var Rn=gt("Hours",!0),Ui={calendar:ce,longDateFormat:G,invalidDate:Q,ordinal:J,dayOfMonthOrdinalParse:_,relativeTime:ue,months:it,monthsShort:_t,week:j,weekdays:qe,weekdaysMin:mn,weekdaysShort:Wi,meridiemParse:Fn},He={},ni={},ri;function Gi(o){return o&&o.toLowerCase().replace("_","-")}function Bn(o){for(var g=0,F,B,H,$;g<o.length;){for($=Gi(o[g]).split("-"),F=$.length,B=Gi(o[g+1]),B=B?B.split("-"):null;F>0;){if(H=ci($.slice(0,F).join("-")),H)return H;if(B&&B.length>=F&&O($,B,!0)>=F-1)break;F--}g++}return ri}function ci(o){var g=null;if(!He[o]&&typeof w<"u"&&w&&w.exports)try{g=ri._abbr;var F=p;(function(){var H=new Error('Cannot find module "./locale"');throw H.code="MODULE_NOT_FOUND",H})(),Wt(g)}catch{}return He[o]}function Wt(o,g){var F;return o&&(C(g)?F=yt(o):F=Oi(o,g),F?ri=F:typeof console<"u"&&console.warn&&console.warn("Locale "+o+" not found. Did you forget to load it?")),ri._abbr}function Oi(o,g){if(g!==null){var F,B=Ui;if(g.abbr=o,He[o]!=null)X("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),B=He[o]._config;else if(g.parentLocale!=null)if(He[g.parentLocale]!=null)B=He[g.parentLocale]._config;else if(F=ci(g.parentLocale),F!=null)B=F._config;else return ni[g.parentLocale]||(ni[g.parentLocale]=[]),ni[g.parentLocale].push({name:o,config:g}),null;return He[o]=new le(re(B,g)),ni[o]&&ni[o].forEach(function(H){Oi(H.name,H.config)}),Wt(o),He[o]}else return delete He[o],null}function Nn(o,g){if(g!=null){var F,B,H=Ui;B=ci(o),B!=null&&(H=B._config),g=re(H,g),F=new le(g),F.parentLocale=He[o],He[o]=F,Wt(o)}else He[o]!=null&&(He[o].parentLocale!=null?He[o]=He[o].parentLocale:He[o]!=null&&delete He[o]);return He[o]}function yt(o){var g;if(o&&o._locale&&o._locale._abbr&&(o=o._locale._abbr),!o)return ri;if(!I(o)){if(g=ci(o),g)return g;o=[o]}return Bn(o)}function An(){return he(He)}function Mi(o){var g,F=o._a;return F&&n(o).overflow===-2&&(g=F[Qe]<0||F[Qe]>11?Qe:F[Je]<1||F[Je]>ot(F[Xe],F[Qe])?Je:F[Ne]<0||F[Ne]>24||F[Ne]===24&&(F[Ue]!==0||F[_e]!==0||F[rt]!==0)?Ne:F[Ue]<0||F[Ue]>59?Ue:F[_e]<0||F[_e]>59?_e:F[rt]<0||F[rt]>999?rt:-1,n(o)._overflowDayOfYear&&(g<Xe||g>Je)&&(g=Je),n(o)._overflowWeeks&&g===-1&&(g=Qt),n(o)._overflowWeekday&&g===-1&&(g=ht),n(o).overflow=g),o}function Yt(o,g,F){return o??g??F}function zn(o){var g=new Date(M.now());return o._useUTC?[g.getUTCFullYear(),g.getUTCMonth(),g.getUTCDate()]:[g.getFullYear(),g.getMonth(),g.getDate()]}function Ti(o){var g,F,B=[],H,$,q;if(!o._d){for(H=zn(o),o._w&&o._a[Je]==null&&o._a[Qe]==null&&Ln(o),o._dayOfYear!=null&&(q=Yt(o._a[Xe],H[Xe]),(o._dayOfYear>tt(q)||o._dayOfYear===0)&&(n(o)._overflowDayOfYear=!0),F=pt(q,0,o._dayOfYear),o._a[Qe]=F.getUTCMonth(),o._a[Je]=F.getUTCDate()),g=0;g<3&&o._a[g]==null;++g)o._a[g]=B[g]=H[g];for(;g<7;g++)o._a[g]=B[g]=o._a[g]==null?g===2?1:0:o._a[g];o._a[Ne]===24&&o._a[Ue]===0&&o._a[_e]===0&&o._a[rt]===0&&(o._nextDay=!0,o._a[Ne]=0),o._d=(o._useUTC?pt:ii).apply(null,B),$=o._useUTC?o._d.getUTCDay():o._d.getDay(),o._tzm!=null&&o._d.setUTCMinutes(o._d.getUTCMinutes()-o._tzm),o._nextDay&&(o._a[Ne]=24),o._w&&typeof o._w.d<"u"&&o._w.d!==$&&(n(o).weekdayMismatch=!0)}}function Ln(o){var g,F,B,H,$,q,me,Ce;if(g=o._w,g.GG!=null||g.W!=null||g.E!=null)$=1,q=4,F=Yt(g.GG,o._a[Xe],N(Fe(),1,4).year),B=Yt(g.W,1),H=Yt(g.E,1),(H<1||H>7)&&(Ce=!0);else{$=o._locale._week.dow,q=o._locale._week.doy;var ze=N(Fe(),$,q);F=Yt(g.gg,o._a[Xe],ze.year),B=Yt(g.w,ze.week),g.d!=null?(H=g.d,(H<0||H>6)&&(Ce=!0)):g.e!=null?(H=g.e+$,(g.e<0||g.e>6)&&(Ce=!0)):H=$}B<1||B>z(F,$,q)?n(o)._overflowWeeks=!0:Ce!=null?n(o)._overflowWeekday=!0:(me=fi(F,B,H,$,q),o._a[Xe]=me.year,o._dayOfYear=me.dayOfYear)}var Hn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Wn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Yn=/Z|[+-]\d\d(?::?\d\d)?/,vi=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Di=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Vn=/^\/?Date\((\-?\d+)/i;function Xi(o){var g,F,B=o._i,H=Hn.exec(B)||Wn.exec(B),$,q,me,Ce;if(H){for(n(o).iso=!0,g=0,F=vi.length;g<F;g++)if(vi[g][1].exec(H[1])){q=vi[g][0],$=vi[g][2]!==!1;break}if(q==null){o._isValid=!1;return}if(H[3]){for(g=0,F=Di.length;g<F;g++)if(Di[g][1].exec(H[3])){me=(H[2]||" ")+Di[g][0];break}if(me==null){o._isValid=!1;return}}if(!$&&me!=null){o._isValid=!1;return}if(H[4])if(Yn.exec(H[4]))Ce="Z";else{o._isValid=!1;return}o._f=q+(me||"")+(Ce||""),xi(o)}else o._isValid=!1}var Un=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function Gn(o,g,F,B,H,$){var q=[Xn(o),_t.indexOf(g),parseInt(F,10),parseInt(B,10),parseInt(H,10)];return $&&q.push(parseInt($,10)),q}function Xn(o){var g=parseInt(o,10);return g<=49?2e3+g:g<=999?1900+g:g}function $n(o){return o.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Kn(o,g,F){if(o){var B=Wi.indexOf(o),H=new Date(g[0],g[1],g[2]).getDay();if(B!==H)return n(F).weekdayMismatch=!0,F._isValid=!1,!1}return!0}var jn={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Zn(o,g,F){if(o)return jn[o];if(g)return 0;var B=parseInt(F,10),H=B%100,$=(B-H)/100;return $*60+H}function $i(o){var g=Un.exec($n(o._i));if(g){var F=Gn(g[4],g[3],g[2],g[5],g[6],g[7]);if(!Kn(g[1],F,o))return;o._a=F,o._tzm=Zn(g[8],g[9],g[10]),o._d=pt.apply(null,o._a),o._d.setUTCMinutes(o._d.getUTCMinutes()-o._tzm),n(o).rfc2822=!0}else o._isValid=!1}function Qn(o){var g=Vn.exec(o._i);if(g!==null){o._d=new Date(+g[1]);return}if(Xi(o),o._isValid===!1)delete o._isValid;else return;if($i(o),o._isValid===!1)delete o._isValid;else return;M.createFromInputFallback(o)}M.createFromInputFallback=A("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(o){o._d=new Date(o._i+(o._useUTC?" UTC":""))}),M.ISO_8601=function(){},M.RFC_2822=function(){};function xi(o){if(o._f===M.ISO_8601){Xi(o);return}if(o._f===M.RFC_2822){$i(o);return}o._a=[],n(o).empty=!0;var g=""+o._i,F,B,H,$,q,me=g.length,Ce=0;for(H=Ut(o._f,o._locale).match(ie)||[],F=0;F<H.length;F++)$=H[F],B=(g.match(wi($,o))||[])[0],B&&(q=g.substr(0,g.indexOf(B)),q.length>0&&n(o).unusedInput.push(q),g=g.slice(g.indexOf(B)+B.length),Ce+=B.length),be[$]?(B?n(o).empty=!1:n(o).unusedTokens.push($),Zt($,B,o)):o._strict&&!B&&n(o).unusedTokens.push($);n(o).charsLeftOver=me-Ce,g.length>0&&n(o).unusedInput.push(g),o._a[Ne]<=12&&n(o).bigHour===!0&&o._a[Ne]>0&&(n(o).bigHour=void 0),n(o).parsedDateParts=o._a.slice(0),n(o).meridiem=o._meridiem,o._a[Ne]=Jn(o._locale,o._a[Ne],o._meridiem),Ti(o),Mi(o)}function Jn(o,g,F){var B;return F==null?g:o.meridiemHour!=null?o.meridiemHour(g,F):(o.isPM!=null&&(B=o.isPM(F),B&&g<12&&(g+=12),!B&&g===12&&(g=0)),g)}function _n(o){var g,F,B,H,$;if(o._f.length===0){n(o).invalidFormat=!0,o._d=new Date(NaN);return}for(H=0;H<o._f.length;H++)$=0,g=a({},o),o._useUTC!=null&&(g._useUTC=o._useUTC),g._f=o._f[H],xi(g),r(g)&&($+=n(g).charsLeftOver,$+=n(g).unusedTokens.length*10,n(g).score=$,(B==null||$<B)&&(B=$,F=g));f(o,F||g)}function qn(o){if(!o._d){var g=Ie(o._i);o._a=u([g.year,g.month,g.day||g.date,g.hour,g.minute,g.second,g.millisecond],function(F){return F&&parseInt(F,10)}),Ti(o)}}function er(o){var g=new y(Mi(Ki(o)));return g._nextDay&&(g.add(1,"d"),g._nextDay=void 0),g}function Ki(o){var g=o._i,F=o._f;return o._locale=o._locale||yt(o._l),g===null||F===void 0&&g===""?l({nullInput:!0}):(typeof g=="string"&&(o._i=g=o._locale.preparse(g)),b(g)?new y(Mi(g)):(c(g)?o._d=g:I(F)?_n(o):F?xi(o):tr(o),r(o)||(o._d=null),o))}function tr(o){var g=o._i;C(g)?o._d=new Date(M.now()):c(g)?o._d=new Date(g.valueOf()):typeof g=="string"?Qn(o):I(g)?(o._a=u(g.slice(0),function(F){return parseInt(F,10)}),Ti(o)):T(g)?qn(o):m(g)?o._d=new Date(g):M.createFromInputFallback(o)}function ji(o,g,F,B,H){var $={};return(F===!0||F===!1)&&(B=F,F=void 0),(T(o)&&R(o)||I(o)&&o.length===0)&&(o=void 0),$._isAMomentObject=!0,$._useUTC=$._isUTC=H,$._l=F,$._i=o,$._f=g,$._strict=B,er($)}function Fe(o,g,F,B){return ji(o,g,F,B,!1)}var ir=A("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var o=Fe.apply(null,arguments);return this.isValid()&&o.isValid()?o<this?this:o:l()}),nr=A("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var o=Fe.apply(null,arguments);return this.isValid()&&o.isValid()?o>this?this:o:l()});function Zi(o,g){var F,B;if(g.length===1&&I(g[0])&&(g=g[0]),!g.length)return Fe();for(F=g[0],B=1;B<g.length;++B)(!g[B].isValid()||g[B][o](F))&&(F=g[B]);return F}function rr(){var o=[].slice.call(arguments,0);return Zi("isBefore",o)}function sr(){var o=[].slice.call(arguments,0);return Zi("isAfter",o)}var ar=function(){return Date.now?Date.now():+new Date},si=["year","quarter","month","week","day","hour","minute","second","millisecond"];function or(o){for(var g in o)if(!(Oe.call(si,g)!==-1&&(o[g]==null||!isNaN(o[g]))))return!1;for(var F=!1,B=0;B<si.length;++B)if(o[si[B]]){if(F)return!1;parseFloat(o[si[B]])!==D(o[si[B]])&&(F=!0)}return!0}function lr(){return this._isValid}function dr(){return nt(NaN)}function gi(o){var g=Ie(o),F=g.year||0,B=g.quarter||0,H=g.month||0,$=g.week||0,q=g.day||0,me=g.hour||0,Ce=g.minute||0,ze=g.second||0,et=g.millisecond||0;this._isValid=or(g),this._milliseconds=+et+ze*1e3+Ce*6e4+me*1e3*60*60,this._days=+q+$*7,this._months=+H+B*3+F*12,this._data={},this._locale=yt(),this._bubble()}function Pi(o){return o instanceof gi}function Fi(o){return o<0?Math.round(-1*o)*-1:Math.round(o)}function Qi(o,g){de(o,0,0,function(){var F=this.utcOffset(),B="+";return F<0&&(F=-F,B="-"),B+ve(~~(F/60),2)+g+ve(~~F%60,2)})}Qi("Z",":"),Qi("ZZ",""),fe("Z",Ft),fe("ZZ",Ft),xe(["Z","ZZ"],function(o,g,F){F._useUTC=!0,F._tzm=Ii(Ft,o)});var ur=/([\+\-]|\d\d)/gi;function Ii(o,g){var F=(g||"").match(o);if(F===null)return null;var B=F[F.length-1]||[],H=(B+"").match(ur)||["-",0,0],$=+(H[1]*60)+D(H[2]);return $===0?0:H[0]==="+"?$:-$}function Ri(o,g){var F,B;return g._isUTC?(F=g.clone(),B=(b(o)||c(o)?o.valueOf():Fe(o).valueOf())-F.valueOf(),F._d.setTime(F._d.valueOf()+B),M.updateOffset(F,!1),F):Fe(o).local()}function Bi(o){return-Math.round(o._d.getTimezoneOffset()/15)*15}M.updateOffset=function(){};function hr(o,g,F){var B=this._offset||0,H;if(!this.isValid())return o!=null?this:NaN;if(o!=null){if(typeof o=="string"){if(o=Ii(Ft,o),o===null)return this}else Math.abs(o)<16&&!F&&(o=o*60);return!this._isUTC&&g&&(H=Bi(this)),this._offset=o,this._isUTC=!0,H!=null&&this.add(H,"m"),B!==o&&(!g||this._changeInProgress?en(this,nt(o-B,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,M.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?B:Bi(this)}function fr(o,g){return o!=null?(typeof o!="string"&&(o=-o),this.utcOffset(o,g),this):-this.utcOffset()}function cr(o){return this.utcOffset(0,o)}function vr(o){return this._isUTC&&(this.utcOffset(0,o),this._isUTC=!1,o&&this.subtract(Bi(this),"m")),this}function gr(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var o=Ii(Kt,this._i);o!=null?this.utcOffset(o):this.utcOffset(0,!0)}return this}function mr(o){return this.isValid()?(o=o?Fe(o).utcOffset():0,(this.utcOffset()-o)%60===0):!1}function pr(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function yr(){if(!C(this._isDSTShifted))return this._isDSTShifted;var o={};if(a(o,this),o=Ki(o),o._a){var g=o._isUTC?e(o._a):Fe(o._a);this._isDSTShifted=this.isValid()&&O(o._a,g.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function br(){return this.isValid()?!this._isUTC:!1}function wr(){return this.isValid()?this._isUTC:!1}function Ji(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Cr=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Er=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function nt(o,g){var F=o,B=null,H,$,q;return Pi(o)?F={ms:o._milliseconds,d:o._days,M:o._months}:m(o)?(F={},g?F[g]=o:F.milliseconds=o):(B=Cr.exec(o))?(H=B[1]==="-"?-1:1,F={y:0,d:D(B[Je])*H,h:D(B[Ne])*H,m:D(B[Ue])*H,s:D(B[_e])*H,ms:D(Fi(B[rt]*1e3))*H}):(B=Er.exec(o))?(H=B[1]==="-"?-1:(B[1]==="+",1),F={y:Mt(B[2],H),M:Mt(B[3],H),w:Mt(B[4],H),d:Mt(B[5],H),h:Mt(B[6],H),m:Mt(B[7],H),s:Mt(B[8],H)}):F==null?F={}:typeof F=="object"&&("from"in F||"to"in F)&&(q=kr(Fe(F.from),Fe(F.to)),F={},F.ms=q.milliseconds,F.M=q.months),$=new gi(F),Pi(o)&&s(o,"_locale")&&($._locale=o._locale),$}nt.fn=gi.prototype,nt.invalid=dr;function Mt(o,g){var F=o&&parseFloat(o.replace(",","."));return(isNaN(F)?0:F)*g}function _i(o,g){var F={milliseconds:0,months:0};return F.months=g.month()-o.month()+(g.year()-o.year())*12,o.clone().add(F.months,"M").isAfter(g)&&--F.months,F.milliseconds=+g-+o.clone().add(F.months,"M"),F}function kr(o,g){var F;return o.isValid()&&g.isValid()?(g=Ri(g,o),o.isBefore(g)?F=_i(o,g):(F=_i(g,o),F.milliseconds=-F.milliseconds,F.months=-F.months),F):{milliseconds:0,months:0}}function qi(o,g){return function(F,B){var H,$;return B!==null&&!isNaN(+B)&&(X(g,"moment()."+g+"(period, number) is deprecated. Please use moment()."+g+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),$=F,F=B,B=$),F=typeof F=="string"?+F:F,H=nt(F,B),en(this,H,o),this}}function en(o,g,F,B){var H=g._milliseconds,$=Fi(g._days),q=Fi(g._months);o.isValid()&&(B=B??!0,q&&At(o,Rt(o,"Month")+q*F),$&&Ot(o,"Date",Rt(o,"Date")+$*F),H&&o._d.setTime(o._d.valueOf()+H*F),B&&M.updateOffset(o,$||q))}var Sr=qi(1,"add"),Or=qi(-1,"subtract");function Mr(o,g){var F=o.diff(g,"days",!0);return F<-6?"sameElse":F<-1?"lastWeek":F<0?"lastDay":F<1?"sameDay":F<2?"nextDay":F<7?"nextWeek":"sameElse"}function Tr(o,g){var F=o||Fe(),B=Ri(F,this).startOf("day"),H=M.calendarFormat(this,B)||"sameElse",$=g&&(U(g[H])?g[H].call(this,F):g[H]);return this.format($||this.localeData().calendar(H,this,Fe(F)))}function Dr(){return new y(this)}function xr(o,g){var F=b(o)?o:Fe(o);return this.isValid()&&F.isValid()?(g=Me(C(g)?"millisecond":g),g==="millisecond"?this.valueOf()>F.valueOf():F.valueOf()<this.clone().startOf(g).valueOf()):!1}function Pr(o,g){var F=b(o)?o:Fe(o);return this.isValid()&&F.isValid()?(g=Me(C(g)?"millisecond":g),g==="millisecond"?this.valueOf()<F.valueOf():this.clone().endOf(g).valueOf()<F.valueOf()):!1}function Fr(o,g,F,B){return B=B||"()",(B[0]==="("?this.isAfter(o,F):!this.isBefore(o,F))&&(B[1]===")"?this.isBefore(g,F):!this.isAfter(g,F))}function Ir(o,g){var F=b(o)?o:Fe(o),B;return this.isValid()&&F.isValid()?(g=Me(g||"millisecond"),g==="millisecond"?this.valueOf()===F.valueOf():(B=F.valueOf(),this.clone().startOf(g).valueOf()<=B&&B<=this.clone().endOf(g).valueOf())):!1}function Rr(o,g){return this.isSame(o,g)||this.isAfter(o,g)}function Br(o,g){return this.isSame(o,g)||this.isBefore(o,g)}function Nr(o,g,F){var B,H,$;if(!this.isValid())return NaN;if(B=Ri(o,this),!B.isValid())return NaN;switch(H=(B.utcOffset()-this.utcOffset())*6e4,g=Me(g),g){case"year":$=Ni(this,B)/12;break;case"month":$=Ni(this,B);break;case"quarter":$=Ni(this,B)/3;break;case"second":$=(this-B)/1e3;break;case"minute":$=(this-B)/6e4;break;case"hour":$=(this-B)/36e5;break;case"day":$=(this-B-H)/864e5;break;case"week":$=(this-B-H)/6048e5;break;default:$=this-B}return F?$:P($)}function Ni(o,g){var F=(g.year()-o.year())*12+(g.month()-o.month()),B=o.clone().add(F,"months"),H,$;return g-B<0?(H=o.clone().add(F-1,"months"),$=(g-B)/(B-H)):(H=o.clone().add(F+1,"months"),$=(g-B)/(H-B)),-(F+$)||0}M.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",M.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Ar(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function zr(o){if(!this.isValid())return null;var g=o!==!0,F=g?this.clone().utc():this;return F.year()<0||F.year()>9999?dt(F,g?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):U(Date.prototype.toISOString)?g?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",dt(F,"Z")):dt(F,g?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Lr(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var o="moment",g="";this.isLocal()||(o=this.utcOffset()===0?"moment.utc":"moment.parseZone",g="Z");var F="["+o+'("]',B=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",H="-MM-DD[T]HH:mm:ss.SSS",$=g+'[")]';return this.format(F+B+H+$)}function Hr(o){o||(o=this.isUtc()?M.defaultFormatUtc:M.defaultFormat);var g=dt(this,o);return this.localeData().postformat(g)}function Wr(o,g){return this.isValid()&&(b(o)&&o.isValid()||Fe(o).isValid())?nt({to:this,from:o}).locale(this.locale()).humanize(!g):this.localeData().invalidDate()}function Yr(o){return this.from(Fe(),o)}function Vr(o,g){return this.isValid()&&(b(o)&&o.isValid()||Fe(o).isValid())?nt({from:this,to:o}).locale(this.locale()).humanize(!g):this.localeData().invalidDate()}function Ur(o){return this.to(Fe(),o)}function tn(o){var g;return o===void 0?this._locale._abbr:(g=yt(o),g!=null&&(this._locale=g),this)}var nn=A("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(o){return o===void 0?this.localeData():this.locale(o)});function rn(){return this._locale}function Gr(o){switch(o=Me(o),o){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return o==="week"&&this.weekday(0),o==="isoWeek"&&this.isoWeekday(1),o==="quarter"&&this.month(Math.floor(this.month()/3)*3),this}function Xr(o){return o=Me(o),o===void 0||o==="millisecond"?this:(o==="date"&&(o="day"),this.startOf(o).add(1,o==="isoWeek"?"week":o).subtract(1,"ms"))}function $r(){return this._d.valueOf()-(this._offset||0)*6e4}function Kr(){return Math.floor(this.valueOf()/1e3)}function jr(){return new Date(this.valueOf())}function Zr(){var o=this;return[o.year(),o.month(),o.date(),o.hour(),o.minute(),o.second(),o.millisecond()]}function Qr(){var o=this;return{years:o.year(),months:o.month(),date:o.date(),hours:o.hours(),minutes:o.minutes(),seconds:o.seconds(),milliseconds:o.milliseconds()}}function Jr(){return this.isValid()?this.toISOString():null}function _r(){return r(this)}function qr(){return f({},n(this))}function es(){return n(this).overflow}function ts(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}de(0,["gg",2],0,function(){return this.weekYear()%100}),de(0,["GG",2],0,function(){return this.isoWeekYear()%100});function mi(o,g){de(0,[o,o.length],0,g)}mi("gggg","weekYear"),mi("ggggg","weekYear"),mi("GGGG","isoWeekYear"),mi("GGGGG","isoWeekYear"),ke("weekYear","gg"),ke("isoWeekYear","GG"),Se("weekYear",1),Se("isoWeekYear",1),fe("G",Et),fe("g",Et),fe("GG",De,We),fe("gg",De,We),fe("GGGG",$t,Xt),fe("gggg",$t,Xt),fe("GGGGG",Pt,xt),fe("ggggg",Pt,xt),vt(["gggg","ggggg","GGGG","GGGGG"],function(o,g,F,B){g[B.substr(0,2)]=D(o)}),vt(["gg","GG"],function(o,g,F,B){g[B]=M.parseTwoDigitYear(o)});function is(o){return sn.call(this,o,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function ns(o){return sn.call(this,o,this.isoWeek(),this.isoWeekday(),1,4)}function rs(){return z(this.year(),1,4)}function ss(){var o=this.localeData()._week;return z(this.year(),o.dow,o.doy)}function sn(o,g,F,B,H){var $;return o==null?N(this,B,H).year:($=z(o,B,H),g>$&&(g=$),as.call(this,o,g,F,B,H))}function as(o,g,F,B,H){var $=fi(o,g,F,B,H),q=pt($.year,0,$.dayOfYear);return this.year(q.getUTCFullYear()),this.month(q.getUTCMonth()),this.date(q.getUTCDate()),this}de("Q",0,"Qo","quarter"),ke("quarter","Q"),Se("quarter",7),fe("Q",Gt),xe("Q",function(o,g){g[Qe]=(D(o)-1)*3});function os(o){return o==null?Math.ceil((this.month()+1)/3):this.month((o-1)*3+this.month()%3)}de("D",["DD",2],"Do","date"),ke("date","D"),Se("date",9),fe("D",De),fe("DD",De,We),fe("Do",function(o,g){return o?g._dayOfMonthOrdinalParse||g._ordinalParse:g._dayOfMonthOrdinalParseLenient}),xe(["D","DD"],Je),xe("Do",function(o,g){g[Je]=D(o.match(De)[0])});var an=gt("Date",!0);de("DDD",["DDDD",3],"DDDo","dayOfYear"),ke("dayOfYear","DDD"),Se("dayOfYear",4),fe("DDD",ut),fe("DDDD",Dt),xe(["DDD","DDDD"],function(o,g,F){F._dayOfYear=D(o)});function ls(o){var g=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return o==null?g:this.add(o-g,"d")}de("m",["mm",2],0,"minute"),ke("minute","m"),Se("minute",14),fe("m",De),fe("mm",De,We),xe(["m","mm"],Ue);var ds=gt("Minutes",!1);de("s",["ss",2],0,"second"),ke("second","s"),Se("second",15),fe("s",De),fe("ss",De,We),xe(["s","ss"],_e);var us=gt("Seconds",!1);de("S",0,0,function(){return~~(this.millisecond()/100)}),de(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),de(0,["SSS",3],0,"millisecond"),de(0,["SSSS",4],0,function(){return this.millisecond()*10}),de(0,["SSSSS",5],0,function(){return this.millisecond()*100}),de(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),de(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),de(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),de(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),ke("millisecond","ms"),Se("millisecond",16),fe("S",ut,Gt),fe("SS",ut,We),fe("SSS",ut,Dt);var bt;for(bt="SSSS";bt.length<=9;bt+="S")fe(bt,ui);function hs(o,g){g[rt]=D(("0."+o)*1e3)}for(bt="S";bt.length<=9;bt+="S")xe(bt,hs);var fs=gt("Milliseconds",!1);de("z",0,0,"zoneAbbr"),de("zz",0,0,"zoneName");function cs(){return this._isUTC?"UTC":""}function vs(){return this._isUTC?"Coordinated Universal Time":""}var ne=y.prototype;ne.add=Sr,ne.calendar=Tr,ne.clone=Dr,ne.diff=Nr,ne.endOf=Xr,ne.format=Hr,ne.from=Wr,ne.fromNow=Yr,ne.to=Vr,ne.toNow=Ur,ne.get=Ge,ne.invalidAt=es,ne.isAfter=xr,ne.isBefore=Pr,ne.isBetween=Fr,ne.isSame=Ir,ne.isSameOrAfter=Rr,ne.isSameOrBefore=Br,ne.isValid=_r,ne.lang=nn,ne.locale=tn,ne.localeData=rn,ne.max=nr,ne.min=ir,ne.parsingFlags=qr,ne.set=mt,ne.startOf=Gr,ne.subtract=Or,ne.toArray=Zr,ne.toObject=Qr,ne.toDate=jr,ne.toISOString=zr,ne.inspect=Lr,ne.toJSON=Jr,ne.toString=Ar,ne.unix=Kr,ne.valueOf=$r,ne.creationData=ts,ne.year=St,ne.isLeapYear=Jt,ne.weekYear=is,ne.isoWeekYear=ns,ne.quarter=ne.quarters=os,ne.month=zt,ne.daysInMonth=qt,ne.week=ne.weeks=ye,ne.isoWeek=ne.isoWeeks=Ae,ne.weeksInYear=ss,ne.isoWeeksInYear=rs,ne.date=an,ne.day=ne.days=wn,ne.weekday=Cn,ne.isoWeekday=En,ne.dayOfYear=ls,ne.hour=ne.hours=Rn,ne.minute=ne.minutes=ds,ne.second=ne.seconds=us,ne.millisecond=ne.milliseconds=fs,ne.utcOffset=hr,ne.utc=cr,ne.local=vr,ne.parseZone=gr,ne.hasAlignedHourOffset=mr,ne.isDST=pr,ne.isLocal=br,ne.isUtcOffset=wr,ne.isUtc=Ji,ne.isUTC=Ji,ne.zoneAbbr=cs,ne.zoneName=vs,ne.dates=A("dates accessor is deprecated. Use date instead.",an),ne.months=A("months accessor is deprecated. Use month instead",zt),ne.years=A("years accessor is deprecated. Use year instead",St),ne.zone=A("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",fr),ne.isDSTShifted=A("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",yr);function gs(o){return Fe(o*1e3)}function ms(){return Fe.apply(null,arguments).parseZone()}function on(o){return o}var Pe=le.prototype;Pe.calendar=se,Pe.longDateFormat=V,Pe.invalidDate=K,Pe.ordinal=ee,Pe.preparse=on,Pe.postformat=on,Pe.relativeTime=pe,Pe.pastFuture=Te,Pe.set=Z,Pe.months=hi,Pe.monthsShort=Bt,Pe.monthsParse=Nt,Pe.monthsRegex=Ei,Pe.monthsShortRegex=Lt,Pe.week=W,Pe.firstDayOfYear=oe,Pe.firstDayOfWeek=te,Pe.weekdays=vn,Pe.weekdaysMin=pn,Pe.weekdaysShort=gn,Pe.weekdaysParse=bn,Pe.weekdaysRegex=Sn,Pe.weekdaysShortRegex=Mn,Pe.weekdaysMinRegex=Dn,Pe.isPM=Pn,Pe.meridiem=In;function pi(o,g,F,B){var H=yt(),$=e().set(B,g);return H[F]($,o)}function ln(o,g,F){if(m(o)&&(g=o,o=void 0),o=o||"",g!=null)return pi(o,g,F,"month");var B,H=[];for(B=0;B<12;B++)H[B]=pi(o,B,F,"month");return H}function Ai(o,g,F,B){typeof o=="boolean"?(m(g)&&(F=g,g=void 0),g=g||""):(g=o,F=g,o=!1,m(g)&&(F=g,g=void 0),g=g||"");var H=yt(),$=o?H._week.dow:0;if(F!=null)return pi(g,(F+$)%7,B,"day");var q,me=[];for(q=0;q<7;q++)me[q]=pi(g,(q+$)%7,B,"day");return me}function ps(o,g){return ln(o,g,"months")}function ys(o,g){return ln(o,g,"monthsShort")}function bs(o,g,F){return Ai(o,g,F,"weekdays")}function ws(o,g,F){return Ai(o,g,F,"weekdaysShort")}function Cs(o,g,F){return Ai(o,g,F,"weekdaysMin")}Wt("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(o){var g=o%10,F=D(o%100/10)===1?"th":g===1?"st":g===2?"nd":g===3?"rd":"th";return o+F}}),M.lang=A("moment.lang is deprecated. Use moment.locale instead.",Wt),M.langData=A("moment.langData is deprecated. Use moment.localeData instead.",yt);var ct=Math.abs;function Es(){var o=this._data;return this._milliseconds=ct(this._milliseconds),this._days=ct(this._days),this._months=ct(this._months),o.milliseconds=ct(o.milliseconds),o.seconds=ct(o.seconds),o.minutes=ct(o.minutes),o.hours=ct(o.hours),o.months=ct(o.months),o.years=ct(o.years),this}function dn(o,g,F,B){var H=nt(g,F);return o._milliseconds+=B*H._milliseconds,o._days+=B*H._days,o._months+=B*H._months,o._bubble()}function ks(o,g){return dn(this,o,g,1)}function Ss(o,g){return dn(this,o,g,-1)}function un(o){return o<0?Math.floor(o):Math.ceil(o)}function Os(){var o=this._milliseconds,g=this._days,F=this._months,B=this._data,H,$,q,me,Ce;return o>=0&&g>=0&&F>=0||o<=0&&g<=0&&F<=0||(o+=un(zi(F)+g)*864e5,g=0,F=0),B.milliseconds=o%1e3,H=P(o/1e3),B.seconds=H%60,$=P(H/60),B.minutes=$%60,q=P($/60),B.hours=q%24,g+=P(q/24),Ce=P(hn(g)),F+=Ce,g-=un(zi(Ce)),me=P(F/12),F%=12,B.days=g,B.months=F,B.years=me,this}function hn(o){return o*4800/146097}function zi(o){return o*146097/4800}function Ms(o){if(!this.isValid())return NaN;var g,F,B=this._milliseconds;if(o=Me(o),o==="month"||o==="year")return g=this._days+B/864e5,F=this._months+hn(g),o==="month"?F:F/12;switch(g=this._days+Math.round(zi(this._months)),o){case"week":return g/7+B/6048e5;case"day":return g+B/864e5;case"hour":return g*24+B/36e5;case"minute":return g*1440+B/6e4;case"second":return g*86400+B/1e3;case"millisecond":return Math.floor(g*864e5)+B;default:throw new Error("Unknown unit "+o)}}function Ts(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+D(this._months/12)*31536e6:NaN}function wt(o){return function(){return this.as(o)}}var Ds=wt("ms"),xs=wt("s"),Ps=wt("m"),Fs=wt("h"),Is=wt("d"),Rs=wt("w"),Bs=wt("M"),Ns=wt("y");function As(){return nt(this)}function zs(o){return o=Me(o),this.isValid()?this[o+"s"]():NaN}function Tt(o){return function(){return this.isValid()?this._data[o]:NaN}}var Ls=Tt("milliseconds"),Hs=Tt("seconds"),Ws=Tt("minutes"),Ys=Tt("hours"),Vs=Tt("days"),Us=Tt("months"),Gs=Tt("years");function Xs(){return P(this.days()/7)}var Ct=Math.round,lt={ss:44,s:45,m:45,h:22,d:26,M:11};function $s(o,g,F,B,H){return H.relativeTime(g||1,!!F,o,B)}function Ks(o,g,F){var B=nt(o).abs(),H=Ct(B.as("s")),$=Ct(B.as("m")),q=Ct(B.as("h")),me=Ct(B.as("d")),Ce=Ct(B.as("M")),ze=Ct(B.as("y")),et=H<=lt.ss&&["s",H]||H<lt.s&&["ss",H]||$<=1&&["m"]||$<lt.m&&["mm",$]||q<=1&&["h"]||q<lt.h&&["hh",q]||me<=1&&["d"]||me<lt.d&&["dd",me]||Ce<=1&&["M"]||Ce<lt.M&&["MM",Ce]||ze<=1&&["y"]||["yy",ze];return et[2]=g,et[3]=+o>0,et[4]=F,$s.apply(null,et)}function js(o){return o===void 0?Ct:typeof o=="function"?(Ct=o,!0):!1}function Zs(o,g){return lt[o]===void 0?!1:g===void 0?lt[o]:(lt[o]=g,o==="s"&&(lt.ss=g-1),!0)}function Qs(o){if(!this.isValid())return this.localeData().invalidDate();var g=this.localeData(),F=Ks(this,!o,g);return o&&(F=g.pastFuture(+this,F)),g.postformat(F)}var Li=Math.abs;function Vt(o){return(o>0)-(o<0)||+o}function yi(){if(!this.isValid())return this.localeData().invalidDate();var o=Li(this._milliseconds)/1e3,g=Li(this._days),F=Li(this._months),B,H,$;B=P(o/60),H=P(B/60),o%=60,B%=60,$=P(F/12),F%=12;var q=$,me=F,Ce=g,ze=H,et=B,ai=o?o.toFixed(3).replace(/\.?0+$/,""):"",oi=this.asSeconds();if(!oi)return"P0D";var Js=oi<0?"-":"",fn=Vt(this._months)!==Vt(oi)?"-":"",_s=Vt(this._days)!==Vt(oi)?"-":"",Hi=Vt(this._milliseconds)!==Vt(oi)?"-":"";return Js+"P"+(q?fn+q+"Y":"")+(me?fn+me+"M":"")+(Ce?_s+Ce+"D":"")+(ze||et||ai?"T":"")+(ze?Hi+ze+"H":"")+(et?Hi+et+"M":"")+(ai?Hi+ai+"S":"")}var we=gi.prototype;return we.isValid=lr,we.abs=Es,we.add=ks,we.subtract=Ss,we.as=Ms,we.asMilliseconds=Ds,we.asSeconds=xs,we.asMinutes=Ps,we.asHours=Fs,we.asDays=Is,we.asWeeks=Rs,we.asMonths=Bs,we.asYears=Ns,we.valueOf=Ts,we._bubble=Os,we.clone=As,we.get=zs,we.milliseconds=Ls,we.seconds=Hs,we.minutes=Ws,we.hours=Ys,we.days=Vs,we.weeks=Xs,we.months=Us,we.years=Gs,we.humanize=Qs,we.toISOString=yi,we.toString=yi,we.toJSON=yi,we.locale=tn,we.localeData=rn,we.toIsoString=A("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",yi),we.lang=nn,de("X",0,0,"unix"),de("x",0,0,"valueOf"),fe("x",Et),fe("X",bi),xe("X",function(o,g,F){F._d=new Date(parseFloat(o,10)*1e3)}),xe("x",function(o,g,F){F._d=new Date(D(o))}),M.version="2.22.2",x(Fe),M.fn=ne,M.min=rr,M.max=sr,M.now=ar,M.utc=e,M.unix=gs,M.months=ps,M.isDate=c,M.locale=Wt,M.invalid=l,M.duration=nt,M.isMoment=b,M.weekdays=bs,M.parseZone=ms,M.localeData=yt,M.isDuration=Pi,M.monthsShort=ys,M.weekdaysMin=Cs,M.defineLocale=Oi,M.updateLocale=Nn,M.locales=An,M.weekdaysShort=ws,M.normalizeUnits=Me,M.relativeTimeRounding=js,M.relativeTimeThreshold=Zs,M.calendarFormat=Mr,M.prototype=ne,M.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},M})}).call(k,h(117)(L))},function(L,k){L.exports=function(h){return h.webpackPolyfill||(h.deprecate=function(){},h.paths=[],h.children||(h.children=[]),Object.defineProperty(h,"loaded",{enumerable:!0,get:function(){return h.l}}),Object.defineProperty(h,"id",{enumerable:!0,get:function(){return h.i}}),h.webpackPolyfill=1),h}},function(L,k){function h(w){throw new Error("Cannot find module '"+w+"'.")}h.keys=function(){return[]},h.resolve=h,L.exports=h,h.id=118},function(L,k,h){"use strict";(function(w){var p,S=typeof window<"u"?window:typeof w<"u"?w:null;if(S&&S.crypto&&crypto.getRandomValues){var M=new Uint8Array(16);p=function(){return crypto.getRandomValues(M),M}}if(!p){var x=new Array(16);p=function(){for(var l=0,d;l<16;l++)l&3||(d=Math.random()*4294967296),x[l]=d>>>((l&3)<<3)&255;return x}}for(var I=[],T={},R=0;R<256;R++)I[R]=(R+256).toString(16).substr(1),T[I[R]]=R;function C(r,l,d){var a=l&&d||0,v=0;for(l=l||[],r.toLowerCase().replace(/[0-9a-f]{2}/g,function(y){v<16&&(l[a+v++]=T[y])});v<16;)l[a+v++]=0;return l}function m(r,l){var d=l||0,a=I;return a[r[d++]]+a[r[d++]]+a[r[d++]]+a[r[d++]]+"-"+a[r[d++]]+a[r[d++]]+"-"+a[r[d++]]+a[r[d++]]+"-"+a[r[d++]]+a[r[d++]]+"-"+a[r[d++]]+a[r[d++]]+a[r[d++]]+a[r[d++]]+a[r[d++]]+a[r[d++]]}var c=p(),u=[c[0]|1,c[1],c[2],c[3],c[4],c[5]],s=(c[6]<<8|c[7])&16383,f=0,e=0;function t(r,l,d){var a=l&&d||0,v=l||[];r=r||{};var y=r.clockseq!==void 0?r.clockseq:s,b=r.msecs!==void 0?r.msecs:new Date().getTime(),P=r.nsecs!==void 0?r.nsecs:e+1,D=b-f+(P-e)/1e4;if(D<0&&r.clockseq===void 0&&(y=y+1&16383),(D<0||b>f)&&r.nsecs===void 0&&(P=0),P>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");f=b,e=P,s=y,b+=122192928e5;var O=((b&268435455)*1e4+P)%4294967296;v[a++]=O>>>24&255,v[a++]=O>>>16&255,v[a++]=O>>>8&255,v[a++]=O&255;var E=b/4294967296*1e4&268435455;v[a++]=E>>>8&255,v[a++]=E&255,v[a++]=E>>>24&15|16,v[a++]=E>>>16&255,v[a++]=y>>>8|128,v[a++]=y&255;for(var A=r.node||u,Y=0;Y<6;Y++)v[a+Y]=A[Y];return l||m(v)}function n(r,l,d){var a=l&&d||0;typeof r=="string"&&(l=r=="binary"?new Array(16):null,r=null),r=r||{};var v=r.random||(r.rng||p)();if(v[6]=v[6]&15|64,v[8]=v[8]&63|128,l)for(var y=0;y<16;y++)l[a+y]=v[y];return l||m(v)}var i=n;i.v1=t,i.v4=n,i.parse=C,i.unparse=m,L.exports=i}).call(k,h(120))},function(L,k){var h;h=function(){return this}();try{h=h||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(h=window)}L.exports=h},function(L,k,h){"use strict";k.util=h(2),k.DOMutil=h(122),k.DataSet=h(33),k.DataView=h(51),k.Queue=h(72),k.Network=h(124),k.network={Images:h(76),dotparser:h(74),gephiParser:h(75),allOptions:h(84)},k.network.convertDot=function(w){return k.network.dotparser.DOTToGraph(w)},k.network.convertGephi=function(w,p){return k.network.gephiParser.parseGephi(w,p)},k.moment=h(71),k.Hammer=h(24),k.keycharm=h(52)},function(L,k,h){"use strict";k.prepareElements=function(w){for(var p in w)w.hasOwnProperty(p)&&(w[p].redundant=w[p].used,w[p].used=[])},k.cleanupElements=function(w){for(var p in w)if(w.hasOwnProperty(p)&&w[p].redundant){for(var S=0;S<w[p].redundant.length;S++)w[p].redundant[S].parentNode.removeChild(w[p].redundant[S]);w[p].redundant=[]}},k.resetElements=function(w){k.prepareElements(w),k.cleanupElements(w),k.prepareElements(w)},k.getSVGElement=function(w,p,S){var M;return p.hasOwnProperty(w)?p[w].redundant.length>0?(M=p[w].redundant[0],p[w].redundant.shift()):(M=document.createElementNS("http://www.w3.org/2000/svg",w),S.appendChild(M)):(M=document.createElementNS("http://www.w3.org/2000/svg",w),p[w]={used:[],redundant:[]},S.appendChild(M)),p[w].used.push(M),M},k.getDOMElement=function(w,p,S,M){var x;return p.hasOwnProperty(w)?p[w].redundant.length>0?(x=p[w].redundant[0],p[w].redundant.shift()):(x=document.createElement(w),M!==void 0?S.insertBefore(x,M):S.appendChild(x)):(x=document.createElement(w),p[w]={used:[],redundant:[]},M!==void 0?S.insertBefore(x,M):S.appendChild(x)),p[w].used.push(x),x},k.drawPoint=function(w,p,S,M,x,I){var T;if(S.style=="circle"?(T=k.getSVGElement("circle",M,x),T.setAttributeNS(null,"cx",w),T.setAttributeNS(null,"cy",p),T.setAttributeNS(null,"r",.5*S.size)):(T=k.getSVGElement("rect",M,x),T.setAttributeNS(null,"x",w-.5*S.size),T.setAttributeNS(null,"y",p-.5*S.size),T.setAttributeNS(null,"width",S.size),T.setAttributeNS(null,"height",S.size)),S.styles!==void 0&&T.setAttributeNS(null,"style",S.styles),T.setAttributeNS(null,"class",S.className+" vis-point"),I){var R=k.getSVGElement("text",M,x);I.xOffset&&(w=w+I.xOffset),I.yOffset&&(p=p+I.yOffset),I.content&&(R.textContent=I.content),I.className&&R.setAttributeNS(null,"class",I.className+" vis-label"),R.setAttributeNS(null,"x",w),R.setAttributeNS(null,"y",p)}return T},k.drawBar=function(w,p,S,M,x,I,T,R){if(M!=0){M<0&&(M*=-1,p-=M);var C=k.getSVGElement("rect",I,T);C.setAttributeNS(null,"x",w-.5*S),C.setAttributeNS(null,"y",p),C.setAttributeNS(null,"width",S),C.setAttributeNS(null,"height",M),C.setAttributeNS(null,"class",x),R&&C.setAttributeNS(null,"style",R)}}},function(L,k,h){var w=h(6),p=w.JSON||(w.JSON={stringify:JSON.stringify});L.exports=function(M){return p.stringify.apply(p,arguments)}},function(L,k,h){"use strict";h(125);var w=h(73),p=h(2),S=h(74),M=h(75),x=h(126),I=h(129),T=h(76).default,R=h(134).default,C=h(135).default,m=h(165).default,c=h(171).default,u=h(178).default,s=h(180).default,f=h(181).default,e=h(182).default,t=h(183).default,n=h(186).default,i=h(187).default,r=h(190).default,l=h(191).default,d=h(54).default,a=h(54),v=a.printStyle,y=h(84),b=y.allOptions,P=y.configureOptions,D=h(193).default;function O(E,A,Y){var X=this;if(!(this instanceof O))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:I,clickToUse:!1},p.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 T(function(){return X.body.emitter.emit("_requestRedraw")}),this.groups=new R,this.canvas=new f(this.body),this.selectionHandler=new n(this.body,this.canvas),this.interactionHandler=new t(this.body,this.canvas,this.selectionHandler),this.view=new e(this.body,this.canvas),this.renderer=new s(this.body,this.canvas),this.physics=new c(this.body),this.layoutEngine=new i(this.body),this.clustering=new u(this.body),this.manipulation=new r(this.body,this.canvas,this.selectionHandler),this.nodesHandler=new C(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new m(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new D(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(Y),this.setData(A)}w(O.prototype),O.prototype.setOptions=function(E){var A=this;if(E===null&&(E=void 0),E!==void 0){var Y=d.validate(E,b);Y===!0&&console.log("%cErrors have been found in the supplied options object.",v);var X=["locale","locales","clickToUse"];if(p.selectiveDeepExtend(X,this.options,E),E=this.layoutEngine.setOptions(E.layout,E),this.canvas.setOptions(E),this.groups.setOptions(E.groups),this.nodesHandler.setOptions(E.nodes),this.edgesHandler.setOptions(E.edges),this.physics.setOptions(E.physics),this.manipulation.setOptions(E.manipulation,E,this.options),this.interactionHandler.setOptions(E.interaction),this.renderer.setOptions(E.interaction),this.selectionHandler.setOptions(E.interaction),E.groups!==void 0&&this.body.emitter.emit("refreshNodes"),"configure"in E&&(this.configurator||(this.configurator=new l(this,this.body.container,P,this.canvas.pixelRatio)),this.configurator.setOptions(E.configure)),this.configurator&&this.configurator.options.enabled===!0){var U={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};p.deepExtend(U.nodes,this.nodesHandler.options),p.deepExtend(U.edges,this.edgesHandler.options),p.deepExtend(U.layout,this.layoutEngine.options),p.deepExtend(U.interaction,this.selectionHandler.options),p.deepExtend(U.interaction,this.renderer.options),p.deepExtend(U.interaction,this.interactionHandler.options),p.deepExtend(U.manipulation,this.manipulation.options),p.deepExtend(U.physics,this.physics.options),p.deepExtend(U.global,this.canvas.options),p.deepExtend(U.global,this.options),this.configurator.setModuleOptions(U)}E.clickToUse!==void 0?E.clickToUse===!0?this.activator===void 0&&(this.activator=new x(this.canvas.frame),this.activator.on("change",function(){A.body.emitter.emit("activate")})):(this.activator!==void 0&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}},O.prototype._updateVisibleIndices=function(){var E=this.body.nodes,A=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(var Y in E)E.hasOwnProperty(Y)&&!this.clustering._isClusteredNode(Y)&&E[Y].options.hidden===!1&&this.body.nodeIndices.push(E[Y].id);for(var X in A)if(A.hasOwnProperty(X)){var U=A[X],Z=E[U.fromId],re=E[U.toId],le=Z!==void 0&&re!==void 0,he=!this.clustering._isClusteredEdge(X)&&U.options.hidden===!1&&le&&Z.options.hidden===!1&&re.options.hidden===!1;he&&this.body.edgeIndices.push(U.id)}},O.prototype.bindEventListeners=function(){var E=this;this.body.emitter.on("_dataChanged",function(){E.edgesHandler._updateState(),E.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",function(){E.clustering._updateState(),E._updateVisibleIndices(),E._updateValueRange(E.body.nodes),E._updateValueRange(E.body.edges),E.body.emitter.emit("startSimulation"),E.body.emitter.emit("_requestRedraw")})},O.prototype.setData=function(E){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),E&&E.dot&&(E.nodes||E.edges))throw new SyntaxError('Data must contain either parameter "dot" or  parameter pair "nodes" and "edges", but not both.');if(this.setOptions(E&&E.options),E&&E.dot){console.log("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");var A=S.DOTToGraph(E.dot);this.setData(A);return}else if(E&&E.gephi){console.log("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");var Y=M.parseGephi(E.gephi);this.setData(Y);return}else this.nodesHandler.setData(E&&E.nodes,!0),this.edgesHandler.setData(E&&E.edges,!0);this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")},O.prototype.destroy=function(){this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images;for(var E in this.body.nodes)this.body.nodes.hasOwnProperty(E)&&delete this.body.nodes[E];for(var A in this.body.edges)this.body.edges.hasOwnProperty(A)&&delete this.body.edges[A];p.recursiveDOMDelete(this.body.container)},O.prototype._updateValueRange=function(E){var A,Y=void 0,X=void 0,U=0;for(A in E)if(E.hasOwnProperty(A)){var Z=E[A].getValue();Z!==void 0&&(Y=Y===void 0?Z:Math.min(Z,Y),X=X===void 0?Z:Math.max(Z,X),U+=Z)}if(Y!==void 0&&X!==void 0)for(A in E)E.hasOwnProperty(A)&&E[A].setValueRange(Y,X,U)},O.prototype.isActive=function(){return!this.activator||this.activator.active},O.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)},O.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)},O.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)},O.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)},O.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)},O.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)},O.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)},O.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)},O.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)},O.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)},O.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)},O.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)},O.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)},O.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)},O.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)},O.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)},O.prototype.editNodeMode=function(){return console.log("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)},O.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)},O.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)},O.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)},O.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)},O.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)},O.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)},O.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)},O.prototype.getConnectedNodes=function(E){return this.body.nodes[E]!==void 0?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)},O.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)},O.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)},O.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)},O.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)},O.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)},O.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)},O.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodes.apply(this.selectionHandler,arguments)},O.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdges.apply(this.selectionHandler,arguments)},O.prototype.getNodeAt=function(){var E=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return E!==void 0&&E.id!==void 0?E.id:E},O.prototype.getEdgeAt=function(){var E=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return E!==void 0&&E.id!==void 0?E.id:E},O.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)},O.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)},O.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.redraw()},O.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)},O.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)},O.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)},O.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)},O.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)},O.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)},O.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)},O.prototype.getOptionsFromConfigurator=function(){var E={};return this.configurator&&(E=this.configurator.getOptions.apply(this.configurator)),E},L.exports=O},function(L,k,h){"use strict";typeof CanvasRenderingContext2D<"u"&&(CanvasRenderingContext2D.prototype.circle=function(w,p,S){this.beginPath(),this.arc(w,p,S,0,2*Math.PI,!1),this.closePath()},CanvasRenderingContext2D.prototype.square=function(w,p,S){this.beginPath(),this.rect(w-S,p-S,S*2,S*2),this.closePath()},CanvasRenderingContext2D.prototype.triangle=function(w,p,S){this.beginPath(),S*=1.15,p+=.275*S;var M=S*2,x=M/2,I=Math.sqrt(3)/6*M,T=Math.sqrt(M*M-x*x);this.moveTo(w,p-(T-I)),this.lineTo(w+x,p+I),this.lineTo(w-x,p+I),this.lineTo(w,p-(T-I)),this.closePath()},CanvasRenderingContext2D.prototype.triangleDown=function(w,p,S){this.beginPath(),S*=1.15,p-=.275*S;var M=S*2,x=M/2,I=Math.sqrt(3)/6*M,T=Math.sqrt(M*M-x*x);this.moveTo(w,p+(T-I)),this.lineTo(w+x,p-I),this.lineTo(w-x,p-I),this.lineTo(w,p+(T-I)),this.closePath()},CanvasRenderingContext2D.prototype.star=function(w,p,S){this.beginPath(),S*=.82,p+=.1*S;for(var M=0;M<10;M++){var x=M%2===0?S*1.3:S*.5;this.lineTo(w+x*Math.sin(M*2*Math.PI/10),p-x*Math.cos(M*2*Math.PI/10))}this.closePath()},CanvasRenderingContext2D.prototype.diamond=function(w,p,S){this.beginPath(),this.lineTo(w,p+S),this.lineTo(w+S,p),this.lineTo(w,p-S),this.lineTo(w-S,p),this.closePath()},CanvasRenderingContext2D.prototype.roundRect=function(w,p,S,M,x){var I=Math.PI/180;S-2*x<0&&(x=S/2),M-2*x<0&&(x=M/2),this.beginPath(),this.moveTo(w+x,p),this.lineTo(w+S-x,p),this.arc(w+S-x,p+x,x,I*270,I*360,!1),this.lineTo(w+S,p+M-x),this.arc(w+S-x,p+M-x,x,0,I*90,!1),this.lineTo(w+x,p+M),this.arc(w+x,p+M-x,x,I*90,I*180,!1),this.lineTo(w,p+x),this.arc(w+x,p+x,x,I*180,I*270,!1),this.closePath()},CanvasRenderingContext2D.prototype.ellipse_vis=function(w,p,S,M){var x=.5522848,I=S/2*x,T=M/2*x,R=w+S,C=p+M,m=w+S/2,c=p+M/2;this.beginPath(),this.moveTo(w,c),this.bezierCurveTo(w,c-T,m-I,p,m,p),this.bezierCurveTo(m+I,p,R,c-T,R,c),this.bezierCurveTo(R,c+T,m+I,C,m,C),this.bezierCurveTo(m-I,C,w,c+T,w,c),this.closePath()},CanvasRenderingContext2D.prototype.database=function(w,p,S,M){var x=.3333333333333333,I=S,T=M*x,R=.5522848,C=I/2*R,m=T/2*R,c=w+I,u=p+T,s=w+I/2,f=p+T/2,e=p+(M-T/2),t=p+M;this.beginPath(),this.moveTo(c,f),this.bezierCurveTo(c,f+m,s+C,u,s,u),this.bezierCurveTo(s-C,u,w,f+m,w,f),this.bezierCurveTo(w,f-m,s-C,p,s,p),this.bezierCurveTo(s+C,p,c,f-m,c,f),this.lineTo(c,e),this.bezierCurveTo(c,e+m,s+C,t,s,t),this.bezierCurveTo(s-C,t,w,e+m,w,e),this.lineTo(w,f)},CanvasRenderingContext2D.prototype.dashedLine=function(w,p,S,M,x){this.beginPath(),this.moveTo(w,p);for(var I=x.length,T=S-w,R=M-p,C=R/T,m=Math.sqrt(T*T+R*R),c=0,u=!0,s=0,f=x[0];m>=.1;)f=x[c++%I],f>m&&(f=m),s=Math.sqrt(f*f/(1+C*C)),s=T<0?-s:s,w+=s,p+=C*s,u===!0?this.lineTo(w,p):this.moveTo(w,p),m-=f,u=!u},CanvasRenderingContext2D.prototype.hexagon=function(w,p,S){this.beginPath();var M=6,x=Math.PI*2/M;this.moveTo(w+S,p);for(var I=1;I<M;I++)this.lineTo(w+S*Math.cos(x*I),p+S*Math.sin(x*I));this.closePath()})},function(L,k,h){"use strict";var w=h(52),p=h(73),S=h(24),M=h(2);function x(T){this.active=!1,this.dom={container:T},this.dom.overlay=document.createElement("div"),this.dom.overlay.className="vis-overlay",this.dom.container.appendChild(this.dom.overlay),this.hammer=S(this.dom.overlay),this.hammer.on("tap",this._onTapOverlay.bind(this));var R=this,C=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];C.forEach(function(m){R.hammer.on(m,function(c){c.stopPropagation()})}),document&&document.body&&(this.onClick=function(m){I(m.target,T)||R.deactivate()},document.body.addEventListener("click",this.onClick)),this.keycharm!==void 0&&this.keycharm.destroy(),this.keycharm=w(),this.escListener=this.deactivate.bind(this)}p(x.prototype),x.current=null,x.prototype.destroy=function(){this.deactivate(),this.dom.overlay.parentNode.removeChild(this.dom.overlay),this.onClick&&document.body.removeEventListener("click",this.onClick),this.keycharm!==void 0&&this.keycharm.destroy(),this.keycharm=null,this.hammer.destroy(),this.hammer=null},x.prototype.activate=function(){x.current&&x.current.deactivate(),x.current=this,this.active=!0,this.dom.overlay.style.display="none",M.addClassName(this.dom.container,"vis-active"),this.emit("change"),this.emit("activate"),this.keycharm.bind("esc",this.escListener)},x.prototype.deactivate=function(){this.active=!1,this.dom.overlay.style.display="",M.removeClassName(this.dom.container,"vis-active"),this.keycharm.unbind("esc",this.escListener),this.emit("change"),this.emit("deactivate")},x.prototype._onTapOverlay=function(T){this.activate(),T.stopPropagation()};function I(T,R){for(;T;){if(T===R)return!0;T=T.parentNode}return!1}L.exports=x},function(L,k,h){"use strict";var w,p,S;(function(M){p=[],w=M,S=typeof w=="function"?w.apply(k,p):w,S!==void 0&&(L.exports=S)})(function(){var M=null;return function x(I,T){var R=T||{preventDefault:!1};if(I.Manager){var C=I,m=function(e,t){var n=Object.create(R);return t&&C.assign(n,t),x(new C(e,n),n)};return C.assign(m,C),m.Manager=function(e,t){var n=Object.create(R);return t&&C.assign(n,t),x(new C.Manager(e,n),n)},m}var c=Object.create(I),u=I.element;u.hammer||(u.hammer=[]),u.hammer.push(c),I.on("hammer.input",function(e){(R.preventDefault===!0||R.preventDefault===e.pointerType)&&e.preventDefault(),e.isFirst&&(M=e.target)}),c._handlers={},c.on=function(e,t){return s(e).forEach(function(n){var i=c._handlers[n];i||(c._handlers[n]=i=[],I.on(n,f)),i.push(t)}),c},c.off=function(e,t){return s(e).forEach(function(n){var i=c._handlers[n];i&&(i=t?i.filter(function(r){return r!==t}):[],i.length>0?c._handlers[n]=i:(I.off(n,f),delete c._handlers[n]))}),c},c.emit=function(e,t){M=t.target,I.emit(e,t)},c.destroy=function(){var e=I.element.hammer,t=e.indexOf(c);t!==-1&&e.splice(t,1),e.length||delete I.element.hammer,c._handlers={},I.destroy()};function s(e){return e.match(/[^ ]+/g)}function f(e){if(e.type!=="hammer.input"){if(e.srcEvent._handled||(e.srcEvent._handled={}),e.srcEvent._handled[e.type])return;e.srcEvent._handled[e.type]=!0}var t=!1;e.stopPropagation=function(){t=!0};var n=e.srcEvent.stopPropagation.bind(e.srcEvent);typeof n=="function"&&(e.srcEvent.stopPropagation=function(){n(),e.stopPropagation()}),e.firstTarget=M;for(var i=M;i&&!t;){var r=i.hammer;if(r){for(var l,d=0;d<r.length;d++)if(l=r[d]._handlers[e.type],l)for(var a=0;a<l.length&&!t;a++)l[a](e)}i=i.parentNode}}return c}})},function(L,k,h){var w;/*! Hammer.JS - v2.0.7 - 2016-04-22
* http://hammerjs.github.io/
*
* Copyright (c) 2016 Jorik Tangelder;
* Licensed under the MIT license */(function(p,S,M,x){"use strict";var I=["","webkit","Moz","MS","ms","o"],T=S.createElement("div"),R="function",C=Math.round,m=Math.abs,c=Date.now;function u(N,z,W){return setTimeout(l(N,W),z)}function s(N,z,W){return Array.isArray(N)?(f(N,W[z],W),!0):!1}function f(N,z,W){var j;if(N)if(N.forEach)N.forEach(z,W);else if(N.length!==x)for(j=0;j<N.length;)z.call(W,N[j],j,N),j++;else for(j in N)N.hasOwnProperty(j)&&z.call(W,N[j],j,N)}function e(N,z,W){var j="DEPRECATED METHOD: "+z+`
`+W+` AT 
`;return function(){var te=new Error("get-stack-trace"),oe=te&&te.stack?te.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",ye=p.console&&(p.console.warn||p.console.log);return ye&&ye.call(p.console,j,oe),N.apply(this,arguments)}}var t;typeof Object.assign!="function"?t=function(z){if(z===x||z===null)throw new TypeError("Cannot convert undefined or null to object");for(var W=Object(z),j=1;j<arguments.length;j++){var te=arguments[j];if(te!==x&&te!==null)for(var oe in te)te.hasOwnProperty(oe)&&(W[oe]=te[oe])}return W}:t=Object.assign;var n=e(function(z,W,j){for(var te=Object.keys(W),oe=0;oe<te.length;)(!j||j&&z[te[oe]]===x)&&(z[te[oe]]=W[te[oe]]),oe++;return z},"extend","Use `assign`."),i=e(function(z,W){return n(z,W,!0)},"merge","Use `assign`.");function r(N,z,W){var j=z.prototype,te;te=N.prototype=Object.create(j),te.constructor=N,te._super=j,W&&t(te,W)}function l(N,z){return function(){return N.apply(z,arguments)}}function d(N,z){return typeof N==R?N.apply(z&&z[0]||x,z):N}function a(N,z){return N===x?z:N}function v(N,z,W){f(D(z),function(j){N.addEventListener(j,W,!1)})}function y(N,z,W){f(D(z),function(j){N.removeEventListener(j,W,!1)})}function b(N,z){for(;N;){if(N==z)return!0;N=N.parentNode}return!1}function P(N,z){return N.indexOf(z)>-1}function D(N){return N.trim().split(/\s+/g)}function O(N,z,W){if(N.indexOf&&!W)return N.indexOf(z);for(var j=0;j<N.length;){if(W&&N[j][W]==z||!W&&N[j]===z)return j;j++}return-1}function E(N){return Array.prototype.slice.call(N,0)}function A(N,z,W){for(var j=[],te=[],oe=0;oe<N.length;){var ye=z?N[oe][z]:N[oe];O(te,ye)<0&&j.push(N[oe]),te[oe]=ye,oe++}return W&&(z?j=j.sort(function(Le,Ve){return Le[z]>Ve[z]}):j=j.sort()),j}function Y(N,z){for(var W,j,te=z[0].toUpperCase()+z.slice(1),oe=0;oe<I.length;){if(W=I[oe],j=W?W+te:z,j in N)return j;oe++}return x}var X=1;function U(){return X++}function Z(N){var z=N.ownerDocument||N;return z.defaultView||z.parentWindow||p}var re=/mobile|tablet|ip(ad|hone|od)|android/i,le="ontouchstart"in p,he=Y(p,"PointerEvent")!==x,ce=le&&re.test(navigator.userAgent),se="touch",G="pen",V="mouse",Q="kinect",K=25,J=1,_=2,ee=4,ue=8,pe=1,Te=2,Ee=4,ke=8,Me=16,Ie=Te|Ee,Ye=ke|Me,Se=Ie|Ye,je=["x","y"],ve=["clientX","clientY"];function ie(N,z){var W=this;this.manager=N,this.callback=z,this.element=N.element,this.target=N.options.inputTarget,this.domHandler=function(j){d(N.options.enable,[N])&&W.handler(j)},this.init()}ie.prototype={handler:function(){},init:function(){this.evEl&&v(this.element,this.evEl,this.domHandler),this.evTarget&&v(this.target,this.evTarget,this.domHandler),this.evWin&&v(Z(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&y(this.element,this.evEl,this.domHandler),this.evTarget&&y(this.target,this.evTarget,this.domHandler),this.evWin&&y(Z(this.element),this.evWin,this.domHandler)}};function ae(N){var z,W=N.options.inputClass;return W?z=W:he?z=Kt:ce?z=Ze:le?z=Zt:z=ut,new z(N,ge)}function ge(N,z,W){var j=W.pointers.length,te=W.changedPointers.length,oe=z&J&&j-te===0,ye=z&(ee|ue)&&j-te===0;W.isFirst=!!oe,W.isFinal=!!ye,oe&&(N.session={}),W.eventType=z,be(N,W),N.emit("hammer.input",W),N.recognize(W),N.session.prevInput=W}function be(N,z){var W=N.session,j=z.pointers,te=j.length;W.firstInput||(W.firstInput=Be(z)),te>1&&!W.firstMultiple?W.firstMultiple=Be(z):te===1&&(W.firstMultiple=!1);var oe=W.firstInput,ye=W.firstMultiple,Ae=ye?ye.center:oe.center,Le=z.center=dt(j);z.timeStamp=c(),z.deltaTime=z.timeStamp-oe.timeStamp,z.angle=Dt(Ae,Le),z.distance=We(Ae,Le),de(W,z),z.offsetDirection=Gt(z.deltaX,z.deltaY);var Ve=Ut(z.deltaTime,z.deltaX,z.deltaY);z.overallVelocityX=Ve.x,z.overallVelocityY=Ve.y,z.overallVelocity=m(Ve.x)>m(Ve.y)?Ve.x:Ve.y,z.scale=ye?xt(ye.pointers,j):1,z.rotation=ye?Xt(ye.pointers,j):0,z.maxPointers=W.prevInput?z.pointers.length>W.prevInput.maxPointers?z.pointers.length:W.prevInput.maxPointers:z.pointers.length,Re(W,z);var qe=N.element;b(z.srcEvent.target,qe)&&(qe=z.srcEvent.target),z.target=qe}function de(N,z){var W=z.center,j=N.offsetDelta||{},te=N.prevDelta||{},oe=N.prevInput||{};(z.eventType===J||oe.eventType===ee)&&(te=N.prevDelta={x:oe.deltaX||0,y:oe.deltaY||0},j=N.offsetDelta={x:W.x,y:W.y}),z.deltaX=te.x+(W.x-j.x),z.deltaY=te.y+(W.y-j.y)}function Re(N,z){var W=N.lastInterval||z,j=z.timeStamp-W.timeStamp,te,oe,ye,Ae;if(z.eventType!=ue&&(j>K||W.velocity===x)){var Le=z.deltaX-W.deltaX,Ve=z.deltaY-W.deltaY,qe=Ut(j,Le,Ve);oe=qe.x,ye=qe.y,te=m(qe.x)>m(qe.y)?qe.x:qe.y,Ae=Gt(Le,Ve),N.lastInterval=z}else te=W.velocity,oe=W.velocityX,ye=W.velocityY,Ae=W.direction;z.velocity=te,z.velocityX=oe,z.velocityY=ye,z.direction=Ae}function Be(N){for(var z=[],W=0;W<N.pointers.length;)z[W]={clientX:C(N.pointers[W].clientX),clientY:C(N.pointers[W].clientY)},W++;return{timeStamp:c(),pointers:z,center:dt(z),deltaX:N.deltaX,deltaY:N.deltaY}}function dt(N){var z=N.length;if(z===1)return{x:C(N[0].clientX),y:C(N[0].clientY)};for(var W=0,j=0,te=0;te<z;)W+=N[te].clientX,j+=N[te].clientY,te++;return{x:C(W/z),y:C(j/z)}}function Ut(N,z,W){return{x:z/N||0,y:W/N||0}}function Gt(N,z){return N===z?pe:m(N)>=m(z)?N<0?Te:Ee:z<0?ke:Me}function We(N,z,W){W||(W=je);var j=z[W[0]]-N[W[0]],te=z[W[1]]-N[W[1]];return Math.sqrt(j*j+te*te)}function Dt(N,z,W){W||(W=je);var j=z[W[0]]-N[W[0]],te=z[W[1]]-N[W[1]];return Math.atan2(te,j)*180/Math.PI}function Xt(N,z){return Dt(z[1],z[0],ve)+Dt(N[1],N[0],ve)}function xt(N,z){return We(z[0],z[1],ve)/We(N[0],N[1],ve)}var De={mousedown:J,mousemove:_,mouseup:ee},li="mousedown",di="mousemove mouseup";function ut(){this.evEl=li,this.evWin=di,this.pressed=!1,ie.apply(this,arguments)}r(ut,ie,{handler:function(z){var W=De[z.type];W&J&&z.button===0&&(this.pressed=!0),W&_&&z.which!==1&&(W=ee),this.pressed&&(W&ee&&(this.pressed=!1),this.callback(this.manager,W,{pointers:[z],changedPointers:[z],pointerType:V,srcEvent:z}))}});var $t={pointerdown:J,pointermove:_,pointerup:ee,pointercancel:ue,pointerout:ue},Pt={2:se,3:G,4:V,5:Q},ui="pointerdown",Et="pointermove pointerup pointercancel";p.MSPointerEvent&&!p.PointerEvent&&(ui="MSPointerDown",Et="MSPointerMove MSPointerUp MSPointerCancel");function Kt(){this.evEl=ui,this.evWin=Et,ie.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}r(Kt,ie,{handler:function(z){var W=this.store,j=!1,te=z.type.toLowerCase().replace("ms",""),oe=$t[te],ye=Pt[z.pointerType]||z.pointerType,Ae=ye==se,Le=O(W,z.pointerId,"pointerId");oe&J&&(z.button===0||Ae)?Le<0&&(W.push(z),Le=W.length-1):oe&(ee|ue)&&(j=!0),!(Le<0)&&(W[Le]=z,this.callback(this.manager,oe,{pointers:W,changedPointers:[z],pointerType:ye,srcEvent:z}),j&&W.splice(Le,1))}});var Ft={touchstart:J,touchmove:_,touchend:ee,touchcancel:ue},bi="touchstart",kt="touchstart touchmove touchend touchcancel";function It(){this.evTarget=bi,this.evWin=kt,this.started=!1,ie.apply(this,arguments)}r(It,ie,{handler:function(z){var W=Ft[z.type];if(W===J&&(this.started=!0),!!this.started){var j=fe.call(this,z,W);W&(ee|ue)&&j[0].length-j[1].length===0&&(this.started=!1),this.callback(this.manager,W,{pointers:j[0],changedPointers:j[1],pointerType:se,srcEvent:z})}}});function fe(N,z){var W=E(N.touches),j=E(N.changedTouches);return z&(ee|ue)&&(W=A(W.concat(j),"identifier",!0)),[W,j]}var wi={touchstart:J,touchmove:_,touchend:ee,touchcancel:ue},Ci="touchstart touchmove touchend touchcancel";function Ze(){this.evTarget=Ci,this.targetIds={},ie.apply(this,arguments)}r(Ze,ie,{handler:function(z){var W=wi[z.type],j=jt.call(this,z,W);j&&this.callback(this.manager,W,{pointers:j[0],changedPointers:j[1],pointerType:se,srcEvent:z})}});function jt(N,z){var W=E(N.touches),j=this.targetIds;if(z&(J|_)&&W.length===1)return j[W[0].identifier]=!0,[W,W];var te,oe,ye=E(N.changedTouches),Ae=[],Le=this.target;if(oe=W.filter(function(Ve){return b(Ve.target,Le)}),z===J)for(te=0;te<oe.length;)j[oe[te].identifier]=!0,te++;for(te=0;te<ye.length;)j[ye[te].identifier]&&Ae.push(ye[te]),z&(ee|ue)&&delete j[ye[te].identifier],te++;if(Ae.length)return[A(oe.concat(Ae),"identifier",!0),Ae]}var xe=2500,vt=25;function Zt(){ie.apply(this,arguments);var N=l(this.handler,this);this.touch=new Ze(this.manager,N),this.mouse=new ut(this.manager,N),this.primaryTouch=null,this.lastTouches=[]}r(Zt,ie,{handler:function(z,W,j){var te=j.pointerType==se,oe=j.pointerType==V;if(!(oe&&j.sourceCapabilities&&j.sourceCapabilities.firesTouchEvents)){if(te)Xe.call(this,W,j);else if(oe&&Je.call(this,j))return;this.callback(z,W,j)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function Xe(N,z){N&J?(this.primaryTouch=z.changedPointers[0].identifier,Qe.call(this,z)):N&(ee|ue)&&Qe.call(this,z)}function Qe(N){var z=N.changedPointers[0];if(z.identifier===this.primaryTouch){var W={x:z.clientX,y:z.clientY};this.lastTouches.push(W);var j=this.lastTouches,te=function(){var oe=j.indexOf(W);oe>-1&&j.splice(oe,1)};setTimeout(te,xe)}}function Je(N){for(var z=N.srcEvent.clientX,W=N.srcEvent.clientY,j=0;j<this.lastTouches.length;j++){var te=this.lastTouches[j],oe=Math.abs(z-te.x),ye=Math.abs(W-te.y);if(oe<=vt&&ye<=vt)return!0}return!1}var Ne=Y(T.style,"touchAction"),Ue=Ne!==x,_e="compute",rt="auto",Qt="manipulation",ht="none",tt="pan-x",st="pan-y",St=Rt();function Jt(N,z){this.manager=N,this.set(z)}Jt.prototype={set:function(N){N==_e&&(N=this.compute()),Ue&&this.manager.element.style&&St[N]&&(this.manager.element.style[Ne]=N),this.actions=N.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var N=[];return f(this.manager.recognizers,function(z){d(z.options.enable,[z])&&(N=N.concat(z.getTouchAction()))}),gt(N.join(" "))},preventDefaults:function(N){var z=N.srcEvent,W=N.offsetDirection;if(this.manager.session.prevented){z.preventDefault();return}var j=this.actions,te=P(j,ht)&&!St[ht],oe=P(j,st)&&!St[st],ye=P(j,tt)&&!St[tt];if(te){var Ae=N.pointers.length===1,Le=N.distance<2,Ve=N.deltaTime<250;if(Ae&&Le&&Ve)return}if(!(ye&&oe)&&(te||oe&&W&Ie||ye&&W&Ye))return this.preventSrc(z)},preventSrc:function(N){this.manager.session.prevented=!0,N.preventDefault()}};function gt(N){if(P(N,ht))return ht;var z=P(N,tt),W=P(N,st);return z&&W?ht:z||W?z?tt:st:P(N,Qt)?Qt:rt}function Rt(){if(!Ue)return!1;var N={},z=p.CSS&&p.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(W){N[W]=z?p.CSS.supports("touch-action",W):!0}),N}var Ot=1,Ge=2,mt=4,at=8,Oe=at,ot=16,$e=32;function it(N){this.options=t({},this.defaults,N||{}),this.id=U(),this.manager=null,this.options.enable=a(this.options.enable,!0),this.state=Ot,this.simultaneous={},this.requireFail=[]}it.prototype={defaults:{},set:function(N){return t(this.options,N),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(N){if(s(N,"recognizeWith",this))return this;var z=this.simultaneous;return N=Bt(N,this),z[N.id]||(z[N.id]=N,N.recognizeWith(this)),this},dropRecognizeWith:function(N){return s(N,"dropRecognizeWith",this)?this:(N=Bt(N,this),delete this.simultaneous[N.id],this)},requireFailure:function(N){if(s(N,"requireFailure",this))return this;var z=this.requireFail;return N=Bt(N,this),O(z,N)===-1&&(z.push(N),N.requireFailure(this)),this},dropRequireFailure:function(N){if(s(N,"dropRequireFailure",this))return this;N=Bt(N,this);var z=O(this.requireFail,N);return z>-1&&this.requireFail.splice(z,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(N){return!!this.simultaneous[N.id]},emit:function(N){var z=this,W=this.state;function j(te){z.manager.emit(te,N)}W<at&&j(z.options.event+hi(W)),j(z.options.event),N.additionalEvent&&j(N.additionalEvent),W>=at&&j(z.options.event+hi(W))},tryEmit:function(N){if(this.canEmit())return this.emit(N);this.state=$e},canEmit:function(){for(var N=0;N<this.requireFail.length;){if(!(this.requireFail[N].state&($e|Ot)))return!1;N++}return!0},recognize:function(N){var z=t({},N);if(!d(this.options.enable,[this,z])){this.reset(),this.state=$e;return}this.state&(Oe|ot|$e)&&(this.state=Ot),this.state=this.process(z),this.state&(Ge|mt|at|ot)&&this.tryEmit(z)},process:function(N){},getTouchAction:function(){},reset:function(){}};function hi(N){return N&ot?"cancel":N&at?"end":N&mt?"move":N&Ge?"start":""}function _t(N){return N==Me?"down":N==ke?"up":N==Te?"left":N==Ee?"right":""}function Bt(N,z){var W=z.manager;return W?W.get(N):N}function Ke(){it.apply(this,arguments)}r(Ke,it,{defaults:{pointers:1},attrTest:function(N){var z=this.options.pointers;return z===0||N.pointers.length===z},process:function(N){var z=this.state,W=N.eventType,j=z&(Ge|mt),te=this.attrTest(N);return j&&(W&ue||!te)?z|ot:j||te?W&ee?z|at:z&Ge?z|mt:Ge:$e}});function Nt(){Ke.apply(this,arguments),this.pX=null,this.pY=null}r(Nt,Ke,{defaults:{event:"pan",threshold:10,pointers:1,direction:Se},getTouchAction:function(){var N=this.options.direction,z=[];return N&Ie&&z.push(st),N&Ye&&z.push(tt),z},directionTest:function(N){var z=this.options,W=!0,j=N.distance,te=N.direction,oe=N.deltaX,ye=N.deltaY;return te&z.direction||(z.direction&Ie?(te=oe===0?pe:oe<0?Te:Ee,W=oe!=this.pX,j=Math.abs(N.deltaX)):(te=ye===0?pe:ye<0?ke:Me,W=ye!=this.pY,j=Math.abs(N.deltaY))),N.direction=te,W&&j>z.threshold&&te&z.direction},attrTest:function(N){return Ke.prototype.attrTest.call(this,N)&&(this.state&Ge||!(this.state&Ge)&&this.directionTest(N))},emit:function(N){this.pX=N.deltaX,this.pY=N.deltaY;var z=_t(N.direction);z&&(N.additionalEvent=this.options.event+z),this._super.emit.call(this,N)}});function At(){Ke.apply(this,arguments)}r(At,Ke,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ht]},attrTest:function(N){return this._super.attrTest.call(this,N)&&(Math.abs(N.scale-1)>this.options.threshold||this.state&Ge)},emit:function(N){if(N.scale!==1){var z=N.scale<1?"in":"out";N.additionalEvent=this.options.event+z}this._super.emit.call(this,N)}});function zt(){it.apply(this,arguments),this._timer=null,this._input=null}r(zt,it,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[rt]},process:function(N){var z=this.options,W=N.pointers.length===z.pointers,j=N.distance<z.threshold,te=N.deltaTime>z.time;if(this._input=N,!j||!W||N.eventType&(ee|ue)&&!te)this.reset();else if(N.eventType&J)this.reset(),this._timer=u(function(){this.state=Oe,this.tryEmit()},z.time,this);else if(N.eventType&ee)return Oe;return $e},reset:function(){clearTimeout(this._timer)},emit:function(N){this.state===Oe&&(N&&N.eventType&ee?this.manager.emit(this.options.event+"up",N):(this._input.timeStamp=c(),this.manager.emit(this.options.event,this._input)))}});function qt(){Ke.apply(this,arguments)}r(qt,Ke,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ht]},attrTest:function(N){return this._super.attrTest.call(this,N)&&(Math.abs(N.rotation)>this.options.threshold||this.state&Ge)}});function ei(){Ke.apply(this,arguments)}r(ei,Ke,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ie|Ye,pointers:1},getTouchAction:function(){return Nt.prototype.getTouchAction.call(this)},attrTest:function(N){var z=this.options.direction,W;return z&(Ie|Ye)?W=N.overallVelocity:z&Ie?W=N.overallVelocityX:z&Ye&&(W=N.overallVelocityY),this._super.attrTest.call(this,N)&&z&N.offsetDirection&&N.distance>this.options.threshold&&N.maxPointers==this.options.pointers&&m(W)>this.options.velocity&&N.eventType&ee},emit:function(N){var z=_t(N.offsetDirection);z&&this.manager.emit(this.options.event+z,N),this.manager.emit(this.options.event,N)}});function Lt(){it.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}r(Lt,it,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Qt]},process:function(N){var z=this.options,W=N.pointers.length===z.pointers,j=N.distance<z.threshold,te=N.deltaTime<z.time;if(this.reset(),N.eventType&J&&this.count===0)return this.failTimeout();if(j&&te&&W){if(N.eventType!=ee)return this.failTimeout();var oe=this.pTime?N.timeStamp-this.pTime<z.interval:!0,ye=!this.pCenter||We(this.pCenter,N.center)<z.posThreshold;this.pTime=N.timeStamp,this.pCenter=N.center,!ye||!oe?this.count=1:this.count+=1,this._input=N;var Ae=this.count%z.taps;if(Ae===0)return this.hasRequireFailures()?(this._timer=u(function(){this.state=Oe,this.tryEmit()},z.interval,this),Ge):Oe}return $e},failTimeout:function(){return this._timer=u(function(){this.state=$e},this.options.interval,this),$e},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Oe&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function ft(N,z){return z=z||{},z.recognizers=a(z.recognizers,ft.defaults.preset),new ii(N,z)}ft.VERSION="2.0.7",ft.defaults={domEvents:!1,touchAction:_e,enable:!0,inputTarget:null,inputClass:null,preset:[[qt,{enable:!1}],[At,{enable:!1},["rotate"]],[ei,{direction:Ie}],[Nt,{direction:Ie},["swipe"]],[Lt],[Lt,{event:"doubletap",taps:2},["tap"]],[zt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Ei=1,ti=2;function ii(N,z){this.options=t({},ft.defaults,z||{}),this.options.inputTarget=this.options.inputTarget||N,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=N,this.input=ae(this),this.touchAction=new Jt(this,this.options.touchAction),pt(this,!0),f(this.options.recognizers,function(W){var j=this.add(new W[0](W[1]));W[2]&&j.recognizeWith(W[2]),W[3]&&j.requireFailure(W[3])},this)}ii.prototype={set:function(N){return t(this.options,N),N.touchAction&&this.touchAction.update(),N.inputTarget&&(this.input.destroy(),this.input.target=N.inputTarget,this.input.init()),this},stop:function(N){this.session.stopped=N?ti:Ei},recognize:function(N){var z=this.session;if(!z.stopped){this.touchAction.preventDefaults(N);var W,j=this.recognizers,te=z.curRecognizer;(!te||te&&te.state&Oe)&&(te=z.curRecognizer=null);for(var oe=0;oe<j.length;)W=j[oe],z.stopped!==ti&&(!te||W==te||W.canRecognizeWith(te))?W.recognize(N):W.reset(),!te&&W.state&(Ge|mt|at)&&(te=z.curRecognizer=W),oe++}},get:function(N){if(N instanceof it)return N;for(var z=this.recognizers,W=0;W<z.length;W++)if(z[W].options.event==N)return z[W];return null},add:function(N){if(s(N,"add",this))return this;var z=this.get(N.options.event);return z&&this.remove(z),this.recognizers.push(N),N.manager=this,this.touchAction.update(),N},remove:function(N){if(s(N,"remove",this))return this;if(N=this.get(N),N){var z=this.recognizers,W=O(z,N);W!==-1&&(z.splice(W,1),this.touchAction.update())}return this},on:function(N,z){if(N!==x&&z!==x){var W=this.handlers;return f(D(N),function(j){W[j]=W[j]||[],W[j].push(z)}),this}},off:function(N,z){if(N!==x){var W=this.handlers;return f(D(N),function(j){z?W[j]&&W[j].splice(O(W[j],z),1):delete W[j]}),this}},emit:function(N,z){this.options.domEvents&&Ht(N,z);var W=this.handlers[N]&&this.handlers[N].slice();if(!(!W||!W.length)){z.type=N,z.preventDefault=function(){z.srcEvent.preventDefault()};for(var j=0;j<W.length;)W[j](z),j++}},destroy:function(){this.element&&pt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function pt(N,z){var W=N.element;if(W.style){var j;f(N.options.cssProps,function(te,oe){j=Y(W.style,oe),z?(N.oldCssProps[j]=W.style[j],W.style[j]=te):W.style[j]=N.oldCssProps[j]||""}),z||(N.oldCssProps={})}}function Ht(N,z){var W=S.createEvent("Event");W.initEvent(N,!0,!0),W.gesture=z,z.target.dispatchEvent(W)}t(ft,{INPUT_START:J,INPUT_MOVE:_,INPUT_END:ee,INPUT_CANCEL:ue,STATE_POSSIBLE:Ot,STATE_BEGAN:Ge,STATE_CHANGED:mt,STATE_ENDED:at,STATE_RECOGNIZED:Oe,STATE_CANCELLED:ot,STATE_FAILED:$e,DIRECTION_NONE:pe,DIRECTION_LEFT:Te,DIRECTION_RIGHT:Ee,DIRECTION_UP:ke,DIRECTION_DOWN:Me,DIRECTION_HORIZONTAL:Ie,DIRECTION_VERTICAL:Ye,DIRECTION_ALL:Se,Manager:ii,Input:ie,TouchAction:Jt,TouchInput:Ze,MouseInput:ut,PointerEventInput:Kt,TouchMouseInput:Zt,SingleTouchInput:It,Recognizer:it,AttrRecognizer:Ke,Tap:Lt,Pan:Nt,Swipe:ei,Pinch:At,Rotate:qt,Press:zt,on:v,off:y,each:f,merge:i,extend:n,assign:t,inherit:r,bindFn:l,prefixed:Y});var fi=typeof p<"u"?p:typeof self<"u"?self:{};fi.Hammer=ft,w=function(){return ft}.call(k,h,k,L),w!==x&&(L.exports=w)})(window,document,"Hammer")},function(L,k,h){"use strict";k.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."},k.en_EN=k.en,k.en_US=k.en,k.de={edit:"Editieren",del:"L\xF6sche Auswahl",back:"Zur\xFCck",addNode:"Knoten hinzuf\xFCgen",addEdge:"Kante hinzuf\xFCgen",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\xF6glich, Kanten mit Clustern zu verbinden.",deleteClusterError:"Cluster k\xF6nnen nicht gel\xF6scht werden.",editClusterError:"Cluster k\xF6nnen nicht editiert werden."},k.de_DE=k.de,k.es={edit:"Editar",del:"Eliminar selecci\xF3n",back:"\xC1tras",addNode:"A\xF1adir nodo",addEdge:"A\xF1adir arista",editNode:"Editar nodo",editEdge:"Editar arista",addDescription:"Haga clic en un lugar vac\xEDo 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."},k.es_ES=k.es,k.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."},k.it_IT=k.it,k.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."},k.nl_NL=k.nl,k.nl_BE=k.nl,k["pt-br"]={edit:"Editar",del:"Remover selecionado",back:"Voltar",addNode:"Adicionar n\xF3",addEdge:"Adicionar aresta",editNode:"Editar n\xF3",editEdge:"Editar aresta",addDescription:"Clique em um espa\xE7o em branco para adicionar um novo n\xF3",edgeDescription:"Clique em um n\xF3 e arraste a aresta at\xE9 outro n\xF3 para conect\xE1-los",editEdgeDescription:"Clique nos pontos de controle e os arraste para um n\xF3 para conect\xE1-los",createEdgeError:"N\xE3o foi poss\xEDvel linkar arestas a um cluster.",deleteClusterError:"Clusters n\xE3o puderam ser removidos.",editClusterError:"Clusters n\xE3o puderam ser editados."},k["pt-BR"]=k["pt-br"],k.pt_BR=k["pt-br"],k.pt_br=k["pt-br"],k.ru={edit:"\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C",del:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0435",back:"\u041D\u0430\u0437\u0430\u0434",addNode:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0443\u0437\u0435\u043B",addEdge:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0435\u0431\u0440\u043E",editNode:"\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0443\u0437\u0435\u043B",editEdge:"\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0440\u0435\u0431\u0440\u043E",addDescription:"\u041A\u043B\u0438\u043A\u043D\u0438\u0442\u0435 \u0432 \u0441\u0432\u043E\u0431\u043E\u0434\u043D\u043E\u0435 \u043C\u0435\u0441\u0442\u043E, \u0447\u0442\u043E\u0431\u044B \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u0443\u0437\u0435\u043B.",edgeDescription:"\u041A\u043B\u0438\u043A\u043D\u0438\u0442\u0435 \u043D\u0430 \u0443\u0437\u0435\u043B \u0438 \u043F\u0440\u043E\u0442\u044F\u043D\u0438\u0442\u0435 \u0440\u0435\u0431\u0440\u043E \u043A \u0434\u0440\u0443\u0433\u043E\u043C\u0443 \u0443\u0437\u043B\u0443, \u0447\u0442\u043E\u0431\u044B \u0441\u043E\u0435\u0434\u0438\u043D\u0438\u0442\u044C \u0438\u0445.",editEdgeDescription:"\u041A\u043B\u0438\u043A\u043D\u0438\u0442\u0435 \u043D\u0430 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u044C\u043D\u044B\u0435 \u0442\u043E\u0447\u043A\u0438 \u0438 \u043F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0438\u0445 \u0432 \u0443\u0437\u0435\u043B, \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C\u0441\u044F \u043A \u043D\u0435\u043C\u0443.",createEdgeError:"\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0441\u043E\u0435\u0434\u0438\u043D\u0438\u0442\u044C \u0440\u0435\u0431\u0440\u0430 \u0432 \u043A\u043B\u0430\u0441\u0442\u0435\u0440.",deleteClusterError:"\u041A\u043B\u0430\u0441\u0442\u0435\u0440\u044B \u043D\u0435 \u043C\u043E\u0433\u0443\u0442 \u0431\u044B\u0442\u044C \u0443\u0434\u0430\u043B\u0435\u043D\u044B",editClusterError:"\u041A\u043B\u0430\u0441\u0442\u0435\u0440\u044B \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B \u0434\u043B\u044F \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F."},k.ru_RU=k.ru,k.cn={edit:"\u7F16\u8F91",del:"\u5220\u9664\u9009\u5B9A",back:"\u8FD4\u56DE",addNode:"\u6DFB\u52A0\u8282\u70B9",addEdge:"\u6DFB\u52A0\u8FDE\u63A5\u7EBF",editNode:"\u7F16\u8F91\u8282\u70B9",editEdge:"\u7F16\u8F91\u8FDE\u63A5\u7EBF",addDescription:"\u5355\u51FB\u7A7A\u767D\u5904\u653E\u7F6E\u65B0\u8282\u70B9\u3002",edgeDescription:"\u5355\u51FB\u67D0\u4E2A\u8282\u70B9\u5E76\u5C06\u8BE5\u8FDE\u63A5\u7EBF\u62D6\u52A8\u5230\u53E6\u4E00\u4E2A\u8282\u70B9\u4EE5\u8FDE\u63A5\u5B83\u4EEC\u3002",editEdgeDescription:"\u5355\u51FB\u63A7\u5236\u8282\u70B9\u5E76\u5C06\u5B83\u4EEC\u62D6\u5230\u8282\u70B9\u4E0A\u8FDE\u63A5\u3002",createEdgeError:"\u65E0\u6CD5\u5C06\u8FDE\u63A5\u7EBF\u8FDE\u63A5\u5230\u7FA4\u96C6\u3002",deleteClusterError:"\u65E0\u6CD5\u5220\u9664\u7FA4\u96C6\u3002",editClusterError:"\u65E0\u6CD5\u7F16\u8F91\u7FA4\u96C6\u3002"},k.zh_CN=k.cn,k.uk={edit:"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438",del:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u043E\u0431\u0440\u0430\u043D\u0435",back:"\u041D\u0430\u0437\u0430\u0434",addNode:"\u0414\u043E\u0434\u0430\u0442\u0438 \u0432\u0443\u0437\u043E\u043B",addEdge:"\u0414\u043E\u0434\u0430\u0442\u0438 \u043A\u0440\u0430\u0439",editNode:"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0432\u0443\u0437\u043E\u043B",editEdge:"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u043A\u0440\u0430\u0439",addDescription:"K\u043B\u0456\u043A\u043D\u0456\u0442\u044C \u043D\u0430 \u0432\u0456\u043B\u044C\u043D\u0435 \u043C\u0456\u0441\u0446\u0435, \u0449\u043E\u0431 \u0434\u043E\u0434\u0430\u0442\u0438 \u043D\u043E\u0432\u0438\u0439 \u0432\u0443\u0437\u043E\u043B.",edgeDescription:"\u041A\u043B\u0456\u043A\u043D\u0456\u0442\u044C \u043D\u0430 \u0432\u0443\u0437\u043E\u043B \u0456 \u043F\u0435\u0440\u0435\u0442\u044F\u0433\u043D\u0456\u0442\u044C \u043A\u0440\u0430\u0439 \u0434\u043E \u0456\u043D\u0448\u043E\u0433\u043E \u0432\u0443\u0437\u043B\u0430, \u0449\u043E\u0431 \u0457\u0445 \u0437'\u0454\u0434\u043D\u0430\u0442\u0438.",editEdgeDescription:"\u041A\u043B\u0456\u043A\u043D\u0456\u0442\u044C \u043D\u0430 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u044C\u043D\u0456 \u0442\u043E\u0447\u043A\u0438 \u0456 \u043F\u0435\u0440\u0435\u0442\u044F\u0433\u043D\u0456\u0442\u044C \u0457\u0445 \u0443 \u0432\u0443\u0437\u043E\u043B, \u0449\u043E\u0431 \u043F\u0456\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u0438\u0441\u044F \u0434\u043E \u043D\u044C\u043E\u0433\u043E.",createEdgeError:"\u041D\u0435 \u043C\u043E\u0436\u043B\u0438\u0432\u043E \u043E\u0431'\u0454\u0434\u043D\u0430\u0442\u0438 \u043A\u0440\u0430\u0457 \u0432 \u0433\u0440\u0443\u043F\u0443.",deleteClusterError:"\u0413\u0440\u0443\u043F\u0438 \u043D\u0435 \u043C\u043E\u0436\u0443\u0442\u044C \u0431\u0443\u0442\u0438 \u0432\u0438\u0434\u0430\u043B\u0435\u043D\u0456.",editClusterError:"\u0413\u0440\u0443\u043F\u0438 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0456 \u0434\u043B\u044F \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u043D\u043D\u044F."},k.uk_UA=k.uk,k.fr={edit:"Editer",del:"Effacer la selection",back:"Retour",addNode:"Ajouter un noeud",addEdge:"Ajouter un lien",editNode:"Editer le noeud",editEdge:"Editer le lien",addDescription:"Cliquez dans un endroit vide pour placer un noeud.",edgeDescription:"Cliquez sur un noeud et glissez le lien vers un autre noeud pour les connecter.",editEdgeDescription:"Cliquez sur les points de contr\xF4le et glissez-les pour connecter un noeud.",createEdgeError:"Impossible de cr\xE9er un lien vers un cluster.",deleteClusterError:"Les clusters ne peuvent pas \xEAtre \xE9ffac\xE9s.",editClusterError:"Les clusters ne peuvent pas \xEAtre \xE9dites."},k.fr_FR=k.fr},function(L,k,h){L.exports={default:h(131),__esModule:!0}},function(L,k,h){h(132);var w=h(6).Object;L.exports=function(S,M,x){return w.defineProperty(S,M,x)}},function(L,k,h){var w=h(11);w(w.S+w.F*!h(13),"Object",{defineProperty:h(12).f})},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(0),p=x(w),S=h(1),M=x(S);function x(T){return T&&T.__esModule?T:{default:T}}var I=function(){function T(){(0,p.default)(this,T),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}return(0,M.default)(T,[{key:"init",value:function(){if(!this.initialized()){this.src=this.image.src;var C=this.image.width,m=this.image.height;this.width=C,this.height=m;var c=Math.floor(m/2),u=Math.floor(m/4),s=Math.floor(m/8),f=Math.floor(m/16),e=Math.floor(C/2),t=Math.floor(C/4),n=Math.floor(C/8),i=Math.floor(C/16);this.canvas.width=3*t,this.canvas.height=c,this.coordinates=[[0,0,e,c],[e,0,t,u],[e,u,n,s],[5*n,u,i,f]],this._fillMipMap()}}},{key:"initialized",value:function(){return this.coordinates!==void 0}},{key:"_fillMipMap",value:function(){var C=this.canvas.getContext("2d"),m=this.coordinates[0];C.drawImage(this.image,m[0],m[1],m[2],m[3]);for(var c=1;c<this.NUM_ITERATIONS;c++){var u=this.coordinates[c-1],s=this.coordinates[c];C.drawImage(this.canvas,u[0],u[1],u[2],u[3],s[0],s[1],s[2],s[3])}}},{key:"drawImageAtPosition",value:function(C,m,c,u,s,f){if(this.initialized())if(m>2){m*=.5;for(var e=0;m>2&&e<this.NUM_ITERATIONS;)m*=.5,e+=1;e>=this.NUM_ITERATIONS&&(e=this.NUM_ITERATIONS-1);var t=this.coordinates[e];C.drawImage(this.canvas,t[0],t[1],t[2],t[3],c,u,s,f)}else C.drawImage(this.image,c,u,s,f)}}]),T}();k.default=I},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(0),p=x(w),S=h(1),M=x(S);function x(R){return R&&R.__esModule?R:{default:R}}var I=h(2),T=function(){function R(){(0,p.default)(this,R),this.clear(),this.defaultIndex=0,this.groupsArray=[],this.groupIndex=0,this.defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},I.extend(this.options,this.defaultOptions)}return(0,M.default)(R,[{key:"setOptions",value:function(m){var c=["useDefaultGroups"];if(m!==void 0){for(var u in m)if(m.hasOwnProperty(u)&&c.indexOf(u)===-1){var s=m[u];this.add(u,s)}}}},{key:"clear",value:function(){this.groups={},this.groupsArray=[]}},{key:"get",value:function(m){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,u=this.groups[m];if(u===void 0&&c)if(this.options.useDefaultGroups===!1&&this.groupsArray.length>0){var s=this.groupIndex%this.groupsArray.length;this.groupIndex++,u={},u.color=this.groups[this.groupsArray[s]],this.groups[m]=u}else{var f=this.defaultIndex%this.defaultGroups.length;this.defaultIndex++,u={},u.color=this.defaultGroups[f],this.groups[m]=u}return u}},{key:"add",value:function(m,c){return this.groups[m]=c,this.groupsArray.push(m),c}}]),R}();k.default=T},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(0),p=x(w),S=h(1),M=x(S);function x(c){return c&&c.__esModule?c:{default:c}}var I=h(2),T=h(33),R=h(51),C=h(34).default,m=function(){function c(u,s,f,e){var t=this;if((0,p.default)(this,c),this.body=u,this.images=s,this.groups=f,this.layoutEngine=e,this.body.functions.createNode=this.create.bind(this),this.nodesListeners={add:function(i,r){t.add(r.items)},update:function(i,r){t.update(r.items,r.data,r.oldData)},remove:function(i,r){t.remove(r.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:2,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"center",vadjust:0,multi:!1,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"monospace",vadjust:2}},group:void 0,hidden:!1,icon:{face:"FontAwesome",code:void 0,size:50,color:"#2B7CE9"},image:void 0,label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(i,r,l,d){if(r===i)return .5;var a=1/(r-i);return Math.max(0,(d-i)*a)}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=I.bridgeObject(this.defaultOptions),this.bindEventListeners()}return(0,M.default)(c,[{key:"bindEventListeners",value:function(){var s=this;this.body.emitter.on("refreshNodes",this.refresh.bind(this)),this.body.emitter.on("refresh",this.refresh.bind(this)),this.body.emitter.on("destroy",function(){I.forEach(s.nodesListeners,function(f,e){s.body.data.nodes&&s.body.data.nodes.off(e,f)}),delete s.body.functions.createNode,delete s.nodesListeners.add,delete s.nodesListeners.update,delete s.nodesListeners.remove,delete s.nodesListeners})}},{key:"setOptions",value:function(s){if(s!==void 0){if(C.parseOptions(this.options,s),s.shape!==void 0)for(var f in this.body.nodes)this.body.nodes.hasOwnProperty(f)&&this.body.nodes[f].updateShape();if(s.font!==void 0)for(var e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&(this.body.nodes[e].updateLabelModule(),this.body.nodes[e].needsRefresh());if(s.size!==void 0)for(var t in this.body.nodes)this.body.nodes.hasOwnProperty(t)&&this.body.nodes[t].needsRefresh();(s.hidden!==void 0||s.physics!==void 0)&&this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(s){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e=this.body.data.nodes;if(s instanceof T||s instanceof R)this.body.data.nodes=s;else if(Array.isArray(s))this.body.data.nodes=new T,this.body.data.nodes.add(s);else if(!s)this.body.data.nodes=new T;else throw new TypeError("Array or DataSet expected");if(e&&I.forEach(this.nodesListeners,function(i,r){e.off(r,i)}),this.body.nodes={},this.body.data.nodes){var t=this;I.forEach(this.nodesListeners,function(i,r){t.body.data.nodes.on(r,i)});var n=this.body.data.nodes.getIds();this.add(n,!0)}f===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(s){for(var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e=void 0,t=[],n=0;n<s.length;n++){e=s[n];var i=this.body.data.nodes.get(e),r=this.create(i);t.push(r),this.body.nodes[e]=r}this.layoutEngine.positionInitially(t),f===!1&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(s,f,e){for(var t=this.body.nodes,n=!1,i=0;i<s.length;i++){var r=s[i],l=t[r],d=f[i];l!==void 0?l.setOptions(d)&&(n=!0):(n=!0,l=this.create(d),t[r]=l)}!n&&e!==void 0&&(n=f.some(function(a,v){var y=e[v];return y&&y.level!==a.level})),n===!0?this.body.emitter.emit("_dataChanged"):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(s){for(var f=this.body.nodes,e=0;e<s.length;e++){var t=s[e];delete f[t]}this.body.emitter.emit("_dataChanged")}},{key:"create",value:function(s){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C;return new f(s,this.body,this.images,this.groups,this.options,this.defaultOptions)}},{key:"refresh",value:function(){var s=this,f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;I.forEach(this.body.nodes,function(e,t){var n=s.body.data.nodes.get(t);n!==void 0&&(f===!0&&e.setOptions({x:null,y:null}),e.setOptions({fixed:!1}),e.setOptions(n))})}},{key:"getPositions",value:function(s){var f={};if(s!==void 0){if(Array.isArray(s)===!0){for(var e=0;e<s.length;e++)if(this.body.nodes[s[e]]!==void 0){var t=this.body.nodes[s[e]];f[s[e]]={x:Math.round(t.x),y:Math.round(t.y)}}}else if(this.body.nodes[s]!==void 0){var n=this.body.nodes[s];f[s]={x:Math.round(n.x),y:Math.round(n.y)}}}else for(var i=0;i<this.body.nodeIndices.length;i++){var r=this.body.nodes[this.body.nodeIndices[i]];f[this.body.nodeIndices[i]]={x:Math.round(r.x),y:Math.round(r.y)}}return f}},{key:"storePositions",value:function(){var s=[],f=this.body.data.nodes.getDataSet();for(var e in f._data)if(f._data.hasOwnProperty(e)){var t=this.body.nodes[e];(f._data[e].x!=Math.round(t.x)||f._data[e].y!=Math.round(t.y))&&s.push({id:t.id,x:Math.round(t.x),y:Math.round(t.y)})}f.update(s)}},{key:"getBoundingBox",value:function(s){if(this.body.nodes[s]!==void 0)return this.body.nodes[s].shape.boundingBox}},{key:"getConnectedNodes",value:function(s,f){var e=[];if(this.body.nodes[s]!==void 0)for(var t=this.body.nodes[s],n={},i=0;i<t.edges.length;i++){var r=t.edges[i];f!=="to"&&r.toId==t.id?n[r.fromId]===void 0&&(e.push(r.fromId),n[r.fromId]=!0):f!=="from"&&r.fromId==t.id&&n[r.toId]===void 0&&(e.push(r.toId),n[r.toId]=!0)}return e}},{key:"getConnectedEdges",value:function(s){var f=[];if(this.body.nodes[s]!==void 0)for(var e=this.body.nodes[s],t=0;t<e.edges.length;t++)f.push(e.edges[t].id);else console.log("NodeId provided for getConnectedEdges does not exist. Provided: ",s);return f}},{key:"moveNode",value:function(s,f,e){var t=this;this.body.nodes[s]!==void 0?(this.body.nodes[s].x=Number(f),this.body.nodes[s].y=Number(e),setTimeout(function(){t.body.emitter.emit("startSimulation")},0)):console.log("Node id supplied to moveNode does not exist. Provided: ",s)}}]),c}();k.default=m},function(L,k,h){L.exports={default:h(137),__esModule:!0}},function(L,k,h){h(37),h(47),L.exports=h(138)},function(L,k,h){var w=h(67),p=h(8)("iterator"),S=h(25);L.exports=h(6).isIterable=function(M){var x=Object(M);return x[p]!==void 0||"@@iterator"in x||S.hasOwnProperty(w(x))}},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(15),p=T(w),S=h(0),M=T(S),x=h(1),I=T(x);function T(s){return s&&s.__esModule?s:{default:s}}var R=h(140).default,C=h(35).default,m={"<b>":/<b>/,"<i>":/<i>/,"<code>":/<code>/,"</b>":/<\/b>/,"</i>":/<\/i>/,"</code>":/<\/code>/,"*":/\*/,_:/\_/,"`":/`/,afterBold:/[^\*]/,afterItal:/[^_]/,afterMono:/[^`]/},c=function(){function s(f){(0,M.default)(this,s),this.text=f,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}return(0,I.default)(s,[{key:"mod",value:function(){return this.modStack.length===0?"normal":this.modStack[0]}},{key:"modName",value:function(){if(this.modStack.length===0)return"normal";if(this.modStack[0]==="mono")return"mono";if(this.bold&&this.ital)return"boldital";if(this.bold)return"bold";if(this.ital)return"ital"}},{key:"emitBlock",value:function(){this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer="")}},{key:"add",value:function(e){e===" "&&(this.spacing=!0),this.spacing&&(this.buffer+=" ",this.spacing=!1),e!=" "&&(this.buffer+=e)}},{key:"parseWS",value:function(e){return/[ \t]/.test(e)?(this.mono?this.add(e):this.spacing=!0,!0):!1}},{key:"setTag",value:function(e){this.emitBlock(),this[e]=!0,this.modStack.unshift(e)}},{key:"unsetTag",value:function(e){this.emitBlock(),this[e]=!1,this.modStack.shift()}},{key:"parseStartTag",value:function(e,t){return!this.mono&&!this[e]&&this.match(t)?(this.setTag(e),!0):!1}},{key:"match",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this.prepareRegExp(e),i=(0,p.default)(n,2),r=i[0],l=i[1],d=r.test(this.text.substr(this.position,l));return d&&t&&(this.position+=l-1),d}},{key:"parseEndTag",value:function(e,t,n){var i=this.mod()===e;return e==="mono"?i=i&&this.mono:i=i&&!this.mono,i&&this.match(t)?(n!==void 0?(this.position===this.text.length-1||this.match(n,!1))&&this.unsetTag(e):this.unsetTag(e),!0):!1}},{key:"replace",value:function(e,t){return this.match(e)?(this.add(t),this.position+=length-1,!0):!1}},{key:"prepareRegExp",value:function(e){var t=void 0,n=void 0;if(e instanceof RegExp)n=e,t=1;else{var i=m[e];i!==void 0?n=i:n=new RegExp(e),t=e.length}return[n,t]}}]),s}(),u=function(){function s(f,e,t,n){var i=this;(0,M.default)(this,s),this.ctx=f,this.parent=e;var r=function(d,a){if(d===void 0)return 0;var v=i.parent.getFormattingValues(f,t,n,a),y=0;if(d!==""){var b=i.ctx.measureText(d);y=b.width}return{width:y,values:v}};this.lines=new R(r)}return(0,I.default)(s,[{key:"process",value:function(e){if(!C.isValidLabel(e))return this.lines.finalize();var t=this.parent.fontOptions;e=e.replace(/\r\n/g,`
`),e=e.replace(/\r/g,`
`);var n=String(e).split(`
`),i=n.length;if(t.multi)for(var r=0;r<i;r++){var l=this.splitBlocks(n[r],t.multi);if(l!==void 0){if(l.length===0){this.lines.newLine("");continue}if(t.maxWdt>0)for(var d=0;d<l.length;d++){var a=l[d].mod,v=l[d].text;this.splitStringIntoLines(v,a,!0)}else for(var y=0;y<l.length;y++){var b=l[y].mod,P=l[y].text;this.lines.append(P,b)}this.lines.newLine()}}else if(t.maxWdt>0)for(var D=0;D<i;D++)this.splitStringIntoLines(n[D]);else for(var O=0;O<i;O++)this.lines.newLine(n[O]);return this.lines.finalize()}},{key:"decodeMarkupSystem",value:function(e){var t="none";return e==="markdown"||e==="md"?t="markdown":(e===!0||e==="html")&&(t="html"),t}},{key:"splitHtmlBlocks",value:function(e){for(var t=new c(e),n=function(d){if(/&/.test(d)){var a=t.replace(t.text,"&lt;","<")||t.replace(t.text,"&amp;","&");return a||t.add("&"),!0}return!1};t.position<t.text.length;){var i=t.text.charAt(t.position),r=t.parseWS(i)||/</.test(i)&&(t.parseStartTag("bold","<b>")||t.parseStartTag("ital","<i>")||t.parseStartTag("mono","<code>")||t.parseEndTag("bold","</b>")||t.parseEndTag("ital","</i>")||t.parseEndTag("mono","</code>"))||n(i);r||t.add(i),t.position++}return t.emitBlock(),t.blocks}},{key:"splitMarkdownBlocks",value:function(e){for(var t=this,n=new c(e),i=!0,r=function(v){return/\\/.test(v)?(n.position<t.text.length+1&&(n.position++,v=t.text.charAt(n.position),/ \t/.test(v)?n.spacing=!0:(n.add(v),i=!1)),!0):!1};n.position<n.text.length;){var l=n.text.charAt(n.position),d=n.parseWS(l)||r(l)||(i||n.spacing)&&(n.parseStartTag("bold","*")||n.parseStartTag("ital","_")||n.parseStartTag("mono","`"))||n.parseEndTag("bold","*","afterBold")||n.parseEndTag("ital","_","afterItal")||n.parseEndTag("mono","`","afterMono");d||(n.add(l),i=!1),n.position++}return n.emitBlock(),n.blocks}},{key:"splitBlocks",value:function(e,t){var n=this.decodeMarkupSystem(t);if(n==="none")return[{text:e,mod:"normal"}];if(n==="markdown")return this.splitMarkdownBlocks(e);if(n==="html")return this.splitHtmlBlocks(e)}},{key:"overMaxWidth",value:function(e){var t=this.ctx.measureText(e).width;return this.lines.curWidth()+t>this.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(e){for(var t="",n=0;n<e.length;){var i=t===""?"":" ",r=t+i+e[n];if(this.overMaxWidth(r))break;t=r,n++}return n}},{key:"getLongestFitWord",value:function(e){for(var t=0;t<e.length&&!this.overMaxWidth(e.slice(0,t));)t++;return t}},{key:"splitStringIntoLines",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");for(var i=e.split("\r");i.length>0;){var r=this.getLongestFit(i);if(r===0){var l=i[0],d=this.getLongestFitWord(l);this.lines.newLine(l.slice(0,d),t),i[0]=l.slice(d)}else{var a=r;i[r-1]===" "?r--:i[a]===" "&&a++;var v=i.slice(0,r).join("");r==i.length&&n?this.lines.append(v,t):this.lines.newLine(v,t),i=i.slice(a)}}}}]),s}();k.default=u},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(78),p=T(w),S=h(0),M=T(S),x=h(1),I=T(x);function T(C){return C&&C.__esModule?C:{default:C}}var R=function(){function C(m){(0,M.default)(this,C),this.measureText=m,this.current=0,this.width=0,this.height=0,this.lines=[]}return(0,I.default)(C,[{key:"_add",value:function(c,u){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"normal";this.lines[c]===void 0&&(this.lines[c]={width:0,height:0,blocks:[]});var f=u;(u===void 0||u==="")&&(f=" ");var e=this.measureText(f,s),t=(0,p.default)({},e.values);t.text=u,t.width=e.width,t.mod=s,(u===void 0||u==="")&&(t.width=0),this.lines[c].blocks.push(t),this.lines[c].width+=t.width}},{key:"curWidth",value:function(){var c=this.lines[this.current];return c===void 0?0:c.width}},{key:"append",value:function(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,c,u)}},{key:"newLine",value:function(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,c,u),this.current++}},{key:"determineLineHeights",value:function(){for(var c=0;c<this.lines.length;c++){var u=this.lines[c],s=0;if(u.blocks!==void 0)for(var f=0;f<u.blocks.length;f++){var e=u.blocks[f];s<e.height&&(s=e.height)}u.height=s}}},{key:"determineLabelSize",value:function(){for(var c=0,u=0,s=0;s<this.lines.length;s++){var f=this.lines[s];f.width>c&&(c=f.width),u+=f.height}this.width=c,this.height=u}},{key:"removeEmptyBlocks",value:function(){for(var c=[],u=0;u<this.lines.length;u++){var s=this.lines[u];if(s.blocks.length!==0&&!(u===this.lines.length-1&&s.width===0)){var f={};(0,p.default)(f,s),f.blocks=[];for(var e=void 0,t=[],n=0;n<s.blocks.length;n++){var i=s.blocks[n];i.width!==0?t.push(i):e===void 0&&(e=i)}t.length===0&&e!==void 0&&t.push(e),f.blocks=t,c.push(f)}}return c}},{key:"finalize",value:function(){this.determineLineHeights(),this.determineLabelSize();var c=this.removeEmptyBlocks();return{width:this.width,height:this.height,lines:c}}}]),C}();k.default=R},function(L,k,h){h(142),L.exports=h(6).Object.assign},function(L,k,h){var w=h(11);w(w.S+w.F,"Object",{assign:h(143)})},function(L,k,h){"use strict";var w=h(26),p=h(50),S=h(32),M=h(30),x=h(59),I=Object.assign;L.exports=!I||h(22)(function(){var T={},R={},C=Symbol(),m="abcdefghijklmnopqrst";return T[C]=7,m.split("").forEach(function(c){R[c]=c}),I({},T)[C]!=7||Object.keys(I({},R)).join("")!=m})?function(R,C){for(var m=M(R),c=arguments.length,u=1,s=p.f,f=S.f;c>u;)for(var e=x(arguments[u++]),t=s?w(e).concat(s(e)):w(e),n=t.length,i=0,r;n>i;)f.call(e,r=t[i++])&&(m[r]=e[r]);return m}:I},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(16),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r){(0,M.default)(this,t);var l=(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r));return l._setMargins(r),l}return(0,I.default)(t,[{key:"resize",value:function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(r,l)){var d=this.getDimensionsFromLabel(i,r,l);this.width=d.width+this.margin.right+this.margin.left,this.height=d.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}},{key:"draw",value:function(i,r,l,d,a,v){this.resize(i,d,a),this.left=r-this.width/2,this.top=l-this.height/2,this.initContextForDraw(i,v),i.roundRect(this.left,this.top,this.width,this.height,v.borderRadius),this.performFill(i,v),this.updateBoundingBox(r,l,i,d,a),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,d,a)}},{key:"updateBoundingBox",value:function(i,r,l,d,a){this._updateBoundingBox(i,r,l,d,a);var v=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(v)}},{key:"distanceToBorder",value:function(i,r){this.resize(i);var l=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(r)),Math.abs(this.height/2/Math.sin(r)))+l}}]),t}(u.default);k.default=f},function(L,k,h){h(146),L.exports=h(6).Object.getPrototypeOf},function(L,k,h){var w=h(30),p=h(66);h(68)("getPrototypeOf",function(){return function(M){return p(w(M))}})},function(L,k,h){L.exports={default:h(148),__esModule:!0}},function(L,k,h){h(149),L.exports=h(6).Object.setPrototypeOf},function(L,k,h){var w=h(11);w(w.S,"Object",{setPrototypeOf:h(150).set})},function(L,k,h){var w=h(21),p=h(20),S=function(M,x){if(p(M),!w(x)&&x!==null)throw TypeError(x+": can't set as prototype!")};L.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(M,x,I){try{I=h(61)(Function.call,h(70).f(Object.prototype,"__proto__").set,2),I(M,[]),x=!(M instanceof Array)}catch{x=!0}return function(R,C){return S(R,C),x?R.__proto__=C:I(R,C),R}}({},!1):void 0),check:S}},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(53),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r){(0,M.default)(this,t);var l=(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r));return l._setMargins(r),l}return(0,I.default)(t,[{key:"resize",value:function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(r,l)){var d=this.getDimensionsFromLabel(i,r,l),a=Math.max(d.width+this.margin.right+this.margin.left,d.height+this.margin.top+this.margin.bottom);this.options.size=a/2,this.width=a,this.height=a,this.radius=this.width/2}}},{key:"draw",value:function(i,r,l,d,a,v){this.resize(i,d,a),this.left=r-this.width/2,this.top=l-this.height/2,this._drawRawCircle(i,r,l,v),this.updateBoundingBox(r,l),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,l,d,a)}},{key:"updateBoundingBox",value:function(i,r){this.boundingBox.top=r-this.options.size,this.boundingBox.left=i-this.options.size,this.boundingBox.right=i+this.options.size,this.boundingBox.bottom=r+this.options.size}},{key:"distanceToBorder",value:function(i,r){return this.resize(i),this.width*.5}}]),t}(u.default);k.default=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(53),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r,l,d){(0,M.default)(this,t);var a=(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r));return a.setImages(l,d),a}return(0,I.default)(t,[{key:"resize",value:function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,d=this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0;if(d){var a=this.options.size*2;this.width=a,this.height=a,this.radius=.5*this.width;return}this.needsRefresh(r,l)&&this._resizeImage()}},{key:"draw",value:function(i,r,l,d,a,v){this.switchImages(d),this.resize(),this.left=r-this.width/2,this.top=l-this.height/2,this._drawRawCircle(i,r,l,v),i.save(),i.clip(),this._drawImageAtPosition(i,v),i.restore(),this._drawImageLabel(i,r,l,d,a),this.updateBoundingBox(r,l)}},{key:"updateBoundingBox",value:function(i,r){this.boundingBox.top=r-this.options.size,this.boundingBox.left=i-this.options.size,this.boundingBox.right=i+this.options.size,this.boundingBox.bottom=r+this.options.size,this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}},{key:"distanceToBorder",value:function(i,r){return this.resize(i),this.width*.5}}]),t}(u.default);k.default=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(16),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r){(0,M.default)(this,t);var l=(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r));return l._setMargins(r),l}return(0,I.default)(t,[{key:"resize",value:function(i,r,l){if(this.needsRefresh(r,l)){var d=this.getDimensionsFromLabel(i,r,l),a=d.width+this.margin.right+this.margin.left;this.width=a,this.height=a,this.radius=this.width/2}}},{key:"draw",value:function(i,r,l,d,a,v){this.resize(i,d,a),this.left=r-this.width/2,this.top=l-this.height/2,this.initContextForDraw(i,v),i.database(r-this.width/2,l-this.height/2,this.width,this.height),this.performFill(i,v),this.updateBoundingBox(r,l,i,d,a),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,d,a)}},{key:"distanceToBorder",value:function(i,r){return this._distanceToBorder(i,r)}}]),t}(u.default);k.default=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(17),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r){return(0,M.default)(this,t),(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r))}return(0,I.default)(t,[{key:"draw",value:function(i,r,l,d,a,v){this._drawShape(i,"diamond",4,r,l,d,a,v)}},{key:"distanceToBorder",value:function(i,r){return this._distanceToBorder(i,r)}}]),t}(u.default);k.default=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(17),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r){return(0,M.default)(this,t),(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r))}return(0,I.default)(t,[{key:"draw",value:function(i,r,l,d,a,v){this._drawShape(i,"circle",2,r,l,d,a,v)}},{key:"distanceToBorder",value:function(i,r){return this.resize(i),this.options.size}}]),t}(u.default);k.default=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(16),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r){return(0,M.default)(this,t),(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r))}return(0,I.default)(t,[{key:"resize",value:function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(r,l)){var d=this.getDimensionsFromLabel(i,r,l);this.height=d.height*2,this.width=d.width+d.height,this.radius=.5*this.width}}},{key:"draw",value:function(i,r,l,d,a,v){this.resize(i,d,a),this.left=r-this.width*.5,this.top=l-this.height*.5,this.initContextForDraw(i,v),i.ellipse_vis(this.left,this.top,this.width,this.height),this.performFill(i,v),this.updateBoundingBox(r,l,i,d,a),this.labelModule.draw(i,r,l,d,a)}},{key:"distanceToBorder",value:function(i,r){this.resize(i);var l=this.width*.5,d=this.height*.5,a=Math.sin(r)*l,v=Math.cos(r)*d;return l*d/Math.sqrt(a*a+v*v)}}]),t}(u.default);k.default=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(16),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r){(0,M.default)(this,t);var l=(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r));return l._setMargins(r),l}return(0,I.default)(t,[{key:"resize",value:function(i,r,l){this.needsRefresh(r,l)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(i,r,l,d,a,v){if(this.resize(i,d,a),this.options.icon.size=this.options.icon.size||50,this.left=r-this.width/2,this.top=l-this.height/2,this._icon(i,r,l,d,a,v),this.options.label!==void 0){var y=5;this.labelModule.draw(i,this.left+this.iconSize.width/2+this.margin.left,l+this.height/2+y,d)}this.updateBoundingBox(r,l)}},{key:"updateBoundingBox",value:function(i,r){if(this.boundingBox.top=r-this.options.icon.size*.5,this.boundingBox.left=i-this.options.icon.size*.5,this.boundingBox.right=i+this.options.icon.size*.5,this.boundingBox.bottom=r+this.options.icon.size*.5,this.options.label!==void 0&&this.labelModule.size.width>0){var l=5;this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+l)}}},{key:"_icon",value:function(i,r,l,d,a,v){var y=Number(this.options.icon.size);this.options.icon.code!==void 0?(i.font=(d?"bold ":"")+y+"px "+this.options.icon.face,i.fillStyle=this.options.icon.color||"black",i.textAlign="center",i.textBaseline="middle",this.enableShadow(i,v),i.fillText(this.options.icon.code,r,l),this.disableShadow(i,v)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(i,r){return this._distanceToBorder(i,r)}}]),t}(u.default);k.default=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(53),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r,l,d){(0,M.default)(this,t);var a=(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r));return a.setImages(l,d),a}return(0,I.default)(t,[{key:"resize",value:function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,d=this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0;if(d){var a=this.options.size*2;this.width=a,this.height=a;return}this.needsRefresh(r,l)&&this._resizeImage()}},{key:"draw",value:function(i,r,l,d,a,v){if(this.switchImages(d),this.resize(),this.left=r-this.width/2,this.top=l-this.height/2,this.options.shapeProperties.useBorderWithImage===!0){var y=this.options.borderWidth,b=this.options.borderWidthSelected||2*this.options.borderWidth,P=(d?b:y)/this.body.view.scale;i.lineWidth=Math.min(this.width,P),i.beginPath(),i.strokeStyle=d?this.options.color.highlight.border:a?this.options.color.hover.border:this.options.color.border,i.fillStyle=d?this.options.color.highlight.background:a?this.options.color.hover.background:this.options.color.background,i.rect(this.left-.5*i.lineWidth,this.top-.5*i.lineWidth,this.width+i.lineWidth,this.height+i.lineWidth),i.fill(),this.performStroke(i,v),i.closePath()}this._drawImageAtPosition(i,v),this._drawImageLabel(i,r,l,d,a),this.updateBoundingBox(r,l)}},{key:"updateBoundingBox",value:function(i,r){this.resize(),this._updateBoundingBox(i,r),this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder",value:function(i,r){return this._distanceToBorder(i,r)}}]),t}(u.default);k.default=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(17),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r){return(0,M.default)(this,t),(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r))}return(0,I.default)(t,[{key:"draw",value:function(i,r,l,d,a,v){this._drawShape(i,"square",2,r,l,d,a,v)}},{key:"distanceToBorder",value:function(i,r){return this._distanceToBorder(i,r)}}]),t}(u.default);k.default=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(17),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r){return(0,M.default)(this,t),(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r))}return(0,I.default)(t,[{key:"draw",value:function(i,r,l,d,a,v){this._drawShape(i,"hexagon",4,r,l,d,a,v)}},{key:"distanceToBorder",value:function(i,r){return this._distanceToBorder(i,r)}}]),t}(u.default);k.default=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(17),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r){return(0,M.default)(this,t),(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r))}return(0,I.default)(t,[{key:"draw",value:function(i,r,l,d,a,v){this._drawShape(i,"star",4,r,l,d,a,v)}},{key:"distanceToBorder",value:function(i,r){return this._distanceToBorder(i,r)}}]),t}(u.default);k.default=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(16),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r){(0,M.default)(this,t);var l=(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r));return l._setMargins(r),l}return(0,I.default)(t,[{key:"resize",value:function(i,r,l){this.needsRefresh(r,l)&&(this.textSize=this.labelModule.getTextSize(i,r,l),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(i,r,l,d,a,v){this.resize(i,d,a),this.left=r-this.width/2,this.top=l-this.height/2,this.enableShadow(i,v),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,d,a),this.disableShadow(i,v),this.updateBoundingBox(r,l,i,d,a)}},{key:"distanceToBorder",value:function(i,r){return this._distanceToBorder(i,r)}}]),t}(u.default);k.default=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(17),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r){return(0,M.default)(this,t),(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r))}return(0,I.default)(t,[{key:"draw",value:function(i,r,l,d,a,v){this._drawShape(i,"triangle",3,r,l,d,a,v)}},{key:"distanceToBorder",value:function(i,r){return this._distanceToBorder(i,r)}}]),t}(u.default);k.default=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(17),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r){return(0,M.default)(this,t),(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r))}return(0,I.default)(t,[{key:"draw",value:function(i,r,l,d,a,v){this._drawShape(i,"triangleDown",3,r,l,d,a,v)}},{key:"distanceToBorder",value:function(i,r){return this._distanceToBorder(i,r)}}]),t}(u.default);k.default=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(0),p=x(w),S=h(1),M=x(S);function x(c){return c&&c.__esModule?c:{default:c}}var I=h(2),T=h(33),R=h(51),C=h(55).default,m=function(){function c(u,s,f){var e=this;(0,p.default)(this,c),this.body=u,this.images=s,this.groups=f,this.body.functions.createEdge=this.create.bind(this),this.edgesListeners={add:function(n,i){e.add(i.items)},update:function(n,i){e.update(i.items)},remove:function(n,i){e.remove(i.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(n,i,r,l){if(i===n)return .5;var d=1/(i-n);return Math.max(0,(l-n)*d)}},selectionWidth:1.5,selfReferenceSize:20,shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},I.deepExtend(this.options,this.defaultOptions),this.bindEventListeners()}return(0,M.default)(c,[{key:"bindEventListeners",value:function(){var s=this;this.body.emitter.on("_forceDisableDynamicCurves",function(f){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;f==="dynamic"&&(f="continuous");var t=!1;for(var n in s.body.edges)if(s.body.edges.hasOwnProperty(n)){var i=s.body.edges[n],r=s.body.data.edges._data[n];if(r!==void 0){var l=r.smooth;l!==void 0&&l.enabled===!0&&l.type==="dynamic"&&(f===void 0?i.setOptions({smooth:!1}):i.setOptions({smooth:{type:f}}),t=!0)}}e===!0&&t===!0&&s.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",function(){s.reconnectEdges()}),this.body.emitter.on("refreshEdges",this.refresh.bind(this)),this.body.emitter.on("refresh",this.refresh.bind(this)),this.body.emitter.on("destroy",function(){I.forEach(s.edgesListeners,function(f,e){s.body.data.edges&&s.body.data.edges.off(e,f)}),delete s.body.functions.createEdge,delete s.edgesListeners.add,delete s.edgesListeners.update,delete s.edgesListeners.remove,delete s.edgesListeners})}},{key:"setOptions",value:function(s){if(s!==void 0){C.parseOptions(this.options,s,!0,this.defaultOptions,!0);var f=!1;if(s.smooth!==void 0)for(var e in this.body.edges)this.body.edges.hasOwnProperty(e)&&(f=this.body.edges[e].updateEdgeType()||f);if(s.font!==void 0)for(var t in this.body.edges)this.body.edges.hasOwnProperty(t)&&this.body.edges[t].updateLabelModule();(s.hidden!==void 0||s.physics!==void 0||f===!0)&&this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(s){var f=this,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=this.body.data.edges;if(s instanceof T||s instanceof R)this.body.data.edges=s;else if(Array.isArray(s))this.body.data.edges=new T,this.body.data.edges.add(s);else if(!s)this.body.data.edges=new T;else throw new TypeError("Array or DataSet expected");if(t&&I.forEach(this.edgesListeners,function(i,r){t.off(r,i)}),this.body.edges={},this.body.data.edges){I.forEach(this.edgesListeners,function(i,r){f.body.data.edges.on(r,i)});var n=this.body.data.edges.getIds();this.add(n,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),e===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(s){for(var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e=this.body.edges,t=this.body.data.edges,n=0;n<s.length;n++){var i=s[n],r=e[i];r&&r.disconnect();var l=t.get(i,{showInternalIds:!0});e[i]=this.create(l)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),f===!1&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(s){for(var f=this.body.edges,e=this.body.data.edges,t=!1,n=0;n<s.length;n++){var i=s[n],r=e.get(i),l=f[i];l!==void 0?(l.disconnect(),t=l.setOptions(r)||t,l.connect()):(this.body.edges[i]=this.create(r),t=!0)}t===!0?(this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),this.body.emitter.emit("_dataChanged")):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(s){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(s.length!==0){var e=this.body.edges;I.forEach(s,function(t){var n=e[t];n!==void 0&&n.remove()}),f&&this.body.emitter.emit("_dataChanged")}}},{key:"refresh",value:function(){var s=this;I.forEach(this.body.edges,function(f,e){var t=s.body.data.edges._data[e];t!==void 0&&f.setOptions(t)})}},{key:"create",value:function(s){return new C(s,this.body,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var s,f=this.body.nodes,e=this.body.edges;for(s in f)f.hasOwnProperty(s)&&(f[s].edges=[]);for(s in e)if(e.hasOwnProperty(s)){var t=e[s];t.from=null,t.to=null,t.connect()}}},{key:"getConnectedNodes",value:function(s){var f=[];if(this.body.edges[s]!==void 0){var e=this.body.edges[s];e.fromId!==void 0&&f.push(e.fromId),e.toId!==void 0&&f.push(e.toId)}return f}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var s=this,f=[];I.forEach(this.body.edges,function(e,t){var n=s.body.nodes[e.toId],i=s.body.nodes[e.fromId];n!==void 0&&n.isCluster===!0||i!==void 0&&i.isCluster===!0||(n===void 0||i===void 0)&&f.push(t)}),this.remove(f,!1)}},{key:"_addMissingEdges",value:function(){var s=this.body.data.edges;if(s!=null){var f=this.body.edges,e=[];s.forEach(function(t,n){var i=f[n];i===void 0&&e.push(n)}),this.add(e,!0)}}}]),c}();k.default=m},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(15),p=e(w),S=h(3),M=e(S),x=h(0),I=e(x),T=h(1),R=e(T),C=h(4),m=e(C),c=h(5),u=e(c),s=h(167),f=e(s);function e(n){return n&&n.__esModule?n:{default:n}}var t=function(n){(0,u.default)(i,n);function i(r,l,d){return(0,I.default)(this,i),(0,m.default)(this,(i.__proto__||(0,M.default)(i)).call(this,r,l,d))}return(0,R.default)(i,[{key:"_line",value:function(l,d,a){var v=a[0],y=a[1];this._bezierCurve(l,d,v,y)}},{key:"_getViaCoordinates",value:function(){var l=this.from.x-this.to.x,d=this.from.y-this.to.y,a=void 0,v=void 0,y=void 0,b=void 0,P=this.options.smooth.roundness;return(Math.abs(l)>Math.abs(d)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(v=this.from.y,b=this.to.y,a=this.from.x-P*l,y=this.to.x+P*l):(v=this.from.y-P*d,b=this.to.y+P*d,a=this.from.x,y=this.to.x),[{x:a,y:v},{x:y,y:b}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(l,d){return this._findBorderPositionBezier(l,d)}},{key:"_getDistanceToEdge",value:function(l,d,a,v,y,b){var P=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates(),D=(0,p.default)(P,2),O=D[0],E=D[1];return this._getDistanceToBezierEdge(l,d,a,v,y,b,O,E)}},{key:"getPoint",value:function(l){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),a=(0,p.default)(d,2),v=a[0],y=a[1],b=l,P=[];P[0]=Math.pow(1-b,3),P[1]=3*b*Math.pow(1-b,2),P[2]=3*Math.pow(b,2)*(1-b),P[3]=Math.pow(b,3);var D=P[0]*this.fromPoint.x+P[1]*v.x+P[2]*y.x+P[3]*this.toPoint.x,O=P[0]*this.fromPoint.y+P[1]*v.y+P[2]*y.y+P[3]*this.toPoint.y;return{x:D,y:O}}}]),i}(f.default);k.default=t},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(56),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r){return(0,M.default)(this,t),(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r))}return(0,I.default)(t,[{key:"_getDistanceToBezierEdge",value:function(i,r,l,d,a,v,y,b){var P=1e9,D=void 0,O=void 0,E=void 0,A=void 0,Y=void 0,X=i,U=r,Z=[0,0,0,0];for(O=1;O<10;O++)E=.1*O,Z[0]=Math.pow(1-E,3),Z[1]=3*E*Math.pow(1-E,2),Z[2]=3*Math.pow(E,2)*(1-E),Z[3]=Math.pow(E,3),A=Z[0]*i+Z[1]*y.x+Z[2]*b.x+Z[3]*l,Y=Z[0]*r+Z[1]*y.y+Z[2]*b.y+Z[3]*d,O>0&&(D=this._getDistanceToLine(X,U,A,Y,a,v),P=D<P?D:P),X=A,U=Y;return P}}]),t}(u.default);k.default=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(15),p=e(w),S=h(3),M=e(S),x=h(0),I=e(x),T=h(1),R=e(T),C=h(4),m=e(C),c=h(5),u=e(c),s=h(56),f=e(s);function e(n){return n&&n.__esModule?n:{default:n}}var t=function(n){(0,u.default)(i,n);function i(r,l,d){(0,I.default)(this,i);var a=(0,m.default)(this,(i.__proto__||(0,M.default)(i)).call(this,r,l,d));return a._boundFunction=function(){a.positionBezierNode()},a.body.emitter.on("_repositionBezierNodes",a._boundFunction),a}return(0,R.default)(i,[{key:"setOptions",value:function(l){var d=!1;this.options.physics!==l.physics&&(d=!0),this.options=l,this.id=this.options.id,this.from=this.body.nodes[this.options.from],this.to=this.body.nodes[this.options.to],this.setupSupportNode(),this.connect(),d===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}},{key:"connect",value:function(){this.from=this.body.nodes[this.options.from],this.to=this.body.nodes[this.options.to],this.from===void 0||this.to===void 0||this.options.physics===!1?this.via.setOptions({physics:!1}):this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}},{key:"cleanup",value:function(){return this.body.emitter.off("_repositionBezierNodes",this._boundFunction),this.via!==void 0?(delete this.body.nodes[this.via.id],this.via=void 0,!0):!1}},{key:"setupSupportNode",value:function(){if(this.via===void 0){var l="edgeId:"+this.id,d=this.body.functions.createNode({id:l,shape:"circle",physics:!0,hidden:!0});this.body.nodes[l]=d,this.via=d,this.via.parentEdgeId=this.id,this.positionBezierNode()}}},{key:"positionBezierNode",value:function(){this.via!==void 0&&this.from!==void 0&&this.to!==void 0?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):this.via!==void 0&&(this.via.x=0,this.via.y=0)}},{key:"_line",value:function(l,d,a){this._bezierCurve(l,d,a)}},{key:"getViaNode",value:function(){return this.via}},{key:"getPoint",value:function(l){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via,a=l,v=void 0,y=void 0;if(this.from===this.to){var b=this._getCircleData(this.from),P=(0,p.default)(b,3),D=P[0],O=P[1],E=P[2],A=2*Math.PI*(1-a);v=D+E*Math.sin(A),y=O+E-E*(1-Math.cos(A))}else v=Math.pow(1-a,2)*this.fromPoint.x+2*a*(1-a)*d.x+Math.pow(a,2)*this.toPoint.x,y=Math.pow(1-a,2)*this.fromPoint.y+2*a*(1-a)*d.y+Math.pow(a,2)*this.toPoint.y;return{x:v,y}}},{key:"_findBorderPosition",value:function(l,d){return this._findBorderPositionBezier(l,d,this.via)}},{key:"_getDistanceToEdge",value:function(l,d,a,v,y,b){return this._getDistanceToBezierEdge(l,d,a,v,y,b,this.via)}}]),i}(f.default);k.default=t},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(56),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r){return(0,M.default)(this,t),(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r))}return(0,I.default)(t,[{key:"_line",value:function(i,r,l){this._bezierCurve(i,r,l)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var i=void 0,r=void 0,l=this.options.smooth.roundness,d=this.options.smooth.type,a=Math.abs(this.from.x-this.to.x),v=Math.abs(this.from.y-this.to.y);if(d==="discrete"||d==="diagonalCross"){var y=void 0,b=void 0;a<=v?y=b=l*v:y=b=l*a,this.from.x>this.to.x&&(y=-y),this.from.y>=this.to.y&&(b=-b),i=this.from.x+y,r=this.from.y+b,d==="discrete"&&(a<=v?i=a<l*v?this.from.x:i:r=v<l*a?this.from.y:r)}else if(d==="straightCross"){var P=(1-l)*a,D=(1-l)*v;a<=v?(P=0,this.from.y<this.to.y&&(D=-D)):(this.from.x<this.to.x&&(P=-P),D=0),i=this.to.x+P,r=this.to.y+D}else if(d==="horizontal"){var O=(1-l)*a;this.from.x<this.to.x&&(O=-O),i=this.to.x+O,r=this.from.y}else if(d==="vertical"){var E=(1-l)*v;this.from.y<this.to.y&&(E=-E),i=this.from.x,r=this.to.y+E}else if(d==="curvedCW"){a=this.to.x-this.from.x,v=this.from.y-this.to.y;var A=Math.sqrt(a*a+v*v),Y=Math.PI,X=Math.atan2(v,a),U=(X+(l*.5+.5)*Y)%(2*Y);i=this.from.x+(l*.5+.5)*A*Math.sin(U),r=this.from.y+(l*.5+.5)*A*Math.cos(U)}else if(d==="curvedCCW"){a=this.to.x-this.from.x,v=this.from.y-this.to.y;var Z=Math.sqrt(a*a+v*v),re=Math.PI,le=Math.atan2(v,a),he=(le+(-l*.5+.5)*re)%(2*re);i=this.from.x+(l*.5+.5)*Z*Math.sin(he),r=this.from.y+(l*.5+.5)*Z*Math.cos(he)}else{var ce=void 0,se=void 0;a<=v?ce=se=l*v:ce=se=l*a,this.from.x>this.to.x&&(ce=-ce),this.from.y>=this.to.y&&(se=-se),i=this.from.x+ce,r=this.from.y+se,a<=v?this.from.x<=this.to.x?i=this.to.x<i?this.to.x:i:i=this.to.x>i?this.to.x:i:this.from.y>=this.to.y?r=this.to.y>r?this.to.y:r:r=this.to.y<r?this.to.y:r}return{x:i,y:r}}},{key:"_findBorderPosition",value:function(i,r){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(i,r,l.via)}},{key:"_getDistanceToEdge",value:function(i,r,l,d,a,v){var y=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(i,r,l,d,a,v,y)}},{key:"getPoint",value:function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),l=i,d=Math.pow(1-l,2)*this.fromPoint.x+2*l*(1-l)*r.x+Math.pow(l,2)*this.toPoint.x,a=Math.pow(1-l,2)*this.fromPoint.y+2*l*(1-l)*r.y+Math.pow(l,2)*this.toPoint.y;return{x:d,y:a}}}]),t}(u.default);k.default=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(79),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r){return(0,M.default)(this,t),(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r))}return(0,I.default)(t,[{key:"_line",value:function(i,r){i.beginPath(),i.moveTo(this.fromPoint.x,this.fromPoint.y),i.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(i,r),i.stroke(),this.disableShadow(i,r)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(i){return{x:(1-i)*this.fromPoint.x+i*this.toPoint.x,y:(1-i)*this.fromPoint.y+i*this.toPoint.y}}},{key:"_findBorderPosition",value:function(i,r){var l=this.to,d=this.from;i.id===this.from.id&&(l=this.from,d=this.to);var a=Math.atan2(l.y-d.y,l.x-d.x),v=l.x-d.x,y=l.y-d.y,b=Math.sqrt(v*v+y*y),P=i.distanceToBorder(r,a),D=(b-P)/b,O={};return O.x=(1-D)*d.x+D*l.x,O.y=(1-D)*d.y+D*l.y,O}},{key:"_getDistanceToEdge",value:function(i,r,l,d,a,v){return this._getDistanceToLine(i,r,l,d,a,v)}}]),t}(u.default);k.default=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(9),p=T(w),S=h(0),M=T(S),x=h(1),I=T(x);function T(r){return r&&r.__esModule?r:{default:r}}var R=h(81).default,C=h(172).default,m=h(173).default,c=h(174).default,u=h(175).default,s=h(82).default,f=h(176).default,e=h(177).default,t=h(2),n=h(80).default,i=function(){function r(l){(0,M.default)(this,r),this.body=l,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0},t.extend(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}return(0,I.default)(r,[{key:"bindEventListeners",value:function(){var d=this;this.body.emitter.on("initPhysics",function(){d.initPhysics()}),this.body.emitter.on("_layoutFailed",function(){d.layoutFailed=!0}),this.body.emitter.on("resetPhysics",function(){d.stopSimulation(),d.ready=!1}),this.body.emitter.on("disablePhysics",function(){d.physicsEnabled=!1,d.stopSimulation()}),this.body.emitter.on("restorePhysics",function(){d.setOptions(d.options),d.ready===!0&&d.startSimulation()}),this.body.emitter.on("startSimulation",function(){d.ready===!0&&d.startSimulation()}),this.body.emitter.on("stopSimulation",function(){d.stopSimulation()}),this.body.emitter.on("destroy",function(){d.stopSimulation(!1),d.body.emitter.off()}),this.body.emitter.on("_dataChanged",function(){d.updatePhysicsData()})}},{key:"setOptions",value:function(d){d!==void 0&&(d===!1?(this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation()):d===!0?(this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation()):(this.physicsEnabled=!0,t.selectiveNotDeepExtend(["stabilization"],this.options,d),t.mergeOptions(this.options,d,"stabilization"),d.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation()),this.timestep=this.options.timestep)),this.init()}},{key:"init",value:function(){var d;this.options.solver==="forceAtlas2Based"?(d=this.options.forceAtlas2Based,this.nodesSolver=new f(this.body,this.physicsBody,d),this.edgesSolver=new c(this.body,this.physicsBody,d),this.gravitySolver=new e(this.body,this.physicsBody,d)):this.options.solver==="repulsion"?(d=this.options.repulsion,this.nodesSolver=new C(this.body,this.physicsBody,d),this.edgesSolver=new c(this.body,this.physicsBody,d),this.gravitySolver=new s(this.body,this.physicsBody,d)):this.options.solver==="hierarchicalRepulsion"?(d=this.options.hierarchicalRepulsion,this.nodesSolver=new m(this.body,this.physicsBody,d),this.edgesSolver=new u(this.body,this.physicsBody,d),this.gravitySolver=new s(this.body,this.physicsBody,d)):(d=this.options.barnesHut,this.nodesSolver=new R(this.body,this.physicsBody,d),this.edgesSolver=new c(this.body,this.physicsBody,d),this.gravitySolver=new s(this.body,this.physicsBody,d)),this.modelOptions=d}},{key:"initPhysics",value:function(){this.physicsEnabled===!0&&this.options.enabled===!0?this.options.stabilization.enabled===!0?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}},{key:"startSimulation",value:function(){this.physicsEnabled===!0&&this.options.enabled===!0?(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),this.viewFunction===void 0&&(this.viewFunction=this.simulationStep.bind(this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))):this.body.emitter.emit("_redraw")}},{key:"stopSimulation",value:function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.stabilized=!0,d===!0&&this._emitStabilized(),this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,d===!0&&this.body.emitter.emit("_stopRendering"))}},{key:"simulationStep",value:function(){var d=Date.now();this.physicsTick();var a=Date.now()-d;(a<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}},{key:"_emitStabilized",value:function(){var d=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&setTimeout(function(){d.body.emitter.emit("stabilized",{iterations:a}),d.startedStabilization=!1,d.stabilizationIterations=0},0)}},{key:"physicsStep",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}},{key:"adjustTimeStep",value:function(){var d=1.2;this._evaluateStepQuality()===!0?this.timestep=d*this.timestep:this.timestep/d<this.options.timestep?this.timestep=this.options.timestep:(this.adaptiveCounter=-1,this.timestep=Math.max(this.options.timestep,this.timestep/d))}},{key:"physicsTick",value:function(){if(this._startStabilizing(),this.stabilized!==!0){if(this.adaptiveTimestep===!0&&this.adaptiveTimestepEnabled===!0){var d=this.adaptiveCounter%this.adaptiveInterval===0;d?(this.timestep=2*this.timestep,this.physicsStep(),this.revert(),this.timestep=.5*this.timestep,this.physicsStep(),this.physicsStep(),this.adjustTimeStep()):this.physicsStep(),this.adaptiveCounter+=1}else this.timestep=this.options.timestep,this.physicsStep();this.stabilized===!0&&this.revert(),this.stabilizationIterations++}}},{key:"updatePhysicsData",value:function(){this.physicsBody.forces={},this.physicsBody.physicsNodeIndices=[],this.physicsBody.physicsEdgeIndices=[];var d=this.body.nodes,a=this.body.edges;for(var v in d)d.hasOwnProperty(v)&&d[v].options.physics===!0&&this.physicsBody.physicsNodeIndices.push(d[v].id);for(var y in a)a.hasOwnProperty(y)&&a[y].options.physics===!0&&this.physicsBody.physicsEdgeIndices.push(a[y].id);for(var b=0;b<this.physicsBody.physicsNodeIndices.length;b++){var P=this.physicsBody.physicsNodeIndices[b];this.physicsBody.forces[P]={x:0,y:0},this.physicsBody.velocities[P]===void 0&&(this.physicsBody.velocities[P]={x:0,y:0})}for(var D in this.physicsBody.velocities)d[D]===void 0&&delete this.physicsBody.velocities[D]}},{key:"revert",value:function(){var d=(0,p.default)(this.previousStates),a=this.body.nodes,v=this.physicsBody.velocities;this.referenceState={};for(var y=0;y<d.length;y++){var b=d[y];a[b]!==void 0?a[b].options.physics===!0&&(this.referenceState[b]={positions:{x:a[b].x,y:a[b].y}},v[b].x=this.previousStates[b].vx,v[b].y=this.previousStates[b].vy,a[b].x=this.previousStates[b].x,a[b].y=this.previousStates[b].y):delete this.previousStates[b]}}},{key:"_evaluateStepQuality",value:function(){var d=void 0,a=void 0,v=void 0,y=this.body.nodes,b=this.referenceState,P=.3;for(var D in this.referenceState)if(this.referenceState.hasOwnProperty(D)&&y[D]!==void 0&&(d=y[D].x-b[D].positions.x,a=y[D].y-b[D].positions.y,v=Math.sqrt(Math.pow(d,2)+Math.pow(a,2)),v>P))return!1;return!0}},{key:"moveNodes",value:function(){for(var d=this.physicsBody.physicsNodeIndices,a=0,v=0,y=5,b=0;b<d.length;b++){var P=d[b],D=this._performStep(P);a=Math.max(a,D),v+=D}this.adaptiveTimestepEnabled=v/d.length<y,this.stabilized=a<this.options.minVelocity}},{key:"calculateComponentVelocity",value:function(d,a,v){var y=this.modelOptions.damping*d,b=(a-y)/v;d+=b*this.timestep;var P=this.options.maxVelocity||1e9;return Math.abs(d)>P&&(d=d>0?P:-P),d}},{key:"_performStep",value:function(d){var a=this.body.nodes[d],v=this.physicsBody.forces[d],y=this.physicsBody.velocities[d];this.previousStates[d]={x:a.x,y:a.y,vx:y.x,vy:y.y},a.options.fixed.x===!1?(y.x=this.calculateComponentVelocity(y.x,v.x,a.options.mass),a.x+=y.x*this.timestep):(v.x=0,y.x=0),a.options.fixed.y===!1?(y.y=this.calculateComponentVelocity(y.y,v.y,a.options.mass),a.y+=y.y*this.timestep):(v.y=0,y.y=0);var b=Math.sqrt(Math.pow(y.x,2)+Math.pow(y.y,2));return b}},{key:"_freezeNodes",value:function(){var d=this.body.nodes;for(var a in d)if(d.hasOwnProperty(a)&&d[a].x&&d[a].y){var v=d[a].options.fixed;this.freezeCache[a]={x:v.x,y:v.y},v.x=!0,v.y=!0}}},{key:"_restoreFrozenNodes",value:function(){var d=this.body.nodes;for(var a in d)d.hasOwnProperty(a)&&this.freezeCache[a]!==void 0&&(d[a].options.fixed.x=this.freezeCache[a].x,d[a].options.fixed.y=this.freezeCache[a].y);this.freezeCache={}}},{key:"stabilize",value:function(){var d=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof a!="number"&&(a=this.options.stabilization.iterations,console.log("The stabilize method needs a numeric amount of iterations. Switching to default: ",a)),this.physicsBody.physicsNodeIndices.length===0){this.ready=!0;return}this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=a,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,setTimeout(function(){return d._stabilizationBatch()},0)}},{key:"_startStabilizing",value:function(){return this.startedStabilization===!0?!1:(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}},{key:"_stabilizationBatch",value:function(){var d=this,a=function(){return d.stabilized===!1&&d.stabilizationIterations<d.targetIterations},v=function(){d.body.emitter.emit("stabilizationProgress",{iterations:d.stabilizationIterations,total:d.targetIterations})};this._startStabilizing()&&v();for(var y=0;a()&&y<this.options.stabilization.updateInterval;)this.physicsTick(),y++;v(),a()?setTimeout(this._stabilizationBatch.bind(this),0):this._finalizeStabilization()}},{key:"_finalizeStabilization",value:function(){this.body.emitter.emit("_allowRedraw"),this.options.stabilization.fit===!0&&this.body.emitter.emit("fit"),this.options.stabilization.onlyDynamicEdges===!0&&this._restoreFrozenNodes(),this.body.emitter.emit("stabilizationIterationsDone"),this.body.emitter.emit("_requestRedraw"),this.stabilized===!0?this._emitStabilized():this.startSimulation(),this.ready=!0}},{key:"_drawForces",value:function(d){for(var a=0;a<this.physicsBody.physicsNodeIndices.length;a++){var v=this.physicsBody.physicsNodeIndices[a],y=this.body.nodes[v],b=this.physicsBody.forces[v],P=20,D=.03,O=Math.sqrt(Math.pow(b.x,2)+Math.pow(b.x,2)),E=Math.min(Math.max(5,O),15),A=3*E,Y=t.HSVToHex((180-Math.min(1,Math.max(0,D*O))*180)/360,1,1),X={x:y.x+P*b.x,y:y.y+P*b.y};d.lineWidth=E,d.strokeStyle=Y,d.beginPath(),d.moveTo(y.x,y.y),d.lineTo(X.x,X.y),d.stroke();var U=Math.atan2(b.y,b.x);d.fillStyle=Y,n.draw(d,{type:"arrow",point:X,angle:U,length:A}),d.fill()}}}]),r}();k.default=i},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(0),p=x(w),S=h(1),M=x(S);function x(T){return T&&T.__esModule?T:{default:T}}var I=function(){function T(R,C,m){(0,p.default)(this,T),this.body=R,this.physicsBody=C,this.setOptions(m)}return(0,M.default)(T,[{key:"setOptions",value:function(C){this.options=C}},{key:"solve",value:function(){for(var C,m,c,u,s,f,e,t,n=this.body.nodes,i=this.physicsBody.physicsNodeIndices,r=this.physicsBody.forces,l=this.options.nodeDistance,d=-2/3/l,a=4/3,v=0;v<i.length-1;v++){e=n[i[v]];for(var y=v+1;y<i.length;y++)t=n[i[y]],C=t.x-e.x,m=t.y-e.y,c=Math.sqrt(C*C+m*m),c===0&&(c=.1*Math.random(),C=c),c<2*l&&(c<.5*l?f=1:f=d*c+a,f=f/c,u=C*f,s=m*f,r[e.id].x-=u,r[e.id].y-=s,r[t.id].x+=u,r[t.id].y+=s)}}}]),T}();k.default=I},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(0),p=x(w),S=h(1),M=x(S);function x(T){return T&&T.__esModule?T:{default:T}}var I=function(){function T(R,C,m){(0,p.default)(this,T),this.body=R,this.physicsBody=C,this.setOptions(m)}return(0,M.default)(T,[{key:"setOptions",value:function(C){this.options=C}},{key:"solve",value:function(){var C,m,c,u,s,f,e,t,n,i,r=this.body.nodes,l=this.physicsBody.physicsNodeIndices,d=this.physicsBody.forces,a=this.options.nodeDistance;for(n=0;n<l.length-1;n++)for(e=r[l[n]],i=n+1;i<l.length;i++)if(t=r[l[i]],e.level===t.level){C=t.x-e.x,m=t.y-e.y,c=Math.sqrt(C*C+m*m);var v=.05;c<a?f=-Math.pow(v*c,2)+Math.pow(v*a,2):f=0,c===0?c=.01:f=f/c,u=C*f,s=m*f,d[e.id].x-=u,d[e.id].y-=s,d[t.id].x+=u,d[t.id].y+=s}}}]),T}();k.default=I},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(0),p=x(w),S=h(1),M=x(S);function x(T){return T&&T.__esModule?T:{default:T}}var I=function(){function T(R,C,m){(0,p.default)(this,T),this.body=R,this.physicsBody=C,this.setOptions(m)}return(0,M.default)(T,[{key:"setOptions",value:function(C){this.options=C}},{key:"solve",value:function(){for(var C=void 0,m=void 0,c=this.physicsBody.physicsEdgeIndices,u=this.body.edges,s=void 0,f=void 0,e=void 0,t=0;t<c.length;t++)m=u[c[t]],m.connected===!0&&m.toId!==m.fromId&&this.body.nodes[m.toId]!==void 0&&this.body.nodes[m.fromId]!==void 0&&(m.edgeType.via!==void 0?(C=m.options.length===void 0?this.options.springLength:m.options.length,s=m.to,f=m.edgeType.via,e=m.from,this._calculateSpringForce(s,f,.5*C),this._calculateSpringForce(f,e,.5*C)):(C=m.options.length===void 0?this.options.springLength*1.5:m.options.length,this._calculateSpringForce(m.from,m.to,C)))}},{key:"_calculateSpringForce",value:function(C,m,c){var u=C.x-m.x,s=C.y-m.y,f=Math.max(Math.sqrt(u*u+s*s),.01),e=this.options.springConstant*(c-f)/f,t=u*e,n=s*e;this.physicsBody.forces[C.id]!==void 0&&(this.physicsBody.forces[C.id].x+=t,this.physicsBody.forces[C.id].y+=n),this.physicsBody.forces[m.id]!==void 0&&(this.physicsBody.forces[m.id].x-=t,this.physicsBody.forces[m.id].y-=n)}}]),T}();k.default=I},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(0),p=x(w),S=h(1),M=x(S);function x(T){return T&&T.__esModule?T:{default:T}}var I=function(){function T(R,C,m){(0,p.default)(this,T),this.body=R,this.physicsBody=C,this.setOptions(m)}return(0,M.default)(T,[{key:"setOptions",value:function(C){this.options=C}},{key:"solve",value:function(){for(var C,m,c,u,s,f,e,t,n=this.body.edges,i=.5,r=this.physicsBody.physicsEdgeIndices,l=this.physicsBody.physicsNodeIndices,d=this.physicsBody.forces,a=0;a<l.length;a++){var v=l[a];d[v].springFx=0,d[v].springFy=0}for(var y=0;y<r.length;y++)m=n[r[y]],m.connected===!0&&(C=m.options.length===void 0?this.options.springLength:m.options.length,c=m.from.x-m.to.x,u=m.from.y-m.to.y,t=Math.sqrt(c*c+u*u),t=t===0?.01:t,e=this.options.springConstant*(C-t)/t,s=c*e,f=u*e,m.to.level!=m.from.level?(d[m.toId]!==void 0&&(d[m.toId].springFx-=s,d[m.toId].springFy-=f),d[m.fromId]!==void 0&&(d[m.fromId].springFx+=s,d[m.fromId].springFy+=f)):(d[m.toId]!==void 0&&(d[m.toId].x-=i*s,d[m.toId].y-=i*f),d[m.fromId]!==void 0&&(d[m.fromId].x+=i*s,d[m.fromId].y+=i*f)));e=1;for(var b,P,D=0;D<l.length;D++){var O=l[D];b=Math.min(e,Math.max(-e,d[O].springFx)),P=Math.min(e,Math.max(-e,d[O].springFy)),d[O].x+=b,d[O].y+=P}for(var E=0,A=0,Y=0;Y<l.length;Y++){var X=l[Y];E+=d[X].x,A+=d[X].y}for(var U=E/l.length,Z=A/l.length,re=0;re<l.length;re++){var le=l[re];d[le].x-=U,d[le].y-=Z}}}]),T}();k.default=I},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(81),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r){return(0,M.default)(this,t),(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r))}return(0,I.default)(t,[{key:"_calculateForces",value:function(i,r,l,d,a){i===0&&(i=.1*Math.random(),r=i),this.overlapAvoidanceFactor<1&&d.shape.radius&&(i=Math.max(.1+this.overlapAvoidanceFactor*d.shape.radius,i-d.shape.radius));var v=d.edges.length+1,y=this.options.gravitationalConstant*a.mass*d.options.mass*v/Math.pow(i,2),b=r*y,P=l*y;this.physicsBody.forces[d.id].x+=b,this.physicsBody.forces[d.id].y+=P}}]),t}(u.default);k.default=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=s(w),S=h(0),M=s(S),x=h(1),I=s(x),T=h(4),R=s(T),C=h(5),m=s(C),c=h(82),u=s(c);function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e){(0,m.default)(t,e);function t(n,i,r){return(0,M.default)(this,t),(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r))}return(0,I.default)(t,[{key:"_calculateForces",value:function(i,r,l,d,a){if(i>0){var v=a.edges.length+1,y=this.options.centralGravity*v*a.options.mass;d[a.id].x=r*y,d[a.id].y=l*y}}}]),t}(u.default);k.default=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(9),p=C(w),S=h(7),M=C(S),x=h(0),I=C(x),T=h(1),R=C(T);function C(t){return t&&t.__esModule?t:{default:t}}var m=h(2),c=h(57).default,u=h(179).default,s=h(55).default,f=h(34).default,e=function(){function t(n){var i=this;(0,I.default)(this,t),this.body=n,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},m.extend(this.options,this.defaultOptions),this.body.emitter.on("_resetData",function(){i.clusteredNodes={},i.clusteredEdges={}})}return(0,R.default)(t,[{key:"clusterByHubsize",value:function(i,r){i===void 0?i=this._getHubSize():(typeof i>"u"?"undefined":(0,M.default)(i))==="object"&&(r=this._checkOptions(i),i=this._getHubSize());for(var l=[],d=0;d<this.body.nodeIndices.length;d++){var a=this.body.nodes[this.body.nodeIndices[d]];a.edges.length>=i&&l.push(a.id)}for(var v=0;v<l.length;v++)this.clusterByConnection(l[v],r,!0);this.body.emitter.emit("_dataChanged")}},{key:"cluster",value:function(){var i=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(r.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");r=this._checkOptions(r);var d={},a={};m.forEach(this.body.nodes,function(v,y){v.options&&r.joinCondition(v.options)===!0&&(d[y]=v,m.forEach(v.edges,function(b){i.clusteredEdges[b.id]===void 0&&(a[b.id]=b)}))}),this._cluster(d,a,r,l)}},{key:"clusterByEdgeCount",value:function(i,r){var l=this,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;r=this._checkOptions(r);for(var a=[],v={},y=void 0,b=void 0,P=void 0,D=function(U){var Z={},re={},le=l.body.nodeIndices[U],he=l.body.nodes[le];if(v[le]===void 0){P=0,b=[];for(var ce=0;ce<he.edges.length;ce++)y=he.edges[ce],l.clusteredEdges[y.id]===void 0&&(y.toId!==y.fromId&&P++,b.push(y));if(P===i){E=function(_){if(r.joinCondition===void 0||r.joinCondition===null)return!0;var ee=c.cloneOptions(_);return r.joinCondition(ee)};for(var se=!0,G=0;G<b.length;G++){y=b[G];var V=l._getConnectedId(y,le);if(E(he))re[y.id]=y,Z[le]=he,Z[V]=l.body.nodes[V],v[le]=!0;else{se=!1;break}}if((0,p.default)(Z).length>0&&(0,p.default)(re).length>0&&se===!0)if(A=function(){for(var _=0;_<a.length;++_)for(var ee in Z)if(a[_].nodes[ee]!==void 0)return a[_]},Y=A(),Y!==void 0){for(var Q in Z)Y.nodes[Q]===void 0&&(Y.nodes[Q]=Z[Q]);for(var K in re)Y.edges[K]===void 0&&(Y.edges[K]=re[K])}else a.push({nodes:Z,edges:re})}}},O=0;O<this.body.nodeIndices.length;O++){var E,A,Y;D(O)}for(var O=0;O<a.length;O++)this._cluster(a[O].nodes,a[O].edges,r,!1);d===!0&&this.body.emitter.emit("_dataChanged")}},{key:"clusterOutliers",value:function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,i,r)}},{key:"clusterBridges",value:function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,i,r)}},{key:"clusterByConnection",value:function(i,r){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(i===void 0)throw new Error("No nodeId supplied to clusterByConnection!");if(this.body.nodes[i]===void 0)throw new Error("The nodeId given to clusterByConnection does not exist!");var d=this.body.nodes[i];r=this._checkOptions(r,d),r.clusterNodeProperties.x===void 0&&(r.clusterNodeProperties.x=d.x),r.clusterNodeProperties.y===void 0&&(r.clusterNodeProperties.y=d.y),r.clusterNodeProperties.fixed===void 0&&(r.clusterNodeProperties.fixed={},r.clusterNodeProperties.fixed.x=d.options.fixed.x,r.clusterNodeProperties.fixed.y=d.options.fixed.y);var a={},v={},y=d.id,b=c.cloneOptions(d);a[y]=d;for(var P=0;P<d.edges.length;P++){var D=d.edges[P];if(this.clusteredEdges[D.id]===void 0){var O=this._getConnectedId(D,y);if(this.clusteredNodes[O]===void 0)if(O!==y)if(r.joinCondition===void 0)v[D.id]=D,a[O]=this.body.nodes[O];else{var E=c.cloneOptions(this.body.nodes[O]);r.joinCondition(b,E)===!0&&(v[D.id]=D,a[O]=this.body.nodes[O])}else v[D.id]=D}}var A=(0,p.default)(a).map(function(Z){return a[Z].id});for(Y in a)if(a.hasOwnProperty(Y))for(var Y=a[Y],X=0;X<Y.edges.length;X++){var U=Y.edges[X];A.indexOf(this._getConnectedId(U,Y.id))>-1&&(v[U.id]=U)}this._cluster(a,v,r,l)}},{key:"_createClusterEdges",value:function(i,r,l,d){for(var a=void 0,v=void 0,y=void 0,b=void 0,P=void 0,D=void 0,O=(0,p.default)(i),E=[],A=0;A<O.length;A++){v=O[A],y=i[v];for(var Y=0;Y<y.edges.length;Y++)a=y.edges[Y],this.clusteredEdges[a.id]===void 0&&(a.toId==a.fromId?r[a.id]=a:a.toId==v?(b=l.id,P=a.fromId,D=P):(b=a.toId,P=l.id,D=b),i[D]===void 0&&E.push({edge:a,fromId:P,toId:b}))}for(var X=[],U=function(se){for(var G=0;G<X.length;G++){var V=X[G],Q=se.fromId===V.fromId&&se.toId===V.toId,K=se.fromId===V.toId&&se.toId===V.fromId;if(Q||K)return V}return null},Z=0;Z<E.length;Z++){var re=E[Z],le=re.edge,he=U(re);he===null?(he=this._createClusteredEdge(re.fromId,re.toId,le,d),X.push(he)):he.clusteringEdgeReplacingIds.push(le.id),this.body.edges[le.id].edgeReplacedById=he.id,this._backupEdgeOptions(le),le.setOptions({physics:!1})}}},{key:"_checkOptions",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return i.clusterEdgeProperties===void 0&&(i.clusterEdgeProperties={}),i.clusterNodeProperties===void 0&&(i.clusterNodeProperties={}),i}},{key:"_cluster",value:function(i,r,l){var d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=[];for(var v in i)i.hasOwnProperty(v)&&this.clusteredNodes[v]!==void 0&&a.push(v);for(var y=0;y<a.length;++y)delete i[a[y]];if((0,p.default)(i).length!=0&&!((0,p.default)(i).length==1&&l.clusterNodeProperties.allowSingleNodeCluster!=!0)){var b=m.deepExtend({},l.clusterNodeProperties);if(l.processProperties!==void 0){var P=[];for(var D in i)if(i.hasOwnProperty(D)){var O=c.cloneOptions(i[D]);P.push(O)}var E=[];for(var A in r)if(r.hasOwnProperty(A)&&A.substr(0,12)!=="clusterEdge:"){var Y=c.cloneOptions(r[A],"edge");E.push(Y)}if(b=l.processProperties(b,P,E),!b)throw new Error("The processProperties function does not return properties!")}b.id===void 0&&(b.id="cluster:"+m.randomUUID());var X=b.id;b.label===void 0&&(b.label="cluster");var U=void 0;b.x===void 0&&(U=this._getClusterPosition(i),b.x=U.x),b.y===void 0&&(U===void 0&&(U=this._getClusterPosition(i)),b.y=U.y),b.id=X;var Z=this.body.functions.createNode(b,u);Z.containedNodes=i,Z.containedEdges=r,Z.clusterEdgeProperties=l.clusterEdgeProperties,this.body.nodes[b.id]=Z,this._clusterEdges(i,r,b,l.clusterEdgeProperties),b.id=void 0,d===!0&&this.body.emitter.emit("_dataChanged")}}},{key:"_backupEdgeOptions",value:function(i){this.clusteredEdges[i.id]===void 0&&(this.clusteredEdges[i.id]={physics:i.options.physics})}},{key:"_restoreEdge",value:function(i){var r=this.clusteredEdges[i.id];r!==void 0&&(i.setOptions({physics:r.physics}),delete this.clusteredEdges[i.id])}},{key:"isCluster",value:function(i){return this.body.nodes[i]!==void 0?this.body.nodes[i].isCluster===!0:(console.log("Node does not exist."),!1)}},{key:"_getClusterPosition",value:function(i){for(var r=(0,p.default)(i),l=i[r[0]].x,d=i[r[0]].x,a=i[r[0]].y,v=i[r[0]].y,y=void 0,b=1;b<r.length;b++)y=i[r[b]],l=y.x<l?y.x:l,d=y.x>d?y.x:d,a=y.y<a?y.y:a,v=y.y>v?y.y:v;return{x:.5*(l+d),y:.5*(a+v)}}},{key:"openCluster",value:function(i,r){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(i===void 0)throw new Error("No clusterNodeId supplied to openCluster.");var d=this.body.nodes[i];if(d===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(d.isCluster!==!0||d.containedNodes===void 0||d.containedEdges===void 0)throw new Error("The node:"+i+" is not a valid cluster.");var a=this.findNode(i),v=a.indexOf(i)-1;if(v>=0){var y=a[v],b=this.body.nodes[y];b._openChildCluster(i),delete this.body.nodes[i],l===!0&&this.body.emitter.emit("_dataChanged");return}var P=d.containedNodes,D=d.containedEdges;if(r!==void 0&&r.releaseFunction!==void 0&&typeof r.releaseFunction=="function"){var O={},E={x:d.x,y:d.y};for(var A in P)if(P.hasOwnProperty(A)){var Y=this.body.nodes[A];O[A]={x:Y.x,y:Y.y}}var X=r.releaseFunction(E,O);for(var U in P)if(P.hasOwnProperty(U)){var Z=this.body.nodes[U];X[U]!==void 0&&(Z.x=X[U].x===void 0?d.x:X[U].x,Z.y=X[U].y===void 0?d.y:X[U].y)}}else m.forEach(P,function(Ee){Ee.options.fixed.x===!1&&(Ee.x=d.x),Ee.options.fixed.y===!1&&(Ee.y=d.y)});for(var re in P)if(P.hasOwnProperty(re)){var le=this.body.nodes[re];le.vx=d.vx,le.vy=d.vy,le.setOptions({physics:!0}),delete this.clusteredNodes[re]}for(var he=[],ce=0;ce<d.edges.length;ce++)he.push(d.edges[ce]);for(var se=0;se<he.length;se++){for(var G=he[se],V=this._getConnectedId(G,i),Q=this.clusteredNodes[V],K=0;K<G.clusteringEdgeReplacingIds.length;K++){var J=G.clusteringEdgeReplacingIds[K],_=this.body.edges[J];if(_!==void 0)if(Q!==void 0){var ee=this.body.nodes[Q.clusterId];ee.containedEdges[_.id]=_,delete D[_.id];var ue=_.fromId,pe=_.toId;_.toId==V?pe=Q.clusterId:ue=Q.clusterId,this._createClusteredEdge(ue,pe,_,ee.clusterEdgeProperties,{hidden:!1,physics:!0})}else this._restoreEdge(_)}G.remove()}for(var Te in D)D.hasOwnProperty(Te)&&this._restoreEdge(D[Te]);delete this.body.nodes[i],l===!0&&this.body.emitter.emit("_dataChanged")}},{key:"getNodesInCluster",value:function(i){var r=[];if(this.isCluster(i)===!0){var l=this.body.nodes[i].containedNodes;for(var d in l)l.hasOwnProperty(d)&&r.push(this.body.nodes[d].id)}return r}},{key:"findNode",value:function(i){for(var r=[],l=100,d=0,a=void 0;this.clusteredNodes[i]!==void 0&&d<l;){if(a=this.body.nodes[i],a===void 0)return[];r.push(a.id),i=this.clusteredNodes[i].clusterId,d++}return a=this.body.nodes[i],a===void 0?[]:(r.push(a.id),r.reverse(),r)}},{key:"updateClusteredNode",value:function(i,r){if(i===void 0)throw new Error("No clusteredNodeId supplied to updateClusteredNode.");if(r===void 0)throw new Error("No newOptions supplied to updateClusteredNode.");if(this.body.nodes[i]===void 0)throw new Error("The clusteredNodeId supplied to updateClusteredNode does not exist.");this.body.nodes[i].setOptions(r),this.body.emitter.emit("_dataChanged")}},{key:"updateEdge",value:function(i,r){if(i===void 0)throw new Error("No startEdgeId supplied to updateEdge.");if(r===void 0)throw new Error("No newOptions supplied to updateEdge.");if(this.body.edges[i]===void 0)throw new Error("The startEdgeId supplied to updateEdge does not exist.");for(var l=this.getClusteredEdges(i),d=0;d<l.length;d++){var a=this.body.edges[l[d]];a.setOptions(r)}this.body.emitter.emit("_dataChanged")}},{key:"getClusteredEdges",value:function(i){for(var r=[],l=100,d=0;i!==void 0&&this.body.edges[i]!==void 0&&d<l;)r.push(this.body.edges[i].id),i=this.body.edges[i].edgeReplacedById,d++;return r.reverse(),r}},{key:"getBaseEdge",value:function(i){return this.getBaseEdges(i)[0]}},{key:"getBaseEdges",value:function(i){for(var r=[i],l=[],d=[],a=100,v=0;r.length>0&&v<a;){var y=r.pop();if(y!==void 0){var b=this.body.edges[y];if(b!==void 0){v++;var P=b.clusteringEdgeReplacingIds;if(P===void 0)d.push(y);else for(var D=0;D<P.length;++D){var O=P[D];r.indexOf(P)!==-1||l.indexOf(P)!==-1||r.push(O)}l.push(y)}}}return d}},{key:"_getConnectedId",value:function(i,r){return i.toId!=r?i.toId:(i.fromId!=r,i.fromId)}},{key:"_getHubSize",value:function(){for(var i=0,r=0,l=0,d=0,a=0;a<this.body.nodeIndices.length;a++){var v=this.body.nodes[this.body.nodeIndices[a]];v.edges.length>d&&(d=v.edges.length),i+=v.edges.length,r+=Math.pow(v.edges.length,2),l+=1}i=i/l,r=r/l;var y=r-Math.pow(i,2),b=Math.sqrt(y),P=Math.floor(i+2*b);return P>d&&(P=d),P}},{key:"_createClusteredEdge",value:function(i,r,l,d,a){var v=c.cloneOptions(l,"edge");m.deepExtend(v,d),v.from=i,v.to=r,v.id="clusterEdge:"+m.randomUUID(),a!==void 0&&m.deepExtend(v,a);var y=this.body.functions.createEdge(v);return y.clusteringEdgeReplacingIds=[l.id],y.connect(),this.body.edges[y.id]=y,y}},{key:"_clusterEdges",value:function(i,r,l,d){if(r instanceof s){var a=r,v={};v[a.id]=a,r=v}if(i instanceof f){var y=i,b={};b[y.id]=y,i=b}if(l==null)throw new Error("_clusterEdges: parameter clusterNode required");d===void 0&&(d=l.clusterEdgeProperties),this._createClusterEdges(i,r,l,d);for(var P in r)if(r.hasOwnProperty(P)&&this.body.edges[P]!==void 0){var D=this.body.edges[P];this._backupEdgeOptions(D),D.setOptions({physics:!1})}for(var O in i)i.hasOwnProperty(O)&&(this.clusteredNodes[O]={clusterId:l.id,node:this.body.nodes[O]},this.body.nodes[O].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(i){if(i!==void 0){var r=this.clusteredNodes[i];if(r!==void 0){var l=r.clusterId;if(l!==void 0)return this.body.nodes[l]}}}},{key:"_filter",value:function(i,r){var l=[];return m.forEach(i,function(d){r(d)&&l.push(d)}),l}},{key:"_updateState",value:function(){var i=this,r=void 0,l=[],d={},a=function(A){m.forEach(i.body.nodes,function(Y){Y.isCluster===!0&&A(Y)})};for(r in this.clusteredNodes)if(this.clusteredNodes.hasOwnProperty(r)){var v=this.body.nodes[r];v===void 0&&l.push(r)}a(function(E){for(var A=0;A<l.length;A++)delete E.containedNodes[l[A]]});for(var y=0;y<l.length;y++)delete this.clusteredNodes[l[y]];m.forEach(this.clusteredEdges,function(E){var A=i.body.edges[E];(A===void 0||!A.endPointsValid())&&(d[E]=E)}),a(function(E){m.forEach(E.containedEdges,function(A,Y){!A.endPointsValid()&&!d[Y]&&(d[Y]=Y)})}),m.forEach(this.body.edges,function(E,A){var Y=!0,X=E.clusteringEdgeReplacingIds;if(X!==void 0){var U=0;m.forEach(X,function(Z){var re=i.body.edges[Z];re!==void 0&&re.endPointsValid()&&(U+=1)}),Y=U>0}(!E.endPointsValid()||!Y)&&(d[A]=A)}),a(function(E){m.forEach(d,function(A){delete E.containedEdges[A],m.forEach(E.edges,function(Y,X){if(Y.id===A){E.edges[X]=null;return}Y.clusteringEdgeReplacingIds=i._filter(Y.clusteringEdgeReplacingIds,function(U){return!d[U]})}),E.edges=i._filter(E.edges,function(Y){return Y!==null})})}),m.forEach(d,function(E){delete i.clusteredEdges[E]}),m.forEach(d,function(E){delete i.body.edges[E]});var b=(0,p.default)(this.body.edges);m.forEach(b,function(E){var A=i.body.edges[E],Y=i._isClusteredNode(A.fromId)||i._isClusteredNode(A.toId);if(Y!==i._isClusteredEdge(A.id))if(Y){var X=i._getClusterNodeForNode(A.fromId);X!==void 0&&i._clusterEdges(i.body.nodes[A.fromId],A,X);var U=i._getClusterNodeForNode(A.toId);U!==void 0&&i._clusterEdges(i.body.nodes[A.toId],A,U)}else throw new Error("remove edge from clustering not implemented!")});for(var P=!1,D=!0,O=function(){var A=[];a(function(X){var U=(0,p.default)(X.containedNodes).length,Z=X.options.allowSingleNodeCluster===!0;(Z&&U<1||!Z&&U<2)&&A.push(X.id)});for(var Y=0;Y<A.length;++Y)i.openCluster(A[Y],{},!1);D=A.length>0,P=P||D};D;)O();P&&this._updateState()}},{key:"_isClusteredNode",value:function(i){return this.clusteredNodes[i]!==void 0}},{key:"_isClusteredEdge",value:function(i){return this.clusteredEdges[i]!==void 0}}]),t}();k.default=e},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(3),p=c(w),S=h(0),M=c(S),x=h(1),I=c(x),T=h(4),R=c(T),C=h(5),m=c(C);function c(e){return e&&e.__esModule?e:{default:e}}var u=h(2),s=h(34).default,f=function(e){(0,m.default)(t,e);function t(n,i,r,l,d,a){(0,M.default)(this,t);var v=(0,R.default)(this,(t.__proto__||(0,p.default)(t)).call(this,n,i,r,l,d,a));return v.isCluster=!0,v.containedNodes={},v.containedEdges={},v}return(0,I.default)(t,[{key:"_openChildCluster",value:function(i){var r=this,l=this.body.nodes[i];if(this.containedNodes[i]===void 0)throw new Error("node with id: "+i+" not in current cluster");if(!l.isCluster)throw new Error("node with id: "+i+" is not a cluster");delete this.containedNodes[i],u.forEach(l.edges,function(d){delete r.containedEdges[d.id]}),u.forEach(l.containedNodes,function(d,a){r.containedNodes[a]=d}),l.containedNodes={},u.forEach(l.containedEdges,function(d,a){r.containedEdges[a]=d}),l.containedEdges={},u.forEach(l.edges,function(d){u.forEach(r.edges,function(a){var v=a.clusteringEdgeReplacingIds.indexOf(d.id);v!==-1&&(u.forEach(d.clusteringEdgeReplacingIds,function(y){a.clusteringEdgeReplacingIds.push(y),r.body.edges[y].edgeReplacedById=a.id}),a.clusteringEdgeReplacingIds.splice(v,1))})}),l.edges=[]}}]),t}(s);k.default=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(0),p=x(w),S=h(1),M=x(S);function x(C){return C&&C.__esModule?C:{default:C}}function I(){var C;window!==void 0&&(C=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),C===void 0?window.requestAnimationFrame=function(m){m()}:window.requestAnimationFrame=C}var T=h(2),R=function(){function C(m,c){(0,p.default)(this,C),I(),this.body=m,this.canvas=c,this.redrawRequested=!1,this.renderTimer=void 0,this.requiresTimeout=!0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},T.extend(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}return(0,M.default)(C,[{key:"bindEventListeners",value:function(){var c=this;this.body.emitter.on("dragStart",function(){c.dragging=!0}),this.body.emitter.on("dragEnd",function(){c.dragging=!1}),this.body.emitter.on("zoom",function(){c.zooming=!0,window.clearTimeout(c.zoomTimeoutId),c.zoomTimeoutId=window.setTimeout(function(){c.zooming=!1,c._requestRedraw.bind(c)()},250)}),this.body.emitter.on("_resizeNodes",function(){c._resizeNodes()}),this.body.emitter.on("_redraw",function(){c.renderingActive===!1&&c._redraw()}),this.body.emitter.on("_blockRedraw",function(){c.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",function(){c.allowRedraw=!0,c.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",this._requestRedraw.bind(this)),this.body.emitter.on("_startRendering",function(){c.renderRequests+=1,c.renderingActive=!0,c._startRendering()}),this.body.emitter.on("_stopRendering",function(){c.renderRequests-=1,c.renderingActive=c.renderRequests>0,c.renderTimer=void 0}),this.body.emitter.on("destroy",function(){c.renderRequests=0,c.allowRedraw=!1,c.renderingActive=!1,c.requiresTimeout===!0?clearTimeout(c.renderTimer):window.cancelAnimationFrame(c.renderTimer),c.body.emitter.off()})}},{key:"setOptions",value:function(c){if(c!==void 0){var u=["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"];T.selectiveDeepExtend(u,this.options,c)}}},{key:"_requestNextFrame",value:function(c,u){if(!(typeof window>"u")){var s=void 0,f=window;return this.requiresTimeout===!0?s=f.setTimeout(c,u):f.requestAnimationFrame&&(s=f.requestAnimationFrame(c)),s}}},{key:"_startRendering",value:function(){this.renderingActive===!0&&this.renderTimer===void 0&&(this.renderTimer=this._requestNextFrame(this._renderStep.bind(this),this.simulationInterval))}},{key:"_renderStep",value:function(){this.renderingActive===!0&&(this.renderTimer=void 0,this.requiresTimeout===!0&&this._startRendering(),this._redraw(),this.requiresTimeout===!1&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var c=this;this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,this._requestNextFrame(function(){c._redraw(!1)},0))}},{key:"_redraw",value:function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1,(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();var u=this.canvas.getContext(),s=this.canvas.frame.canvas.clientWidth,f=this.canvas.frame.canvas.clientHeight;if(u.clearRect(0,0,s,f),this.canvas.frame.clientWidth===0)return;u.save(),u.translate(this.body.view.translation.x,this.body.view.translation.y),u.scale(this.body.view.scale,this.body.view.scale),u.beginPath(),this.body.emitter.emit("beforeDrawing",u),u.closePath(),c===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawEdges(u),(this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1)&&this._drawNodes(u,c),u.beginPath(),this.body.emitter.emit("afterDrawing",u),u.closePath(),u.restore(),c===!0&&u.clearRect(0,0,s,f)}}},{key:"_resizeNodes",value:function(){this.canvas.setTransform();var c=this.canvas.getContext();c.save(),c.translate(this.body.view.translation.x,this.body.view.translation.y),c.scale(this.body.view.scale,this.body.view.scale);var u=this.body.nodes,s=void 0;for(var f in u)u.hasOwnProperty(f)&&(s=u[f],s.resize(c),s.updateBoundingBox(c,s.selected));c.restore()}},{key:"_drawNodes",value:function(c){for(var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=this.body.nodes,f=this.body.nodeIndices,e=void 0,t=[],n=20,i=this.canvas.DOMtoCanvas({x:-n,y:-n}),r=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+n,y:this.canvas.frame.canvas.clientHeight+n}),l={top:i.y,left:i.x,bottom:r.y,right:r.x},d=0;d<f.length;d++)e=s[f[d]],e.isSelected()?t.push(f[d]):u===!0||e.isBoundingBoxOverlappingWith(l)===!0?e.draw(c):e.updateBoundingBox(c,e.selected);for(var a=0;a<t.length;a++)e=s[t[a]],e.draw(c)}},{key:"_drawEdges",value:function(c){for(var u=this.body.edges,s=this.body.edgeIndices,f=void 0,e=0;e<s.length;e++)f=u[s[e]],f.connected===!0&&f.draw(c)}},{key:"_determineBrowserMethod",value:function(){if(typeof window<"u"){var c=navigator.userAgent.toLowerCase();this.requiresTimeout=!1,c.indexOf("msie 9.0")!=-1?this.requiresTimeout=!0:c.indexOf("safari")!=-1&&c.indexOf("chrome")<=-1&&(this.requiresTimeout=!0)}else this.requiresTimeout=!0}}]),C}();k.default=R},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(0),p=x(w),S=h(1),M=x(S);function x(m){return m&&m.__esModule?m:{default:m}}var I=h(24),T=h(36),R=h(2),C=function(){function m(c){(0,p.default)(this,m),this.body=c,this.pixelRatio=1,this.resizeTimer=void 0,this.resizeFunction=this._onResize.bind(this),this.cameraState={},this.initialized=!1,this.canvasViewCenter={},this.options={},this.defaultOptions={autoResize:!0,height:"100%",width:"100%"},R.extend(this.options,this.defaultOptions),this.bindEventListeners()}return(0,M.default)(m,[{key:"bindEventListeners",value:function(){var u=this;this.body.emitter.once("resize",function(s){s.width!==0&&(u.body.view.translation.x=s.width*.5),s.height!==0&&(u.body.view.translation.y=s.height*.5)}),this.body.emitter.on("setSize",this.setSize.bind(this)),this.body.emitter.on("destroy",function(){u.hammerFrame.destroy(),u.hammer.destroy(),u._cleanUp()})}},{key:"setOptions",value:function(u){var s=this;if(u!==void 0){var f=["width","height","autoResize"];R.selectiveDeepExtend(f,this.options,u)}this.options.autoResize===!0&&(this._cleanUp(),this.resizeTimer=setInterval(function(){var e=s.setSize();e===!0&&s.body.emitter.emit("_requestRedraw")},1e3),this.resizeFunction=this._onResize.bind(this),R.addEventListener(window,"resize",this.resizeFunction))}},{key:"_cleanUp",value:function(){this.resizeTimer!==void 0&&clearInterval(this.resizeTimer),R.removeEventListener(window,"resize",this.resizeFunction),this.resizeFunction=void 0}},{key:"_onResize",value:function(){this.setSize(),this.body.emitter.emit("_redraw")}},{key:"_getCameraState",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/u,this.cameraState.previousHeight=this.frame.canvas.height/u,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/u,y:.5*this.frame.canvas.height/u}))}},{key:"_setCameraState",value:function(){if(this.cameraState.scale!==void 0&&this.frame.canvas.clientWidth!==0&&this.frame.canvas.clientHeight!==0&&this.pixelRatio!==0&&this.cameraState.previousWidth>0){var u=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,s=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,f=this.cameraState.scale;u!=1&&s!=1?f=this.cameraState.scale*.5*(u+s):u!=1?f=this.cameraState.scale*u:s!=1&&(f=this.cameraState.scale*s),this.body.view.scale=f;var e=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),t={x:e.x-this.cameraState.position.x,y:e.y-this.cameraState.position.y};this.body.view.translation.x+=t.x*this.body.view.scale,this.body.view.translation.y+=t.y*this.body.view.scale}}},{key:"_prepareValue",value:function(u){if(typeof u=="number")return u+"px";if(typeof u=="string"){if(u.indexOf("%")!==-1||u.indexOf("px")!==-1)return u;if(u.indexOf("%")===-1)return u+"px"}throw new Error("Could not use the value supplied for width or height:"+u)}},{key:"_create",value:function(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=900,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{var u=document.createElement("DIV");u.style.color="red",u.style.fontWeight="bold",u.style.padding="10px",u.innerHTML="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(u)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var u=this;this.hammer!==void 0&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new I(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:I.DIRECTION_ALL}),T.onTouch(this.hammer,function(s){u.body.eventListeners.onTouch(s)}),this.hammer.on("tap",function(s){u.body.eventListeners.onTap(s)}),this.hammer.on("doubletap",function(s){u.body.eventListeners.onDoubleTap(s)}),this.hammer.on("press",function(s){u.body.eventListeners.onHold(s)}),this.hammer.on("panstart",function(s){u.body.eventListeners.onDragStart(s)}),this.hammer.on("panmove",function(s){u.body.eventListeners.onDrag(s)}),this.hammer.on("panend",function(s){u.body.eventListeners.onDragEnd(s)}),this.hammer.on("pinch",function(s){u.body.eventListeners.onPinch(s)}),this.frame.canvas.addEventListener("mousewheel",function(s){u.body.eventListeners.onMouseWheel(s)}),this.frame.canvas.addEventListener("DOMMouseScroll",function(s){u.body.eventListeners.onMouseWheel(s)}),this.frame.canvas.addEventListener("mousemove",function(s){u.body.eventListeners.onMouseMove(s)}),this.frame.canvas.addEventListener("contextmenu",function(s){u.body.eventListeners.onContext(s)}),this.hammerFrame=new I(this.frame),T.onRelease(this.hammerFrame,function(s){u.body.eventListeners.onRelease(s)})}},{key:"setSize",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;u=this._prepareValue(u),s=this._prepareValue(s);var f=!1,e=this.frame.canvas.width,t=this.frame.canvas.height,n=this.pixelRatio;if(this._setPixelRatio(),u!=this.options.width||s!=this.options.height||this.frame.style.width!=u||this.frame.style.height!=s)this._getCameraState(n),this.frame.style.width=u,this.frame.style.height=s,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=u,this.options.height=s,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},f=!0;else{var i=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),r=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==i||this.frame.canvas.height!==r)&&this._getCameraState(n),this.frame.canvas.width!==i&&(this.frame.canvas.width=i,f=!0),this.frame.canvas.height!==r&&(this.frame.canvas.height=r,f=!0)}return f===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(e/this.pixelRatio),oldHeight:Math.round(t/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,f}},{key:"getContext",value:function(){return this.frame.canvas.getContext("2d")}},{key:"_determinePixelRatio",value:function(){var u=this.getContext();if(u===void 0)throw new Error("Could not get canvax context");var s=1;typeof window<"u"&&(s=window.devicePixelRatio||1);var f=u.webkitBackingStorePixelRatio||u.mozBackingStorePixelRatio||u.msBackingStorePixelRatio||u.oBackingStorePixelRatio||u.backingStorePixelRatio||1;return s/f}},{key:"_setPixelRatio",value:function(){this.pixelRatio=this._determinePixelRatio()}},{key:"setTransform",value:function(){var u=this.getContext();if(u===void 0)throw new Error("Could not get canvax context");u.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}},{key:"_XconvertDOMtoCanvas",value:function(u){return(u-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(u){return u*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(u){return(u-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(u){return u*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(u){return{x:this._XconvertCanvasToDOM(u.x),y:this._YconvertCanvasToDOM(u.y)}}},{key:"DOMtoCanvas",value:function(u){return{x:this._XconvertDOMtoCanvas(u.x),y:this._YconvertDOMtoCanvas(u.y)}}}]),m}();k.default=C},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(78),p=T(w),S=h(0),M=T(S),x=h(1),I=T(x);function T(c){return c&&c.__esModule?c:{default:c}}var R=h(2),C=h(57).default,m=function(){function c(u,s){var f=this;(0,M.default)(this,c),this.body=u,this.canvas=s,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",this.fit.bind(this)),this.body.emitter.on("animationFinished",function(){f.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",this.releaseNode.bind(this))}return(0,I.default)(c,[{key:"setOptions",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=s}},{key:"fit",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{nodes:[]},f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e=void 0,t=void 0;if(s=(0,p.default)({},s),(s.nodes===void 0||s.nodes.length===0)&&(s.nodes=this.body.nodeIndices),f===!0){var n=0;for(var i in this.body.nodes)if(this.body.nodes.hasOwnProperty(i)){var r=this.body.nodes[i];r.predefinedPosition===!0&&(n+=1)}if(n>.5*this.body.nodeIndices.length){this.fit(s,!1);return}e=C.getRange(this.body.nodes,s.nodes);var l=this.body.nodeIndices.length;t=12.662/(l+7.4147)+.0964822;var d=Math.min(this.canvas.frame.canvas.clientWidth/600,this.canvas.frame.canvas.clientHeight/600);t*=d}else{this.body.emitter.emit("_resizeNodes"),e=C.getRange(this.body.nodes,s.nodes);var a=Math.abs(e.maxX-e.minX)*1.1,v=Math.abs(e.maxY-e.minY)*1.1,y=this.canvas.frame.canvas.clientWidth/a,b=this.canvas.frame.canvas.clientHeight/v;t=y<=b?y:b}(t>1||t===0)&&(t=1);var P=C.findCenter(e),D={position:P,scale:t,animation:s.animation};this.moveTo(D)}},{key:"focus",value:function(s){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[s]!==void 0){var e={x:this.body.nodes[s].x,y:this.body.nodes[s].y};f.position=e,f.lockedOnNode=s,this.moveTo(f)}else console.log("Node: "+s+" cannot be found.")}},{key:"moveTo",value:function(s){if(s===void 0){s={};return}s.offset===void 0&&(s.offset={x:0,y:0}),s.offset.x===void 0&&(s.offset.x=0),s.offset.y===void 0&&(s.offset.y=0),s.scale===void 0&&(s.scale=this.body.view.scale),s.position===void 0&&(s.position=this.getViewPosition()),s.animation===void 0&&(s.animation={duration:0}),s.animation===!1&&(s.animation={duration:0}),s.animation===!0&&(s.animation={}),s.animation.duration===void 0&&(s.animation.duration=1e3),s.animation.easingFunction===void 0&&(s.animation.easingFunction="easeInOutQuad"),this.animateView(s)}},{key:"animateView",value:function(s){if(s!==void 0){this.animationEasingFunction=s.animation.easingFunction,this.releaseNode(),s.locked===!0&&(this.lockedOnNodeId=s.lockedOnNode,this.lockedOnNodeOffset=s.offset),this.easingTime!=0&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=s.scale,this.body.view.scale=this.targetScale;var f=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),e={x:f.x-s.position.x,y:f.y-s.position.y};this.targetTranslation={x:this.sourceTranslation.x+e.x*this.targetScale+s.offset.x,y:this.sourceTranslation.y+e.y*this.targetScale+s.offset.y},s.animation.duration===0?this.lockedOnNodeId!=null?(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)):(this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw")):(this.animationSpeed=1/(60*s.animation.duration*.001)||1/60,this.animationEasingFunction=s.animation.easingFunction,this.viewFunction=this._transitionRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))}}},{key:"_lockedRedraw",value:function(){var s={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},f=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),e={x:f.x-s.x,y:f.y-s.y},t=this.body.view.translation,n={x:t.x+e.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:t.y+e.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=n}},{key:"releaseNode",value:function(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.easingTime+=this.animationSpeed,this.easingTime=s===!0?1:this.easingTime;var f=R.easingFunctions[this.animationEasingFunction](this.easingTime);this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*f,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*f,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*f},this.easingTime>=1&&(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null&&(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)),this.body.emitter.emit("animationFinished"))}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),c}();k.default=m},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(0),p=x(w),S=h(1),M=x(S);function x(m){return m&&m.__esModule?m:{default:m}}var I=h(2),T=h(184).default,R=h(185).default,C=function(){function m(c,u,s){(0,p.default)(this,m),this.body=c,this.canvas=u,this.selectionHandler=s,this.navigationHandler=new T(c,u),this.body.eventListeners.onTap=this.onTap.bind(this),this.body.eventListeners.onTouch=this.onTouch.bind(this),this.body.eventListeners.onDoubleTap=this.onDoubleTap.bind(this),this.body.eventListeners.onHold=this.onHold.bind(this),this.body.eventListeners.onDragStart=this.onDragStart.bind(this),this.body.eventListeners.onDrag=this.onDrag.bind(this),this.body.eventListeners.onDragEnd=this.onDragEnd.bind(this),this.body.eventListeners.onMouseWheel=this.onMouseWheel.bind(this),this.body.eventListeners.onPinch=this.onPinch.bind(this),this.body.eventListeners.onMouseMove=this.onMouseMove.bind(this),this.body.eventListeners.onRelease=this.onRelease.bind(this),this.body.eventListeners.onContext=this.onContext.bind(this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=this.getPointer.bind(this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0,zoomSpeed:1},I.extend(this.options,this.defaultOptions),this.bindEventListeners()}return(0,M.default)(m,[{key:"bindEventListeners",value:function(){var u=this;this.body.emitter.on("destroy",function(){clearTimeout(u.popupTimer),delete u.body.functions.getPointer})}},{key:"setOptions",value:function(u){if(u!==void 0){var s=["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"];I.selectiveNotDeepExtend(s,this.options,u),I.mergeOptions(this.options,u,"keyboard"),u.tooltip&&(I.extend(this.options.tooltip,u.tooltip),u.tooltip.color&&(this.options.tooltip.color=I.parseColor(u.tooltip.color)))}this.navigationHandler.setOptions(this.options)}},{key:"getPointer",value:function(u){return{x:u.x-I.getAbsoluteLeft(this.canvas.frame.canvas),y:u.y-I.getAbsoluteTop(this.canvas.frame.canvas)}}},{key:"onTouch",value:function(u){new Date().valueOf()-this.touchTime>50&&(this.drag.pointer=this.getPointer(u.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=new Date().valueOf())}},{key:"onTap",value:function(u){var s=this.getPointer(u.center),f=this.selectionHandler.options.multiselect&&(u.changedPointers[0].ctrlKey||u.changedPointers[0].metaKey);this.checkSelectionChanges(s,u,f),this.selectionHandler._generateClickEvent("click",u,s)}},{key:"onDoubleTap",value:function(u){var s=this.getPointer(u.center);this.selectionHandler._generateClickEvent("doubleClick",u,s)}},{key:"onHold",value:function(u){var s=this.getPointer(u.center),f=this.selectionHandler.options.multiselect;this.checkSelectionChanges(s,u,f),this.selectionHandler._generateClickEvent("click",u,s),this.selectionHandler._generateClickEvent("hold",u,s)}},{key:"onRelease",value:function(u){if(new Date().valueOf()-this.touchTime>10){var s=this.getPointer(u.center);this.selectionHandler._generateClickEvent("release",u,s),this.touchTime=new Date().valueOf()}}},{key:"onContext",value:function(u){var s=this.getPointer({x:u.clientX,y:u.clientY});this.selectionHandler._generateClickEvent("oncontext",u,s)}},{key:"checkSelectionChanges",value:function(u,s){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,e=this.selectionHandler.getSelection(),t=!1;f===!0?t=this.selectionHandler.selectAdditionalOnPoint(u):t=this.selectionHandler.selectOnPoint(u);var n=this.selectionHandler.getSelection(),i=this._determineDifference(e,n),r=this._determineDifference(n,e);i.edges.length>0&&(this.selectionHandler._generateClickEvent("deselectEdge",s,u,e),t=!0),i.nodes.length>0&&(this.selectionHandler._generateClickEvent("deselectNode",s,u,e),t=!0),r.nodes.length>0&&(this.selectionHandler._generateClickEvent("selectNode",s,u),t=!0),r.edges.length>0&&(this.selectionHandler._generateClickEvent("selectEdge",s,u),t=!0),t===!0&&this.selectionHandler._generateClickEvent("select",s,u)}},{key:"_determineDifference",value:function(u,s){var f=function(t,n){for(var i=[],r=0;r<t.length;r++){var l=t[r];n.indexOf(l)===-1&&i.push(l)}return i};return{nodes:f(u.nodes,s.nodes),edges:f(u.edges,s.edges)}}},{key:"onDragStart",value:function(u){this.drag.pointer===void 0&&this.onTouch(u);var s=this.selectionHandler.getNodeAt(this.drag.pointer);if(this.drag.dragging=!0,this.drag.selection=[],this.drag.translation=I.extend({},this.body.view.translation),this.drag.nodeId=void 0,s!==void 0&&this.options.dragNodes===!0){this.drag.nodeId=s.id,s.isSelected()===!1&&(this.selectionHandler.unselectAll(),this.selectionHandler.selectObject(s)),this.selectionHandler._generateClickEvent("dragStart",u,this.drag.pointer);var f=this.selectionHandler.selectionObj.nodes;for(var e in f)if(f.hasOwnProperty(e)){var t=f[e],n={id:t.id,node:t,x:t.x,y:t.y,xFixed:t.options.fixed.x,yFixed:t.options.fixed.y};t.options.fixed.x=!0,t.options.fixed.y=!0,this.drag.selection.push(n)}}else this.selectionHandler._generateClickEvent("dragStart",u,this.drag.pointer,void 0,!0)}},{key:"onDrag",value:function(u){var s=this;if(this.drag.pinched!==!0){this.body.emitter.emit("unlockNode");var f=this.getPointer(u.center),e=this.drag.selection;if(e&&e.length&&this.options.dragNodes===!0){this.selectionHandler._generateClickEvent("dragging",u,f);var t=f.x-this.drag.pointer.x,n=f.y-this.drag.pointer.y;e.forEach(function(l){var d=l.node;l.xFixed===!1&&(d.x=s.canvas._XconvertDOMtoCanvas(s.canvas._XconvertCanvasToDOM(l.x)+t)),l.yFixed===!1&&(d.y=s.canvas._YconvertDOMtoCanvas(s.canvas._YconvertCanvasToDOM(l.y)+n))}),this.body.emitter.emit("startSimulation")}else if(this.options.dragView===!0){if(this.selectionHandler._generateClickEvent("dragging",u,f,void 0,!0),this.drag.pointer===void 0){this.onDragStart(u);return}var i=f.x-this.drag.pointer.x,r=f.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+i,y:this.drag.translation.y+r},this.body.emitter.emit("_requestRedraw")}}}},{key:"onDragEnd",value:function(u){this.drag.dragging=!1;var s=this.drag.selection;s&&s.length?(s.forEach(function(f){f.node.options.fixed.x=f.xFixed,f.node.options.fixed.y=f.yFixed}),this.selectionHandler._generateClickEvent("dragEnd",u,this.getPointer(u.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler._generateClickEvent("dragEnd",u,this.getPointer(u.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}},{key:"onPinch",value:function(u){var s=this.getPointer(u.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);var f=this.pinch.scale*u.scale;this.zoom(f,s)}},{key:"zoom",value:function(u,s){if(this.options.zoomView===!0){var f=this.body.view.scale;u<1e-5&&(u=1e-5),u>10&&(u=10);var e=void 0;this.drag!==void 0&&this.drag.dragging===!0&&(e=this.canvas.DOMtoCanvas(this.drag.pointer));var t=this.body.view.translation,n=u/f,i=(1-n)*s.x+t.x*n,r=(1-n)*s.y+t.y*n;if(this.body.view.scale=u,this.body.view.translation={x:i,y:r},e!=null){var l=this.canvas.canvasToDOM(e);this.drag.pointer.x=l.x,this.drag.pointer.y=l.y}this.body.emitter.emit("_requestRedraw"),f<u?this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:s}):this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:s})}}},{key:"onMouseWheel",value:function(u){if(this.options.zoomView===!0){var s=0;if(u.wheelDelta?s=u.wheelDelta/120:u.detail&&(s=-u.detail/3),s!==0){var f=this.body.view.scale,e=s*(this.options.zoomSpeed/10);s<0&&(e=e/(1-e)),f*=1+e;var t=this.getPointer({x:u.clientX,y:u.clientY});this.zoom(f,t)}u.preventDefault()}}},{key:"onMouseMove",value:function(u){var s=this,f=this.getPointer({x:u.clientX,y:u.clientY}),e=!1;this.popup!==void 0&&(this.popup.hidden===!1&&this._checkHidePopup(f),this.popup.hidden===!1&&(e=!0,this.popup.setPosition(f.x+3,f.y-5),this.popup.show())),this.options.keyboard.bindToWindow===!1&&this.options.keyboard.enabled===!0&&this.canvas.frame.focus(),e===!1&&(this.popupTimer!==void 0&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=setTimeout(function(){return s._checkShowPopup(f)},this.options.tooltipDelay))),this.options.hover===!0&&this.selectionHandler.hoverObject(u,f)}},{key:"_checkShowPopup",value:function(u){var s=this.canvas._XconvertDOMtoCanvas(u.x),f=this.canvas._YconvertDOMtoCanvas(u.y),e={left:s,top:f,right:s,bottom:f},t=this.popupObj===void 0?void 0:this.popupObj.id,n=!1,i="node";if(this.popupObj===void 0){for(var r=this.body.nodeIndices,l=this.body.nodes,d=void 0,a=[],v=0;v<r.length;v++)d=l[r[v]],d.isOverlappingWith(e)===!0&&(n=!0,d.getTitle()!==void 0&&a.push(r[v]));a.length>0&&(this.popupObj=l[a[a.length-1]],n=!0)}if(this.popupObj===void 0&&n===!1){for(var y=this.body.edgeIndices,b=this.body.edges,P=void 0,D=[],O=0;O<y.length;O++)P=b[y[O]],P.isOverlappingWith(e)===!0&&P.connected===!0&&P.getTitle()!==void 0&&D.push(y[O]);D.length>0&&(this.popupObj=b[D[D.length-1]],i="edge")}this.popupObj!==void 0?this.popupObj.id!==t&&(this.popup===void 0&&(this.popup=new R(this.canvas.frame)),this.popup.popupTargetType=i,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(u.x+3,u.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(u){var s=this.selectionHandler._pointerToPositionObject(u),f=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(f=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(s),f===!0)){var e=this.selectionHandler.getNodeAt(u);f=e===void 0?!1:e.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(u)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(f=this.body.edges[this.popup.popupTargetId].isOverlappingWith(s));f===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),m}();k.default=C},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(0),p=x(w),S=h(1),M=x(S);function x(m){return m&&m.__esModule?m:{default:m}}var I=h(24),T=h(36),R=h(52),C=function(){function m(c,u){var s=this;(0,p.default)(this,m),this.body=c,this.canvas=u,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on("activate",function(){s.activated=!0,s.configureKeyboardBindings()}),this.body.emitter.on("deactivate",function(){s.activated=!1,s.configureKeyboardBindings()}),this.body.emitter.on("destroy",function(){s.keycharm!==void 0&&s.keycharm.destroy()}),this.options={}}return(0,M.default)(m,[{key:"setOptions",value:function(u){u!==void 0&&(this.options=u,this.create())}},{key:"create",value:function(){this.options.navigationButtons===!0?this.iconsCreated===!1&&this.loadNavigationElements():this.iconsCreated===!0&&this.cleanNavigation(),this.configureKeyboardBindings()}},{key:"cleanNavigation",value:function(){if(this.navigationHammers.length!=0){for(var u=0;u<this.navigationHammers.length;u++)this.navigationHammers[u].destroy();this.navigationHammers=[]}this.navigationDOM&&this.navigationDOM.wrapper&&this.navigationDOM.wrapper.parentNode&&this.navigationDOM.wrapper.parentNode.removeChild(this.navigationDOM.wrapper),this.iconsCreated=!1}},{key:"loadNavigationElements",value:function(){var u=this;this.cleanNavigation(),this.navigationDOM={};var s=["up","down","left","right","zoomIn","zoomOut","zoomExtends"],f=["_moveUp","_moveDown","_moveLeft","_moveRight","_zoomIn","_zoomOut","_fit"];this.navigationDOM.wrapper=document.createElement("div"),this.navigationDOM.wrapper.className="vis-navigation",this.canvas.frame.appendChild(this.navigationDOM.wrapper);for(var e=0;e<s.length;e++){this.navigationDOM[s[e]]=document.createElement("div"),this.navigationDOM[s[e]].className="vis-button vis-"+s[e],this.navigationDOM.wrapper.appendChild(this.navigationDOM[s[e]]);var t=new I(this.navigationDOM[s[e]]);f[e]==="_fit"?T.onTouch(t,this._fit.bind(this)):T.onTouch(t,this.bindToRedraw.bind(this,f[e])),this.navigationHammers.push(t)}var n=new I(this.canvas.frame);T.onRelease(n,function(){u._stopMovement()}),this.navigationHammers.push(n),this.iconsCreated=!0}},{key:"bindToRedraw",value:function(u){this.boundFunctions[u]===void 0&&(this.boundFunctions[u]=this[u].bind(this),this.body.emitter.on("initRedraw",this.boundFunctions[u]),this.body.emitter.emit("_startRendering"))}},{key:"unbindFromRedraw",value:function(u){this.boundFunctions[u]!==void 0&&(this.body.emitter.off("initRedraw",this.boundFunctions[u]),this.body.emitter.emit("_stopRendering"),delete this.boundFunctions[u])}},{key:"_fit",value:function(){new Date().valueOf()-this.touchTime>700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=new Date().valueOf())}},{key:"_stopMovement",value:function(){for(var u in this.boundFunctions)this.boundFunctions.hasOwnProperty(u)&&(this.body.emitter.off("initRedraw",this.boundFunctions[u]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){var u=this.body.view.scale,s=this.body.view.scale*(1+this.options.keyboard.speed.zoom),f=this.body.view.translation,e=s/u,t=(1-e)*this.canvas.canvasViewCenter.x+f.x*e,n=(1-e)*this.canvas.canvasViewCenter.y+f.y*e;this.body.view.scale=s,this.body.view.translation={x:t,y:n},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}},{key:"_zoomOut",value:function(){var u=this.body.view.scale,s=this.body.view.scale/(1+this.options.keyboard.speed.zoom),f=this.body.view.translation,e=s/u,t=(1-e)*this.canvas.canvasViewCenter.x+f.x*e,n=(1-e)*this.canvas.canvasViewCenter.y+f.y*e;this.body.view.scale=s,this.body.view.translation={x:t,y:n},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}},{key:"configureKeyboardBindings",value:function(){var u=this;this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=R({container:window,preventDefault:!0}):this.keycharm=R({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0&&(this.keycharm.bind("up",function(){u.bindToRedraw("_moveUp")},"keydown"),this.keycharm.bind("down",function(){u.bindToRedraw("_moveDown")},"keydown"),this.keycharm.bind("left",function(){u.bindToRedraw("_moveLeft")},"keydown"),this.keycharm.bind("right",function(){u.bindToRedraw("_moveRight")},"keydown"),this.keycharm.bind("=",function(){u.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num+",function(){u.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num-",function(){u.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("-",function(){u.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("[",function(){u.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("]",function(){u.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pageup",function(){u.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pagedown",function(){u.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("up",function(){u.unbindFromRedraw("_moveUp")},"keyup"),this.keycharm.bind("down",function(){u.unbindFromRedraw("_moveDown")},"keyup"),this.keycharm.bind("left",function(){u.unbindFromRedraw("_moveLeft")},"keyup"),this.keycharm.bind("right",function(){u.unbindFromRedraw("_moveRight")},"keyup"),this.keycharm.bind("=",function(){u.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num+",function(){u.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num-",function(){u.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("-",function(){u.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("[",function(){u.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("]",function(){u.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pageup",function(){u.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pagedown",function(){u.unbindFromRedraw("_zoomOut")},"keyup")))}}]),m}();k.default=C},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(0),p=x(w),S=h(1),M=x(S);function x(T){return T&&T.__esModule?T:{default:T}}var I=function(){function T(R,C){(0,p.default)(this,T),this.container=R,this.overflowMethod=C||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}return(0,M.default)(T,[{key:"setPosition",value:function(C,m){this.x=parseInt(C),this.y=parseInt(m)}},{key:"setText",value:function(C){C instanceof Element?(this.frame.innerHTML="",this.frame.appendChild(C)):this.frame.innerHTML=C}},{key:"show",value:function(C){if(C===void 0&&(C=!0),C===!0){var m=this.frame.clientHeight,c=this.frame.clientWidth,u=this.frame.parentNode.clientHeight,s=this.frame.parentNode.clientWidth,f=0,e=0;if(this.overflowMethod=="flip"){var t=!1,n=!0;this.y-m<this.padding&&(n=!1),this.x+c>s-this.padding&&(t=!0),t?f=this.x-c:f=this.x,n?e=this.y-m:e=this.y}else e=this.y-m,e+m+this.padding>u&&(e=u-m-this.padding),e<this.padding&&(e=this.padding),f=this.x,f+c+this.padding>s&&(f=s-c-this.padding),f<this.padding&&(f=this.padding);this.frame.style.left=f+"px",this.frame.style.top=e+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}},{key:"hide",value:function(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}},{key:"destroy",value:function(){this.frame.parentNode.removeChild(this.frame)}}]),T}();k.default=I},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(9),p=T(w),S=h(0),M=T(S),x=h(1),I=T(x);function T(u){return u&&u.__esModule?u:{default:u}}var R=h(34).default,C=h(55).default,m=h(2),c=function(){function u(s,f){var e=this;(0,M.default)(this,u),this.body=s,this.canvas=f,this.selectionObj={nodes:[],edges:[]},this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},m.extend(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",function(){e.updateSelection()})}return(0,I.default)(u,[{key:"setOptions",value:function(f){if(f!==void 0){var e=["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"];m.selectiveDeepExtend(e,this.options,f)}}},{key:"selectOnPoint",value:function(f){var e=!1;if(this.options.selectable===!0){var t=this.getNodeAt(f)||this.getEdgeAt(f);this.unselectAll(),t!==void 0&&(e=this.selectObject(t)),this.body.emitter.emit("_requestRedraw")}return e}},{key:"selectAdditionalOnPoint",value:function(f){var e=!1;if(this.options.selectable===!0){var t=this.getNodeAt(f)||this.getEdgeAt(f);t!==void 0&&(e=!0,t.isSelected()===!0?this.deselectObject(t):this.selectObject(t),this.body.emitter.emit("_requestRedraw"))}return e}},{key:"_initBaseEvent",value:function(f,e){var t={};return t.pointer={DOM:{x:e.x,y:e.y},canvas:this.canvas.DOMtoCanvas(e)},t.event=f,t}},{key:"_generateClickEvent",value:function(f,e,t,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,r=this._initBaseEvent(e,t);if(i===!0)r.nodes=[],r.edges=[];else{var l=this.getSelection();r.nodes=l.nodes,r.edges=l.edges}n!==void 0&&(r.previousSelection=n),f=="click"&&(r.items=this.getClickedItems(t)),e.controlEdge!==void 0&&(r.controlEdge=e.controlEdge),this.body.emitter.emit(f,r)}},{key:"selectObject",value:function(f){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;return f!==void 0?(f instanceof R&&e===!0&&this._selectConnectedEdges(f),f.select(),this._addToSelection(f),!0):!1}},{key:"deselectObject",value:function(f){f.isSelected()===!0&&(f.selected=!1,this._removeFromSelection(f))}},{key:"_getAllNodesOverlappingWith",value:function(f){for(var e=[],t=this.body.nodes,n=0;n<this.body.nodeIndices.length;n++){var i=this.body.nodeIndices[n];t[i].isOverlappingWith(f)&&e.push(i)}return e}},{key:"_pointerToPositionObject",value:function(f){var e=this.canvas.DOMtoCanvas(f);return{left:e.x-1,top:e.y+1,right:e.x+1,bottom:e.y-1}}},{key:"getNodeAt",value:function(f){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,t=this._pointerToPositionObject(f),n=this._getAllNodesOverlappingWith(t);if(n.length>0)return e===!0?this.body.nodes[n[n.length-1]]:n[n.length-1]}},{key:"_getEdgesOverlappingWith",value:function(f,e){for(var t=this.body.edges,n=0;n<this.body.edgeIndices.length;n++){var i=this.body.edgeIndices[n];t[i].isOverlappingWith(f)&&e.push(i)}}},{key:"_getAllEdgesOverlappingWith",value:function(f){var e=[];return this._getEdgesOverlappingWith(f,e),e}},{key:"getEdgeAt",value:function(f){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,t=this.canvas.DOMtoCanvas(f),n=10,i=null,r=this.body.edges,l=0;l<this.body.edgeIndices.length;l++){var d=this.body.edgeIndices[l],a=r[d];if(a.connected){var v=a.from.x,y=a.from.y,b=a.to.x,P=a.to.y,D=a.edgeType.getDistanceToEdge(v,y,b,P,t.x,t.y);D<n&&(i=d,n=D)}}if(i!==null)return e===!0?this.body.edges[i]:i}},{key:"_addToSelection",value:function(f){f instanceof R?this.selectionObj.nodes[f.id]=f:this.selectionObj.edges[f.id]=f}},{key:"_addToHover",value:function(f){f instanceof R?this.hoverObj.nodes[f.id]=f:this.hoverObj.edges[f.id]=f}},{key:"_removeFromSelection",value:function(f){f instanceof R?(delete this.selectionObj.nodes[f.id],this._unselectConnectedEdges(f)):delete this.selectionObj.edges[f.id]}},{key:"unselectAll",value:function(){for(var f in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(f)&&this.selectionObj.nodes[f].unselect();for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&this.selectionObj.edges[e].unselect();this.selectionObj={nodes:{},edges:{}}}},{key:"_getSelectedNodeCount",value:function(){var f=0;for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&(f+=1);return f}},{key:"_getSelectedNode",value:function(){for(var f in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(f))return this.selectionObj.nodes[f]}},{key:"_getSelectedEdge",value:function(){for(var f in this.selectionObj.edges)if(this.selectionObj.edges.hasOwnProperty(f))return this.selectionObj.edges[f]}},{key:"_getSelectedEdgeCount",value:function(){var f=0;for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&(f+=1);return f}},{key:"_getSelectedObjectCount",value:function(){var f=0;for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&(f+=1);for(var t in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(t)&&(f+=1);return f}},{key:"_selectionIsEmpty",value:function(){for(var f in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(f))return!1;for(var e in this.selectionObj.edges)if(this.selectionObj.edges.hasOwnProperty(e))return!1;return!0}},{key:"_clusterInSelection",value:function(){for(var f in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(f)&&this.selectionObj.nodes[f].clusterSize>1)return!0;return!1}},{key:"_selectConnectedEdges",value:function(f){for(var e=0;e<f.edges.length;e++){var t=f.edges[e];t.select(),this._addToSelection(t)}}},{key:"_hoverConnectedEdges",value:function(f){for(var e=0;e<f.edges.length;e++){var t=f.edges[e];t.hover=!0,this._addToHover(t)}}},{key:"_unselectConnectedEdges",value:function(f){for(var e=0;e<f.edges.length;e++){var t=f.edges[e];t.unselect(),this._removeFromSelection(t)}}},{key:"emitBlurEvent",value:function(f,e,t){var n=this._initBaseEvent(f,e);t.hover===!0&&(t.hover=!1,t instanceof R?(n.node=t.id,this.body.emitter.emit("blurNode",n)):(n.edge=t.id,this.body.emitter.emit("blurEdge",n)))}},{key:"emitHoverEvent",value:function(f,e,t){var n=this._initBaseEvent(f,e),i=!1;return t.hover===!1&&(t.hover=!0,this._addToHover(t),i=!0,t instanceof R?(n.node=t.id,this.body.emitter.emit("hoverNode",n)):(n.edge=t.id,this.body.emitter.emit("hoverEdge",n))),i}},{key:"hoverObject",value:function(f,e){var t=this.getNodeAt(e);t===void 0&&(t=this.getEdgeAt(e));var n=!1;for(var i in this.hoverObj.nodes)this.hoverObj.nodes.hasOwnProperty(i)&&(t===void 0||t instanceof R&&t.id!=i||t instanceof C)&&(this.emitBlurEvent(f,e,this.hoverObj.nodes[i]),delete this.hoverObj.nodes[i],n=!0);for(var r in this.hoverObj.edges)this.hoverObj.edges.hasOwnProperty(r)&&(n===!0?(this.hoverObj.edges[r].hover=!1,delete this.hoverObj.edges[r]):(t===void 0||t instanceof C&&t.id!=r||t instanceof R&&!t.hover)&&(this.emitBlurEvent(f,e,this.hoverObj.edges[r]),delete this.hoverObj.edges[r],n=!0));if(t!==void 0){var l=(0,p.default)(this.hoverObj.edges).length,d=(0,p.default)(this.hoverObj.nodes).length,a=t instanceof C&&l===0&&d===0;(n||a)&&(n=this.emitHoverEvent(f,e,t)),t instanceof R&&this.options.hoverConnectedEdges===!0&&this._hoverConnectedEdges(t)}n===!0&&this.body.emitter.emit("_requestRedraw")}},{key:"getSelection",value:function(){var f=this.getSelectedNodes(),e=this.getSelectedEdges();return{nodes:f,edges:e}}},{key:"getSelectedNodes",value:function(){var f=[];if(this.options.selectable===!0)for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&f.push(this.selectionObj.nodes[e].id);return f}},{key:"getSelectedEdges",value:function(){var f=[];if(this.options.selectable===!0)for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&f.push(this.selectionObj.edges[e].id);return f}},{key:"setSelection",value:function(f){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=void 0,n=void 0;if(!f||!f.nodes&&!f.edges)throw"Selection must be an object with nodes and/or edges properties";if((e.unselectAll||e.unselectAll===void 0)&&this.unselectAll(),f.nodes)for(t=0;t<f.nodes.length;t++){n=f.nodes[t];var i=this.body.nodes[n];if(!i)throw new RangeError('Node with id "'+n+'" not found');this.selectObject(i,e.highlightEdges)}if(f.edges)for(t=0;t<f.edges.length;t++){n=f.edges[t];var r=this.body.edges[n];if(!r)throw new RangeError('Edge with id "'+n+'" not found');this.selectObject(r)}this.body.emitter.emit("_requestRedraw")}},{key:"selectNodes",value:function(f){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!f||f.length===void 0)throw"Selection must be an array with ids";this.setSelection({nodes:f},{highlightEdges:e})}},{key:"selectEdges",value:function(f){if(!f||f.length===void 0)throw"Selection must be an array with ids";this.setSelection({edges:f})}},{key:"updateSelection",value:function(){for(var f in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(f)&&(this.body.nodes.hasOwnProperty(f)||delete this.selectionObj.nodes[f]);for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&(this.body.edges.hasOwnProperty(e)||delete this.selectionObj.edges[e])}},{key:"getClickedItems",value:function(f){for(var e=this.canvas.DOMtoCanvas(f),t=[],n=this.body.nodeIndices,i=this.body.nodes,r=n.length-1;r>=0;r--){var l=i[n[r]],d=l.getItemsOnPoint(e);t.push.apply(t,d)}for(var a=this.body.edgeIndices,v=this.body.edges,y=a.length-1;y>=0;y--){var b=v[a[y]],P=b.getItemsOnPoint(e);t.push.apply(t,P)}return t}}]),u}();k.default=c},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(15),p=c(w),S=h(7),M=c(S),x=h(9),I=c(x),T=h(0),R=c(T),C=h(1),m=c(C);function c(l){return l&&l.__esModule?l:{default:l}}var u=h(83),s=h(2),f=h(57).default,e=h(189),t=e.HorizontalStrategy,n=e.VerticalStrategy,i=function(){function l(){(0,R.default)(this,l),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return(0,m.default)(l,[{key:"addRelation",value:function(a,v){this.childrenReference[a]===void 0&&(this.childrenReference[a]=[]),this.childrenReference[a].push(v),this.parentReference[v]===void 0&&(this.parentReference[v]=[]),this.parentReference[v].push(a)}},{key:"checkIfTree",value:function(){for(var a in this.parentReference)if(this.parentReference[a].length>1){this.isTree=!1;return}this.isTree=!0}},{key:"numTrees",value:function(){return this.treeIndex+1}},{key:"setTreeIndex",value:function(a,v){v!==void 0&&this.trees[a.id]===void 0&&(this.trees[a.id]=v,this.treeIndex=Math.max(v,this.treeIndex))}},{key:"ensureLevel",value:function(a){this.levels[a]===void 0&&(this.levels[a]=0)}},{key:"getMaxLevel",value:function(a){var v=this,y={},b=function P(D){if(y[D]!==void 0)return y[D];var O=v.levels[D];if(v.childrenReference[D]){var E=v.childrenReference[D];if(E.length>0)for(var A=0;A<E.length;A++)O=Math.max(O,P(E[A]))}return y[D]=O,O};return b(a)}},{key:"levelDownstream",value:function(a,v){this.levels[v.id]===void 0&&(this.levels[a.id]===void 0&&(this.levels[a.id]=0),this.levels[v.id]=this.levels[a.id]+1)}},{key:"setMinLevelToZero",value:function(a){var v=1e9;for(var y in a)a.hasOwnProperty(y)&&this.levels[y]!==void 0&&(v=Math.min(this.levels[y],v));for(var b in a)a.hasOwnProperty(b)&&this.levels[b]!==void 0&&(this.levels[b]-=v)}},{key:"getTreeSize",value:function(a,v){var y=1e9,b=-1e9,P=1e9,D=-1e9;for(var O in this.trees)if(this.trees.hasOwnProperty(O)&&this.trees[O]===v){var E=a[O];y=Math.min(E.x,y),b=Math.max(E.x,b),P=Math.min(E.y,P),D=Math.max(E.y,D)}return{min_x:y,max_x:b,min_y:P,max_y:D}}},{key:"hasSameParent",value:function(a,v){var y=this.parentReference[a.id],b=this.parentReference[v.id];if(y===void 0||b===void 0)return!1;for(var P=0;P<y.length;P++)for(var D=0;D<b.length;D++)if(y[P]==b[D])return!0;return!1}},{key:"inSameSubNetwork",value:function(a,v){return this.trees[a.id]===this.trees[v.id]}},{key:"getLevels",value:function(){return(0,I.default)(this.distributionOrdering)}},{key:"addToOrdering",value:function(a,v){this.distributionOrdering[v]===void 0&&(this.distributionOrdering[v]=[]);var y=!1,b=this.distributionOrdering[v];for(var P in b)if(b[P]===a){y=!0;break}y||(this.distributionOrdering[v].push(a),this.distributionIndex[a.id]=this.distributionOrdering[v].length-1)}}]),l}(),r=function(){function l(d){(0,R.default)(this,l),this.body=d,this.initialRandomSeed=Math.round(Math.random()*1e6),this.randomSeed=this.initialRandomSeed,this.setPhysics=!1,this.options={},this.optionsBackup={physics:{}},this.defaultOptions={randomSeed:void 0,improvedLayout:!0,hierarchical:{enabled:!1,levelSeparation:150,nodeSpacing:100,treeSpacing:200,blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:"UD",sortMethod:"hubsize"}},s.extend(this.options,this.defaultOptions),this.bindEventListeners()}return(0,m.default)(l,[{key:"bindEventListeners",value:function(){var a=this;this.body.emitter.on("_dataChanged",function(){a.setupHierarchicalLayout()}),this.body.emitter.on("_dataLoaded",function(){a.layoutNetwork()}),this.body.emitter.on("_resetHierarchicalLayout",function(){a.setupHierarchicalLayout()}),this.body.emitter.on("_adjustEdgesForHierarchicalLayout",function(){if(a.options.hierarchical.enabled===!0){var v=a.direction.curveType();a.body.emitter.emit("_forceDisableDynamicCurves",v,!1)}})}},{key:"setOptions",value:function(a,v){if(a!==void 0){var y=this.options.hierarchical,b=y.enabled;if(s.selectiveDeepExtend(["randomSeed","improvedLayout"],this.options,a),s.mergeOptions(this.options,a,"hierarchical"),a.randomSeed!==void 0&&(this.initialRandomSeed=a.randomSeed),y.enabled===!0)return b===!0&&this.body.emitter.emit("refresh",!0),y.direction==="RL"||y.direction==="DU"?y.levelSeparation>0&&(y.levelSeparation*=-1):y.levelSeparation<0&&(y.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(v);if(b===!0)return this.body.emitter.emit("refresh"),s.deepExtend(v,this.optionsBackup)}return v}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(a){if(this.options.hierarchical.enabled===!0){var v=this.optionsBackup.physics;a.physics===void 0||a.physics===!0?(a.physics={enabled:v.enabled===void 0?!0:v.enabled,solver:"hierarchicalRepulsion"},v.enabled=v.enabled===void 0?!0:v.enabled,v.solver=v.solver||"barnesHut"):(0,M.default)(a.physics)==="object"?(v.enabled=a.physics.enabled===void 0?!0:a.physics.enabled,v.solver=a.physics.solver||"barnesHut",a.physics.solver="hierarchicalRepulsion"):a.physics!==!1&&(v.solver="barnesHut",a.physics={solver:"hierarchicalRepulsion"});var y=this.direction.curveType();if(a.edges===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},a.edges={smooth:!1};else if(a.edges.smooth===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},a.edges.smooth=!1;else if(typeof a.edges.smooth=="boolean")this.optionsBackup.edges={smooth:a.edges.smooth},a.edges.smooth={enabled:a.edges.smooth,type:y};else{var b=a.edges.smooth;b.type!==void 0&&b.type!=="dynamic"&&(y=b.type),this.optionsBackup.edges={smooth:b.enabled===void 0?!0:b.enabled,type:b.type===void 0?"dynamic":b.type,roundness:b.roundness===void 0?.5:b.roundness,forceDirection:b.forceDirection===void 0?!1:b.forceDirection},a.edges.smooth={enabled:b.enabled===void 0?!0:b.enabled,type:y,roundness:b.roundness===void 0?.5:b.roundness,forceDirection:b.forceDirection===void 0?!1:b.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",y)}return a}},{key:"seededRandom",value:function(){var a=Math.sin(this.randomSeed++)*1e4;return a-Math.floor(a)}},{key:"positionInitially",value:function(a){if(this.options.hierarchical.enabled!==!0){this.randomSeed=this.initialRandomSeed;for(var v=a.length+50,y=0;y<a.length;y++){var b=a[y],P=2*Math.PI*this.seededRandom();b.x===void 0&&(b.x=v*Math.cos(P)),b.y===void 0&&(b.y=v*Math.sin(P))}}}},{key:"layoutNetwork",value:function(){if(this.options.hierarchical.enabled!==!0&&this.options.improvedLayout===!0){for(var a=this.body.nodeIndices,v=0,y=0;y<a.length;y++){var b=this.body.nodes[a[y]];b.predefinedPosition===!0&&(v+=1)}if(v<.5*a.length){var P=10,D=0,O=150,E={clusterNodeProperties:{shape:"ellipse",label:"",group:"",font:{multi:!1}},clusterEdgeProperties:{label:"",font:{multi:!1},smooth:{enabled:!1}}};if(a.length>O){for(var A=a.length;a.length>O&&D<=P;){D+=1;var Y=a.length;D%3===0?this.body.modules.clustering.clusterBridges(E):this.body.modules.clustering.clusterOutliers(E);var X=a.length;if(Y==X&&D%3!==0){this._declusterAll(),this.body.emitter.emit("_layoutFailed"),console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.");return}}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*A)})}D>P&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(a,this.body.edgeIndices,!0),this._shiftToCenter();for(var U=70,Z=0;Z<a.length;Z++){var re=this.body.nodes[a[Z]];re.predefinedPosition===!1&&(re.x+=(.5-this.seededRandom())*U,re.y+=(.5-this.seededRandom())*U)}this._declusterAll(),this.body.emitter.emit("_repositionBezierNodes")}}}},{key:"_shiftToCenter",value:function(){for(var a=f.getRangeCore(this.body.nodes,this.body.nodeIndices),v=f.findCenter(a),y=0;y<this.body.nodeIndices.length;y++){var b=this.body.nodes[this.body.nodeIndices[y]];b.x-=v.x,b.y-=v.y}}},{key:"_declusterAll",value:function(){for(var a=!0;a===!0;){a=!1;for(var v=0;v<this.body.nodeIndices.length;v++)this.body.nodes[this.body.nodeIndices[v]].isCluster===!0&&(a=!0,this.body.modules.clustering.openCluster(this.body.nodeIndices[v],{},!1));a===!0&&this.body.emitter.emit("_dataChanged")}}},{key:"getSeed",value:function(){return this.initialRandomSeed}},{key:"setupHierarchicalLayout",value:function(){if(this.options.hierarchical.enabled===!0&&this.body.nodeIndices.length>0){var a=void 0,v=void 0,y=!1,b=!1;this.lastNodeOnLevel={},this.hierarchical=new i;for(v in this.body.nodes)this.body.nodes.hasOwnProperty(v)&&(a=this.body.nodes[v],a.options.level!==void 0?(y=!0,this.hierarchical.levels[v]=a.options.level):b=!0);if(b===!0&&y===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");if(b===!0){var P=this.options.hierarchical.sortMethod;P==="hubsize"?this._determineLevelsByHubsize():P==="directed"?this._determineLevelsDirected():P==="custom"&&this._determineLevelsCustomCallback()}for(var D in this.body.nodes)this.body.nodes.hasOwnProperty(D)&&this.hierarchical.ensureLevel(D);var O=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(O),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var a=this,v=!1,y={},b=function(){for(var se=D(),G=0,V=0;V<se.length-1;V++){var Q=se[V].max-se[V+1].min;G+=Q+a.options.hierarchical.treeSpacing,P(V+1,G)}},P=function(se,G){var V=a.hierarchical.trees;for(var Q in V)V.hasOwnProperty(Q)&&V[Q]===se&&a.direction.shift(Q,G)},D=function(){for(var se=[],G=0;G<a.hierarchical.numTrees();G++)se.push(a.direction.getTreeSize(G));return se},O=function ce(se,G){if(!G[se.id]&&(G[se.id]=!0,a.hierarchical.childrenReference[se.id])){var V=a.hierarchical.childrenReference[se.id];if(V.length>0)for(var Q=0;Q<V.length;Q++)ce(a.body.nodes[V[Q]],G)}},E=function(se){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,V=1e9,Q=1e9,K=1e9,J=-1e9;for(var _ in se)if(se.hasOwnProperty(_)){var ee=a.body.nodes[_],ue=a.hierarchical.levels[ee.id],pe=a.direction.getPosition(ee),Te=a._getSpaceAroundNode(ee,se),Ee=(0,p.default)(Te,2),ke=Ee[0],Me=Ee[1];V=Math.min(ke,V),Q=Math.min(Me,Q),ue<=G&&(K=Math.min(pe,K),J=Math.max(pe,J))}return[K,J,V,Q]},A=function(se,G){var V=a.hierarchical.getMaxLevel(se.id),Q=a.hierarchical.getMaxLevel(G.id);return Math.min(V,Q)},Y=function(se,G,V){for(var Q=a.hierarchical,K=0;K<G.length;K++){var J=G[K],_=Q.distributionOrdering[J];if(_.length>1)for(var ee=0;ee<_.length-1;ee++){var ue=_[ee],pe=_[ee+1];Q.hasSameParent(ue,pe)&&Q.inSameSubNetwork(ue,pe)&&se(ue,pe,V)}}},X=function(se,G){var V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Q=a.direction.getPosition(se),K=a.direction.getPosition(G),J=Math.abs(K-Q),_=a.options.hierarchical.nodeSpacing;if(J>_){var ee={},ue={};O(se,ee),O(G,ue);var pe=A(se,G),Te=E(ee,pe),Ee=E(ue,pe),ke=Te[1],Me=Ee[0],Ie=Ee[2],Ye=Math.abs(ke-Me);if(Ye>_){var Se=ke-Me+_;Se<-Ie+_&&(Se=-Ie+_),Se<0&&(a._shiftBlock(G.id,Se),v=!0,V===!0&&a._centerParent(G))}}},U=function(se,G){for(var V=G.id,Q=G.edges,K=a.hierarchical.levels[G.id],J=a.options.hierarchical.levelSeparation*a.options.hierarchical.levelSeparation,_={},ee=[],ue=0;ue<Q.length;ue++){var pe=Q[ue];if(pe.toId!=pe.fromId){var Te=pe.toId==V?pe.from:pe.to;_[Q[ue].id]=Te,a.hierarchical.levels[Te.id]<K&&ee.push(pe)}}var Ee=function(ve,ie){for(var ae=0,ge=0;ge<ie.length;ge++)if(_[ie[ge].id]!==void 0){var be=a.direction.getPosition(_[ie[ge].id])-ve;ae+=be/Math.sqrt(be*be+J)}return ae},ke=function(ve,ie){for(var ae=0,ge=0;ge<ie.length;ge++)if(_[ie[ge].id]!==void 0){var be=a.direction.getPosition(_[ie[ge].id])-ve;ae-=J*Math.pow(be*be+J,-1.5)}return ae},Me=function(ve,ie){for(var ae=a.direction.getPosition(G),ge={},be=0;be<ve;be++){var de=Ee(ae,ie),Re=ke(ae,ie),Be=40,dt=Math.max(-Be,Math.min(Be,Math.round(de/Re)));if(ae=ae-dt,ge[ae]!==void 0)break;ge[ae]=be}return ae},Ie=function(ve){var ie=a.direction.getPosition(G);if(y[G.id]===void 0){var ae={};O(G,ae),y[G.id]=ae}var ge=E(y[G.id]),be=ge[2],de=ge[3],Re=ve-ie,Be=0;Re>0?Be=Math.min(Re,de-a.options.hierarchical.nodeSpacing):Re<0&&(Be=-Math.min(-Re,be-a.options.hierarchical.nodeSpacing)),Be!=0&&(a._shiftBlock(G.id,Be),v=!0)},Ye=function(ve){var ie=a.direction.getPosition(G),ae=a._getSpaceAroundNode(G),ge=(0,p.default)(ae,2),be=ge[0],de=ge[1],Re=ve-ie,Be=ie;Re>0?Be=Math.min(ie+(de-a.options.hierarchical.nodeSpacing),ve):Re<0&&(Be=Math.max(ie-(be-a.options.hierarchical.nodeSpacing),ve)),Be!==ie&&(a.direction.setPosition(G,Be),v=!0)},Se=Me(se,ee);Ie(Se),Se=Me(se,Q),Ye(Se)},Z=function(se){var G=a.hierarchical.getLevels();G=G.reverse();for(var V=0;V<se;V++){v=!1;for(var Q=0;Q<G.length;Q++)for(var K=G[Q],J=a.hierarchical.distributionOrdering[K],_=0;_<J.length;_++)U(1e3,J[_]);if(v!==!0)break}},re=function(se){var G=a.hierarchical.getLevels();G=G.reverse();for(var V=0;V<se&&(v=!1,Y(X,G,!0),v===!0);V++);},le=function(){for(var se in a.body.nodes)a.body.nodes.hasOwnProperty(se)&&a._centerParent(a.body.nodes[se])},he=function(){var se=a.hierarchical.getLevels();se=se.reverse();for(var G=0;G<se.length;G++)for(var V=se[G],Q=a.hierarchical.distributionOrdering[V],K=0;K<Q.length;K++)a._centerParent(Q[K])};this.options.hierarchical.blockShifting===!0&&(re(5),le()),this.options.hierarchical.edgeMinimization===!0&&Z(20),this.options.hierarchical.parentCentralization===!0&&he(),b()}},{key:"_getSpaceAroundNode",value:function(a,v){var y=!0;v===void 0&&(y=!1);var b=this.hierarchical.levels[a.id];if(b!==void 0){var P=this.hierarchical.distributionIndex[a.id],D=this.direction.getPosition(a),O=this.hierarchical.distributionOrdering[b],E=1e9,A=1e9;if(P!==0){var Y=O[P-1];if(y===!0&&v[Y.id]===void 0||y===!1){var X=this.direction.getPosition(Y);E=D-X}}if(P!=O.length-1){var U=O[P+1];if(y===!0&&v[U.id]===void 0||y===!1){var Z=this.direction.getPosition(U);A=Math.min(A,Z-D)}}return[E,A]}else return[0,0]}},{key:"_centerParent",value:function(a){if(this.hierarchical.parentReference[a.id])for(var v=this.hierarchical.parentReference[a.id],y=0;y<v.length;y++){var b=v[y],P=this.body.nodes[b],D=this.hierarchical.childrenReference[b];if(D!==void 0){var O=this._getCenterPosition(D),E=this.direction.getPosition(P),A=this._getSpaceAroundNode(P),Y=(0,p.default)(A,2),X=Y[0],U=Y[1],Z=E-O;(Z<0&&Math.abs(Z)<U-this.options.hierarchical.nodeSpacing||Z>0&&Math.abs(Z)<X-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(P,O)}}}},{key:"_placeNodesByHierarchy",value:function(a){this.positionedNodes={};for(var v in a)if(a.hasOwnProperty(v)){var y=(0,I.default)(a[v]);y=this._indexArrayToNodes(y),this.direction.sort(y);for(var b=0,P=0;P<y.length;P++){var D=y[P];if(this.positionedNodes[D.id]===void 0){var O=this.options.hierarchical.nodeSpacing,E=O*b;b>0&&(E=this.direction.getPosition(y[P-1])+O),this.direction.setPosition(D,E,v),this._validatePositionAndContinue(D,v,E),b++}}}}},{key:"_placeBranchNodes",value:function(a,v){var y=this.hierarchical.childrenReference[a];if(y!==void 0){for(var b=[],P=0;P<y.length;P++)b.push(this.body.nodes[y[P]]);this.direction.sort(b);for(var D=0;D<b.length;D++){var O=b[D],E=this.hierarchical.levels[O.id];if(E>v&&this.positionedNodes[O.id]===void 0){var A=this.options.hierarchical.nodeSpacing,Y=void 0;D===0?Y=this.direction.getPosition(this.body.nodes[a]):Y=this.direction.getPosition(b[D-1])+A,this.direction.setPosition(O,Y,E),this._validatePositionAndContinue(O,E,Y)}else return}var X=this._getCenterPosition(b);this.direction.setPosition(this.body.nodes[a],X,v)}}},{key:"_validatePositionAndContinue",value:function(a,v,y){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[v]!==void 0){var b=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[v]]);if(y-b<this.options.hierarchical.nodeSpacing){var P=b+this.options.hierarchical.nodeSpacing-y,D=this._findCommonParent(this.lastNodeOnLevel[v],a.id);this._shiftBlock(D.withChild,P)}}this.lastNodeOnLevel[v]=a.id,this.positionedNodes[a.id]=!0,this._placeBranchNodes(a.id,v)}}},{key:"_indexArrayToNodes",value:function(a){for(var v=[],y=0;y<a.length;y++)v.push(this.body.nodes[a[y]]);return v}},{key:"_getDistribution",value:function(){var a={},v=void 0,y=void 0;for(v in this.body.nodes)if(this.body.nodes.hasOwnProperty(v)){y=this.body.nodes[v];var b=this.hierarchical.levels[v]===void 0?0:this.hierarchical.levels[v];this.direction.fix(y,b),a[b]===void 0&&(a[b]={}),a[b][v]=y}return a}},{key:"_getActiveEdges",value:function(a){var v=this,y=[];return s.forEach(a.edges,function(b){v.body.edgeIndices.indexOf(b.id)!==-1&&y.push(b)}),y}},{key:"_getHubSizes",value:function(){var a=this,v={},y=this.body.nodeIndices;s.forEach(y,function(P){var D=a.body.nodes[P],O=a._getActiveEdges(D).length;v[O]=!0});var b=[];return s.forEach(v,function(P){b.push(Number(P))}),u.sort(b,function(P,D){return D-P}),b}},{key:"_determineLevelsByHubsize",value:function(){for(var a=this,v=function(E,A){a.hierarchical.levelDownstream(E,A)},y=this._getHubSizes(),b=function(E){var A=y[E];if(A===0)return"break";s.forEach(a.body.nodeIndices,function(Y){var X=a.body.nodes[Y];A===a._getActiveEdges(X).length&&a._crawlNetwork(v,Y)})},P=0;P<y.length;++P){var D=b(P);if(D==="break")break}}},{key:"_determineLevelsCustomCallback",value:function(){var a=this,v=1e5,y=function(D,O,E){},b=function(D,O,E){var A=a.hierarchical.levels[D.id];A===void 0&&(A=a.hierarchical.levels[D.id]=v);var Y=y(f.cloneOptions(D,"node"),f.cloneOptions(O,"node"),f.cloneOptions(E,"edge"));a.hierarchical.levels[O.id]=A+Y};this._crawlNetwork(b),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_determineLevelsDirected",value:function(){var a=this,v=1e4,y=function(D){return s.forEach(a.body.edges,function(O){if(O.toId===D.fromId&&O.fromId===D.toId)return!0}),!1},b=function(D,O,E){var A=a.hierarchical.levels[D.id],Y=a.hierarchical.levels[O.id];y(E)&&A!==void 0&&Y!==void 0||(A===void 0&&(A=a.hierarchical.levels[D.id]=v),E.toId==O.id?a.hierarchical.levels[O.id]=A+1:a.hierarchical.levels[O.id]=A-1)};this._crawlNetwork(b),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_generateMap",value:function(){var a=this,v=function(b,P){a.hierarchical.levels[P.id]>a.hierarchical.levels[b.id]&&a.hierarchical.addRelation(b.id,P.id)};this._crawlNetwork(v),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var a=this,v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},y=arguments[1],b={},P=function X(U,Z){if(b[U.id]===void 0){a.hierarchical.setTreeIndex(U,Z),b[U.id]=!0;for(var re=void 0,le=a._getActiveEdges(U),he=0;he<le.length;he++){var ce=le[he];ce.connected===!0&&(ce.toId==U.id?re=ce.from:re=ce.to,U.id!=re.id&&(v(U,re,ce),X(re,Z)))}}};if(y===void 0)for(var D=0,O=0;O<this.body.nodeIndices.length;O++){var E=this.body.nodeIndices[O];if(b[E]===void 0){var A=this.body.nodes[E];P(A,D),D+=1}}else{var Y=this.body.nodes[y];if(Y===void 0){console.error("Node not found:",y);return}P(Y)}}},{key:"_shiftBlock",value:function(a,v){var y=this,b={},P=function D(O){if(!b[O]){b[O]=!0,y.direction.shift(O,v);var E=y.hierarchical.childrenReference[O];if(E!==void 0)for(var A=0;A<E.length;A++)D(E[A])}};P(a)}},{key:"_findCommonParent",value:function(a,v){var y=this,b={},P=function O(E,A){var Y=y.hierarchical.parentReference[A];if(Y!==void 0)for(var X=0;X<Y.length;X++){var U=Y[X];E[U]=!0,O(E,U)}},D=function O(E,A){var Y=y.hierarchical.parentReference[A];if(Y!==void 0)for(var X=0;X<Y.length;X++){var U=Y[X];if(E[U]!==void 0)return{foundParent:U,withChild:A};var Z=O(E,U);if(Z.foundParent!==null)return Z}return{foundParent:null,withChild:A}};return P(b,a),D(b,v)}},{key:"setDirectionStrategy",value:function(){var a=this.options.hierarchical.direction==="UD"||this.options.hierarchical.direction==="DU";a?this.direction=new n(this):this.direction=new t(this)}},{key:"_getCenterPosition",value:function(a){for(var v=1e9,y=-1e9,b=0;b<a.length;b++){var P=void 0;if(a[b].id!==void 0)P=a[b];else{var D=a[b];P=this.body.nodes[D]}var O=this.direction.getPosition(P);v=Math.min(v,O),y=Math.max(y,O)}return .5*(v+y)}}]),l}();k.default=r},function(L,k,h){var w,p,S;(function(M,x){if(1)p=[k],w=x,S=typeof w=="function"?w.apply(k,p):w,S!==void 0&&(L.exports=S);else var I})(this,function(M){"use strict";M.__esModule=!0,M.sort=r;function x(l,d){if(!(l instanceof d))throw new TypeError("Cannot call a class as a function")}var I=32,T=7,R=256,C=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9];function m(l){return l<1e5?l<100?l<10?0:1:l<1e4?l<1e3?2:3:4:l<1e7?l<1e6?5:6:l<1e9?l<1e8?7:8:9}function c(l,d){if(l===d)return 0;if(~~l===l&&~~d===d){if(l===0||d===0)return l<d?-1:1;if(l<0||d<0){if(d>=0)return-1;if(l>=0)return 1;l=-l,d=-d}var a=m(l),v=m(d),y=0;return a<v?(l*=C[v-a-1],d/=10,y=-1):a>v&&(d*=C[a-v-1],l/=10,y=1),l===d?y:l<d?-1:1}var b=String(l),P=String(d);return b===P?0:b<P?-1:1}function u(l){for(var d=0;l>=I;)d|=l&1,l>>=1;return l+d}function s(l,d,a,v){var y=d+1;if(y===a)return 1;if(v(l[y++],l[d])<0){for(;y<a&&v(l[y],l[y-1])<0;)y++;f(l,d,y)}else for(;y<a&&v(l[y],l[y-1])>=0;)y++;return y-d}function f(l,d,a){for(a--;d<a;){var v=l[d];l[d++]=l[a],l[a--]=v}}function e(l,d,a,v,y){for(v===d&&v++;v<a;v++){for(var b=l[v],P=d,D=v;P<D;){var O=P+D>>>1;y(b,l[O])<0?D=O:P=O+1}var E=v-P;switch(E){case 3:l[P+3]=l[P+2];case 2:l[P+2]=l[P+1];case 1:l[P+1]=l[P];break;default:for(;E>0;)l[P+E]=l[P+E-1],E--}l[P]=b}}function t(l,d,a,v,y,b){var P=0,D=0,O=1;if(b(l,d[a+y])>0){for(D=v-y;O<D&&b(l,d[a+y+O])>0;)P=O,O=(O<<1)+1,O<=0&&(O=D);O>D&&(O=D),P+=y,O+=y}else{for(D=y+1;O<D&&b(l,d[a+y-O])<=0;)P=O,O=(O<<1)+1,O<=0&&(O=D);O>D&&(O=D);var E=P;P=y-O,O=y-E}for(P++;P<O;){var A=P+(O-P>>>1);b(l,d[a+A])>0?P=A+1:O=A}return O}function n(l,d,a,v,y,b){var P=0,D=0,O=1;if(b(l,d[a+y])<0){for(D=y+1;O<D&&b(l,d[a+y-O])<0;)P=O,O=(O<<1)+1,O<=0&&(O=D);O>D&&(O=D);var E=P;P=y-O,O=y-E}else{for(D=v-y;O<D&&b(l,d[a+y+O])>=0;)P=O,O=(O<<1)+1,O<=0&&(O=D);O>D&&(O=D),P+=y,O+=y}for(P++;P<O;){var A=P+(O-P>>>1);b(l,d[a+A])<0?O=A:P=A+1}return O}var i=function(){function l(d,a){x(this,l),this.array=null,this.compare=null,this.minGallop=T,this.length=0,this.tmpStorageLength=R,this.stackLength=0,this.runStart=null,this.runLength=null,this.stackSize=0,this.array=d,this.compare=a,this.length=d.length,this.length<2*R&&(this.tmpStorageLength=this.length>>>1),this.tmp=new Array(this.tmpStorageLength),this.stackLength=this.length<120?5:this.length<1542?10:this.length<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength)}return l.prototype.pushRun=function(a,v){this.runStart[this.stackSize]=a,this.runLength[this.stackSize]=v,this.stackSize+=1},l.prototype.mergeRuns=function(){for(;this.stackSize>1;){var a=this.stackSize-2;if(a>=1&&this.runLength[a-1]<=this.runLength[a]+this.runLength[a+1]||a>=2&&this.runLength[a-2]<=this.runLength[a]+this.runLength[a-1])this.runLength[a-1]<this.runLength[a+1]&&a--;else if(this.runLength[a]>this.runLength[a+1])break;this.mergeAt(a)}},l.prototype.forceMergeRuns=function(){for(;this.stackSize>1;){var a=this.stackSize-2;a>0&&this.runLength[a-1]<this.runLength[a+1]&&a--,this.mergeAt(a)}},l.prototype.mergeAt=function(a){var v=this.compare,y=this.array,b=this.runStart[a],P=this.runLength[a],D=this.runStart[a+1],O=this.runLength[a+1];this.runLength[a]=P+O,a===this.stackSize-3&&(this.runStart[a+1]=this.runStart[a+2],this.runLength[a+1]=this.runLength[a+2]),this.stackSize--;var E=n(y[D],y,b,P,0,v);b+=E,P-=E,P!==0&&(O=t(y[b+P-1],y,D,O,O-1,v),O!==0&&(P<=O?this.mergeLow(b,P,D,O):this.mergeHigh(b,P,D,O)))},l.prototype.mergeLow=function(a,v,y,b){var P=this.compare,D=this.array,O=this.tmp,E=0;for(E=0;E<v;E++)O[E]=D[a+E];var A=0,Y=y,X=a;if(D[X++]=D[Y++],--b===0){for(E=0;E<v;E++)D[X+E]=O[A+E];return}if(v===1){for(E=0;E<b;E++)D[X+E]=D[Y+E];D[X+b]=O[A];return}for(var U=this.minGallop;;){var Z=0,re=0,le=!1;do if(P(D[Y],O[A])<0){if(D[X++]=D[Y++],re++,Z=0,--b===0){le=!0;break}}else if(D[X++]=O[A++],Z++,re=0,--v===1){le=!0;break}while((Z|re)<U);if(le)break;do{if(Z=n(D[Y],O,A,v,0,P),Z!==0){for(E=0;E<Z;E++)D[X+E]=O[A+E];if(X+=Z,A+=Z,v-=Z,v<=1){le=!0;break}}if(D[X++]=D[Y++],--b===0){le=!0;break}if(re=t(O[A],D,Y,b,0,P),re!==0){for(E=0;E<re;E++)D[X+E]=D[Y+E];if(X+=re,Y+=re,b-=re,b===0){le=!0;break}}if(D[X++]=O[A++],--v===1){le=!0;break}U--}while(Z>=T||re>=T);if(le)break;U<0&&(U=0),U+=2}if(this.minGallop=U,U<1&&(this.minGallop=1),v===1){for(E=0;E<b;E++)D[X+E]=D[Y+E];D[X+b]=O[A]}else{if(v===0)throw new Error("mergeLow preconditions were not respected");for(E=0;E<v;E++)D[X+E]=O[A+E]}},l.prototype.mergeHigh=function(a,v,y,b){var P=this.compare,D=this.array,O=this.tmp,E=0;for(E=0;E<b;E++)O[E]=D[y+E];var A=a+v-1,Y=b-1,X=y+b-1,U=0,Z=0;if(D[X--]=D[A--],--v===0){for(U=X-(b-1),E=0;E<b;E++)D[U+E]=O[E];return}if(b===1){for(X-=v,A-=v,Z=X+1,U=A+1,E=v-1;E>=0;E--)D[Z+E]=D[U+E];D[X]=O[Y];return}for(var re=this.minGallop;;){var le=0,he=0,ce=!1;do if(P(O[Y],D[A])<0){if(D[X--]=D[A--],le++,he=0,--v===0){ce=!0;break}}else if(D[X--]=O[Y--],he++,le=0,--b===1){ce=!0;break}while((le|he)<re);if(ce)break;do{if(le=v-n(O[Y],D,a,v,v-1,P),le!==0){for(X-=le,A-=le,v-=le,Z=X+1,U=A+1,E=le-1;E>=0;E--)D[Z+E]=D[U+E];if(v===0){ce=!0;break}}if(D[X--]=O[Y--],--b===1){ce=!0;break}if(he=b-t(D[A],O,0,b,b-1,P),he!==0){for(X-=he,Y-=he,b-=he,Z=X+1,U=Y+1,E=0;E<he;E++)D[Z+E]=O[U+E];if(b<=1){ce=!0;break}}if(D[X--]=D[A--],--v===0){ce=!0;break}re--}while(le>=T||he>=T);if(ce)break;re<0&&(re=0),re+=2}if(this.minGallop=re,re<1&&(this.minGallop=1),b===1){for(X-=v,A-=v,Z=X+1,U=A+1,E=v-1;E>=0;E--)D[Z+E]=D[U+E];D[X]=O[Y]}else{if(b===0)throw new Error("mergeHigh preconditions were not respected");for(U=X-(b-1),E=0;E<b;E++)D[U+E]=O[E]}},l}();function r(l,d,a,v){if(!Array.isArray(l))throw new TypeError("Can only sort arrays");d?typeof d!="function"&&(v=a,a=d,d=c):d=c,a||(a=0),v||(v=l.length);var y=v-a;if(!(y<2)){var b=0;if(y<I){b=s(l,a,v,d),e(l,a,v,a+b,d);return}var P=new i(l,d),D=u(y);do{if(b=s(l,a,v,d),b<D){var O=y;O>D&&(O=D),e(l,a,a+O,a+b,d),b=O}P.pushRun(a,b),P.mergeRuns(),y-=b,a+=b}while(y!==0);P.forceMergeRuns()}}})},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.VerticalStrategy=k.HorizontalStrategy=void 0;var w=h(3),p=c(w),S=h(4),M=c(S),x=h(5),I=c(x),T=h(0),R=c(T),C=h(1),m=c(C);function c(t){return t&&t.__esModule?t:{default:t}}var u=h(83),s=function(){function t(){(0,R.default)(this,t)}return(0,m.default)(t,[{key:"abstract",value:function(){throw new Error("Can't instantiate abstract class!")}},{key:"fake_use",value:function(){}},{key:"curveType",value:function(){return this.abstract()}},{key:"getPosition",value:function(i){return this.fake_use(i),this.abstract()}},{key:"setPosition",value:function(i,r){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(i,r,l),this.abstract()}},{key:"getTreeSize",value:function(i){return this.fake_use(i),this.abstract()}},{key:"sort",value:function(i){this.fake_use(i),this.abstract()}},{key:"fix",value:function(i,r){this.fake_use(i,r),this.abstract()}},{key:"shift",value:function(i,r){this.fake_use(i,r),this.abstract()}}]),t}(),f=function(t){(0,I.default)(n,t);function n(i){(0,R.default)(this,n);var r=(0,M.default)(this,(n.__proto__||(0,p.default)(n)).call(this));return r.layout=i,r}return(0,m.default)(n,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(r){return r.x}},{key:"setPosition",value:function(r,l){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;d!==void 0&&this.layout.hierarchical.addToOrdering(r,d),r.x=l}},{key:"getTreeSize",value:function(r){var l=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,r);return{min:l.min_x,max:l.max_x}}},{key:"sort",value:function(r){u.sort(r,function(l,d){return l.x-d.x})}},{key:"fix",value:function(r,l){r.y=this.layout.options.hierarchical.levelSeparation*l,r.options.fixed.y=!0}},{key:"shift",value:function(r,l){this.layout.body.nodes[r].x+=l}}]),n}(s),e=function(t){(0,I.default)(n,t);function n(i){(0,R.default)(this,n);var r=(0,M.default)(this,(n.__proto__||(0,p.default)(n)).call(this));return r.layout=i,r}return(0,m.default)(n,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(r){return r.y}},{key:"setPosition",value:function(r,l){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;d!==void 0&&this.layout.hierarchical.addToOrdering(r,d),r.y=l}},{key:"getTreeSize",value:function(r){var l=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,r);return{min:l.min_y,max:l.max_y}}},{key:"sort",value:function(r){u.sort(r,function(l,d){return l.y-d.y})}},{key:"fix",value:function(r,l){r.x=this.layout.options.hierarchical.levelSeparation*l,r.options.fixed.x=!0}},{key:"shift",value:function(r,l){this.layout.body.nodes[r].y+=l}}]),n}(s);k.HorizontalStrategy=e,k.VerticalStrategy=f},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(9),p=c(w),S=h(23),M=c(S),x=h(7),I=c(x),T=h(0),R=c(T),C=h(1),m=c(C);function c(t){return t&&t.__esModule?t:{default:t}}var u=h(2),s=h(24),f=h(36),e=function(){function t(n,i,r){var l=this;(0,R.default)(this,t),this.body=n,this.canvas=i,this.selectionHandler=r,this.editMode=!1,this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0,this.manipulationHammers=[],this.temporaryUIFunctions={},this.temporaryEventFunctions=[],this.touchTime=0,this.temporaryIds={nodes:[],edges:[]},this.guiEnabled=!1,this.inMode=!1,this.selectedControlNode=void 0,this.options={},this.defaultOptions={enabled:!1,initiallyActive:!1,addNode:!0,addEdge:!0,editNode:void 0,editEdge:!0,deleteNode:!0,deleteEdge:!0,controlNodeStyle:{shape:"dot",size:6,color:{background:"#ff0000",border:"#3c3c3c",highlight:{background:"#07f968",border:"#3c3c3c"}},borderWidth:2,borderWidthSelected:2}},u.extend(this.options,this.defaultOptions),this.body.emitter.on("destroy",function(){l._clean()}),this.body.emitter.on("_dataChanged",this._restore.bind(this)),this.body.emitter.on("_resetData",this._restore.bind(this))}return(0,m.default)(t,[{key:"_restore",value:function(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}},{key:"setOptions",value:function(i,r,l){r!==void 0&&(r.locale!==void 0?this.options.locale=r.locale:this.options.locale=l.locale,r.locales!==void 0?this.options.locales=r.locales:this.options.locales=l.locales),i!==void 0&&(typeof i=="boolean"?this.options.enabled=i:(this.options.enabled=!0,u.deepExtend(this.options,i)),this.options.initiallyActive===!0&&(this.editMode=!0),this._setup())}},{key:"toggleEditMode",value:function(){this.editMode===!0?this.disableEditMode():this.enableEditMode()}},{key:"enableEditMode",value:function(){this.editMode=!0,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}},{key:"disableEditMode",value:function(){this.editMode=!1,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}},{key:"showManipulatorToolbar",value:function(){if(this._clean(),this.manipulationDOM={},this.guiEnabled===!0){this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";var i=this.selectionHandler._getSelectedNodeCount(),r=this.selectionHandler._getSelectedEdgeCount(),l=i+r,d=this.options.locales[this.options.locale],a=!1;this.options.addNode!==!1&&(this._createAddNodeButton(d),a=!0),this.options.addEdge!==!1&&(a===!0?this._createSeperator(1):a=!0,this._createAddEdgeButton(d)),i===1&&typeof this.options.editNode=="function"?(a===!0?this._createSeperator(2):a=!0,this._createEditNodeButton(d)):r===1&&i===0&&this.options.editEdge!==!1&&(a===!0?this._createSeperator(3):a=!0,this._createEditEdgeButton(d)),l!==0&&(i>0&&this.options.deleteNode!==!1?(a===!0&&this._createSeperator(4),this._createDeleteButton(d)):i===0&&this.options.deleteEdge!==!1&&(a===!0&&this._createSeperator(4),this._createDeleteButton(d))),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this)),this._temporaryBindEvent("select",this.showManipulatorToolbar.bind(this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var i=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(i),this._createSeperator(),this._createDescription(i.addDescription||this.options.locales.en.addDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindEvent("click",this._performAddNode.bind(this))}},{key:"editNode",value:function(){var i=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var r=this.selectionHandler._getSelectedNode();if(r!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(r.isCluster!==!0){var l=u.deepExtend({},r.options,!1);if(l.x=r.x,l.y=r.y,this.options.editNode.length===2)this.options.editNode(l,function(d){d!=null&&i.inMode==="editNode"&&i.body.data.nodes.getDataSet().update(d),i.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var i=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(i),this._createSeperator(),this._createDescription(i.edgeDescription||this.options.locales.en.edgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindUI("onTouch",this._handleConnect.bind(this)),this._temporaryBindUI("onDragEnd",this._finishConnect.bind(this)),this._temporaryBindUI("onDrag",this._dragControlNode.bind(this)),this._temporaryBindUI("onRelease",this._finishConnect.bind(this)),this._temporaryBindUI("onDragStart",this._dragStartEdge.bind(this)),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",(0,I.default)(this.options.editEdge)==="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],this.edgeBeingEditedId!==void 0)){var i=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(i.from,i.to);return}if(this.guiEnabled===!0){var r=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(r),this._createSeperator(),this._createDescription(r.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],this.edgeBeingEditedId!==void 0){var l=this.body.edges[this.edgeBeingEditedId],d=this._getNewTargetNode(l.from.x,l.from.y),a=this._getNewTargetNode(l.to.x,l.to.y);this.temporaryIds.nodes.push(d.id),this.temporaryIds.nodes.push(a.id),this.body.nodes[d.id]=d,this.body.nodeIndices.push(d.id),this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id),this._temporaryBindUI("onTouch",this._controlNodeTouch.bind(this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",this._controlNodeDragStart.bind(this)),this._temporaryBindUI("onDrag",this._controlNodeDrag.bind(this)),this._temporaryBindUI("onDragEnd",this._controlNodeDragEnd.bind(this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(v){var y=l.edgeType.findBorderPositions(v);d.selected===!1&&(d.x=y.from.x,d.y=y.from.y),a.selected===!1&&(a.x=y.to.x,a.y=y.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var i=this;this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";var r=this.selectionHandler.getSelectedNodes(),l=this.selectionHandler.getSelectedEdges(),d=void 0;if(r.length>0){for(var a=0;a<r.length;a++)if(this.body.nodes[r[a]].isCluster===!0){alert(this.options.locales[this.options.locale].deleteClusterError||this.options.locales.en.deleteClusterError);return}typeof this.options.deleteNode=="function"&&(d=this.options.deleteNode)}else l.length>0&&typeof this.options.deleteEdge=="function"&&(d=this.options.deleteEdge);if(typeof d=="function"){var v={nodes:r,edges:l};if(d.length===2)d(v,function(y){y!=null&&i.inMode==="delete"?(i.body.data.edges.getDataSet().remove(y.edges),i.body.data.nodes.getDataSet().remove(y.nodes),i.body.emitter.emit("startSimulation"),i.showManipulatorToolbar()):(i.body.emitter.emit("startSimulation"),i.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(l),this.body.data.nodes.getDataSet().remove(r),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),this.editModeDiv===void 0&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0&&(this.closeDiv=document.createElement("div"),this.closeDiv.className="vis-close",this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv))}},{key:"_getNewTargetNode",value:function(i,r){var l=u.deepExtend({},this.options.controlNodeStyle);l.id="targetNode"+u.randomUUID(),l.hidden=!1,l.physics=!1,l.x=i,l.y=r;var d=this.body.functions.createNode(l);return d.shape.boundingBox={left:i,right:i,top:r,bottom:r},d}},{key:"_createEditButton",value:function(){this._clean(),this.manipulationDOM={},u.recursiveDOMDelete(this.editModeDiv);var i=this.options.locales[this.options.locale],r=this._createButton("editMode","vis-button vis-edit vis-edit-mode",i.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(r),this._bindHammerToDiv(r,this.toggleEditMode.bind(this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(u.recursiveDOMDelete(this.editModeDiv),u.recursiveDOMDelete(this.manipulationDiv),this._cleanManipulatorHammers()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanManipulatorHammers",value:function(){if(this.manipulationHammers.length!=0){for(var i=0;i<this.manipulationHammers.length;i++)this.manipulationHammers[i].destroy();this.manipulationHammers=[]}}},{key:"_removeManipulationDOM",value:function(){this._clean(),u.recursiveDOMDelete(this.manipulationDiv),u.recursiveDOMDelete(this.editModeDiv),u.recursiveDOMDelete(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}},{key:"_createSeperator",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+i]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+i].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+i])}},{key:"_createAddNodeButton",value:function(i){var r=this._createButton("addNode","vis-button vis-add",i.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(r),this._bindHammerToDiv(r,this.addNodeMode.bind(this))}},{key:"_createAddEdgeButton",value:function(i){var r=this._createButton("addEdge","vis-button vis-connect",i.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(r),this._bindHammerToDiv(r,this.addEdgeMode.bind(this))}},{key:"_createEditNodeButton",value:function(i){var r=this._createButton("editNode","vis-button vis-edit",i.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(r),this._bindHammerToDiv(r,this.editNode.bind(this))}},{key:"_createEditEdgeButton",value:function(i){var r=this._createButton("editEdge","vis-button vis-edit",i.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(r),this._bindHammerToDiv(r,this.editEdgeMode.bind(this))}},{key:"_createDeleteButton",value:function(i){var r;this.options.rtl?r="vis-button vis-delete-rtl":r="vis-button vis-delete";var l=this._createButton("delete",r,i.del||this.options.locales.en.del);this.manipulationDiv.appendChild(l),this._bindHammerToDiv(l,this.deleteSelected.bind(this))}},{key:"_createBackButton",value:function(i){var r=this._createButton("back","vis-button vis-back",i.back||this.options.locales.en.back);this.manipulationDiv.appendChild(r),this._bindHammerToDiv(r,this.showManipulatorToolbar.bind(this))}},{key:"_createButton",value:function(i,r,l){var d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"vis-label";return this.manipulationDOM[i+"Div"]=document.createElement("div"),this.manipulationDOM[i+"Div"].className=r,this.manipulationDOM[i+"Label"]=document.createElement("div"),this.manipulationDOM[i+"Label"].className=d,this.manipulationDOM[i+"Label"].innerHTML=l,this.manipulationDOM[i+"Div"].appendChild(this.manipulationDOM[i+"Label"]),this.manipulationDOM[i+"Div"]}},{key:"_createDescription",value:function(i){this.manipulationDiv.appendChild(this._createButton("description","vis-button vis-none",i))}},{key:"_temporaryBindEvent",value:function(i,r){this.temporaryEventFunctions.push({event:i,boundFunction:r}),this.body.emitter.on(i,r)}},{key:"_temporaryBindUI",value:function(i,r){if(this.body.eventListeners[i]!==void 0)this.temporaryUIFunctions[i]=this.body.eventListeners[i],this.body.eventListeners[i]=r;else throw new Error("This UI function does not exist. Typo? You tried: "+i+" possible are: "+(0,M.default)((0,p.default)(this.body.eventListeners)))}},{key:"_unbindTemporaryUIs",value:function(){for(var i in this.temporaryUIFunctions)this.temporaryUIFunctions.hasOwnProperty(i)&&(this.body.eventListeners[i]=this.temporaryUIFunctions[i],delete this.temporaryUIFunctions[i]);this.temporaryUIFunctions={}}},{key:"_unbindTemporaryEvents",value:function(){for(var i=0;i<this.temporaryEventFunctions.length;i++){var r=this.temporaryEventFunctions[i].event,l=this.temporaryEventFunctions[i].boundFunction;this.body.emitter.off(r,l)}this.temporaryEventFunctions=[]}},{key:"_bindHammerToDiv",value:function(i,r){var l=new s(i,{});f.onTouch(l,r),this.manipulationHammers.push(l)}},{key:"_cleanupTemporaryNodesAndEdges",value:function(){for(var i=0;i<this.temporaryIds.edges.length;i++){this.body.edges[this.temporaryIds.edges[i]].disconnect(),delete this.body.edges[this.temporaryIds.edges[i]];var r=this.body.edgeIndices.indexOf(this.temporaryIds.edges[i]);r!==-1&&this.body.edgeIndices.splice(r,1)}for(var l=0;l<this.temporaryIds.nodes.length;l++){delete this.body.nodes[this.temporaryIds.nodes[l]];var d=this.body.nodeIndices.indexOf(this.temporaryIds.nodes[l]);d!==-1&&this.body.nodeIndices.splice(d,1)}this.temporaryIds={nodes:[],edges:[]}}},{key:"_controlNodeTouch",value:function(i){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(i.center),this.lastTouch.translation=u.extend({},this.body.view.translation)}},{key:"_controlNodeDragStart",value:function(){var i=this.lastTouch,r=this.selectionHandler._pointerToPositionObject(i),l=this.body.nodes[this.temporaryIds.nodes[0]],d=this.body.nodes[this.temporaryIds.nodes[1]],a=this.body.edges[this.edgeBeingEditedId];this.selectedControlNode=void 0;var v=l.isOverlappingWith(r),y=d.isOverlappingWith(r);v===!0?(this.selectedControlNode=l,a.edgeType.from=l):y===!0&&(this.selectedControlNode=d,a.edgeType.to=d),this.selectedControlNode!==void 0&&this.selectionHandler.selectObject(this.selectedControlNode),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDrag",value:function(i){this.body.emitter.emit("disablePhysics");var r=this.body.functions.getPointer(i.center),l=this.canvas.DOMtoCanvas(r);if(this.selectedControlNode!==void 0)this.selectedControlNode.x=l.x,this.selectedControlNode.y=l.y;else{var d=r.x-this.lastTouch.x,a=r.y-this.lastTouch.y;this.body.view.translation={x:this.lastTouch.translation.x+d,y:this.lastTouch.translation.y+a}}this.body.emitter.emit("_redraw")}},{key:"_controlNodeDragEnd",value:function(i){var r=this.body.functions.getPointer(i.center),l=this.selectionHandler._pointerToPositionObject(r),d=this.body.edges[this.edgeBeingEditedId];if(this.selectedControlNode!==void 0){this.selectionHandler.unselectAll();for(var a=this.selectionHandler._getAllNodesOverlappingWith(l),v=void 0,y=a.length-1;y>=0;y--)if(a[y]!==this.selectedControlNode.id){v=this.body.nodes[a[y]];break}if(v!==void 0&&this.selectedControlNode!==void 0)if(v.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var b=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===b.id?this._performEditEdge(v.id,d.to.id):this._performEditEdge(d.from.id,v.id)}else d.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(i){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(i.center),this.lastTouch.translation=u.extend({},this.body.view.translation);var r=this.lastTouch,l=this.selectionHandler.getNodeAt(r);if(l!==void 0)if(l.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var d=this._getNewTargetNode(l.x,l.y);this.body.nodes[d.id]=d,this.body.nodeIndices.push(d.id);var a=this.body.functions.createEdge({id:"connectionEdge"+u.randomUUID(),from:l.id,to:d.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[a.id]=a,this.body.edgeIndices.push(a.id),this.temporaryIds.nodes.push(d.id),this.temporaryIds.edges.push(a.id)}this.touchTime=new Date().valueOf()}}},{key:"_dragControlNode",value:function(i){var r=this.body.functions.getPointer(i.center),l=this.selectionHandler._pointerToPositionObject(r),d=void 0;this.temporaryIds.edges[0]!==void 0&&(d=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var a=this.selectionHandler._getAllNodesOverlappingWith(l),v=void 0,y=a.length-1;y>=0;y--)if(this.temporaryIds.nodes.indexOf(a[y])===-1){v=this.body.nodes[a[y]];break}if(i.controlEdge={from:d,to:v?v.id:void 0},this.selectionHandler._generateClickEvent("controlNodeDragging",i,r),this.temporaryIds.nodes[0]!==void 0){var b=this.body.nodes[this.temporaryIds.nodes[0]];b.x=this.canvas._XconvertDOMtoCanvas(r.x),b.y=this.canvas._YconvertDOMtoCanvas(r.y),this.body.emitter.emit("_redraw")}else{var P=r.x-this.lastTouch.x,D=r.y-this.lastTouch.y;this.body.view.translation={x:this.lastTouch.translation.x+P,y:this.lastTouch.translation.y+D}}}},{key:"_finishConnect",value:function(i){var r=this.body.functions.getPointer(i.center),l=this.selectionHandler._pointerToPositionObject(r),d=void 0;this.temporaryIds.edges[0]!==void 0&&(d=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var a=this.selectionHandler._getAllNodesOverlappingWith(l),v=void 0,y=a.length-1;y>=0;y--)if(this.temporaryIds.nodes.indexOf(a[y])===-1){v=this.body.nodes[a[y]];break}this._cleanupTemporaryNodesAndEdges(),v!==void 0&&(v.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[d]!==void 0&&this.body.nodes[v.id]!==void 0&&this._performAddEdge(d,v.id)),i.controlEdge={from:d,to:v?v.id:void 0},this.selectionHandler._generateClickEvent("controlNodeDragEnd",i,r),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(i){var r=this.lastTouch;this.selectionHandler._generateClickEvent("dragStart",i,r,void 0,!0)}},{key:"_performAddNode",value:function(i){var r=this,l={id:u.randomUUID(),x:i.pointer.canvas.x,y:i.pointer.canvas.y,label:"new"};if(typeof this.options.addNode=="function")if(this.options.addNode.length===2)this.options.addNode(l,function(d){d!=null&&r.inMode==="addNode"&&r.body.data.nodes.getDataSet().add(d),r.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");else this.body.data.nodes.getDataSet().add(l),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(i,r){var l=this,d={from:i,to:r};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(d,function(a){a!=null&&l.inMode==="addEdge"&&(l.body.data.edges.getDataSet().add(a),l.selectionHandler.unselectAll(),l.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(d),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(i,r){var l=this,d={id:this.edgeBeingEditedId,from:i,to:r,label:this.body.data.edges._data[this.edgeBeingEditedId].label},a=this.options.editEdge;if((typeof a>"u"?"undefined":(0,I.default)(a))==="object"&&(a=a.editWithoutDrag),typeof a=="function")if(a.length===2)a(d,function(v){v==null||l.inMode!=="editEdge"?(l.body.edges[d.id].updateEdgeType(),l.body.emitter.emit("_redraw"),l.showManipulatorToolbar()):(l.body.data.edges.getDataSet().update(v),l.selectionHandler.unselectAll(),l.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(d),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),t}();k.default=e},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(23),p=C(w),S=h(7),M=C(S),x=h(0),I=C(x),T=h(1),R=C(T);function C(s){return s&&s.__esModule?s:{default:s}}var m=h(2),c=h(192).default,u=function(){function s(f,e,t){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;(0,I.default)(this,s),this.parent=f,this.changedOptions=[],this.container=e,this.allowCreation=!1,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},m.extend(this.options,this.defaultOptions),this.configureOptions=t,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new c(n),this.wrapper=void 0}return(0,R.default)(s,[{key:"setOptions",value:function(e){if(e!==void 0){this.popupHistory={},this._removePopup();var t=!0;if(typeof e=="string")this.options.filter=e;else if(e instanceof Array)this.options.filter=e.join();else if((typeof e>"u"?"undefined":(0,M.default)(e))==="object"){if(e==null)throw new TypeError("options cannot be null");e.container!==void 0&&(this.options.container=e.container),e.filter!==void 0&&(this.options.filter=e.filter),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(t=e.enabled)}else typeof e=="boolean"?(this.options.filter=!0,t=e):typeof e=="function"&&(this.options.filter=e,t=!0);this.options.filter===!1&&(t=!1),this.options.enabled=t}this._clean()}},{key:"setModuleOptions",value:function(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){this._clean(),this.changedOptions=[];var e=this.options.filter,t=0,n=!1;for(var i in this.configureOptions)this.configureOptions.hasOwnProperty(i)&&(this.allowCreation=!1,n=!1,typeof e=="function"?(n=e(i,[]),n=n||this._handleObject(this.configureOptions[i],[i],!0)):(e===!0||e.indexOf(i)!==-1)&&(n=!0),n!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(i),this._handleObject(this.configureOptions[i],[i])),t++);this._makeButton(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var e=0;e<this.domElements.length;e++)this.wrapper.appendChild(this.domElements[e]);this._showPopupIfNeeded()}},{key:"_clean",value:function(){for(var e=0;e<this.domElements.length;e++)this.wrapper.removeChild(this.domElements[e]);this.wrapper!==void 0&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}},{key:"_getValue",value:function(e){for(var t=this.moduleOptions,n=0;n<e.length;n++)if(t[e[n]]!==void 0)t=t[e[n]];else{t=void 0;break}return t}},{key:"_makeItem",value:function(e){if(this.allowCreation===!0){var t=document.createElement("div");t.className="vis-configuration vis-config-item vis-config-s"+e.length;for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.forEach(function(l){t.appendChild(l)}),this.domElements.push(t),this.domElements.length}return 0}},{key:"_makeHeader",value:function(e){var t=document.createElement("div");t.className="vis-configuration vis-config-header",t.innerHTML=e,this._makeItem([],t)}},{key:"_makeLabel",value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=document.createElement("div");return i.className="vis-configuration vis-config-label vis-config-s"+t.length,n===!0?i.innerHTML="<i><b>"+e+":</b></i>":i.innerHTML=e+":",i}},{key:"_makeDropdown",value:function(e,t,n){var i=document.createElement("select");i.className="vis-configuration vis-config-select";var r=0;t!==void 0&&e.indexOf(t)!==-1&&(r=e.indexOf(t));for(var l=0;l<e.length;l++){var d=document.createElement("option");d.value=e[l],l===r&&(d.selected="selected"),d.innerHTML=e[l],i.appendChild(d)}var a=this;i.onchange=function(){a._update(this.value,n)};var v=this._makeLabel(n[n.length-1],n);this._makeItem(n,v,i)}},{key:"_makeRange",value:function(e,t,n){var i=e[0],r=e[1],l=e[2],d=e[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range",a.min=r,a.max=l}catch{}a.step=d;var v="",y=0;if(t!==void 0){var b=1.2;t<0&&t*b<r?(a.min=Math.ceil(t*b),y=a.min,v="range increased"):t/b<r&&(a.min=Math.ceil(t/b),y=a.min,v="range increased"),t*b>l&&l!==1&&(a.max=Math.ceil(t*b),y=a.max,v="range increased"),a.value=t}else a.value=i;var P=document.createElement("input");P.className="vis-configuration vis-config-rangeinput",P.value=a.value;var D=this;a.onchange=function(){P.value=this.value,D._update(Number(this.value),n)},a.oninput=function(){P.value=this.value};var O=this._makeLabel(n[n.length-1],n),E=this._makeItem(n,O,a,P);v!==""&&this.popupHistory[E]!==y&&(this.popupHistory[E]=y,this._setupPopup(v,E))}},{key:"_makeButton",value:function(){var e=this;if(this.options.showButton===!0){var t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerHTML="generate options",t.onclick=function(){e._printOptions()},t.onmouseover=function(){t.className="vis-configuration vis-config-button hover"},t.onmouseout=function(){t.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(t)}}},{key:"_setupPopup",value:function(e,t){var n=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter<this.popupLimit){var i=document.createElement("div");i.id="vis-configuration-popup",i.className="vis-configuration-popup",i.innerHTML=e,i.onclick=function(){n._removePopup()},this.popupCounter+=1,this.popupDiv={html:i,index:t}}}},{key:"_removePopup",value:function(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}},{key:"_showPopupIfNeeded",value:function(){var e=this;if(this.popupDiv.html!==void 0){var t=this.domElements[this.popupDiv.index],n=t.getBoundingClientRect();this.popupDiv.html.style.left=n.left+"px",this.popupDiv.html.style.top=n.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=setTimeout(function(){e.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=setTimeout(function(){e._removePopup()},1800)}}},{key:"_makeCheckbox",value:function(e,t,n){var i=document.createElement("input");i.type="checkbox",i.className="vis-configuration vis-config-checkbox",i.checked=e,t!==void 0&&(i.checked=t,t!==e&&((typeof e>"u"?"undefined":(0,M.default)(e))==="object"?t!==e.enabled&&this.changedOptions.push({path:n,value:t}):this.changedOptions.push({path:n,value:t})));var r=this;i.onchange=function(){r._update(this.checked,n)};var l=this._makeLabel(n[n.length-1],n);this._makeItem(n,l,i)}},{key:"_makeTextInput",value:function(e,t,n){var i=document.createElement("input");i.type="text",i.className="vis-configuration vis-config-text",i.value=t,t!==e&&this.changedOptions.push({path:n,value:t});var r=this;i.onchange=function(){r._update(this.value,n)};var l=this._makeLabel(n[n.length-1],n);this._makeItem(n,l,i)}},{key:"_makeColorField",value:function(e,t,n){var i=this,r=e[1],l=document.createElement("div");t=t===void 0?r:t,t!=="none"?(l.className="vis-configuration vis-config-colorBlock",l.style.backgroundColor=t):l.className="vis-configuration vis-config-colorBlock none",t=t===void 0?r:t,l.onclick=function(){i._showColorPicker(t,l,n)};var d=this._makeLabel(n[n.length-1],n);this._makeItem(n,d,l)}},{key:"_showColorPicker",value:function(e,t,n){var i=this;t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(function(r){var l="rgba("+r.r+","+r.g+","+r.b+","+r.a+")";t.style.backgroundColor=l,i._update(l,n)}),this.colorPicker.setCloseCallback(function(){t.onclick=function(){i._showColorPicker(e,t,n)}})}},{key:"_handleObject",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=!1,r=this.options.filter,l=!1;for(var d in e)if(e.hasOwnProperty(d)){i=!0;var a=e[d],v=m.copyAndExtendArray(t,d);if(typeof r=="function"&&(i=r(d,t),i===!1&&!(a instanceof Array)&&typeof a!="string"&&typeof a!="boolean"&&a instanceof Object&&(this.allowCreation=!1,i=this._handleObject(a,v,!0),this.allowCreation=n===!1)),i!==!1){l=!0;var y=this._getValue(v);if(a instanceof Array)this._handleArray(a,y,v);else if(typeof a=="string")this._makeTextInput(a,y,v);else if(typeof a=="boolean")this._makeCheckbox(a,y,v);else if(a instanceof Object){var b=!0;if(t.indexOf("physics")!==-1&&this.moduleOptions.physics.solver!==d&&(b=!1),b===!0)if(a.enabled!==void 0){var P=m.copyAndExtendArray(v,"enabled"),D=this._getValue(P);if(D===!0){var O=this._makeLabel(d,v,!0);this._makeItem(v,O),l=this._handleObject(a,v)||l}else this._makeCheckbox(a,D,v)}else{var E=this._makeLabel(d,v,!0);this._makeItem(v,E),l=this._handleObject(a,v)||l}}else console.error("dont know how to handle",a,d,v)}}return l}},{key:"_handleArray",value:function(e,t,n){typeof e[0]=="string"&&e[0]==="color"?(this._makeColorField(e,t,n),e[1]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]=="string"?(this._makeDropdown(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]=="number"&&(this._makeRange(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:Number(t)}))}},{key:"_update",value:function(e,t){var n=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",n),this.initialized=!0,this.parent.setOptions(n)}},{key:"_constructOptions",value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n;e=e==="true"?!0:e,e=e==="false"?!1:e;for(var r=0;r<t.length;r++)t[r]!=="global"&&(i[t[r]]===void 0&&(i[t[r]]={}),r!==t.length-1?i=i[t[r]]:i[t[r]]=e);return n}},{key:"_printOptions",value:function(){var e=this.getOptions();this.optionsContainer.innerHTML="<pre>var options = "+(0,p.default)(e,null,2)+"</pre>"}},{key:"getOptions",value:function(){for(var e={},t=0;t<this.changedOptions.length;t++)this._constructOptions(this.changedOptions[t].value,this.changedOptions[t].path,e);return e}}]),s}();k.default=u},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(23),p=T(w),S=h(0),M=T(S),x=h(1),I=T(x);function T(s){return s&&s.__esModule?s:{default:s}}var R=h(24),C=h(36),m=h(2),c={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"},u=function(){function s(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;(0,M.default)(this,s),this.pixelRatio=f,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return(0,I.default)(s,[{key:"insertTo",value:function(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(e){if(typeof e=="function")this.updateCallback=e;else throw new Error("Function attempted to set as colorPicker update callback is not a function.")}},{key:"setCloseCallback",value:function(e){if(typeof e=="function")this.closeCallback=e;else throw new Error("Function attempted to set as colorPicker closing callback is not a function.")}},{key:"_isColorString",value:function(e){if(typeof e=="string")return c[e]}},{key:"setColor",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e!=="none"){var n=void 0,i=this._isColorString(e);if(i!==void 0&&(e=i),m.isString(e)===!0){if(m.isValidRGB(e)===!0){var r=e.substr(4).substr(0,e.length-5).split(",");n={r:r[0],g:r[1],b:r[2],a:1}}else if(m.isValidRGBA(e)===!0){var l=e.substr(5).substr(0,e.length-6).split(",");n={r:l[0],g:l[1],b:l[2],a:l[3]}}else if(m.isValidHex(e)===!0){var d=m.hexToRGB(e);n={r:d.r,g:d.g,b:d.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){var a=e.a!==void 0?e.a:"1.0";n={r:e.r,g:e.g,b:e.b,a}}if(n===void 0)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+(0,p.default)(e));this._setColor(n,t)}}},{key:"show",value:function(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;t===!0&&(this.previousColor=m.extend({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",setTimeout(function(){e.closeCallback!==void 0&&(e.closeCallback(),e.closeCallback=void 0)},0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){this.previousColor!==void 0?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;t===!0&&(this.initialColor=m.extend({},e)),this.color=e;var n=m.RGBToHSV(e.r,e.g,e.b),i=2*Math.PI,r=this.r*n.s,l=this.centerCoordinates.x+r*Math.sin(i*n.h),d=this.centerCoordinates.y+r*Math.cos(i*n.h);this.colorPickerSelector.style.left=l-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=d-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(e)}},{key:"_setOpacity",value:function(e){this.color.a=e/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(e){var t=m.RGBToHSV(this.color.r,this.color.g,this.color.b);t.v=e/100;var n=m.HSVToRGB(t.h,t.s,t.v);n.a=this.color.a,this.color=n,this._updatePicker()}},{key:"_updatePicker",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,t=m.RGBToHSV(e.r,e.g,e.b),n=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var i=this.colorPickerCanvas.clientWidth,r=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,i,r),n.putImageData(this.hueCircle,0,0),n.fillStyle="rgba(0,0,0,"+(1-t.v)+")",n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),n.fill(),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var t=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerHTML="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(e)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch{}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch{}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var n=this;this.opacityRange.onchange=function(){n._setOpacity(this.value)},this.opacityRange.oninput=function(){n._setOpacity(this.value)},this.brightnessRange.onchange=function(){n._setBrightness(this.value)},this.brightnessRange.oninput=function(){n._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerHTML="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerHTML="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerHTML="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerHTML="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerHTML="cancel",this.cancelButton.onclick=this._hide.bind(this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerHTML="apply",this.applyButton.onclick=this._apply.bind(this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerHTML="save",this.saveButton.onclick=this._save.bind(this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerHTML="load last",this.loadButton.onclick=this._loadLast.bind(this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var e=this;this.drag={},this.pinch={},this.hammer=new R(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),C.onTouch(this.hammer,function(t){e._moveSelector(t)}),this.hammer.on("tap",function(t){e._moveSelector(t)}),this.hammer.on("panstart",function(t){e._moveSelector(t)}),this.hammer.on("panmove",function(t){e._moveSelector(t)}),this.hammer.on("panend",function(t){e._moveSelector(t)})}},{key:"_generateHueCircle",value:function(){if(this.generated===!1){var e=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var t=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,n);var i=void 0,r=void 0,l=void 0,d=void 0;this.centerCoordinates={x:t*.5,y:n*.5},this.r=.49*t;var a=2*Math.PI/360,v=1/360,y=1/this.r,b=void 0;for(l=0;l<360;l++)for(d=0;d<this.r;d++)i=this.centerCoordinates.x+d*Math.sin(a*l),r=this.centerCoordinates.y+d*Math.cos(a*l),b=m.HSVToRGB(l*v,d*y,1),e.fillStyle="rgb("+b.r+","+b.g+","+b.b+")",e.fillRect(i-.5,r-.5,2,2);e.strokeStyle="rgba(0,0,0,1)",e.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),e.stroke(),this.hueCircle=e.getImageData(0,0,t,n)}this.generated=!0}},{key:"_moveSelector",value:function(e){var t=this.colorPickerDiv.getBoundingClientRect(),n=e.center.x-t.left,i=e.center.y-t.top,r=.5*this.colorPickerDiv.clientHeight,l=.5*this.colorPickerDiv.clientWidth,d=n-l,a=i-r,v=Math.atan2(d,a),y=.98*Math.min(Math.sqrt(d*d+a*a),l),b=Math.cos(v)*y+r,P=Math.sin(v)*y+l;this.colorPickerSelector.style.top=b-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=P-.5*this.colorPickerSelector.clientWidth+"px";var D=v/(2*Math.PI);D=D<0?D+1:D;var O=y/this.r,E=m.RGBToHSV(this.color.r,this.color.g,this.color.b);E.h=D,E.s=O;var A=m.HSVToRGB(E.h,E.s,E.v);A.a=this.color.a,this.color=A,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}}]),s}();k.default=u},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(15),p=C(w),S=h(0),M=C(S),x=h(1),I=C(x),T=h(194),R=C(T);function C(c){return c&&c.__esModule?c:{default:c}}var m=function(){function c(u,s,f){(0,M.default)(this,c),this.body=u,this.springLength=s,this.springConstant=f,this.distanceSolver=new R.default}return(0,I.default)(c,[{key:"setOptions",value:function(s){s&&(s.springLength&&(this.springLength=s.springLength),s.springConstant&&(this.springConstant=s.springConstant))}},{key:"solve",value:function(s,f){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,t=this.distanceSolver.getDistances(this.body,s,f);this._createL_matrix(t),this._createK_matrix(t),this._createE_matrix();for(var n=.01,i=1,r=0,l=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),d=5,a=1e9,v=0,y=0,b=0,P=0,D=0;a>n&&r<l;){r+=1;var O=this._getHighestEnergyNode(e),E=(0,p.default)(O,4);for(v=E[0],a=E[1],y=E[2],b=E[3],P=a,D=0;P>i&&D<d;){D+=1,this._moveNode(v,y,b);var A=this._getEnergy(v),Y=(0,p.default)(A,3);P=Y[0],y=Y[1],b=Y[2]}}}},{key:"_getHighestEnergyNode",value:function(s){for(var f=this.body.nodeIndices,e=this.body.nodes,t=0,n=f[0],i=0,r=0,l=0;l<f.length;l++){var d=f[l];if(e[d].predefinedPosition===!1||e[d].isCluster===!0&&s===!0||e[d].options.fixed.x===!0||e[d].options.fixed.y===!0){var a=this._getEnergy(d),v=(0,p.default)(a,3),y=v[0],b=v[1],P=v[2];t<y&&(t=y,n=d,i=b,r=P)}}return[n,t,i,r]}},{key:"_getEnergy",value:function(s){var f=(0,p.default)(this.E_sums[s],2),e=f[0],t=f[1],n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2));return[n,e,t]}},{key:"_moveNode",value:function(s,f,e){for(var t=this.body.nodeIndices,n=this.body.nodes,i=0,r=0,l=0,d=n[s].x,a=n[s].y,v=this.K_matrix[s],y=this.L_matrix[s],b=0;b<t.length;b++){var P=t[b];if(P!==s){var D=n[P].x,O=n[P].y,E=v[P],A=y[P],Y=1/Math.pow(Math.pow(d-D,2)+Math.pow(a-O,2),1.5);i+=E*(1-A*Math.pow(a-O,2)*Y),r+=E*(A*(d-D)*(a-O)*Y),l+=E*(1-A*Math.pow(d-D,2)*Y)}}var X=i,U=r,Z=f,re=l,le=e,he=(Z/X+le/U)/(U/X-re/U),ce=-(U*he+Z)/X;n[s].x+=ce,n[s].y+=he,this._updateE_matrix(s)}},{key:"_createL_matrix",value:function(s){var f=this.body.nodeIndices,e=this.springLength;this.L_matrix=[];for(var t=0;t<f.length;t++){this.L_matrix[f[t]]={};for(var n=0;n<f.length;n++)this.L_matrix[f[t]][f[n]]=e*s[f[t]][f[n]]}}},{key:"_createK_matrix",value:function(s){var f=this.body.nodeIndices,e=this.springConstant;this.K_matrix=[];for(var t=0;t<f.length;t++){this.K_matrix[f[t]]={};for(var n=0;n<f.length;n++)this.K_matrix[f[t]][f[n]]=e*Math.pow(s[f[t]][f[n]],-2)}}},{key:"_createE_matrix",value:function(){var s=this.body.nodeIndices,f=this.body.nodes;this.E_matrix={},this.E_sums={};for(var e=0;e<s.length;e++)this.E_matrix[s[e]]=[];for(var t=0;t<s.length;t++){for(var n=s[t],i=f[n].x,r=f[n].y,l=0,d=0,a=t;a<s.length;a++){var v=s[a];if(v!==n){var y=f[v].x,b=f[v].y,P=1/Math.sqrt(Math.pow(i-y,2)+Math.pow(r-b,2));this.E_matrix[n][a]=[this.K_matrix[n][v]*(i-y-this.L_matrix[n][v]*(i-y)*P),this.K_matrix[n][v]*(r-b-this.L_matrix[n][v]*(r-b)*P)],this.E_matrix[v][t]=this.E_matrix[n][a],l+=this.E_matrix[n][a][0],d+=this.E_matrix[n][a][1]}}this.E_sums[n]=[l,d]}}},{key:"_updateE_matrix",value:function(s){for(var f=this.body.nodeIndices,e=this.body.nodes,t=this.E_matrix[s],n=this.K_matrix[s],i=this.L_matrix[s],r=e[s].x,l=e[s].y,d=0,a=0,v=0;v<f.length;v++){var y=f[v];if(y!==s){var b=t[v],P=b[0],D=b[1],O=e[y].x,E=e[y].y,A=1/Math.sqrt(Math.pow(r-O,2)+Math.pow(l-E,2)),Y=n[y]*(r-O-i[y]*(r-O)*A),X=n[y]*(l-E-i[y]*(l-E)*A);t[v]=[Y,X],d+=Y,a+=X;var U=this.E_sums[y];U[0]+=Y-P,U[1]+=X-D}}this.E_sums[s]=[d,a]}}]),c}();k.default=m},function(L,k,h){"use strict";Object.defineProperty(k,"__esModule",{value:!0});var w=h(0),p=x(w),S=h(1),M=x(S);function x(T){return T&&T.__esModule?T:{default:T}}var I=function(){function T(){(0,p.default)(this,T)}return(0,M.default)(T,[{key:"getDistances",value:function(C,m,c){for(var u={},s=C.edges,f=0;f<m.length;f++){var e=m[f],t={};u[e]=t;for(var n=0;n<m.length;n++)t[m[n]]=f==n?0:1e9}for(var i=0;i<c.length;i++){var r=s[c[i]];r.connected===!0&&u[r.fromId]!==void 0&&u[r.toId]!==void 0&&(u[r.fromId][r.toId]=1,u[r.toId][r.fromId]=1)}for(var l=m.length,d=0;d<l;d++)for(var a=m[d],v=u[a],y=0;y<l-1;y++)for(var b=m[y],P=u[b],D=y+1;D<l;D++){var O=m[D],E=u[O],A=Math.min(P[O],P[a]+v[O]);P[O]=A,E[b]=A}return u}}]),T}();k.default=I}])})}}]);

//# sourceMappingURL=visjs-network.11af2bcc26528bfab7f3.js.map