"use strict";!function(t,e){"object"==typeofexports&&"object"==typeofmodule?module.exports=e():"function"==typeofdefine&&define.amd?define([],e):"object"==typeofexports?exports.vis=e():t.vis=e()}(this,function(){returnfunction(t){functione(o){if(i[o])returni[o].exports;varn=i[o]={exports:{},id:o,loaded:!1};returnt[o].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}vari={};returne.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){varo=i(1);o.extend(e,i(7)),o.extend(e,i(24)),o.extend(e,i(60))},function(t,e,i){varo="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"==typeofSymbol&&t.constructor===Symbol?"symbol":typeoft},n=i(2),s=i(6);e.isNumber=function(t){returntinstanceofNumber||"number"==typeoft},e.recursiveDOMDelete=function(t){if(t)for(;t.hasChildNodes()===!0;)e.recursiveDOMDelete(t.firstChild),t.removeChild(t.firstChild)},e.giveRange=function(t,e,i,o){if(e==t)return.5;varn=1/(e-t);returnMath.max(0,(o-t)*n)},e.isString=function(t){returntinstanceofString||"string"==typeoft},e.isDate=function(t){if(tinstanceofDate)return!0;if(e.isString(t)){vari=r.exec(t);if(i)return!0;if(!isNaN(Date.parse(t)))return!0}return!1},e.randomUUID=function(){returns.v4()},e.assignAllKeys=function(t,e){for(variint)t.hasOwnProperty(i)&&"object"!==o(t[i])&&(t[i]=e)},e.fillIfDefined=function(t,i){varn=arguments.length<=2||void0===arguments[2]?!1:arguments[2];for(varsint)void0!==i[s]&&("object"!==o(i[s])?void0!==i[s]&&null!==i[s]||void0===t[s]||n!==!0?t[s]=i[s]:deletet[s]:"object"===o(t[s])&&e.fillIfDefined(t[s],i[s],n))},e.protoExtend=function(t,e){for(vari=1;i<arguments.length;i++){varo=arguments[i];for(varnino)t[n]=o[n]}returnt},e.extend=function(t,e){for(vari=1;i<arguments.length;i++){varo=arguments[i];for(varnino)o.hasOwnProperty(n)&&(t[n]=o[n])}returnt},e.selectiveExtend=function(t,e,i){if(!Array.isArray(t))thrownewError("Array with property names expected as first argument");for(varo=2;o<arguments.length;o++)for(varn=arguments[o],s=0;s<t.length;s++){varr=t[s];n.hasOwnProperty(r)&&(e[r]=n[r])}returne},e.selectiveDeepExtend=function(t,i,o){varn=arguments.length<=3||void0===arguments[3]?!1:arguments[3];if(Array.isArray(o))thrownewTypeError("Arrays are not supported by deepExtend");for(vars=2;s<arguments.length;s++)for(varr=arguments[s],a=0;a<t.length;a++){varh=t[a];if(r.hasOwnProperty(h))if(o[h]&&o[h].constructor===Object)void0===i[h]&&(i[h]={}),i[h].constructor===Object?e.deepExtend(i[h],o[h],!1,n):null===o[h]&&void0!==i[h]&&n===!0?deletei[h]:i[h]=o[h];else{if(Array.isArray(o[h]))thrownewTypeError("Arrays are not supported by deepExtend");null===o[h]&&void0!==i[h]&&n===!0?deletei[h]:i[h]=o[h]}}returni},e.selectiveNotDeepExtend=function(t,i,o){varn=arguments.length<=3||void0===arguments[3]?!1:arguments[3];if(Array.isArray(o))thrownewTypeError("Arrays are not supported by deepExtend");for(varsino)if(o.hasOwnProperty(s)&&-1==t.indexOf(s))if(o[s]&&o[s].constructor===Object)void0===i[s]&&(i[s]={}),i[s].constructor===Object?e.deepExtend(i[s],o[s]):null===o[s]&&void0!==i[s]&&n===!0?deletei[s]:i[s]=o[s];elseif(Array.isArray(o[s])){i[s]=[];for(varr=0;r<o[s].length;r++)i[s].push(o[s][r])}elsenull===o[s]&&void0!==i[s]&&n===!0?deletei[s]:i[s]=o[s];returni},e.deepExtend=function(t,i,o,n){for(varsini)if(i.hasOwnProperty(s)||o===!0)if(i[s]&&i[s].constructor===Object)void0===t[s]&&(t[s]={}),t[s].constructor===Object?e.deepExtend(t[s],i[s],o):null===i[s]&&void0!==t[s]&&n===!0?deletet[s]:t[s]=i[s];elseif(Array.isArray(i[s])){t[s]=[];for(varr=0;r<i[s].length;r++)t[s].push(i[s][r])}elsenull===i[s]&&void0!==t[s]&&n===!0?deletet[s]:t[s]=i[s];returnt},e.equalArray=function(t,e){if(t.length!=e.length)return!1;for(vari=0,o=t.length;o>i;i++)if(t[i]!=e[i])return!1;return!0},e.convert=function(t,i){varo;if(void0!==t){if(null===t)returnnull;if(!i)returnt;if("string"!=typeofi&&!(iinstanceofString))thrownewError("Type must be a string");switch(i){case"boolean":case"Boolean":returnBoolean(t);case"n
i.milliseconds=+e-+t.clone().add(i.months,"M"),i}functionae(t,e){vari;returnt.isValid()&&e.isValid()?(e=Vt(e,t),t.isBefore(e)?i=re(t,e):(i=re(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}functionhe(t){return0>t?-1*Math.round(-1*t):Math.round(t)}functionde(t,e){returnfunction(i,o){varn,s;returnnull===o||isNaN(+o)||(x(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),s=i,i=o,o=s),i="string"==typeofi?+i:i,n=ne(i,o),le(this,n,t),this}}functionle(t,i,o,n){vars=i._milliseconds,r=he(i._days),a=he(i._months);t.isValid()&&(n=null==n?!0:n,s&&t._d.setTime(t._d.valueOf()+s*o),r&&H(t,"Date",j(t,"Date")+r*o),a&&at(t,j(t,"Month")+a*o),n&&e.updateOffset(t,r||a))}functionce(t,e){vari=t||At(),o=Vt(i,this).startOf("day"),n=this.diff(o,"days",!0),s=-6>n?"sameElse":-1>n?"lastWeek":0>n?"lastDay":1>n?"sameDay":2>n?"nextDay":7>n?"nextWeek":"sameElse",r=e&&(k(e[s])?e[s]():e[s]);returnthis.format(r||this.localeData().calendar(s,this,At(i)))}functionue(){returnnewm(this)}functionpe(t,e){vari=v(t)?t:At(t);returnthis.isValid()&&i.isValid()?(e=A(p(e)?"millisecond":e),"millisecond"===e?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(e).valueOf()):!1}functionfe(t,e){vari=v(t)?t:At(t);returnthis.isValid()&&i.isValid()?(e=A(p(e)?"millisecond":e),"millisecond"===e?this.valueOf()<i.valueOf():this.clone().endOf(e).valueOf()<i.valueOf()):!1}functionme(t,e,i,o){returno=o||"()",("("===o[0]?this.isAfter(t,i):!this.isBefore(t,i))&&(")"===o[1]?this.isBefore(e,i):!this.isAfter(e,i))}functionve(t,e){vari,o=v(t)?t:At(t);returnthis.isValid()&&o.isValid()?(e=A(e||"millisecond"),"millisecond"===e?this.valueOf()===o.valueOf():(i=o.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf())):!1}functionge(t,e){returnthis.isSame(t,e)||this.isAfter(t,e)}functionye(t,e){returnthis.isSame(t,e)||this.isBefore(t,e)}functionbe(t,e,i){varo,n,s,r;returnthis.isValid()?(o=Vt(t,this),o.isValid()?(n=6e4*(o.utcOffset()-this.utcOffset()),e=A(e),"year"===e||"month"===e||"quarter"===e?(r=we(this,o),"quarter"===e?r/=3:"year"===e&&(r/=12)):(s=this-o,r="second"===e?s/1e3:"minute"===e?s/6e4:"hour"===e?s/36e5:"day"===e?(s-n)/864e5:"week"===e?(s-n)/6048e5:s),i?r:g(r)):NaN):NaN}functionwe(t,e){vari,o,n=12*(e.year()-t.year())+(e.month()-t.month()),s=t.clone().add(n,"months");return0>e-s?(i=t.clone().add(n-1,"months"),o=(e-s)/(s-i)):(i=t.clone().add(n+1,"months"),o=(e-s)/(i-s)),-(n+o)||0}function_e(){returnthis.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}functionxe(){vart=this.clone().utc();return0<t.year()&&t.year()<=9999?k(Date.prototype.toISOString)?this.toDate().toISOString():q(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):q(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}functionke(t){t||(t=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);vari=q(this,t);returnthis.localeData().postformat(i)}functionOe(t,e){returnthis.isValid()&&(v(t)&&t.isValid()||At(t).isValid())?ne({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}functionMe(t){returnthis.from(At(),t)}functionDe(t,e){returnthis.isValid()&&(v(t)&&t.isValid()||At(t).isValid())?ne({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}functionSe(t){returnthis.to(At(),t)}functionCe(t){vare;returnvoid0===t?this._locale._abbr:(e=R(t),null!=e&&(this._locale=e),this)}functionTe(){returnthis._locale}functionEe(t){switch(t=A(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this}functionPe(t){returnt=A(t),void0===t||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))}functionIe(){returnthis._d.valueOf()-6e4*(this._offset||0)}functionNe(){returnMath.floor(this.
r.xOffset&&(t+=r.xOffset),r.yOffset&&(i+=r.yOffset),r.content&&(h.textContent=r.content),r.className&&h.setAttributeNS(null,"class",r.className+" vis-label"),h.setAttributeNS(null,"x",t),h.setAttributeNS(null,"y",i)}returna},e.drawBar=function(t,i,o,n,s,r,a,h){if(0!=n){0>n&&(n*=-1,i-=n);vard=e.getSVGElement("rect",r,a);d.setAttributeNS(null,"x",t-.5*o),d.setAttributeNS(null,"y",i),d.setAttributeNS(null,"width",o),d.setAttributeNS(null,"height",n),d.setAttributeNS(null,"class",s),h&&d.setAttributeNS(null,"style",h)}}},function(t,e,i){functiono(t,e){if(t&&!Array.isArray(t)&&(e=t,t=null),this._options=e||{},this._data={},this.length=0,this._fieldId=this._options.fieldId||"id",this._type={},this._options.type)for(vari=Object.keys(this._options.type),o=0,n=i.length;n>o;o++){vars=i[o],r=this._options.type[s];"Date"==r||"ISODate"==r||"ASPDate"==r?this._type[s]="Date":this._type[s]=r}if(this._options.convert)thrownewError('Option "convert" is deprecated. Use "type" instead.');this._subscribers={},t&&this.add(t),this.setOptions(e)}varn="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"==typeofSymbol&&t.constructor===Symbol?"symbol":typeoft},s=i(1),r=i(10);o.prototype.setOptions=function(t){t&&void0!==t.queue&&(t.queue===!1?this._queue&&(this._queue.destroy(),deletethis._queue):(this._queue||(this._queue=r.extend(this,{replace:["add","update","remove"]})),"object"===n(t.queue)&&this._queue.setOptions(t.queue)))},o.prototype.on=function(t,e){vari=this._subscribers[t];i||(i=[],this._subscribers[t]=i),i.push({callback:e})},o.prototype.subscribe=function(){thrownewError("DataSet.subscribe is deprecated. Use DataSet.on instead.")},o.prototype.off=function(t,e){vari=this._subscribers[t];i&&(this._subscribers[t]=i.filter(function(t){returnt.callback!=e}))},o.prototype.unsubscribe=function(){thrownewError("DataSet.unsubscribe is deprecated. Use DataSet.off instead.")},o.prototype._trigger=function(t,e,i){if("*"==t)thrownewError("Cannot trigger event *");varo=[];tinthis._subscribers&&(o=o.concat(this._subscribers[t])),"*"inthis._subscribers&&(o=o.concat(this._subscribers["*"]));for(varn=0,s=o.length;s>n;n++){varr=o[n];r.callback&&r.callback(t,e,i||null)}},o.prototype.add=function(t,e){vari,o=[],n=this;if(Array.isArray(t))for(vars=0,r=t.length;r>s;s++)i=n._addItem(t[s]),o.push(i);else{if(!(tinstanceofObject))thrownewError("Unknown dataType");i=n._addItem(t),o.push(i)}returno.length&&this._trigger("add",{items:o},e),o},o.prototype.update=function(t,e){vari=[],o=[],n=[],r=[],a=this,h=a._fieldId,d=function(t){vare=t[h];if(a._data[e]){vard=s.extend({},a._data[e]);e=a._updateItem(t),o.push(e),r.push(t),n.push(d)}elsee=a._addItem(t),i.push(e)};if(Array.isArray(t))for(varl=0,c=t.length;c>l;l++)t[l]instanceofObject?d(t[l]):console.warn("Ignoring input item, which is not an object at index "+l);else{if(!(tinstanceofObject))thrownewError("Unknown dataType");d(t)}if(i.length&&this._trigger("add",{items:i},e),o.length){varu={items:o,oldData:n,data:r};this._trigger("update",u,e)}returni.concat(o)},o.prototype.get=function(t){vare,i,o,n=this,r=s.getType(arguments[0]);"String"==r||"Number"==r?(e=arguments[0],o=arguments[1]):"Array"==r?(i=arguments[0],o=arguments[1]):o=arguments[0];vara;if(o&&o.returnType){varh=["Array","Object"];a=-1==h.indexOf(o.returnType)?"Array":o.returnType}elsea="Array";vard,l,c,u,p,f=o&&o.type||this._options.type,m=o&&o.filter,v=[];if(void0!=e)d=n._getItem(e,f),d&&m&&!m(d)&&(d=null);elseif(void0!=i)for(u=0,p=i.length;p>u;u++)d=n._getItem(i[u],f),m&&!m(d)||v.push(d);elsefor(l=Object.keys(this._data),u=0,p=l.length;p>u;u++)c=l[u],d=n._getItem(c,f),m&&!m(d)||v.push(d);if(o&&o.order&&void0==e&&this._sort(v,o.order),o&&o.fields){varg=o.fields;if(void0!=e)d=this._filterFields(d,g);elsefor(u=0,p=v.length;p>u;u++)v[u]=this._filterFields(v[u],g)}if("Object"==a){vary,b={};for(u=0,p=v.length;p>u;u++)y=v[u],b[y.id]=y;returnb}returnvoid0!=e?d:v},o.prototype.getIds=function(t){vare,i,o,n,s,r=this._data,a=t&&t.fi
this.startToFront=0>=1-e,this.endToFront=0>=e-1;varh=d.snapAwayFromHidden(this.body.hiddenDates,r,1-e,!0),l=d.snapAwayFromHidden(this.body.hiddenDates,a,e-1,!0);h==r&&l==a||(this.props.touch.start=h,this.props.touch.end=l,this.scaleOffset=1-t.scale,r=h,a=l),this.setRange(r,a,!1,!0),this.startToFront=!1,this.endToFront=!0}},o.prototype._isInsideRange=function(t){vare=t.center?t.center.x:t.clientX;if(this.options.rtl)vari=e-r.getAbsoluteLeft(this.body.dom.centerContainer);elsevari=r.getAbsoluteRight(this.body.dom.centerContainer)-e;varo=this.body.util.toTime(i);returno>=this.start&&o<=this.end},o.prototype._pointerToDate=function(t){vare,i=this.options.direction;if(n(i),"horizontal"==i)returnthis.body.util.toTime(t.x).valueOf();varo=this.body.domProps.center.height;returne=this.conversion(o),t.y/e.scale+e.offset},o.prototype.getPointer=function(t,e){returnthis.options.rtl?{x:r.getAbsoluteRight(e)-t.x,y:t.y-r.getAbsoluteTop(e)}:{x:t.x-r.getAbsoluteLeft(e),y:t.y-r.getAbsoluteTop(e)}},o.prototype.zoom=function(t,e,i){null==e&&(e=(this.start+this.end)/2);varo=d.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),n=d.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,e),s=o-n,r=e-n+(this.start-(e-n))*t,a=e+s+(this.end-(e+s))*t;this.startToFront=!(i>0),this.endToFront=!(-i>0);varh=d.snapAwayFromHidden(this.body.hiddenDates,r,i,!0),l=d.snapAwayFromHidden(this.body.hiddenDates,a,-i,!0);h==r&&l==a||(r=h,a=l),this.setRange(r,a,!1,!0),this.startToFront=!1,this.endToFront=!0},o.prototype.move=function(t){vare=this.end-this.start,i=this.start+e*t,o=this.end+e*t;this.start=i,this.end=o},o.prototype.moveTo=function(t){vare=(this.start+this.end)/2,i=e-t,o=this.start-i,n=this.end-i;this.setRange(o,n)},t.exports=o},function(t,e){functioni(t,e){this.options=null,this.props=null}i.prototype.setOptions=function(t){t&&util.extend(this.options,t)},i.prototype.redraw=function(){return!1},i.prototype.destroy=function(){},i.prototype._isResized=function(){vart=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;returnthis.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,t},t.exports=i},function(t,e){e.convertHiddenOptions=function(t,i,o){if(o&&!Array.isArray(o))returne.convertHiddenOptions(t,i,[o]);if(i.hiddenDates=[],o&&1==Array.isArray(o)){for(varn=0;n<o.length;n++)if(void0===o[n].repeat){vars={};s.start=t(o[n].start).toDate().valueOf(),s.end=t(o[n].end).toDate().valueOf(),i.hiddenDates.push(s)}i.hiddenDates.sort(function(t,e){returnt.start-e.start})}},e.updateHiddenDates=function(t,i,o){if(o&&!Array.isArray(o))returne.updateHiddenDates(t,i,[o]);if(o&&void0!==i.domProps.centerContainer.width){e.convertHiddenOptions(t,i,o);for(varn=t(i.range.start),s=t(i.range.end),r=i.range.end-i.range.start,a=r/i.domProps.centerContainer.width,h=0;h<o.length;h++)if(void0!==o[h].repeat){vard=t(o[h].start),l=t(o[h].end);if("Invalid Date"==d._d)thrownewError("Supplied start date is not valid: "+o[h].start);if("Invalid Date"==l._d)thrownewError("Supplied end date is not valid: "+o[h].end);varc=l-d;if(c>=4*a){varu=0,p=s.clone();switch(o[h].repeat){case"daily":d.day()!=l.day()&&(u=1),d.dayOfYear(n.dayOfYear()),d.year(n.year()),d.subtract(7,"days"),l.dayOfYear(n.dayOfYear()),l.year(n.year()),l.subtract(7-u,"days"),p.add(1,"weeks");break;case"weekly":varf=l.diff(d,"days"),m=d.day();d.date(n.date()),d.month(n.month()),d.year(n.year()),l=d.clone(),d.day(m),l.day(m),l.add(f,"days"),d.subtract(1,"weeks"),l.subtract(1,"weeks"),p.add(1,"weeks");break;case"monthly":d.month()!=l.month()&&(u=1),d.month(n.month()),d.year(n.year()),d.subtract(1,"months"),l.month(n.month()),l.year(n.year()),l.subtract(1,"months"),l.add(u,"months"),p.add(1,"months");break;case"yearly":d.year()!=l.year()&&(u=1),d.year(n.year()),d.subtract(1,"years"),l.year(n.year()),l.subtract(1,"years"),l.add(u,"years"),p.add(1,"years");break;default:returnvoidconsole.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",o[h].repeat)}for(;p>d;)
this.lastVisibleInterval=h,this.props.lastWidth=this.props.width;varl=this.stackDirty,c=this._firstGroup(),u={item:t.item,axis:t.axis},p={item:t.item,axis:t.item.vertical/2},f=0,m=t.axis+t.item.vertical;returnthis.groups[y].redraw(e,p,l),r.forEach(this.groups,function(t){vari=t==c?u:p,o=t.redraw(e,i,l);s=o||s,f+=t.height}),f=Math.max(f,m),this.stackDirty=!1,a.style.height=i(f),this.props.width=a.offsetWidth,this.props.height=f,this.dom.axis.style.top=i("top"==n?this.body.domProps.top.height+this.body.domProps.border.top:this.body.domProps.top.height+this.body.domProps.centerContainer.height),this.options.rtl?this.dom.axis.style.right="0":this.dom.axis.style.left="0",s=this._isResized()||s},o.prototype._firstGroup=function(){vart="top"==this.options.orientation.item?0:this.groupIds.length-1,e=this.groupIds[t],i=this.groups[e]||this.groups[g];returni||null},o.prototype._updateUngrouped=function(){vart,e,i=this.groups[g];this.groups[y];if(this.groupsData){if(i){i.hide(),deletethis.groups[g];for(einthis.items)if(this.items.hasOwnProperty(e)){t=this.items[e],t.parent&&t.parent.remove(t);varo=this._getGroupId(t.data),n=this.groups[o];n&&n.add(t)||t.hide()}}}elseif(!i){vars=null,r=null;i=newc(s,r,this),this.groups[g]=i;for(einthis.items)this.items.hasOwnProperty(e)&&(t=this.items[e],i.add(t));i.show()}},o.prototype.getLabelSet=function(){returnthis.dom.labelSet},o.prototype.setItems=function(t){vare,i=this,o=this.itemsData;if(t){if(!(tinstanceofa||tinstanceofh))thrownewTypeError("Data must be an instance of DataSet or DataView");this.itemsData=t}elsethis.itemsData=null;if(o&&(r.forEach(this.itemListeners,function(t,e){o.off(e,t)}),e=o.getIds(),this._onRemove(e)),this.itemsData){varn=this.id;r.forEach(this.itemListeners,function(t,e){i.itemsData.on(e,t,n)}),e=this.itemsData.getIds(),this._onAdd(e),this._updateUngrouped()}this.body.emitter.emit("_change",{queue:!0})},o.prototype.getItems=function(){returnthis.itemsData},o.prototype.setGroups=function(t){vare,i=this;if(this.groupsData&&(r.forEach(this.groupListeners,function(t,e){i.groupsData.off(e,t)}),e=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(e)),t){if(!(tinstanceofa||tinstanceofh))thrownewTypeError("Data must be an instance of DataSet or DataView");this.groupsData=t}elsethis.groupsData=null;if(this.groupsData){varo=this.id;r.forEach(this.groupListeners,function(t,e){i.groupsData.on(e,t,o)}),e=this.groupsData.getIds(),this._onAddGroups(e)}this._updateUngrouped(),this._order(),this.body.emitter.emit("_change",{queue:!0})},o.prototype.getGroups=function(){returnthis.groupsData},o.prototype.removeItem=function(t){vare=this.itemsData.get(t),i=this.itemsData.getDataSet();e&&this.options.onRemove(e,function(e){e&&i.remove(t)})},o.prototype._getType=function(t){returnt.type||this.options.type||(t.end?"range":"box")},o.prototype._getGroupId=function(t){vare=this._getType(t);return"background"==e&&void0==t.group?y:this.groupsData?t.group:g},o.prototype._onUpdate=function(t){vare=this;t.forEach(function(t){vari,n=e.itemsData.get(t,e.itemOptions),s=e.items[t],r=e._getType(n),a=o.types[r];if(s&&(a&&sinstanceofa?e._updateItem(s,n):(i=s.selected,e._removeItem(s),s=null)),!s){if(!a)throw"rangeoverflow"==r?newTypeError('Item type "rangeoverflow" is deprecated. Use css styling instead: .vis-item.vis-range .vis-item-content {overflow: visible;}'):newTypeError('Unknown item type "'+r+'"');s=newa(n,e.conversion,e.options),s.id=t,e._addItem(s),i&&(this.selection.push(t),s.select())}}.bind(this)),this._order(),this.stackDirty=!0,this.body.emitter.emit("_change",{queue:!0})},o.prototype._onAdd=o.prototype._onUpdate,o.prototype._onRemove=function(t){vare=0,i=this;t.forEach(function(t){varo=i.items[t];o&&(e++,i._removeItem(o))}),e&&(this._order(),this.stackDirty=!0,this.body.emitter.emit("_change",{queue:!0}))},o.prototype._order=function(){r.forEach(this.groups,function(t){t.order()})},o.prototype._onUpdateGroups=function(t){this._onAddGroups(t)},o.prototype._onAddGroups=function(t){vare=this;t.forEach(function(t){vari=e.gro
returnd>t?-1:l>=t?0:1};if(e.length>0)for(s=0;s<e.length;s++)this._checkIfVisibleWithReference(e[s],r,a,i);varu=n.binarySearchCustom(t.byStart,c,"data","start");if(this._traceVisible(u,t.byStart,r,a,function(t){returnt.data.start<d||t.data.start>l}),1==this.checkRangedItems)for(this.checkRangedItems=!1,s=0;s<t.byEnd.length;s++)this._checkIfVisibleWithReference(t.byEnd[s],r,a,i);else{varp=n.binarySearchCustom(t.byEnd,c,"data","end");this._traceVisible(p,t.byEnd,r,a,function(t){returnt.data.end<d||t.data.end>l})}for(s=0;s<r.length;s++)o=r[s],o.displayed||o.show(),o.repositionX();returnr},o.prototype._traceVisible=function(t,e,i,o,n){vars,r;if(-1!=t){for(r=t;r>=0&&(s=e[r],!n(s));r--)void0===o[s.id]&&(o[s.id]=!0,i.push(s));for(r=t+1;r<e.length&&(s=e[r],!n(s));r++)void0===o[s.id]&&(o[s.id]=!0,i.push(s))}},o.prototype._checkIfVisible=function(t,e,i){t.isVisible(i)?(t.displayed||t.show(),t.repositionX(),e.push(t)):t.displayed&&t.hide()},o.prototype._checkIfVisibleWithReference=function(t,e,i,o){t.isVisible(o)?void0===i[t.id]&&(i[t.id]=!0,e.push(t)):t.displayed&&t.hide()},t.exports=o},function(t,e){vari=.001;e.orderByStart=function(t){t.sort(function(t,e){returnt.data.start-e.data.start})},e.orderByEnd=function(t){t.sort(function(t,e){vari="end"int.data?t.data.end:t.data.start,o="end"ine.data?e.data.end:e.data.start;returni-o})},e.stack=function(t,i,o){varn,s;if(o)for(n=0,s=t.length;s>n;n++)t[n].top=null;for(n=0,s=t.length;s>n;n++){varr=t[n];if(r.stack&&null===r.top){r.top=i.axis;do{for(vara=null,h=0,d=t.length;d>h;h++){varl=t[h];if(null!==l.top&&l!==r&&l.stack&&e.collision(r,l,i.item,l.options.rtl)){a=l;break}}null!=a&&(r.top=a.top+a.height+i.item.vertical)}while(a)}}},e.nostack=function(t,e,i){varo,n,s;for(o=0,n=t.length;n>o;o++)if(void0!==t[o].data.subgroup){s=e.axis;for(varrini)i.hasOwnProperty(r)&&1==i[r].visible&&i[r].index<i[t[o].data.subgroup].index&&(s+=i[r].height+e.item.vertical);t[o].top=s}elset[o].top=e.axis},e.collision=function(t,e,o,n){returnn?t.right-o.horizontal+i<e.right+e.width&&t.right+t.width+o.horizontal-i>e.right&&t.top-o.vertical+i<e.top+e.height&&t.top+t.height+o.vertical-i>e.top:t.left-o.horizontal+i<e.left+e.width&&t.left+t.width+o.horizontal-i>e.left&&t.top-o.vertical+i<e.top+e.height&&t.top+t.height+o.vertical-i>e.top}},function(t,e,i){functiono(t,e,i){if(this.props={content:{width:0}},this.overflow=!1,this.options=i,t){if(void0==t.start)thrownewError('Property "start" missing in item '+t.id);if(void0==t.end)thrownewError('Property "end" missing in item '+t.id)}n.call(this,t,e,i)}varn=(i(20),i(39));o.prototype=newn(null,null,null),o.prototype.baseClassName="vis-item vis-range",o.prototype.isVisible=function(t){returnthis.data.start<t.end&&this.data.end>t.start},o.prototype.redraw=function(){vart=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("div"),t.frame=document.createElement("div"),t.frame.className="vis-item-overflow",t.box.appendChild(t.frame),t.content=document.createElement("div"),t.content.className="vis-item-content",t.frame.appendChild(t.content),t.box["timeline-item"]=this,this.dirty=!0),!this.parent)thrownewError("Cannot redraw item: no parent attached");if(!t.box.parentNode){vare=this.parent.dom.foreground;if(!e)thrownewError("Cannot redraw item: parent has no foreground container element");e.appendChild(t.box)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateTitle(this.dom.box),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);vari=(this.options.editable.updateTime||this.options.editable.updateGroup||this.editable===!0)&&this.editable!==!1,o=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(i?" vis-editable":" vis-readonly");t.box.className=this.baseClassName+o,this.overflow="hidden"!==window.getComputedStyle(t.frame).overflow,this.dom.content.style.maxWidth="none",this.props.content.width=this.dom.content.offsetWidth,this.height=this.dom.box.offsetHeight,this.dom.content.style.maxWidth="",this.dirty=!1}this._repaintDeleteButton(
}),t.stopPropagation()}},o.prototype._onDragEnd=function(t){this.eventParams.dragging&&(this.body.emitter.emit("timechanged",{id:this.options.id,time:newDate(this.customTime.valueOf())}),t.stopPropagation())},o.customTimeFromTarget=function(t){for(vare=t.target;e;){if(e.hasOwnProperty("custom-time"))returne["custom-time"];e=e.parentNode}returnnull},t.exports=o},function(t,e){e.en={current:"current",time:"time"},e.en_EN=e.en,e.en_US=e.en,e.nl={current:"huidige",time:"tijd"},e.nl_NL=e.nl,e.nl_BE=e.nl},function(t,e,i){functiono(t,e){this.body=t,this.defaultOptions={rtl:!1,showCurrentTime:!0,moment:r,locales:a,locale:"en"},this.options=n.extend({},this.defaultOptions),this.offset=0,this._create(),this.setOptions(e)}varn=i(1),s=i(31),r=i(2),a=i(47);o.prototype=news,o.prototype._create=function(){vart=document.createElement("div");t.className="vis-current-time",t.style.position="absolute",t.style.top="0px",t.style.height="100%",this.bar=t},o.prototype.destroy=function(){this.options.showCurrentTime=!1,this.redraw(),this.body=null},o.prototype.setOptions=function(t){t&&n.selectiveExtend(["rtl","showCurrentTime","moment","locale","locales"],this.options,t)},o.prototype.redraw=function(){if(this.options.showCurrentTime){vart=this.body.dom.backgroundVertical;this.bar.parentNode!=t&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),t.appendChild(this.bar),this.start());vare=this.options.moment((newDate).valueOf()+this.offset),i=this.body.util.toScreen(e),o=this.options.locales[this.options.locale];o||(this.warned||(console.log("WARNING: options.locales['"+this.options.locale+"'] not found. See http://visjs.org/docs/timeline/#Localization"),this.warned=!0),o=this.options.locales.en);varn=o.current+" "+o.time+": "+e.format("dddd, MMMM Do YYYY, H:mm:ss");n=n.charAt(0).toUpperCase()+n.substring(1),this.options.rtl?this.bar.style.right=i+"px":this.bar.style.left=i+"px",this.bar.title=n}elsethis.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.stop();return!1},o.prototype.start=function(){functiont(){e.stop();vari=e.body.range.conversion(e.body.domProps.center.width).scale,o=1/i/10;30>o&&(o=30),o>1e3&&(o=1e3),e.redraw(),e.body.emitter.emit("currentTimeTick"),e.currentTimeTimer=setTimeout(t,o)}vare=this;t()},o.prototype.stop=function(){void0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),deletethis.currentTimeTimer)},o.prototype.setCurrentTime=function(t){vare=n.convert(t,"Date").valueOf(),i=(newDate).valueOf();this.offset=e-i,this.redraw()},o.prototype.getCurrentTime=function(){returnnewDate((newDate).valueOf()+this.offset)},t.exports=o},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});vari="string",o="boolean",n="number",s="array",r="date",a="object",h="dom",d="moment",l="any",c={configure:{enabled:{"boolean":o},filter:{"boolean":o,"function":"function"},container:{dom:h},__type__:{object:a,"boolean":o,"function":"function"}},align:{string:i},rtl:{"boolean":o,undefined:"undefined"},autoResize:{"boolean":o},throttleRedraw:{number:n},clickToUse:{"boolean":o},dataAttributes:{string:i,array:s},editable:{add:{"boolean":o,undefined:"undefined"},remove:{"boolean":o,undefined:"undefined"},updateGroup:{"boolean":o,undefined:"undefined"},updateTime:{"boolean":o,undefined:"undefined"},__type__:{"boolean":o,object:a}},end:{number:n,date:r,string:i,moment:d},format:{minorLabels:{millisecond:{string:i,undefined:"undefined"},second:{string:i,undefined:"undefined"},minute:{string:i,undefined:"undefined"},hour:{string:i,undefined:"undefined"},weekday:{string:i,undefined:"undefined"},day:{string:i,undefined:"undefined"},month:{string:i,undefined:"undefined"},year:{string:i,undefined:"undefined"},__type__:{object:a}},majorLabels:{millisecond:{string:i,undefined:"undefined"},second:{string:i,undefined:"undefined"},minute:{string:i,undefined:"undefined"},hour:{string:i,undefined:"undefined"},weekday:{string:i,undefined:"undefined"},day:{string:i,undefined:"undefined"},month:{string:i,undefined:"undefined"},year:{string:i,undefined:"undefined"},__type__:{object:a}},__type__:{ob
},functions:{createNode:function(){},createEdge:function(){},getPointer:function(){}},modules:{},view:{scale:1,translation:{x:0,y:0}}},this.bindEventListeners(),this.images=newr["default"](function(){returno.body.emitter.emit("_requestRedraw")}),this.groups=newh["default"],this.canvas=neww["default"](this.body),this.selectionHandler=newD["default"](this.body,this.canvas),this.interactionHandler=newO["default"](this.body,this.canvas,this.selectionHandler),this.view=newx["default"](this.body,this.canvas),this.renderer=newy["default"](this.body,this.canvas),this.physics=newf["default"](this.body),this.layoutEngine=newC["default"](this.body),this.clustering=newv["default"](this.body),this.manipulation=newE["default"](this.body,this.canvas,this.selectionHandler),this.nodesHandler=newl["default"](this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=newu["default"](this.body,this.images,this.groups),this.body.modules.kamadaKawai=newA["default"](this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(i),this.setData(e)}vars=i(62),r=o(s),a=i(63),h=o(a),d=i(64),l=o(d),c=i(84),u=o(c),p=i(93),f=o(p),m=i(102),v=o(m),g=i(105),y=o(g),b=i(106),w=o(b),_=i(107),x=o(_),k=i(108),O=o(k),M=i(111),D=o(M),S=i(112),C=o(S),T=i(113),E=o(T),P=i(26),I=o(P),N=i(29),R=o(N),z=i(114),L=i(115),A=o(L);i(117);varB=i(13),F=i(1),j=(i(9),i(11),i(118)),H=i(119),W=i(45),Y=i(120);B(n.prototype),n.prototype.setOptions=function(t){vare=this;if(void0!==t){vari=R["default"].validate(t,z.allOptions);i===!0&&console.log("%cErrors have been found in the supplied options object.",N.printStyle);varo=["locale","locales","clickToUse"];if(F.selectiveDeepExtend(o,this.options,t),t=this.layoutEngine.setOptions(t.layout,t),this.canvas.setOptions(t),this.groups.setOptions(t.groups),this.nodesHandler.setOptions(t.nodes),this.edgesHandler.setOptions(t.edges),this.physics.setOptions(t.physics),this.manipulation.setOptions(t.manipulation,t,this.options),this.interactionHandler.setOptions(t.interaction),this.renderer.setOptions(t.interaction),this.selectionHandler.setOptions(t.interaction),void0!==t.groups&&this.body.emitter.emit("refreshNodes"),"configure"int&&(this.configurator||(this.configurator=newI["default"](this,this.body.container,z.configureOptions,this.canvas.pixelRatio)),this.configurator.setOptions(t.configure)),this.configurator&&this.configurator.options.enabled===!0){varn={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};F.deepExtend(n.nodes,this.nodesHandler.options),F.deepExtend(n.edges,this.edgesHandler.options),F.deepExtend(n.layout,this.layoutEngine.options),F.deepExtend(n.interaction,this.selectionHandler.options),F.deepExtend(n.interaction,this.renderer.options),F.deepExtend(n.interaction,this.interactionHandler.options),F.deepExtend(n.manipulation,this.manipulation.options),F.deepExtend(n.physics,this.physics.options),F.deepExtend(n.global,this.canvas.options),F.deepExtend(n.global,this.options),this.configurator.setModuleOptions(n)}void0!==t.clickToUse?t.clickToUse===!0?void0===this.activator&&(this.activator=newW(this.canvas.frame),this.activator.on("change",function(){e.body.emitter.emit("activate")})):(void0!==this.activator&&(this.activator.destroy(),deletethis.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}},n.prototype._updateVisibleIndices=function(){vart=this.body.nodes,e=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(variint)t.hasOwnProperty(i)&&t[i].options.hidden===!1&&this.body.nodeIndices.push(t[i].id);for(varoine)e.hasOwnProperty(o)&&e[o].options.hidden===!1&&this.body.edgeIndices.push(e[o].id)},n.prototype.bindEventListeners=function(){vart=this;this.body.emitter.on("_dataChanged",function(){t._updateVisibleIndices(),t.body.emitter.emit("_requestRedraw"),t.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",function(){t._updateValueRange(t.body.nodes),t._updateValueRange(
this._drawBackground(t),this._drawText(t,o,e,i,n))}}},{key:"_drawBackground",value:function(t){if(void0!==this.fontOptions.background&&"none"!==this.fontOptions.background){t.fillStyle=this.fontOptions.background;vare=2;if(this.isEdgeLabel)switch(this.fontOptions.align){case"middle":t.fillRect(.5*-this.size.width,.5*-this.size.height,this.size.width,this.size.height);break;case"top":t.fillRect(.5*-this.size.width,-(this.size.height+e),this.size.width,this.size.height);break;case"bottom":t.fillRect(.5*-this.size.width,e,this.size.width,this.size.height);break;default:t.fillRect(this.size.left,this.size.top-.5*e,this.size.width,this.size.height)}elset.fillRect(this.size.left,this.size.top-.5*e,this.size.width,this.size.height)}}},{key:"_drawText",value:function(t,e,i,o){vars=arguments.length<=4||void0===arguments[4]?"middle":arguments[4],r=this.fontOptions.size,a=r*this.body.view.scale;a>=this.nodeOptions.scaling.label.maxVisible&&(r=Number(this.nodeOptions.scaling.label.maxVisible)/this.body.view.scale);varh=this.size.yLine,d=this._getColor(a),l=n(d,2),c=l[0],u=l[1],p=this._setAlignment(t,i,h,s),f=n(p,2);i=f[0],h=f[1],t.font=(e&&this.nodeOptions.labelHighlightBold?"bold ":"")+r+"px "+this.fontOptions.face,t.fillStyle=c,this.isEdgeLabel||"left"!==this.fontOptions.align?t.textAlign="center":(t.textAlign=this.fontOptions.align,i-=.5*this.size.width),this.fontOptions.strokeWidth>0&&(t.lineWidth=this.fontOptions.strokeWidth,t.strokeStyle=u,t.lineJoin="round");for(varm=0;m<this.lineCount;m++)this.fontOptions.strokeWidth>0&&t.strokeText(this.lines[m],i,h),t.fillText(this.lines[m],i,h),h+=r}},{key:"_setAlignment",value:function(t,e,i,o){if(this.isEdgeLabel&&"horizontal"!==this.fontOptions.align&&this.pointToSelf===!1){e=0,i=0;varn=2;"top"===this.fontOptions.align?(t.textBaseline="alphabetic",i-=2*n):"bottom"===this.fontOptions.align?(t.textBaseline="hanging",i+=2*n):t.textBaseline="middle"}elset.textBaseline=o;return[e,i]}},{key:"_getColor",value:function(t){vare=this.fontOptions.color||"#000000",i=this.fontOptions.strokeColor||"#ffffff";if(t<=this.nodeOptions.scaling.label.drawThreshold){varo=Math.max(0,Math.min(1,1-(this.nodeOptions.scaling.label.drawThreshold-t)));e=a.overrideOpacity(e,o),i=a.overrideOpacity(i,o)}return[e,i]}},{key:"getTextSize",value:function(t){vare=arguments.length<=1||void0===arguments[1]?!1:arguments[1],i={width:this._processLabel(t,e),height:this.fontOptions.size*this.lineCount,lineCount:this.lineCount};returni}},{key:"calculateLabelSize",value:function(t,e){vari=arguments.length<=2||void0===arguments[2]?0:arguments[2],o=arguments.length<=3||void0===arguments[3]?0:arguments[3],n=arguments.length<=4||void0===arguments[4]?"middle":arguments[4];this.labelDirty===!0&&(this.size.width=this._processLabel(t,e)),this.size.height=this.fontOptions.size*this.lineCount,this.size.left=i-.5*this.size.width,this.size.top=o-.5*this.size.height,this.size.yLine=o+.5*(1-this.lineCount)*this.fontOptions.size,"hanging"===n&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4),this.labelDirty=!1}},{key:"_processLabel",value:function(t,e){vari=0,o=[""],n=0;if(void0!==this.nodeOptions.label){o=String(this.nodeOptions.label).split("\n"),n=o.length,t.font=(e&&this.nodeOptions.labelHighlightBold?"bold ":"")+this.fontOptions.size+"px "+this.fontOptions.face,i=t.measureText(o[0]).width;for(vars=1;n>s;s++){varr=t.measureText(o[s]).width;i=r>i?r:i}}returnthis.lines=o,this.lineCount=n,i}}],[{key:"parseOptions",value:function(t,e){vari=arguments.length<=2||void0===arguments[2]?!1:arguments[2];if("string"==typeofe.font){varo=e.font.split(" ");t.size=o[0].replace("px",""),t.face=o[1],t.color=o[2]}else"object"===s(e.font)&&a.fillIfDefined(t,e.font,i);t.size=Number(t.size)}}]),t}();e["default"]=h},function(t,e,i){functiono(t){returnt&&t.__esModule?t:{"default":t}}functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functions(t,e){if(!t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeo
value:function(t,e){returnthis._distanceToBorder(t,e)}}]),e}(d["default"]);e["default"]=l},function(t,e,i){functiono(t){returnt&&t.__esModule?t:{"default":t}}functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functions(t,e){if(!t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeofe&&"function"!=typeofe?t:e}functionr(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function, not "+typeofe);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});vara=function(){functiont(t,e){for(vari=0;i<e.length;i++){varo=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),h=i(74),d=o(h),l=function(t){functione(t,i,o){returnn(this,e),s(this,Object.getPrototypeOf(e).call(this,t,i,o))}returnr(e,t),a(e,[{key:"resize",value:function(){this._resizeShape()}},{key:"draw",value:function(t,e,i,o,n){this._drawShape(t,"square",2,e,i,o,n)}},{key:"distanceToBorder",value:function(t,e){returnthis._distanceToBorder(t,e)}}]),e}(d["default"]);e["default"]=l},function(t,e,i){functiono(t){returnt&&t.__esModule?t:{"default":t}}functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functions(t,e){if(!t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeofe&&"function"!=typeofe?t:e}functionr(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function, not "+typeofe);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});vara=function(){functiont(t,e){for(vari=0;i<e.length;i++){varo=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),h=i(74),d=o(h),l=function(t){functione(t,i,o){returnn(this,e),s(this,Object.getPrototypeOf(e).call(this,t,i,o))}returnr(e,t),a(e,[{key:"resize",value:function(t){this._resizeShape()}},{key:"draw",value:function(t,e,i,o,n){this._drawShape(t,"star",4,e,i,o,n)}},{key:"distanceToBorder",value:function(t,e){returnthis._distanceToBorder(t,e)}}]),e}(d["default"]);e["default"]=l},function(t,e,i){functiono(t){returnt&&t.__esModule?t:{"default":t}}functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functions(t,e){if(!t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeofe&&"function"!=typeofe?t:e}functionr(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function, not "+typeofe);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});vara=function(){functiont(t,e){for(vari=0;i<e.length;i++){varo=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),h=i(68),d=o(h),l=function(t){functione(t,i,o){returnn(this,e),s(this,Object.getPrototypeOf(e).call(this,t,i,o))}returnr(e,t),a(e,[{key:"resize",value:function(t,e){if(void0===this.width){vari=5,o=this.labelModule.getTextSize(t,e);this.width=o.width+2*i,this.height=o.height+2*i,this.radius=.5*this.width}}},{key:"draw",value:function(t,e,i,o,n){this.resize(t,o||n),this.left=e-this.width/2,this.top=i-this.height/2,this.en
e.lineTo(t.range.minX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.minX,t.range.maxY),e.lineTo(t.range.minX,t.range.minY),e.stroke()}}]),t}();e["default"]=n},function(t,e){functioni(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});varo=function(){functiont(t,e){for(vari=0;i<e.length;i++){varo=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),n=function(){functiont(e,o,n){i(this,t),this.body=e,this.physicsBody=o,this.setOptions(n)}returno(t,[{key:"setOptions",value:function(t){this.options=t}},{key:"solve",value:function(){for(vart,e,i,o,n,s,r,a,h=this.body.nodes,d=this.physicsBody.physicsNodeIndices,l=this.physicsBody.forces,c=this.options.nodeDistance,u=-2/3/c,p=4/3,f=0;f<d.length-1;f++){r=h[d[f]];for(varm=f+1;m<d.length;m++)a=h[d[m]],t=a.x-r.x,e=a.y-r.y,i=Math.sqrt(t*t+e*e),0===i&&(i=.1*Math.random(),t=i),2*c>i&&(s=.5*c>i?1:u*i+p,s/=i,o=t*s,n=e*s,l[r.id].x-=o,l[r.id].y-=n,l[a.id].x+=o,l[a.id].y+=n)}}}]),t}();e["default"]=n},function(t,e){functioni(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});varo=function(){functiont(t,e){for(vari=0;i<e.length;i++){varo=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),n=function(){functiont(e,o,n){i(this,t),this.body=e,this.physicsBody=o,this.setOptions(n)}returno(t,[{key:"setOptions",value:function(t){this.options=t}},{key:"solve",value:function(){vart,e,i,o,n,s,r,a,h,d,l=this.body.nodes,c=this.physicsBody.physicsNodeIndices,u=this.physicsBody.forces,p=this.options.nodeDistance;for(h=0;h<c.length-1;h++)for(r=l[c[h]],d=h+1;d<c.length;d++)if(a=l[c[d]],r.level===a.level){t=a.x-r.x,e=a.y-r.y,i=Math.sqrt(t*t+e*e);varf=.05;s=p>i?-Math.pow(f*i,2)+Math.pow(f*p,2):0,0===i?i=.01:s/=i,o=t*s,n=e*s,u[r.id].x-=o,u[r.id].y-=n,u[a.id].x+=o,u[a.id].y+=n}}}]),t}();e["default"]=n},function(t,e){functioni(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});varo=function(){functiont(t,e){for(vari=0;i<e.length;i++){varo=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),n=function(){functiont(e,o,n){i(this,t),this.body=e,this.physicsBody=o,this.setOptions(n)}returno(t,[{key:"setOptions",value:function(t){this.options=t}},{key:"solve",value:function(){for(vart=void0,e=void0,i=this.physicsBody.physicsEdgeIndices,o=this.body.edges,n=void0,s=void0,r=void0,a=0;a<i.length;a++)e=o[i[a]],e.connected===!0&&e.toId!==e.fromId&&void0!==this.body.nodes[e.toId]&&void0!==this.body.nodes[e.fromId]&&(void0!==e.edgeType.via?(t=void0===e.options.length?this.options.springLength:e.options.length,n=e.to,s=e.edgeType.via,r=e.from,this._calculateSpringForce(n,s,.5*t),this._calculateSpringForce(s,r,.5*t)):(t=void0===e.options.length?1.5*this.options.springLength:e.options.length,this._calculateSpringForce(e.from,e.to,t)))}},{key:"_calculateSpringForce",value:function(t,e,i){varo=t.x-e.x,n=t.y-e.y,s=Math.max(Math.sqrt(o*o+n*n),.01),r=this.options.springConstant*(i-s)/s,a=o*r,h=n*r;void0!==this.physicsBody.forces[t.id]&&(this.physicsBody.forces[t.id].x+=a,this.physicsBody.forces[t.id].y+=h),void0!==this.physicsBody.forces[e.id]&&(this.physicsBody.forces[e.id].x-=a,this.physicsBody.forces[e.id].y-=h)}}]),t}();e["default"]=n},function(t,e){functioni(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});varo=function(){functiont(t,e){for(vari=0;i<e.length;i++){varo=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,
this.frame.canvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{vare=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(){vart=this;void0!==this.hammer&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=news(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:s.DIRECTION_ALL}),r.onTouch(this.hammer,function(e){t.body.eventListeners.onTouch(e)}),this.hammer.on("tap",function(e){t.body.eventListeners.onTap(e)}),this.hammer.on("doubletap",function(e){t.body.eventListeners.onDoubleTap(e)}),this.hammer.on("press",function(e){t.body.eventListeners.onHold(e)}),this.hammer.on("panstart",function(e){t.body.eventListeners.onDragStart(e)}),this.hammer.on("panmove",function(e){t.body.eventListeners.onDrag(e)}),this.hammer.on("panend",function(e){t.body.eventListeners.onDragEnd(e)}),this.hammer.on("pinch",function(e){t.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener("mousewheel",function(e){t.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("DOMMouseScroll",function(e){t.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("mousemove",function(e){t.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener("contextmenu",function(e){t.body.eventListeners.onContext(e)}),this.hammerFrame=news(this.frame),r.onRelease(this.hammerFrame,function(e){t.body.eventListeners.onRelease(e)})}},{key:"setSize",value:function(){vart=arguments.length<=0||void0===arguments[0]?this.options.width:arguments[0],e=arguments.length<=1||void0===arguments[1]?this.options.height:arguments[1];t=this._prepareValue(t),e=this._prepareValue(e);vari=!1,o=this.frame.canvas.width,n=this.frame.canvas.height,s=this.frame.canvas.getContext("2d"),r=this.pixelRatio;returnthis.pixelRatio=(window.devicePixelRatio||1)/(s.webkitBackingStorePixelRatio||s.mozBackingStorePixelRatio||s.msBackingStorePixelRatio||s.oBackingStorePixelRatio||s.backingStorePixelRatio||1),t!=this.options.width||e!=this.options.height||this.frame.style.width!=t||this.frame.style.height!=e?(this._getCameraState(r),this.frame.style.width=t,this.frame.style.height=e,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=t,this.options.height=e,i=!0):(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._getCameraState(r),this.frame.canvas.width!=Math.round(this.frame.canvas.clientWidth*this.pixelRatio)&&(this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),i=!0),this.frame.canvas.height!=Math.round(this.frame.canvas.clientHeight*this.pixelRatio)&&(this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),i=!0)),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:"_XconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(t){returnt*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(t){returnt*this.body.view.scale+this
if(i.x=e.x,i.y=e.y,2!==this.options.editNode.length)thrownewError("The function for edit does not support two arguments (data, callback)");this.options.editNode(i,function(e){null!==e&&void0!==e&&"editNode"===t.inMode&&t.body.data.nodes.getDataSet().update(e),t.showManipulatorToolbar()})}elsealert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError)}elsethis.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){vart=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.edgeDescription||this.options.locales.en.edgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindUI("onTouch",this._handleConnect.bind(this)),this._temporaryBindUI("onDragEnd",this._finishConnect.bind(this)),this._temporaryBindUI("onDrag",this._dragControlNode.bind(this)),this._temporaryBindUI("onRelease",this._finishConnect.bind(this)),this._temporaryBindUI("onDragStart",function(){}),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){vart=this;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",this.guiEnabled===!0){vare=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],void0!==this.edgeBeingEditedId?!function(){vare=t.body.edges[t.edgeBeingEditedId],i=t._getNewTargetNode(e.from.x,e.from.y),o=t._getNewTargetNode(e.to.x,e.to.y);t.temporaryIds.nodes.push(i.id),t.temporaryIds.nodes.push(o.id),t.body.nodes[i.id]=i,t.body.nodeIndices.push(i.id),t.body.nodes[o.id]=o,t.body.nodeIndices.push(o.id),t._temporaryBindUI("onTouch",t._controlNodeTouch.bind(t)),t._temporaryBindUI("onTap",function(){}),t._temporaryBindUI("onHold",function(){}),t._temporaryBindUI("onDragStart",t._controlNodeDragStart.bind(t)),t._temporaryBindUI("onDrag",t._controlNodeDrag.bind(t)),t._temporaryBindUI("onDragEnd",t._controlNodeDragEnd.bind(t)),t._temporaryBindUI("onMouseMove",function(){}),t._temporaryBindEvent("beforeDrawing",function(t){varn=e.edgeType.findBorderPositions(t);i.selected===!1&&(i.x=n.from.x,i.y=n.from.y),o.selected===!1&&(o.x=n.to.x,o.y=n.to.y)}),t.body.emitter.emit("_redraw")}():this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){vart=this;this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";vare=this.selectionHandler.getSelectedNodes(),i=this.selectionHandler.getSelectedEdges(),o=void0;if(e.length>0){for(varn=0;n<e.length;n++)if(this.body.nodes[e[n]].isCluster===!0)returnvoidalert(this.options.locales[this.options.locale].deleteClusterError||this.options.locales.en.deleteClusterError);"function"==typeofthis.options.deleteNode&&(o=this.options.deleteNode)}elsei.length>0&&"function"==typeofthis.options.deleteEdge&&(o=this.options.deleteEdge);if("function"==typeofo){vars={nodes:e,edges:i};if(2!==o.length)thrownewError("The function for delete does not support two arguments (data, callback)");o(s,function(e){null!==e&&void0!==e&&"delete"===t.inMode?(t.body.data.edges.getDataSet().remove(e.edges),t.body.data.nodes.getDataSet().remove(e.nodes),t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar()):(t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar())})}elsethis.body.data.edges.getDataSet().remove(i),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{ke