Personal intranet/start page where I can view the weather, links, fitbit data, and the news.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
412 KiB

  1. /**
  2. * vis.js
  3. * https://github.com/almende/vis
  4. *
  5. * A dynamic, browser-based visualization library.
  6. *
  7. * @version 4.20.1
  8. * @date 2017-07-02
  9. *
  10. * @license
  11. * Copyright (C) 2011-2017 Almende B.V, http://almende.com
  12. *
  13. * Vis.js is dual licensed under both
  14. *
  15. * * The Apache 2.0 License
  16. * http://www.apache.org/licenses/LICENSE-2.0
  17. *
  18. * and
  19. *
  20. * * The MIT License
  21. * http://opensource.org/licenses/MIT
  22. *
  23. * Vis.js may be distributed under either license.
  24. */
  25. "use strict";!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.vis=t():e.vis=t()}(this,function(){return function(e){function t(o){if(i[o])return i[o].exports;var n=i[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){t.util=i(1),t.DOMutil=i(87),t.DataSet=i(88),t.DataView=i(92),t.Queue=i(91),t.Network=i(93),t.network={Images:i(104),dotparser:i(96),gephiParser:i(97),allOptions:i(179)},t.network.convertDot=function(e){return t.network.dotparser.DOTToGraph(e)},t.network.convertGephi=function(e,i){return t.network.gephiParser.parseGephi(e,i)},t.moment=i(82),t.Hammer=i(100),t.keycharm=i(99)},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}var n=i(2),s=o(n),r=i(55),a=o(r),d=i(58),h=o(d),l=i(62),u=o(l),c=i(82),f=i(86);t.isNumber=function(e){return e instanceof Number||"number"==typeof e},t.recursiveDOMDelete=function(e){if(e)for(;e.hasChildNodes()===!0;)t.recursiveDOMDelete(e.firstChild),e.removeChild(e.firstChild)},t.giveRange=function(e,t,i,o){if(t==e)return.5;var n=1/(t-e);return Math.max(0,(o-e)*n)},t.isString=function(e){return e instanceof String||"string"==typeof e},t.isDate=function(e){if(e instanceof Date)return!0;if(t.isString(e)){var i=p.exec(e);if(i)return!0;if(!isNaN(Date.parse(e)))return!0}return!1},t.randomUUID=function(){return f.v4()},t.assignAllKeys=function(e,t){for(var i in e)e.hasOwnProperty(i)&&"object"!==(0,u.default)(e[i])&&(e[i]=t)},t.fillIfDefined=function(e,i){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var n in e)void 0!==i[n]&&("object"!==(0,u.default)(i[n])?void 0!==i[n]&&null!==i[n]||void 0===e[n]||o!==!0?e[n]=i[n]:delete e[n]:"object"===(0,u.default)(e[n])&&t.fillIfDefined(e[n],i[n],o))},t.protoExtend=function(e,t){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var n in o)e[n]=o[n]}return e},t.extend=function(e,t){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var n in o)o.hasOwnProperty(n)&&(e[n]=o[n])}return e},t.selectiveExtend=function(e,t,i){if(!Array.isArray(e))throw new Error("Array with property names expected as first argument");for(var o=2;o<arguments.length;o++)for(var n=arguments[o],s=0;s<e.length;s++){var r=e[s];n&&n.hasOwnProperty(r)&&(t[r]=n[r])}return t},t.selectiveDeepExtend=function(e,i,o){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(Array.isArray(o))throw new TypeError("Arrays are not supported by deepExtend");for(var s=2;s<arguments.length;s++)for(var r=arguments[s],a=0;a<e.length;a++){var d=e[a];if(r.hasOwnProperty(d))if(o[d]&&o[d].constructor===Object)void 0===i[d]&&(i[d]={}),i[d].constructor===Object?t.deepExtend(i[d],o[d],!1,n):null===o[d]&&void 0!==i[d]&&n===!0?delete i[d]:i[d]=o[d];else{if(Array.isArray(o[d]))throw new TypeError("Arrays are not supported by deepExtend");null===o[d]&&void 0!==i[d]&&n===!0?delete i[d]:i[d]=o[d]}}return i},t.selectiveNotDeepExtend=function(e,i,o){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(Array.isArray(o))throw new TypeError("Arrays are not supported by deepExtend");for(var s in o)if(o.hasOwnProperty(s)&&e.indexOf(s)==-1)if(o[s]&&o[s].constructor===Object)void 0===i[s]&&(i[s]={}),i[s].constructor===Object?t.deepExtend(i[s],o[s]):null===o[s]&&void 0!==i[s]&&n===!0?delete i[s]:i[s]=o[s];else if(Array.isArray(o[s])){i[s]=[];for(var r=0;r<o[s].length;r++)i[s].push(o[s][r])}else null===o[s]&&void 0!==i[s]&&n===!0?delete i[s]:i[s]=o[s];return i},t.deepExtend=function(e,i,o,n){for(var s in i)if(i.hasOwnProperty(s)||o===!0)if(i[s]&&i[s].constructor===Object)void 0===e[s]&&(e[s]={}),e[s].constructor===Object?t.deepExtend(e[s],i[s],o):null===i[s]&&void 0!==e[s]&&n===!0?delete e[s]:e[s]=i[s];else if(Array.isArray(i[s])){e[s]=[];for(var r=0;r<i[s].length;r++)e[s].push(i[s][r])}else null===i[s]&&void 0!==e[s]&&n===!0?delete e[s]:e[s]=i[s];return e},t.equalArray=function(e,t){if(e.length!=t.length)return!1;for(var i=0,o=e.length;i<o
  26. null!=Object.isFrozen&&Object.isFrozen(e))return o;e._isValid=o}return e._isValid}function g(e){var t=c(NaN);return null!=e?u(p(t),e):p(t).userInvalidated=!0,t}function y(e,t){var i,o,n;if(r(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),r(t._i)||(e._i=t._i),r(t._f)||(e._f=t._f),r(t._l)||(e._l=t._l),r(t._strict)||(e._strict=t._strict),r(t._tzm)||(e._tzm=t._tzm),r(t._isUTC)||(e._isUTC=t._isUTC),r(t._offset)||(e._offset=t._offset),r(t._pf)||(e._pf=p(t)),r(t._locale)||(e._locale=t._locale),xo.length>0)for(i=0;i<xo.length;i++)o=xo[i],n=t[o],r(n)||(e[o]=n);return e}function m(e){y(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Oo===!1&&(Oo=!0,t.updateOffset(this),Oo=!1)}function b(e){return e instanceof m||null!=e&&null!=e._isAMomentObject}function _(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function w(e){var t=+e,i=0;return 0!==t&&isFinite(t)&&(i=_(t)),i}function k(e,t,i){var o,n=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),r=0;for(o=0;o<n;o++)(i&&e[o]!==t[o]||!i&&w(e[o])!==w(t[o]))&&r++;return r+s}function x(e){t.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function O(e,i){var o=!0;return u(function(){if(null!=t.deprecationHandler&&t.deprecationHandler(null,e),o){for(var n,s=[],r=0;r<arguments.length;r++){if(n="","object"==typeof arguments[r]){n+="\n["+r+"] ";for(var a in arguments[0])n+=a+": "+arguments[0][a]+", ";n=n.slice(0,-2)}else n=arguments[r];s.push(n)}x(e+"\nArguments: "+Array.prototype.slice.call(s).join("")+"\n"+(new Error).stack),o=!1}return i.apply(this,arguments)},i)}function M(e,i){null!=t.deprecationHandler&&t.deprecationHandler(e,i),Mo[e]||(x(i),Mo[e]=!0)}function E(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function S(e){var t,i;for(i in e)t=e[i],E(t)?this[i]=t:this["_"+i]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function D(e,t){var i,o=u({},e);for(i in t)l(t,i)&&(n(e[i])&&n(t[i])?(o[i]={},u(o[i],e[i]),u(o[i],t[i])):null!=t[i]?o[i]=t[i]:delete o[i]);for(i in e)l(e,i)&&!l(t,i)&&n(e[i])&&(o[i]=u({},o[i]));return o}function C(e){null!=e&&this.set(e)}function T(e,t,i){var o=this._calendar[e]||this._calendar.sameElse;return E(o)?o.call(t,i):o}function P(e){var t=this._longDateFormat[e],i=this._longDateFormat[e.toUpperCase()];return t||!i?t:(this._longDateFormat[e]=i.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])}function F(){return this._invalidDate}function I(e){return this._ordinal.replace("%d",e)}function N(e,t,i,o){var n=this._relativeTime[i];return E(n)?n(e,t,i,o):n.replace(/%d/i,e)}function B(e,t){var i=this._relativeTime[e>0?"future":"past"];return E(i)?i(t):i.replace(/%s/i,t)}function z(e,t){var i=e.toLowerCase();Bo[i]=Bo[i+"s"]=Bo[t]=e}function A(e){return"string"==typeof e?Bo[e]||Bo[e.toLowerCase()]:void 0}function R(e){var t,i,o={};for(i in e)l(e,i)&&(t=A(i),t&&(o[t]=e[i]));return o}function j(e,t){zo[e]=t}function H(e){var t=[];for(var i in e)t.push({unit:i,priority:zo[i]});return t.sort(function(e,t){return e.priority-t.priority}),t}function L(e,i){return function(o){return null!=o?(Y(this,e,o),t.updateOffset(this,i),this):W(this,e)}}function W(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Y(e,t,i){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](i)}function V(e){return e=A(e),E(this[e])?this[e]():this}function U(e,t){if("object"==typeof e){e=R(e);for(var i=H(e),o=0;o<i.length;o++)this[i[o].unit](e[i[o].unit])}else if(e=A(e),E(this[e]))return this[e](t);return this}function q(e,t,i){var o=""+Math.abs(e),n=t-o.length,s=e>=0;return(s?i?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+o}function G(e,t,i,o){var n=o;"string"==typeof o&&(n=function(){return this[o]()}),e&&(Ho[e]=n),t&&(Ho[t[0]]=function(){return q(n.apply(this,arguments),t[1],t[2])}),i&&(Ho[i]=function(){return this.localeData().ordinal(n.apply(this,arguments),e)})
  27. e=!1,a(t)&&(i=t,t=void 0),t=t||"");var n=it(),s=e?n._week.dow:0;if(null!=i)return Ui(t,(i+s)%7,o,"day");var r,d=[];for(r=0;r<7;r++)d[r]=Ui(t,(r+s)%7,o,"day");return d}function Xi(e,t){return qi(e,t,"months")}function Ki(e,t){return qi(e,t,"monthsShort")}function Zi(e,t,i){return Gi(e,t,i,"weekdays")}function Qi(e,t,i){return Gi(e,t,i,"weekdaysShort")}function $i(e,t,i){return Gi(e,t,i,"weekdaysMin")}function Ji(){var e=this._data;return this._milliseconds=rs(this._milliseconds),this._days=rs(this._days),this._months=rs(this._months),e.milliseconds=rs(e.milliseconds),e.seconds=rs(e.seconds),e.minutes=rs(e.minutes),e.hours=rs(e.hours),e.months=rs(e.months),e.years=rs(e.years),this}function eo(e,t,i,o){var n=Ut(t,i);return e._milliseconds+=o*n._milliseconds,e._days+=o*n._days,e._months+=o*n._months,e._bubble()}function to(e,t){return eo(this,e,t,1)}function io(e,t){return eo(this,e,t,-1)}function oo(e){return e<0?Math.floor(e):Math.ceil(e)}function no(){var e,t,i,o,n,s=this._milliseconds,r=this._days,a=this._months,d=this._data;return s>=0&&r>=0&&a>=0||s<=0&&r<=0&&a<=0||(s+=864e5*oo(ro(a)+r),r=0,a=0),d.milliseconds=s%1e3,e=_(s/1e3),d.seconds=e%60,t=_(e/60),d.minutes=t%60,i=_(t/60),d.hours=i%24,r+=_(i/24),n=_(so(r)),a+=n,r-=oo(ro(n)),o=_(a/12),a%=12,d.days=r,d.months=a,d.years=o,this}function so(e){return 4800*e/146097}function ro(e){return 146097*e/4800}function ao(e){if(!this.isValid())return NaN;var t,i,o=this._milliseconds;if(e=A(e),"month"===e||"year"===e)return t=this._days+o/864e5,i=this._months+so(t),"month"===e?i:i/12;switch(t=this._days+Math.round(ro(this._months)),e){case"week":return t/7+o/6048e5;case"day":return t+o/864e5;case"hour":return 24*t+o/36e5;case"minute":return 1440*t+o/6e4;case"second":return 86400*t+o/1e3;case"millisecond":return Math.floor(864e5*t)+o;default:throw new Error("Unknown unit "+e)}}function ho(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN}function lo(e){return function(){return this.as(e)}}function uo(e){return e=A(e),this.isValid()?this[e+"s"]():NaN}function co(e){return function(){return this.isValid()?this._data[e]:NaN}}function fo(){return _(this.days()/7)}function po(e,t,i,o,n){return n.relativeTime(t||1,!!i,e,o)}function vo(e,t,i){var o=Ut(e).abs(),n=ks(o.as("s")),s=ks(o.as("m")),r=ks(o.as("h")),a=ks(o.as("d")),d=ks(o.as("M")),h=ks(o.as("y")),l=n<=xs.ss&&["s",n]||n<xs.s&&["ss",n]||s<=1&&["m"]||s<xs.m&&["mm",s]||r<=1&&["h"]||r<xs.h&&["hh",r]||a<=1&&["d"]||a<xs.d&&["dd",a]||d<=1&&["M"]||d<xs.M&&["MM",d]||h<=1&&["y"]||["yy",h];return l[2]=t,l[3]=+e>0,l[4]=i,po.apply(null,l)}function go(e){return void 0===e?ks:"function"==typeof e&&(ks=e,!0)}function yo(e,t){return void 0!==xs[e]&&(void 0===t?xs[e]:(xs[e]=t,"s"===e&&(xs.ss=t-1),!0))}function mo(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),i=vo(this,!e,t);return e&&(i=t.pastFuture(+this,i)),t.postformat(i)}function bo(){if(!this.isValid())return this.localeData().invalidDate();var e,t,i,o=Os(this._milliseconds)/1e3,n=Os(this._days),s=Os(this._months);e=_(o/60),t=_(e/60),o%=60,e%=60,i=_(s/12),s%=12;var r=i,a=s,d=n,h=t,l=e,u=o,c=this.asSeconds();return c?(c<0?"-":"")+"P"+(r?r+"Y":"")+(a?a+"M":"")+(d?d+"D":"")+(h||l||u?"T":"")+(h?h+"H":"")+(l?l+"M":"")+(u?u+"S":""):"P0D"}var _o,wo;wo=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),i=t.length>>>0,o=0;o<i;o++)if(o in t&&e.call(this,t[o],o,t))return!0;return!1};var ko=wo,xo=t.momentProperties=[],Oo=!1,Mo={};t.suppressDeprecationWarnings=!1,t.deprecationHandler=null;var Eo;Eo=Object.keys?Object.keys:function(e){var t,i=[];for(t in e)l(e,t)&&i.push(t);return i};var So,Do=Eo,Co={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},To={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"},Po="Invalid date",Fo="%d",Io=/\d{1,2}/,No={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minu
  28. for(this._fieldId=this._options.fieldId||this._data&&this._data.options&&this._data.options.fieldId||"id",t=this._data.getIds({filter:this._options&&this._options.filter}),o=0,n=t.length;o<n;o++)i=t[o],this._ids[i]=!0;this.length=t.length,this._trigger("add",{items:t}),this._data.on&&this._data.on("*",this.listener)}},n.prototype.refresh=function(){var e,t,i,o=this._data.getIds({filter:this._options&&this._options.filter}),n=(0,r.default)(this._ids),s={},a=[],d=[],h=[];for(t=0,i=o.length;t<i;t++)e=o[t],s[e]=!0,this._ids[e]||(a.push(e),this._ids[e]=!0);for(t=0,i=n.length;t<i;t++)e=n[t],s[e]||(d.push(e),h.push(this._data._data[e]),delete this._ids[e]);this.length+=a.length-d.length,a.length&&this._trigger("add",{items:a}),d.length&&this._trigger("remove",{items:d,oldData:h})},n.prototype.get=function(e){var t,i,o,n=this,s=a.getType(arguments[0]);"String"==s||"Number"==s||"Array"==s?(t=arguments[0],i=arguments[1],o=arguments[2]):(i=arguments[0],o=arguments[1]);var r=a.extend({},this._options,i);this._options.filter&&i&&i.filter&&(r.filter=function(e){return n._options.filter(e)&&i.filter(e)});var d=[];return void 0!=t&&d.push(t),d.push(r),d.push(o),this._data&&this._data.get.apply(this._data,d)},n.prototype.getIds=function(e){var t;if(this._data){var i,o=this._options.filter;i=e&&e.filter?o?function(t){return o(t)&&e.filter(t)}:e.filter:o,t=this._data.getIds({filter:i,order:e&&e.order})}else t=[];return t},n.prototype.map=function(e,t){var i=[];if(this._data){var o,n=this._options.filter;o=t&&t.filter?n?function(e){return n(e)&&t.filter(e)}:t.filter:n,i=this._data.map(e,{filter:o,order:t&&t.order})}else i=[];return i},n.prototype.getDataSet=function(){for(var e=this;e instanceof n;)e=e._data;return e||null},n.prototype._onEvent=function(e,t,i){var o,n,s,r,a=t&&t.items,d=[],h=[],l=[],u=[],c=[],f=[];if(a&&this._data){switch(e){case"add":for(o=0,n=a.length;o<n;o++)s=a[o],r=this.get(s),r&&(this._ids[s]=!0,d.push(s));break;case"update":for(o=0,n=a.length;o<n;o++)s=a[o],r=this.get(s),r?this._ids[s]?(h.push(s),c.push(t.data[o]),u.push(t.oldData[o])):(this._ids[s]=!0,d.push(s)):this._ids[s]&&(delete this._ids[s],l.push(s),f.push(t.oldData[o]));break;case"remove":for(o=0,n=a.length;o<n;o++)s=a[o],this._ids[s]&&(delete this._ids[s],l.push(s),f.push(t.oldData[o]))}this.length+=d.length-l.length,d.length&&this._trigger("add",{items:d},i),h.length&&this._trigger("update",{items:h,oldData:u,data:c},i),l.length&&this._trigger("remove",{items:l,oldData:f},i)}},n.prototype.on=d.prototype.on,n.prototype.off=d.prototype.off,n.prototype._trigger=d.prototype._trigger,n.prototype.subscribe=n.prototype.on,n.prototype.unsubscribe=n.prototype.off,e.exports=n},function(e,t,i){function o(e,t,i){var n=this;if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:h,clickToUse:!1},s.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 l(function(){return n.body.emitter.emit("_requestRedraw")}),this.groups=new u,this.canvas=new y(this.body),this.selectionHandler=new _(this.body,this.canvas),this.interactionHandler=new b(this.body,this.canvas,this.selectionHandler),this.view=new m(this.body,this.canvas),this.renderer=new g(this.body,this.canvas),this.physics=new p(this.body),this.layoutEngine=new w(this.body),this.clustering=new v(this.body),this.manipulation=new k(this.body,this.canvas,this.selectionHandler),th
  29. * http://hammerjs.github.io/
  30. *
  31. * Copyright (c) 2016 Jorik Tangelder;
  32. * Licensed under the MIT license */
  33. !function(n,s,r,a){function d(e,t,i){return setTimeout(f(e,i),t)}function h(e,t,i){return!!Array.isArray(e)&&(l(e,i[t],i),!0)}function l(e,t,i){var o;if(e)if(e.forEach)e.forEach(t,i);else if(e.length!==a)for(o=0;o<e.length;)t.call(i,e[o],o,e),o++;else for(o in e)e.hasOwnProperty(o)&&t.call(i,e[o],o,e)}function u(e,t,i){var o="DEPRECATED METHOD: "+t+"\n"+i+" AT \n";return function(){var t=new Error("get-stack-trace"),i=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=n.console&&(n.console.warn||n.console.log);return s&&s.call(n.console,o,i),e.apply(this,arguments)}}function c(e,t,i){var o,n=t.prototype;o=e.prototype=Object.create(n),o.constructor=e,o._super=n,i&&ve(o,i)}function f(e,t){return function(){return e.apply(t,arguments)}}function p(e,t){return typeof e==me?e.apply(t?t[0]||a:a,t):e}function v(e,t){return e===a?t:e}function g(e,t,i){l(_(t),function(t){e.addEventListener(t,i,!1)})}function y(e,t,i){l(_(t),function(t){e.removeEventListener(t,i,!1)})}function m(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function b(e,t){return e.indexOf(t)>-1}function _(e){return e.trim().split(/\s+/g)}function w(e,t,i){if(e.indexOf&&!i)return e.indexOf(t);for(var o=0;o<e.length;){if(i&&e[o][i]==t||!i&&e[o]===t)return o;o++}return-1}function k(e){return Array.prototype.slice.call(e,0)}function x(e,t,i){for(var o=[],n=[],s=0;s<e.length;){var r=t?e[s][t]:e[s];w(n,r)<0&&o.push(e[s]),n[s]=r,s++}return i&&(o=t?o.sort(function(e,i){return e[t]>i[t]}):o.sort()),o}function O(e,t){for(var i,o,n=t[0].toUpperCase()+t.slice(1),s=0;s<ge.length;){if(i=ge[s],o=i?i+n:t,o in e)return o;s++}return a}function M(){return Oe++}function E(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||n}function S(e,t){var i=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){p(e.options.enable,[e])&&i.handler(t)},this.init()}function D(e){var t,i=e.options.inputClass;return new(t=i?i:Se?W:De?U:Ee?G:L)(e,C)}function C(e,t,i){var o=i.pointers.length,n=i.changedPointers.length,s=t&Ne&&o-n===0,r=t&(ze|Ae)&&o-n===0;i.isFirst=!!s,i.isFinal=!!r,s&&(e.session={}),i.eventType=t,T(e,i),e.emit("hammer.input",i),e.recognize(i),e.session.prevInput=i}function T(e,t){var i=e.session,o=t.pointers,n=o.length;i.firstInput||(i.firstInput=I(t)),n>1&&!i.firstMultiple?i.firstMultiple=I(t):1===n&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,d=t.center=N(o);t.timeStamp=we(),t.deltaTime=t.timeStamp-s.timeStamp,t.angle=R(a,d),t.distance=A(a,d),P(i,t),t.offsetDirection=z(t.deltaX,t.deltaY);var h=B(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=h.x,t.overallVelocityY=h.y,t.overallVelocity=_e(h.x)>_e(h.y)?h.x:h.y,t.scale=r?H(r.pointers,o):1,t.rotation=r?j(r.pointers,o):0,t.maxPointers=i.prevInput?t.pointers.length>i.prevInput.maxPointers?t.pointers.length:i.prevInput.maxPointers:t.pointers.length,F(i,t);var l=e.element;m(t.srcEvent.target,l)&&(l=t.srcEvent.target),t.target=l}function P(e,t){var i=t.center,o=e.offsetDelta||{},n=e.prevDelta||{},s=e.prevInput||{};t.eventType!==Ne&&s.eventType!==ze||(n=e.prevDelta={x:s.deltaX||0,y:s.deltaY||0},o=e.offsetDelta={x:i.x,y:i.y}),t.deltaX=n.x+(i.x-o.x),t.deltaY=n.y+(i.y-o.y)}function F(e,t){var i,o,n,s,r=e.lastInterval||t,d=t.timeStamp-r.timeStamp;if(t.eventType!=Ae&&(d>Ie||r.velocity===a)){var h=t.deltaX-r.deltaX,l=t.deltaY-r.deltaY,u=B(d,h,l);o=u.x,n=u.y,i=_e(u.x)>_e(u.y)?u.x:u.y,s=z(h,l),e.lastInterval=t}else i=r.velocity,o=r.velocityX,n=r.velocityY,s=r.direction;t.velocity=i,t.velocityX=o,t.velocityY=n,t.direction=s}function I(e){for(var t=[],i=0;i<e.pointers.length;)t[i]={clientX:be(e.pointers[i].clientX),clientY:be(e.pointers[i].clientY)},i++;return{timeStamp:we(),pointers:t,center:N(t),deltaX:e.deltaX,deltaY:e.deltaY}}function N(e){var t=e.length;if(1===t)return{x:be(e[0].clientX),y:be(e[0].clientY)};for(var i=0,o=0,n=0;n<t;)i+=e[n].clientX,o+=e[n].clientY,n++;return{x:be(i/t),y:be(o/t)}}function B(e,t,i){return{
  34. },function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(105),s=o(n),r=i(106),a=o(r),d=i(1),h=i(88),l=i(92),u=i(113).default,c=i(114).default,f=function(){function e(t,i,o,n){var r=this;if((0,s.default)(this,e),this.body=t,this.images=i,this.groups=o,this.layoutEngine=n,this.body.functions.createNode=this.create.bind(this),this.nodesListeners={add:function(e,t){r.add(t.items)},update:function(e,t){r.update(t.items,t.data)},remove:function(e,t){r.remove(t.items)}},this.options={},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(e,t,i,o){if(t===e)return.5;var n=1/(t-e);return Math.max(0,(o-e)*n)}},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";d.extend(this.options,this.defaultOptions),this.bindEventListeners()}return(0,a.default)(e,[{key:"bindEventListeners",value:function(){var e=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(){d.forEach(e.nodesListeners,function(t,i){e.body.data.nodes&&e.body.data.nodes.off(i,t)}),delete e.body.functions.createNode,delete e.nodesListeners.add,delete e.nodesListeners.update,delete e.nodesListeners.remove,delete e.nodesListeners})}},{key:"setOptions",value:function(e){if(this.nodeOptions=e,void 0!==e){if(u.parseOptions(this.options,e),void 0!==e.shape)for(var t in this.body.nodes)this.body.nodes.hasOwnProperty(t)&&this.body.nodes[t].updateShape();if(void 0!==e.font){c.parseOptions(this.options.font,e);for(var i in this.body.nodes)this.body.nodes.hasOwnProperty(i)&&(this.body.nodes[i].updateLabelModule(),this.body.nodes[i].needsRefresh())}if(void 0!==e.size)for(var o in this.body.nodes)this.body.nodes.hasOwnProperty(o)&&this.body.nodes[o].needsRefresh();void 0===e.hidden&&void 0===e.physics||this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.body.data.nodes;if(e instanceof h||e instanceof l)this.body.data.nodes=e;else if(Array.isArray(e))this.body.data.nodes=new h,this.body.data.nodes.add(e);else{if(e)throw new TypeError("Array or DataSet expected");this.body.data.nodes=new h}if(i&&d.forEach(this.nodesListeners,function(e,t){i.off(t,e)}),this.body.nodes={},this.body.data.nodes){var o=this;d.forEach(this.nodesListeners,function(e,t){o.body.data.nodes.on(t,e)});var n=this.body.data.nodes.getIds();this.add(n,!0)}t===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=void 0,o=[],n=0;n<e.length;n++){i=e[n];var s=this.body.data.nodes.get(i),r=this.create(s);o.push(r),this.body.nodes[i]=r}this.layoutEngine.positionInitially(o),t===!1&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(e,t){for(var i=this.body.nodes,o=!1,n=0;n<e.length;n++){var s=e[n],r=i[s],a=t[n];void 0!==r?o=r.setOptions(a):(o=!0,r=this.create(a),i[s]=r)}o===!0?this.body.emitter.emit("_dataChanged"):this.body
  35. value:!0});var n=i(120),s=o(n),r=i(105),a=o(r),d=i(106),h=o(d),l=i(123),u=o(l),c=i(124),f=o(c),p=i(129),v=o(p),g=function(e){function t(e,i,o){(0,a.default)(this,t);var n=(0,u.default)(this,(t.__proto__||(0,s.default)(t)).call(this,e,i,o));return n._setMargins(o),n}return(0,f.default)(t,e),(0,h.default)(t,[{key:"resize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;this.needsRefresh(t,i)&&(this.textSize=this.labelModule.getTextSize(e,t,i),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=this.width/2)}},{key:"draw",value:function(e,t,i,o,n,s){this.resize(e,o,n),this.left=t-this.width/2,this.top=i-this.height/2,this.initContextForDraw(e,s),e.roundRect(this.left,this.top,this.width,this.height,s.borderRadius),this.performFill(e,s),this.updateBoundingBox(t,i,e,o,n),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,o,n)}},{key:"updateBoundingBox",value:function(e,t,i,o,n){this._updateBoundingBox(e,t,i,o,n);var s=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(s)}},{key:"distanceToBorder",value:function(e,t){this.resize(e);var i=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+i}}]),t}(v.default);t.default=g},function(e,t,i){e.exports={default:i(121),__esModule:!0}},function(e,t,i){i(122),e.exports=i(17).Object.getPrototypeOf},function(e,t,i){var o=i(49),n=i(48);i(61)("getPrototypeOf",function(){return function(e){return n(o(e))}})},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=i(62),s=o(n);t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":(0,s.default)(t))&&"function"!=typeof t?e:t}},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=i(125),s=o(n),r=i(55),a=o(r),d=i(62),h=o(d);t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":(0,h.default)(t)));e.prototype=(0,a.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(s.default?(0,s.default)(e,t):e.__proto__=t)}},function(e,t,i){e.exports={default:i(126),__esModule:!0}},function(e,t,i){i(127),e.exports=i(17).Object.setPrototypeOf},function(e,t,i){var o=i(15);o(o.S,"Object",{setPrototypeOf:i(128).set})},function(e,t,i){var o=i(23),n=i(22),s=function(e,t){if(n(e),!o(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,o){try{o=i(18)(Function.call,i(78).f(Object.prototype,"__proto__").set,2),o(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,i){return s(e,i),t?e.__proto__=i:o(e,i),e}}({},!1):void 0),check:s}},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(62),s=o(n),r=i(105),a=o(r),d=i(106),h=o(d),l=function(){function e(t,i,o){(0,a.default)(this,e),this.body=i,this.labelModule=o,this.setOptions(t),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,h.default)(e,[{key:"setOptions",value:function(e){this.options=e}},{key:"_setMargins",value:function(e){this.margin={},this.options.margin&&("object"==(0,s.default)(this.options.margin)?(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)),e.adjustSizes
  36. var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=this.body.data.edges;if(e instanceof h||e instanceof l)this.body.data.edges=e;else if(Array.isArray(e))this.body.data.edges=new h,this.body.data.edges.add(e);else{if(e)throw new TypeError("Array or DataSet expected");this.body.data.edges=new h}if(o&&d.forEach(this.edgesListeners,function(e,t){o.off(t,e)}),this.body.edges={},this.body.data.edges){d.forEach(this.edgesListeners,function(e,i){t.body.data.edges.on(i,e)});var n=this.body.data.edges.getIds();this.add(n,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),i===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.body.edges,o=this.body.data.edges,n=0;n<e.length;n++){var s=e[n],r=i[s];r&&r.disconnect();var a=o.get(s,{showInternalIds:!0});i[s]=this.create(a)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),t===!1&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(e){for(var t=this.body.edges,i=this.body.data.edges,o=!1,n=0;n<e.length;n++){var s=e[n],r=i.get(s),a=t[s];void 0!==a?(a.disconnect(),o=a.setOptions(r)||o,a.connect()):(this.body.edges[s]=this.create(r),o=!0)}o===!0?(this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),this.body.emitter.emit("_dataChanged")):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(e){for(var t=this.body.edges,i=0;i<e.length;i++){var o=e[i],n=t[o];void 0!==n&&(n.cleanup(),n.disconnect(),delete t[o])}this.body.emitter.emit("_dataChanged")}},{key:"refresh",value:function(){var e=this.body.edges;for(var t in e){var i=void 0;e.hasOwnProperty(t)&&(i=e[t]);var o=this.body.data.edges._data[t];void 0!==i&&void 0!==o&&i.setOptions(o)}}},{key:"create",value:function(e){return new u(e,this.body,this.options,this.defaultOptions,this.edgeOptions)}},{key:"reconnectEdges",value:function(){var e,t=this.body.nodes,i=this.body.edges;for(e in t)t.hasOwnProperty(e)&&(t[e].edges=[]);for(e in i)if(i.hasOwnProperty(e)){var o=i[e];o.from=null,o.to=null,o.connect()}}},{key:"getConnectedNodes",value:function(e){var t=[];if(void 0!==this.body.edges[e]){var i=this.body.edges[e];void 0!==i.fromId&&t.push(i.fromId),void 0!==i.toId&&t.push(i.toId)}return t}}]),e}());t.default=f},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(89),s=o(n),r=i(55),a=o(r),d=i(62),h=o(d),l=i(105),u=o(l),c=i(106),f=o(c),p=i(1),v=i(114).default,g=i(148).default,y=i(152).default,m=i(153).default,b=i(154).default,_=function(){function e(t,i,o,n,s){if((0,u.default)(this,e),void 0===i)throw"No body provided";this.options=p.bridgeObject(o),this.globalOptions=o,this.defaultOptions=n,this.edgeOptions=s,this.body=i,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 v(this.body,this.options,!0),this.setOptions(t)}return(0,f.default)(e,[{key:"setOptions",value:function(t){if(t){e.parseOptions(this.options,t,!0,this.globalOptions),void 0!==t.id&&(this.id=t.id),void 0!==t.from&&(this.fromId=t.from),void 0!==t.to&&(this.toId=t.to),void 0!==t.title&&(this.title=t.title),void 0!==t.value&&(t.value=parseFloat(t.value)),this.choosify(t),this.updateLabelModule(t),this.labelModule.propagateFonts(this.edgeOptions,t,this.defaultOptions);var i=this.updateEdgeType();return this._setInteractionWidths(),this.connect(),void 0===t.hidden&&void 0===t.physics||(i=!0),i}}},{key:"choosify",value:function(e){this.chooser=!0;var t=[e,this.options,this.edgeOptions,this.defaultOptions],i=p.topMost(t,"chosen");if("boolean"==typeof i)this.chooser=i;else if("object"===("undefined"==typeof i?"undefined":(0,h.default)(i))){var o=p.topMost(t,["chosen","edge"]);"boolean"!=typeof o&&"function"!=typeof o||(this.chooser=o)}}},{key:"getFormattingValues",value:function(){var e=this.options.arrows.to===!0||this.opti
  37. }},{key:"getMaxLevel",value:function(e){var t=this,i={},o=function e(o){if(void 0!==i[o])return i[o];var n=t.levels[o];if(t.childrenReference[o]){var s=t.childrenReference[o];if(s.length>0)for(var r=0;r<s.length;r++)n=Math.max(n,e(s[r]))}return i[o]=n,n};return o(e)}},{key:"levelDownstream",value:function(e,t){void 0===this.levels[t.id]&&(void 0===this.levels[e.id]&&(this.levels[e.id]=0),this.levels[t.id]=this.levels[e.id]+1)}},{key:"setMinLevelToZero",value:function(e){var t=1e9;for(var i in e)e.hasOwnProperty(i)&&void 0!==this.levels[i]&&(t=Math.min(this.levels[i],t));for(var o in e)e.hasOwnProperty(o)&&void 0!==this.levels[o]&&(this.levels[o]-=t)}},{key:"getTreeSize",value:function(e,t){var i=1e9,o=-1e9,n=1e9,s=-1e9;for(var r in this.trees)if(this.trees.hasOwnProperty(r)&&this.trees[r]===t){var a=e[r];i=Math.min(a.x,i),o=Math.max(a.x,o),n=Math.min(a.y,n),s=Math.max(a.y,s)}return{min_x:i,max_x:o,min_y:n,max_y:s}}}]),e}(),y=function(){function e(t){(0,u.default)(this,e),this.body=t,this.initialRandomSeed=Math.round(1e6*Math.random()),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"}},p.extend(this.options,this.defaultOptions),this.bindEventListeners()}return(0,f.default)(e,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.on("_dataChanged",function(){e.setupHierarchicalLayout()}),this.body.emitter.on("_dataLoaded",function(){e.layoutNetwork()}),this.body.emitter.on("_resetHierarchicalLayout",function(){e.setupHierarchicalLayout()}),this.body.emitter.on("_adjustEdgesForHierarchicalLayout",function(){if(e.options.hierarchical.enabled===!0){var t=e.getStaticType();e.body.emitter.emit("_forceDisableDynamicCurves",t,!1)}})}},{key:"setOptions",value:function(e,t){if(void 0!==e){var i=this.options.hierarchical,o=i.enabled;if(p.selectiveDeepExtend(["randomSeed","improvedLayout"],this.options,e),p.mergeOptions(this.options,e,"hierarchical"),void 0!==e.randomSeed&&(this.initialRandomSeed=e.randomSeed),i.enabled===!0)return o===!0&&this.body.emitter.emit("refresh",!0),"RL"===i.direction||"DU"===i.direction?i.levelSeparation>0&&(i.levelSeparation*=-1):i.levelSeparation<0&&(i.levelSeparation*=-1),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(o===!0)return this.body.emitter.emit("refresh"),p.deepExtend(t,this.optionsBackup)}return t}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(e){if(this.options.hierarchical.enabled===!0){var t=this.optionsBackup.physics;void 0===e.physics||e.physics===!0?(e.physics={enabled:void 0===t.enabled||t.enabled,solver:"hierarchicalRepulsion"},t.enabled=void 0===t.enabled||t.enabled,t.solver=t.solver||"barnesHut"):"object"===(0,h.default)(e.physics)?(t.enabled=void 0===e.physics.enabled||e.physics.enabled,t.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(t.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});var i=this.getStaticType();if(void 0===e.edges)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1};else if(void 0===e.edges.smooth)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1;else if("boolean"==typeof e.edges.smooth)this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:i};else{var o=e.edges.smooth;void 0!==o.type&&"dynamic"!==o.type&&(i=o.type),this.optionsBackup.edges={smooth:void 0===o.enabled||o.enabled,type:void 0===o.type?"dynamic":o.type,roundness:void 0===o.roundness?.5:o.roundness,forceDirection:void 0!==o.forceDirection&&o.forceDirection},e.edges.smooth={enabled:void 0===o.enabled||o.enabled,type:i,roundness:void 0===o.roundness?.5:o.roundness,forceDirection:void 0!==o.forceDirection&&o.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",i)}retur
  38. e.lineWidth=a,e.strokeStyle=h,e.beginPath(),e.moveTo(i.x,i.y),e.lineTo(i.x+n*o.x,i.y+n*o.y),e.stroke();var l=Math.atan2(o.y,o.x);e.fillStyle=h,e.arrowEndpoint(i.x+n*o.x+Math.cos(l)*d,i.y+n*o.y+Math.sin(l)*d,l,d),e.fill()}}}]),e}();t.default=b},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(105),s=o(n),r=i(106),a=o(r),d=function(){function e(t,i,o){(0,s.default)(this,e),this.body=t,this.physicsBody=i,this.barnesHutTree,this.setOptions(o),this.randomSeed=5}return(0,a.default)(e,[{key:"setOptions",value:function(e){this.options=e,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}},{key:"seededRandom",value:function(){var e=1e4*Math.sin(this.randomSeed++);return e-Math.floor(e)}},{key:"solve",value:function(){if(0!==this.options.gravitationalConstant&&this.physicsBody.physicsNodeIndices.length>0){var e=void 0,t=this.body.nodes,i=this.physicsBody.physicsNodeIndices,o=i.length,n=this._formBarnesHutTree(t,i);this.barnesHutTree=n;for(var s=0;s<o;s++)e=t[i[s]],e.options.mass>0&&(this._getForceContribution(n.root.children.NW,e),this._getForceContribution(n.root.children.NE,e),this._getForceContribution(n.root.children.SW,e),this._getForceContribution(n.root.children.SE,e))}}},{key:"_getForceContribution",value:function(e,t){if(e.childrenCount>0){var i=void 0,o=void 0,n=void 0;i=e.centerOfMass.x-t.x,o=e.centerOfMass.y-t.y,n=Math.sqrt(i*i+o*o),n*e.calcSize>this.thetaInversed?this._calculateForces(n,i,o,t,e):4===e.childrenCount?(this._getForceContribution(e.children.NW,t),this._getForceContribution(e.children.NE,t),this._getForceContribution(e.children.SW,t),this._getForceContribution(e.children.SE,t)):e.children.data.id!=t.id&&this._calculateForces(n,i,o,t,e)}}},{key:"_calculateForces",value:function(e,t,i,o,n){0===e&&(e=.1,t=e),this.overlapAvoidanceFactor<1&&o.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*o.shape.radius,e-o.shape.radius));var s=this.options.gravitationalConstant*n.mass*o.options.mass/Math.pow(e,3),r=t*s,a=i*s;this.physicsBody.forces[o.id].x+=r,this.physicsBody.forces[o.id].y+=a}},{key:"_formBarnesHutTree",value:function(e,t){for(var i=void 0,o=t.length,n=e[t[0]].x,s=e[t[0]].y,r=e[t[0]].x,a=e[t[0]].y,d=1;d<o;d++){var h=e[t[d]].x,l=e[t[d]].y;e[t[d]].options.mass>0&&(h<n&&(n=h),h>r&&(r=h),l<s&&(s=l),l>a&&(a=l))}var u=Math.abs(r-n)-Math.abs(a-s);u>0?(s-=.5*u,a+=.5*u):(n+=.5*u,r-=.5*u);var c=1e-5,f=Math.max(c,Math.abs(r-n)),p=.5*f,v=.5*(n+r),g=.5*(s+a),y={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:v-p,maxX:v+p,minY:g-p,maxY:g+p},size:f,calcSize:1/f,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(y.root);for(var m=0;m<o;m++)i=e[t[m]],i.options.mass>0&&this._placeInTree(y.root,i);return y}},{key:"_updateBranchMass",value:function(e,t){var i=e.mass+t.options.mass,o=1/i;e.centerOfMass.x=e.centerOfMass.x*e.mass+t.x*t.options.mass,e.centerOfMass.x*=o,e.centerOfMass.y=e.centerOfMass.y*e.mass+t.y*t.options.mass,e.centerOfMass.y*=o,e.mass=i;var n=Math.max(Math.max(t.height,t.radius),t.width);e.maxWidth=e.maxWidth<n?n:e.maxWidth}},{key:"_placeInTree",value:function(e,t,i){1==i&&void 0!==i||this._updateBranchMass(e,t),e.children.NW.range.maxX>t.x?e.children.NW.range.maxY>t.y?this._placeInRegion(e,t,"NW"):this._placeInRegion(e,t,"SW"):e.children.NW.range.maxY>t.y?this._placeInRegion(e,t,"NE"):this._placeInRegion(e,t,"SE")}},{key:"_placeInRegion",value:function(e,t,i){switch(e.children[i].childrenCount){case 0:e.children[i].children.data=t,e.children[i].childrenCount=1,this._updateBranchMass(e.children[i],t);break;case 1:e.children[i].children.data.x===t.x&&e.children[i].children.data.y===t.y?(t.x+=this.seededRandom(),t.y+=this.seededRandom()):(this._splitBranch(e.children[i]),this._placeInTree(e.children[i],t));break;case 4:this._placeInTree(e.children[i],t)}}},{key:"_splitBranch",value:function(e){var t=null;1===e.childrenCount&&(t=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._ins
  39. }}},{key:"_prepareValue",value:function(e){if("number"==typeof e)return e+"px";if("string"==typeof e){if(e.indexOf("%")!==-1||e.indexOf("px")!==-1)return e;if(e.indexOf("%")===-1)return e+"px"}throw new Error("Could not use the value supplied for width or height:"+e)}},{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 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.frame.canvas.appendChild(e)}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 e=this;void 0!==this.hammer&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new d(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:d.DIRECTION_ALL}),h.onTouch(this.hammer,function(t){e.body.eventListeners.onTouch(t)}),this.hammer.on("tap",function(t){e.body.eventListeners.onTap(t)}),this.hammer.on("doubletap",function(t){e.body.eventListeners.onDoubleTap(t)}),this.hammer.on("press",function(t){e.body.eventListeners.onHold(t)}),this.hammer.on("panstart",function(t){e.body.eventListeners.onDragStart(t)}),this.hammer.on("panmove",function(t){e.body.eventListeners.onDrag(t)}),this.hammer.on("panend",function(t){e.body.eventListeners.onDragEnd(t)}),this.hammer.on("pinch",function(t){e.body.eventListeners.onPinch(t)}),this.frame.canvas.addEventListener("mousewheel",function(t){e.body.eventListeners.onMouseWheel(t)}),this.frame.canvas.addEventListener("DOMMouseScroll",function(t){e.body.eventListeners.onMouseWheel(t)}),this.frame.canvas.addEventListener("mousemove",function(t){e.body.eventListeners.onMouseMove(t)}),this.frame.canvas.addEventListener("contextmenu",function(t){e.body.eventListeners.onContext(t)}),this.hammerFrame=new d(this.frame),h.onRelease(this.hammerFrame,function(t){e.body.eventListeners.onRelease(t)})}},{key:"setSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.width,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.height;e=this._prepareValue(e),t=this._prepareValue(t);var i=!1,o=this.frame.canvas.width,n=this.frame.canvas.height,s=this.pixelRatio;if(this._setPixelRatio(),e!=this.options.width||t!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=t)this._getCameraState(s),this.frame.style.width=e,this.frame.style.height=t,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=e,this.options.height=t,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},i=!0;else{var r=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),a=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);this.frame.canvas.width===r&&this.frame.canvas.height===a||this._getCameraState(s),this.frame.canvas.width!==r&&(this.frame.canvas.width=r,i=!0),this.frame.canvas.height!==a&&(this.frame.canvas.height=a,i=!0)}return i===!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(o/this.pixelRatio),oldHeight:Math.round(n/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,i}},{key:"getContext",value:function()
  40. }}},{key:"getNodeAt",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this._pointerToPositionObject(e),o=this._getAllNodesOverlappingWith(i);return o.length>0?t===!0?this.body.nodes[o[o.length-1]]:o[o.length-1]:void 0}},{key:"_getEdgesOverlappingWith",value:function(e,t){for(var i=this.body.edges,o=0;o<this.body.edgeIndices.length;o++){var n=this.body.edgeIndices[o];i[n].isOverlappingWith(e)&&t.push(n)}}},{key:"_getAllEdgesOverlappingWith",value:function(e){var t=[];return this._getEdgesOverlappingWith(e,t),t}},{key:"getEdgeAt",value:function(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.canvas.DOMtoCanvas(e),o=10,n=null,s=this.body.edges,r=0;r<this.body.edgeIndices.length;r++){var a=this.body.edgeIndices[r],d=s[a];if(d.connected){var h=d.from.x,l=d.from.y,u=d.to.x,c=d.to.y,f=d.edgeType.getDistanceToEdge(h,l,u,c,i.x,i.y);f<o&&(n=a,o=f)}}return null!==n?t===!0?this.body.edges[n]:n:void 0}},{key:"_addToSelection",value:function(e){e instanceof d?this.selectionObj.nodes[e.id]=e:this.selectionObj.edges[e.id]=e}},{key:"_addToHover",value:function(e){e instanceof d?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}},{key:"_removeFromSelection",value:function(e){e instanceof d?(delete this.selectionObj.nodes[e.id],this._unselectConnectedEdges(e)):delete this.selectionObj.edges[e.id]}},{key:"unselectAll",value:function(){for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&this.selectionObj.nodes[e].unselect();for(var t in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(t)&&this.selectionObj.edges[t].unselect();this.selectionObj={nodes:{},edges:{}}}},{key:"_getSelectedNodeCount",value:function(){var e=0;for(var t in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(t)&&(e+=1);return e}},{key:"_getSelectedNode",value:function(){for(var e in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(e))return this.selectionObj.nodes[e]}},{key:"_getSelectedEdge",value:function(){for(var e in this.selectionObj.edges)if(this.selectionObj.edges.hasOwnProperty(e))return this.selectionObj.edges[e]}},{key:"_getSelectedEdgeCount",value:function(){var e=0;for(var t in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(t)&&(e+=1);return e}},{key:"_getSelectedObjectCount",value:function(){var e=0;for(var t in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(t)&&(e+=1);for(var i in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(i)&&(e+=1);return e}},{key:"_selectionIsEmpty",value:function(){for(var e in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(e))return!1;for(var t in this.selectionObj.edges)if(this.selectionObj.edges.hasOwnProperty(t))return!1;return!0}},{key:"_clusterInSelection",value:function(){for(var e in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(e)&&this.selectionObj.nodes[e].clusterSize>1)return!0;return!1}},{key:"_selectConnectedEdges",value:function(e){for(var t=0;t<e.edges.length;t++){var i=e.edges[t];i.select(),this._addToSelection(i)}}},{key:"_hoverConnectedEdges",value:function(e){for(var t=0;t<e.edges.length;t++){var i=e.edges[t];i.hover=!0,this._addToHover(i)}}},{key:"_unselectConnectedEdges",value:function(e){for(var t=0;t<e.edges.length;t++){var i=e.edges[t];i.unselect(),this._removeFromSelection(i)}}},{key:"blurObject",value:function(e){e.hover===!0&&(e.hover=!1,e instanceof d?this.body.emitter.emit("blurNode",{node:e.id}):this.body.emitter.emit("blurEdge",{edge:e.id}))}},{key:"hoverObject",value:function(e){var t=!1;for(var i in this.hoverObj.nodes)this.hoverObj.nodes.hasOwnProperty(i)&&(void 0===e||e instanceof d&&e.id!=i||e instanceof h)&&(this.blurObject(this.hoverObj.nodes[i]),delete this.hoverObj.nodes[i],t=!0);for(var o in this.hoverObj.edges)this.hoverObj.edges.hasOwnProperty(o)&&(t===!0?(this.hoverObj.edges[o].hover=!1,delete this.hoverObj.edges[o]):(void 0===e||e instanceof h&&e.id!=o||e instanceof d&&!e.hover)&&(this.blurObject(this.hoverObj.edges[o]),delete this.hoverObj.edges[o],t=!0));
  41. this._makeItem(i,d,o)}},{key:"_makeRange",value:function(e,t,i){var o=e[0],n=e[1],s=e[2],r=e[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range",a.min=n,a.max=s}catch(e){}a.step=r;var d="",h=0;if(void 0!==t){var l=1.2;t<0&&t*l<n?(a.min=Math.ceil(t*l),h=a.min,d="range increased"):t/l<n&&(a.min=Math.ceil(t/l),h=a.min,d="range increased"),t*l>s&&1!==s&&(a.max=Math.ceil(t*l),h=a.max,d="range increased"),a.value=t}else a.value=o;var u=document.createElement("input");u.className="vis-configuration vis-config-rangeinput",u.value=a.value;var c=this;a.onchange=function(){u.value=this.value,c._update(Number(this.value),i)},a.oninput=function(){u.value=this.value};var f=this._makeLabel(i[i.length-1],i),p=this._makeItem(i,f,a,u);""!==d&&this.popupHistory[p]!==h&&(this.popupHistory[p]=h,this._setupPopup(d,p))}},{key:"_setupPopup",value:function(e,t){var i=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter<this.popupLimit){var o=document.createElement("div");o.id="vis-configuration-popup",o.className="vis-configuration-popup",o.innerHTML=e,o.onclick=function(){i._removePopup()},this.popupCounter+=1,this.popupDiv={html:o,index:t}}}},{key:"_removePopup",value:function(){void 0!==this.popupDiv.html&&(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(void 0!==this.popupDiv.html){var t=this.domElements[this.popupDiv.index],i=t.getBoundingClientRect();this.popupDiv.html.style.left=i.left+"px",this.popupDiv.html.style.top=i.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,i){var o=document.createElement("input");o.type="checkbox",o.className="vis-configuration vis-config-checkbox",o.checked=e,void 0!==t&&(o.checked=t,t!==e&&("object"===("undefined"==typeof e?"undefined":(0,a.default)(e))?t!==e.enabled&&this.changedOptions.push({path:i,value:t}):this.changedOptions.push({path:i,value:t})));var n=this;o.onchange=function(){n._update(this.checked,i)};var s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,o)}},{key:"_makeTextInput",value:function(e,t,i){var o=document.createElement("input");o.type="text",o.className="vis-configuration vis-config-text",o.value=t,t!==e&&this.changedOptions.push({path:i,value:t});var n=this;o.onchange=function(){n._update(this.value,i)};var s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,o)}},{key:"_makeColorField",value:function(e,t,i){var o=this,n=e[1],s=document.createElement("div");t=void 0===t?n:t,"none"!==t?(s.className="vis-configuration vis-config-colorBlock",s.style.backgroundColor=t):s.className="vis-configuration vis-config-colorBlock none",t=void 0===t?n:t,s.onclick=function(){o._showColorPicker(t,s,i)};var r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,s)}},{key:"_showColorPicker",value:function(e,t,i){var o=this;t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(function(e){var n="rgba("+e.r+","+e.g+","+e.b+","+e.a+")";t.style.backgroundColor=n,o._update(n,i)}),this.colorPicker.setCloseCallback(function(){t.onclick=function(){o._showColorPicker(e,t,i)}})}},{key:"_handleObject",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1,n=this.options.filter,s=!1;for(var r in e)if(e.hasOwnProperty(r)){o=!0;var a=e[r],d=c.copyAndExtendArray(t,r);if("function"==typeof n&&(o=n(r,t),o===!1&&!(a instanceof Array)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,o=this._handleObject(a,d,!0),this.allowCreation=i===!1)),o!==!1){s=!0;var h=this._getValue(d);if(a instanceof Array)this._handleArray(a,h,d);else if("string"==typeof a)this._
  42. timestep:[.5,.01,1,.01]}};t.allOptions=h,t.configureOptions=l},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(115),s=o(n),r=i(105),a=o(r),d=i(106),h=o(d),l=i(181),u=o(l),c=function(){function e(t,i,o){(0,a.default)(this,e),this.body=t,this.springLength=i,this.springConstant=o,this.distanceSolver=new u.default}return(0,h.default)(e,[{key:"setOptions",value:function(e){e&&(e.springLength&&(this.springLength=e.springLength),e.springConstant&&(this.springConstant=e.springConstant))}},{key:"solve",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(o),this._createK_matrix(o),this._createE_matrix();for(var n=.01,r=1,a=0,d=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),h=5,l=1e9,u=0,c=0,f=0,p=0,v=0;l>n&&a<d;){a+=1;var g=this._getHighestEnergyNode(i),y=(0,s.default)(g,4);for(u=y[0],l=y[1],c=y[2],f=y[3],p=l,v=0;p>r&&v<h;){v+=1,this._moveNode(u,c,f);var m=this._getEnergy(u),b=(0,s.default)(m,3);p=b[0],c=b[1],f=b[2]}}}},{key:"_getHighestEnergyNode",value:function(e){for(var t=this.body.nodeIndices,i=this.body.nodes,o=0,n=t[0],r=0,a=0,d=0;d<t.length;d++){var h=t[d];if(i[h].predefinedPosition===!1||i[h].isCluster===!0&&e===!0||i[h].options.fixed.x===!0||i[h].options.fixed.y===!0){var l=this._getEnergy(h),u=(0,s.default)(l,3),c=u[0],f=u[1],p=u[2];o<c&&(o=c,n=h,r=f,a=p)}}return[n,o,r,a]}},{key:"_getEnergy",value:function(e){var t=(0,s.default)(this.E_sums[e],2),i=t[0],o=t[1],n=Math.sqrt(Math.pow(i,2)+Math.pow(o,2));return[n,i,o]}},{key:"_moveNode",value:function(e,t,i){for(var o=this.body.nodeIndices,n=this.body.nodes,s=0,r=0,a=0,d=n[e].x,h=n[e].y,l=this.K_matrix[e],u=this.L_matrix[e],c=0;c<o.length;c++){var f=o[c];if(f!==e){var p=n[f].x,v=n[f].y,g=l[f],y=u[f],m=1/Math.pow(Math.pow(d-p,2)+Math.pow(h-v,2),1.5);s+=g*(1-y*Math.pow(h-v,2)*m),r+=g*(y*(d-p)*(h-v)*m),a+=g*(1-y*Math.pow(d-p,2)*m)}}var b=s,_=r,w=t,k=a,x=i,O=(w/b+x/_)/(_/b-k/_),M=-(_*O+w)/b;n[e].x+=M,n[e].y+=O,this._updateE_matrix(e)}},{key:"_createL_matrix",value:function(e){var t=this.body.nodeIndices,i=this.springLength;this.L_matrix=[];for(var o=0;o<t.length;o++){this.L_matrix[t[o]]={};for(var n=0;n<t.length;n++)this.L_matrix[t[o]][t[n]]=i*e[t[o]][t[n]]}}},{key:"_createK_matrix",value:function(e){var t=this.body.nodeIndices,i=this.springConstant;this.K_matrix=[];for(var o=0;o<t.length;o++){this.K_matrix[t[o]]={};for(var n=0;n<t.length;n++)this.K_matrix[t[o]][t[n]]=i*Math.pow(e[t[o]][t[n]],-2)}}},{key:"_createE_matrix",value:function(){var e=this.body.nodeIndices,t=this.body.nodes;this.E_matrix={},this.E_sums={};for(var i=0;i<e.length;i++)this.E_matrix[e[i]]=[];for(var o=0;o<e.length;o++){for(var n=e[o],s=t[n].x,r=t[n].y,a=0,d=0,h=o;h<e.length;h++){var l=e[h];if(l!==n){var u=t[l].x,c=t[l].y,f=1/Math.sqrt(Math.pow(s-u,2)+Math.pow(r-c,2));this.E_matrix[n][h]=[this.K_matrix[n][l]*(s-u-this.L_matrix[n][l]*(s-u)*f),this.K_matrix[n][l]*(r-c-this.L_matrix[n][l]*(r-c)*f)],this.E_matrix[l][o]=this.E_matrix[n][h],a+=this.E_matrix[n][h][0],d+=this.E_matrix[n][h][1]}}this.E_sums[n]=[a,d]}}},{key:"_updateE_matrix",value:function(e){for(var t=this.body.nodeIndices,i=this.body.nodes,o=this.E_matrix[e],n=this.K_matrix[e],s=this.L_matrix[e],r=i[e].x,a=i[e].y,d=0,h=0,l=0;l<t.length;l++){var u=t[l];if(u!==e){var c=o[l],f=c[0],p=c[1],v=i[u].x,g=i[u].y,y=1/Math.sqrt(Math.pow(r-v,2)+Math.pow(a-g,2)),m=n[u]*(r-v-s[u]*(r-v)*y),b=n[u]*(a-g-s[u]*(a-g)*y);o[l]=[m,b],d+=m,h+=b;var _=this.E_sums[u];_[0]+=m-f,_[1]+=b-p}}this.E_sums[e]=[d,h]}}]),e}();t.default=c},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(105),s=o(n),r=i(106),a=o(r),d=function(){function e(){(0,s.default)(this,e)}return(0,a.default)(e,[{key:"getDistances",value:function(e,t,i){for(var o={},n=e.edges,s=0;s<t.length;s++){var r=t[s],a={};o[r]=a;for(var d=0;d<t.length;d++)a[t[d]]=s==d?0:1e9}for(var h=0;h<i.length;h++){var l=n[i[h]];l.connected===!0&&void 0!==o[l.fromId]&&void