vis.js is a dynamic, browser-based visualization library
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.

39 lines
417 KiB

  1. /**
  2. * vis.js
  3. * https://github.com/almende/vis
  4. *
  5. * A dynamic, browser-based visualization library.
  6. *
  7. * @version 4.0.0-SNAPSHOT
  8. * @date 2015-03-02
  9. *
  10. * @license
  11. * Copyright (C) 2011-2014 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(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):"object"==typeof exports?exports.vis=e():t.vis=e()}(this,function(){return function(t){function e(o){if(i[o])return i[o].exports;var s=i[o]={exports:{},id:o,loaded:!1};return t[o].call(s.exports,s,s.exports,e),s.loaded=!0,s.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){e.util=i(1),e.DOMutil=i(2),e.DataSet=i(3),e.DataView=i(4),e.Queue=i(5),e.Graph3d=i(6),e.graph3d={Camera:i(7),Filter:i(8),Point2d:i(9),Point3d:i(10),Slider:i(11),StepNumber:i(12)},e.Timeline=i(13),e.Graph2d=i(14),e.timeline={DateUtil:i(15),DataStep:i(16),Range:i(17),stack:i(18),TimeStep:i(19),components:{items:{Item:i(20),BackgroundItem:i(21),BoxItem:i(22),PointItem:i(23),RangeItem:i(24)},Component:i(25),CurrentTime:i(26),CustomTime:i(27),DataAxis:i(28),GraphGroup:i(29),Group:i(30),BackgroundGroup:i(31),ItemSet:i(32),Legend:i(33),LineGraph:i(34),TimeAxis:i(35)}},e.Network=i(36),e.network={Edge:i(37),Groups:i(38),Images:i(39),Node:i(40),Popup:i(41),dotparser:i(42),gephiParser:i(43)},e.Graph=function(){throw new Error("Graph is renamed to Network. Please create a graph as new vis.Network(...)")},e.moment=i(44),e.hammer=i(45),e.Hammer=i(45)},function(t,e,i){var o=i(44);e.isNumber=function(t){return t instanceof Number||"number"==typeof t},e.giveRange=function(t,e,i,o){if(e==t)return.5;var s=1/(e-t);return Math.max(0,(o-t)*s)},e.isString=function(t){return t instanceof String||"string"==typeof t},e.isDate=function(t){if(t instanceof Date)return!0;if(e.isString(t)){var i=s.exec(t);if(i)return!0;if(!isNaN(Date.parse(t)))return!0}return!1},e.isDataTable=function(t){return"undefined"!=typeof google&&google.visualization&&google.visualization.DataTable&&t instanceof google.visualization.DataTable},e.randomUUID=function(){var t=function(){return Math.floor(65536*Math.random()).toString(16)};return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()},e.extend=function(t){for(var e=1,i=arguments.length;i>e;e++){var o=arguments[e];for(var s in o)o.hasOwnProperty(s)&&(t[s]=o[s])}return t},e.selectiveExtend=function(t,e){if(!Array.isArray(t))throw new Error("Array with property names expected as first argument");for(var i=2;i<arguments.length;i++)for(var o=arguments[i],s=0;s<t.length;s++){var n=t[s];o.hasOwnProperty(n)&&(e[n]=o[n])}return e},e.selectiveDeepExtend=function(t,i,o){if(Array.isArray(o))throw new TypeError("Arrays are not supported by deepExtend");for(var s=2;s<arguments.length;s++)for(var n=arguments[s],r=0;r<t.length;r++){var a=t[r];if(n.hasOwnProperty(a))if(o[a]&&o[a].constructor===Object)void 0===i[a]&&(i[a]={}),i[a].constructor===Object?e.deepExtend(i[a],o[a]):i[a]=o[a];else{if(Array.isArray(o[a]))throw new TypeError("Arrays are not supported by deepExtend");i[a]=o[a]}}return i},e.selectiveNotDeepExtend=function(t,i,o){if(Array.isArray(o))throw new TypeError("Arrays are not supported by deepExtend");for(var s in o)if(o.hasOwnProperty(s)&&-1==t.indexOf(s))if(o[s]&&o[s].constructor===Object)void 0===i[s]&&(i[s]={}),i[s].constructor===Object?e.deepExtend(i[s],o[s]):i[s]=o[s];else{if(Array.isArray(o[s]))throw new TypeError("Arrays are not supported by deepExtend");i[s]=o[s]}return i},e.deepExtend=function(t,i,o){if(Array.isArray(i))throw new TypeError("Arrays are not supported by deepExtend");for(var s in i)if(i.hasOwnProperty(s)||o===!0)if(i[s]&&i[s].constructor===Object)void 0===t[s]&&(t[s]={}),t[s].constructor===Object?e.deepExtend(t[s],i[s],o):t[s]=i[s];else{if(Array.isArray(i[s]))throw new TypeError("Arrays are not supported by deepExtend");t[s]=i[s]}return t},e.equalArray=function(t,e){if(t.length!=e.length)return!1;for(var i=0,o=t.length;o>i;i++)if(t[i]!=e[i])return!1;return!0},e.convert=function(t,i){var n;if(void 0===t)return void 0;if(null===t)return null;if(!i)return t;if("string"!=typeof i&&!(i instanceof String))throw new Error("Type must be a string");switch(i){case"boolean":case"Boolean":return Boolean(t);case"number":case"Number":return Number(t.valueOf());case"string":case"String":re
  26. },this.dataSet.on("*",this._onChange),this.colX="x",this.colY="y",this.colZ="z",this.colValue="style",this.colFilter="filter",i[0].hasOwnProperty("filter")&&void 0===this.dataFilter&&(this.dataFilter=new p(t,this.colFilter,this),this.dataFilter.setOnLoadCallback(function(){e.redraw()}));var s=this.style==o.STYLE.BAR||this.style==o.STYLE.BARCOLOR||this.style==o.STYLE.BARSIZE;if(s){if(void 0!==this.defaultXBarWidth)this.xBarWidth=this.defaultXBarWidth;else{var n=this.getDistinctValues(i,this.colX);this.xBarWidth=n[1]-n[0]||1}if(void 0!==this.defaultYBarWidth)this.yBarWidth=this.defaultYBarWidth;else{var r=this.getDistinctValues(i,this.colY);this.yBarWidth=r[1]-r[0]||1}}var d=this.getColumnRange(i,this.colX);s&&(d.min-=this.xBarWidth/2,d.max+=this.xBarWidth/2),this.xMin=void 0!==this.defaultXMin?this.defaultXMin:d.min,this.xMax=void 0!==this.defaultXMax?this.defaultXMax:d.max,this.xMax<=this.xMin&&(this.xMax=this.xMin+1),this.xStep=void 0!==this.defaultXStep?this.defaultXStep:(this.xMax-this.xMin)/5;var l=this.getColumnRange(i,this.colY);s&&(l.min-=this.yBarWidth/2,l.max+=this.yBarWidth/2),this.yMin=void 0!==this.defaultYMin?this.defaultYMin:l.min,this.yMax=void 0!==this.defaultYMax?this.defaultYMax:l.max,this.yMax<=this.yMin&&(this.yMax=this.yMin+1),this.yStep=void 0!==this.defaultYStep?this.defaultYStep:(this.yMax-this.yMin)/5;var c=this.getColumnRange(i,this.colZ);if(this.zMin=void 0!==this.defaultZMin?this.defaultZMin:c.min,this.zMax=void 0!==this.defaultZMax?this.defaultZMax:c.max,this.zMax<=this.zMin&&(this.zMax=this.zMin+1),this.zStep=void 0!==this.defaultZStep?this.defaultZStep:(this.zMax-this.zMin)/5,void 0!==this.colValue){var u=this.getColumnRange(i,this.colValue);this.valueMin=void 0!==this.defaultValueMin?this.defaultValueMin:u.min,this.valueMax=void 0!==this.defaultValueMax?this.defaultValueMax:u.max,this.valueMax<=this.valueMin&&(this.valueMax=this.valueMin+1)}this._setScale()}}},o.prototype._getDataPoints=function(t){var e,i,s,n,r,a,h=[];if(this.style===o.STYLE.GRID||this.style===o.STYLE.SURFACE){var d=[],c=[];for(s=0;s<this.getNumberOfRows(t);s++)e=t[s][this.colX]||0,i=t[s][this.colY]||0,-1===d.indexOf(e)&&d.push(e),-1===c.indexOf(i)&&c.push(i);var u=function(t,e){return t-e};d.sort(u),c.sort(u);var p=[];for(s=0;s<t.length;s++){e=t[s][this.colX]||0,i=t[s][this.colY]||0,n=t[s][this.colZ]||0;var f=d.indexOf(e),m=c.indexOf(i);void 0===p[f]&&(p[f]=[]);var g=new l;g.x=e,g.y=i,g.z=n,r={},r.point=g,r.trans=void 0,r.screen=void 0,r.bottom=new l(e,i,this.zMin),p[f][m]=r,h.push(r)}for(e=0;e<p.length;e++)for(i=0;i<p[e].length;i++)p[e][i]&&(p[e][i].pointRight=e<p.length-1?p[e+1][i]:void 0,p[e][i].pointTop=i<p[e].length-1?p[e][i+1]:void 0,p[e][i].pointCross=e<p.length-1&&i<p[e].length-1?p[e+1][i+1]:void 0)}else for(s=0;s<t.length;s++)a=new l,a.x=t[s][this.colX]||0,a.y=t[s][this.colY]||0,a.z=t[s][this.colZ]||0,void 0!==this.colValue&&(a.value=t[s][this.colValue]||0),r={},r.point=a,r.bottom=new l(a.x,a.y,this.zMin),r.trans=void 0,r.screen=void 0,h.push(r);return h},o.prototype.create=function(){for(;this.containerElement.hasChildNodes();)this.containerElement.removeChild(this.containerElement.firstChild);this.frame=document.createElement("div"),this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas);var t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerHTML="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(t),this.frame.filter=document.createElement("div"),this.frame.filter.style.position="absolute",this.frame.filter.style.bottom="0px",this.frame.filter.style.left="0px",this.frame.filter.style.width="100%",this.frame.appendChild(this.frame.filter);var e=this,i=function(t){e._onMouseDown(t)},o=function(t){e._onTouchStart(t)},s=function(t){e._onWheel(t)},n=function(t){e._onTooltip(t)};d.addEventListener(this.frame.canvas,"keydown",onkeydown),d.addEventListener(this.frame.canvas,"moused
  27. else{var i={};i.column=this.column,i.value=this.values[t];var o=new s(this.data,{filter:function(t){return t[i.column]==i.value}}).get();e=this.graph._getDataPoints(o),this.dataPoints[t]=e}return e},o.prototype.setOnLoadCallback=function(t){this.onLoadCallback=t},o.prototype.selectValue=function(t){if(t>=this.values.length)throw"Error: index out of range";this.index=t,this.value=this.values[t]},o.prototype.loadInBackground=function(t){void 0===t&&(t=0);var e=this.graph.frame;if(t<this.values.length){{this._getDataPoints(t)}void 0===e.progress&&(e.progress=document.createElement("DIV"),e.progress.style.position="absolute",e.progress.style.color="gray",e.appendChild(e.progress));var i=this.getLoadedProgress();e.progress.innerHTML="Loading animation... "+i+"%",e.progress.style.bottom="60px",e.progress.style.left="10px";var o=this;setTimeout(function(){o.loadInBackground(t+1)},10),this.loaded=!1}else this.loaded=!0,void 0!==e.progress&&(e.removeChild(e.progress),e.progress=void 0),this.onLoadCallback&&this.onLoadCallback()},t.exports=o},function(t){function e(t,e){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0}t.exports=e},function(t){function e(t,e,i){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0,this.z=void 0!==i?i:0}e.subtract=function(t,i){var o=new e;return o.x=t.x-i.x,o.y=t.y-i.y,o.z=t.z-i.z,o},e.add=function(t,i){var o=new e;return o.x=t.x+i.x,o.y=t.y+i.y,o.z=t.z+i.z,o},e.avg=function(t,i){return new e((t.x+i.x)/2,(t.y+i.y)/2,(t.z+i.z)/2)},e.crossProduct=function(t,i){var o=new e;return o.x=t.y*i.z-t.z*i.y,o.y=t.z*i.x-t.x*i.z,o.z=t.x*i.y-t.y*i.x,o},e.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},t.exports=e},function(t,e,i){function o(t,e){if(void 0===t)throw"Error: No container element defined";if(this.container=t,this.visible=e&&void 0!=e.visible?e.visible:!0,this.visible){this.frame=document.createElement("DIV"),this.frame.style.width="100%",this.frame.style.position="relative",this.container.appendChild(this.frame),this.frame.prev=document.createElement("INPUT"),this.frame.prev.type="BUTTON",this.frame.prev.value="Prev",this.frame.appendChild(this.frame.prev),this.frame.play=document.createElement("INPUT"),this.frame.play.type="BUTTON",this.frame.play.value="Play",this.frame.appendChild(this.frame.play),this.frame.next=document.createElement("INPUT"),this.frame.next.type="BUTTON",this.frame.next.value="Next",this.frame.appendChild(this.frame.next),this.frame.bar=document.createElement("INPUT"),this.frame.bar.type="BUTTON",this.frame.bar.style.position="absolute",this.frame.bar.style.border="1px solid red",this.frame.bar.style.width="100px",this.frame.bar.style.height="6px",this.frame.bar.style.borderRadius="2px",this.frame.bar.style.MozBorderRadius="2px",this.frame.bar.style.border="1px solid #7F7F7F",this.frame.bar.style.backgroundColor="#E5E5E5",this.frame.appendChild(this.frame.bar),this.frame.slide=document.createElement("INPUT"),this.frame.slide.type="BUTTON",this.frame.slide.style.margin="0px",this.frame.slide.value=" ",this.frame.slide.style.position="relative",this.frame.slide.style.left="-100px",this.frame.appendChild(this.frame.slide);var i=this;this.frame.slide.onmousedown=function(t){i._onMouseDown(t)},this.frame.prev.onclick=function(t){i.prev(t)},this.frame.play.onclick=function(t){i.togglePlay(t)},this.frame.next.onclick=function(t){i.next(t)}}this.onChangeCallback=void 0,this.values=[],this.index=void 0,this.playTimeout=void 0,this.playInterval=1e3,this.playLoop=!0}var s=i(1);o.prototype.prev=function(){var t=this.getIndex();t>0&&(t--,this.setIndex(t))},o.prototype.next=function(){var t=this.getIndex();t<this.values.length-1&&(t++,this.setIndex(t))},o.prototype.playNext=function(){var t=new Date,e=this.getIndex();e<this.values.length-1?(e++,this.setIndex(e)):this.playLoop&&(e=0,this.setIndex(e));var i=new Date,o=i-t,s=Math.max(this.playInterval-o,0),n=this;this.playTimeout=setTimeout(function(){n.playNext()},s)},o.prototype.togglePlay=function(){void 0===this.playTimeout?this.play():this.stop()},o.prototype.play=function(){this.playTimeout||(this.playNext(),th
  28. break;case"hour":this.current.setHours(this.current.getHours()-this.current.getHours()%this.step);break;case"weekday":case"day":this.current.setDate(this.current.getDate()-1-(this.current.getDate()-1)%this.step+1);break;case"month":this.current.setMonth(this.current.getMonth()-this.current.getMonth()%this.step);break;case"year":this.current.setFullYear(this.current.getFullYear()-this.current.getFullYear()%this.step)}},o.prototype.hasNext=function(){return this.current.valueOf()<=this._end.valueOf()},o.prototype.next=function(){var t=this.current.valueOf();if(this.current.getMonth()<6)switch(this.scale){case"millisecond":this.current=new Date(this.current.valueOf()+this.step);break;case"second":this.current=new Date(this.current.valueOf()+1e3*this.step);break;case"minute":this.current=new Date(this.current.valueOf()+1e3*this.step*60);break;case"hour":this.current=new Date(this.current.valueOf()+1e3*this.step*60*60);var e=this.current.getHours();this.current.setHours(e-e%this.step);break;case"weekday":case"day":this.current.setDate(this.current.getDate()+this.step);break;case"month":this.current.setMonth(this.current.getMonth()+this.step);break;case"year":this.current.setFullYear(this.current.getFullYear()+this.step)}else switch(this.scale){case"millisecond":this.current=new Date(this.current.valueOf()+this.step);break;case"second":this.current.setSeconds(this.current.getSeconds()+this.step);break;case"minute":this.current.setMinutes(this.current.getMinutes()+this.step);break;case"hour":this.current.setHours(this.current.getHours()+this.step);break;case"weekday":case"day":this.current.setDate(this.current.getDate()+this.step);break;case"month":this.current.setMonth(this.current.getMonth()+this.step);break;case"year":this.current.setFullYear(this.current.getFullYear()+this.step)}if(1!=this.step)switch(this.scale){case"millisecond":this.current.getMilliseconds()<this.step&&this.current.setMilliseconds(0);break;case"second":this.current.getSeconds()<this.step&&this.current.setSeconds(0);break;case"minute":this.current.getMinutes()<this.step&&this.current.setMinutes(0);break;case"hour":this.current.getHours()<this.step&&this.current.setHours(0);break;case"weekday":case"day":this.current.getDate()<this.step+1&&this.current.setDate(1);break;case"month":this.current.getMonth()<this.step&&this.current.setMonth(0);break;case"year":}this.current.valueOf()==t&&(this.current=new Date(this._end.valueOf())),n.stepOverHiddenDates(this,t)},o.prototype.getCurrent=function(){return this.current},o.prototype.setScale=function(t){t&&"string"==typeof t.scale&&(this.scale=t.scale,this.step=t.step>0?t.step:1,this.autoScale=!1)},o.prototype.setAutoScale=function(t){this.autoScale=t},o.prototype.setMinimumStep=function(t){if(void 0!=t){var e=31104e6,i=2592e6,o=864e5,s=36e5,n=6e4,r=1e3,a=1;1e3*e>t&&(this.scale="year",this.step=1e3),500*e>t&&(this.scale="year",this.step=500),100*e>t&&(this.scale="year",this.step=100),50*e>t&&(this.scale="year",this.step=50),10*e>t&&(this.scale="year",this.step=10),5*e>t&&(this.scale="year",this.step=5),e>t&&(this.scale="year",this.step=1),3*i>t&&(this.scale="month",this.step=3),i>t&&(this.scale="month",this.step=1),5*o>t&&(this.scale="day",this.step=5),2*o>t&&(this.scale="day",this.step=2),o>t&&(this.scale="day",this.step=1),o/2>t&&(this.scale="weekday",this.step=1),4*s>t&&(this.scale="hour",this.step=4),s>t&&(this.scale="hour",this.step=1),15*n>t&&(this.scale="minute",this.step=15),10*n>t&&(this.scale="minute",this.step=10),5*n>t&&(this.scale="minute",this.step=5),n>t&&(this.scale="minute",this.step=1),15*r>t&&(this.scale="second",this.step=15),10*r>t&&(this.scale="second",this.step=10),5*r>t&&(this.scale="second",this.step=5),r>t&&(this.scale="second",this.step=1),200*a>t&&(this.scale="millisecond",this.step=200),100*a>t&&(this.scale="millisecond",this.step=100),50*a>t&&(this.scale="millisecond",this.step=50),10*a>t&&(this.scale="millisecond",this.step=10),5*a>t&&(this.scale="millisecond",this.step=5),a>t&&(this.scale="millisecond",this.step=1)}},o.snap=function(t,e,i){var o=new Date(t.valueOf());if("year"==e){va
  29. }return t},o.prototype._redrawLabels=function(){var t=!1;n.prepareElements(this.DOMelements.lines),n.prepareElements(this.DOMelements.labels);var e=this.options.orientation,i=this.master?this.props.majorCharHeight||10:this.stepPixelsForced,o=new a(this.range.start,this.range.end,i,this.dom.frame.offsetHeight,this.options.customRange[this.options.orientation],0==this.master&&this.options.alignZeros);this.step=o;var s=(this.dom.frame.offsetHeight-o.deadSpace*(this.dom.frame.offsetHeight/o.marginRange))/((o.marginRange-o.deadSpace)/o.step);this.stepPixels=s;var r=this.height/s,h=0;if(0==this.master){s=this.stepPixelsForced,h=Math.round(this.dom.frame.offsetHeight/s-r);for(var d=0;.5*h>d;d++)o.previous();if(r=this.height/s,-1!=this.zeroCrossing&&1==this.options.alignZeros){var l=o.marginEnd/o.step-this.zeroCrossing;if(l>0)for(var d=0;l>d;d++)o.next();else if(0>l)for(var d=0;-l>d;d++)o.previous()}}else r+=.25;this.valueAtZero=o.marginEnd;var c,u=0,p=1;void 0!==this.options.format[e]&&(c=this.options.format[e].decimals),this.maxLabelSize=0;for(var f=0;p<Math.round(r);){o.next(),f=Math.round(p*s),u=p*s;var m=o.isMajor();(this.options.showMinorLabels&&0==m||0==this.master&&1==this.options.showMinorLabels)&&this._redrawLabel(f-2,o.getCurrent(c),e,"yAxis minor",this.props.minorCharHeight),m&&this.options.showMajorLabels&&1==this.master||0==this.options.showMinorLabels&&0==this.master&&1==m?(f>=0&&this._redrawLabel(f-2,o.getCurrent(c),e,"yAxis major",this.props.majorCharHeight),this._redrawLine(f,e,"grid horizontal major",this.options.majorLinesOffset,this.props.majorLineWidth)):this._redrawLine(f,e,"grid horizontal minor",this.options.minorLinesOffset,this.props.minorLineWidth),1==this.master&&0==o.current&&(this.zeroCrossing=p),p++}this.conversionFactor=0==this.master?f/(this.valueAtZero-o.current):this.dom.frame.offsetHeight/o.marginRange;var g=0;void 0!==this.options.title[e]&&void 0!==this.options.title[e].text&&(g=this.props.titleCharHeight);var v=1==this.options.icons?Math.max(this.options.iconWidth,g)+this.options.labelOffsetX+15:g+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-v&&1==this.options.visible?(this.width=this.maxLabelSize+v,this.options.width=this.width+"px",n.cleanupElements(this.DOMelements.lines),n.cleanupElements(this.DOMelements.labels),this.redraw(),t=!0):this.maxLabelSize<this.width-v&&1==this.options.visible&&this.width>this.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+v),this.options.width=this.width+"px",n.cleanupElements(this.DOMelements.lines),n.cleanupElements(this.DOMelements.labels),this.redraw(),t=!0):(n.cleanupElements(this.DOMelements.lines),n.cleanupElements(this.DOMelements.labels),t=!1),t},o.prototype.convertValue=function(t){var e=this.valueAtZero-t,i=e*this.conversionFactor;return i},o.prototype._redrawLabel=function(t,e,i,o,s){var r=n.getDOMElement("div",this.DOMelements.labels,this.dom.frame);r.className=o,r.innerHTML=e,"left"==i?(r.style.left="-"+this.options.labelOffsetX+"px",r.style.textAlign="right"):(r.style.right="-"+this.options.labelOffsetX+"px",r.style.textAlign="left"),r.style.top=t-.5*s+this.options.labelOffsetY+"px",e+="";var a=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize<e.length*a&&(this.maxLabelSize=e.length*a)},o.prototype._redrawLine=function(t,e,i,o,s){if(1==this.master){var r=n.getDOMElement("div",this.DOMelements.lines,this.dom.lineContainer);r.className=i,r.innerHTML="","left"==e?r.style.left=this.width-o+"px":r.style.right=this.width-o+"px",r.style.width=s+"px",r.style.top=t+"px"}},o.prototype._redrawTitle=function(t){if(n.prepareElements(this.DOMelements.title),void 0!==this.options.title[t]&&void 0!==this.options.title[t].text){var e=n.getDOMElement("div",this.DOMelements.title,this.dom.frame);e.className="yAxis title "+t,e.innerHTML=this.options.title[t].text,void 0!==this.options.title[t].style&&s.addCssText(e,this.options.title[t].style),"left"==t?e.style.left=this.props.titleCharHeight+"px":e.style.right=this.props.titleCharHeight+"px",e.style.width=this.height+"px"}n.cleanupElements(this.D
  30. }),{min:i,max:e}},o.itemFromTarget=function(t){for(var e=t.target;e;){if(e.hasOwnProperty("timeline-item"))return e["timeline-item"];e=e.parentNode}return null},o.prototype.groupFromTarget=function(t){for(var e=t.gesture.center.clientY,i=0;i<this.groupIds.length;i++){var o=this.groupIds[i],s=this.groups[o],r=s.dom.foreground,a=n.getAbsoluteTop(r);if(e>a&&e<a+r.offsetHeight)return s;if("top"===this.options.orientation){if(i===this.groupIds.length-1&&e>a)return s}else if(0===i&&e<a+r.offset)return s}return null},o.itemSetFromTarget=function(t){for(var e=t.target;e;){if(e.hasOwnProperty("timeline-itemset"))return e["timeline-itemset"];e=e.parentNode}return null},t.exports=o},function(t,e,i){function o(t,e,i,o){this.body=t,this.defaultOptions={enabled:!0,icons:!0,iconSize:20,iconSpacing:6,left:{visible:!0,position:"top-left"},right:{visible:!0,position:"top-left"}},this.side=i,this.options=s.extend({},this.defaultOptions),this.linegraphOptions=o,this.svgElements={},this.dom={},this.groups={},this.amountOfGroups=0,this._create(),this.setOptions(e)}var s=i(1),n=i(2),r=i(25);o.prototype=new r,o.prototype.clear=function(){this.groups={},this.amountOfGroups=0},o.prototype.addGroup=function(t,e){this.groups.hasOwnProperty(t)||(this.groups[t]=e),this.amountOfGroups+=1},o.prototype.updateGroup=function(t,e){this.groups[t]=e},o.prototype.removeGroup=function(t){this.groups.hasOwnProperty(t)&&(delete this.groups[t],this.amountOfGroups-=1)},o.prototype._create=function(){this.dom.frame=document.createElement("div"),this.dom.frame.className="legend",this.dom.frame.style.position="absolute",this.dom.frame.style.top="10px",this.dom.frame.style.display="block",this.dom.textArea=document.createElement("div"),this.dom.textArea.className="legendText",this.dom.textArea.style.position="relative",this.dom.textArea.style.top="0px",this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="absolute",this.svg.style.top="0px",this.svg.style.width=this.options.iconSize+5+"px",this.svg.style.height="100%",this.dom.frame.appendChild(this.svg),this.dom.frame.appendChild(this.dom.textArea)},o.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},o.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},o.prototype.setOptions=function(t){var e=["enabled","orientation","icons","left","right"];s.selectiveDeepExtend(e,this.options,t)},o.prototype.redraw=function(){var t=0;for(var e in this.groups)this.groups.hasOwnProperty(e)&&(1!=this.groups[e].visible||void 0!==this.linegraphOptions.visibility[e]&&1!=this.linegraphOptions.visibility[e]||t++);if(0==this.options[this.side].visible||0==this.amountOfGroups||0==this.options.enabled||0==t)this.hide();else{if(this.show(),"top-left"==this.options[this.side].position||"bottom-left"==this.options[this.side].position?(this.dom.frame.style.left="4px",this.dom.frame.style.textAlign="left",this.dom.textArea.style.textAlign="left",this.dom.textArea.style.left=this.options.iconSize+15+"px",this.dom.textArea.style.right="",this.svg.style.left="0px",this.svg.style.right=""):(this.dom.frame.style.right="4px",this.dom.frame.style.textAlign="right",this.dom.textArea.style.textAlign="right",this.dom.textArea.style.right=this.options.iconSize+15+"px",this.dom.textArea.style.left="",this.svg.style.right="0px",this.svg.style.left=""),"top-left"==this.options[this.side].position||"top-right"==this.options[this.side].position)this.dom.frame.style.top=4-Number(this.body.dom.center.style.top.replace("px",""))+"px",this.dom.frame.style.bottom="";else{var i=this.body.domProps.center.height-this.body.domProps.centerContainer.height;this.dom.frame.style.bottom=4+i+Number(this.body.dom.center.style.top.replace("px",""))+"px",this.dom.frame.style.top=""}0==this.options.icons?(this.dom.frame.style.width=this.dom.textArea.offsetWidth+10+"px",this.dom.textArea.style.right="",this.dom.textArea.style.left="",this.svg.style.width="0px"):(this.dom.frame.style.width=this.options.iconSize+15+this.dom.textArea.offs
  31. this.constants.nodes.color.background=o.background,this.constants.nodes.color.border=o.border,this.constants.nodes.color.highlight.background=o.highlight.background,this.constants.nodes.color.highlight.border=o.highlight.border,this.constants.nodes.color.hover.background=o.hover.background,this.constants.nodes.color.hover.border=o.hover.border}if(t.groups)for(var s in t.groups)if(t.groups.hasOwnProperty(s)){var r=t.groups[s];this.groups.add(s,r)}if(t.tooltip){for(e in t.tooltip)t.tooltip.hasOwnProperty(e)&&(this.constants.tooltip[e]=t.tooltip[e]);t.tooltip.color&&(this.constants.tooltip.color=n.parseColor(t.tooltip.color))}if("clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new g(this.frame),this.activator.on("change",this._createKeyBinds.bind(this))):this.activator&&(this.activator.destroy(),delete this.activator)),t.labels)throw new Error('Option "labels" is deprecated. Use options "locale" and "locales" instead.');this.canvas._bindHammer(),this._markAllEdgesAsDirty(),this.canvas.setSize(this.constants.width,this.constants.height),1==this.constants.hierarchicalLayout.enabled&&0==this.initializing&&(this._resetLevels(),this._setupHierarchicalLayout()),this.initializing!==!0&&(this.moving=!0,this.start())}},o.prototype._createKeyBinds=function(){},o.prototype.destroy=function(){this.start=function(){},this.redraw=function(){},this.renderTimer=!1,this._cleanupPhysicsConfiguration(),this.keycharm.reset(),this.hammer.dispose(),this.off(),this._recursiveDOMDelete(this.containerElement)},o.prototype._recursiveDOMDelete=function(t){for(;1==t.hasChildNodes();)this._recursiveDOMDelete(t.firstChild),t.removeChild(t.firstChild)},o.prototype._checkShowPopup=function(t){var e,i={left:this._XconvertDOMtoCanvas(t.x),top:this._YconvertDOMtoCanvas(t.y),right:this._XconvertDOMtoCanvas(t.x),bottom:this._YconvertDOMtoCanvas(t.y)},o=void 0===this.popupObj?"":this.popupObj.id,s=!1,n="node";if(void 0==this.popupObj){var r=this.body.nodes,a=[];for(e in r)if(r.hasOwnProperty(e)){var h=r[e];h.isOverlappingWith(i)&&void 0!==h.getTitle()&&a.push(e)}a.length>0&&(this.popupObj=this.body.nodes[a[a.length-1]],s=!0)}if(void 0===this.popupObj&&0==s){var d=this.body.edges,l=[];for(e in d)if(d.hasOwnProperty(e)){var c=d[e];c.connected===!0&&void 0!==c.getTitle()&&c.isOverlappingWith(i)&&l.push(e)}l.length>0&&(this.popupObj=this.body.edges[l[l.length-1]],n="edge")}this.popupObj?this.popupObj.id!=o&&(void 0===this.popup&&(this.popup=new f(this.frame,this.constants.tooltip)),this.popup.popupTargetType=n,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(t.x+3,t.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show()):this.popup&&this.popup.hide()},o.prototype._checkHidePopup=function(t){var e={left:this._XconvertDOMtoCanvas(t.x),top:this._YconvertDOMtoCanvas(t.y),right:this._XconvertDOMtoCanvas(t.x),bottom:this._YconvertDOMtoCanvas(t.y)},i=!1;if("node"==this.popup.popupTargetType){if(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(e),i===!0){var o=this._getNodeAt(t);i=o.id==this.popup.popupTargetId}}else null===this._getNodeAt(t)&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(e));i===!1&&(this.popupObj=void 0,this.popup.hide())},o.prototype._setNodes=function(t){var e=this.body.data.nodes;if(t instanceof r||t instanceof a)this.body.data.nodes=t;else if(Array.isArray(t))this.body.data.nodes=new r,this.body.data.nodes.add(t);else{if(t)throw new TypeError("Array or DataSet expected");this.body.data.nodes=new r}if(e&&n.forEach(this.nodesListeners,function(t,i){e.off(i,t)}),this.body.nodes={},this.body.data.nodes){var i=this;n.forEach(this.nodesListeners,function(t,e){i.body.data.nodes.on(e,t)});var o=this.body.data.nodes.getIds();this._addNodes(o)}this._updateSelection()},o.prototype._addNodes=function(t){for(var e,i=0,o=t.length;o>i;i++){e=t[i];var s=this.body.data.nodes.get(e),n=new u(s,this.images,this.groups,this.constants);if(this.body.nodes[e]=n,!(0!=n.xFixed&&0!=n.yFixed||null!==n.x&&null!==n.y)){var r=1*t.length+10,a=2*Math.PI*Math.random();0==n.xFixed&&(n.x=r*Math.cos(a)),0==n.yFix
  32. }return e},o.prototype.getControlNodeToPosition=function(t){var e;if(1==this.options.smoothCurves.enabled)e=this._findBorderPosition(!1,t);else{var i=Math.atan2(this.to.y-this.from.y,this.to.x-this.from.x),o=this.to.x-this.from.x,s=this.to.y-this.from.y,n=Math.sqrt(o*o+s*s),r=this.to.distanceToBorder(t,i),a=(n-r)/n;e={},e.x=(1-a)*this.from.x+a*this.to.x,e.y=(1-a)*this.from.y+a*this.to.y}return e},t.exports=o},function(t,e,i){function o(){this.clear(),this.defaultIndex=0,this.groupsArray=[],this.groupIndex=0,this.useDefaultGroups=!0}i(1);o.DEFAULT=[{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"}}],o.prototype.clear=function(){this.groups={},this.groups.length=function(){var t=0;for(var e in this)this.hasOwnProperty(e)&&t++;return t}},o.prototype.get=function(t){var e=this.groups[t];if(void 0==e)if(this.useDefaultGroups===!1&&this.groupsArray.length>0){var i=this.groupIndex%this.groupsArray.length;this.groupIndex++,e={},e.color=this.groups[this.groupsArray[i]],this.groups[t]=e}else{var i=this.defaultIndex%o.DEFAULT.length;this.defaultIndex++,e={},e.color=o.DEFAULT[i],this.groups[t]=e}return e},o.prototype.add=function(t,e){return this.groups[t]=e,this.groupsArray.push(t),e},t.exports=o},function(t){function e(){this.images={},this.imageBroken={},this.callback=void 0}e.prototype.setOnloadCallback=function(t){this.callback=t},e.prototype.load=function(t,e){var i=this.images[t];if(void 0===i){var o=this;i=
  33. var i=this;this.on("change",function(t){t&&1==t.queue?i._redrawTimer||(i._redrawTimer=setTimeout(function(){i._redrawTimer=null,i._redraw()},0)):i._redraw()}),this.hammer=new n(this.dom.root,{touchAction:"pan-y"}),this.hammer.get("pinch").set({enable:!0}),this.listeners={};var o=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];if(o.forEach(function(t){var e=function(e){i.isActive()&&i.emit(t,e)};i.hammer.on(t,e),i.listeners[t]=e}),this.hammer.on("hammer.input",function(t){t.isFirst&&i.isActive()&&i.emit("touch",t)}.bind(this)),this.dom.root.addEventListener("mousewheel",e),this.dom.root.addEventListener("DOMMouseScroll",e),this.props={root:{},background:{},centerContainer:{},leftContainer:{},rightContainer:{},center:{},left:{},right:{},top:{},bottom:{},border:{},scrollTop:0,scrollTopMin:0},this.redrawCount=0,!t)throw new Error("No container provided");t.appendChild(this.dom.root)},o.prototype.setOptions=function(t){if(t){var e=["width","height","minHeight","maxHeight","autoResize","start","end","orientation","clickToUse","dataAttributes","hiddenDates"];r.selectiveExtend(e,this.options,t),"hiddenDates"in this.options&&h.convertHiddenOptions(this.body,this.options.hiddenDates),"clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new a(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),this._initAutoResize()}if(this.components.forEach(function(e){return e.setOptions(t)}),t&&t.order)throw new Error("Option order is deprecated. There is no replacement for this feature.");this._redraw()},o.prototype.isActive=function(){return!this.activator||this.activator.active},o.prototype.destroy=function(){this.clear(),this.off(),this._stopAutoResize(),this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root),this.dom=null,this.activator&&(this.activator.destroy(),delete this.activator);for(var t in this.listeners)this.listeners.hasOwnProperty(t)&&delete this.listeners[t];this.listeners=null,this.hammer=null,this.components.forEach(function(t){return t.destroy()}),this.body=null},o.prototype.setCustomTime=function(t,e){if(!this.customTime)throw new Error("Cannot get custom time: Custom time bar is not enabled");var i=e||0;this.components.forEach(function(e){e instanceof d&&e.options.id===i&&e.setCustomTime(t)})},o.prototype.getCustomTime=function(t){if(!this.customTime)throw new Error("Cannot get custom time: Custom time bar is not enabled");var e=t||0,i=this.customTime.getCustomTime();return this.components.forEach(function(t){t instanceof d&&t.options.id===e&&(i=t.getCustomTime())}),i},o.prototype.addCustomTime=function(t,e){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");if(void 0===t)throw new Error("Time parameter for the custom bar must be provided");var i,o,s,n=r.convert(t,"Date").valueOf();return this.customBarIds&&this.customBarIds.constructor===Array||(this.customBarIds=[0]),void 0===e?(i=this.customBarIds.filter(function(t){return r.isNumber(t)}),s=i.length>0?Math.max.apply(null,i)+1:1):(this.customBarIds.forEach(function(t){if(t===e)throw new Error("Custom time ID already exists")}),s=e),this.customBarIds.push(s),o=new d(this.body,{showCustomTime:!0,time:n,id:s}),this.components.push(o),this.redraw(),s},o.prototype.removeCustomTime=function(t){var e=this;this.components.forEach(function(i,o,s){i instanceof d&&i.options.id===t&&0!==i.options.id&&(e.customBarIds.splice(e.customBarIds.indexOf(t),1),s.splice(o,1),i.destroy())})},o.prototype.getVisibleItems=function(){return this.itemSet&&this.itemSet.getVisibleItems()||[]},o.prototype.clear=function(t){(!t||t.items)&&this.setItems(null),(!t||t.groups)&&this.setGroups(null),(!t||t.options)&&(this.components.forEach(function(t){return t.setOptions(t.defaultOptions)}),this.setOptions(this.defaultOptions))},o.prototype.fit=function(t){var e=this._getDataRange();if(null!==e.start||null!==e.end){var i=t&&void 0!==t.animate?t.animate:!0;this.range.setRange(e.start,e.end,i)}},o.prototype._getDataRange=function(){var t=this.getItemRange(),e=t.min,i=t.max;if(null!=e&&null!=i){va
  34. },function(t,e,i){var o=function(t,e,i){e&&Object.defineProperties(t,e),i&&Object.defineProperties(t.prototype,i)},s=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},n=i(1),r=function(){function t(e){s(this,t),this.body=e,this.clusteredNodes={}}return o(t,null,{clusterByConnectionCount:{value:function(t,e){void 0===t?t=this._getHubSize():"object"==tyepof(t)&&(e=this._checkOptions(t),t=this._getHubSize());for(var i=[],o=0;o<this.body.nodeIndices.length;o++){var s=this.body.nodes[this.body.nodeIndices[o]];s.edges.length>=t&&i.push(s.id)}for(var o=0;o<i.length;o++){var s=this.body.nodes[i[o]];this.clusterByConnection(s,e,{},{},!0)}this.body.emitter.emit("_dataChanged")},writable:!0,configurable:!0},clusterByNodeData:{value:function(){var t=void 0===arguments[0]?{}:arguments[0],e=void 0===arguments[1]?!1:arguments[1];if(void 0===t.joinCondition)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");t=this._checkOptions(t);for(var i={},o={},s=0;s<this.body.nodeIndices.length;s++){var n=this.body.nodeIndices[s],r=this._cloneOptions(n);1==t.joinCondition(r)&&(i[n]=this.body.nodes[n])}this._cluster(i,o,t,e)},writable:!0,configurable:!0},clusterOutliers:{value:function(t,e){t=this._checkOptions(t);for(var i=[],o=0;o<this.body.nodeIndices.length;o++){var s={},n={},r=this.body.nodeIndices[o];if(1==this.body.nodes[r].edges.length){var a=this.body.nodes[r].edges[0],h=this._getConnectedId(a,r);if(h!=r){if(void 0===t.joinCondition)s[r]=this.body.nodes[r],s[h]=this.body.nodes[h];else{var d=this._cloneOptions(r);1==t.joinCondition(d)&&(s[r]=this.body.nodes[r]),d=this._cloneOptions(h),1==t.joinCondition(d)&&(s[h]=this.body.nodes[h])}i.push({nodes:s,edges:n})}}}for(var o=0;o<i.length;o++)this._cluster(i[o].nodes,i[o].edges,t,!0);e!==!0&&this.body.emitter.emit("_dataChanged")},writable:!0,configurable:!0},clusterByConnection:{value:function(t,e,i){if(void 0===t)throw new Error("No nodeId supplied to clusterByConnection!");if(void 0===this.body.nodes[t])throw new Error("The nodeId given to clusterByConnection does not exist!");var o=this.body.nodes[t];e=this._checkOptions(e,o),void 0===e.clusterNodeProperties.x&&(e.clusterNodeProperties.x=o.x,e.clusterNodeProperties.allowedToMoveX=!o.xFixed),void 0===e.clusterNodeProperties.y&&(e.clusterNodeProperties.y=o.y,e.clusterNodeProperties.allowedToMoveY=!o.yFixed);var s={},n={},r=o.id,a=this._cloneOptions(r);s[r]=o;for(var h=0;h<o.edges.length;h++){var d=o.edges[h],l=this._getConnectedId(d,r);if(l!==r)if(void 0===e.joinCondition)n[d.id]=d,s[l]=this.body.nodes[l];else{var c=this._cloneOptions(l);1==e.joinCondition(a,c)&&(n[d.id]=d,s[l]=this.body.nodes[l])}else n[d.id]=d}this._cluster(s,n,e,i)},writable:!0,configurable:!0},_cloneOptions:{value:function(t,e){var i={};return void 0===e||"node"==e?(n.deepExtend(i,this.body.nodes[t].options,!0),n.deepExtend(i,this.body.nodes[t].properties,!0),i.amountOfConnections=this.body.nodes[t].edges.length):n.deepExtend(i,this.body.edges[t].properties,!0),i},writable:!0,configurable:!0},_createClusterEdges:{value:function(t,e,i,o){for(var s,r,a,h=Object.keys(t),d=0;d<h.length;d++){r=h[d],a=t[r];for(var l=0;l<a.edges.length;l++){s=a.edges[l],e[s.id]=s;var c=s.toId,u=!0;if(s.toId!=r?(c=s.toId,u=!0):s.fromId!=r&&(c=s.fromId,u=!1),void 0===t[c]){var p=this._cloneOptions(s.id,"edge");n.deepExtend(p,o.clusterEdgeProperties),u===!0?(p.from=o.clusterNodeProperties.id,p.to=c):(p.from=c,p.to=o.clusterNodeProperties.id),p.id="clusterEdge:"+n.randomUUID(),i.push(this.body.functions.createEdge(p))}}}},writable:!0,configurable:!0},_checkOptions:{value:function(){var t=void 0===arguments[0]?{}:arguments[0];return void 0===t.clusterEdgeProperties&&(t.clusterEdgeProperties={}),void 0===t.clusterNodeProperties&&(t.clusterNodeProperties={}),t},writable:!0,configurable:!0},_cluster:{value:function(t,e,i){var o=void 0===arguments[3]?!1:arguments[3];if(0!=Object.keys(t).length){void 0===i.clusterNodeProperties.id&&(i.clusterNodeProperties.id="cluster:"+n.randomUUID());var s=i.clusterNodeProperties.id,
  35. }function b(t,e){for(var i in e)a(e,i)&&(t[i]=e[i]);return a(e,"toString")&&(t.toString=e.toString),a(e,"valueOf")&&(t.valueOf=e.valueOf),t}function w(t,e){var i,o,s;if("undefined"!=typeof e._isAMomentObject&&(t._isAMomentObject=e._isAMomentObject),"undefined"!=typeof e._i&&(t._i=e._i),"undefined"!=typeof e._f&&(t._f=e._f),"undefined"!=typeof e._l&&(t._l=e._l),"undefined"!=typeof e._strict&&(t._strict=e._strict),"undefined"!=typeof e._tzm&&(t._tzm=e._tzm),"undefined"!=typeof e._isUTC&&(t._isUTC=e._isUTC),"undefined"!=typeof e._offset&&(t._offset=e._offset),"undefined"!=typeof e._pf&&(t._pf=e._pf),"undefined"!=typeof e._locale&&(t._locale=e._locale),He.length>0)for(i in He)o=He[i],s=e[o],"undefined"!=typeof s&&(t[o]=s);return t}function x(t){return 0>t?Math.ceil(t):Math.floor(t)}function _(t,e,i){for(var o=""+Math.abs(t),s=t>=0;o.length<e;)o="0"+o;return(s?i?"+":"":"-")+o}function M(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function D(t,e){var i;return e=W(e,t),t.isBefore(e)?i=M(t,e):(i=M(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i}function O(t,e){return function(i,o){var s,n;return null===o||isNaN(+o)||(c(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),n=i,i=o,o=n),i="string"==typeof i?+i:i,s=Se.duration(i,o),S(this,s,t),this}}function S(t,e,i,o){var s=e._milliseconds,n=e._days,r=e._months;o=null==o?!0:o,s&&t._d.setTime(+t._d+s*i),n&&we(t,"Date",be(t,"Date")+n*i),r&&ye(t,be(t,"Month")+r*i),o&&Se.updateOffset(t,n||r)}function C(t){return"[object Array]"===Object.prototype.toString.call(t)}function T(t){return"[object Date]"===Object.prototype.toString.call(t)||t instanceof Date}function E(t,e,i){var o,s=Math.min(t.length,e.length),n=Math.abs(t.length-e.length),r=0;for(o=0;s>o;o++)(i&&t[o]!==e[o]||!i&&I(t[o])!==I(e[o]))&&r++;return r+n}function k(t){if(t){var e=t.toLowerCase().replace(/(.)s$/,"$1");t=gi[t]||vi[e]||e}return t}function N(t){var e,i,o={};for(i in t)a(t,i)&&(e=k(i),e&&(o[e]=t[i]));return o}function L(t){var e,i;if(0===t.indexOf("week"))e=7,i="day";else{if(0!==t.indexOf("month"))return;e=12,i="month"}Se[t]=function(o,s){var r,a,h=Se._locale[t],d=[];if("number"==typeof o&&(s=o,o=n),a=function(t){var e=Se().utc().set(i,t);return h.call(Se._locale,e,o||"")},null!=s)return a(s);for(r=0;e>r;r++)d.push(a(r));return d}}function I(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=e>=0?Math.floor(e):Math.ceil(e)),i}function P(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}function A(t,e,i){return fe(Se([t,11,31+e-i]),e,i).week}function z(t){return F(t)?366:365}function F(t){return t%4===0&&t%100!==0||t%400===0}function R(t){var e;t._a&&-2===t._pf.overflow&&(e=t._a[Pe]<0||t._a[Pe]>11?Pe:t._a[Ae]<1||t._a[Ae]>P(t._a[Ie],t._a[Pe])?Ae:t._a[ze]<0||t._a[ze]>24||24===t._a[ze]&&(0!==t._a[Fe]||0!==t._a[Re]||0!==t._a[Be])?ze:t._a[Fe]<0||t._a[Fe]>59?Fe:t._a[Re]<0||t._a[Re]>59?Re:t._a[Be]<0||t._a[Be]>999?Be:-1,t._pf._overflowDayOfYear&&(Ie>e||e>Ae)&&(e=Ae),t._pf.overflow=e)}function B(t){return null==t._isValid&&(t._isValid=!isNaN(t._d.getTime())&&t._pf.overflow<0&&!t._pf.empty&&!t._pf.invalidMonth&&!t._pf.nullInput&&!t._pf.invalidFormat&&!t._pf.userInvalidated,t._strict&&(t._isValid=t._isValid&&0===t._pf.charsLeftOver&&0===t._pf.unusedTokens.length&&t._pf.bigHour===n)),t._isValid}function Y(t){return t?t.toLowerCase().replace("_","-"):t}function H(t){for(var e,i,o,s,n=0;n<t.length;){for(s=Y(t[n]).split("-"),e=s.length,i=Y(t[n+1]),i=i?i.split("-"):null;e>0;){if(o=j(s.slice(0,e).join("-")))return o;if(i&&i.length>=e&&E(s,i,!0)>=e-1)break;e--}n++}return null}function j(t){var e=null;if(!Ye[t]&&je)try{e=Se.locale(),!function(){var t=new Error('Cannot find module "./locale"');throw t.code="MODULE_NOT_FOUND",t}(),Se.locale(e)}catch(i){}return Ye[t]}function W(t,e){var i,o;return e._isUTC?(i=e.clone(),o=(Se.isMoment(t)||T(t)?+t:+Se(t))-+i,i._d.setTime(+i._d+o),Se.updateOffset(i,!1),i):Se(t).local()}function G(t){return t.matc
  36. },localeData:function(){return this._locale},toJSON:function(){return this.toISOString()}}),Se.duration.fn.toString=Se.duration.fn.toISOString;for(Te in mi)a(mi,Te)&&De(Te.toLowerCase());Se.duration.fn.asMilliseconds=function(){return this.as("ms")},Se.duration.fn.asSeconds=function(){return this.as("s")},Se.duration.fn.asMinutes=function(){return this.as("m")},Se.duration.fn.asHours=function(){return this.as("h")},Se.duration.fn.asDays=function(){return this.as("d")},Se.duration.fn.asWeeks=function(){return this.as("weeks")},Se.duration.fn.asMonths=function(){return this.as("M")},Se.duration.fn.asYears=function(){return this.as("y")},Se.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,i=1===I(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+i}}),je?s.exports=Se:(o=function(t,e,i){return i.config&&i.config()&&i.config().noGlobal===!0&&(ke.moment=Ce),Se}.call(e,i,e,s),!(o!==n&&(s.exports=o)),Oe(!0))}).call(this)}).call(e,function(){return this}(),i(79)(t))},function(t,e){var i,o,s;!function(n){o=[],i=n,s="function"==typeof i?i.apply(e,o):i,!(void 0!==s&&(t.exports=s))}(function(){var t=null;return function e(i){function o(t){return t.match(/[^ ]+/g)}function s(e){if("hammer.input"!==e.type){if(e.srcEvent._handled&&e.srcEvent._handled[e.type])return;e.srcEvent._handled={},e.srcEvent._handled[e.type]=!0}var i=!1;e.stopPropagation=function(){i=!0},e.firstTarget=t;for(var o=t;o&&!i;){var s=o.hammer&&o.hammer._handlers[e.type];if(s)for(var n=0;n<s.length&&!i;n++)s[n](e);o=o.parentNode}}if(i.Manager){var n=i,r=function(t,i){return e(new n(t,i))};return n.extend(r,n),r.Manager=function(t,i){return e(new n.Manager(t,i))},r}var a=i.element;return a.hammer=i,i._on=i.on,i._off=i.off,i._emit=i.emit,i._destroy=i.destroy,i._handlers={},i._on("hammer.input",function(e){e.isFirst&&(t=e.target)}),i.on=function(t,e){return o(t).forEach(function(t){var o=i._handlers[t];o||(i._handlers[t]=o=[],i._on(t,s)),o.push(e)}),i},i.off=function(t,e){return o(t).forEach(function(t){var o=i._handlers[t];o&&(o=e?o.filter(function(t){return t!==e}):[],o.length>0?i._handlers[t]=o:(i._off(t,s),delete i._handlers[t]))}),i},i.emit=function(e,o){t=o.target,i._emit(e,o)},i.destroy=function(){var t=i.element;delete t.hammer,i._handlers={},i._destroy()},i}})},function(t,e,i){var o;!function(s,n,r,a){function h(t,e,i){return setTimeout(f(t,i),e)}function d(t,e,i){return Array.isArray(t)?(l(t,i[e],i),!0):!1}function l(t,e,i){var o;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==a)for(o=0;o<t.length;)e.call(i,t[o],o,t),o++;else for(o in t)t.hasOwnProperty(o)&&e.call(i,t[o],o,t)}function c(t,e,i){for(var o=Object.keys(e),s=0;s<o.length;)(!i||i&&t[o[s]]===a)&&(t[o[s]]=e[o[s]]),s++;return t}function u(t,e){return c(t,e,!0)}function p(t,e,i){var o,s=e.prototype;o=t.prototype=Object.create(s),o.constructor=t,o._super=s,i&&c(o,i)}function f(t,e){return function(){return t.apply(e,arguments)}}function m(t,e){return typeof t==fe?t.apply(e?e[0]||a:a,e):t}function g(t,e){return t===a?e:t}function v(t,e,i){l(x(e),function(e){t.addEventListener(e,i,!1)})}function y(t,e,i){l(x(e),function(e){t.removeEventListener(e,i,!1)})}function b(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function w(t,e){return t.indexOf(e)>-1}function x(t){return t.trim().split(/\s+/g)}function _(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;o<t.length;){if(i&&t[o][i]==e||!i&&t[o]===e)return o;o++}return-1}function M(t){return Array.prototype.slice.call(t,0)}function D(t,e,i){for(var o=[],s=[],n=0;n<t.length;){var r=e?t[n][e]:t[n];_(s,r)<0&&o.push(t[n]),s[n]=r,n++}return i&&(o=e?o.sort(function(t,i){return t[e]>i[e]}):o.sort()),o}function O(t,e){for(var i,o,s=e[0].toUpperCase()+e.slice(1),n=0;n<ue.length;){if(i=ue[n],o=i?i+s:e,o in t)return o;n++}return a}function S(){return ye++}function C(t){var e=t.ownerDocument;return e.defaultView||e.parentWindow}function T(t,e){var i=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){m(t.options.enable,[t])&&i.handler(e)},this.in
  37. e.pointer={DOM:{x:t.x,y:t.y},canvas:this.canvas.DOMtoCanvas(t)},this.body.emitter.emit("click",e)},writable:!0,configurable:!0},selectObject:{value:function(t){var e=this._getNodeAt(t);return null!=e?this.options.selectConnectedEdges===!0&&this._selectConnectedEdges(e):e=this._getEdgeAt(t),null!==e&&(e.select(),this._addToSelection(e),this.body.emitter.emit("selected",this.getSelection())),e},writable:!0,configurable:!0},_getNodesOverlappingWith:{value:function(t,e){var i=this.body.nodes;for(var o in i)i.hasOwnProperty(o)&&i[o].isOverlappingWith(t)&&e.push(o)},writable:!0,configurable:!0},_getAllNodesOverlappingWith:{value:function(t){var e=[];return this._getNodesOverlappingWith(t,e),e},writable:!0,configurable:!0},_pointerToPositionObject:{value:function(t){var e=this.canvas.DOMtoCanvas(t);return{left:e.x,top:e.y,right:e.x,bottom:e.y}},writable:!0,configurable:!0},_getNodeAt:{value:function(t){var e=this._pointerToPositionObject(t),i=this._getAllNodesOverlappingWith(e);return i.length>0?this.body.nodes[i[i.length-1]]:null},writable:!0,configurable:!0},_getEdgesOverlappingWith:{value:function(t,e){var i=this.body.edges;for(var o in i)i.hasOwnProperty(o)&&i[o].isOverlappingWith(t)&&e.push(o)},writable:!0,configurable:!0},_getAllEdgesOverlappingWith:{value:function(t){var e=[];return this._getEdgesOverlappingWith(t,e),e},writable:!0,configurable:!0},_getEdgeAt:{value:function(t){var e=this._pointerToPositionObject(t),i=this._getAllEdgesOverlappingWith(e);return i.length>0?this.body.edges[i[i.length-1]]:null},writable:!0,configurable:!0},_addToSelection:{value:function(t){t instanceof n?this.selectionObj.nodes[t.id]=t:this.selectionObj.edges[t.id]=t},writable:!0,configurable:!0},_addToHover:{value:function(t){t instanceof n?this.hoverObj.nodes[t.id]=t:this.hoverObj.edges[t.id]=t},writable:!0,configurable:!0},_removeFromSelection:{value:function(t){t instanceof n?delete this.selectionObj.nodes[t.id]:delete this.selectionObj.edges[t.id]},writable:!0,configurable:!0},_unselectAll:{value:function(){var t=void 0===arguments[0]?!1:arguments[0];for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&this.selectionObj.nodes[e].unselect();for(var i in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(i)&&this.selectionObj.edges[i].unselect();this.selectionObj={nodes:{},edges:{}},0==t&&this.body.emitter.emit("select",this.getSelection())},writable:!0,configurable:!0},_getSelectedNodeCount:{value:function(){var t=0;for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&(t+=1);return t},writable:!0,configurable:!0},_getSelectedNode:{value:function(){for(var t in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(t))return this.selectionObj.nodes[t];return null},writable:!0,configurable:!0},_getSelectedEdge:{value:function(){for(var t in this.selectionObj.edges)if(this.selectionObj.edges.hasOwnProperty(t))return this.selectionObj.edges[t];return null},writable:!0,configurable:!0},_getSelectedEdgeCount:{value:function(){var t=0;for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&(t+=1);return t},writable:!0,configurable:!0},_getSelectedObjectCount:{value:function(){var t=0;for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&(t+=1);for(var i in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(i)&&(t+=1);return t},writable:!0,configurable:!0},_selectionIsEmpty:{value:function(){for(var t in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(t))return!1;for(var e in this.selectionObj.edges)if(this.selectionObj.edges.hasOwnProperty(e))return!1;return!0},writable:!0,configurable:!0},_clusterInSelection:{value:function(){for(var t in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(t)&&this.selectionObj.nodes[t].clusterSize>1)return!0;return!1},writable:!0,configurable:!0},_selectConnectedEdges:{value:function(t){for(var e=0;e<t.edges.length;e++){var i=t.edges[e];i.select(),this._addToSelection(i)}},writable:!0,configurable:!0},_hoverConnectedEdges:{value:function(t
  38. this.navigationHammers=[]}this._navigationReleaseOverload=function(){},this.navigationDOM&&this.navigationDOM.wrapper&&this.navigationDOM.wrapper.parentNode&&this.navigationDOM.wrapper.parentNode.removeChild(this.navigationDOM.wrapper)},e._loadNavigationElements=function(){this._cleanNavigation(),this.navigationDOM={};var t=["up","down","left","right","zoomIn","zoomOut","zoomExtends"],e=["_moveUp","_moveDown","_moveLeft","_moveRight","_zoomIn","_zoomOut","_zoomExtent"];this.navigationDOM.wrapper=document.createElement("div"),this.frame.appendChild(this.navigationDOM.wrapper);for(var i=0;i<t.length;i++){this.navigationDOM[t[i]]=document.createElement("div"),this.navigationDOM[t[i]].className="network-navigation "+t[i],this.navigationDOM.wrapper.appendChild(this.navigationDOM[t[i]]);var s=o(this.navigationDOM[t[i]],{prevent_default:!0});s.on("touch",this[e[i]].bind(this)),this.navigationHammers.push(s)}this._navigationReleaseOverload=this._stopMovement},e._zoomExtent=function(t){this.zoomExtent({duration:700}),t.stopPropagation()},e._stopMovement=function(){this._xStopMoving(),this._yStopMoving(),this._stopZoom()},e._moveUp=function(t){this.yIncrement=this.constants.keyboard.speed.y,this.start(),t.preventDefault()},e._moveDown=function(t){this.yIncrement=-this.constants.keyboard.speed.y,this.start(),t.preventDefault()},e._moveLeft=function(t){this.xIncrement=this.constants.keyboard.speed.x,this.start(),t.preventDefault()},e._moveRight=function(t){this.xIncrement=-this.constants.keyboard.speed.y,this.start(),t.preventDefault()},e._zoomIn=function(t){this.zoomIncrement=this.constants.keyboard.speed.zoom,this.start(),t.preventDefault()},e._zoomOut=function(t){this.zoomIncrement=-this.constants.keyboard.speed.zoom,this.start(),t.preventDefault()},e._stopZoom=function(t){this.zoomIncrement=0,t&&t.preventDefault()},e._yStopMoving=function(t){this.yIncrement=0,t&&t.preventDefault()},e._xStopMoving=function(t){this.xIncrement=0,t&&t.preventDefault()}},function(t,e){e._resetLevels=function(){for(var t in this.body.nodes)if(this.body.nodes.hasOwnProperty(t)){var e=this.body.nodes[t];0==e.preassignedLevel&&(e.level=-1,e.hierarchyEnumerated=!1)}},e._setupHierarchicalLayout=function(){if(1==this.constants.hierarchicalLayout.enabled&&this.nodeIndices.length>0){var t,e,i=0,o=!1,s=!1;for(e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&(t=this.body.nodes[e],-1!=t.level?o=!0:s=!0,i<t.edges.length&&(i=t.edges.length));if(1==s&&1==o)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");this._changeConstants(),1==s&&("hubsize"==this.constants.hierarchicalLayout.layout?this._determineLevels(i):this._determineLevelsDirected(!1));var n=this._getDistribution();this._placeNodesByHierarchy(n)}},e._placeNodesByHierarchy=function(t){var e,i;for(var o in t)if(t.hasOwnProperty(o))for(e in t[o].nodes)t[o].nodes.hasOwnProperty(e)&&(i=t[o].nodes[e],"UD"==this.constants.hierarchicalLayout.direction||"DU"==this.constants.hierarchicalLayout.direction?i.xFixed&&(i.x=t[o].minPos,i.xFixed=!1,t[o].minPos+=t[o].nodeSpacing):i.yFixed&&(i.y=t[o].minPos,i.yFixed=!1,t[o].minPos+=t[o].nodeSpacing),this._placeBranchNodes(i.edges,i.id,t,i.level));this._stabilize()},e._getDistribution=function(){var t,e,i,o={};for(t in this.body.nodes)this.body.nodes.hasOwnProperty(t)&&(e=this.body.nodes[t],e.xFixed=!0,e.yFixed=!0,"UD"==this.constants.hierarchicalLayout.direction||"DU"==this.constants.hierarchicalLayout.direction?e.y=this.constants.hierarchicalLayout.levelSeparation*e.level:e.x=this.constants.hierarchicalLayout.levelSeparation*e.level,void 0===o[e.level]&&(o[e.level]={amount:0,nodes:{},minPos:0,nodeSpacing:0}),o[e.level].amount+=1,o[e.level].nodes[t]=e);var s=0;for(i in o)o.hasOwnProperty(i)&&s<o[i].amount&&(s=o[i].amount);for(i in o)o.hasOwnProperty(i)&&(o[i].nodeSpacing=(s+1)*this.constants.hierarchicalLayout.nodeSpacing,o[i].nodeSpacing/=o[i].amount+1,o[i].minPos=o[i].nodeSpacing-.5*(o[i].amount+1)*o[i].nodeSpacing);return o},e._determineLevels=function(t){var e,i;for(e in this.
  39. //# sourceMappingURL=vis.map