/**
 * vis-network
 * https://visjs.github.io/vis-network/
 *
 * A dynamic, browser-based visualization library.
 *
 * @version 0.0.0-no-version
 * @date    2020-05-06T08:11:45.319Z
 *
 * @copyright (c) 2011-2017 Almende B.V, http://almende.com
 * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
 *
 * @license
 * vis.js is dual licensed under both
 *
 *   1. The Apache 2.0 License
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *   and
 *
 *   2. The MIT License
 *      http://opensource.org/licenses/MIT
 *
 * vis.js may be distributed under either license.
 */
!function(g,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((g=g||self).vis=g.vis||{})}(this,(function(g){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(g){return g&&g.__esModule&&Object.prototype.hasOwnProperty.call(g,"default")?g.default:g}function A(g,t){return g(t={exports:{}},t.exports),t.exports}function I(g){return g&&g.default||g}function C(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var i=function(g){return g&&g.Math==Math&&g},n=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||Function("return this")(),o=function(g){try{return!!g()}catch(g){return!0}},r=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),s={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,d={f:a&&!s.call({1:2},1)?function(g){var t=a(this,g);return!!t&&t.enumerable}:s},l=function(g,t){return{enumerable:!(1&g),configurable:!(2&g),writable:!(4&g),value:t}},h={}.toString,c=function(g){return h.call(g).slice(8,-1)},u="".split,f=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(g){return"String"==c(g)?u.call(g,""):Object(g)}:Object,p=function(g){if(null==g)throw TypeError("Can't call method on "+g);return g},v=function(g){return f(p(g))},y=function(g){return"object"==typeof g?null!==g:"function"==typeof g},m=function(g,t){if(!y(g))return g;var e,A;if(t&&"function"==typeof(e=g.toString)&&!y(A=e.call(g)))return A;if("function"==typeof(e=g.valueOf)&&!y(A=e.call(g)))return A;if(!t&&"function"==typeof(e=g.toString)&&!y(A=e.call(g)))return A;throw TypeError("Can't convert object to primitive value")},b={}.hasOwnProperty,w=function(g,t){return b.call(g,t)},x=n.document,k=y(x)&&y(x.createElement),D=function(g){return k?x.createElement(g):{}},O=!r&&!o((function(){return 7!=Object.defineProperty(D("div"),"a",{get:function(){return 7}}).a})),N=Object.getOwnPropertyDescriptor,Z={f:r?N:function(g,t){if(g=v(g),t=m(t,!0),O)try{return N(g,t)}catch(g){}if(w(g,t))return l(!d.f.call(g,t),g[t])}},M=/#|\.prototype\./,E=function(g,t){var e=T[G(g)];return e==R||e!=B&&("function"==typeof t?o(t):!!t)},G=E.normalize=function(g){return String(g).replace(M,".").toLowerCase()},T=E.data={},B=E.NATIVE="N",R=E.POLYFILL="P",F=E,S={},L=function(g){if("function"!=typeof g)throw TypeError(String(g)+" is not a function");return g},Q=function(g,t,e){if(L(g),void 0===t)return g;switch(e){case 0:return function(){return g.call(t)};case 1:return function(e){return g.call(t,e)};case 2:return function(e,A){return g.call(t,e,A)};case 3:return function(e,A,I){return g.call(t,e,A,I)}}return function(){return g.apply(t,arguments)}},Y=function(g){if(!y(g))throw TypeError(String(g)+" is not an object");return g},W=Object.defineProperty,z={f:r?W:function(g,t,e){if(Y(g),t=m(t,!0),Y(e),O)try{return W(g,t,e)}catch(g){}if("get"in e||"set"in e)throw TypeError("Accessors not supported");return"value"in e&&(g[t]=e.value),g}},P=r?function(g,t,e){return z.f(g,t,l(1,e))}:function(g,t,e){return g[t]=e,g},j=Z.f,V=function(g){var t=function(t,e,A){if(this instanceof g){switch(arguments.length){case 0:return new g;case 1:return new g(t);case 2:return new g(t,e)}return new g(t,e,A)}return g.apply(this,arguments)};return t.prototype=g.prototype,t},X=function(g,t){var e,A,I,C,i,o,r,s,a=g.target,d=g.global,l=g.stat,h=g.proto,c=d?n:l?n[a]:(n[a]||{}).prototype,u=d?S:S[a]||(S[a]={}),f=u.prototype;for(I in t)e=!F(d?I:a+(l?".":"#")+I,g.forced)&&c&&w(c,I),i=u[I],e&&(o=g.noTargetGet?(s=j(c,I))&&s.value:c[I]),C=e&&o?o:t[I],e&&typeof i==typeof C||(r=g.bind&&e?Q(C,n):g.wrap&&e?V(C):h&&"function"==typeof C?Q(Function.call,C):C,(g.sham||C&&C.sham||i&&i.sham)&&P(r,"sham",!0),u[I]=r,h&&(w(S,A=a+"Prototype")||P(S,A,{}),S[A][I]=C,g.real&&f&&!f[I]&&P(f,I,C)))},U=[].slice,_={},H=function(g,t,e){if(!(t in _)){for(var A=[],I=0;I<t;I++)A[I]="a["+I+"]";_[t]=Function("C,a","return new C("+A.join(",")+")")}return _[t](g,e)},J=Function.bind||function(g){var t=L(this),e=U.call(arguments,1),A=function(){var I=e.concat(U.call(arguments));return this instanceof A?H(t,I.length,I):t.apply(g,I)};return y(t.prototype)&&(A.prototype=t.prototype),A};X({target:"Function",proto:!0},{bind:J});var K=function(g){return S[g+"Prototype"]},q=K("Function").bind,$=Function.prototype,gg=function(g){var t=g.bind;return g===$||g instanceof Function&&t===$.bind?q:t};function tg(g,t,e,A){g.beginPath(),g.arc(t,e,A,0,2*Math.PI,!1),g.closePath()}function eg(g,t,e,A,I,C){var i=Math.PI/180;A-2*C<0&&(C=A/2),I-2*C<0&&(C=I/2),g.beginPath(),g.moveTo(t+C,e),g.lineTo(t+A-C,e),g.arc(t+A-C,e+C,C,270*i,360*i,!1),g.lineTo(t+A,e+I-C),g.arc(t+A-C,e+I-C,C,0,90*i,!1),g.lineTo(t+C,e+I),g.arc(t+C,e+I-C,C,90*i,180*i,!1),g.lineTo(t,e+C),g.arc(t+C,e+C,C,180*i,270*i,!1),g.closePath()}function Ag(g,t,e,A,I){var C=A/2*.5522848,i=I/2*.5522848,n=t+A,o=e+I,r=t+A/2,s=e+I/2;g.beginPath(),g.moveTo(t,s),g.bezierCurveTo(t,s-i,r-C,e,r,e),g.bezierCurveTo(r+C,e,n,s-i,n,s),g.bezierCurveTo(n,s+i,r+C,o,r,o),g.bezierCurveTo(r-C,o,t,s+i,t,s),g.closePath()}function Ig(g,t,e,A,I){var C=I*(1/3),i=A/2*.5522848,n=C/2*.5522848,o=t+A,r=e+C,s=t+A/2,a=e+C/2,d=e+(I-C/2),l=e+I;g.beginPath(),g.moveTo(o,a),g.bezierCurveTo(o,a+n,s+i,r,s,r),g.bezierCurveTo(s-i,r,t,a+n,t,a),g.bezierCurveTo(t,a-n,s-i,e,s,e),g.bezierCurveTo(s+i,e,o,a-n,o,a),g.lineTo(o,d),g.bezierCurveTo(o,d+n,s+i,l,s,l),g.bezierCurveTo(s-i,l,t,d+n,t,d),g.lineTo(t,a)}function Cg(g,t,e,A,I,C){g.beginPath(),g.moveTo(t,e);for(var i=C.length,n=A-t,o=I-e,r=o/n,s=Math.sqrt(n*n+o*o),a=0,d=!0,l=0,h=+C[0];s>=.1;)(h=+C[a++%i])>s&&(h=s),l=Math.sqrt(h*h/(1+r*r)),t+=l=n<0?-l:l,e+=r*l,!0===d?g.lineTo(t,e):g.moveTo(t,e),s-=h,d=!d}var ig={circle:tg,dashedLine:Cg,database:Ig,diamond:function(g,t,e,A){g.beginPath(),g.lineTo(t,e+A),g.lineTo(t+A,e),g.lineTo(t,e-A),g.lineTo(t-A,e),g.closePath()},ellipse:Ag,ellipse_vis:Ag,hexagon:function(g,t,e,A){g.beginPath();var I=2*Math.PI/6;g.moveTo(t+A,e);for(var C=1;C<6;C++)g.lineTo(t+A*Math.cos(I*C),e+A*Math.sin(I*C));g.closePath()},roundRect:eg,square:function(g,t,e,A){g.beginPath(),g.rect(t-A,e-A,2*A,2*A),g.closePath()},star:function(g,t,e,A){g.beginPath(),e+=.1*(A*=.82);for(var I=0;I<10;I++){var C=I%2==0?1.3*A:.5*A;g.lineTo(t+C*Math.sin(2*I*Math.PI/10),e-C*Math.cos(2*I*Math.PI/10))}g.closePath()},triangle:function(g,t,e,A){g.beginPath(),e+=.275*(A*=1.15);var I=2*A,C=I/2,i=Math.sqrt(3)/6*I,n=Math.sqrt(I*I-C*C);g.moveTo(t,e-(n-i)),g.lineTo(t+C,e+i),g.lineTo(t-C,e+i),g.lineTo(t,e-(n-i)),g.closePath()},triangleDown:function(g,t,e,A){g.beginPath(),e-=.275*(A*=1.15);var I=2*A,C=I/2,i=Math.sqrt(3)/6*I,n=Math.sqrt(I*I-C*C);g.moveTo(t,e+(n-i)),g.lineTo(t+C,e-i),g.lineTo(t-C,e-i),g.lineTo(t,e+(n-i)),g.closePath()}};var ng=A((function(g){function t(g){if(g)return function(g){for(var e in t.prototype)g[e]=t.prototype[e];return g}(g)}g.exports=t,t.prototype.on=t.prototype.addEventListener=function(g,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+g]=this._callbacks["$"+g]||[]).push(t),this},t.prototype.once=function(g,t){function e(){this.off(g,e),t.apply(this,arguments)}return e.fn=t,this.on(g,e),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(g,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var e,A=this._callbacks["$"+g];if(!A)return this;if(1==arguments.length)return delete this._callbacks["$"+g],this;for(var I=0;I<A.length;I++)if((e=A[I])===t||e.fn===t){A.splice(I,1);break}return 0===A.length&&delete this._callbacks["$"+g],this},t.prototype.emit=function(g){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),e=this._callbacks["$"+g],A=1;A<arguments.length;A++)t[A-1]=arguments[A];if(e){A=0;for(var I=(e=e.slice(0)).length;A<I;++A)e[A].apply(this,t)}return this},t.prototype.listeners=function(g){return this._callbacks=this._callbacks||{},this._callbacks["$"+g]||[]},t.prototype.hasListeners=function(g){return!!this.listeners(g).length}})),og={},rg=n["__core-js_shared__"]||function(g,t){try{P(n,g,t)}catch(e){n[g]=t}return t}("__core-js_shared__",{}),sg=Function.toString;"function"!=typeof rg.inspectSource&&(rg.inspectSource=function(g){return sg.call(g)});var ag,dg,lg,hg=rg.inspectSource,cg=n.WeakMap,ug="function"==typeof cg&&/native code/.test(hg(cg)),fg=A((function(g){(g.exports=function(g,t){return rg[g]||(rg[g]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.4",mode:"pure",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),pg=0,vg=Math.random(),yg=function(g){return"Symbol("+String(void 0===g?"":g)+")_"+(++pg+vg).toString(36)},mg=fg("keys"),bg=function(g){return mg[g]||(mg[g]=yg(g))},wg={},xg=n.WeakMap;if(ug){var kg=new xg,Dg=kg.get,Og=kg.has,Ng=kg.set;ag=function(g,t){return Ng.call(kg,g,t),t},dg=function(g){return Dg.call(kg,g)||{}},lg=function(g){return Og.call(kg,g)}}else{var Zg=bg("state");wg[Zg]=!0,ag=function(g,t){return P(g,Zg,t),t},dg=function(g){return w(g,Zg)?g[Zg]:{}},lg=function(g){return w(g,Zg)}}var Mg,Eg,Gg,Tg={set:ag,get:dg,has:lg,enforce:function(g){return lg(g)?dg(g):ag(g,{})},getterFor:function(g){return function(t){var e;if(!y(t)||(e=dg(t)).type!==g)throw TypeError("Incompatible receiver, "+g+" required");return e}}},Bg=function(g){return Object(p(g))},Rg=!o((function(){function g(){}return g.prototype.constructor=null,Object.getPrototypeOf(new g)!==g.prototype})),Fg=bg("IE_PROTO"),Sg=Object.prototype,Lg=Rg?Object.getPrototypeOf:function(g){return g=Bg(g),w(g,Fg)?g[Fg]:"function"==typeof g.constructor&&g instanceof g.constructor?g.constructor.prototype:g instanceof Object?Sg:null},Qg=!!Object.getOwnPropertySymbols&&!o((function(){return!String(Symbol())})),Yg=Qg&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Wg=fg("wks"),zg=n.Symbol,Pg=Yg?zg:zg&&zg.withoutSetter||yg,jg=function(g){return w(Wg,g)||(Qg&&w(zg,g)?Wg[g]=zg[g]:Wg[g]=Pg("Symbol."+g)),Wg[g]},Vg=(jg("iterator"),!1);[].keys&&("next"in(Gg=[].keys())?(Eg=Lg(Lg(Gg)))!==Object.prototype&&(Mg=Eg):Vg=!0),null==Mg&&(Mg={});var Xg,Ug={IteratorPrototype:Mg,BUGGY_SAFARI_ITERATORS:Vg},_g=Math.ceil,Hg=Math.floor,Jg=function(g){return isNaN(g=+g)?0:(g>0?Hg:_g)(g)},Kg=Math.min,qg=function(g){return g>0?Kg(Jg(g),9007199254740991):0},$g=Math.max,gt=Math.min,tt=function(g,t){var e=Jg(g);return e<0?$g(e+t,0):gt(e,t)},et=function(g){return function(t,e,A){var I,C=v(t),i=qg(C.length),n=tt(A,i);if(g&&e!=e){for(;i>n;)if((I=C[n++])!=I)return!0}else for(;i>n;n++)if((g||n in C)&&C[n]===e)return g||n||0;return!g&&-1}},At={includes:et(!0),indexOf:et(!1)},It=At.indexOf,Ct=function(g,t){var e,A=v(g),I=0,C=[];for(e in A)!w(wg,e)&&w(A,e)&&C.push(e);for(;t.length>I;)w(A,e=t[I++])&&(~It(C,e)||C.push(e));return C},it=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],nt=Object.keys||function(g){return Ct(g,it)},ot=r?Object.defineProperties:function(g,t){Y(g);for(var e,A=nt(t),I=A.length,C=0;I>C;)z.f(g,e=A[C++],t[e]);return g},rt=function(g){return"function"==typeof g?g:void 0},st=function(g,t){return arguments.length<2?rt(S[g])||rt(n[g]):S[g]&&S[g][t]||n[g]&&n[g][t]},at=st("document","documentElement"),dt=bg("IE_PROTO"),lt=function(){},ht=function(g){return"<script>"+g+"<\/script>"},ct=function(){try{Xg=document.domain&&new ActiveXObject("htmlfile")}catch(g){}var g,t;ct=Xg?function(g){g.write(ht("")),g.close();var t=g.parentWindow.Object;return g=null,t}(Xg):((t=D("iframe")).style.display="none",at.appendChild(t),t.src=String("javascript:"),(g=t.contentWindow.document).open(),g.write(ht("document.F=Object")),g.close(),g.F);for(var e=it.length;e--;)delete ct.prototype[it[e]];return ct()};wg[dt]=!0;var ut=Object.create||function(g,t){var e;return null!==g?(lt.prototype=Y(g),e=new lt,lt.prototype=null,e[dt]=g):e=ct(),void 0===t?e:ot(e,t)},ft={};ft[jg("toStringTag")]="z";var pt="[object z]"===String(ft),vt=jg("toStringTag"),yt="Arguments"==c(function(){return arguments}()),mt=pt?c:function(g){var t,e,A;return void 0===g?"Undefined":null===g?"Null":"string"==typeof(e=function(g,t){try{return g[t]}catch(g){}}(t=Object(g),vt))?e:yt?c(t):"Object"==(A=c(t))&&"function"==typeof t.callee?"Arguments":A},bt=pt?{}.toString:function(){return"[object "+mt(this)+"]"},wt=z.f,xt=jg("toStringTag"),kt=function(g,t,e,A){if(g){var I=e?g:g.prototype;w(I,xt)||wt(I,xt,{configurable:!0,value:t}),A&&!pt&&P(I,"toString",bt)}},Dt=Ug.IteratorPrototype,Ot=function(){return this},Nt=Object.setPrototypeOf||("__proto__"in{}?function(){var g,t=!1,e={};try{(g=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(e,[]),t=e instanceof Array}catch(g){}return function(e,A){return Y(e),function(g){if(!y(g)&&null!==g)throw TypeError("Can't set "+String(g)+" as a prototype")}(A),t?g.call(e,A):e.__proto__=A,e}}():void 0),Zt=function(g,t,e,A){A&&A.enumerable?g[t]=e:P(g,t,e)},Mt=Ug.IteratorPrototype,Et=Ug.BUGGY_SAFARI_ITERATORS,Gt=jg("iterator"),Tt=function(){return this},Bt=function(g,t,e,A,I,C,i){!function(g,t,e){var A=t+" Iterator";g.prototype=ut(Dt,{next:l(1,e)}),kt(g,A,!1,!0),og[A]=Ot}(e,t,A);var n,o,r,s=function(g){if(g===I&&u)return u;if(!Et&&g in h)return h[g];switch(g){case"keys":case"values":case"entries":return function(){return new e(this,g)}}return function(){return new e(this)}},a=t+" Iterator",d=!1,h=g.prototype,c=h[Gt]||h["@@iterator"]||I&&h[I],u=!Et&&c||s(I),f="Array"==t&&h.entries||c;if(f&&(n=Lg(f.call(new g)),Mt!==Object.prototype&&n.next&&(kt(n,a,!0,!0),og[a]=Tt)),"values"==I&&c&&"values"!==c.name&&(d=!0,u=function(){return c.call(this)}),i&&h[Gt]!==u&&P(h,Gt,u),og[t]=u,I)if(o={values:s("values"),keys:C?u:s("keys"),entries:s("entries")},i)for(r in o)!Et&&!d&&r in h||Zt(h,r,o[r]);else X({target:t,proto:!0,forced:Et||d},o);return o},Rt=Tg.set,Ft=Tg.getterFor("Array Iterator");Bt(Array,"Array",(function(g,t){Rt(this,{type:"Array Iterator",target:v(g),index:0,kind:t})}),(function(){var g=Ft(this),t=g.target,e=g.kind,A=g.index++;return!t||A>=t.length?(g.target=void 0,{value:void 0,done:!0}):"keys"==e?{value:A,done:!1}:"values"==e?{value:t[A],done:!1}:{value:[A,t[A]],done:!1}}),"values");og.Arguments=og.Array;var St=jg("toStringTag");for(var Lt in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var Qt=n[Lt],Yt=Qt&&Qt.prototype;Yt&&mt(Yt)!==St&&P(Yt,St,Lt),og[Lt]=og.Array}var Wt=function(g){return function(t,e){var A,I,C=String(p(t)),i=Jg(e),n=C.length;return i<0||i>=n?g?"":void 0:(A=C.charCodeAt(i))<55296||A>56319||i+1===n||(I=C.charCodeAt(i+1))<56320||I>57343?g?C.charAt(i):A:g?C.slice(i,i+2):I-56320+(A-55296<<10)+65536}},zt={codeAt:Wt(!1),charAt:Wt(!0)}.charAt,Pt=Tg.set,jt=Tg.getterFor("String Iterator");Bt(String,"String",(function(g){Pt(this,{type:"String Iterator",string:String(g),index:0})}),(function(){var g,t=jt(this),e=t.string,A=t.index;return A>=e.length?{value:void 0,done:!0}:(g=zt(e,A),t.index+=g.length,{value:g,done:!1})}));var Vt,Xt,Ut=jg("iterator"),_t=function(g){if(null!=g)return g[Ut]||g["@@iterator"]||og[mt(g)]},Ht=function(g){var t=_t(g);if("function"!=typeof t)throw TypeError(String(g)+" is not iterable");return Y(t.call(g))},Jt=_t,Kt=Array.isArray||function(g){return"Array"==c(g)},qt=function(g,t,e){var A=m(t);A in g?z.f(g,A,l(0,e)):g[A]=e},$t=jg("species"),ge=function(g,t){var e;return Kt(g)&&("function"!=typeof(e=g.constructor)||e!==Array&&!Kt(e.prototype)?y(e)&&null===(e=e[$t])&&(e=void 0):e=void 0),new(void 0===e?Array:e)(0===t?0:t)},te=st("navigator","userAgent")||"",ee=n.process,Ae=ee&&ee.versions,Ie=Ae&&Ae.v8;Ie?Xt=(Vt=Ie.split("."))[0]+Vt[1]:te&&(!(Vt=te.match(/Edge\/(\d+)/))||Vt[1]>=74)&&(Vt=te.match(/Chrome\/(\d+)/))&&(Xt=Vt[1]);var Ce=Xt&&+Xt,ie=jg("species"),ne=function(g){return Ce>=51||!o((function(){var t=[];return(t.constructor={})[ie]=function(){return{foo:1}},1!==t[g](Boolean).foo}))},oe=jg("isConcatSpreadable"),re=Ce>=51||!o((function(){var g=[];return g[oe]=!1,g.concat()[0]!==g})),se=ne("concat"),ae=function(g){if(!y(g))return!1;var t=g[oe];return void 0!==t?!!t:Kt(g)};X({target:"Array",proto:!0,forced:!re||!se},{concat:function(g){var t,e,A,I,C,i=Bg(this),n=ge(i,0),o=0;for(t=-1,A=arguments.length;t<A;t++)if(C=-1===t?i:arguments[t],ae(C)){if(o+(I=qg(C.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(e=0;e<I;e++,o++)e in C&&qt(n,o,C[e])}else{if(o>=9007199254740991)throw TypeError("Maximum allowed index exceeded");qt(n,o++,C)}return n.length=o,n}});var de=Object.freeze({__proto__:null}),le=it.concat("length","prototype"),he={f:Object.getOwnPropertyNames||function(g){return Ct(g,le)}},ce=he.f,ue={}.toString,fe="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],pe={f:function(g){return fe&&"[object Window]"==ue.call(g)?function(g){try{return ce(g)}catch(g){return fe.slice()}}(g):ce(v(g))}},ve={f:Object.getOwnPropertySymbols},ye={f:jg},me=z.f,be=function(g){var t=S.Symbol||(S.Symbol={});w(t,g)||me(t,g,{value:ye.f(g)})},we=[].push,xe=function(g){var t=1==g,e=2==g,A=3==g,I=4==g,C=6==g,i=5==g||C;return function(n,o,r,s){for(var a,d,l=Bg(n),h=f(l),c=Q(o,r,3),u=qg(h.length),p=0,v=s||ge,y=t?v(n,u):e?v(n,0):void 0;u>p;p++)if((i||p in h)&&(d=c(a=h[p],p,l),g))if(t)y[p]=d;else if(d)switch(g){case 3:return!0;case 5:return a;case 6:return p;case 2:we.call(y,a)}else if(I)return!1;return C?-1:A||I?I:y}},ke={forEach:xe(0),map:xe(1),filter:xe(2),some:xe(3),every:xe(4),find:xe(5),findIndex:xe(6)},De=ke.forEach,Oe=bg("hidden"),Ne=jg("toPrimitive"),Ze=Tg.set,Me=Tg.getterFor("Symbol"),Ee=Object.prototype,Ge=n.Symbol,Te=st("JSON","stringify"),Be=Z.f,Re=z.f,Fe=pe.f,Se=d.f,Le=fg("symbols"),Qe=fg("op-symbols"),Ye=fg("string-to-symbol-registry"),We=fg("symbol-to-string-registry"),ze=fg("wks"),Pe=n.QObject,je=!Pe||!Pe.prototype||!Pe.prototype.findChild,Ve=r&&o((function(){return 7!=ut(Re({},"a",{get:function(){return Re(this,"a",{value:7}).a}})).a}))?function(g,t,e){var A=Be(Ee,t);A&&delete Ee[t],Re(g,t,e),A&&g!==Ee&&Re(Ee,t,A)}:Re,Xe=function(g,t){var e=Le[g]=ut(Ge.prototype);return Ze(e,{type:"Symbol",tag:g,description:t}),r||(e.description=t),e},Ue=Yg?function(g){return"symbol"==typeof g}:function(g){return Object(g)instanceof Ge},_e=function(g,t,e){g===Ee&&_e(Qe,t,e),Y(g);var A=m(t,!0);return Y(e),w(Le,A)?(e.enumerable?(w(g,Oe)&&g[Oe][A]&&(g[Oe][A]=!1),e=ut(e,{enumerable:l(0,!1)})):(w(g,Oe)||Re(g,Oe,l(1,{})),g[Oe][A]=!0),Ve(g,A,e)):Re(g,A,e)},He=function(g,t){Y(g);var e=v(t),A=nt(e).concat($e(e));return De(A,(function(t){r&&!Je.call(e,t)||_e(g,t,e[t])})),g},Je=function(g){var t=m(g,!0),e=Se.call(this,t);return!(this===Ee&&w(Le,t)&&!w(Qe,t))&&(!(e||!w(this,t)||!w(Le,t)||w(this,Oe)&&this[Oe][t])||e)},Ke=function(g,t){var e=v(g),A=m(t,!0);if(e!==Ee||!w(Le,A)||w(Qe,A)){var I=Be(e,A);return!I||!w(Le,A)||w(e,Oe)&&e[Oe][A]||(I.enumerable=!0),I}},qe=function(g){var t=Fe(v(g)),e=[];return De(t,(function(g){w(Le,g)||w(wg,g)||e.push(g)})),e},$e=function(g){var t=g===Ee,e=Fe(t?Qe:v(g)),A=[];return De(e,(function(g){!w(Le,g)||t&&!w(Ee,g)||A.push(Le[g])})),A};if(Qg||(Zt((Ge=function(){if(this instanceof Ge)throw TypeError("Symbol is not a constructor");var g=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=yg(g),e=function(g){this===Ee&&e.call(Qe,g),w(this,Oe)&&w(this[Oe],t)&&(this[Oe][t]=!1),Ve(this,t,l(1,g))};return r&&je&&Ve(Ee,t,{configurable:!0,set:e}),Xe(t,g)}).prototype,"toString",(function(){return Me(this).tag})),Zt(Ge,"withoutSetter",(function(g){return Xe(yg(g),g)})),d.f=Je,z.f=_e,Z.f=Ke,he.f=pe.f=qe,ve.f=$e,ye.f=function(g){return Xe(jg(g),g)},r&&Re(Ge.prototype,"description",{configurable:!0,get:function(){return Me(this).description}})),X({global:!0,wrap:!0,forced:!Qg,sham:!Qg},{Symbol:Ge}),De(nt(ze),(function(g){be(g)})),X({target:"Symbol",stat:!0,forced:!Qg},{for:function(g){var t=String(g);if(w(Ye,t))return Ye[t];var e=Ge(t);return Ye[t]=e,We[e]=t,e},keyFor:function(g){if(!Ue(g))throw TypeError(g+" is not a symbol");if(w(We,g))return We[g]},useSetter:function(){je=!0},useSimple:function(){je=!1}}),X({target:"Object",stat:!0,forced:!Qg,sham:!r},{create:function(g,t){return void 0===t?ut(g):He(ut(g),t)},defineProperty:_e,defineProperties:He,getOwnPropertyDescriptor:Ke}),X({target:"Object",stat:!0,forced:!Qg},{getOwnPropertyNames:qe,getOwnPropertySymbols:$e}),X({target:"Object",stat:!0,forced:o((function(){ve.f(1)}))},{getOwnPropertySymbols:function(g){return ve.f(Bg(g))}}),Te){var gA=!Qg||o((function(){var g=Ge();return"[null]"!=Te([g])||"{}"!=Te({a:g})||"{}"!=Te(Object(g))}));X({target:"JSON",stat:!0,forced:gA},{stringify:function(g,t,e){for(var A,I=[g],C=1;arguments.length>C;)I.push(arguments[C++]);if(A=t,(y(t)||void 0!==g)&&!Ue(g))return Kt(t)||(t=function(g,t){if("function"==typeof A&&(t=A.call(this,g,t)),!Ue(t))return t}),I[1]=t,Te.apply(null,I)}})}Ge.prototype[Ne]||P(Ge.prototype,Ne,Ge.prototype.valueOf),kt(Ge,"Symbol"),wg[Oe]=!0,be("asyncIterator");var tA=Object.freeze({__proto__:null});be("hasInstance"),be("isConcatSpreadable"),be("iterator"),be("match"),be("matchAll"),be("replace"),be("search"),be("species"),be("split"),be("toPrimitive"),be("toStringTag"),be("unscopables"),kt(Math,"Math",!0),kt(n.JSON,"JSON",!0),I(de),I(tA);var eA=S.Symbol,AA=eA,IA=function(g,t,e,A){try{return A?t(Y(e)[0],e[1]):t(e)}catch(t){var I=g.return;throw void 0!==I&&Y(I.call(g)),t}},CA=jg("iterator"),iA=Array.prototype,nA=function(g){return void 0!==g&&(og.Array===g||iA[CA]===g)},oA=jg("iterator"),rA=!1;try{var sA=0,aA={next:function(){return{done:!!sA++}},return:function(){rA=!0}};aA[oA]=function(){return this},Array.from(aA,(function(){throw 2}))}catch(g){}var dA=!function(g,t){if(!t&&!rA)return!1;var e=!1;try{var A={};A[oA]=function(){return{next:function(){return{done:e=!0}}}},g(A)}catch(g){}return e}((function(g){Array.from(g)}));X({target:"Array",stat:!0,forced:dA},{from:function(g){var t,e,A,I,C,i,n=Bg(g),o="function"==typeof this?this:Array,r=arguments.length,s=r>1?arguments[1]:void 0,a=void 0!==s,d=_t(n),l=0;if(a&&(s=Q(s,r>2?arguments[2]:void 0,2)),null==d||o==Array&&nA(d))for(e=new o(t=qg(n.length));t>l;l++)i=a?s(n[l],l):n[l],qt(e,l,i);else for(C=(I=d.call(n)).next,e=new o;!(A=C.call(I)).done;l++)i=a?IA(I,s,[A.value,l],!0):A.value,qt(e,l,i);return e.length=l,e}});var lA=S.Array.from,hA=lA;X({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperty:z.f});var cA=A((function(g){var t=S.Object,e=g.exports=function(g,e,A){return t.defineProperty(g,e,A)};t.defineProperty.sham&&(e.sham=!0)})),uA=cA;X({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperties:ot});var fA=A((function(g){var t=S.Object,e=g.exports=function(g,e){return t.defineProperties(g,e)};t.defineProperties.sham&&(e.sham=!0)})),pA=st("Reflect","ownKeys")||function(g){var t=he.f(Y(g)),e=ve.f;return e?t.concat(e(g)):t};X({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(g){for(var t,e,A=v(g),I=Z.f,C=pA(A),i={},n=0;C.length>n;)void 0!==(e=I(A,t=C[n++]))&&qt(i,t,e);return i}});var vA=S.Object.getOwnPropertyDescriptors,yA=Z.f,mA=o((function(){yA(1)}));X({target:"Object",stat:!0,forced:!r||mA,sham:!r},{getOwnPropertyDescriptor:function(g,t){return yA(v(g),t)}});var bA=A((function(g){var t=S.Object,e=g.exports=function(g,e){return t.getOwnPropertyDescriptor(g,e)};t.getOwnPropertyDescriptor.sham&&(e.sham=!0)})),wA=bA,xA=S.Object.getOwnPropertySymbols;X({target:"Object",stat:!0,sham:!r},{create:ut});var kA=S.Object,DA=function(g,t){return kA.create(g,t)},OA=DA,NA=cA;var ZA=function(g,t,e){return t in g?NA(g,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):g[t]=e,g},MA=o((function(){nt(1)}));X({target:"Object",stat:!0,forced:MA},{keys:function(g){return nt(Bg(g))}});var EA,GA=S.Object.keys,TA="\t\n\v\f\r                　\u2028\u2029\ufeff",BA="["+TA+"]",RA=RegExp("^"+BA+BA+"*"),FA=RegExp(BA+BA+"*$"),SA=function(g){return function(t){var e=String(p(t));return 1&g&&(e=e.replace(RA,"")),2&g&&(e=e.replace(FA,"")),e}},LA={start:SA(1),end:SA(2),trim:SA(3)},QA=LA.trim;X({target:"String",proto:!0,forced:(EA="trim",o((function(){return!!TA[EA]()||"​᠎"!="​᠎"[EA]()||TA[EA].name!==EA})))},{trim:function(){return QA(this)}});var YA=K("String").trim,WA=String.prototype,zA=function(g){var t=g.trim;return"string"==typeof g||g===WA||g instanceof String&&t===WA.trim?YA:t},PA=function(g,t){var e=[][g];return!!e&&o((function(){e.call(null,t||function(){throw 1},1)}))},jA=Object.defineProperty,VA={},XA=function(g){throw g},UA=function(g,t){if(w(VA,g))return VA[g];t||(t={});var e=[][g],A=!!w(t,"ACCESSORS")&&t.ACCESSORS,I=w(t,0)?t[0]:XA,C=w(t,1)?t[1]:void 0;return VA[g]=!!e&&!o((function(){if(A&&!r)return!0;var g={length:-1};A?jA(g,1,{enumerable:!0,get:XA}):g[1]=1,e.call(g,I,C)}))},_A=ke.forEach,HA=PA("forEach"),JA=UA("forEach"),KA=HA&&JA?[].forEach:function(g){return _A(this,g,arguments.length>1?arguments[1]:void 0)};X({target:"Array",proto:!0,forced:[].forEach!=KA},{forEach:KA});var qA=K("Array").forEach,$A=Array.prototype,gI={DOMTokenList:!0,NodeList:!0},tI=function(g){var t=g.forEach;return g===$A||g instanceof Array&&t===$A.forEach||gI.hasOwnProperty(mt(g))?qA:t},eI=ke.map,AI=ne("map"),II=UA("map");X({target:"Array",proto:!0,forced:!AI||!II},{map:function(g){return eI(this,g,arguments.length>1?arguments[1]:void 0)}});var CI=K("Array").map,iI=Array.prototype,nI=function(g){var t=g.map;return g===iI||g instanceof Array&&t===iI.map?CI:t},oI=LA.trim,rI=n.parseInt,sI=/^[+-]?0[Xx]/,aI=8!==rI(TA+"08")||22!==rI(TA+"0x16")?function(g,t){var e=oI(String(g));return rI(e,t>>>0||(sI.test(e)?16:10))}:rI;X({global:!0,forced:parseInt!=aI},{parseInt:aI});var dI=S.parseInt,lI=d.f,hI=function(g){return function(t){for(var e,A=v(t),I=nt(A),C=I.length,i=0,n=[];C>i;)e=I[i++],r&&!lI.call(A,e)||n.push(g?[e,A[e]]:A[e]);return n}},cI={entries:hI(!0),values:hI(!1)}.values;X({target:"Object",stat:!0},{values:function(g){return cI(g)}});var uI=S.Object.values,fI=ke.filter,pI=ne("filter"),vI=UA("filter");X({target:"Array",proto:!0,forced:!pI||!vI},{filter:function(g){return fI(this,g,arguments.length>1?arguments[1]:void 0)}});var yI=K("Array").filter,mI=Array.prototype,bI=function(g){var t=g.filter;return g===mI||g instanceof Array&&t===mI.filter?yI:t},wI=K("Array").concat,xI=Array.prototype,kI=function(g){var t=g.concat;return g===xI||g instanceof Array&&t===xI.concat?wI:t};X({target:"Array",stat:!0},{isArray:Kt});var DI=S.Array.isArray,OI=DI;var NI=function(g,t){(null==t||t>g.length)&&(t=g.length);for(var e=0,A=new Array(t);e<t;e++)A[e]=g[e];return A};var ZI=function(g){if(OI(g))return NI(g)},MI=lA,EI=jg("iterator"),GI=function(g){var t=Object(g);return void 0!==t[EI]||"@@iterator"in t||og.hasOwnProperty(mt(t))};be("asyncDispose"),be("dispose"),be("observable"),be("patternMatch"),be("replaceAll");var TI=eA;var BI=function(g){if(void 0!==TI&&GI(Object(g)))return MI(g)},RI=ne("slice"),FI=UA("slice",{ACCESSORS:!0,0:0,1:2}),SI=jg("species"),LI=[].slice,QI=Math.max;X({target:"Array",proto:!0,forced:!RI||!FI},{slice:function(g,t){var e,A,I,C=v(this),i=qg(C.length),n=tt(g,i),o=tt(void 0===t?i:t,i);if(Kt(C)&&("function"!=typeof(e=C.constructor)||e!==Array&&!Kt(e.prototype)?y(e)&&null===(e=e[SI])&&(e=void 0):e=void 0,e===Array||void 0===e))return LI.call(C,n,o);for(A=new(void 0===e?Array:e)(QI(o-n,0)),I=0;n<o;n++,I++)n in C&&qt(A,I,C[n]);return A.length=I,A}});var YI=K("Array").slice,WI=Array.prototype,zI=function(g){var t=g.slice;return g===WI||g instanceof Array&&t===WI.slice?YI:t},PI=zI;var jI=function(g,t){var e;if(g){if("string"==typeof g)return NI(g,t);var A=PI(e=Object.prototype.toString.call(g)).call(e,8,-1);return"Object"===A&&g.constructor&&(A=g.constructor.name),"Map"===A||"Set"===A?MI(g):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?NI(g,t):void 0}};var VI=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};var XI=function(g){return ZI(g)||BI(g)||jI(g)||VI()},UI=zI,_I=o((function(){Lg(1)}));X({target:"Object",stat:!0,forced:_I,sham:!Rg},{getPrototypeOf:function(g){return Lg(Bg(g))}});var HI=S.Object.getPrototypeOf,JI=HI,KI=At.indexOf,qI=[].indexOf,$I=!!qI&&1/[1].indexOf(1,-0)<0,gC=PA("indexOf"),tC=UA("indexOf",{ACCESSORS:!0,1:0});X({target:"Array",proto:!0,forced:$I||!gC||!tC},{indexOf:function(g){return $I?qI.apply(this,arguments)||0:KI(this,g,arguments.length>1?arguments[1]:void 0)}});var eC=K("Array").indexOf,AC=Array.prototype,IC=function(g){var t=g.indexOf;return g===AC||g instanceof Array&&t===AC.indexOf?eC:t},CC=DI,iC=Object.assign,nC=Object.defineProperty,oC=!iC||o((function(){if(r&&1!==iC({b:1},iC(nC({},"a",{enumerable:!0,get:function(){nC(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var g={},t={},e=Symbol();return g[e]=7,"abcdefghijklmnopqrst".split("").forEach((function(g){t[g]=g})),7!=iC({},g)[e]||"abcdefghijklmnopqrst"!=nt(iC({},t)).join("")}))?function(g,t){for(var e=Bg(g),A=arguments.length,I=1,C=ve.f,i=d.f;A>I;)for(var n,o=f(arguments[I++]),s=C?nt(o).concat(C(o)):nt(o),a=s.length,l=0;a>l;)n=s[l++],r&&!i.call(o,n)||(e[n]=o[n]);return e}:iC;X({target:"Object",stat:!0,forced:Object.assign!==oC},{assign:oC});var rC=S.Object.assign,sC=ye.f("iterator"),aC=sC,dC=A((function(g){function t(e){return g.exports=t="function"==typeof TI&&"symbol"==typeof aC?function(g){return typeof g}:function(g){return g&&"function"==typeof TI&&g.constructor===TI&&g!==TI.prototype?"symbol":typeof g},t(e)}g.exports=t}));var lC=function(g){if(OI(g))return g};var hC=function(g,t){if(void 0!==TI&&GI(Object(g))){var e=[],A=!0,I=!1,C=void 0;try{for(var i,n=Ht(g);!(A=(i=n.next()).done)&&(e.push(i.value),!t||e.length!==t);A=!0);}catch(g){I=!0,C=g}finally{try{A||null==n.return||n.return()}finally{if(I)throw C}}return e}};var cC=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};var uC=function(g,t){return lC(g)||hC(g,t)||jI(g,t)||cC()};X({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}});var fC=S.Date.now;function pC(g){if(void 0===AA||null==Jt(g)){if(CC(g)||(g=function(g,t){var e;if(!g)return;if("string"==typeof g)return vC(g,t);var A=UI(e=Object.prototype.toString.call(g)).call(e,8,-1);"Object"===A&&g.constructor&&(A=g.constructor.name);if("Map"===A||"Set"===A)return hA(g);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return vC(g,t)}(g))){var t=0,e=function(){};return{s:e,n:function(){return t>=g.length?{done:!0}:{done:!1,value:g[t++]}},e:function(g){throw g},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var A,I,C=!0,i=!1;return{s:function(){A=Ht(g)},n:function(){var g=A.next();return C=g.done,g},e:function(g){i=!0,I=g},f:function(){try{C||null==A.return||A.return()}finally{if(i)throw I}}}}function vC(g,t){(null==t||t>g.length)&&(t=g.length);for(var e=0,A=new Array(t);e<t;e++)A[e]=g[e];return A}function yC(g,t){var e=GA(g);if(xA){var A=xA(g);t&&(A=bI(A).call(A,(function(t){return wA(g,t).enumerable}))),e.push.apply(e,A)}return e}function mC(g){for(var t=1;t<arguments.length;t++){var e,A=null!=arguments[t]?arguments[t]:{};if(t%2)tI(e=yC(Object(A),!0)).call(e,(function(t){ZA(g,t,A[t])}));else if(vA)fA(g,vA(A));else{var I;tI(I=yC(Object(A))).call(I,(function(t){uA(g,t,wA(A,t))}))}}return g}
/**
	 * vis-util
	 * https://github.com/visjs/vis-util
	 *
	 * utilitie collection for visjs
	 *
	 * @version 4.0.0
	 * @date    2020-02-29T15:35:13.178Z
	 *
	 * @copyright (c) 2011-2017 Almende B.V, http://almende.com
	 * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
	 *
	 * @license
	 * vis.js is dual licensed under both
	 *
	 *   1. The Apache 2.0 License
	 *      http://www.apache.org/licenses/LICENSE-2.0
	 *
	 *   and
	 *
	 *   2. The MIT License
	 *      http://opensource.org/licenses/MIT
	 *
	 * vis.js may be distributed under either license.
	 */function bC(){for(var g=arguments.length,t=new Array(g),e=0;e<g;e++)t[e]=arguments[e];return wC(t.length?t:[fC()])}function wC(g){var t=function(){for(var g=xC(),t=g(" "),e=g(" "),A=g(" "),I=0;I<arguments.length;I++)(t-=g(I<0||arguments.length<=I?void 0:arguments[I]))<0&&(t+=1),(e-=g(I<0||arguments.length<=I?void 0:arguments[I]))<0&&(e+=1),(A-=g(I<0||arguments.length<=I?void 0:arguments[I]))<0&&(A+=1);return[t,e,A]}(g),e=uC(t,3),A=e[0],I=e[1],C=e[2],i=1,n=function(){var g=2091639*A+2.3283064365386963e-10*i;return A=I,I=C,C=g-(i=0|g)};return n.uint32=function(){return 4294967296*n()},n.fract53=function(){return n()+11102230246251565e-32*(2097152*n()|0)},n.algorithm="Alea",n.seed=g,n.version="0.9",n}function xC(){var g=4022871197;return function(t){for(var e=t.toString(),A=0;A<e.length;A++){var I=.02519603282416938*(g+=e.charCodeAt(A));I-=g=I>>>0,g=(I*=g)>>>0,g+=4294967296*(I-=g)}return 2.3283064365386963e-10*(g>>>0)}}var kC=/^\/?Date\((-?\d+)/i,DC=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,OC=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,NC=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,ZC=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function MC(g){return g instanceof Number||"number"==typeof g}function EC(g){if(g)for(;!0===g.hasChildNodes();){var t=g.firstChild;t&&(EC(t),g.removeChild(t))}}function GC(g){return g instanceof String||"string"==typeof g}function TC(g){return"object"===dC(g)&&null!==g}function BC(g,t,e,A){var I=!1;!0===A&&(I=null===t[e]&&void 0!==g[e]),I?delete g[e]:g[e]=t[e]}function RC(g,t){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var A in g)if(void 0!==t[A])if(null===t[A]||"object"!==dC(t[A]))BC(g,t,A,e);else{var I=g[A],C=t[A];TC(I)&&TC(C)&&RC(I,C,e)}}var FC=rC;function SC(g,t,e){var A=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(CC(e))throw new TypeError("Arrays are not supported by deepExtend");for(var I=0;I<g.length;I++){var C=g[I];if(Object.prototype.hasOwnProperty.call(e,C))if(e[C]&&e[C].constructor===Object)void 0===t[C]&&(t[C]={}),t[C].constructor===Object?QC(t[C],e[C],!1,A):BC(t,e,C,A);else{if(CC(e[C]))throw new TypeError("Arrays are not supported by deepExtend");BC(t,e,C,A)}}return t}function LC(g,t,e){var A=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(CC(e))throw new TypeError("Arrays are not supported by deepExtend");for(var I in e)if(Object.prototype.hasOwnProperty.call(e,I)&&-1===IC(g).call(g,I))if(e[I]&&e[I].constructor===Object)void 0===t[I]&&(t[I]={}),t[I].constructor===Object?QC(t[I],e[I]):BC(t,e,I,A);else if(CC(e[I])){t[I]=[];for(var C=0;C<e[I].length;C++)t[I].push(e[I][C])}else BC(t,e,I,A);return t}function QC(g,t){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],A=arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var I in t)if(Object.prototype.hasOwnProperty.call(t,I)||!0===e)if("object"===dC(t[I])&&null!==t[I]&&JI(t[I])===Object.prototype)void 0===g[I]?g[I]=QC({},t[I],e):"object"===dC(g[I])&&null!==g[I]&&JI(g[I])===Object.prototype?QC(g[I],t[I],e):BC(g,t,I,A);else if(CC(t[I])){var C;g[I]=UI(C=t[I]).call(C)}else BC(g,t,I,A);return g}function YC(g){var t=dC(g);return"object"===t?null===g?"null":g instanceof Boolean?"Boolean":g instanceof Number?"Number":g instanceof String?"String":CC(g)?"Array":g instanceof Date?"Date":"Object":"number"===t?"Number":"boolean"===t?"Boolean":"string"===t?"String":void 0===t?"undefined":t}function WC(g,t){var e;return kI(e=[]).call(e,XI(g),[t])}function zC(g){return UI(g).call(g)}function PC(g){return g.getBoundingClientRect().left}function jC(g){return g.getBoundingClientRect().top}function VC(g,t){if(CC(g))for(var e=g.length,A=0;A<e;A++)t(g[A],A,g);else for(var I in g)Object.prototype.hasOwnProperty.call(g,I)&&t(g[I],I,g)}var XC=uI;function UC(g,t,e,A){var I;g.addEventListener?(void 0===A&&(A=!1),"mousewheel"===t&&IC(I=navigator.userAgent).call(I,"Firefox")>=0&&(t="DOMMouseScroll"),g.addEventListener(t,e,A)):g.attachEvent("on"+t,e)}function _C(g,t,e,A){var I;g.removeEventListener?(void 0===A&&(A=!1),"mousewheel"===t&&IC(I=navigator.userAgent).call(I,"Firefox")>=0&&(t="DOMMouseScroll"),g.removeEventListener(t,e,A)):g.detachEvent("on"+t,e)}var HC={asBoolean:function(g,t){return"function"==typeof g&&(g=g()),null!=g?0!=g:t||null},asNumber:function(g,t){return"function"==typeof g&&(g=g()),null!=g?Number(g)||t||null:t||null},asString:function(g,t){return"function"==typeof g&&(g=g()),null!=g?String(g):t||null},asSize:function(g,t){return"function"==typeof g&&(g=g()),GC(g)?g:MC(g)?g+"px":t||null},asElement:function(g,t){return"function"==typeof g&&(g=g()),g||t||null}};function JC(g){var t;switch(g.length){case 3:case 4:return(t=OC.exec(g))?{r:dI(t[1]+t[1],16),g:dI(t[2]+t[2],16),b:dI(t[3]+t[3],16)}:null;case 6:case 7:return(t=DC.exec(g))?{r:dI(t[1],16),g:dI(t[2],16),b:dI(t[3],16)}:null;default:return null}}function KC(g,t){if(-1!==IC(g).call(g,"rgba"))return g;if(-1!==IC(g).call(g,"rgb")){var e=g.substr(IC(g).call(g,"(")+1).replace(")","").split(",");return"rgba("+e[0]+","+e[1]+","+e[2]+","+t+")"}var A=JC(g);return null==A?g:"rgba("+A.r+","+A.g+","+A.b+","+t+")"}function qC(g,t,e){var A;return"#"+UI(A=((1<<24)+(g<<16)+(t<<8)+e).toString(16)).call(A,1)}function $C(g,t){if(GC(g)){var e=g;if(ni(e)){var A,I=nI(A=e.substr(4).substr(0,e.length-5).split(",")).call(A,(function(g){return dI(g)}));e=qC(I[0],I[1],I[2])}if(!0===ii(e)){var C=Ci(e),i={h:C.h,s:.8*C.s,v:Math.min(1,1.02*C.v)},n={h:C.h,s:Math.min(1,1.25*C.s),v:.8*C.v},o=Ii(n.h,n.s,n.v),r=Ii(i.h,i.s,i.v);return{background:e,border:o,highlight:{background:r,border:o},hover:{background:r,border:o}}}return{background:e,border:e,highlight:{background:e,border:e},hover:{background:e,border:e}}}return t?{background:g.background||t.background,border:g.border||t.border,highlight:GC(g.highlight)?{border:g.highlight,background:g.highlight}:{background:g.highlight&&g.highlight.background||t.highlight.background,border:g.highlight&&g.highlight.border||t.highlight.border},hover:GC(g.hover)?{border:g.hover,background:g.hover}:{border:g.hover&&g.hover.border||t.hover.border,background:g.hover&&g.hover.background||t.hover.background}}:{background:g.background||void 0,border:g.border||void 0,highlight:GC(g.highlight)?{border:g.highlight,background:g.highlight}:{background:g.highlight&&g.highlight.background||void 0,border:g.highlight&&g.highlight.border||void 0},hover:GC(g.hover)?{border:g.hover,background:g.hover}:{border:g.hover&&g.hover.border||void 0,background:g.hover&&g.hover.background||void 0}}}function gi(g,t,e){g/=255,t/=255,e/=255;var A=Math.min(g,Math.min(t,e)),I=Math.max(g,Math.max(t,e));return A===I?{h:0,s:0,v:A}:{h:60*((g===A?3:e===A?1:5)-(g===A?t-e:e===A?g-t:e-g)/(I-A))/360,s:(I-A)/I,v:I}}var ti=function(g){var t,e={};return tI(t=g.split(";")).call(t,(function(g){if(""!=zA(g).call(g)){var t,A,I=g.split(":"),C=zA(t=I[0]).call(t),i=zA(A=I[1]).call(A);e[C]=i}})),e},ei=function(g){var t;return nI(t=GA(g)).call(t,(function(t){return t+": "+g[t]})).join("; ")};function Ai(g,t,e){var A,I,C,i=Math.floor(6*g),n=6*g-i,o=e*(1-t),r=e*(1-n*t),s=e*(1-(1-n)*t);switch(i%6){case 0:A=e,I=s,C=o;break;case 1:A=r,I=e,C=o;break;case 2:A=o,I=e,C=s;break;case 3:A=o,I=r,C=e;break;case 4:A=s,I=o,C=e;break;case 5:A=e,I=o,C=r}return{r:Math.floor(255*A),g:Math.floor(255*I),b:Math.floor(255*C)}}function Ii(g,t,e){var A=Ai(g,t,e);return qC(A.r,A.g,A.b)}function Ci(g){var t=JC(g);if(!t)throw new TypeError("'".concat(g,"' is not a valid color."));return gi(t.r,t.g,t.b)}function ii(g){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(g)}function ni(g){return NC.test(g)}function oi(g){return ZC.test(g)}function ri(g){if(null===g||"object"!==dC(g))return null;if(g instanceof Element)return g;var t=OA(g);for(var e in g)Object.prototype.hasOwnProperty.call(g,e)&&"object"==dC(g[e])&&(t[e]=ri(g[e]));return t}function si(g,t,e){var A=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},I=function(g){return null!=g},C=function(g){return null!==g&&"object"===dC(g)},i=function(g){for(var t in g)if(Object.prototype.hasOwnProperty.call(g,t))return!1;return!0};if(!C(g))throw new Error("Parameter mergeTarget must be an object");if(!C(t))throw new Error("Parameter options must be an object");if(!I(e))throw new Error("Parameter option must have a value");if(!C(A))throw new Error("Parameter globalOptions must be an object");var n=function(g,t,e){C(g[e])||(g[e]={});var A=t[e],I=g[e];for(var i in A)Object.prototype.hasOwnProperty.call(A,i)&&(I[i]=A[i])},o=t[e],r=C(A)&&!i(A),s=r?A[e]:void 0,a=s?s.enabled:void 0;if(void 0!==o){if("boolean"==typeof o)return C(g[e])||(g[e]={}),void(g[e].enabled=o);if(null===o&&!C(g[e])){if(!I(s))return;g[e]=OA(s)}if(C(o)){var d=!0;void 0!==o.enabled?d=o.enabled:void 0!==a&&(d=s.enabled),n(g,t,e),g[e].enabled=d}}}var ai={linear:function(g){return g},easeInQuad:function(g){return g*g},easeOutQuad:function(g){return g*(2-g)},easeInOutQuad:function(g){return g<.5?2*g*g:(4-2*g)*g-1},easeInCubic:function(g){return g*g*g},easeOutCubic:function(g){return--g*g*g+1},easeInOutCubic:function(g){return g<.5?4*g*g*g:(g-1)*(2*g-2)*(2*g-2)+1},easeInQuart:function(g){return g*g*g*g},easeOutQuart:function(g){return 1- --g*g*g*g},easeInOutQuart:function(g){return g<.5?8*g*g*g*g:1-8*--g*g*g*g},easeInQuint:function(g){return g*g*g*g*g},easeOutQuint:function(g){return 1+--g*g*g*g*g},easeInOutQuint:function(g){return g<.5?16*g*g*g*g*g:1+16*--g*g*g*g*g}};function di(g,t){var e;CC(t)||(t=[t]);var A,I=pC(g);try{for(I.s();!(A=I.n()).done;){var C=A.value;if(C){e=C[t[0]];for(var i=1;i<t.length;i++)e&&(e=e[t[i]]);if(void 0!==e)break}}}catch(g){I.e(g)}finally{I.f()}return e}var li=Object.freeze({__proto__:null,Alea:bC,HSVToHex:Ii,HSVToRGB:Ai,RGBToHSV:gi,RGBToHex:qC,addClassName:function(g,t){var e=g.className.split(" "),A=t.split(" ");e=kI(e).call(e,bI(A).call(A,(function(g){return IC(e).call(e,g)<0}))),g.className=e.join(" ")},addCssText:function(g,t){var e=ti(g.style.cssText),A=ti(t),I=mC(mC({},e),A);g.style.cssText=ei(I)},addEventListener:UC,binarySearchCustom:function(g,t,e,A){for(var I=0,C=0,i=g.length-1;C<=i&&I<1e4;){var n=Math.floor((C+i)/2),o=g[n],r=t(void 0===A?o[e]:o[e][A]);if(0==r)return n;-1==r?C=n+1:i=n-1,I++}return-1},binarySearchValue:function(g,t,e,A,I){var C,i,n,o,r=0,s=0,a=g.length-1;for(I=null!=I?I:function(g,t){return g==t?0:g<t?-1:1};s<=a&&r<1e4;){if(o=Math.floor(.5*(a+s)),C=g[Math.max(0,o-1)][e],i=g[o][e],n=g[Math.min(g.length-1,o+1)][e],0==I(i,t))return o;if(I(C,t)<0&&I(i,t)>0)return"before"==A?Math.max(0,o-1):o;if(I(i,t)<0&&I(n,t)>0)return"before"==A?o:Math.min(g.length-1,o+1);I(i,t)<0?s=o+1:a=o-1,r++}return-1},bridgeObject:ri,copyAndExtendArray:WC,copyArray:zC,deepExtend:QC,easingFunctions:ai,equalArray:function(g,t){if(g.length!==t.length)return!1;for(var e=0,A=g.length;e<A;e++)if(g[e]!=t[e])return!1;return!0},extend:FC,fillIfDefined:RC,forEach:VC,getAbsoluteLeft:PC,getAbsoluteRight:function(g){return g.getBoundingClientRect().right},getAbsoluteTop:jC,getScrollBarWidth:function(){var g=document.createElement("p");g.style.width="100%",g.style.height="200px";var t=document.createElement("div");t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.appendChild(g),document.body.appendChild(t);var e=g.offsetWidth;t.style.overflow="scroll";var A=g.offsetWidth;return e==A&&(A=t.clientWidth),document.body.removeChild(t),e-A},getTarget:function(){var g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event,t=null;return g&&(g.target?t=g.target:g.srcElement&&(t=g.srcElement)),t instanceof Element&&(null==t.nodeType||3!=t.nodeType||(t=t.parentNode)instanceof Element)?t:null},getType:YC,hasParent:function(g,t){for(var e=g;e;){if(e===t)return!0;if(!e.parentNode)return!1;e=e.parentNode}return!1},hexToHSV:Ci,hexToRGB:JC,insertSort:function(g,t){for(var e=0;e<g.length;e++){var A=g[e],I=void 0;for(I=e;I>0&&t(A,g[I-1])<0;I--)g[I]=g[I-1];g[I]=A}return g},isDate:function(g){if(g instanceof Date)return!0;if(GC(g)){if(kC.exec(g))return!0;if(!isNaN(Date.parse(g)))return!0}return!1},isNumber:MC,isObject:TC,isString:GC,isValidHex:ii,isValidRGB:ni,isValidRGBA:oi,mergeOptions:si,option:HC,overrideOpacity:KC,parseColor:$C,preventDefault:function(g){g||(g=window.event),g&&(g.preventDefault?g.preventDefault():g.returnValue=!1)},recursiveDOMDelete:EC,removeClassName:function(g,t){var e=g.className.split(" "),A=t.split(" ");e=bI(e).call(e,(function(g){return IC(A).call(A,g)<0})),g.className=e.join(" ")},removeCssText:function(g,t){var e=ti(g.style.cssText),A=ti(t);for(var I in A)Object.prototype.hasOwnProperty.call(A,I)&&delete e[I];g.style.cssText=ei(e)},removeEventListener:_C,selectiveBridgeObject:function(g,t){if(null!==t&&"object"===dC(t)){for(var e=OA(t),A=0;A<g.length;A++)Object.prototype.hasOwnProperty.call(t,g[A])&&"object"==dC(t[g[A]])&&(e[g[A]]=ri(t[g[A]]));return e}return null},selectiveDeepExtend:SC,selectiveExtend:function(g,t){if(!CC(g))throw new Error("Array with property names expected as first argument");for(var e=arguments.length,A=new Array(e>2?e-2:0),I=2;I<e;I++)A[I-2]=arguments[I];for(var C=0,i=A;C<i.length;C++)for(var n=i[C],o=0;o<g.length;o++){var r=g[o];n&&Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},selectiveNotDeepExtend:LC,throttle:function(g){var t=!1;return function(){t||(t=!0,requestAnimationFrame((function(){t=!1,g()})))}},toArray:XC,topMost:di,updateProperty:function(g,t,e){return g[t]!==e&&(g[t]=e,!0)}}),hi=ne("splice"),ci=UA("splice",{ACCESSORS:!0,0:0,1:2}),ui=Math.max,fi=Math.min;X({target:"Array",proto:!0,forced:!hi||!ci},{splice:function(g,t){var e,A,I,C,i,n,o=Bg(this),r=qg(o.length),s=tt(g,r),a=arguments.length;if(0===a?e=A=0:1===a?(e=0,A=r-s):(e=a-2,A=fi(ui(Jg(t),0),r-s)),r+e-A>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(I=ge(o,A),C=0;C<A;C++)(i=s+C)in o&&qt(I,C,o[i]);if(I.length=A,e<A){for(C=s;C<r-A;C++)n=C+e,(i=C+A)in o?o[n]=o[i]:delete o[n];for(C=r;C>r-A+e;C--)delete o[C-1]}else if(e>A)for(C=r-A;C>s;C--)n=C+e-1,(i=C+A-1)in o?o[n]=o[i]:delete o[n];for(C=0;C<e;C++)o[C+s]=arguments[C+2];return o.length=r-A+e,I}});var pi=K("Array").splice,vi=Array.prototype,yi=function(g){var t=g.splice;return g===vi||g instanceof Array&&t===vi.splice?pi:t},mi=At.includes,bi=UA("indexOf",{ACCESSORS:!0,1:0});X({target:"Array",proto:!0,forced:!bi},{includes:function(g){return mi(this,g,arguments.length>1?arguments[1]:void 0)}});var wi=K("Array").includes,xi=jg("match"),ki=function(g){if(function(g){var t;return y(g)&&(void 0!==(t=g[xi])?!!t:"RegExp"==c(g))}(g))throw TypeError("The method doesn't accept regular expressions");return g},Di=jg("match");X({target:"String",proto:!0,forced:!function(g){var t=/./;try{"/./"[g](t)}catch(e){try{return t[Di]=!1,"/./"[g](t)}catch(g){}}return!1}("includes")},{includes:function(g){return!!~String(p(this)).indexOf(ki(g),arguments.length>1?arguments[1]:void 0)}});var Oi=K("String").includes,Ni=Array.prototype,Zi=String.prototype,Mi=function(g){var t=g.includes;return g===Ni||g instanceof Array&&t===Ni.includes?wi:"string"==typeof g||g===Zi||g instanceof String&&t===Zi.includes?Oi:t};function Ei(g){return Qi=g,function(){var g={};Yi=0,void(Wi=Qi.charAt(0)),$i(),"strict"===zi&&(g.strict=!0,$i());"graph"!==zi&&"digraph"!==zi||(g.type=zi,$i());Pi===Fi&&(g.id=zi,$i());if("{"!=zi)throw Cn("Angle bracket { expected");if($i(),gn(g),"}"!=zi)throw Cn("Angle bracket } expected");if($i(),""!==zi)throw Cn("End of file expected");return $i(),delete g.node,delete g.edge,delete g.graph,g}()}var Gi={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},Ti=OA(Gi);Ti.color="color.color",Ti.style="dashes";var Bi=0,Ri=1,Fi=2,Si=3,Li={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},Qi="",Yi=0,Wi="",zi="",Pi=Bi;function ji(){Yi++,Wi=Qi.charAt(Yi)}function Vi(){return Qi.charAt(Yi+1)}var Xi=/[a-zA-Z_0-9.:#]/;function Ui(g){return Xi.test(g)}function _i(g,t){if(g||(g={}),t)for(var e in t)t.hasOwnProperty(e)&&(g[e]=t[e]);return g}function Hi(g,t,e){for(var A=t.split("."),I=g;A.length;){var C=A.shift();A.length?(I[C]||(I[C]={}),I=I[C]):I[C]=e}}function Ji(g,t){for(var e,A,I=null,C=[g],i=g;i.parent;)C.push(i.parent),i=i.parent;if(i.nodes)for(e=0,A=i.nodes.length;e<A;e++)if(t.id===i.nodes[e].id){I=i.nodes[e];break}for(I||(I={id:t.id},g.node&&(I.attr=_i(I.attr,g.node))),e=C.length-1;e>=0;e--){var n,o=C[e];o.nodes||(o.nodes=[]),-1===IC(n=o.nodes).call(n,I)&&o.nodes.push(I)}t.attr&&(I.attr=_i(I.attr,t.attr))}function Ki(g,t){if(g.edges||(g.edges=[]),g.edges.push(t),g.edge){var e=_i({},g.edge);t.attr=_i(e,t.attr)}}function qi(g,t,e,A,I){var C={from:t,to:e,type:A};return g.edge&&(C.attr=_i({},g.edge)),C.attr=_i(C.attr||{},I),null!=I&&I.hasOwnProperty("arrows")&&null!=I.arrows&&(C.arrows={to:{enabled:!0,type:I.arrows.type}},I.arrows=null),C}function $i(){for(Pi=Bi,zi="";" "===Wi||"\t"===Wi||"\n"===Wi||"\r"===Wi;)ji();do{var g=!1;if("#"===Wi){for(var t=Yi-1;" "===Qi.charAt(t)||"\t"===Qi.charAt(t);)t--;if("\n"===Qi.charAt(t)||""===Qi.charAt(t)){for(;""!=Wi&&"\n"!=Wi;)ji();g=!0}}if("/"===Wi&&"/"===Vi()){for(;""!=Wi&&"\n"!=Wi;)ji();g=!0}if("/"===Wi&&"*"===Vi()){for(;""!=Wi;){if("*"===Wi&&"/"===Vi()){ji(),ji();break}ji()}g=!0}for(;" "===Wi||"\t"===Wi||"\n"===Wi||"\r"===Wi;)ji()}while(g);if(""!==Wi){var e=Wi+Vi();if(Li[e])return Pi=Ri,zi=e,ji(),void ji();if(Li[Wi])return Pi=Ri,zi=Wi,void ji();if(Ui(Wi)||"-"===Wi){for(zi+=Wi,ji();Ui(Wi);)zi+=Wi,ji();return"false"===zi?zi=!1:"true"===zi?zi=!0:isNaN(Number(zi))||(zi=Number(zi)),void(Pi=Fi)}if('"'===Wi){for(ji();""!=Wi&&('"'!=Wi||'"'===Wi&&'"'===Vi());)'"'===Wi?(zi+=Wi,ji()):"\\"===Wi&&"n"===Vi()?(zi+="\n",ji()):zi+=Wi,ji();if('"'!=Wi)throw Cn('End of string " expected');return ji(),void(Pi=Fi)}for(Pi=Si;""!=Wi;)zi+=Wi,ji();throw new SyntaxError('Syntax error in part "'+nn(zi,30)+'"')}Pi=Ri}function gn(g){for(;""!==zi&&"}"!=zi;)tn(g),";"===zi&&$i()}function tn(g){var t=en(g);if(t)An(g,t);else if(!function(g){if("node"===zi)return $i(),g.node=In(),"node";if("edge"===zi)return $i(),g.edge=In(),"edge";if("graph"===zi)return $i(),g.graph=In(),"graph";return null}(g)){if(Pi!=Fi)throw Cn("Identifier expected");var e=zi;if($i(),"="===zi){if($i(),Pi!=Fi)throw Cn("Identifier expected");g[e]=zi,$i()}else!function(g,t){var e={id:t},A=In();A&&(e.attr=A);Ji(g,e),An(g,t)}(g,e)}}function en(g){var t=null;if("subgraph"===zi&&((t={}).type="subgraph",$i(),Pi===Fi&&(t.id=zi,$i())),"{"===zi){if($i(),t||(t={}),t.parent=g,t.node=g.node,t.edge=g.edge,t.graph=g.graph,gn(t),"}"!=zi)throw Cn("Angle bracket } expected");$i(),delete t.node,delete t.edge,delete t.graph,delete t.parent,g.subgraphs||(g.subgraphs=[]),g.subgraphs.push(t)}return t}function An(g,t){for(;"->"===zi||"--"===zi;){var e,A=zi;$i();var I=en(g);if(I)e=I;else{if(Pi!=Fi)throw Cn("Identifier or subgraph expected");Ji(g,{id:e=zi}),$i()}Ki(g,qi(g,t,e,A,In())),t=e}}function In(){for(var g,t,e=null,A={dashed:!0,solid:!1,dotted:[1,5]},I={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},C=new Array,i=new Array;"["===zi;){for($i(),e={};""!==zi&&"]"!=zi;){if(Pi!=Fi)throw Cn("Attribute name expected");var n=zi;if($i(),"="!=zi)throw Cn("Equal sign = expected");if($i(),Pi!=Fi)throw Cn("Attribute value expected");var o=zi;"style"===n&&(o=A[o]),"arrowhead"===n&&(n="arrows",o={to:{enabled:!0,type:I[o]}}),"arrowtail"===n&&(n="arrows",o={from:{enabled:!0,type:I[o]}}),C.push({attr:e,name:n,value:o}),i.push(n),$i(),","==zi&&$i()}if("]"!=zi)throw Cn("Bracket ] expected");$i()}if(Mi(i).call(i,"dir")){var r={arrows:{}};for(g=0;g<C.length;g++)if("arrows"===C[g].name)if(null!=C[g].value.to)r.arrows.to=g;else{if(null==C[g].value.from)throw Cn("Invalid value of arrows");r.arrows.from=g}else"dir"===C[g].name&&(r.dir=g);var s,a,d=C[r.dir].value;if(!Mi(i).call(i,"arrows"))if("both"===d)C.push({attr:C[r.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),r.arrows.to=C.length-1,C.push({attr:C[r.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),r.arrows.from=C.length-1;else if("forward"===d)C.push({attr:C[r.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),r.arrows.to=C.length-1;else if("back"===d)C.push({attr:C[r.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),r.arrows.from=C.length-1;else{if("none"!==d)throw Cn('Invalid dir type "'+d+'"');C.push({attr:C[r.dir].attr,name:"arrows",value:""}),r.arrows.to=C.length-1}if("both"===d)r.arrows.to&&r.arrows.from?(a=C[r.arrows.to].value.to.type,s=C[r.arrows.from].value.from.type,C[r.arrows.to]={attr:C[r.arrows.to].attr,name:C[r.arrows.to].name,value:{to:{enabled:!0,type:a},from:{enabled:!0,type:s}}},yi(C).call(C,r.arrows.from,1)):r.arrows.to?(a=C[r.arrows.to].value.to.type,s="arrow",C[r.arrows.to]={attr:C[r.arrows.to].attr,name:C[r.arrows.to].name,value:{to:{enabled:!0,type:a},from:{enabled:!0,type:s}}}):r.arrows.from&&(a="arrow",s=C[r.arrows.from].value.from.type,C[r.arrows.from]={attr:C[r.arrows.from].attr,name:C[r.arrows.from].name,value:{to:{enabled:!0,type:a},from:{enabled:!0,type:s}}});else if("back"===d)r.arrows.to&&r.arrows.from?(a="",s=C[r.arrows.from].value.from.type,C[r.arrows.from]={attr:C[r.arrows.from].attr,name:C[r.arrows.from].name,value:{to:{enabled:!0,type:a},from:{enabled:!0,type:s}}}):r.arrows.to?(a="",s="arrow",r.arrows.from=r.arrows.to,C[r.arrows.from]={attr:C[r.arrows.from].attr,name:C[r.arrows.from].name,value:{to:{enabled:!0,type:a},from:{enabled:!0,type:s}}}):r.arrows.from&&(a="",s=C[r.arrows.from].value.from.type,C[r.arrows.to]={attr:C[r.arrows.from].attr,name:C[r.arrows.from].name,value:{to:{enabled:!0,type:a},from:{enabled:!0,type:s}}}),C[r.arrows.from]={attr:C[r.arrows.from].attr,name:C[r.arrows.from].name,value:{from:{enabled:!0,type:C[r.arrows.from].value.from.type}}};else if("none"===d){var l;C[l=r.arrows.to?r.arrows.to:r.arrows.from]={attr:C[l].attr,name:C[l].name,value:""}}else{if("forward"!==d)throw Cn('Invalid dir type "'+d+'"');r.arrows.to&&r.arrows.from||r.arrows.to?(a=C[r.arrows.to].value.to.type,s="",C[r.arrows.to]={attr:C[r.arrows.to].attr,name:C[r.arrows.to].name,value:{to:{enabled:!0,type:a},from:{enabled:!0,type:s}}}):r.arrows.from&&(a="arrow",s="",r.arrows.to=r.arrows.from,C[r.arrows.to]={attr:C[r.arrows.to].attr,name:C[r.arrows.to].name,value:{to:{enabled:!0,type:a},from:{enabled:!0,type:s}}}),C[r.arrows.to]={attr:C[r.arrows.to].attr,name:C[r.arrows.to].name,value:{to:{enabled:!0,type:C[r.arrows.to].value.to.type}}}}yi(C).call(C,r.dir,1)}if(Mi(i).call(i,"penwidth")){var h=[];for(t=C.length,g=0;g<t;g++)"width"!==C[g].name&&("penwidth"===C[g].name&&(C[g].name="width"),h.push(C[g]));C=h}for(t=C.length,g=0;g<t;g++)Hi(C[g].attr,C[g].name,C[g].value);return e}function Cn(g){return new SyntaxError(g+', got "'+nn(zi,30)+'" (char '+Yi+")")}function nn(g,t){return g.length<=t?g:g.substr(0,27)+"..."}function on(g,t,e){for(var A=t.split("."),I=A.pop(),C=g,i=0;i<A.length;i++){var n=A[i];n in C||(C[n]={}),C=C[n]}return C[I]=e,g}function rn(g,t){var e={};for(var A in g)if(g.hasOwnProperty(A)){var I=t[A];CC(I)?tI(I).call(I,(function(t){on(e,t,g[A])})):on(e,"string"==typeof I?I:A,g[A])}return e}var sn=Ei,an=function(g){var t,e=Ei(g),A={nodes:[],edges:[],options:{}};if(e.nodes&&tI(t=e.nodes).call(t,(function(g){var t={id:g.id,label:String(g.label||g.id)};_i(t,rn(g.attr,Gi)),t.image&&(t.shape="image"),A.nodes.push(t)})),e.edges){var I,C=function(g){var t={from:g.from,to:g.to};return _i(t,rn(g.attr,Ti)),null==t.arrows&&"->"===g.type&&(t.arrows="to"),t};tI(I=e.edges).call(I,(function(g){var t,e,I,i,n,o,r;(t=g.from instanceof Object?g.from.nodes:{id:g.from},e=g.to instanceof Object?g.to.nodes:{id:g.to},g.from instanceof Object&&g.from.edges)&&tI(I=g.from.edges).call(I,(function(g){var t=C(g);A.edges.push(t)}));(n=e,o=function(t,e){var I=qi(A,t.id,e.id,g.type,g.attr),i=C(I);A.edges.push(i)},CC(i=t)?tI(i).call(i,(function(g){CC(n)?tI(n).call(n,(function(t){o(g,t)})):o(g,n)})):CC(n)?tI(n).call(n,(function(g){o(i,g)})):o(i,n),g.to instanceof Object&&g.to.edges)&&tI(r=g.to.edges).call(r,(function(g){var t=C(g);A.edges.push(t)}))}))}return e.attr&&(A.options=e.attr),A},dn={parseDOT:sn,DOTToGraph:an},ln=Object.freeze({__proto__:null,default:dn,__moduleExports:dn,parseDOT:sn,DOTToGraph:an});function hn(g,t){var e,A={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};null!=t&&(null!=t.fixed&&(A.nodes.fixed=t.fixed),null!=t.parseColor&&(A.nodes.parseColor=t.parseColor),null!=t.inheritColor&&(A.edges.inheritColor=t.inheritColor));var I=g.edges,C=nI(I).call(I,(function(g){var t={from:g.source,id:g.id,to:g.target};return null!=g.attributes&&(t.attributes=g.attributes),null!=g.label&&(t.label=g.label),null!=g.attributes&&null!=g.attributes.title&&(t.title=g.attributes.title),"Directed"===g.type&&(t.arrows="to"),g.color&&!1===A.edges.inheritColor&&(t.color=g.color),t}));return{nodes:nI(e=g.nodes).call(e,(function(g){var t={id:g.id,fixed:A.nodes.fixed&&null!=g.x&&null!=g.y};return null!=g.attributes&&(t.attributes=g.attributes),null!=g.label&&(t.label=g.label),null!=g.size&&(t.size=g.size),null!=g.attributes&&null!=g.attributes.title&&(t.title=g.attributes.title),null!=g.title&&(t.title=g.title),null!=g.x&&(t.x=g.x),null!=g.y&&(t.y=g.y),null!=g.color&&(!0===A.nodes.parseColor?t.color=g.color:t.color={background:g.color,border:g.color,highlight:{background:g.color,border:g.color},hover:{background:g.color,border:g.color}}),t})),edges:C}}var cn=Object.freeze({__proto__:null,parseGephi:hn});function un(g,t){void 0===t&&(t={});var e=t.insertAt;if(g&&"undefined"!=typeof document){var A=document.head||document.getElementsByTagName("head")[0],I=document.createElement("style");I.type="text/css","top"===e&&A.firstChild?A.insertBefore(I,A.firstChild):A.appendChild(I),I.styleSheet?I.styleSheet.cssText=g:I.appendChild(document.createTextNode(g))}}var fn=".vis-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10}.vis-active{box-shadow:0 0 10px #86d5f8}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkFjdGl2YXRvci5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsYUFDRSxpQkFBa0IsQ0FDbEIsS0FBUSxDQUNSLE9BQVUsQ0FDVixRQUFXLENBQ1gsTUFBUyxDQUdULFVBQ0YsQ0FFQSxZQUNFLDJCQUNGIiwiZmlsZSI6IkFjdGl2YXRvci5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyIudmlzLW92ZXJsYXkge1xuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIHRvcDogMHB4O1xuICByaWdodDogMHB4O1xuICBib3R0b206IDBweDtcbiAgbGVmdDogMHB4O1xuXG4gIC8qIE11c3QgYmUgZGlzcGxheWVkIGFib3ZlIGZvciBleGFtcGxlIHNlbGVjdGVkIFRpbWVsaW5lIGl0ZW1zICovXG4gIHotaW5kZXg6IDEwO1xufVxuXG4udmlzLWFjdGl2ZSB7XG4gIGJveC1zaGFkb3c6IDAgMCAxMHB4ICM4NmQ1Zjg7XG59XG4iXX0= */";un(fn);var pn=Object.freeze({__proto__:null,default:fn,stylesheet:".vis-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10}.vis-active{box-shadow:0 0 10px #86d5f8}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkFjdGl2YXRvci5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsYUFDRSxpQkFBa0IsQ0FDbEIsS0FBUSxDQUNSLE9BQVUsQ0FDVixRQUFXLENBQ1gsTUFBUyxDQUdULFVBQ0YsQ0FFQSxZQUNFLDJCQUNGIiwiZmlsZSI6IkFjdGl2YXRvci5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyIudmlzLW92ZXJsYXkge1xuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIHRvcDogMHB4O1xuICByaWdodDogMHB4O1xuICBib3R0b206IDBweDtcbiAgbGVmdDogMHB4O1xuXG4gIC8qIE11c3QgYmUgZGlzcGxheWVkIGFib3ZlIGZvciBleGFtcGxlIHNlbGVjdGVkIFRpbWVsaW5lIGl0ZW1zICovXG4gIHotaW5kZXg6IDEwO1xufVxuXG4udmlzLWFjdGl2ZSB7XG4gIGJveC1zaGFkb3c6IDAgMCAxMHB4ICM4NmQ1Zjg7XG59XG4iXX0= */"}),vn=A((function(g,t){g.exports=function(g){var t,e=g&&g.preventDefault||!1,A=g&&g.container||window,I={},C={keydown:{},keyup:{}},i={};for(t=97;t<=122;t++)i[String.fromCharCode(t)]={code:t-97+65,shift:!1};for(t=65;t<=90;t++)i[String.fromCharCode(t)]={code:t,shift:!0};for(t=0;t<=9;t++)i[""+t]={code:48+t,shift:!1};for(t=1;t<=12;t++)i["F"+t]={code:111+t,shift:!1};for(t=0;t<=9;t++)i["num"+t]={code:96+t,shift:!1};i["num*"]={code:106,shift:!1},i["num+"]={code:107,shift:!1},i["num-"]={code:109,shift:!1},i["num/"]={code:111,shift:!1},i["num."]={code:110,shift:!1},i.left={code:37,shift:!1},i.up={code:38,shift:!1},i.right={code:39,shift:!1},i.down={code:40,shift:!1},i.space={code:32,shift:!1},i.enter={code:13,shift:!1},i.shift={code:16,shift:void 0},i.esc={code:27,shift:!1},i.backspace={code:8,shift:!1},i.tab={code:9,shift:!1},i.ctrl={code:17,shift:!1},i.alt={code:18,shift:!1},i.delete={code:46,shift:!1},i.pageup={code:33,shift:!1},i.pagedown={code:34,shift:!1},i["="]={code:187,shift:!1},i["-"]={code:189,shift:!1},i["]"]={code:221,shift:!1},i["["]={code:219,shift:!1};var n=function(g){r(g,"keydown")},o=function(g){r(g,"keyup")},r=function(g,t){if(void 0!==C[t][g.keyCode]){for(var A=C[t][g.keyCode],I=0;I<A.length;I++)(void 0===A[I].shift||1==A[I].shift&&1==g.shiftKey||0==A[I].shift&&0==g.shiftKey)&&A[I].fn(g);1==e&&g.preventDefault()}};return I.bind=function(g,t,e){if(void 0===e&&(e="keydown"),void 0===i[g])throw new Error("unsupported key: "+g);void 0===C[e][i[g].code]&&(C[e][i[g].code]=[]),C[e][i[g].code].push({fn:t,shift:i[g].shift})},I.bindAll=function(g,t){for(var e in void 0===t&&(t="keydown"),i)i.hasOwnProperty(e)&&I.bind(e,g,t)},I.getKey=function(g){for(var t in i)if(i.hasOwnProperty(t)){if(1==g.shiftKey&&1==i[t].shift&&g.keyCode==i[t].code)return t;if(0==g.shiftKey&&0==i[t].shift&&g.keyCode==i[t].code)return t;if(g.keyCode==i[t].code&&"shift"==t)return t}return"unknown key, currently not supported"},I.unbind=function(g,t,e){if(void 0===e&&(e="keydown"),void 0===i[g])throw new Error("unsupported key: "+g);if(void 0!==t){var A=[],I=C[e][i[g].code];if(void 0!==I)for(var n=0;n<I.length;n++)I[n].fn==t&&I[n].shift==i[g].shift||A.push(C[e][i[g].code][n]);C[e][i[g].code]=A}else C[e][i[g].code]=[]},I.reset=function(){C={keydown:{},keyup:{}}},I.destroy=function(){C={keydown:{},keyup:{}},A.removeEventListener("keydown",n,!0),A.removeEventListener("keyup",o,!0)},A.addEventListener("keydown",n,!0),A.addEventListener("keyup",o,!0),I}}));
/*! Hammer.JS - v2.0.17-rc - 2019-12-16
	 * http://naver.github.io/egjs
	 *
	 * Forked By Naver egjs
	 * Copyright (c) hammerjs
	 * Licensed under the MIT license */
function yn(){return(yn=Object.assign||function(g){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var A in e)Object.prototype.hasOwnProperty.call(e,A)&&(g[A]=e[A])}return g}).apply(this,arguments)}function mn(g,t){g.prototype=Object.create(t.prototype),g.prototype.constructor=g,g.__proto__=t}function bn(g){if(void 0===g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}var wn,xn="function"!=typeof Object.assign?function(g){if(null==g)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(g),e=1;e<arguments.length;e++){var A=arguments[e];if(null!=A)for(var I in A)A.hasOwnProperty(I)&&(t[I]=A[I])}return t}:Object.assign,kn=["","webkit","Moz","MS","ms","o"],Dn="undefined"==typeof document?{style:{}}:document.createElement("div"),On=Math.round,Nn=Math.abs,Zn=Date.now;function Mn(g,t){for(var e,A,I=t[0].toUpperCase()+t.slice(1),C=0;C<kn.length;){if((A=(e=kn[C])?e+I:t)in g)return A;C++}}wn="undefined"==typeof window?{}:window;var En=Mn(Dn.style,"touchAction"),Gn=void 0!==En;var Tn=function(){if(!Gn)return!1;var g={},t=wn.CSS&&wn.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(e){return g[e]=!t||wn.CSS.supports("touch-action",e)})),g}(),Bn="ontouchstart"in wn,Rn=void 0!==Mn(wn,"PointerEvent"),Fn=Bn&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),Sn=["x","y"],Ln=["clientX","clientY"];function Qn(g,t,e){var A;if(g)if(g.forEach)g.forEach(t,e);else if(void 0!==g.length)for(A=0;A<g.length;)t.call(e,g[A],A,g),A++;else for(A in g)g.hasOwnProperty(A)&&t.call(e,g[A],A,g)}function Yn(g,t){return"function"==typeof g?g.apply(t&&t[0]||void 0,t):g}function Wn(g,t){return g.indexOf(t)>-1}var zn=function(){function g(g,t){this.manager=g,this.set(t)}var t=g.prototype;return t.set=function(g){"compute"===g&&(g=this.compute()),Gn&&this.manager.element.style&&Tn[g]&&(this.manager.element.style[En]=g),this.actions=g.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var g=[];return Qn(this.manager.recognizers,(function(t){Yn(t.options.enable,[t])&&(g=g.concat(t.getTouchAction()))})),function(g){if(Wn(g,"none"))return"none";var t=Wn(g,"pan-x"),e=Wn(g,"pan-y");return t&&e?"none":t||e?t?"pan-x":"pan-y":Wn(g,"manipulation")?"manipulation":"auto"}(g.join(" "))},t.preventDefaults=function(g){var t=g.srcEvent,e=g.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var A=this.actions,I=Wn(A,"none")&&!Tn.none,C=Wn(A,"pan-y")&&!Tn["pan-y"],i=Wn(A,"pan-x")&&!Tn["pan-x"];if(I){var n=1===g.pointers.length,o=g.distance<2,r=g.deltaTime<250;if(n&&o&&r)return}if(!i||!C)return I||C&&6&e||i&&24&e?this.preventSrc(t):void 0}},t.preventSrc=function(g){this.manager.session.prevented=!0,g.preventDefault()},g}();function Pn(g,t){for(;g;){if(g===t)return!0;g=g.parentNode}return!1}function jn(g){var t=g.length;if(1===t)return{x:On(g[0].clientX),y:On(g[0].clientY)};for(var e=0,A=0,I=0;I<t;)e+=g[I].clientX,A+=g[I].clientY,I++;return{x:On(e/t),y:On(A/t)}}function Vn(g){for(var t=[],e=0;e<g.pointers.length;)t[e]={clientX:On(g.pointers[e].clientX),clientY:On(g.pointers[e].clientY)},e++;return{timeStamp:Zn(),pointers:t,center:jn(t),deltaX:g.deltaX,deltaY:g.deltaY}}function Xn(g,t,e){e||(e=Sn);var A=t[e[0]]-g[e[0]],I=t[e[1]]-g[e[1]];return Math.sqrt(A*A+I*I)}function Un(g,t,e){e||(e=Sn);var A=t[e[0]]-g[e[0]],I=t[e[1]]-g[e[1]];return 180*Math.atan2(I,A)/Math.PI}function _n(g,t){return g===t?1:Nn(g)>=Nn(t)?g<0?2:4:t<0?8:16}function Hn(g,t,e){return{x:t/g||0,y:e/g||0}}function Jn(g,t){var e=g.session,A=t.pointers,I=A.length;e.firstInput||(e.firstInput=Vn(t)),I>1&&!e.firstMultiple?e.firstMultiple=Vn(t):1===I&&(e.firstMultiple=!1);var C=e.firstInput,i=e.firstMultiple,n=i?i.center:C.center,o=t.center=jn(A);t.timeStamp=Zn(),t.deltaTime=t.timeStamp-C.timeStamp,t.angle=Un(n,o),t.distance=Xn(n,o),function(g,t){var e=t.center,A=g.offsetDelta||{},I=g.prevDelta||{},C=g.prevInput||{};1!==t.eventType&&4!==C.eventType||(I=g.prevDelta={x:C.deltaX||0,y:C.deltaY||0},A=g.offsetDelta={x:e.x,y:e.y}),t.deltaX=I.x+(e.x-A.x),t.deltaY=I.y+(e.y-A.y)}(e,t),t.offsetDirection=_n(t.deltaX,t.deltaY);var r,s,a=Hn(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=a.x,t.overallVelocityY=a.y,t.overallVelocity=Nn(a.x)>Nn(a.y)?a.x:a.y,t.scale=i?(r=i.pointers,Xn((s=A)[0],s[1],Ln)/Xn(r[0],r[1],Ln)):1,t.rotation=i?function(g,t){return Un(t[1],t[0],Ln)+Un(g[1],g[0],Ln)}(i.pointers,A):0,t.maxPointers=e.prevInput?t.pointers.length>e.prevInput.maxPointers?t.pointers.length:e.prevInput.maxPointers:t.pointers.length,function(g,t){var e,A,I,C,i=g.lastInterval||t,n=t.timeStamp-i.timeStamp;if(8!==t.eventType&&(n>25||void 0===i.velocity)){var o=t.deltaX-i.deltaX,r=t.deltaY-i.deltaY,s=Hn(n,o,r);A=s.x,I=s.y,e=Nn(s.x)>Nn(s.y)?s.x:s.y,C=_n(o,r),g.lastInterval=t}else e=i.velocity,A=i.velocityX,I=i.velocityY,C=i.direction;t.velocity=e,t.velocityX=A,t.velocityY=I,t.direction=C}(e,t);var d,l=g.element,h=t.srcEvent;Pn(d=h.composedPath?h.composedPath()[0]:h.path?h.path[0]:h.target,l)&&(l=d),t.target=l}function Kn(g,t,e){var A=e.pointers.length,I=e.changedPointers.length,C=1&t&&A-I==0,i=12&t&&A-I==0;e.isFirst=!!C,e.isFinal=!!i,C&&(g.session={}),e.eventType=t,Jn(g,e),g.emit("hammer.input",e),g.recognize(e),g.session.prevInput=e}function qn(g){return g.trim().split(/\s+/g)}function $n(g,t,e){Qn(qn(t),(function(t){g.addEventListener(t,e,!1)}))}function go(g,t,e){Qn(qn(t),(function(t){g.removeEventListener(t,e,!1)}))}function to(g){var t=g.ownerDocument||g;return t.defaultView||t.parentWindow||window}var eo=function(){function g(g,t){var e=this;this.manager=g,this.callback=t,this.element=g.element,this.target=g.options.inputTarget,this.domHandler=function(t){Yn(g.options.enable,[g])&&e.handler(t)},this.init()}var t=g.prototype;return t.handler=function(){},t.init=function(){this.evEl&&$n(this.element,this.evEl,this.domHandler),this.evTarget&&$n(this.target,this.evTarget,this.domHandler),this.evWin&&$n(to(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&go(this.element,this.evEl,this.domHandler),this.evTarget&&go(this.target,this.evTarget,this.domHandler),this.evWin&&go(to(this.element),this.evWin,this.domHandler)},g}();function Ao(g,t,e){if(g.indexOf&&!e)return g.indexOf(t);for(var A=0;A<g.length;){if(e&&g[A][e]==t||!e&&g[A]===t)return A;A++}return-1}var Io={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},Co={2:"touch",3:"pen",4:"mouse",5:"kinect"},io="pointerdown",no="pointermove pointerup pointercancel";wn.MSPointerEvent&&!wn.PointerEvent&&(io="MSPointerDown",no="MSPointerMove MSPointerUp MSPointerCancel");var oo=function(g){function t(){var e,A=t.prototype;return A.evEl=io,A.evWin=no,(e=g.apply(this,arguments)||this).store=e.manager.session.pointerEvents=[],e}return mn(t,g),t.prototype.handler=function(g){var t=this.store,e=!1,A=g.type.toLowerCase().replace("ms",""),I=Io[A],C=Co[g.pointerType]||g.pointerType,i="touch"===C,n=Ao(t,g.pointerId,"pointerId");1&I&&(0===g.button||i)?n<0&&(t.push(g),n=t.length-1):12&I&&(e=!0),n<0||(t[n]=g,this.callback(this.manager,I,{pointers:t,changedPointers:[g],pointerType:C,srcEvent:g}),e&&t.splice(n,1))},t}(eo);function ro(g){return Array.prototype.slice.call(g,0)}function so(g,t,e){for(var A=[],I=[],C=0;C<g.length;){var i=t?g[C][t]:g[C];Ao(I,i)<0&&A.push(g[C]),I[C]=i,C++}return e&&(A=t?A.sort((function(g,e){return g[t]>e[t]})):A.sort()),A}var ao={touchstart:1,touchmove:2,touchend:4,touchcancel:8},lo=function(g){function t(){var e;return t.prototype.evTarget="touchstart touchmove touchend touchcancel",(e=g.apply(this,arguments)||this).targetIds={},e}return mn(t,g),t.prototype.handler=function(g){var t=ao[g.type],e=ho.call(this,g,t);e&&this.callback(this.manager,t,{pointers:e[0],changedPointers:e[1],pointerType:"touch",srcEvent:g})},t}(eo);function ho(g,t){var e,A,I=ro(g.touches),C=this.targetIds;if(3&t&&1===I.length)return C[I[0].identifier]=!0,[I,I];var i=ro(g.changedTouches),n=[],o=this.target;if(A=I.filter((function(g){return Pn(g.target,o)})),1===t)for(e=0;e<A.length;)C[A[e].identifier]=!0,e++;for(e=0;e<i.length;)C[i[e].identifier]&&n.push(i[e]),12&t&&delete C[i[e].identifier],e++;return n.length?[so(A.concat(n),"identifier",!0),n]:void 0}var co={mousedown:1,mousemove:2,mouseup:4},uo=function(g){function t(){var e,A=t.prototype;return A.evEl="mousedown",A.evWin="mousemove mouseup",(e=g.apply(this,arguments)||this).pressed=!1,e}return mn(t,g),t.prototype.handler=function(g){var t=co[g.type];1&t&&0===g.button&&(this.pressed=!0),2&t&&1!==g.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[g],changedPointers:[g],pointerType:"mouse",srcEvent:g}))},t}(eo);function fo(g){var t=g.changedPointers[0];if(t.identifier===this.primaryTouch){var e={x:t.clientX,y:t.clientY},A=this.lastTouches;this.lastTouches.push(e);setTimeout((function(){var g=A.indexOf(e);g>-1&&A.splice(g,1)}),2500)}}function po(g,t){1&g?(this.primaryTouch=t.changedPointers[0].identifier,fo.call(this,t)):12&g&&fo.call(this,t)}function vo(g){for(var t=g.srcEvent.clientX,e=g.srcEvent.clientY,A=0;A<this.lastTouches.length;A++){var I=this.lastTouches[A],C=Math.abs(t-I.x),i=Math.abs(e-I.y);if(C<=25&&i<=25)return!0}return!1}var yo=function(){return function(g){function t(t,e){var A;return(A=g.call(this,t,e)||this).handler=function(g,t,e){var I="touch"===e.pointerType,C="mouse"===e.pointerType;if(!(C&&e.sourceCapabilities&&e.sourceCapabilities.firesTouchEvents)){if(I)po.call(bn(bn(A)),t,e);else if(C&&vo.call(bn(bn(A)),e))return;A.callback(g,t,e)}},A.touch=new lo(A.manager,A.handler),A.mouse=new uo(A.manager,A.handler),A.primaryTouch=null,A.lastTouches=[],A}return mn(t,g),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(eo)}();function mo(g,t,e){return!!Array.isArray(g)&&(Qn(g,e[t],e),!0)}var bo=1;function wo(g,t){var e=t.manager;return e?e.get(g):g}function xo(g){return 16&g?"cancel":8&g?"end":4&g?"move":2&g?"start":""}var ko=function(){function g(g){void 0===g&&(g={}),this.options=yn({enable:!0},g),this.id=bo++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var t=g.prototype;return t.set=function(g){return xn(this.options,g),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(g){if(mo(g,"recognizeWith",this))return this;var t=this.simultaneous;return t[(g=wo(g,this)).id]||(t[g.id]=g,g.recognizeWith(this)),this},t.dropRecognizeWith=function(g){return mo(g,"dropRecognizeWith",this)||(g=wo(g,this),delete this.simultaneous[g.id]),this},t.requireFailure=function(g){if(mo(g,"requireFailure",this))return this;var t=this.requireFail;return-1===Ao(t,g=wo(g,this))&&(t.push(g),g.requireFailure(this)),this},t.dropRequireFailure=function(g){if(mo(g,"dropRequireFailure",this))return this;g=wo(g,this);var t=Ao(this.requireFail,g);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(g){return!!this.simultaneous[g.id]},t.emit=function(g){var t=this,e=this.state;function A(e){t.manager.emit(e,g)}e<8&&A(t.options.event+xo(e)),A(t.options.event),g.additionalEvent&&A(g.additionalEvent),e>=8&&A(t.options.event+xo(e))},t.tryEmit=function(g){if(this.canEmit())return this.emit(g);this.state=32},t.canEmit=function(){for(var g=0;g<this.requireFail.length;){if(!(33&this.requireFail[g].state))return!1;g++}return!0},t.recognize=function(g){var t=xn({},g);if(!Yn(this.options.enable,[this,t]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},t.process=function(g){},t.getTouchAction=function(){},t.reset=function(){},g}(),Do=function(g){function t(t){var e;return void 0===t&&(t={}),(e=g.call(this,yn({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this).pTime=!1,e.pCenter=!1,e._timer=null,e._input=null,e.count=0,e}mn(t,g);var e=t.prototype;return e.getTouchAction=function(){return["manipulation"]},e.process=function(g){var t=this,e=this.options,A=g.pointers.length===e.pointers,I=g.distance<e.threshold,C=g.deltaTime<e.time;if(this.reset(),1&g.eventType&&0===this.count)return this.failTimeout();if(I&&C&&A){if(4!==g.eventType)return this.failTimeout();var i=!this.pTime||g.timeStamp-this.pTime<e.interval,n=!this.pCenter||Xn(this.pCenter,g.center)<e.posThreshold;if(this.pTime=g.timeStamp,this.pCenter=g.center,n&&i?this.count+=1:this.count=1,this._input=g,0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),e.interval),2):8}return 32},e.failTimeout=function(){var g=this;return this._timer=setTimeout((function(){g.state=32}),this.options.interval),32},e.reset=function(){clearTimeout(this._timer)},e.emit=function(){8===this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(ko),Oo=function(g){function t(t){return void 0===t&&(t={}),g.call(this,yn({pointers:1},t))||this}mn(t,g);var e=t.prototype;return e.attrTest=function(g){var t=this.options.pointers;return 0===t||g.pointers.length===t},e.process=function(g){var t=this.state,e=g.eventType,A=6&t,I=this.attrTest(g);return A&&(8&e||!I)?16|t:A||I?4&e?8|t:2&t?4|t:2:32},t}(ko);function No(g){return 16===g?"down":8===g?"up":2===g?"left":4===g?"right":""}var Zo=function(g){function t(t){var e;return void 0===t&&(t={}),(e=g.call(this,yn({event:"pan",threshold:10,pointers:1,direction:30},t))||this).pX=null,e.pY=null,e}mn(t,g);var e=t.prototype;return e.getTouchAction=function(){var g=this.options.direction,t=[];return 6&g&&t.push("pan-y"),24&g&&t.push("pan-x"),t},e.directionTest=function(g){var t=this.options,e=!0,A=g.distance,I=g.direction,C=g.deltaX,i=g.deltaY;return I&t.direction||(6&t.direction?(I=0===C?1:C<0?2:4,e=C!==this.pX,A=Math.abs(g.deltaX)):(I=0===i?1:i<0?8:16,e=i!==this.pY,A=Math.abs(g.deltaY))),g.direction=I,e&&A>t.threshold&&I&t.direction},e.attrTest=function(g){return Oo.prototype.attrTest.call(this,g)&&(2&this.state||!(2&this.state)&&this.directionTest(g))},e.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=No(t.direction);e&&(t.additionalEvent=this.options.event+e),g.prototype.emit.call(this,t)},t}(Oo),Mo=function(g){function t(t){return void 0===t&&(t={}),g.call(this,yn({event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},t))||this}mn(t,g);var e=t.prototype;return e.getTouchAction=function(){return Zo.prototype.getTouchAction.call(this)},e.attrTest=function(t){var e,A=this.options.direction;return 30&A?e=t.overallVelocity:6&A?e=t.overallVelocityX:24&A&&(e=t.overallVelocityY),g.prototype.attrTest.call(this,t)&&A&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&Nn(e)>this.options.velocity&&4&t.eventType},e.emit=function(g){var t=No(g.offsetDirection);t&&this.manager.emit(this.options.event+t,g),this.manager.emit(this.options.event,g)},t}(Oo),Eo=function(g){function t(t){return void 0===t&&(t={}),g.call(this,yn({event:"pinch",threshold:0,pointers:2},t))||this}mn(t,g);var e=t.prototype;return e.getTouchAction=function(){return["none"]},e.attrTest=function(t){return g.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},e.emit=function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}g.prototype.emit.call(this,t)},t}(Oo),Go=function(g){function t(t){return void 0===t&&(t={}),g.call(this,yn({event:"rotate",threshold:0,pointers:2},t))||this}mn(t,g);var e=t.prototype;return e.getTouchAction=function(){return["none"]},e.attrTest=function(t){return g.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)},t}(Oo),To=function(g){function t(t){var e;return void 0===t&&(t={}),(e=g.call(this,yn({event:"press",pointers:1,time:251,threshold:9},t))||this)._timer=null,e._input=null,e}mn(t,g);var e=t.prototype;return e.getTouchAction=function(){return["auto"]},e.process=function(g){var t=this,e=this.options,A=g.pointers.length===e.pointers,I=g.distance<e.threshold,C=g.deltaTime>e.time;if(this._input=g,!I||!A||12&g.eventType&&!C)this.reset();else if(1&g.eventType)this.reset(),this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),e.time);else if(4&g.eventType)return 8;return 32},e.reset=function(){clearTimeout(this._timer)},e.emit=function(g){8===this.state&&(g&&4&g.eventType?this.manager.emit(this.options.event+"up",g):(this._input.timeStamp=Zn(),this.manager.emit(this.options.event,this._input)))},t}(ko),Bo={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Ro=[[Go,{enable:!1}],[Eo,{enable:!1},["rotate"]],[Mo,{direction:6}],[Zo,{direction:6},["swipe"]],[Do],[Do,{event:"doubletap",taps:2},["tap"]],[To]];function Fo(g,t){var e,A=g.element;A.style&&(Qn(g.options.cssProps,(function(I,C){e=Mn(A.style,C),t?(g.oldCssProps[e]=A.style[e],A.style[e]=I):A.style[e]=g.oldCssProps[e]||""})),t||(g.oldCssProps={}))}var So=function(){function g(g,t){var e,A=this;this.options=xn({},Bo,t||{}),this.options.inputTarget=this.options.inputTarget||g,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=g,this.input=new((e=this).options.inputClass||(Rn?oo:Fn?lo:Bn?yo:uo))(e,Kn),this.touchAction=new zn(this,this.options.touchAction),Fo(this,!0),Qn(this.options.recognizers,(function(g){var t=A.add(new g[0](g[1]));g[2]&&t.recognizeWith(g[2]),g[3]&&t.requireFailure(g[3])}),this)}var t=g.prototype;return t.set=function(g){return xn(this.options,g),g.touchAction&&this.touchAction.update(),g.inputTarget&&(this.input.destroy(),this.input.target=g.inputTarget,this.input.init()),this},t.stop=function(g){this.session.stopped=g?2:1},t.recognize=function(g){var t=this.session;if(!t.stopped){var e;this.touchAction.preventDefaults(g);var A=this.recognizers,I=t.curRecognizer;(!I||I&&8&I.state)&&(t.curRecognizer=null,I=null);for(var C=0;C<A.length;)e=A[C],2===t.stopped||I&&e!==I&&!e.canRecognizeWith(I)?e.reset():e.recognize(g),!I&&14&e.state&&(t.curRecognizer=e,I=e),C++}},t.get=function(g){if(g instanceof ko)return g;for(var t=this.recognizers,e=0;e<t.length;e++)if(t[e].options.event===g)return t[e];return null},t.add=function(g){if(mo(g,"add",this))return this;var t=this.get(g.options.event);return t&&this.remove(t),this.recognizers.push(g),g.manager=this,this.touchAction.update(),g},t.remove=function(g){if(mo(g,"remove",this))return this;var t=this.get(g);if(g){var e=this.recognizers,A=Ao(e,t);-1!==A&&(e.splice(A,1),this.touchAction.update())}return this},t.on=function(g,t){if(void 0===g||void 0===t)return this;var e=this.handlers;return Qn(qn(g),(function(g){e[g]=e[g]||[],e[g].push(t)})),this},t.off=function(g,t){if(void 0===g)return this;var e=this.handlers;return Qn(qn(g),(function(g){t?e[g]&&e[g].splice(Ao(e[g],t),1):delete e[g]})),this},t.emit=function(g,t){this.options.domEvents&&function(g,t){var e=document.createEvent("Event");e.initEvent(g,!0,!0),e.gesture=t,t.target.dispatchEvent(e)}(g,t);var e=this.handlers[g]&&this.handlers[g].slice();if(e&&e.length){t.type=g,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var A=0;A<e.length;)e[A](t),A++}},t.destroy=function(){this.element&&Fo(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},g}(),Lo={touchstart:1,touchmove:2,touchend:4,touchcancel:8},Qo=function(g){function t(){var e,A=t.prototype;return A.evTarget="touchstart",A.evWin="touchstart touchmove touchend touchcancel",(e=g.apply(this,arguments)||this).started=!1,e}return mn(t,g),t.prototype.handler=function(g){var t=Lo[g.type];if(1===t&&(this.started=!0),this.started){var e=Yo.call(this,g,t);12&t&&e[0].length-e[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:e[0],changedPointers:e[1],pointerType:"touch",srcEvent:g})}},t}(eo);function Yo(g,t){var e=ro(g.touches),A=ro(g.changedTouches);return 12&t&&(e=so(e.concat(A),"identifier",!0)),[e,A]}function Wo(g,t,e){var A="DEPRECATED METHOD: "+t+"\n"+e+" AT \n";return function(){var t=new Error("get-stack-trace"),e=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",I=window.console&&(window.console.warn||window.console.log);return I&&I.call(window.console,A,e),g.apply(this,arguments)}}var zo=Wo((function(g,t,e){for(var A=Object.keys(t),I=0;I<A.length;)(!e||e&&void 0===g[A[I]])&&(g[A[I]]=t[A[I]]),I++;return g}),"extend","Use `assign`."),Po=Wo((function(g,t){return zo(g,t,!0)}),"merge","Use `assign`.");function jo(g,t,e){var A,I=t.prototype;(A=g.prototype=Object.create(I)).constructor=g,A._super=I,e&&xn(A,e)}function Vo(g,t){return function(){return g.apply(t,arguments)}}var Xo=function(){var g=function(g,t){return void 0===t&&(t={}),new So(g,yn({recognizers:Ro.concat()},t))};return g.VERSION="2.0.17-rc",g.DIRECTION_ALL=30,g.DIRECTION_DOWN=16,g.DIRECTION_LEFT=2,g.DIRECTION_RIGHT=4,g.DIRECTION_UP=8,g.DIRECTION_HORIZONTAL=6,g.DIRECTION_VERTICAL=24,g.DIRECTION_NONE=1,g.DIRECTION_DOWN=16,g.INPUT_START=1,g.INPUT_MOVE=2,g.INPUT_END=4,g.INPUT_CANCEL=8,g.STATE_POSSIBLE=1,g.STATE_BEGAN=2,g.STATE_CHANGED=4,g.STATE_ENDED=8,g.STATE_RECOGNIZED=8,g.STATE_CANCELLED=16,g.STATE_FAILED=32,g.Manager=So,g.Input=eo,g.TouchAction=zn,g.TouchInput=lo,g.MouseInput=uo,g.PointerEventInput=oo,g.TouchMouseInput=yo,g.SingleTouchInput=Qo,g.Recognizer=ko,g.AttrRecognizer=Oo,g.Tap=Do,g.Pan=Zo,g.Swipe=Mo,g.Pinch=Eo,g.Rotate=Go,g.Press=To,g.on=$n,g.off=go,g.each=Qn,g.merge=Po,g.extend=zo,g.bindFn=Vo,g.assign=xn,g.inherit=jo,g.bindFn=Vo,g.prefixed=Mn,g.toArray=ro,g.inArray=Ao,g.uniqueArray=so,g.splitStr=qn,g.boolOrFn=Yn,g.hasParent=Pn,g.addEventListeners=$n,g.removeEventListeners=go,g.defaults=xn({},Bo,{preset:Ro}),g}(),Uo=Xo.defaults,_o=I(Object.freeze({__proto__:null,default:Xo,INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:24,DIRECTION_ALL:30,Manager:So,Input:eo,TouchAction:zn,TouchInput:lo,MouseInput:uo,PointerEventInput:oo,TouchMouseInput:yo,SingleTouchInput:Qo,Recognizer:ko,AttrRecognizer:Oo,Tap:Do,Pan:Zo,Swipe:Mo,Pinch:Eo,Rotate:Go,Press:To,on:$n,off:go,each:Qn,merge:Po,extend:zo,assign:xn,inherit:jo,bindFn:Vo,prefixed:Mn,toArray:ro,inArray:Ao,uniqueArray:so,splitStr:qn,boolOrFn:Yn,hasParent:Pn,addEventListeners:$n,removeEventListeners:go,defaults:Uo})),Ho=A((function(g){if("undefined"!=typeof window){var t=window.Hammer||_o;g.exports=t}else g.exports=function(){return{on:g=function(){},off:g,destroy:g,emit:g,get:function(t){return{set:g}}};var g}})),Jo=A((function(g,e){
/**
	   * vis-util
	   * https://github.com/visjs/vis-util
	   *
	   * utilitie collection for visjs
	   *
	   * @version 4.0.0
	   * @date    2020-02-29T15:35:13.178Z
	   *
	   * @copyright (c) 2011-2017 Almende B.V, http://almende.com
	   * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
	   *
	   * @license
	   * vis.js is dual licensed under both
	   *
	   *   1. The Apache 2.0 License
	   *      http://www.apache.org/licenses/LICENSE-2.0
	   *
	   *   and
	   *
	   *   2. The MIT License
	   *      http://opensource.org/licenses/MIT
	   *
	   * vis.js may be distributed under either license.
	   */
!function(g){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};function A(g,t){return g(t={exports:{}},t.exports),t.exports}function I(g){return g&&g.default||g}var C=function(g){return g&&g.Math==Math&&g},i=C("object"==typeof globalThis&&globalThis)||C("object"==typeof window&&window)||C("object"==typeof self&&self)||C("object"==typeof e&&e)||Function("return this")(),n=function(g){try{return!!g()}catch(g){return!0}},o=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),r={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,a={f:s&&!r.call({1:2},1)?function(g){var t=s(this,g);return!!t&&t.enumerable}:r},d=function(g,t){return{enumerable:!(1&g),configurable:!(2&g),writable:!(4&g),value:t}},l={}.toString,h=function(g){return l.call(g).slice(8,-1)},c="".split,u=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(g){return"String"==h(g)?c.call(g,""):Object(g)}:Object,f=function(g){if(null==g)throw TypeError("Can't call method on "+g);return g},p=function(g){return u(f(g))},v=function(g){return"object"==typeof g?null!==g:"function"==typeof g},y=function(g,t){if(!v(g))return g;var e,A;if(t&&"function"==typeof(e=g.toString)&&!v(A=e.call(g)))return A;if("function"==typeof(e=g.valueOf)&&!v(A=e.call(g)))return A;if(!t&&"function"==typeof(e=g.toString)&&!v(A=e.call(g)))return A;throw TypeError("Can't convert object to primitive value")},m={}.hasOwnProperty,b=function(g,t){return m.call(g,t)},w=i.document,x=v(w)&&v(w.createElement),k=function(g){return x?w.createElement(g):{}},D=!o&&!n((function(){return 7!=Object.defineProperty(k("div"),"a",{get:function(){return 7}}).a})),O=Object.getOwnPropertyDescriptor,N={f:o?O:function(g,t){if(g=p(g),t=y(t,!0),D)try{return O(g,t)}catch(g){}if(b(g,t))return d(!a.f.call(g,t),g[t])}},Z=/#|\.prototype\./,M=function(g,t){var e=G[E(g)];return e==B||e!=T&&("function"==typeof t?n(t):!!t)},E=M.normalize=function(g){return String(g).replace(Z,".").toLowerCase()},G=M.data={},T=M.NATIVE="N",B=M.POLYFILL="P",R=M,F={},S=function(g,t,e){if(function(g){if("function"!=typeof g)throw TypeError(String(g)+" is not a function")}(g),void 0===t)return g;switch(e){case 0:return function(){return g.call(t)};case 1:return function(e){return g.call(t,e)};case 2:return function(e,A){return g.call(t,e,A)};case 3:return function(e,A,I){return g.call(t,e,A,I)}}return function(){return g.apply(t,arguments)}},L=function(g){if(!v(g))throw TypeError(String(g)+" is not an object");return g},Q=Object.defineProperty,Y={f:o?Q:function(g,t,e){if(L(g),t=y(t,!0),L(e),D)try{return Q(g,t,e)}catch(g){}if("get"in e||"set"in e)throw TypeError("Accessors not supported");return"value"in e&&(g[t]=e.value),g}},W=o?function(g,t,e){return Y.f(g,t,d(1,e))}:function(g,t,e){return g[t]=e,g},z=N.f,P=function(g){var t=function(t,e,A){if(this instanceof g){switch(arguments.length){case 0:return new g;case 1:return new g(t);case 2:return new g(t,e)}return new g(t,e,A)}return g.apply(this,arguments)};return t.prototype=g.prototype,t},j=function(g,t){var e,A,I,C,n,o,r,s,a=g.target,d=g.global,l=g.stat,h=g.proto,c=d?i:l?i[a]:(i[a]||{}).prototype,u=d?F:F[a]||(F[a]={}),f=u.prototype;for(I in t)e=!R(d?I:a+(l?".":"#")+I,g.forced)&&c&&b(c,I),n=u[I],e&&(o=g.noTargetGet?(s=z(c,I))&&s.value:c[I]),C=e&&o?o:t[I],e&&typeof n==typeof C||(r=g.bind&&e?S(C,i):g.wrap&&e?P(C):h&&"function"==typeof C?S(Function.call,C):C,(g.sham||C&&C.sham||n&&n.sham)&&W(r,"sham",!0),u[I]=r,h&&(b(F,A=a+"Prototype")||W(F,A,{}),F[A][I]=C,g.real&&f&&!f[I]&&W(f,I,C)))},V=Array.isArray||function(g){return"Array"==h(g)};j({target:"Array",stat:!0},{isArray:V});var X=F.Array.isArray,U=X,_={},H=i["__core-js_shared__"]||function(g,t){try{W(i,g,t)}catch(e){i[g]=t}return t}("__core-js_shared__",{}),J=Function.toString;"function"!=typeof H.inspectSource&&(H.inspectSource=function(g){return J.call(g)});var K,q,$,gg=H.inspectSource,tg=i.WeakMap,eg="function"==typeof tg&&/native code/.test(gg(tg)),Ag=A((function(g){(g.exports=function(g,t){return H[g]||(H[g]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.4",mode:"pure",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),Ig=0,Cg=Math.random(),ig=function(g){return"Symbol("+String(void 0===g?"":g)+")_"+(++Ig+Cg).toString(36)},ng=Ag("keys"),og=function(g){return ng[g]||(ng[g]=ig(g))},rg={},sg=i.WeakMap;if(eg){var ag=new sg,dg=ag.get,lg=ag.has,hg=ag.set;K=function(g,t){return hg.call(ag,g,t),t},q=function(g){return dg.call(ag,g)||{}},$=function(g){return lg.call(ag,g)}}else{var cg=og("state");rg[cg]=!0,K=function(g,t){return W(g,cg,t),t},q=function(g){return b(g,cg)?g[cg]:{}},$=function(g){return b(g,cg)}}var ug,fg,pg,vg={set:K,get:q,has:$,enforce:function(g){return $(g)?q(g):K(g,{})},getterFor:function(g){return function(t){var e;if(!v(t)||(e=q(t)).type!==g)throw TypeError("Incompatible receiver, "+g+" required");return e}}},yg=function(g){return Object(f(g))},mg=!n((function(){function g(){}return g.prototype.constructor=null,Object.getPrototypeOf(new g)!==g.prototype})),bg=og("IE_PROTO"),wg=Object.prototype,xg=mg?Object.getPrototypeOf:function(g){return g=yg(g),b(g,bg)?g[bg]:"function"==typeof g.constructor&&g instanceof g.constructor?g.constructor.prototype:g instanceof Object?wg:null},kg=!!Object.getOwnPropertySymbols&&!n((function(){return!String(Symbol())})),Dg=kg&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Og=Ag("wks"),Ng=i.Symbol,Zg=Dg?Ng:Ng&&Ng.withoutSetter||ig,Mg=function(g){return b(Og,g)||(kg&&b(Ng,g)?Og[g]=Ng[g]:Og[g]=Zg("Symbol."+g)),Og[g]},Eg=(Mg("iterator"),!1);[].keys&&("next"in(pg=[].keys())?(fg=xg(xg(pg)))!==Object.prototype&&(ug=fg):Eg=!0),null==ug&&(ug={});var Gg,Tg={IteratorPrototype:ug,BUGGY_SAFARI_ITERATORS:Eg},Bg=Math.ceil,Rg=Math.floor,Fg=function(g){return isNaN(g=+g)?0:(g>0?Rg:Bg)(g)},Sg=Math.min,Lg=function(g){return g>0?Sg(Fg(g),9007199254740991):0},Qg=Math.max,Yg=Math.min,Wg=function(g,t){var e=Fg(g);return e<0?Qg(e+t,0):Yg(e,t)},zg=function(g){return function(t,e,A){var I,C=p(t),i=Lg(C.length),n=Wg(A,i);if(g&&e!=e){for(;i>n;)if((I=C[n++])!=I)return!0}else for(;i>n;n++)if((g||n in C)&&C[n]===e)return g||n||0;return!g&&-1}},Pg={includes:zg(!0),indexOf:zg(!1)},jg=Pg.indexOf,Vg=function(g,t){var e,A=p(g),I=0,C=[];for(e in A)!b(rg,e)&&b(A,e)&&C.push(e);for(;t.length>I;)b(A,e=t[I++])&&(~jg(C,e)||C.push(e));return C},Xg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ug=Object.keys||function(g){return Vg(g,Xg)},_g=o?Object.defineProperties:function(g,t){L(g);for(var e,A=Ug(t),I=A.length,C=0;I>C;)Y.f(g,e=A[C++],t[e]);return g},Hg=function(g){return"function"==typeof g?g:void 0},Jg=function(g,t){return arguments.length<2?Hg(F[g])||Hg(i[g]):F[g]&&F[g][t]||i[g]&&i[g][t]},Kg=Jg("document","documentElement"),qg=og("IE_PROTO"),$g=function(){},gt=function(g){return"<script>"+g+"<\/script>"},tt=function(){try{Gg=document.domain&&new ActiveXObject("htmlfile")}catch(g){}var g,t;tt=Gg?function(g){g.write(gt("")),g.close();var t=g.parentWindow.Object;return g=null,t}(Gg):((t=k("iframe")).style.display="none",Kg.appendChild(t),t.src=String("javascript:"),(g=t.contentWindow.document).open(),g.write(gt("document.F=Object")),g.close(),g.F);for(var e=Xg.length;e--;)delete tt.prototype[Xg[e]];return tt()};rg[qg]=!0;var et=Object.create||function(g,t){var e;return null!==g?($g.prototype=L(g),e=new $g,$g.prototype=null,e[qg]=g):e=tt(),void 0===t?e:_g(e,t)},At={};At[Mg("toStringTag")]="z";var It="[object z]"===String(At),Ct=Mg("toStringTag"),it="Arguments"==h(function(){return arguments}()),nt=It?h:function(g){var t,e,A;return void 0===g?"Undefined":null===g?"Null":"string"==typeof(e=function(g,t){try{return g[t]}catch(g){}}(t=Object(g),Ct))?e:it?h(t):"Object"==(A=h(t))&&"function"==typeof t.callee?"Arguments":A},ot=It?{}.toString:function(){return"[object "+nt(this)+"]"},rt=Y.f,st=Mg("toStringTag"),at=function(g,t,e,A){if(g){var I=e?g:g.prototype;b(I,st)||rt(I,st,{configurable:!0,value:t}),A&&!It&&W(I,"toString",ot)}},dt=Tg.IteratorPrototype,lt=function(){return this},ht=(Object.setPrototypeOf||"__proto__"in{}&&function(){var g={};try{Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set.call(g,[])}catch(g){}}(),function(g,t,e,A){A&&A.enumerable?g[t]=e:W(g,t,e)}),ct=Tg.IteratorPrototype,ut=Tg.BUGGY_SAFARI_ITERATORS,ft=Mg("iterator"),pt=function(){return this},vt=function(g,t,e,A,I,C,i){!function(g,t,e){var A=t+" Iterator";g.prototype=et(dt,{next:d(1,e)}),at(g,A,!1,!0),_[A]=lt}(e,t,A);var n,o,r,s=function(g){if(g===I&&u)return u;if(!ut&&g in h)return h[g];switch(g){case"keys":case"values":case"entries":return function(){return new e(this,g)}}return function(){return new e(this)}},a=t+" Iterator",l=!1,h=g.prototype,c=h[ft]||h["@@iterator"]||I&&h[I],u=!ut&&c||s(I),f="Array"==t&&h.entries||c;if(f&&(n=xg(f.call(new g)),ct!==Object.prototype&&n.next&&(at(n,a,!0,!0),_[a]=pt)),"values"==I&&c&&"values"!==c.name&&(l=!0,u=function(){return c.call(this)}),i&&h[ft]!==u&&W(h,ft,u),_[t]=u,I)if(o={values:s("values"),keys:C?u:s("keys"),entries:s("entries")},i)for(r in o)!ut&&!l&&r in h||ht(h,r,o[r]);else j({target:t,proto:!0,forced:ut||l},o);return o},yt=vg.set,mt=vg.getterFor("Array Iterator");vt(Array,"Array",(function(g,t){yt(this,{type:"Array Iterator",target:p(g),index:0,kind:t})}),(function(){var g=mt(this),t=g.target,e=g.kind,A=g.index++;return!t||A>=t.length?(g.target=void 0,{value:void 0,done:!0}):"keys"==e?{value:A,done:!1}:"values"==e?{value:t[A],done:!1}:{value:[A,t[A]],done:!1}}),"values"),_.Arguments=_.Array;var bt=Mg("toStringTag");for(var wt in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var xt=i[wt],kt=xt&&xt.prototype;kt&&nt(kt)!==bt&&W(kt,bt,wt),_[wt]=_.Array}var Dt=function(g){return function(t,e){var A,I,C=String(f(t)),i=Fg(e),n=C.length;return i<0||i>=n?g?"":void 0:(A=C.charCodeAt(i))<55296||A>56319||i+1===n||(I=C.charCodeAt(i+1))<56320||I>57343?g?C.charAt(i):A:g?C.slice(i,i+2):I-56320+(A-55296<<10)+65536}},Ot=(Dt(!1),Dt(!0)),Nt=vg.set,Zt=vg.getterFor("String Iterator");vt(String,"String",(function(g){Nt(this,{type:"String Iterator",string:String(g),index:0})}),(function(){var g,t=Zt(this),e=t.string,A=t.index;return A>=e.length?{value:void 0,done:!0}:(g=Ot(e,A),t.index+=g.length,{value:g,done:!1})}));var Mt=Mg("iterator"),Et=function(g){if(null!=g)return g[Mt]||g["@@iterator"]||_[nt(g)]},Gt=function(g){var t=Et(g);if("function"!=typeof t)throw TypeError(String(g)+" is not iterable");return L(t.call(g))},Tt=Mg("iterator"),Bt=function(g){var t=Object(g);return void 0!==t[Tt]||"@@iterator"in t||_.hasOwnProperty(nt(t))},Rt=function(g,t){return function(g){if(U(g))return g}(g)||function(g,t){if(Bt(Object(g))||"[object Arguments]"===Object.prototype.toString.call(g)){var e=[],A=!0,I=!1,C=void 0;try{for(var i,n=Gt(g);!(A=(i=n.next()).done)&&(e.push(i.value),!t||e.length!==t);A=!0);}catch(g){I=!0,C=g}finally{try{A||null==n.return||n.return()}finally{if(I)throw C}}return e}}(g,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()};j({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}});var Ft=F.Date.now;function St(g){var t=function(){for(var g=Lt(),t=g(" "),e=g(" "),A=g(" "),I=0;I<arguments.length;I++)(t-=g(I<0||arguments.length<=I?void 0:arguments[I]))<0&&(t+=1),(e-=g(I<0||arguments.length<=I?void 0:arguments[I]))<0&&(e+=1),(A-=g(I<0||arguments.length<=I?void 0:arguments[I]))<0&&(A+=1);return[t,e,A]}(g),e=Rt(t,3),A=e[0],I=e[1],C=e[2],i=1,n=function(){var g=2091639*A+2.3283064365386963e-10*i;return A=I,I=C,C=g-(i=0|g)};return n.uint32=function(){return 4294967296*n()},n.fract53=function(){return n()+11102230246251565e-32*(2097152*n()|0)},n.algorithm="Alea",n.seed=g,n.version="0.9",n}function Lt(){var g=4022871197;return function(t){for(var e=t.toString(),A=0;A<e.length;A++){var I=.02519603282416938*(g+=e.charCodeAt(A));I-=g=I>>>0,g=(I*=g)>>>0,g+=4294967296*(I-=g)}return 2.3283064365386963e-10*(g>>>0)}}j({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperty:Y.f});var Qt=A((function(g){var t=F.Object,e=g.exports=function(g,e,A){return t.defineProperty(g,e,A)};t.defineProperty.sham&&(e.sham=!0)})),Yt=Qt;j({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperties:_g});var Wt=A((function(g){var t=F.Object,e=g.exports=function(g,e){return t.defineProperties(g,e)};t.defineProperties.sham&&(e.sham=!0)})),zt=Xg.concat("length","prototype"),Pt={f:Object.getOwnPropertyNames||function(g){return Vg(g,zt)}},jt={f:Object.getOwnPropertySymbols},Vt=Jg("Reflect","ownKeys")||function(g){var t=Pt.f(L(g)),e=jt.f;return e?t.concat(e(g)):t},Xt=function(g,t,e){var A=y(t);A in g?Y.f(g,A,d(0,e)):g[A]=e};j({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(g){for(var t,e,A=p(g),I=N.f,C=Vt(A),i={},n=0;C.length>n;)void 0!==(e=I(A,t=C[n++]))&&Xt(i,t,e);return i}});var Ut=F.Object.getOwnPropertyDescriptors,_t=N.f,Ht=n((function(){_t(1)}));j({target:"Object",stat:!0,forced:!o||Ht,sham:!o},{getOwnPropertyDescriptor:function(g,t){return _t(p(g),t)}});var Jt=A((function(g){var t=F.Object,e=g.exports=function(g,e){return t.getOwnPropertyDescriptor(g,e)};t.getOwnPropertyDescriptor.sham&&(e.sham=!0)})),Kt=Pt.f,qt={}.toString,$t="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],ge={f:function(g){return $t&&"[object Window]"==qt.call(g)?function(g){try{return Kt(g)}catch(g){return $t.slice()}}(g):Kt(p(g))}},te={f:Mg},ee=Y.f,Ae=function(g){var t=F.Symbol||(F.Symbol={});b(t,g)||ee(t,g,{value:te.f(g)})},Ie=Mg("species"),Ce=function(g,t){var e;return V(g)&&("function"!=typeof(e=g.constructor)||e!==Array&&!V(e.prototype)?v(e)&&null===(e=e[Ie])&&(e=void 0):e=void 0),new(void 0===e?Array:e)(0===t?0:t)},ie=[].push,ne=function(g){var t=1==g,e=2==g,A=3==g,I=4==g,C=6==g,i=5==g||C;return function(n,o,r,s){for(var a,d,l=yg(n),h=u(l),c=S(o,r,3),f=Lg(h.length),p=0,v=s||Ce,y=t?v(n,f):e?v(n,0):void 0;f>p;p++)if((i||p in h)&&(d=c(a=h[p],p,l),g))if(t)y[p]=d;else if(d)switch(g){case 3:return!0;case 5:return a;case 6:return p;case 2:ie.call(y,a)}else if(I)return!1;return C?-1:A||I?I:y}},oe={forEach:ne(0),map:ne(1),filter:ne(2),some:ne(3),every:ne(4),find:ne(5),findIndex:ne(6)},re=oe.forEach,se=og("hidden"),ae=Mg("toPrimitive"),de=vg.set,le=vg.getterFor("Symbol"),he=Object.prototype,ce=i.Symbol,ue=Jg("JSON","stringify"),fe=N.f,pe=Y.f,ve=ge.f,ye=a.f,me=Ag("symbols"),be=Ag("op-symbols"),we=Ag("string-to-symbol-registry"),xe=Ag("symbol-to-string-registry"),ke=Ag("wks"),De=i.QObject,Oe=!De||!De.prototype||!De.prototype.findChild,Ne=o&&n((function(){return 7!=et(pe({},"a",{get:function(){return pe(this,"a",{value:7}).a}})).a}))?function(g,t,e){var A=fe(he,t);A&&delete he[t],pe(g,t,e),A&&g!==he&&pe(he,t,A)}:pe,Ze=function(g,t){var e=me[g]=et(ce.prototype);return de(e,{type:"Symbol",tag:g,description:t}),o||(e.description=t),e},Me=Dg?function(g){return"symbol"==typeof g}:function(g){return Object(g)instanceof ce},Ee=function(g,t,e){g===he&&Ee(be,t,e),L(g);var A=y(t,!0);return L(e),b(me,A)?(e.enumerable?(b(g,se)&&g[se][A]&&(g[se][A]=!1),e=et(e,{enumerable:d(0,!1)})):(b(g,se)||pe(g,se,d(1,{})),g[se][A]=!0),Ne(g,A,e)):pe(g,A,e)},Ge=function(g,t){L(g);var e=p(t),A=Ug(e).concat(Fe(e));return re(A,(function(t){o&&!Te.call(e,t)||Ee(g,t,e[t])})),g},Te=function(g){var t=y(g,!0),e=ye.call(this,t);return!(this===he&&b(me,t)&&!b(be,t))&&(!(e||!b(this,t)||!b(me,t)||b(this,se)&&this[se][t])||e)},Be=function(g,t){var e=p(g),A=y(t,!0);if(e!==he||!b(me,A)||b(be,A)){var I=fe(e,A);return!I||!b(me,A)||b(e,se)&&e[se][A]||(I.enumerable=!0),I}},Re=function(g){var t=ve(p(g)),e=[];return re(t,(function(g){b(me,g)||b(rg,g)||e.push(g)})),e},Fe=function(g){var t=g===he,e=ve(t?be:p(g)),A=[];return re(e,(function(g){!b(me,g)||t&&!b(he,g)||A.push(me[g])})),A};if(kg||(ht((ce=function(){if(this instanceof ce)throw TypeError("Symbol is not a constructor");var g=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=ig(g),e=function(g){this===he&&e.call(be,g),b(this,se)&&b(this[se],t)&&(this[se][t]=!1),Ne(this,t,d(1,g))};return o&&Oe&&Ne(he,t,{configurable:!0,set:e}),Ze(t,g)}).prototype,"toString",(function(){return le(this).tag})),ht(ce,"withoutSetter",(function(g){return Ze(ig(g),g)})),a.f=Te,Y.f=Ee,N.f=Be,Pt.f=ge.f=Re,jt.f=Fe,te.f=function(g){return Ze(Mg(g),g)},o&&pe(ce.prototype,"description",{configurable:!0,get:function(){return le(this).description}})),j({global:!0,wrap:!0,forced:!kg,sham:!kg},{Symbol:ce}),re(Ug(ke),(function(g){Ae(g)})),j({target:"Symbol",stat:!0,forced:!kg},{for:function(g){var t=String(g);if(b(we,t))return we[t];var e=ce(t);return we[t]=e,xe[e]=t,e},keyFor:function(g){if(!Me(g))throw TypeError(g+" is not a symbol");if(b(xe,g))return xe[g]},useSetter:function(){Oe=!0},useSimple:function(){Oe=!1}}),j({target:"Object",stat:!0,forced:!kg,sham:!o},{create:function(g,t){return void 0===t?et(g):Ge(et(g),t)},defineProperty:Ee,defineProperties:Ge,getOwnPropertyDescriptor:Be}),j({target:"Object",stat:!0,forced:!kg},{getOwnPropertyNames:Re,getOwnPropertySymbols:Fe}),j({target:"Object",stat:!0,forced:n((function(){jt.f(1)}))},{getOwnPropertySymbols:function(g){return jt.f(yg(g))}}),ue){var Se=!kg||n((function(){var g=ce();return"[null]"!=ue([g])||"{}"!=ue({a:g})||"{}"!=ue(Object(g))}));j({target:"JSON",stat:!0,forced:Se},{stringify:function(g,t,e){for(var A,I=[g],C=1;arguments.length>C;)I.push(arguments[C++]);if(A=t,(v(t)||void 0!==g)&&!Me(g))return V(t)||(t=function(g,t){if("function"==typeof A&&(t=A.call(this,g,t)),!Me(t))return t}),I[1]=t,ue.apply(null,I)}})}ce.prototype[ae]||W(ce.prototype,ae,ce.prototype.valueOf),at(ce,"Symbol"),rg[se]=!0;var Le=F.Object.getOwnPropertySymbols;j({target:"Object",stat:!0,sham:!o},{create:et});var Qe=F.Object,Ye=function(g,t){return Qe.create(g,t)},We=Qt,ze=function(g,t,e){return t in g?We(g,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):g[t]=e,g},Pe=n((function(){Ug(1)}));j({target:"Object",stat:!0,forced:Pe},{keys:function(g){return Ug(yg(g))}});var je,Ve=F.Object.keys,Xe="\t\n\v\f\r                　\u2028\u2029\ufeff",Ue="["+Xe+"]",_e=RegExp("^"+Ue+Ue+"*"),He=RegExp(Ue+Ue+"*$"),Je=function(g){return function(t){var e=String(f(t));return 1&g&&(e=e.replace(_e,"")),2&g&&(e=e.replace(He,"")),e}},Ke={start:Je(1),end:Je(2),trim:Je(3)},qe=Ke.trim;j({target:"String",proto:!0,forced:(je="trim",n((function(){return!!Xe[je]()||"​᠎"!="​᠎"[je]()||Xe[je].name!==je})))},{trim:function(){return qe(this)}});var $e=function(g){return F[g+"Prototype"]},gA=$e("String").trim,tA=String.prototype,eA=function(g){var t=g.trim;return"string"==typeof g||g===tA||g instanceof String&&t===tA.trim?gA:t},AA=function(g,t){var e=[][g];return!!e&&n((function(){e.call(null,t||function(){throw 1},1)}))},IA=Object.defineProperty,CA={},iA=function(g){throw g},nA=function(g,t){if(b(CA,g))return CA[g];t||(t={});var e=[][g],A=!!b(t,"ACCESSORS")&&t.ACCESSORS,I=b(t,0)?t[0]:iA,C=b(t,1)?t[1]:void 0;return CA[g]=!!e&&!n((function(){if(A&&!o)return!0;var g={length:-1};A?IA(g,1,{enumerable:!0,get:iA}):g[1]=1,e.call(g,I,C)}))},oA=oe.forEach,rA=AA("forEach"),sA=nA("forEach"),aA=rA&&sA?[].forEach:function(g){return oA(this,g,arguments.length>1?arguments[1]:void 0)};j({target:"Array",proto:!0,forced:[].forEach!=aA},{forEach:aA});var dA,lA,hA=$e("Array").forEach,cA=Array.prototype,uA={DOMTokenList:!0,NodeList:!0},fA=function(g){var t=g.forEach;return g===cA||g instanceof Array&&t===cA.forEach||uA.hasOwnProperty(nt(g))?hA:t},pA=Jg("navigator","userAgent")||"",vA=i.process,yA=vA&&vA.versions,mA=yA&&yA.v8;mA?lA=(dA=mA.split("."))[0]+dA[1]:pA&&(!(dA=pA.match(/Edge\/(\d+)/))||dA[1]>=74)&&(dA=pA.match(/Chrome\/(\d+)/))&&(lA=dA[1]);var bA=lA&&+lA,wA=Mg("species"),xA=function(g){return bA>=51||!n((function(){var t=[];return(t.constructor={})[wA]=function(){return{foo:1}},1!==t[g](Boolean).foo}))},kA=oe.map,DA=xA("map"),OA=nA("map");j({target:"Array",proto:!0,forced:!DA||!OA},{map:function(g){return kA(this,g,arguments.length>1?arguments[1]:void 0)}});var NA=$e("Array").map,ZA=Array.prototype,MA=function(g){var t=g.map;return g===ZA||g instanceof Array&&t===ZA.map?NA:t},EA=Ke.trim,GA=i.parseInt,TA=/^[+-]?0[Xx]/,BA=8!==GA(Xe+"08")||22!==GA(Xe+"0x16")?function(g,t){var e=EA(String(g));return GA(e,t>>>0||(TA.test(e)?16:10))}:GA;j({global:!0,forced:parseInt!=BA},{parseInt:BA});var RA=F.parseInt,FA=a.f,SA=function(g){return function(t){for(var e,A=p(t),I=Ug(A),C=I.length,i=0,n=[];C>i;)e=I[i++],o&&!FA.call(A,e)||n.push(g?[e,A[e]]:A[e]);return n}},LA=(SA(!0),SA(!1));j({target:"Object",stat:!0},{values:function(g){return LA(g)}});var QA=F.Object.values,YA=oe.filter,WA=xA("filter"),zA=nA("filter");j({target:"Array",proto:!0,forced:!WA||!zA},{filter:function(g){return YA(this,g,arguments.length>1?arguments[1]:void 0)}});var PA=$e("Array").filter,jA=Array.prototype,VA=function(g){var t=g.filter;return g===jA||g instanceof Array&&t===jA.filter?PA:t},XA=Mg("isConcatSpreadable"),UA=bA>=51||!n((function(){var g=[];return g[XA]=!1,g.concat()[0]!==g})),_A=xA("concat"),HA=function(g){if(!v(g))return!1;var t=g[XA];return void 0!==t?!!t:V(g)};j({target:"Array",proto:!0,forced:!UA||!_A},{concat:function(g){var t,e,A,I,C,i=yg(this),n=Ce(i,0),o=0;for(t=-1,A=arguments.length;t<A;t++)if(C=-1===t?i:arguments[t],HA(C)){if(o+(I=Lg(C.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(e=0;e<I;e++,o++)e in C&&Xt(n,o,C[e])}else{if(o>=9007199254740991)throw TypeError("Maximum allowed index exceeded");Xt(n,o++,C)}return n.length=o,n}});var JA=$e("Array").concat,KA=Array.prototype,qA=function(g){var t=g.concat;return g===KA||g instanceof Array&&t===KA.concat?JA:t},$A=function(g,t,e,A){try{return A?t(L(e)[0],e[1]):t(e)}catch(t){var I=g.return;throw void 0!==I&&L(I.call(g)),t}},gI=Mg("iterator"),tI=Array.prototype,eI=function(g){return void 0!==g&&(_.Array===g||tI[gI]===g)},AI=Mg("iterator"),II=!1;try{var CI=0,iI={next:function(){return{done:!!CI++}},return:function(){II=!0}};iI[AI]=function(){return this},Array.from(iI,(function(){throw 2}))}catch(g){}var nI=!function(g,t){if(!II)return!1;var e=!1;try{var A={};A[AI]=function(){return{next:function(){return{done:e=!0}}}},function(g){Array.from(g)}(A)}catch(g){}return e}();j({target:"Array",stat:!0,forced:nI},{from:function(g){var t,e,A,I,C,i,n=yg(g),o="function"==typeof this?this:Array,r=arguments.length,s=r>1?arguments[1]:void 0,a=void 0!==s,d=Et(n),l=0;if(a&&(s=S(s,r>2?arguments[2]:void 0,2)),null==d||o==Array&&eI(d))for(e=new o(t=Lg(n.length));t>l;l++)i=a?s(n[l],l):n[l],Xt(e,l,i);else for(C=(I=d.call(n)).next,e=new o;!(A=C.call(I)).done;l++)i=a?$A(I,s,[A.value,l],!0):A.value,Xt(e,l,i);return e.length=l,e}});var oI=F.Array.from,rI=function(g){return function(g){if(U(g)){for(var t=0,e=new Array(g.length);t<g.length;t++)e[t]=g[t];return e}}(g)||function(g){if(Bt(Object(g))||"[object Arguments]"===Object.prototype.toString.call(g))return oI(g)}(g)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()},sI=xA("slice"),aI=nA("slice",{ACCESSORS:!0,0:0,1:2}),dI=Mg("species"),lI=[].slice,hI=Math.max;j({target:"Array",proto:!0,forced:!sI||!aI},{slice:function(g,t){var e,A,I,C=p(this),i=Lg(C.length),n=Wg(g,i),o=Wg(void 0===t?i:t,i);if(V(C)&&("function"!=typeof(e=C.constructor)||e!==Array&&!V(e.prototype)?v(e)&&null===(e=e[dI])&&(e=void 0):e=void 0,e===Array||void 0===e))return lI.call(C,n,o);for(A=new(void 0===e?Array:e)(hI(o-n,0)),I=0;n<o;n++,I++)n in C&&Xt(A,I,C[n]);return A.length=I,A}});var cI=$e("Array").slice,uI=Array.prototype,fI=function(g){var t=g.slice;return g===uI||g instanceof Array&&t===uI.slice?cI:t},pI=n((function(){xg(1)}));j({target:"Object",stat:!0,forced:pI,sham:!mg},{getPrototypeOf:function(g){return xg(yg(g))}});var vI=F.Object.getPrototypeOf,yI=Pg.indexOf,mI=[].indexOf,bI=!!mI&&1/[1].indexOf(1,-0)<0,wI=AA("indexOf"),xI=nA("indexOf",{ACCESSORS:!0,1:0});j({target:"Array",proto:!0,forced:bI||!wI||!xI},{indexOf:function(g){return bI?mI.apply(this,arguments)||0:yI(this,g,arguments.length>1?arguments[1]:void 0)}});var kI=$e("Array").indexOf,DI=Array.prototype,OI=function(g){var t=g.indexOf;return g===DI||g instanceof Array&&t===DI.indexOf?kI:t},NI=X,ZI=Object.assign,MI=Object.defineProperty,EI=!ZI||n((function(){if(o&&1!==ZI({b:1},ZI(MI({},"a",{enumerable:!0,get:function(){MI(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var g={},t={},e=Symbol();return g[e]=7,"abcdefghijklmnopqrst".split("").forEach((function(g){t[g]=g})),7!=ZI({},g)[e]||"abcdefghijklmnopqrst"!=Ug(ZI({},t)).join("")}))?function(g,t){for(var e=yg(g),A=arguments.length,I=1,C=jt.f,i=a.f;A>I;)for(var n,r=u(arguments[I++]),s=C?Ug(r).concat(C(r)):Ug(r),d=s.length,l=0;d>l;)n=s[l++],o&&!i.call(r,n)||(e[n]=r[n]);return e}:ZI;j({target:"Object",stat:!0,forced:Object.assign!==EI},{assign:EI});var GI=F.Object.assign;Ae("iterator");var TI=te.f("iterator"),BI=Object.freeze({__proto__:null});Ae("asyncIterator");var RI=Object.freeze({__proto__:null});Ae("hasInstance"),Ae("isConcatSpreadable"),Ae("match"),Ae("matchAll"),Ae("replace"),Ae("search"),Ae("species"),Ae("split"),Ae("toPrimitive"),Ae("toStringTag"),Ae("unscopables"),at(Math,"Math",!0),at(i.JSON,"JSON",!0),I(BI),I(RI);var FI=F.Symbol;Ae("asyncDispose"),Ae("dispose"),Ae("observable"),Ae("patternMatch"),Ae("replaceAll");var SI=FI,LI=A((function(g){function t(e){return g.exports=t="function"==typeof SI&&"symbol"==typeof TI?function(g){return typeof g}:function(g){return g&&"function"==typeof SI&&g.constructor===SI&&g!==SI.prototype?"symbol":typeof g},t(e)}g.exports=t}));function QI(g,t){var e=Ve(g);if(Le){var A=Le(g);t&&(A=VA(A).call(A,(function(t){return Jt(g,t).enumerable}))),e.push.apply(e,A)}return e}var YI=/^\/?Date\((-?\d+)/i,WI=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,zI=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,PI=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,jI=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function VI(g){return g instanceof Number||"number"==typeof g}function XI(g){return g instanceof String||"string"==typeof g}function UI(g){return"object"===LI(g)&&null!==g}function _I(g,t,e,A){var I=!1;!0===A&&(I=null===t[e]&&void 0!==g[e]),I?delete g[e]:g[e]=t[e]}var HI=GI;function JI(g,t){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],A=arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var I in t)if(Object.prototype.hasOwnProperty.call(t,I)||!0===e)if("object"===LI(t[I])&&null!==t[I]&&vI(t[I])===Object.prototype)void 0===g[I]?g[I]=JI({},t[I],e):"object"===LI(g[I])&&null!==g[I]&&vI(g[I])===Object.prototype?JI(g[I],t[I],e):_I(g,t,I,A);else if(NI(t[I])){var C;g[I]=fI(C=t[I]).call(C)}else _I(g,t,I,A);return g}var KI=QA,qI={asBoolean:function(g,t){return"function"==typeof g&&(g=g()),null!=g?0!=g:t||null},asNumber:function(g,t){return"function"==typeof g&&(g=g()),null!=g?Number(g)||t||null:t||null},asString:function(g,t){return"function"==typeof g&&(g=g()),null!=g?String(g):t||null},asSize:function(g,t){return"function"==typeof g&&(g=g()),XI(g)?g:VI(g)?g+"px":t||null},asElement:function(g,t){return"function"==typeof g&&(g=g()),g||t||null}};function $I(g){var t;switch(g.length){case 3:case 4:return(t=zI.exec(g))?{r:RA(t[1]+t[1],16),g:RA(t[2]+t[2],16),b:RA(t[3]+t[3],16)}:null;case 6:case 7:return(t=WI.exec(g))?{r:RA(t[1],16),g:RA(t[2],16),b:RA(t[3],16)}:null;default:return null}}function gC(g,t,e){var A;return"#"+fI(A=((1<<24)+(g<<16)+(t<<8)+e).toString(16)).call(A,1)}function tC(g,t,e){g/=255,t/=255,e/=255;var A=Math.min(g,Math.min(t,e)),I=Math.max(g,Math.max(t,e));return A===I?{h:0,s:0,v:A}:{h:60*((g===A?3:e===A?1:5)-(g===A?t-e:e===A?g-t:e-g)/(I-A))/360,s:(I-A)/I,v:I}}var eC=function(g){var t,e={};return fA(t=g.split(";")).call(t,(function(g){if(""!=eA(g).call(g)){var t,A,I=g.split(":"),C=eA(t=I[0]).call(t),i=eA(A=I[1]).call(A);e[C]=i}})),e},AC=function(g){var t;return MA(t=Ve(g)).call(t,(function(t){return t+": "+g[t]})).join("; ")};function IC(g,t,e){var A,I,C,i=Math.floor(6*g),n=6*g-i,o=e*(1-t),r=e*(1-n*t),s=e*(1-(1-n)*t);switch(i%6){case 0:A=e,I=s,C=o;break;case 1:A=r,I=e,C=o;break;case 2:A=o,I=e,C=s;break;case 3:A=o,I=r,C=e;break;case 4:A=s,I=o,C=e;break;case 5:A=e,I=o,C=r}return{r:Math.floor(255*A),g:Math.floor(255*I),b:Math.floor(255*C)}}function CC(g,t,e){var A=IC(g,t,e);return gC(A.r,A.g,A.b)}function iC(g){var t=$I(g);if(!t)throw new TypeError("'".concat(g,"' is not a valid color."));return tC(t.r,t.g,t.b)}function nC(g){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(g)}function oC(g){return PI.test(g)}function rC(g){if(null===g||"object"!==LI(g))return null;if(g instanceof Element)return g;var t=Ye(g);for(var e in g)Object.prototype.hasOwnProperty.call(g,e)&&"object"==LI(g[e])&&(t[e]=rC(g[e]));return t}g.Alea=function(){for(var g=arguments.length,t=new Array(g),e=0;e<g;e++)t[e]=arguments[e];return St(t.length?t:[Ft()])},g.HSVToHex=CC,g.HSVToRGB=IC,g.RGBToHSV=tC,g.RGBToHex=gC,g.addClassName=function(g,t){var e=g.className.split(" "),A=t.split(" ");e=qA(e).call(e,VA(A).call(A,(function(g){return OI(e).call(e,g)<0}))),g.className=e.join(" ")},g.addCssText=function(g,t){var e=function(g){for(var t=1;t<arguments.length;t++){var e,A=null!=arguments[t]?arguments[t]:{};if(t%2)fA(e=QI(Object(A),!0)).call(e,(function(t){ze(g,t,A[t])}));else if(Ut)Wt(g,Ut(A));else{var I;fA(I=QI(Object(A))).call(I,(function(t){Yt(g,t,Jt(A,t))}))}}return g}({},eC(g.style.cssText),{},eC(t));g.style.cssText=AC(e)},g.addEventListener=function(g,t,e,A){var I;g.addEventListener?(void 0===A&&(A=!1),"mousewheel"===t&&OI(I=navigator.userAgent).call(I,"Firefox")>=0&&(t="DOMMouseScroll"),g.addEventListener(t,e,A)):g.attachEvent("on"+t,e)},g.binarySearchCustom=function(g,t,e,A){for(var I=0,C=0,i=g.length-1;C<=i&&I<1e4;){var n=Math.floor((C+i)/2),o=g[n],r=t(void 0===A?o[e]:o[e][A]);if(0==r)return n;-1==r?C=n+1:i=n-1,I++}return-1},g.binarySearchValue=function(g,t,e,A,I){var C,i,n,o,r=0,s=0,a=g.length-1;for(I=null!=I?I:function(g,t){return g==t?0:g<t?-1:1};s<=a&&r<1e4;){if(o=Math.floor(.5*(a+s)),C=g[Math.max(0,o-1)][e],i=g[o][e],n=g[Math.min(g.length-1,o+1)][e],0==I(i,t))return o;if(I(C,t)<0&&I(i,t)>0)return"before"==A?Math.max(0,o-1):o;if(I(i,t)<0&&I(n,t)>0)return"before"==A?o:Math.min(g.length-1,o+1);I(i,t)<0?s=o+1:a=o-1,r++}return-1},g.bridgeObject=rC,g.copyAndExtendArray=function(g,t){var e;return qA(e=[]).call(e,rI(g),[t])},g.copyArray=function(g){return fI(g).call(g)},g.deepExtend=JI,g.easingFunctions={linear:function(g){return g},easeInQuad:function(g){return g*g},easeOutQuad:function(g){return g*(2-g)},easeInOutQuad:function(g){return g<.5?2*g*g:(4-2*g)*g-1},easeInCubic:function(g){return g*g*g},easeOutCubic:function(g){return--g*g*g+1},easeInOutCubic:function(g){return g<.5?4*g*g*g:(g-1)*(2*g-2)*(2*g-2)+1},easeInQuart:function(g){return g*g*g*g},easeOutQuart:function(g){return 1- --g*g*g*g},easeInOutQuart:function(g){return g<.5?8*g*g*g*g:1-8*--g*g*g*g},easeInQuint:function(g){return g*g*g*g*g},easeOutQuint:function(g){return 1+--g*g*g*g*g},easeInOutQuint:function(g){return g<.5?16*g*g*g*g*g:1+16*--g*g*g*g*g}},g.equalArray=function(g,t){if(g.length!==t.length)return!1;for(var e=0,A=g.length;e<A;e++)if(g[e]!=t[e])return!1;return!0},g.extend=HI,g.fillIfDefined=function g(t,e){var A=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var I in t)if(void 0!==e[I])if(null===e[I]||"object"!==LI(e[I]))_I(t,e,I,A);else{var C=t[I],i=e[I];UI(C)&&UI(i)&&g(C,i,A)}},g.forEach=function(g,t){if(NI(g))for(var e=g.length,A=0;A<e;A++)t(g[A],A,g);else for(var I in g)Object.prototype.hasOwnProperty.call(g,I)&&t(g[I],I,g)},g.getAbsoluteLeft=function(g){return g.getBoundingClientRect().left},g.getAbsoluteRight=function(g){return g.getBoundingClientRect().right},g.getAbsoluteTop=function(g){return g.getBoundingClientRect().top},g.getScrollBarWidth=function(){var g=document.createElement("p");g.style.width="100%",g.style.height="200px";var t=document.createElement("div");t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.appendChild(g),document.body.appendChild(t);var e=g.offsetWidth;t.style.overflow="scroll";var A=g.offsetWidth;return e==A&&(A=t.clientWidth),document.body.removeChild(t),e-A},g.getTarget=function(){var g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event,t=null;return g&&(g.target?t=g.target:g.srcElement&&(t=g.srcElement)),t instanceof Element&&(null==t.nodeType||3!=t.nodeType||(t=t.parentNode)instanceof Element)?t:null},g.getType=function(g){var t=LI(g);return"object"===t?null===g?"null":g instanceof Boolean?"Boolean":g instanceof Number?"Number":g instanceof String?"String":NI(g)?"Array":g instanceof Date?"Date":"Object":"number"===t?"Number":"boolean"===t?"Boolean":"string"===t?"String":void 0===t?"undefined":t},g.hasParent=function(g,t){for(var e=g;e;){if(e===t)return!0;if(!e.parentNode)return!1;e=e.parentNode}return!1},g.hexToHSV=iC,g.hexToRGB=$I,g.insertSort=function(g,t){for(var e=0;e<g.length;e++){var A=g[e],I=void 0;for(I=e;I>0&&t(A,g[I-1])<0;I--)g[I]=g[I-1];g[I]=A}return g},g.isDate=function(g){if(g instanceof Date)return!0;if(XI(g)){if(YI.exec(g))return!0;if(!isNaN(Date.parse(g)))return!0}return!1},g.isNumber=VI,g.isObject=UI,g.isString=XI,g.isValidHex=nC,g.isValidRGB=oC,g.isValidRGBA=function(g){return jI.test(g)},g.mergeOptions=function(g,t,e){var A=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},I=function(g){return null!=g},C=function(g){return null!==g&&"object"===LI(g)},i=function(g){for(var t in g)if(Object.prototype.hasOwnProperty.call(g,t))return!1;return!0};if(!C(g))throw new Error("Parameter mergeTarget must be an object");if(!C(t))throw new Error("Parameter options must be an object");if(!I(e))throw new Error("Parameter option must have a value");if(!C(A))throw new Error("Parameter globalOptions must be an object");var n=function(g,t,e){C(g[e])||(g[e]={});var A=t[e],I=g[e];for(var i in A)Object.prototype.hasOwnProperty.call(A,i)&&(I[i]=A[i])},o=t[e],r=C(A)&&!i(A),s=r?A[e]:void 0,a=s?s.enabled:void 0;if(void 0!==o){if("boolean"==typeof o)return C(g[e])||(g[e]={}),void(g[e].enabled=o);if(null===o&&!C(g[e])){if(!I(s))return;g[e]=Ye(s)}if(C(o)){var d=!0;void 0!==o.enabled?d=o.enabled:void 0!==a&&(d=s.enabled),n(g,t,e),g[e].enabled=d}}},g.option=qI,g.overrideOpacity=function(g,t){if(-1!==OI(g).call(g,"rgba"))return g;if(-1!==OI(g).call(g,"rgb")){var e=g.substr(OI(g).call(g,"(")+1).replace(")","").split(",");return"rgba("+e[0]+","+e[1]+","+e[2]+","+t+")"}var A=$I(g);return null==A?g:"rgba("+A.r+","+A.g+","+A.b+","+t+")"},g.parseColor=function(g,t){if(XI(g)){var e=g;if(oC(e)){var A,I=MA(A=e.substr(4).substr(0,e.length-5).split(",")).call(A,(function(g){return RA(g)}));e=gC(I[0],I[1],I[2])}if(!0===nC(e)){var C=iC(e),i={h:C.h,s:.8*C.s,v:Math.min(1,1.02*C.v)},n={h:C.h,s:Math.min(1,1.25*C.s),v:.8*C.v},o=CC(n.h,n.s,n.v),r=CC(i.h,i.s,i.v);return{background:e,border:o,highlight:{background:r,border:o},hover:{background:r,border:o}}}return{background:e,border:e,highlight:{background:e,border:e},hover:{background:e,border:e}}}return t?{background:g.background||t.background,border:g.border||t.border,highlight:XI(g.highlight)?{border:g.highlight,background:g.highlight}:{background:g.highlight&&g.highlight.background||t.highlight.background,border:g.highlight&&g.highlight.border||t.highlight.border},hover:XI(g.hover)?{border:g.hover,background:g.hover}:{border:g.hover&&g.hover.border||t.hover.border,background:g.hover&&g.hover.background||t.hover.background}}:{background:g.background||void 0,border:g.border||void 0,highlight:XI(g.highlight)?{border:g.highlight,background:g.highlight}:{background:g.highlight&&g.highlight.background||void 0,border:g.highlight&&g.highlight.border||void 0},hover:XI(g.hover)?{border:g.hover,background:g.hover}:{border:g.hover&&g.hover.border||void 0,background:g.hover&&g.hover.background||void 0}}},g.preventDefault=function(g){g||(g=window.event),g&&(g.preventDefault?g.preventDefault():g.returnValue=!1)},g.recursiveDOMDelete=function g(t){if(t)for(;!0===t.hasChildNodes();){var e=t.firstChild;e&&(g(e),t.removeChild(e))}},g.removeClassName=function(g,t){var e=g.className.split(" "),A=t.split(" ");e=VA(e).call(e,(function(g){return OI(A).call(A,g)<0})),g.className=e.join(" ")},g.removeCssText=function(g,t){var e=eC(g.style.cssText),A=eC(t);for(var I in A)Object.prototype.hasOwnProperty.call(A,I)&&delete e[I];g.style.cssText=AC(e)},g.removeEventListener=function(g,t,e,A){var I;g.removeEventListener?(void 0===A&&(A=!1),"mousewheel"===t&&OI(I=navigator.userAgent).call(I,"Firefox")>=0&&(t="DOMMouseScroll"),g.removeEventListener(t,e,A)):g.detachEvent("on"+t,e)},g.selectiveBridgeObject=function(g,t){if(null!==t&&"object"===LI(t)){for(var e=Ye(t),A=0;A<g.length;A++)Object.prototype.hasOwnProperty.call(t,g[A])&&"object"==LI(t[g[A]])&&(e[g[A]]=rC(t[g[A]]));return e}return null},g.selectiveDeepExtend=function(g,t,e){var A=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(NI(e))throw new TypeError("Arrays are not supported by deepExtend");for(var I=0;I<g.length;I++){var C=g[I];if(Object.prototype.hasOwnProperty.call(e,C))if(e[C]&&e[C].constructor===Object)void 0===t[C]&&(t[C]={}),t[C].constructor===Object?JI(t[C],e[C],!1,A):_I(t,e,C,A);else{if(NI(e[C]))throw new TypeError("Arrays are not supported by deepExtend");_I(t,e,C,A)}}return t},g.selectiveExtend=function(g,t){if(!NI(g))throw new Error("Array with property names expected as first argument");for(var e=arguments.length,A=new Array(e>2?e-2:0),I=2;I<e;I++)A[I-2]=arguments[I];for(var C=0,i=A;C<i.length;C++)for(var n=i[C],o=0;o<g.length;o++){var r=g[o];n&&Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},g.selectiveNotDeepExtend=function(g,t,e){var A=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(NI(e))throw new TypeError("Arrays are not supported by deepExtend");for(var I in e)if(Object.prototype.hasOwnProperty.call(e,I)&&-1===OI(g).call(g,I))if(e[I]&&e[I].constructor===Object)void 0===t[I]&&(t[I]={}),t[I].constructor===Object?JI(t[I],e[I]):_I(t,e,I,A);else if(NI(e[I])){t[I]=[];for(var C=0;C<e[I].length;C++)t[I].push(e[I][C])}else _I(t,e,I,A);return t},g.throttle=function(g){var t=!1;return function(){t||(t=!0,requestAnimationFrame((function(){t=!1,g()})))}},g.toArray=KI,g.topMost=function(g,t){var e;NI(t)||(t=[t]);var A=!0,I=!1,C=void 0;try{for(var i,n=Gt(g);!(A=(i=n.next()).done);A=!0){var o=i.value;if(o){e=o[t[0]];for(var r=1;r<t.length;r++)e&&(e=e[t[r]]);if(void 0!==e)break}}}catch(g){I=!0,C=g}finally{try{A||null==n.return||n.return()}finally{if(I)throw C}}return e},g.updateProperty=function(g,t,e){return g[t]!==e&&(g[t]=e,!0)},Object.defineProperty(g,"__esModule",{value:!0})}(e)}));function Ko(g){var t,e,A=this;this.active=!1,this.dom={container:g},this.dom.overlay=document.createElement("div"),this.dom.overlay.className="vis-overlay",this.dom.container.appendChild(this.dom.overlay),this.hammer=Ho(this.dom.overlay),this.hammer.on("tap",gg(t=this._onTapOverlay).call(t,this));var I=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];tI(I).call(I,(function(g){A.hammer.on(g,(function(g){g.srcEvent.stopPropagation()}))})),document&&document.body&&(this.onClick=function(t){(function(g,t){for(;g;){if(g===t)return!0;g=g.parentNode}return!1})(t.target,g)||A.deactivate()},document.body.addEventListener("click",this.onClick)),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=vn(),this.escListener=gg(e=this.deactivate).call(e,this)}e(Jo),I(pn),ng(Ko.prototype),Ko.current=null,Ko.prototype.destroy=function(){this.deactivate(),this.dom.overlay.parentNode.removeChild(this.dom.overlay),this.onClick&&document.body.removeEventListener("click",this.onClick),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=null,this.hammer.destroy(),this.hammer=null},Ko.prototype.activate=function(){var g;Ko.current&&Ko.current.deactivate(),Ko.current=this,this.active=!0,this.dom.overlay.style.display="none",Jo.addClassName(this.dom.container,"vis-active"),this.emit("change"),this.emit("activate"),gg(g=this.keycharm).call(g,"esc",this.escListener)},Ko.prototype.deactivate=function(){this.active=!1,this.dom.overlay.style.display="block",Jo.removeClassName(this.dom.container,"vis-active"),this.keycharm.unbind("esc",this.escListener),this.emit("change"),this.emit("deactivate")},Ko.prototype._onTapOverlay=function(g){this.activate(),g.srcEvent.stopPropagation()};var qo=Ko,$o=A((function(g,t){t.en={edit:"Edit",del:"Delete selected",back:"Back",addNode:"Add Node",addEdge:"Add Edge",editNode:"Edit Node",editEdge:"Edit Edge",addDescription:"Click in an empty space to place a new node.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",createEdgeError:"Cannot link edges to a cluster.",deleteClusterError:"Clusters cannot be deleted.",editClusterError:"Clusters cannot be edited."},t.en_EN=t.en,t.en_US=t.en,t.de={edit:"Editieren",del:"Lösche Auswahl",back:"Zurück",addNode:"Knoten hinzufügen",addEdge:"Kante hinzufügen",editNode:"Knoten editieren",editEdge:"Kante editieren",addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",deleteClusterError:"Cluster können nicht gelöscht werden.",editClusterError:"Cluster können nicht editiert werden."},t.de_DE=t.de,t.es={edit:"Editar",del:"Eliminar selección",back:"Atrás",addNode:"Añadir nodo",addEdge:"Añadir arista",editNode:"Editar nodo",editEdge:"Editar arista",addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",createEdgeError:"No se puede conectar una arista a un grupo.",deleteClusterError:"No es posible eliminar grupos.",editClusterError:"No es posible editar grupos."},t.es_ES=t.es,t.it={edit:"Modifica",del:"Cancella la selezione",back:"Indietro",addNode:"Aggiungi un nodo",addEdge:"Aggiungi un vertice",editNode:"Modifica il nodo",editEdge:"Modifica il vertice",addDescription:"Clicca per aggiungere un nuovo nodo",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",createEdgeError:"Non si possono collegare vertici ad un cluster",deleteClusterError:"I cluster non possono essere cancellati",editClusterError:"I clusters non possono essere modificati."},t.it_IT=t.it,t.nl={edit:"Wijzigen",del:"Selectie verwijderen",back:"Terug",addNode:"Node toevoegen",addEdge:"Link toevoegen",editNode:"Node wijzigen",editEdge:"Link wijzigen",addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",createEdgeError:"Kan geen link maken naar een cluster.",deleteClusterError:"Clusters kunnen niet worden verwijderd.",editClusterError:"Clusters kunnen niet worden aangepast."},t.nl_NL=t.nl,t.nl_BE=t.nl,t["pt-br"]={edit:"Editar",del:"Remover selecionado",back:"Voltar",addNode:"Adicionar nó",addEdge:"Adicionar aresta",editNode:"Editar nó",editEdge:"Editar aresta",addDescription:"Clique em um espaço em branco para adicionar um novo nó",edgeDescription:"Clique em um nó e arraste a aresta até outro nó para conectá-los",editEdgeDescription:"Clique nos pontos de controle e os arraste para um nó para conectá-los",createEdgeError:"Não foi possível linkar arestas a um cluster.",deleteClusterError:"Clusters não puderam ser removidos.",editClusterError:"Clusters não puderam ser editados."},t["pt-BR"]=t["pt-br"],t.pt_BR=t["pt-br"],t.pt_br=t["pt-br"],t.ru={edit:"Редактировать",del:"Удалить выбранное",back:"Назад",addNode:"Добавить узел",addEdge:"Добавить ребро",editNode:"Редактировать узел",editEdge:"Редактировать ребро",addDescription:"Кликните в свободное место, чтобы добавить новый узел.",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",createEdgeError:"Невозможно соединить ребра в кластер.",deleteClusterError:"Кластеры не могут быть удалены",editClusterError:"Кластеры недоступны для редактирования."},t.ru_RU=t.ru,t.cn={edit:"编辑",del:"删除选定",back:"返回",addNode:"添加节点",addEdge:"添加连接线",editNode:"编辑节点",editEdge:"编辑连接线",addDescription:"单击空白处放置新节点。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",createEdgeError:"无法将连接线连接到群集。",deleteClusterError:"无法删除群集。",editClusterError:"无法编辑群集。"},t.zh_CN=t.cn,t.uk={edit:"Редагувати",del:"Видалити обране",back:"Назад",addNode:"Додати вузол",addEdge:"Додати край",editNode:"Редагувати вузол",editEdge:"Редагувати край",addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",createEdgeError:"Не можливо об'єднати краї в групу.",deleteClusterError:"Групи не можуть бути видалені.",editClusterError:"Групи недоступні для редагування."},t.uk_UA=t.uk,t.fr={edit:"Éditer",del:"Effacer la sélection",back:"Retour",addNode:"Ajouter un nœud",addEdge:"Ajouter un lien",editNode:"Éditer le nœud",editEdge:"Éditer le lien",addDescription:"Cliquez dans un endroit vide pour placer un nœud.",edgeDescription:"Cliquez sur un nœud et glissez le lien vers un autre nœud pour les connecter.",editEdgeDescription:"Cliquez sur les points de contrôle et glissez-les pour connecter un nœud.",createEdgeError:"Impossible de créer un lien vers un cluster.",deleteClusterError:"Les clusters ne peuvent pas être effacés.",editClusterError:"Les clusters ne peuvent pas être édités."},t.fr_FR=t.fr,t.cs={edit:"Upravit",del:"Smazat výběr",back:"Zpět",addNode:"Přidat vrchol",addEdge:"Přidat hranu",editNode:"Upravit vrchol",editEdge:"Upravit hranu",addDescription:"Kluknutím do prázdného prostoru můžete přidat nový vrchol.",edgeDescription:"Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.",editEdgeDescription:"Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.",createEdgeError:"Nelze připojit hranu ke shluku.",deleteClusterError:"Nelze mazat shluky.",editClusterError:"Nelze upravovat shluky."},t.cs_CZ=t.cs}));var gr=function(g,t){if(!(g instanceof t))throw new TypeError("Cannot call a class as a function")};function tr(g,t){for(var e=0;e<t.length;e++){var A=t[e];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),NA(g,A.key,A)}}var er=function(g,t,e){return t&&tr(g.prototype,t),e&&tr(g,e),g},Ar=function(){function g(){gr(this,g),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}return er(g,[{key:"init",value:function(){if(!this.initialized()){this.src=this.image.src;var g=this.image.width,t=this.image.height;this.width=g,this.height=t;var e=Math.floor(t/2),A=Math.floor(t/4),I=Math.floor(t/8),C=Math.floor(t/16),i=Math.floor(g/2),n=Math.floor(g/4),o=Math.floor(g/8),r=Math.floor(g/16);this.canvas.width=3*n,this.canvas.height=e,this.coordinates=[[0,0,i,e],[i,0,n,A],[i,A,o,I],[5*o,A,r,C]],this._fillMipMap()}}},{key:"initialized",value:function(){return void 0!==this.coordinates}},{key:"_fillMipMap",value:function(){var g=this.canvas.getContext("2d"),t=this.coordinates[0];g.drawImage(this.image,t[0],t[1],t[2],t[3]);for(var e=1;e<this.NUM_ITERATIONS;e++){var A=this.coordinates[e-1],I=this.coordinates[e];g.drawImage(this.canvas,A[0],A[1],A[2],A[3],I[0],I[1],I[2],I[3])}}},{key:"drawImageAtPosition",value:function(g,t,e,A,I,C){if(this.initialized())if(t>2){t*=.5;for(var i=0;t>2&&i<this.NUM_ITERATIONS;)t*=.5,i+=1;i>=this.NUM_ITERATIONS&&(i=this.NUM_ITERATIONS-1);var n=this.coordinates[i];g.drawImage(this.canvas,n[0],n[1],n[2],n[3],e,A,I,C)}else g.drawImage(this.image,e,A,I,C)}}]),g}(),Ir=function(){function g(t){gr(this,g),this.images={},this.imageBroken={},this.callback=t}return er(g,[{key:"_tryloadBrokenUrl",value:function(g,t,e){void 0!==g&&void 0!==e&&(void 0!==t?(e.image.onerror=function(){console.error("Could not load brokenImage:",t)},e.image.src=t):console.warn("No broken url image defined"))}},{key:"_redrawWithImage",value:function(g){this.callback&&this.callback(g)}},{key:"load",value:function(g,t){var e=this,A=this.images[g];if(A)return A;var I=new Ar;return this.images[g]=I,I.image.onload=function(){e._fixImageCoordinates(I.image),I.init(),e._redrawWithImage(I)},I.image.onerror=function(){console.error("Could not load image:",g),e._tryloadBrokenUrl(g,t,I)},I.image.src=g,I}},{key:"_fixImageCoordinates",value:function(g){0===g.width&&(document.body.appendChild(g),g.width=g.offsetWidth,g.height=g.offsetHeight,document.body.removeChild(g))}}]),g}(),Cr=function(){function g(){gr(this,g),this.clear(),this.defaultIndex=0,this.groupsArray=[],this.groupIndex=0,this.defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},FC(this.options,this.defaultOptions)}return er(g,[{key:"setOptions",value:function(g){var t=["useDefaultGroups"];if(void 0!==g)for(var e in g)if(g.hasOwnProperty(e)&&-1===IC(t).call(t,e)){var A=g[e];this.add(e,A)}}},{key:"clear",value:function(){this.groups={},this.groupsArray=[]}},{key:"get",value:function(g){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=this.groups[g];if(void 0===e&&t)if(!1===this.options.useDefaultGroups&&this.groupsArray.length>0){var A=this.groupIndex%this.groupsArray.length;this.groupIndex++,(e={}).color=this.groups[this.groupsArray[A]],this.groups[g]=e}else{var I=this.defaultIndex%this.defaultGroups.length;this.defaultIndex++,(e={}).color=this.defaultGroups[I],this.groups[g]=e}return e}},{key:"add",value:function(g,t){return this.groups[g]=t,this.groupsArray.push(g),t}}]),g}(),ir=[].slice,nr=/MSIE .\./.test(te),or=function(g){return function(t,e){var A=arguments.length>2,I=A?ir.call(arguments,2):void 0;return g(A?function(){("function"==typeof t?t:Function(t)).apply(this,I)}:t,e)}};X({global:!0,bind:!0,forced:nr},{setTimeout:or(n.setTimeout),setInterval:or(n.setInterval)});var rr=S.setTimeout,sr=ke.some,ar=PA("some"),dr=UA("some");X({target:"Array",proto:!0,forced:!ar||!dr},{some:function(g){return sr(this,g,arguments.length>1?arguments[1]:void 0)}});var lr=K("Array").some,hr=Array.prototype,cr=function(g){var t=g.some;return g===hr||g instanceof Array&&t===hr.some?lr:t},ur=n.isFinite,fr=Number.isFinite||function(g){return"number"==typeof g&&ur(g)};X({target:"Number",stat:!0},{isFinite:fr});var pr=S.Number.isFinite;X({target:"Number",stat:!0},{isNaN:function(g){return g!=g}});var vr=S.Number.isNaN;var yr=function(g){if(void 0===g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g},mr=st("Reflect","construct"),br=o((function(){function g(){}return!(mr((function(){}),[],g)instanceof g)})),wr=!o((function(){mr((function(){}))})),xr=br||wr;X({target:"Reflect",stat:!0,forced:xr,sham:xr},{construct:function(g,t){L(g),Y(t);var e=arguments.length<3?g:L(arguments[2]);if(wr&&!br)return mr(g,t,e);if(g==e){switch(t.length){case 0:return new g;case 1:return new g(t[0]);case 2:return new g(t[0],t[1]);case 3:return new g(t[0],t[1],t[2]);case 4:return new g(t[0],t[1],t[2],t[3])}var A=[null];return A.push.apply(A,t),new(J.apply(g,A))}var I=e.prototype,C=ut(y(I)?I:Object.prototype),i=Function.apply.call(g,C,t);return y(i)?i:C}});var kr=S.Reflect.construct,Dr=K("Array").entries,Or=Array.prototype,Nr={DOMTokenList:!0,NodeList:!0},Zr=function(g){var t=g.entries;return g===Or||g instanceof Array&&t===Or.entries||Nr.hasOwnProperty(mt(g))?Dr:t},Mr=st("JSON","stringify"),Er=/[\uD800-\uDFFF]/g,Gr=/^[\uD800-\uDBFF]$/,Tr=/^[\uDC00-\uDFFF]$/,Br=function(g,t,e){var A=e.charAt(t-1),I=e.charAt(t+1);return Gr.test(g)&&!Tr.test(I)||Tr.test(g)&&!Gr.test(A)?"\\u"+g.charCodeAt(0).toString(16):g},Rr=o((function(){return'"\\udf06\\ud834"'!==Mr("\udf06\ud834")||'"\\udead"'!==Mr("\udead")}));Mr&&X({target:"JSON",stat:!0,forced:Rr},{stringify:function(g,t,e){var A=Mr.apply(null,arguments);return"string"==typeof A?A.replace(Er,Br):A}}),S.JSON||(S.JSON={stringify:JSON.stringify});var Fr=function(g,t,e){return S.JSON.stringify.apply(null,arguments)},Sr=K("Array").values,Lr=Array.prototype,Qr={DOMTokenList:!0,NodeList:!0},Yr=function(g){var t=g.values;return g===Lr||g instanceof Array&&t===Lr.values||Qr.hasOwnProperty(mt(g))?Sr:t},Wr=K("Array").keys,zr=Array.prototype,Pr={DOMTokenList:!0,NodeList:!0},jr=function(g){var t=g.keys;return g===zr||g instanceof Array&&t===zr.keys||Pr.hasOwnProperty(mt(g))?Wr:t},Vr=DA;X({target:"Object",stat:!0},{setPrototypeOf:Nt});var Xr=S.Object.setPrototypeOf,Ur=A((function(g){function t(e,A){return g.exports=t=Xr||function(g,t){return g.__proto__=t,g},t(e,A)}g.exports=t}));var _r=function(g,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");g.prototype=Vr(t&&t.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),t&&Ur(g,t)};var Hr=function(g,t){return!t||"object"!==dC(t)&&"function"!=typeof t?yr(g):t},Jr=HI,Kr=A((function(g){function t(e){return g.exports=t=Xr?Jr:function(g){return g.__proto__||Jr(g)},t(e)}g.exports=t})),qr=[],$r=qr.sort,gs=o((function(){qr.sort(void 0)})),ts=o((function(){qr.sort(null)})),es=PA("sort");X({target:"Array",proto:!0,forced:gs||!ts||!es},{sort:function(g){return void 0===g?$r.call(Bg(this)):$r.call(Bg(this),L(g))}});var As=K("Array").sort,Is=Array.prototype,Cs=function(g){var t=g.sort;return g===Is||g instanceof Array&&t===Is.sort?As:t},is=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),ns=A((function(g){var t=z.f,e=yg("meta"),A=0,I=Object.isExtensible||function(){return!0},C=function(g){t(g,e,{value:{objectID:"O"+ ++A,weakData:{}}})},i=g.exports={REQUIRED:!1,fastKey:function(g,t){if(!y(g))return"symbol"==typeof g?g:("string"==typeof g?"S":"P")+g;if(!w(g,e)){if(!I(g))return"F";if(!t)return"E";C(g)}return g[e].objectID},getWeakData:function(g,t){if(!w(g,e)){if(!I(g))return!0;if(!t)return!1;C(g)}return g[e].weakData},onFreeze:function(g){return is&&i.REQUIRED&&I(g)&&!w(g,e)&&C(g),g}};wg[e]=!0})),os=(ns.REQUIRED,ns.fastKey,ns.getWeakData,ns.onFreeze,A((function(g){var t=function(g,t){this.stopped=g,this.result=t};(g.exports=function(g,e,A,I,C){var i,n,o,r,s,a,d,l=Q(e,A,I?2:1);if(C)i=g;else{if("function"!=typeof(n=_t(g)))throw TypeError("Target is not iterable");if(nA(n)){for(o=0,r=qg(g.length);r>o;o++)if((s=I?l(Y(d=g[o])[0],d[1]):l(g[o]))&&s instanceof t)return s;return new t(!1)}i=n.call(g)}for(a=i.next;!(d=a.call(i)).done;)if("object"==typeof(s=IA(i,l,d.value,I))&&s&&s instanceof t)return s;return new t(!1)}).stop=function(g){return new t(!0,g)}}))),rs=function(g,t,e){if(!(g instanceof t))throw TypeError("Incorrect "+(e?e+" ":"")+"invocation");return g},ss=z.f,as=ke.forEach,ds=Tg.set,ls=Tg.getterFor,hs=function(g,t,e){var A,I=-1!==g.indexOf("Map"),C=-1!==g.indexOf("Weak"),i=I?"set":"add",s=n[g],a=s&&s.prototype,d={};if(r&&"function"==typeof s&&(C||a.forEach&&!o((function(){(new s).entries().next()})))){A=t((function(t,e){ds(rs(t,A,g),{type:g,collection:new s}),null!=e&&os(e,t[i],t,I)}));var l=ls(g);as(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(g){var t="add"==g||"set"==g;g in a&&(!C||"clear"!=g)&&P(A.prototype,g,(function(e,A){var I=l(this).collection;if(!t&&C&&!y(e))return"get"==g&&void 0;var i=I[g](0===e?0:e,A);return t?this:i}))})),C||ss(A.prototype,"size",{configurable:!0,get:function(){return l(this).collection.size}})}else A=e.getConstructor(t,g,I,i),ns.REQUIRED=!0;return kt(A,g,!1,!0),d[g]=A,X({global:!0,forced:!0},d),C||e.setStrong(A,g,I),A},cs=function(g,t,e){for(var A in t)e&&e.unsafe&&g[A]?g[A]=t[A]:Zt(g,A,t[A],e);return g},us=jg("species"),fs=z.f,ps=ns.fastKey,vs=Tg.set,ys=Tg.getterFor,ms={getConstructor:function(g,t,e,A){var I=g((function(g,C){rs(g,I,t),vs(g,{type:t,index:ut(null),first:void 0,last:void 0,size:0}),r||(g.size=0),null!=C&&os(C,g[A],g,e)})),C=ys(t),i=function(g,t,e){var A,I,i=C(g),o=n(g,t);return o?o.value=e:(i.last=o={index:I=ps(t,!0),key:t,value:e,previous:A=i.last,next:void 0,removed:!1},i.first||(i.first=o),A&&(A.next=o),r?i.size++:g.size++,"F"!==I&&(i.index[I]=o)),g},n=function(g,t){var e,A=C(g),I=ps(t);if("F"!==I)return A.index[I];for(e=A.first;e;e=e.next)if(e.key==t)return e};return cs(I.prototype,{clear:function(){for(var g=C(this),t=g.index,e=g.first;e;)e.removed=!0,e.previous&&(e.previous=e.previous.next=void 0),delete t[e.index],e=e.next;g.first=g.last=void 0,r?g.size=0:this.size=0},delete:function(g){var t=C(this),e=n(this,g);if(e){var A=e.next,I=e.previous;delete t.index[e.index],e.removed=!0,I&&(I.next=A),A&&(A.previous=I),t.first==e&&(t.first=A),t.last==e&&(t.last=I),r?t.size--:this.size--}return!!e},forEach:function(g){for(var t,e=C(this),A=Q(g,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:e.first;)for(A(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(g){return!!n(this,g)}}),cs(I.prototype,e?{get:function(g){var t=n(this,g);return t&&t.value},set:function(g,t){return i(this,0===g?0:g,t)}}:{add:function(g){return i(this,g=0===g?0:g,g)}}),r&&fs(I.prototype,"size",{get:function(){return C(this).size}}),I},setStrong:function(g,t,e){var A=t+" Iterator",I=ys(t),C=ys(A);Bt(g,t,(function(g,t){vs(this,{type:A,target:g,state:I(g),kind:t,last:void 0})}),(function(){for(var g=C(this),t=g.kind,e=g.last;e&&e.removed;)e=e.previous;return g.target&&(g.last=e=e?e.next:g.state.first)?"keys"==t?{value:e.key,done:!1}:"values"==t?{value:e.value,done:!1}:{value:[e.key,e.value],done:!1}:(g.target=void 0,{value:void 0,done:!0})}),e?"entries":"values",!e,!0),function(g){var t=st(g),e=z.f;r&&t&&!t[us]&&e(t,us,{configurable:!0,get:function(){return this}})}(t)}},bs=(hs("Set",(function(g){return function(){return g(this,arguments.length?arguments[0]:void 0)}}),ms),S.Set),ws=(hs("Map",(function(g){return function(){return g(this,arguments.length?arguments[0]:void 0)}}),ms),S.Map),xs=A((function(g){var t=function(g){var t=Object.prototype,e=t.hasOwnProperty,A="function"==typeof Symbol?Symbol:{},I=A.iterator||"@@iterator",C=A.asyncIterator||"@@asyncIterator",i=A.toStringTag||"@@toStringTag";function n(g,t,e,A){var I=t&&t.prototype instanceof s?t:s,C=Object.create(I.prototype),i=new b(A||[]);return C._invoke=function(g,t,e){var A="suspendedStart";return function(I,C){if("executing"===A)throw new Error("Generator is already running");if("completed"===A){if("throw"===I)throw C;return x()}for(e.method=I,e.arg=C;;){var i=e.delegate;if(i){var n=v(i,e);if(n){if(n===r)continue;return n}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===A)throw A="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);A="executing";var s=o(g,t,e);if("normal"===s.type){if(A=e.done?"completed":"suspendedYield",s.arg===r)continue;return{value:s.arg,done:e.done}}"throw"===s.type&&(A="completed",e.method="throw",e.arg=s.arg)}}}(g,e,i),C}function o(g,t,e){try{return{type:"normal",arg:g.call(t,e)}}catch(g){return{type:"throw",arg:g}}}g.wrap=n;var r={};function s(){}function a(){}function d(){}var l={};l[I]=function(){return this};var h=Object.getPrototypeOf,c=h&&h(h(w([])));c&&c!==t&&e.call(c,I)&&(l=c);var u=d.prototype=s.prototype=Object.create(l);function f(g){["next","throw","return"].forEach((function(t){g[t]=function(g){return this._invoke(t,g)}}))}function p(g,t){var A;this._invoke=function(I,C){function i(){return new t((function(A,i){!function A(I,C,i,n){var r=o(g[I],g,C);if("throw"!==r.type){var s=r.arg,a=s.value;return a&&"object"==typeof a&&e.call(a,"__await")?t.resolve(a.__await).then((function(g){A("next",g,i,n)}),(function(g){A("throw",g,i,n)})):t.resolve(a).then((function(g){s.value=g,i(s)}),(function(g){return A("throw",g,i,n)}))}n(r.arg)}(I,C,A,i)}))}return A=A?A.then(i,i):i()}}function v(g,t){var e=g.iterator[t.method];if(void 0===e){if(t.delegate=null,"throw"===t.method){if(g.iterator.return&&(t.method="return",t.arg=void 0,v(g,t),"throw"===t.method))return r;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return r}var A=o(e,g.iterator,t.arg);if("throw"===A.type)return t.method="throw",t.arg=A.arg,t.delegate=null,r;var I=A.arg;return I?I.done?(t[g.resultName]=I.value,t.next=g.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,r):I:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,r)}function y(g){var t={tryLoc:g[0]};1 in g&&(t.catchLoc=g[1]),2 in g&&(t.finallyLoc=g[2],t.afterLoc=g[3]),this.tryEntries.push(t)}function m(g){var t=g.completion||{};t.type="normal",delete t.arg,g.completion=t}function b(g){this.tryEntries=[{tryLoc:"root"}],g.forEach(y,this),this.reset(!0)}function w(g){if(g){var t=g[I];if(t)return t.call(g);if("function"==typeof g.next)return g;if(!isNaN(g.length)){var A=-1,C=function t(){for(;++A<g.length;)if(e.call(g,A))return t.value=g[A],t.done=!1,t;return t.value=void 0,t.done=!0,t};return C.next=C}}return{next:x}}function x(){return{value:void 0,done:!0}}return a.prototype=u.constructor=d,d.constructor=a,d[i]=a.displayName="GeneratorFunction",g.isGeneratorFunction=function(g){var t="function"==typeof g&&g.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},g.mark=function(g){return Object.setPrototypeOf?Object.setPrototypeOf(g,d):(g.__proto__=d,i in g||(g[i]="GeneratorFunction")),g.prototype=Object.create(u),g},g.awrap=function(g){return{__await:g}},f(p.prototype),p.prototype[C]=function(){return this},g.AsyncIterator=p,g.async=function(t,e,A,I,C){void 0===C&&(C=Promise);var i=new p(n(t,e,A,I),C);return g.isGeneratorFunction(e)?i:i.next().then((function(g){return g.done?g.value:i.next()}))},f(u),u[i]="Generator",u[I]=function(){return this},u.toString=function(){return"[object Generator]"},g.keys=function(g){var t=[];for(var e in g)t.push(e);return t.reverse(),function e(){for(;t.length;){var A=t.pop();if(A in g)return e.value=A,e.done=!1,e}return e.done=!0,e}},g.values=w,b.prototype={constructor:b,reset:function(g){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(m),!g)for(var t in this)"t"===t.charAt(0)&&e.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var g=this.tryEntries[0].completion;if("throw"===g.type)throw g.arg;return this.rval},dispatchException:function(g){if(this.done)throw g;var t=this;function A(e,A){return i.type="throw",i.arg=g,t.next=e,A&&(t.method="next",t.arg=void 0),!!A}for(var I=this.tryEntries.length-1;I>=0;--I){var C=this.tryEntries[I],i=C.completion;if("root"===C.tryLoc)return A("end");if(C.tryLoc<=this.prev){var n=e.call(C,"catchLoc"),o=e.call(C,"finallyLoc");if(n&&o){if(this.prev<C.catchLoc)return A(C.catchLoc,!0);if(this.prev<C.finallyLoc)return A(C.finallyLoc)}else if(n){if(this.prev<C.catchLoc)return A(C.catchLoc,!0)}else{if(!o)throw new Error("try statement without catch or finally");if(this.prev<C.finallyLoc)return A(C.finallyLoc)}}}},abrupt:function(g,t){for(var A=this.tryEntries.length-1;A>=0;--A){var I=this.tryEntries[A];if(I.tryLoc<=this.prev&&e.call(I,"finallyLoc")&&this.prev<I.finallyLoc){var C=I;break}}C&&("break"===g||"continue"===g)&&C.tryLoc<=t&&t<=C.finallyLoc&&(C=null);var i=C?C.completion:{};return i.type=g,i.arg=t,C?(this.method="next",this.next=C.finallyLoc,r):this.complete(i)},complete:function(g,t){if("throw"===g.type)throw g.arg;return"break"===g.type||"continue"===g.type?this.next=g.arg:"return"===g.type?(this.rval=this.arg=g.arg,this.method="return",this.next="end"):"normal"===g.type&&t&&(this.next=t),r},finish:function(g){for(var t=this.tryEntries.length-1;t>=0;--t){var e=this.tryEntries[t];if(e.finallyLoc===g)return this.complete(e.completion,e.afterLoc),m(e),r}},catch:function(g){for(var t=this.tryEntries.length-1;t>=0;--t){var e=this.tryEntries[t];if(e.tryLoc===g){var A=e.completion;if("throw"===A.type){var I=A.arg;m(e)}return I}}throw new Error("illegal catch attempt")},delegateYield:function(g,t,e){return this.delegate={iterator:w(g),resultName:t,nextLoc:e},"next"===this.method&&(this.arg=void 0),r}},g}(g.exports);try{regeneratorRuntime=t}catch(g){Function("r","regeneratorRuntime = r")(t)}})),ks=sC,Ds=function(g,t,e,A,I,C,i,n){for(var o,r=I,s=0,a=!!i&&Q(i,n,3);s<A;){if(s in e){if(o=a?a(e[s],s,t):e[s],C>0&&Kt(o))r=Ds(g,t,o,qg(o.length),r,C-1)-1;else{if(r>=9007199254740991)throw TypeError("Exceed the acceptable array length");g[r]=o}r++}s++}return r},Os=Ds;X({target:"Array",proto:!0},{flatMap:function(g){var t,e=Bg(this),A=qg(e.length);return L(g),(t=ge(e,0)).length=Os(t,e,e,A,0,1,g,arguments.length>1?arguments[1]:void 0),t}});var Ns=K("Array").flatMap,Zs=Array.prototype,Ms=function(g){var t=g.flatMap;return g===Zs||g instanceof Array&&t===Zs.flatMap?Ns:t},Es=function(g){return function(t,e,A,I){L(e);var C=Bg(t),i=f(C),n=qg(C.length),o=g?n-1:0,r=g?-1:1;if(A<2)for(;;){if(o in i){I=i[o],o+=r;break}if(o+=r,g?o<0:n<=o)throw TypeError("Reduce of empty array with no initial value")}for(;g?o>=0:n>o;o+=r)o in i&&(I=e(I,i[o],o,C));return I}},Gs={left:Es(!1),right:Es(!0)}.left,Ts=PA("reduce"),Bs=UA("reduce",{1:0});X({target:"Array",proto:!0,forced:!Ts||!Bs},{reduce:function(g){return Gs(this,g,arguments.length,arguments.length>1?arguments[1]:void 0)}});var Rs=K("Array").reduce,Fs=Array.prototype,Ss=function(g){var t=g.reduce;return g===Fs||g instanceof Array&&t===Fs.reduce?Rs:t},Ls="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),Qs=new Uint8Array(16);function Ys(){if(!Ls)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ls(Qs)}for(var Ws=[],zs=0;zs<256;++zs)Ws[zs]=(zs+256).toString(16).substr(1);function Ps(g,t,e){var A=t&&e||0;"string"==typeof g&&(t="binary"===g?new Array(16):null,g=null);var I=(g=g||{}).random||(g.rng||Ys)();if(I[6]=15&I[6]|64,I[8]=63&I[8]|128,t)for(var C=0;C<16;++C)t[A+C]=I[C];return t||function(g,t){var e=t||0,A=Ws;return[A[g[e++]],A[g[e++]],A[g[e++]],A[g[e++]],"-",A[g[e++]],A[g[e++]],"-",A[g[e++]],A[g[e++]],"-",A[g[e++]],A[g[e++]],"-",A[g[e++]],A[g[e++]],A[g[e++]],A[g[e++]],A[g[e++]],A[g[e++]]].join("")}(I)}var js=A((function(g,t){g.exports=function(){var t,e;function A(){return t.apply(null,arguments)}function I(g){return g instanceof Array||"[object Array]"===Object.prototype.toString.call(g)}function i(g){return null!=g&&"[object Object]"===Object.prototype.toString.call(g)}function n(g){return void 0===g}function o(g){return"number"==typeof g||"[object Number]"===Object.prototype.toString.call(g)}function r(g){return g instanceof Date||"[object Date]"===Object.prototype.toString.call(g)}function s(g,t){var e,A=[];for(e=0;e<g.length;++e)A.push(t(g[e],e));return A}function a(g,t){return Object.prototype.hasOwnProperty.call(g,t)}function d(g,t){for(var e in t)a(t,e)&&(g[e]=t[e]);return a(t,"toString")&&(g.toString=t.toString),a(t,"valueOf")&&(g.valueOf=t.valueOf),g}function l(g,t,e,A){return xt(g,t,e,A,!0).utc()}function h(g){return null==g._pf&&(g._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),g._pf}function c(g){if(null==g._isValid){var t=h(g),A=e.call(t.parsedDateParts,(function(g){return null!=g})),I=!isNaN(g._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&A);if(g._strict&&(I=I&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(g))return I;g._isValid=I}return g._isValid}function u(g){var t=l(NaN);return null!=g?d(h(t),g):h(t).userInvalidated=!0,t}e=Array.prototype.some?Array.prototype.some:function(g){for(var t=Object(this),e=t.length>>>0,A=0;A<e;A++)if(A in t&&g.call(this,t[A],A,t))return!0;return!1};var f=A.momentProperties=[];function p(g,t){var e,A,I;if(n(t._isAMomentObject)||(g._isAMomentObject=t._isAMomentObject),n(t._i)||(g._i=t._i),n(t._f)||(g._f=t._f),n(t._l)||(g._l=t._l),n(t._strict)||(g._strict=t._strict),n(t._tzm)||(g._tzm=t._tzm),n(t._isUTC)||(g._isUTC=t._isUTC),n(t._offset)||(g._offset=t._offset),n(t._pf)||(g._pf=h(t)),n(t._locale)||(g._locale=t._locale),f.length>0)for(e=0;e<f.length;e++)n(I=t[A=f[e]])||(g[A]=I);return g}var v=!1;function y(g){p(this,g),this._d=new Date(null!=g._d?g._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===v&&(v=!0,A.updateOffset(this),v=!1)}function m(g){return g instanceof y||null!=g&&null!=g._isAMomentObject}function b(g){return g<0?Math.ceil(g)||0:Math.floor(g)}function w(g){var t=+g,e=0;return 0!==t&&isFinite(t)&&(e=b(t)),e}function x(g,t,e){var A,I=Math.min(g.length,t.length),C=Math.abs(g.length-t.length),i=0;for(A=0;A<I;A++)(e&&g[A]!==t[A]||!e&&w(g[A])!==w(t[A]))&&i++;return i+C}function k(g){!1===A.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+g)}function D(g,t){var e=!0;return d((function(){if(null!=A.deprecationHandler&&A.deprecationHandler(null,g),e){for(var I,C=[],i=0;i<arguments.length;i++){if(I="","object"==typeof arguments[i]){for(var n in I+="\n["+i+"] ",arguments[0])I+=n+": "+arguments[0][n]+", ";I=I.slice(0,-2)}else I=arguments[i];C.push(I)}k(g+"\nArguments: "+Array.prototype.slice.call(C).join("")+"\n"+(new Error).stack),e=!1}return t.apply(this,arguments)}),t)}var O,N={};function Z(g,t){null!=A.deprecationHandler&&A.deprecationHandler(g,t),N[g]||(k(t),N[g]=!0)}function M(g){return g instanceof Function||"[object Function]"===Object.prototype.toString.call(g)}function E(g,t){var e,A=d({},g);for(e in t)a(t,e)&&(i(g[e])&&i(t[e])?(A[e]={},d(A[e],g[e]),d(A[e],t[e])):null!=t[e]?A[e]=t[e]:delete A[e]);for(e in g)a(g,e)&&!a(t,e)&&i(g[e])&&(A[e]=d({},A[e]));return A}function G(g){null!=g&&this.set(g)}A.suppressDeprecationWarnings=!1,A.deprecationHandler=null,O=Object.keys?Object.keys:function(g){var t,e=[];for(t in g)a(g,t)&&e.push(t);return e};var T={};function B(g,t){var e=g.toLowerCase();T[e]=T[e+"s"]=T[t]=g}function R(g){return"string"==typeof g?T[g]||T[g.toLowerCase()]:void 0}function F(g){var t,e,A={};for(e in g)a(g,e)&&(t=R(e))&&(A[t]=g[e]);return A}var S={};function L(g,t){S[g]=t}function Q(g,t,e){var A=""+Math.abs(g),I=t-A.length;return(g>=0?e?"+":"":"-")+Math.pow(10,Math.max(0,I)).toString().substr(1)+A}var Y=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,W=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,z={},P={};function j(g,t,e,A){var I=A;"string"==typeof A&&(I=function(){return this[A]()}),g&&(P[g]=I),t&&(P[t[0]]=function(){return Q(I.apply(this,arguments),t[1],t[2])}),e&&(P[e]=function(){return this.localeData().ordinal(I.apply(this,arguments),g)})}function V(g,t){return g.isValid()?(t=X(t,g.localeData()),z[t]=z[t]||function(g){var t,e,A,I=g.match(Y);for(t=0,e=I.length;t<e;t++)P[I[t]]?I[t]=P[I[t]]:I[t]=(A=I[t]).match(/\[[\s\S]/)?A.replace(/^\[|\]$/g,""):A.replace(/\\/g,"");return function(t){var A,C="";for(A=0;A<e;A++)C+=M(I[A])?I[A].call(t,g):I[A];return C}}(t),z[t](g)):g.localeData().invalidDate()}function X(g,t){var e=5;function A(g){return t.longDateFormat(g)||g}for(W.lastIndex=0;e>=0&&W.test(g);)g=g.replace(W,A),W.lastIndex=0,e-=1;return g}var U=/\d/,_=/\d\d/,H=/\d{3}/,J=/\d{4}/,K=/[+-]?\d{6}/,q=/\d\d?/,$=/\d\d\d\d?/,gg=/\d\d\d\d\d\d?/,tg=/\d{1,3}/,eg=/\d{1,4}/,Ag=/[+-]?\d{1,6}/,Ig=/\d+/,Cg=/[+-]?\d+/,ig=/Z|[+-]\d\d:?\d\d/gi,ng=/Z|[+-]\d\d(?::?\d\d)?/gi,og=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,rg={};function sg(g,t,e){rg[g]=M(t)?t:function(g,A){return g&&e?e:t}}function ag(g,t){return a(rg,g)?rg[g](t._strict,t._locale):new RegExp(dg(g.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(g,t,e,A,I){return t||e||A||I}))))}function dg(g){return g.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var lg={};function hg(g,t){var e,A=t;for("string"==typeof g&&(g=[g]),o(t)&&(A=function(g,e){e[t]=w(g)}),e=0;e<g.length;e++)lg[g[e]]=A}function cg(g,t){hg(g,(function(g,e,A,I){A._w=A._w||{},t(g,A._w,A,I)}))}function ug(g,t,e){null!=t&&a(lg,g)&&lg[g](t,e._a,e,g)}function fg(g){return pg(g)?366:365}function pg(g){return g%4==0&&g%100!=0||g%400==0}j("Y",0,0,(function(){var g=this.year();return g<=9999?""+g:"+"+g})),j(0,["YY",2],0,(function(){return this.year()%100})),j(0,["YYYY",4],0,"year"),j(0,["YYYYY",5],0,"year"),j(0,["YYYYYY",6,!0],0,"year"),B("year","y"),L("year",1),sg("Y",Cg),sg("YY",q,_),sg("YYYY",eg,J),sg("YYYYY",Ag,K),sg("YYYYYY",Ag,K),hg(["YYYYY","YYYYYY"],0),hg("YYYY",(function(g,t){t[0]=2===g.length?A.parseTwoDigitYear(g):w(g)})),hg("YY",(function(g,t){t[0]=A.parseTwoDigitYear(g)})),hg("Y",(function(g,t){t[0]=parseInt(g,10)})),A.parseTwoDigitYear=function(g){return w(g)+(w(g)>68?1900:2e3)};var vg,yg=mg("FullYear",!0);function mg(g,t){return function(e){return null!=e?(wg(this,g,e),A.updateOffset(this,t),this):bg(this,g)}}function bg(g,t){return g.isValid()?g._d["get"+(g._isUTC?"UTC":"")+t]():NaN}function wg(g,t,e){g.isValid()&&!isNaN(e)&&("FullYear"===t&&pg(g.year())&&1===g.month()&&29===g.date()?g._d["set"+(g._isUTC?"UTC":"")+t](e,g.month(),xg(e,g.month())):g._d["set"+(g._isUTC?"UTC":"")+t](e))}function xg(g,t){if(isNaN(g)||isNaN(t))return NaN;var e,A=(t%(e=12)+e)%e;return g+=(t-A)/12,1===A?pg(g)?29:28:31-A%7%2}vg=Array.prototype.indexOf?Array.prototype.indexOf:function(g){var t;for(t=0;t<this.length;++t)if(this[t]===g)return t;return-1},j("M",["MM",2],"Mo",(function(){return this.month()+1})),j("MMM",0,0,(function(g){return this.localeData().monthsShort(this,g)})),j("MMMM",0,0,(function(g){return this.localeData().months(this,g)})),B("month","M"),L("month",8),sg("M",q),sg("MM",q,_),sg("MMM",(function(g,t){return t.monthsShortRegex(g)})),sg("MMMM",(function(g,t){return t.monthsRegex(g)})),hg(["M","MM"],(function(g,t){t[1]=w(g)-1})),hg(["MMM","MMMM"],(function(g,t,e,A){var I=e._locale.monthsParse(g,A,e._strict);null!=I?t[1]=I:h(e).invalidMonth=g}));var kg=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Dg="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Og="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ng(g,t,e){var A,I,C,i=g.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],A=0;A<12;++A)C=l([2e3,A]),this._shortMonthsParse[A]=this.monthsShort(C,"").toLocaleLowerCase(),this._longMonthsParse[A]=this.months(C,"").toLocaleLowerCase();return e?"MMM"===t?-1!==(I=vg.call(this._shortMonthsParse,i))?I:null:-1!==(I=vg.call(this._longMonthsParse,i))?I:null:"MMM"===t?-1!==(I=vg.call(this._shortMonthsParse,i))||-1!==(I=vg.call(this._longMonthsParse,i))?I:null:-1!==(I=vg.call(this._longMonthsParse,i))||-1!==(I=vg.call(this._shortMonthsParse,i))?I:null}function Zg(g,t){var e;if(!g.isValid())return g;if("string"==typeof t)if(/^\d+$/.test(t))t=w(t);else if(!o(t=g.localeData().monthsParse(t)))return g;return e=Math.min(g.date(),xg(g.year(),t)),g._d["set"+(g._isUTC?"UTC":"")+"Month"](t,e),g}function Mg(g){return null!=g?(Zg(this,g),A.updateOffset(this,!0),this):bg(this,"Month")}var Eg=og,Gg=og;function Tg(){function g(g,t){return t.length-g.length}var t,e,A=[],I=[],C=[];for(t=0;t<12;t++)e=l([2e3,t]),A.push(this.monthsShort(e,"")),I.push(this.months(e,"")),C.push(this.months(e,"")),C.push(this.monthsShort(e,""));for(A.sort(g),I.sort(g),C.sort(g),t=0;t<12;t++)A[t]=dg(A[t]),I[t]=dg(I[t]);for(t=0;t<24;t++)C[t]=dg(C[t]);this._monthsRegex=new RegExp("^("+C.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+I.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+A.join("|")+")","i")}function Bg(g,t,e,A,I,C,i){var n;return g<100&&g>=0?(n=new Date(g+400,t,e,A,I,C,i),isFinite(n.getFullYear())&&n.setFullYear(g)):n=new Date(g,t,e,A,I,C,i),n}function Rg(g){var t;if(g<100&&g>=0){var e=Array.prototype.slice.call(arguments);e[0]=g+400,t=new Date(Date.UTC.apply(null,e)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(g)}else t=new Date(Date.UTC.apply(null,arguments));return t}function Fg(g,t,e){var A=7+t-e;return-(7+Rg(g,0,A).getUTCDay()-t)%7+A-1}function Sg(g,t,e,A,I){var C,i,n=1+7*(t-1)+(7+e-A)%7+Fg(g,A,I);return n<=0?i=fg(C=g-1)+n:n>fg(g)?(C=g+1,i=n-fg(g)):(C=g,i=n),{year:C,dayOfYear:i}}function Lg(g,t,e){var A,I,C=Fg(g.year(),t,e),i=Math.floor((g.dayOfYear()-C-1)/7)+1;return i<1?A=i+Qg(I=g.year()-1,t,e):i>Qg(g.year(),t,e)?(A=i-Qg(g.year(),t,e),I=g.year()+1):(I=g.year(),A=i),{week:A,year:I}}function Qg(g,t,e){var A=Fg(g,t,e),I=Fg(g+1,t,e);return(fg(g)-A+I)/7}function Yg(g,t){return g.slice(t,7).concat(g.slice(0,t))}j("w",["ww",2],"wo","week"),j("W",["WW",2],"Wo","isoWeek"),B("week","w"),B("isoWeek","W"),L("week",5),L("isoWeek",5),sg("w",q),sg("ww",q,_),sg("W",q),sg("WW",q,_),cg(["w","ww","W","WW"],(function(g,t,e,A){t[A.substr(0,1)]=w(g)})),j("d",0,"do","day"),j("dd",0,0,(function(g){return this.localeData().weekdaysMin(this,g)})),j("ddd",0,0,(function(g){return this.localeData().weekdaysShort(this,g)})),j("dddd",0,0,(function(g){return this.localeData().weekdays(this,g)})),j("e",0,0,"weekday"),j("E",0,0,"isoWeekday"),B("day","d"),B("weekday","e"),B("isoWeekday","E"),L("day",11),L("weekday",11),L("isoWeekday",11),sg("d",q),sg("e",q),sg("E",q),sg("dd",(function(g,t){return t.weekdaysMinRegex(g)})),sg("ddd",(function(g,t){return t.weekdaysShortRegex(g)})),sg("dddd",(function(g,t){return t.weekdaysRegex(g)})),cg(["dd","ddd","dddd"],(function(g,t,e,A){var I=e._locale.weekdaysParse(g,A,e._strict);null!=I?t.d=I:h(e).invalidWeekday=g})),cg(["d","e","E"],(function(g,t,e,A){t[A]=w(g)}));var Wg="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),zg="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Pg="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function jg(g,t,e){var A,I,C,i=g.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],A=0;A<7;++A)C=l([2e3,1]).day(A),this._minWeekdaysParse[A]=this.weekdaysMin(C,"").toLocaleLowerCase(),this._shortWeekdaysParse[A]=this.weekdaysShort(C,"").toLocaleLowerCase(),this._weekdaysParse[A]=this.weekdays(C,"").toLocaleLowerCase();return e?"dddd"===t?-1!==(I=vg.call(this._weekdaysParse,i))?I:null:"ddd"===t?-1!==(I=vg.call(this._shortWeekdaysParse,i))?I:null:-1!==(I=vg.call(this._minWeekdaysParse,i))?I:null:"dddd"===t?-1!==(I=vg.call(this._weekdaysParse,i))||-1!==(I=vg.call(this._shortWeekdaysParse,i))||-1!==(I=vg.call(this._minWeekdaysParse,i))?I:null:"ddd"===t?-1!==(I=vg.call(this._shortWeekdaysParse,i))||-1!==(I=vg.call(this._weekdaysParse,i))||-1!==(I=vg.call(this._minWeekdaysParse,i))?I:null:-1!==(I=vg.call(this._minWeekdaysParse,i))||-1!==(I=vg.call(this._weekdaysParse,i))||-1!==(I=vg.call(this._shortWeekdaysParse,i))?I:null}var Vg=og,Xg=og,Ug=og;function _g(){function g(g,t){return t.length-g.length}var t,e,A,I,C,i=[],n=[],o=[],r=[];for(t=0;t<7;t++)e=l([2e3,1]).day(t),A=this.weekdaysMin(e,""),I=this.weekdaysShort(e,""),C=this.weekdays(e,""),i.push(A),n.push(I),o.push(C),r.push(A),r.push(I),r.push(C);for(i.sort(g),n.sort(g),o.sort(g),r.sort(g),t=0;t<7;t++)n[t]=dg(n[t]),o[t]=dg(o[t]),r[t]=dg(r[t]);this._weekdaysRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Hg(){return this.hours()%12||12}function Jg(g,t){j(g,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Kg(g,t){return t._meridiemParse}j("H",["HH",2],0,"hour"),j("h",["hh",2],0,Hg),j("k",["kk",2],0,(function(){return this.hours()||24})),j("hmm",0,0,(function(){return""+Hg.apply(this)+Q(this.minutes(),2)})),j("hmmss",0,0,(function(){return""+Hg.apply(this)+Q(this.minutes(),2)+Q(this.seconds(),2)})),j("Hmm",0,0,(function(){return""+this.hours()+Q(this.minutes(),2)})),j("Hmmss",0,0,(function(){return""+this.hours()+Q(this.minutes(),2)+Q(this.seconds(),2)})),Jg("a",!0),Jg("A",!1),B("hour","h"),L("hour",13),sg("a",Kg),sg("A",Kg),sg("H",q),sg("h",q),sg("k",q),sg("HH",q,_),sg("hh",q,_),sg("kk",q,_),sg("hmm",$),sg("hmmss",gg),sg("Hmm",$),sg("Hmmss",gg),hg(["H","HH"],3),hg(["k","kk"],(function(g,t,e){var A=w(g);t[3]=24===A?0:A})),hg(["a","A"],(function(g,t,e){e._isPm=e._locale.isPM(g),e._meridiem=g})),hg(["h","hh"],(function(g,t,e){t[3]=w(g),h(e).bigHour=!0})),hg("hmm",(function(g,t,e){var A=g.length-2;t[3]=w(g.substr(0,A)),t[4]=w(g.substr(A)),h(e).bigHour=!0})),hg("hmmss",(function(g,t,e){var A=g.length-4,I=g.length-2;t[3]=w(g.substr(0,A)),t[4]=w(g.substr(A,2)),t[5]=w(g.substr(I)),h(e).bigHour=!0})),hg("Hmm",(function(g,t,e){var A=g.length-2;t[3]=w(g.substr(0,A)),t[4]=w(g.substr(A))})),hg("Hmmss",(function(g,t,e){var A=g.length-4,I=g.length-2;t[3]=w(g.substr(0,A)),t[4]=w(g.substr(A,2)),t[5]=w(g.substr(I))}));var qg,$g=mg("Hours",!0),gt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Dg,monthsShort:Og,week:{dow:0,doy:6},weekdays:Wg,weekdaysMin:Pg,weekdaysShort:zg,meridiemParse:/[ap]\.?m?\.?/i},tt={},et={};function At(g){return g?g.toLowerCase().replace("_","-"):g}function It(t){var e=null;if(!tt[t]&&g&&g.exports)try{e=qg._abbr,C(),Ct(e)}catch(g){}return tt[t]}function Ct(g,t){var e;return g&&((e=n(t)?nt(g):it(g,t))?qg=e:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+g+" not found. Did you forget to load it?")),qg._abbr}function it(g,t){if(null!==t){var e,A=gt;if(t.abbr=g,null!=tt[g])Z("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),A=tt[g]._config;else if(null!=t.parentLocale)if(null!=tt[t.parentLocale])A=tt[t.parentLocale]._config;else{if(null==(e=It(t.parentLocale)))return et[t.parentLocale]||(et[t.parentLocale]=[]),et[t.parentLocale].push({name:g,config:t}),null;A=e._config}return tt[g]=new G(E(A,t)),et[g]&&et[g].forEach((function(g){it(g.name,g.config)})),Ct(g),tt[g]}return delete tt[g],null}function nt(g){var t;if(g&&g._locale&&g._locale._abbr&&(g=g._locale._abbr),!g)return qg;if(!I(g)){if(t=It(g))return t;g=[g]}return function(g){for(var t,e,A,I,C=0;C<g.length;){for(t=(I=At(g[C]).split("-")).length,e=(e=At(g[C+1]))?e.split("-"):null;t>0;){if(A=It(I.slice(0,t).join("-")))return A;if(e&&e.length>=t&&x(I,e,!0)>=t-1)break;t--}C++}return qg}(g)}function ot(g){var t,e=g._a;return e&&-2===h(g).overflow&&(t=e[1]<0||e[1]>11?1:e[2]<1||e[2]>xg(e[0],e[1])?2:e[3]<0||e[3]>24||24===e[3]&&(0!==e[4]||0!==e[5]||0!==e[6])?3:e[4]<0||e[4]>59?4:e[5]<0||e[5]>59?5:e[6]<0||e[6]>999?6:-1,h(g)._overflowDayOfYear&&(t<0||t>2)&&(t=2),h(g)._overflowWeeks&&-1===t&&(t=7),h(g)._overflowWeekday&&-1===t&&(t=8),h(g).overflow=t),g}function rt(g,t,e){return null!=g?g:null!=t?t:e}function st(g){var t,e,I,C,i,n=[];if(!g._d){for(I=function(g){var t=new Date(A.now());return g._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(g),g._w&&null==g._a[2]&&null==g._a[1]&&function(g){var t,e,A,I,C,i,n,o;if(null!=(t=g._w).GG||null!=t.W||null!=t.E)C=1,i=4,e=rt(t.GG,g._a[0],Lg(kt(),1,4).year),A=rt(t.W,1),((I=rt(t.E,1))<1||I>7)&&(o=!0);else{C=g._locale._week.dow,i=g._locale._week.doy;var r=Lg(kt(),C,i);e=rt(t.gg,g._a[0],r.year),A=rt(t.w,r.week),null!=t.d?((I=t.d)<0||I>6)&&(o=!0):null!=t.e?(I=t.e+C,(t.e<0||t.e>6)&&(o=!0)):I=C}A<1||A>Qg(e,C,i)?h(g)._overflowWeeks=!0:null!=o?h(g)._overflowWeekday=!0:(n=Sg(e,A,I,C,i),g._a[0]=n.year,g._dayOfYear=n.dayOfYear)}(g),null!=g._dayOfYear&&(i=rt(g._a[0],I[0]),(g._dayOfYear>fg(i)||0===g._dayOfYear)&&(h(g)._overflowDayOfYear=!0),e=Rg(i,0,g._dayOfYear),g._a[1]=e.getUTCMonth(),g._a[2]=e.getUTCDate()),t=0;t<3&&null==g._a[t];++t)g._a[t]=n[t]=I[t];for(;t<7;t++)g._a[t]=n[t]=null==g._a[t]?2===t?1:0:g._a[t];24===g._a[3]&&0===g._a[4]&&0===g._a[5]&&0===g._a[6]&&(g._nextDay=!0,g._a[3]=0),g._d=(g._useUTC?Rg:Bg).apply(null,n),C=g._useUTC?g._d.getUTCDay():g._d.getDay(),null!=g._tzm&&g._d.setUTCMinutes(g._d.getUTCMinutes()-g._tzm),g._nextDay&&(g._a[3]=24),g._w&&void 0!==g._w.d&&g._w.d!==C&&(h(g).weekdayMismatch=!0)}}var at=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,dt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,lt=/Z|[+-]\d\d(?::?\d\d)?/,ht=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ct=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ut=/^\/?Date\((\-?\d+)/i;function ft(g){var t,e,A,I,C,i,n=g._i,o=at.exec(n)||dt.exec(n);if(o){for(h(g).iso=!0,t=0,e=ht.length;t<e;t++)if(ht[t][1].exec(o[1])){I=ht[t][0],A=!1!==ht[t][2];break}if(null==I)return void(g._isValid=!1);if(o[3]){for(t=0,e=ct.length;t<e;t++)if(ct[t][1].exec(o[3])){C=(o[2]||" ")+ct[t][0];break}if(null==C)return void(g._isValid=!1)}if(!A&&null!=C)return void(g._isValid=!1);if(o[4]){if(!lt.exec(o[4]))return void(g._isValid=!1);i="Z"}g._f=I+(C||"")+(i||""),bt(g)}else g._isValid=!1}var pt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function vt(g){var t=parseInt(g,10);return t<=49?2e3+t:t<=999?1900+t:t}var yt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function mt(g){var t,e,A,I,C,i,n,o=pt.exec(g._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(o){var r=(t=o[4],e=o[3],A=o[2],I=o[5],C=o[6],i=o[7],n=[vt(t),Og.indexOf(e),parseInt(A,10),parseInt(I,10),parseInt(C,10)],i&&n.push(parseInt(i,10)),n);if(!function(g,t,e){return!g||zg.indexOf(g)===new Date(t[0],t[1],t[2]).getDay()||(h(e).weekdayMismatch=!0,e._isValid=!1,!1)}(o[1],r,g))return;g._a=r,g._tzm=function(g,t,e){if(g)return yt[g];if(t)return 0;var A=parseInt(e,10),I=A%100;return(A-I)/100*60+I}(o[8],o[9],o[10]),g._d=Rg.apply(null,g._a),g._d.setUTCMinutes(g._d.getUTCMinutes()-g._tzm),h(g).rfc2822=!0}else g._isValid=!1}function bt(g){if(g._f!==A.ISO_8601)if(g._f!==A.RFC_2822){g._a=[],h(g).empty=!0;var t,e,I,C,i,n=""+g._i,o=n.length,r=0;for(I=X(g._f,g._locale).match(Y)||[],t=0;t<I.length;t++)C=I[t],(e=(n.match(ag(C,g))||[])[0])&&((i=n.substr(0,n.indexOf(e))).length>0&&h(g).unusedInput.push(i),n=n.slice(n.indexOf(e)+e.length),r+=e.length),P[C]?(e?h(g).empty=!1:h(g).unusedTokens.push(C),ug(C,e,g)):g._strict&&!e&&h(g).unusedTokens.push(C);h(g).charsLeftOver=o-r,n.length>0&&h(g).unusedInput.push(n),g._a[3]<=12&&!0===h(g).bigHour&&g._a[3]>0&&(h(g).bigHour=void 0),h(g).parsedDateParts=g._a.slice(0),h(g).meridiem=g._meridiem,g._a[3]=function(g,t,e){var A;return null==e?t:null!=g.meridiemHour?g.meridiemHour(t,e):null!=g.isPM?((A=g.isPM(e))&&t<12&&(t+=12),A||12!==t||(t=0),t):t}(g._locale,g._a[3],g._meridiem),st(g),ot(g)}else mt(g);else ft(g)}function wt(g){var t=g._i,e=g._f;return g._locale=g._locale||nt(g._l),null===t||void 0===e&&""===t?u({nullInput:!0}):("string"==typeof t&&(g._i=t=g._locale.preparse(t)),m(t)?new y(ot(t)):(r(t)?g._d=t:I(e)?function(g){var t,e,A,I,C;if(0===g._f.length)return h(g).invalidFormat=!0,void(g._d=new Date(NaN));for(I=0;I<g._f.length;I++)C=0,t=p({},g),null!=g._useUTC&&(t._useUTC=g._useUTC),t._f=g._f[I],bt(t),c(t)&&(C+=h(t).charsLeftOver,C+=10*h(t).unusedTokens.length,h(t).score=C,(null==A||C<A)&&(A=C,e=t));d(g,e||t)}(g):e?bt(g):function(g){var t=g._i;n(t)?g._d=new Date(A.now()):r(t)?g._d=new Date(t.valueOf()):"string"==typeof t?function(g){var t=ut.exec(g._i);null===t?(ft(g),!1===g._isValid&&(delete g._isValid,mt(g),!1===g._isValid&&(delete g._isValid,A.createFromInputFallback(g)))):g._d=new Date(+t[1])}(g):I(t)?(g._a=s(t.slice(0),(function(g){return parseInt(g,10)})),st(g)):i(t)?function(g){if(!g._d){var t=F(g._i);g._a=s([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],(function(g){return g&&parseInt(g,10)})),st(g)}}(g):o(t)?g._d=new Date(t):A.createFromInputFallback(g)}(g),c(g)||(g._d=null),g))}function xt(g,t,e,A,C){var n,o={};return!0!==e&&!1!==e||(A=e,e=void 0),(i(g)&&function(g){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(g).length;var t;for(t in g)if(g.hasOwnProperty(t))return!1;return!0}(g)||I(g)&&0===g.length)&&(g=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=C,o._l=e,o._i=g,o._f=t,o._strict=A,(n=new y(ot(wt(o))))._nextDay&&(n.add(1,"d"),n._nextDay=void 0),n}function kt(g,t,e,A){return xt(g,t,e,A,!1)}A.createFromInputFallback=D("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(g){g._d=new Date(g._i+(g._useUTC?" UTC":""))})),A.ISO_8601=function(){},A.RFC_2822=function(){};var Dt=D("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var g=kt.apply(null,arguments);return this.isValid()&&g.isValid()?g<this?this:g:u()})),Ot=D("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var g=kt.apply(null,arguments);return this.isValid()&&g.isValid()?g>this?this:g:u()}));function Nt(g,t){var e,A;if(1===t.length&&I(t[0])&&(t=t[0]),!t.length)return kt();for(e=t[0],A=1;A<t.length;++A)t[A].isValid()&&!t[A][g](e)||(e=t[A]);return e}var Zt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Mt(g){var t=F(g),e=t.year||0,A=t.quarter||0,I=t.month||0,C=t.week||t.isoWeek||0,i=t.day||0,n=t.hour||0,o=t.minute||0,r=t.second||0,s=t.millisecond||0;this._isValid=function(g){for(var t in g)if(-1===vg.call(Zt,t)||null!=g[t]&&isNaN(g[t]))return!1;for(var e=!1,A=0;A<Zt.length;++A)if(g[Zt[A]]){if(e)return!1;parseFloat(g[Zt[A]])!==w(g[Zt[A]])&&(e=!0)}return!0}(t),this._milliseconds=+s+1e3*r+6e4*o+1e3*n*60*60,this._days=+i+7*C,this._months=+I+3*A+12*e,this._data={},this._locale=nt(),this._bubble()}function Et(g){return g instanceof Mt}function Gt(g){return g<0?-1*Math.round(-1*g):Math.round(g)}function Tt(g,t){j(g,0,0,(function(){var g=this.utcOffset(),e="+";return g<0&&(g=-g,e="-"),e+Q(~~(g/60),2)+t+Q(~~g%60,2)}))}Tt("Z",":"),Tt("ZZ",""),sg("Z",ng),sg("ZZ",ng),hg(["Z","ZZ"],(function(g,t,e){e._useUTC=!0,e._tzm=Rt(ng,g)}));var Bt=/([\+\-]|\d\d)/gi;function Rt(g,t){var e=(t||"").match(g);if(null===e)return null;var A=((e[e.length-1]||[])+"").match(Bt)||["-",0,0],I=60*A[1]+w(A[2]);return 0===I?0:"+"===A[0]?I:-I}function Ft(g,t){var e,I;return t._isUTC?(e=t.clone(),I=(m(g)||r(g)?g.valueOf():kt(g).valueOf())-e.valueOf(),e._d.setTime(e._d.valueOf()+I),A.updateOffset(e,!1),e):kt(g).local()}function St(g){return 15*-Math.round(g._d.getTimezoneOffset()/15)}function Lt(){return!!this.isValid()&&this._isUTC&&0===this._offset}A.updateOffset=function(){};var Qt=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Yt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Wt(g,t){var e,A,I,C,i,n,r=g,s=null;return Et(g)?r={ms:g._milliseconds,d:g._days,M:g._months}:o(g)?(r={},t?r[t]=g:r.milliseconds=g):(s=Qt.exec(g))?(e="-"===s[1]?-1:1,r={y:0,d:w(s[2])*e,h:w(s[3])*e,m:w(s[4])*e,s:w(s[5])*e,ms:w(Gt(1e3*s[6]))*e}):(s=Yt.exec(g))?(e="-"===s[1]?-1:1,r={y:zt(s[2],e),M:zt(s[3],e),w:zt(s[4],e),d:zt(s[5],e),h:zt(s[6],e),m:zt(s[7],e),s:zt(s[8],e)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(C=kt(r.from),i=kt(r.to),I=C.isValid()&&i.isValid()?(i=Ft(i,C),C.isBefore(i)?n=Pt(C,i):((n=Pt(i,C)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0},(r={}).ms=I.milliseconds,r.M=I.months),A=new Mt(r),Et(g)&&a(g,"_locale")&&(A._locale=g._locale),A}function zt(g,t){var e=g&&parseFloat(g.replace(",","."));return(isNaN(e)?0:e)*t}function Pt(g,t){var e={};return e.months=t.month()-g.month()+12*(t.year()-g.year()),g.clone().add(e.months,"M").isAfter(t)&&--e.months,e.milliseconds=+t-+g.clone().add(e.months,"M"),e}function jt(g,t){return function(e,A){var I;return null===A||isNaN(+A)||(Z(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),I=e,e=A,A=I),Vt(this,Wt(e="string"==typeof e?+e:e,A),g),this}}function Vt(g,t,e,I){var C=t._milliseconds,i=Gt(t._days),n=Gt(t._months);g.isValid()&&(I=null==I||I,n&&Zg(g,bg(g,"Month")+n*e),i&&wg(g,"Date",bg(g,"Date")+i*e),C&&g._d.setTime(g._d.valueOf()+C*e),I&&A.updateOffset(g,i||n))}Wt.fn=Mt.prototype,Wt.invalid=function(){return Wt(NaN)};var Xt=jt(1,"add"),Ut=jt(-1,"subtract");function _t(g,t){var e=12*(t.year()-g.year())+(t.month()-g.month()),A=g.clone().add(e,"months");return-(e+(t-A<0?(t-A)/(A-g.clone().add(e-1,"months")):(t-A)/(g.clone().add(e+1,"months")-A)))||0}function Ht(g){var t;return void 0===g?this._locale._abbr:(null!=(t=nt(g))&&(this._locale=t),this)}A.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",A.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Jt=D("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(g){return void 0===g?this.localeData():this.locale(g)}));function Kt(){return this._locale}function qt(g,t){return(g%t+t)%t}function $t(g,t,e){return g<100&&g>=0?new Date(g+400,t,e)-126227808e5:new Date(g,t,e).valueOf()}function ge(g,t,e){return g<100&&g>=0?Date.UTC(g+400,t,e)-126227808e5:Date.UTC(g,t,e)}function te(g,t){j(0,[g,g.length],0,t)}function ee(g,t,e,A,I){var C;return null==g?Lg(this,A,I).year:(t>(C=Qg(g,A,I))&&(t=C),Ae.call(this,g,t,e,A,I))}function Ae(g,t,e,A,I){var C=Sg(g,t,e,A,I),i=Rg(C.year,0,C.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}j(0,["gg",2],0,(function(){return this.weekYear()%100})),j(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),te("gggg","weekYear"),te("ggggg","weekYear"),te("GGGG","isoWeekYear"),te("GGGGG","isoWeekYear"),B("weekYear","gg"),B("isoWeekYear","GG"),L("weekYear",1),L("isoWeekYear",1),sg("G",Cg),sg("g",Cg),sg("GG",q,_),sg("gg",q,_),sg("GGGG",eg,J),sg("gggg",eg,J),sg("GGGGG",Ag,K),sg("ggggg",Ag,K),cg(["gggg","ggggg","GGGG","GGGGG"],(function(g,t,e,A){t[A.substr(0,2)]=w(g)})),cg(["gg","GG"],(function(g,t,e,I){t[I]=A.parseTwoDigitYear(g)})),j("Q",0,"Qo","quarter"),B("quarter","Q"),L("quarter",7),sg("Q",U),hg("Q",(function(g,t){t[1]=3*(w(g)-1)})),j("D",["DD",2],"Do","date"),B("date","D"),L("date",9),sg("D",q),sg("DD",q,_),sg("Do",(function(g,t){return g?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),hg(["D","DD"],2),hg("Do",(function(g,t){t[2]=w(g.match(q)[0])}));var Ie=mg("Date",!0);j("DDD",["DDDD",3],"DDDo","dayOfYear"),B("dayOfYear","DDD"),L("dayOfYear",4),sg("DDD",tg),sg("DDDD",H),hg(["DDD","DDDD"],(function(g,t,e){e._dayOfYear=w(g)})),j("m",["mm",2],0,"minute"),B("minute","m"),L("minute",14),sg("m",q),sg("mm",q,_),hg(["m","mm"],4);var Ce=mg("Minutes",!1);j("s",["ss",2],0,"second"),B("second","s"),L("second",15),sg("s",q),sg("ss",q,_),hg(["s","ss"],5);var ie,ne=mg("Seconds",!1);for(j("S",0,0,(function(){return~~(this.millisecond()/100)})),j(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),j(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),j(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),j(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),j(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),j(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),B("millisecond","ms"),L("millisecond",16),sg("S",tg,U),sg("SS",tg,_),sg("SSS",tg,H),ie="SSSS";ie.length<=9;ie+="S")sg(ie,Ig);function oe(g,t){t[6]=w(1e3*("0."+g))}for(ie="S";ie.length<=9;ie+="S")hg(ie,oe);var re=mg("Milliseconds",!1);j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName");var se=y.prototype;function ae(g){return g}se.add=Xt,se.calendar=function(g,t){var e=g||kt(),I=Ft(e,this).startOf("day"),C=A.calendarFormat(this,I)||"sameElse",i=t&&(M(t[C])?t[C].call(this,e):t[C]);return this.format(i||this.localeData().calendar(C,this,kt(e)))},se.clone=function(){return new y(this)},se.diff=function(g,t,e){var A,I,C;if(!this.isValid())return NaN;if(!(A=Ft(g,this)).isValid())return NaN;switch(I=6e4*(A.utcOffset()-this.utcOffset()),t=R(t)){case"year":C=_t(this,A)/12;break;case"month":C=_t(this,A);break;case"quarter":C=_t(this,A)/3;break;case"second":C=(this-A)/1e3;break;case"minute":C=(this-A)/6e4;break;case"hour":C=(this-A)/36e5;break;case"day":C=(this-A-I)/864e5;break;case"week":C=(this-A-I)/6048e5;break;default:C=this-A}return e?C:b(C)},se.endOf=function(g){var t;if(void 0===(g=R(g))||"millisecond"===g||!this.isValid())return this;var e=this._isUTC?ge:$t;switch(g){case"year":t=e(this.year()+1,0,1)-1;break;case"quarter":t=e(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=e(this.year(),this.month()+1,1)-1;break;case"week":t=e(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=e(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=e(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-qt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-qt(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-qt(t,1e3)-1}return this._d.setTime(t),A.updateOffset(this,!0),this},se.format=function(g){g||(g=this.isUtc()?A.defaultFormatUtc:A.defaultFormat);var t=V(this,g);return this.localeData().postformat(t)},se.from=function(g,t){return this.isValid()&&(m(g)&&g.isValid()||kt(g).isValid())?Wt({to:this,from:g}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},se.fromNow=function(g){return this.from(kt(),g)},se.to=function(g,t){return this.isValid()&&(m(g)&&g.isValid()||kt(g).isValid())?Wt({from:this,to:g}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},se.toNow=function(g){return this.to(kt(),g)},se.get=function(g){return M(this[g=R(g)])?this[g]():this},se.invalidAt=function(){return h(this).overflow},se.isAfter=function(g,t){var e=m(g)?g:kt(g);return!(!this.isValid()||!e.isValid())&&("millisecond"===(t=R(t)||"millisecond")?this.valueOf()>e.valueOf():e.valueOf()<this.clone().startOf(t).valueOf())},se.isBefore=function(g,t){var e=m(g)?g:kt(g);return!(!this.isValid()||!e.isValid())&&("millisecond"===(t=R(t)||"millisecond")?this.valueOf()<e.valueOf():this.clone().endOf(t).valueOf()<e.valueOf())},se.isBetween=function(g,t,e,A){var I=m(g)?g:kt(g),C=m(t)?t:kt(t);return!!(this.isValid()&&I.isValid()&&C.isValid())&&("("===(A=A||"()")[0]?this.isAfter(I,e):!this.isBefore(I,e))&&(")"===A[1]?this.isBefore(C,e):!this.isAfter(C,e))},se.isSame=function(g,t){var e,A=m(g)?g:kt(g);return!(!this.isValid()||!A.isValid())&&("millisecond"===(t=R(t)||"millisecond")?this.valueOf()===A.valueOf():(e=A.valueOf(),this.clone().startOf(t).valueOf()<=e&&e<=this.clone().endOf(t).valueOf()))},se.isSameOrAfter=function(g,t){return this.isSame(g,t)||this.isAfter(g,t)},se.isSameOrBefore=function(g,t){return this.isSame(g,t)||this.isBefore(g,t)},se.isValid=function(){return c(this)},se.lang=Jt,se.locale=Ht,se.localeData=Kt,se.max=Ot,se.min=Dt,se.parsingFlags=function(){return d({},h(this))},se.set=function(g,t){if("object"==typeof g)for(var e=function(g){var t=[];for(var e in g)t.push({unit:e,priority:S[e]});return t.sort((function(g,t){return g.priority-t.priority})),t}(g=F(g)),A=0;A<e.length;A++)this[e[A].unit](g[e[A].unit]);else if(M(this[g=R(g)]))return this[g](t);return this},se.startOf=function(g){var t;if(void 0===(g=R(g))||"millisecond"===g||!this.isValid())return this;var e=this._isUTC?ge:$t;switch(g){case"year":t=e(this.year(),0,1);break;case"quarter":t=e(this.year(),this.month()-this.month()%3,1);break;case"month":t=e(this.year(),this.month(),1);break;case"week":t=e(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=e(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=e(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=qt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=qt(t,6e4);break;case"second":t=this._d.valueOf(),t-=qt(t,1e3)}return this._d.setTime(t),A.updateOffset(this,!0),this},se.subtract=Ut,se.toArray=function(){var g=this;return[g.year(),g.month(),g.date(),g.hour(),g.minute(),g.second(),g.millisecond()]},se.toObject=function(){var g=this;return{years:g.year(),months:g.month(),date:g.date(),hours:g.hours(),minutes:g.minutes(),seconds:g.seconds(),milliseconds:g.milliseconds()}},se.toDate=function(){return new Date(this.valueOf())},se.toISOString=function(g){if(!this.isValid())return null;var t=!0!==g,e=t?this.clone().utc():this;return e.year()<0||e.year()>9999?V(e,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):M(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",V(e,"Z")):V(e,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},se.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var g="moment",t="";this.isLocal()||(g=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var e="["+g+'("]',A=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",I=t+'[")]';return this.format(e+A+"-MM-DD[T]HH:mm:ss.SSS"+I)},se.toJSON=function(){return this.isValid()?this.toISOString():null},se.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},se.unix=function(){return Math.floor(this.valueOf()/1e3)},se.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},se.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},se.year=yg,se.isLeapYear=function(){return pg(this.year())},se.weekYear=function(g){return ee.call(this,g,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},se.isoWeekYear=function(g){return ee.call(this,g,this.isoWeek(),this.isoWeekday(),1,4)},se.quarter=se.quarters=function(g){return null==g?Math.ceil((this.month()+1)/3):this.month(3*(g-1)+this.month()%3)},se.month=Mg,se.daysInMonth=function(){return xg(this.year(),this.month())},se.week=se.weeks=function(g){var t=this.localeData().week(this);return null==g?t:this.add(7*(g-t),"d")},se.isoWeek=se.isoWeeks=function(g){var t=Lg(this,1,4).week;return null==g?t:this.add(7*(g-t),"d")},se.weeksInYear=function(){var g=this.localeData()._week;return Qg(this.year(),g.dow,g.doy)},se.isoWeeksInYear=function(){return Qg(this.year(),1,4)},se.date=Ie,se.day=se.days=function(g){if(!this.isValid())return null!=g?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=g?(g=function(g,t){return"string"!=typeof g?g:isNaN(g)?"number"==typeof(g=t.weekdaysParse(g))?g:null:parseInt(g,10)}(g,this.localeData()),this.add(g-t,"d")):t},se.weekday=function(g){if(!this.isValid())return null!=g?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==g?t:this.add(g-t,"d")},se.isoWeekday=function(g){if(!this.isValid())return null!=g?this:NaN;if(null!=g){var t=function(g,t){return"string"==typeof g?t.weekdaysParse(g)%7||7:isNaN(g)?null:g}(g,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},se.dayOfYear=function(g){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==g?t:this.add(g-t,"d")},se.hour=se.hours=$g,se.minute=se.minutes=Ce,se.second=se.seconds=ne,se.millisecond=se.milliseconds=re,se.utcOffset=function(g,t,e){var I,C=this._offset||0;if(!this.isValid())return null!=g?this:NaN;if(null!=g){if("string"==typeof g){if(null===(g=Rt(ng,g)))return this}else Math.abs(g)<16&&!e&&(g*=60);return!this._isUTC&&t&&(I=St(this)),this._offset=g,this._isUTC=!0,null!=I&&this.add(I,"m"),C!==g&&(!t||this._changeInProgress?Vt(this,Wt(g-C,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,A.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?C:St(this)},se.utc=function(g){return this.utcOffset(0,g)},se.local=function(g){return this._isUTC&&(this.utcOffset(0,g),this._isUTC=!1,g&&this.subtract(St(this),"m")),this},se.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var g=Rt(ig,this._i);null!=g?this.utcOffset(g):this.utcOffset(0,!0)}return this},se.hasAlignedHourOffset=function(g){return!!this.isValid()&&(g=g?kt(g).utcOffset():0,(this.utcOffset()-g)%60==0)},se.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},se.isLocal=function(){return!!this.isValid()&&!this._isUTC},se.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},se.isUtc=Lt,se.isUTC=Lt,se.zoneAbbr=function(){return this._isUTC?"UTC":""},se.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},se.dates=D("dates accessor is deprecated. Use date instead.",Ie),se.months=D("months accessor is deprecated. Use month instead",Mg),se.years=D("years accessor is deprecated. Use year instead",yg),se.zone=D("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(g,t){return null!=g?("string"!=typeof g&&(g=-g),this.utcOffset(g,t),this):-this.utcOffset()})),se.isDSTShifted=D("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!n(this._isDSTShifted))return this._isDSTShifted;var g={};if(p(g,this),(g=wt(g))._a){var t=g._isUTC?l(g._a):kt(g._a);this._isDSTShifted=this.isValid()&&x(g._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var de=G.prototype;function le(g,t,e,A){var I=nt(),C=l().set(A,t);return I[e](C,g)}function he(g,t,e){if(o(g)&&(t=g,g=void 0),g=g||"",null!=t)return le(g,t,e,"month");var A,I=[];for(A=0;A<12;A++)I[A]=le(g,A,e,"month");return I}function ce(g,t,e,A){"boolean"==typeof g?(o(t)&&(e=t,t=void 0),t=t||""):(e=t=g,g=!1,o(t)&&(e=t,t=void 0),t=t||"");var I,C=nt(),i=g?C._week.dow:0;if(null!=e)return le(t,(e+i)%7,A,"day");var n=[];for(I=0;I<7;I++)n[I]=le(t,(I+i)%7,A,"day");return n}de.calendar=function(g,t,e){var A=this._calendar[g]||this._calendar.sameElse;return M(A)?A.call(t,e):A},de.longDateFormat=function(g){var t=this._longDateFormat[g],e=this._longDateFormat[g.toUpperCase()];return t||!e?t:(this._longDateFormat[g]=e.replace(/MMMM|MM|DD|dddd/g,(function(g){return g.slice(1)})),this._longDateFormat[g])},de.invalidDate=function(){return this._invalidDate},de.ordinal=function(g){return this._ordinal.replace("%d",g)},de.preparse=ae,de.postformat=ae,de.relativeTime=function(g,t,e,A){var I=this._relativeTime[e];return M(I)?I(g,t,e,A):I.replace(/%d/i,g)},de.pastFuture=function(g,t){var e=this._relativeTime[g>0?"future":"past"];return M(e)?e(t):e.replace(/%s/i,t)},de.set=function(g){var t,e;for(e in g)M(t=g[e])?this[e]=t:this["_"+e]=t;this._config=g,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},de.months=function(g,t){return g?I(this._months)?this._months[g.month()]:this._months[(this._months.isFormat||kg).test(t)?"format":"standalone"][g.month()]:I(this._months)?this._months:this._months.standalone},de.monthsShort=function(g,t){return g?I(this._monthsShort)?this._monthsShort[g.month()]:this._monthsShort[kg.test(t)?"format":"standalone"][g.month()]:I(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},de.monthsParse=function(g,t,e){var A,I,C;if(this._monthsParseExact)return Ng.call(this,g,t,e);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),A=0;A<12;A++){if(I=l([2e3,A]),e&&!this._longMonthsParse[A]&&(this._longMonthsParse[A]=new RegExp("^"+this.months(I,"").replace(".","")+"$","i"),this._shortMonthsParse[A]=new RegExp("^"+this.monthsShort(I,"").replace(".","")+"$","i")),e||this._monthsParse[A]||(C="^"+this.months(I,"")+"|^"+this.monthsShort(I,""),this._monthsParse[A]=new RegExp(C.replace(".",""),"i")),e&&"MMMM"===t&&this._longMonthsParse[A].test(g))return A;if(e&&"MMM"===t&&this._shortMonthsParse[A].test(g))return A;if(!e&&this._monthsParse[A].test(g))return A}},de.monthsRegex=function(g){return this._monthsParseExact?(a(this,"_monthsRegex")||Tg.call(this),g?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=Gg),this._monthsStrictRegex&&g?this._monthsStrictRegex:this._monthsRegex)},de.monthsShortRegex=function(g){return this._monthsParseExact?(a(this,"_monthsRegex")||Tg.call(this),g?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=Eg),this._monthsShortStrictRegex&&g?this._monthsShortStrictRegex:this._monthsShortRegex)},de.week=function(g){return Lg(g,this._week.dow,this._week.doy).week},de.firstDayOfYear=function(){return this._week.doy},de.firstDayOfWeek=function(){return this._week.dow},de.weekdays=function(g,t){var e=I(this._weekdays)?this._weekdays:this._weekdays[g&&!0!==g&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===g?Yg(e,this._week.dow):g?e[g.day()]:e},de.weekdaysMin=function(g){return!0===g?Yg(this._weekdaysMin,this._week.dow):g?this._weekdaysMin[g.day()]:this._weekdaysMin},de.weekdaysShort=function(g){return!0===g?Yg(this._weekdaysShort,this._week.dow):g?this._weekdaysShort[g.day()]:this._weekdaysShort},de.weekdaysParse=function(g,t,e){var A,I,C;if(this._weekdaysParseExact)return jg.call(this,g,t,e);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),A=0;A<7;A++){if(I=l([2e3,1]).day(A),e&&!this._fullWeekdaysParse[A]&&(this._fullWeekdaysParse[A]=new RegExp("^"+this.weekdays(I,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[A]=new RegExp("^"+this.weekdaysShort(I,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[A]=new RegExp("^"+this.weekdaysMin(I,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[A]||(C="^"+this.weekdays(I,"")+"|^"+this.weekdaysShort(I,"")+"|^"+this.weekdaysMin(I,""),this._weekdaysParse[A]=new RegExp(C.replace(".",""),"i")),e&&"dddd"===t&&this._fullWeekdaysParse[A].test(g))return A;if(e&&"ddd"===t&&this._shortWeekdaysParse[A].test(g))return A;if(e&&"dd"===t&&this._minWeekdaysParse[A].test(g))return A;if(!e&&this._weekdaysParse[A].test(g))return A}},de.weekdaysRegex=function(g){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||_g.call(this),g?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Vg),this._weekdaysStrictRegex&&g?this._weekdaysStrictRegex:this._weekdaysRegex)},de.weekdaysShortRegex=function(g){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||_g.call(this),g?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Xg),this._weekdaysShortStrictRegex&&g?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},de.weekdaysMinRegex=function(g){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||_g.call(this),g?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ug),this._weekdaysMinStrictRegex&&g?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},de.isPM=function(g){return"p"===(g+"").toLowerCase().charAt(0)},de.meridiem=function(g,t,e){return g>11?e?"pm":"PM":e?"am":"AM"},Ct("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(g){var t=g%10;return g+(1===w(g%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),A.lang=D("moment.lang is deprecated. Use moment.locale instead.",Ct),A.langData=D("moment.langData is deprecated. Use moment.localeData instead.",nt);var ue=Math.abs;function fe(g,t,e,A){var I=Wt(t,e);return g._milliseconds+=A*I._milliseconds,g._days+=A*I._days,g._months+=A*I._months,g._bubble()}function pe(g){return g<0?Math.floor(g):Math.ceil(g)}function ve(g){return 4800*g/146097}function ye(g){return 146097*g/4800}function me(g){return function(){return this.as(g)}}var be=me("ms"),we=me("s"),xe=me("m"),ke=me("h"),De=me("d"),Oe=me("w"),Ne=me("M"),Ze=me("Q"),Me=me("y");function Ee(g){return function(){return this.isValid()?this._data[g]:NaN}}var Ge=Ee("milliseconds"),Te=Ee("seconds"),Be=Ee("minutes"),Re=Ee("hours"),Fe=Ee("days"),Se=Ee("months"),Le=Ee("years"),Qe=Math.round,Ye={ss:44,s:45,m:45,h:22,d:26,M:11};function We(g,t,e,A,I){return I.relativeTime(t||1,!!e,g,A)}function ze(g,t,e){var A=Wt(g).abs(),I=Qe(A.as("s")),C=Qe(A.as("m")),i=Qe(A.as("h")),n=Qe(A.as("d")),o=Qe(A.as("M")),r=Qe(A.as("y")),s=I<=Ye.ss&&["s",I]||I<Ye.s&&["ss",I]||C<=1&&["m"]||C<Ye.m&&["mm",C]||i<=1&&["h"]||i<Ye.h&&["hh",i]||n<=1&&["d"]||n<Ye.d&&["dd",n]||o<=1&&["M"]||o<Ye.M&&["MM",o]||r<=1&&["y"]||["yy",r];return s[2]=t,s[3]=+g>0,s[4]=e,We.apply(null,s)}var Pe=Math.abs;function je(g){return(g>0)-(g<0)||+g}function Ve(){if(!this.isValid())return this.localeData().invalidDate();var g,t,e=Pe(this._milliseconds)/1e3,A=Pe(this._days),I=Pe(this._months);g=b(e/60),t=b(g/60),e%=60,g%=60;var C=b(I/12),i=I%=12,n=A,o=t,r=g,s=e?e.toFixed(3).replace(/\.?0+$/,""):"",a=this.asSeconds();if(!a)return"P0D";var d=a<0?"-":"",l=je(this._months)!==je(a)?"-":"",h=je(this._days)!==je(a)?"-":"",c=je(this._milliseconds)!==je(a)?"-":"";return d+"P"+(C?l+C+"Y":"")+(i?l+i+"M":"")+(n?h+n+"D":"")+(o||r||s?"T":"")+(o?c+o+"H":"")+(r?c+r+"M":"")+(s?c+s+"S":"")}var Xe=Mt.prototype;return Xe.isValid=function(){return this._isValid},Xe.abs=function(){var g=this._data;return this._milliseconds=ue(this._milliseconds),this._days=ue(this._days),this._months=ue(this._months),g.milliseconds=ue(g.milliseconds),g.seconds=ue(g.seconds),g.minutes=ue(g.minutes),g.hours=ue(g.hours),g.months=ue(g.months),g.years=ue(g.years),this},Xe.add=function(g,t){return fe(this,g,t,1)},Xe.subtract=function(g,t){return fe(this,g,t,-1)},Xe.as=function(g){if(!this.isValid())return NaN;var t,e,A=this._milliseconds;if("month"===(g=R(g))||"quarter"===g||"year"===g)switch(t=this._days+A/864e5,e=this._months+ve(t),g){case"month":return e;case"quarter":return e/3;case"year":return e/12}else switch(t=this._days+Math.round(ye(this._months)),g){case"week":return t/7+A/6048e5;case"day":return t+A/864e5;case"hour":return 24*t+A/36e5;case"minute":return 1440*t+A/6e4;case"second":return 86400*t+A/1e3;case"millisecond":return Math.floor(864e5*t)+A;default:throw new Error("Unknown unit "+g)}},Xe.asMilliseconds=be,Xe.asSeconds=we,Xe.asMinutes=xe,Xe.asHours=ke,Xe.asDays=De,Xe.asWeeks=Oe,Xe.asMonths=Ne,Xe.asQuarters=Ze,Xe.asYears=Me,Xe.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN},Xe._bubble=function(){var g,t,e,A,I,C=this._milliseconds,i=this._days,n=this._months,o=this._data;return C>=0&&i>=0&&n>=0||C<=0&&i<=0&&n<=0||(C+=864e5*pe(ye(n)+i),i=0,n=0),o.milliseconds=C%1e3,g=b(C/1e3),o.seconds=g%60,t=b(g/60),o.minutes=t%60,e=b(t/60),o.hours=e%24,i+=b(e/24),I=b(ve(i)),n+=I,i-=pe(ye(I)),A=b(n/12),n%=12,o.days=i,o.months=n,o.years=A,this},Xe.clone=function(){return Wt(this)},Xe.get=function(g){return g=R(g),this.isValid()?this[g+"s"]():NaN},Xe.milliseconds=Ge,Xe.seconds=Te,Xe.minutes=Be,Xe.hours=Re,Xe.days=Fe,Xe.weeks=function(){return b(this.days()/7)},Xe.months=Se,Xe.years=Le,Xe.humanize=function(g){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),e=ze(this,!g,t);return g&&(e=t.pastFuture(+this,e)),t.postformat(e)},Xe.toISOString=Ve,Xe.toString=Ve,Xe.toJSON=Ve,Xe.locale=Ht,Xe.localeData=Kt,Xe.toIsoString=D("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ve),Xe.lang=Jt,j("X",0,0,"unix"),j("x",0,0,"valueOf"),sg("x",Cg),sg("X",/[+-]?\d+(\.\d{1,3})?/),hg("X",(function(g,t,e){e._d=new Date(1e3*parseFloat(g,10))})),hg("x",(function(g,t,e){e._d=new Date(w(g))})),A.version="2.24.0",t=kt,A.fn=se,A.min=function(){var g=[].slice.call(arguments,0);return Nt("isBefore",g)},A.max=function(){var g=[].slice.call(arguments,0);return Nt("isAfter",g)},A.now=function(){return Date.now?Date.now():+new Date},A.utc=l,A.unix=function(g){return kt(1e3*g)},A.months=function(g,t){return he(g,t,"months")},A.isDate=r,A.locale=Ct,A.invalid=u,A.duration=Wt,A.isMoment=m,A.weekdays=function(g,t,e){return ce(g,t,e,"weekdays")},A.parseZone=function(){return kt.apply(null,arguments).parseZone()},A.localeData=nt,A.isDuration=Et,A.monthsShort=function(g,t){return he(g,t,"monthsShort")},A.weekdaysMin=function(g,t,e){return ce(g,t,e,"weekdaysMin")},A.defineLocale=it,A.updateLocale=function(g,t){if(null!=t){var e,A,I=gt;null!=(A=It(g))&&(I=A._config),(e=new G(t=E(I,t))).parentLocale=tt[g],tt[g]=e,Ct(g)}else null!=tt[g]&&(null!=tt[g].parentLocale?tt[g]=tt[g].parentLocale:null!=tt[g]&&delete tt[g]);return tt[g]},A.locales=function(){return O(tt)},A.weekdaysShort=function(g,t,e){return ce(g,t,e,"weekdaysShort")},A.normalizeUnits=R,A.relativeTimeRounding=function(g){return void 0===g?Qe:"function"==typeof g&&(Qe=g,!0)},A.relativeTimeThreshold=function(g,t){return void 0!==Ye[g]&&(void 0===t?Ye[g]:(Ye[g]=t,"s"===g&&(Ye.ss=t-1),!0))},A.calendarFormat=function(g,t){var e=g.diff(t,"days",!0);return e<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse"},A.prototype=se,A.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},A}()}));function Vs(g,t){var e=GA(g);if(xA){var A=xA(g);t&&(A=bI(A).call(A,(function(t){return wA(g,t).enumerable}))),e.push.apply(e,A)}return e}function Xs(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}function Us(g){if(void 0===AA||null==Jt(g)){if(CC(g)||(g=function(g,t){var e;if(!g)return;if("string"==typeof g)return _s(g,t);var A=UI(e=Object.prototype.toString.call(g)).call(e,8,-1);"Object"===A&&g.constructor&&(A=g.constructor.name);if("Map"===A||"Set"===A)return hA(g);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return _s(g,t)}(g))){var t=0,e=function(){};return{s:e,n:function(){return t>=g.length?{done:!0}:{done:!1,value:g[t++]}},e:function(g){throw g},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var A,I,C=!0,i=!1;return{s:function(){A=Ht(g)},n:function(){var g=A.next();return C=g.done,g},e:function(g){i=!0,I=g},f:function(){try{C||null==A.return||A.return()}finally{if(i)throw I}}}}function _s(g,t){(null==t||t>g.length)&&(t=g.length);for(var e=0,A=new Array(t);e<t;e++)A[e]=g[e];return A}var Hs=function(){function g(t,e,A){var I,C,i;gr(this,g),this._source=t,this._transformers=e,this._target=A,this._listeners={add:gg(I=this._add).call(I,this),remove:gg(C=this._remove).call(C,this),update:gg(i=this._update).call(i,this)}}return er(g,[{key:"all",value:function(){return this._target.update(this._transformItems(this._source.get())),this}},{key:"start",value:function(){return this._source.on("add",this._listeners.add),this._source.on("remove",this._listeners.remove),this._source.on("update",this._listeners.update),this}},{key:"stop",value:function(){return this._source.off("add",this._listeners.add),this._source.off("remove",this._listeners.remove),this._source.off("update",this._listeners.update),this}},{key:"_transformItems",value:function(g){var t;return Ss(t=this._transformers).call(t,(function(g,t){return t(g)}),g)}},{key:"_add",value:function(g,t){null!=t&&this._target.add(this._transformItems(this._source.get(t.items)))}},{key:"_update",value:function(g,t){null!=t&&this._target.update(this._transformItems(this._source.get(t.items)))}},{key:"_remove",value:function(g,t){null!=t&&this._target.remove(this._transformItems(t.oldData))}}]),g}(),Js=function(){function g(t){gr(this,g),this._source=t,this._transformers=[]}return er(g,[{key:"filter",value:function(g){return this._transformers.push((function(t){return bI(t).call(t,g)})),this}},{key:"map",value:function(g){return this._transformers.push((function(t){return nI(t).call(t,g)})),this}},{key:"flatMap",value:function(g){return this._transformers.push((function(t){return Ms(t).call(t,g)})),this}},{key:"to",value:function(g){return new Hs(this._source,this._transformers,g)}}]),g}(),Ks=/^\/?Date\((-?\d+)/i;function qs(g){return js.isMoment(g)}function $s(g,t){var e;if(void 0!==g){if(null===g)return null;if(!t)return g;if("string"!=typeof t&&!(t instanceof String))throw new Error("Type must be a string");switch(t){case"boolean":case"Boolean":return Boolean(g);case"number":case"Number":return GC(g)&&!isNaN(Date.parse(g))?js(g).valueOf():Number(g.valueOf());case"string":case"String":return String(g);case"Date":if(MC(g))return new Date(g);if(g instanceof Date)return new Date(g.valueOf());if(qs(g))return new Date(g.valueOf());if(GC(g))return(e=Ks.exec(g))?new Date(Number(e[1])):js(new Date(g)).toDate();throw new Error("Cannot convert object of type "+YC(g)+" to type Date");case"Moment":if(MC(g))return js(g);if(g instanceof Date)return js(g.valueOf());if(qs(g))return js(g);if(GC(g))return e=Ks.exec(g),js(e?Number(e[1]):g);throw new Error("Cannot convert object of type "+YC(g)+" to type Date");case"ISODate":if(MC(g))return new Date(g);if(g instanceof Date)return g.toISOString();if(qs(g))return g.toDate().toISOString();if(GC(g))return(e=Ks.exec(g))?new Date(Number(e[1])).toISOString():js(g).format();throw new Error("Cannot convert object of type "+YC(g)+" to type ISODate");case"ASPDate":if(MC(g))return"/Date("+g+")/";if(g instanceof Date||qs(g))return"/Date("+g.valueOf()+")/";if(GC(g))return"/Date("+((e=Ks.exec(g))?new Date(Number(e[1])).valueOf():new Date(g).valueOf())+")/";throw new Error("Cannot convert object of type "+YC(g)+" to type ASPDate");default:throw new Error("Unknown type ".concat(t))}}}function ga(g){return"string"==typeof g||"number"==typeof g}var ta=function(){function g(t){gr(this,g),this._queue=[],this._timeout=null,this._extended=null,this.delay=null,this.max=1/0,this.setOptions(t)}return er(g,[{key:"setOptions",value:function(g){g&&void 0!==g.delay&&(this.delay=g.delay),g&&void 0!==g.max&&(this.max=g.max),this._flushIfNeeded()}},{key:"destroy",value:function(){if(this.flush(),this._extended){for(var g=this._extended.object,t=this._extended.methods,e=0;e<t.length;e++){var A=t[e];A.original?g[A.name]=A.original:delete g[A.name]}this._extended=null}}},{key:"replace",value:function(g,t){var e=this,A=g[t];if(!A)throw new Error("Method "+t+" undefined");g[t]=function(){for(var g=arguments.length,t=new Array(g),I=0;I<g;I++)t[I]=arguments[I];e.queue({args:t,fn:A,context:this})}}},{key:"queue",value:function(g){"function"==typeof g?this._queue.push({fn:g}):this._queue.push(g),this._flushIfNeeded()}},{key:"_flushIfNeeded",value:function(){var g=this;this._queue.length>this.max&&this.flush(),null!=this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&"number"==typeof this.delay&&(this._timeout=rr((function(){g.flush()}),this.delay))}},{key:"flush",value:function(){var g,t;tI(g=yi(t=this._queue).call(t,0)).call(g,(function(g){g.fn.apply(g.context||g.fn,g.args||[])}))}}],[{key:"extend",value:function(t,e){var A=new g(e);if(void 0!==t.flush)throw new Error("Target object already has a property flush");t.flush=function(){A.flush()};var I=[{name:"flush",original:void 0}];if(e&&e.replace)for(var C=0;C<e.replace.length;C++){var i=e.replace[C];I.push({name:i,original:t[i]}),A.replace(t,i)}return A._extended={object:t,methods:I},A}}]),g}(),ea=function(){function g(){gr(this,g),this._subscribers={"*":[],add:[],remove:[],update:[]},this.subscribe=g.prototype.on,this.unsubscribe=g.prototype.off}return er(g,[{key:"_trigger",value:function(g,t,e){var A,I;if("*"===g)throw new Error("Cannot trigger event *");tI(A=kI(I=[]).call(I,XI(this._subscribers[g]),XI(this._subscribers["*"]))).call(A,(function(A){A(g,t,null!=e?e:null)}))}},{key:"on",value:function(g,t){"function"==typeof t&&this._subscribers[g].push(t)}},{key:"off",value:function(g,t){var e;this._subscribers[g]=bI(e=this._subscribers[g]).call(e,(function(g){return g!==t}))}}]),g}(),Aa=function(){function g(t){gr(this,g),this._pairs=t}return er(g,[{key:ks,value:xs.mark((function g(){var t,e,A,I,C;return xs.wrap((function(g){for(;;)switch(g.prev=g.next){case 0:t=Us(this._pairs),g.prev=1,t.s();case 3:if((e=t.n()).done){g.next=9;break}return A=uC(e.value,2),I=A[0],C=A[1],g.next=7,[I,C];case 7:g.next=3;break;case 9:g.next=14;break;case 11:g.prev=11,g.t0=g.catch(1),t.e(g.t0);case 14:return g.prev=14,t.f(),g.finish(14);case 17:case"end":return g.stop()}}),g,this,[[1,11,14,17]])}))},{key:"entries",value:xs.mark((function g(){var t,e,A,I,C;return xs.wrap((function(g){for(;;)switch(g.prev=g.next){case 0:t=Us(this._pairs),g.prev=1,t.s();case 3:if((e=t.n()).done){g.next=9;break}return A=uC(e.value,2),I=A[0],C=A[1],g.next=7,[I,C];case 7:g.next=3;break;case 9:g.next=14;break;case 11:g.prev=11,g.t0=g.catch(1),t.e(g.t0);case 14:return g.prev=14,t.f(),g.finish(14);case 17:case"end":return g.stop()}}),g,this,[[1,11,14,17]])}))},{key:"keys",value:xs.mark((function g(){var t,e,A,I;return xs.wrap((function(g){for(;;)switch(g.prev=g.next){case 0:t=Us(this._pairs),g.prev=1,t.s();case 3:if((e=t.n()).done){g.next=9;break}return A=uC(e.value,1),I=A[0],g.next=7,I;case 7:g.next=3;break;case 9:g.next=14;break;case 11:g.prev=11,g.t0=g.catch(1),t.e(g.t0);case 14:return g.prev=14,t.f(),g.finish(14);case 17:case"end":return g.stop()}}),g,this,[[1,11,14,17]])}))},{key:"values",value:xs.mark((function g(){var t,e,A,I;return xs.wrap((function(g){for(;;)switch(g.prev=g.next){case 0:t=Us(this._pairs),g.prev=1,t.s();case 3:if((e=t.n()).done){g.next=9;break}return A=uC(e.value,2),I=A[1],g.next=7,I;case 7:g.next=3;break;case 9:g.next=14;break;case 11:g.prev=11,g.t0=g.catch(1),t.e(g.t0);case 14:return g.prev=14,t.f(),g.finish(14);case 17:case"end":return g.stop()}}),g,this,[[1,11,14,17]])}))},{key:"toIdArray",value:function(){var g;return nI(g=XI(this._pairs)).call(g,(function(g){return g[0]}))}},{key:"toItemArray",value:function(){var g;return nI(g=XI(this._pairs)).call(g,(function(g){return g[1]}))}},{key:"toEntryArray",value:function(){return XI(this._pairs)}},{key:"toObjectMap",value:function(){var g,t=OA(null),e=Us(this._pairs);try{for(e.s();!(g=e.n()).done;){var A=uC(g.value,2),I=A[0],C=A[1];t[I]=C}}catch(g){e.e(g)}finally{e.f()}return t}},{key:"toMap",value:function(){return new ws(this._pairs)}},{key:"toIdSet",value:function(){return new bs(this.toIdArray())}},{key:"toItemSet",value:function(){return new bs(this.toItemArray())}},{key:"cache",value:function(){return new g(XI(this._pairs))}},{key:"distinct",value:function(g){var t,e=new bs,A=Us(this._pairs);try{for(A.s();!(t=A.n()).done;){var I=uC(t.value,2),C=I[0],i=I[1];e.add(g(i,C))}}catch(g){A.e(g)}finally{A.f()}return e}},{key:"filter",value:function(t){var e=this._pairs;return new g(ZA({},ks,xs.mark((function g(){var A,I,C,i,n;return xs.wrap((function(g){for(;;)switch(g.prev=g.next){case 0:A=Us(e),g.prev=1,A.s();case 3:if((I=A.n()).done){g.next=10;break}if(C=uC(I.value,2),i=C[0],n=C[1],!t(n,i)){g.next=8;break}return g.next=8,[i,n];case 8:g.next=3;break;case 10:g.next=15;break;case 12:g.prev=12,g.t0=g.catch(1),A.e(g.t0);case 15:return g.prev=15,A.f(),g.finish(15);case 18:case"end":return g.stop()}}),g,null,[[1,12,15,18]])}))))}},{key:"forEach",value:function(g){var t,e=Us(this._pairs);try{for(e.s();!(t=e.n()).done;){var A=uC(t.value,2),I=A[0];g(A[1],I)}}catch(g){e.e(g)}finally{e.f()}}},{key:"map",value:function(t){var e=this._pairs;return new g(ZA({},ks,xs.mark((function g(){var A,I,C,i,n;return xs.wrap((function(g){for(;;)switch(g.prev=g.next){case 0:A=Us(e),g.prev=1,A.s();case 3:if((I=A.n()).done){g.next=9;break}return C=uC(I.value,2),i=C[0],n=C[1],g.next=7,[i,t(n,i)];case 7:g.next=3;break;case 9:g.next=14;break;case 11:g.prev=11,g.t0=g.catch(1),A.e(g.t0);case 14:return g.prev=14,A.f(),g.finish(14);case 17:case"end":return g.stop()}}),g,null,[[1,11,14,17]])}))))}},{key:"max",value:function(g){var t=Ht(this._pairs),e=t.next();if(e.done)return null;for(var A=e.value[1],I=g(e.value[1],e.value[0]);!(e=t.next()).done;){var C=uC(e.value,2),i=C[0],n=C[1],o=g(n,i);o>I&&(I=o,A=n)}return A}},{key:"min",value:function(g){var t=Ht(this._pairs),e=t.next();if(e.done)return null;for(var A=e.value[1],I=g(e.value[1],e.value[0]);!(e=t.next()).done;){var C=uC(e.value,2),i=C[0],n=C[1],o=g(n,i);o<I&&(I=o,A=n)}return A}},{key:"reduce",value:function(g,t){var e,A=Us(this._pairs);try{for(A.s();!(e=A.n()).done;){var I=uC(e.value,2),C=I[0];t=g(t,I[1],C)}}catch(g){A.e(g)}finally{A.f()}return t}},{key:"sort",value:function(t){var e=this;return new g(ZA({},ks,(function(){var g;return Ht(Cs(g=XI(e._pairs)).call(g,(function(g,e){var A=uC(g,2),I=A[0],C=A[1],i=uC(e,2),n=i[0],o=i[1];return t(C,o,I,n)})))})))}}]),g}(),Ia=function(){console.warn("Type coercion has been deprecated. Please, use data pipes instead. See https://visjs.github.io/vis-data/data/datapipe.html#TypeCoercion for more details with working migration example.")},Ca=function(g){_r(e,g);var t=Xs(e);function e(g,A){var I;if(gr(this,e),I=t.call(this),g&&!CC(g)&&(A=g,g=[]),I._options=A||{},I._data=new ws,I.length=0,I._idProp=I._options.fieldId||"id",I._type={},I._options.type){Ia();for(var C=GA(I._options.type),i=0,n=C.length;i<n;i++){var o=C[i],r=I._options.type[o];I._type[o]="Date"==r||"ISODate"==r||"ASPDate"==r?"Date":r}}return g&&g.length&&I.add(g),I.setOptions(A),I}return er(e,[{key:"setOptions",value:function(g){g&&void 0!==g.queue&&(!1===g.queue?this._queue&&(this._queue.destroy(),delete this._queue):(this._queue||(this._queue=ta.extend(this,{replace:["add","update","remove"]})),g.queue&&"object"===dC(g.queue)&&this._queue.setOptions(g.queue)))}},{key:"add",value:function(g,t){var e,A=this,I=[];if(CC(g)){var C=nI(g).call(g,(function(g){return g[A._idProp]}));if(cr(C).call(C,(function(g){return A._data.has(g)})))throw new Error("A duplicate id was found in the parameter array.");for(var i=0,n=g.length;i<n;i++)e=this._addItem(g[i]),I.push(e)}else{if(!g||"object"!==dC(g))throw new Error("Unknown dataType");e=this._addItem(g),I.push(e)}return I.length&&this._trigger("add",{items:I},t),I}},{key:"update",value:function(g,t){var e=this,A=[],I=[],C=[],i=[],n=this._idProp,o=function(g){var t=g[n];if(null!=t&&e._data.has(t)){var o=g,r=rC({},e._data.get(t)),s=e._updateItem(o);I.push(s),i.push(o),C.push(r)}else{var a=e._addItem(g);A.push(a)}};if(CC(g))for(var r=0,s=g.length;r<s;r++)g[r]&&"object"===dC(g[r])?o(g[r]):console.warn("Ignoring input item, which is not an object at index "+r);else{if(!g||"object"!==dC(g))throw new Error("Unknown dataType");o(g)}if(A.length&&this._trigger("add",{items:A},t),I.length){var a={items:I,oldData:C,data:i};this._trigger("update",a,t)}return kI(A).call(A,I)}},{key:"updateOnly",value:function(g,t){var e,A=this;CC(g)||(g=[g]);var I=nI(e=nI(g).call(g,(function(g){var t=A._data.get(g[A._idProp]);if(null==t)throw new Error("Updating non-existent items is not allowed.");return{oldData:t,update:g}}))).call(e,(function(g){var t=g.oldData,e=g.update,I=t[A._idProp],C=QC(QC({},t),e);return A._data.set(I,C),{id:I,oldData:t,updatedData:C}}));if(I.length){var C={items:nI(I).call(I,(function(g){return g.id})),oldData:nI(I).call(I,(function(g){return g.oldData})),data:nI(I).call(I,(function(g){return g.updatedData}))};return this._trigger("update",C,t),C.items}return[]}},{key:"get",value:function(g,t){var e=void 0,A=void 0,I=void 0;ga(g)?(e=g,I=t):CC(g)?(A=g,I=t):I=g;var C=I&&"Object"===I.returnType?"Object":"Array",i=I&&I.type||this._options.type,n=I&&bI(I),o=[],r=null,s=null,a=null;if(null!=e)(r=this._getItem(e,i))&&n&&!n(r)&&(r=null);else if(null!=A)for(var d=0,l=A.length;d<l;d++)null==(r=this._getItem(A[d],i))||n&&!n(r)||o.push(r);else for(var h,c=0,u=(s=XI(jr(h=this._data).call(h))).length;c<u;c++)a=s[c],null==(r=this._getItem(a,i))||n&&!n(r)||o.push(r);if(I&&I.order&&null==e&&this._sort(o,I.order),I&&I.fields){var f=I.fields;if(null!=e&&null!=r)r=this._filterFields(r,f);else for(var p=0,v=o.length;p<v;p++)o[p]=this._filterFields(o[p],f)}if("Object"==C){for(var y={},m=0,b=o.length;m<b;m++){var w=o[m];y[w[this._idProp]]=w}return y}return null!=e?r:o}},{key:"getIds",value:function(g){var t,e,A=this._data,I=g&&bI(g),C=g&&g.order,i=g&&g.type||this._options.type,n=XI(jr(A).call(A)),o=[];if(I)if(C){e=[];for(var r=0,s=n.length;r<s;r++){var a=n[r];I(t=this._getItem(a,i))&&e.push(t)}this._sort(e,C);for(var d=0,l=e.length;d<l;d++)o.push(e[d][this._idProp])}else for(var h=0,c=n.length;h<c;h++){var u=n[h];I(t=this._getItem(u,i))&&o.push(t[this._idProp])}else if(C){e=[];for(var f=0,p=n.length;f<p;f++){var v=n[f];e.push(A.get(v))}this._sort(e,C);for(var y=0,m=e.length;y<m;y++)o.push(e[y][this._idProp])}else for(var b=0,w=n.length;b<w;b++){var x=n[b];t=A.get(x),o.push(t[this._idProp])}return o}},{key:"getDataSet",value:function(){return this}},{key:"forEach",value:function(g,t){var e=t&&bI(t),A=t&&t.type||this._options.type,I=this._data,C=XI(jr(I).call(I));if(t&&t.order)for(var i=this.get(t),n=0,o=i.length;n<o;n++){var r=i[n];g(r,r[this._idProp])}else for(var s=0,a=C.length;s<a;s++){var d=C[s],l=this._getItem(d,A);e&&!e(l)||g(l,d)}}},{key:"map",value:function(g,t){for(var e=t&&bI(t),A=t&&t.type||this._options.type,I=[],C=this._data,i=XI(jr(C).call(C)),n=0,o=i.length;n<o;n++){var r=i[n],s=this._getItem(r,A);e&&!e(s)||I.push(g(s,r))}return t&&t.order&&this._sort(I,t.order),I}},{key:"_filterFields",value:function(g,t){var e;return g?Ss(e=CC(t)?t:GA(t)).call(e,(function(t,e){return t[e]=g[e],t}),{}):g}},{key:"_sort",value:function(g,t){if("string"==typeof t){var e=t;Cs(g).call(g,(function(g,t){var A=g[e],I=t[e];return A>I?1:A<I?-1:0}))}else{if("function"!=typeof t)throw new TypeError("Order must be a function or a string");Cs(g).call(g,t)}}},{key:"remove",value:function(g,t){for(var e=[],A=[],I=CC(g)?g:[g],C=0,i=I.length;C<i;C++){var n=this._remove(I[C]);if(n){var o=n[this._idProp];null!=o&&(e.push(o),A.push(n))}}return e.length&&this._trigger("remove",{items:e,oldData:A},t),e}},{key:"_remove",value:function(g){var t;if(ga(g)?t=g:g&&"object"===dC(g)&&(t=g[this._idProp]),null!=t&&this._data.has(t)){var e=this._data.get(t)||null;return this._data.delete(t),--this.length,e}return null}},{key:"clear",value:function(g){for(var t,e=XI(jr(t=this._data).call(t)),A=[],I=0,C=e.length;I<C;I++)A.push(this._data.get(e[I]));return this._data.clear(),this.length=0,this._trigger("remove",{items:e,oldData:A},g),e}},{key:"max",value:function(g){var t,e,A=null,I=null,C=Us(Yr(t=this._data).call(t));try{for(C.s();!(e=C.n()).done;){var i=e.value,n=i[g];"number"==typeof n&&(null==I||n>I)&&(A=i,I=n)}}catch(g){C.e(g)}finally{C.f()}return A||null}},{key:"min",value:function(g){var t,e,A=null,I=null,C=Us(Yr(t=this._data).call(t));try{for(C.s();!(e=C.n()).done;){var i=e.value,n=i[g];"number"==typeof n&&(null==I||n<I)&&(A=i,I=n)}}catch(g){C.e(g)}finally{C.f()}return A||null}},{key:"distinct",value:function(g){for(var t=this._data,e=XI(jr(t).call(t)),A=[],I=this._options.type&&this._options.type[g]||null,C=0,i=0,n=e.length;i<n;i++){for(var o=e[i],r=t.get(o)[g],s=!1,a=0;a<C;a++)if(A[a]==r){s=!0;break}s||void 0===r||(A[C]=r,C++)}if(I)for(var d=0,l=A.length;d<l;d++)A[d]=$s(A[d],I);return A}},{key:"_addItem",value:function(g){var t=g[this._idProp];if(null!=t){if(this._data.has(t))throw new Error("Cannot add item: item with id "+t+" already exists")}else t=Ps(),g[this._idProp]=t;for(var e={},A=GA(g),I=0,C=A.length;I<C;I++){var i=A[I],n=this._type[i];e[i]=$s(g[i],n)}return this._data.set(t,e),++this.length,t}},{key:"_getItem",value:function(g,t){var e,A=this._data.get(g);if(!A)return null;var I=GA(A);if(t){Ia(),e={};for(var C=0,i=I.length;C<i;C++){var n=I[C],o=A[n];e[n]=$s(o,t[n])}}else e=function(g){for(var t=1;t<arguments.length;t++){var e,A=null!=arguments[t]?arguments[t]:{};if(t%2)tI(e=Vs(Object(A),!0)).call(e,(function(t){ZA(g,t,A[t])}));else if(vA)fA(g,vA(A));else{var I;tI(I=Vs(Object(A))).call(I,(function(t){uA(g,t,wA(A,t))}))}}return g}({},A);return null==e[this._idProp]&&(e[this._idProp]=A.id),e}},{key:"_updateItem",value:function(g){var t=g[this._idProp];if(null==t)throw new Error("Cannot update item: item has no id (item: "+Fr(g)+")");var e=this._data.get(t);if(!e)throw new Error("Cannot update item: no item with id "+t+" found");for(var A=GA(g),I=0,C=A.length;I<C;I++){var i=A[I],n=this._type[i];e[i]=$s(g[i],n)}return t}},{key:"stream",value:function(g){if(g){var t=this._data;return new Aa(ZA({},ks,xs.mark((function e(){var A,I,C,i;return xs.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:A=Us(g),e.prev=1,A.s();case 3:if((I=A.n()).done){e.next=11;break}if(C=I.value,null==(i=t.get(C))){e.next=9;break}return e.next=9,[C,i];case 9:e.next=3;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),A.e(e.t0);case 16:return e.prev=16,A.f(),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[1,13,16,19]])}))))}var e;return new Aa(ZA({},ks,gg(e=Zr(this._data)).call(e,this._data)))}}]),e}(ea),ia=function(g){_r(e,g);var t=Xs(e);function e(g,A){var I,C;return gr(this,e),(C=t.call(this)).length=0,C._ids=new bs,C._options=A||{},C._listener=gg(I=C._onEvent).call(I,yr(C)),C.setData(g),C}return er(e,[{key:"setData",value:function(g){if(this._data){this._data.off&&this._data.off("*",this._listener);var t=this._data.getIds({filter:bI(this._options)}),e=this._data.get(t);this._ids.clear(),this.length=0,this._trigger("remove",{items:t,oldData:e})}if(null!=g){this._data=g;for(var A=this._data.getIds({filter:bI(this._options)}),I=0,C=A.length;I<C;I++){var i=A[I];this._ids.add(i)}this.length=A.length,this._trigger("add",{items:A})}else this._data=new Ca;this._data.on&&this._data.on("*",this._listener)}},{key:"refresh",value:function(){for(var g=this._data.getIds({filter:bI(this._options)}),t=XI(this._ids),e={},A=[],I=[],C=[],i=0,n=g.length;i<n;i++){var o=g[i];e[o]=!0,this._ids.has(o)||(A.push(o),this._ids.add(o))}for(var r=0,s=t.length;r<s;r++){var a=t[r],d=this._data.get(a);null==d?console.error("If you see this, report it please."):e[a]||(I.push(a),C.push(d),this._ids.delete(a))}this.length+=A.length-I.length,A.length&&this._trigger("add",{items:A}),I.length&&this._trigger("remove",{items:I,oldData:C})}},{key:"get",value:function(g,t){if(null==this._data)return null;var e,A=null;ga(g)||CC(g)?(A=g,e=t):e=g;var I=rC({},this._options,e),C=bI(this._options),i=e&&bI(e);return C&&i&&(I.filter=function(g){return C(g)&&i(g)}),null==A?this._data.get(I):this._data.get(A,I)}},{key:"getIds",value:function(g){if(this._data.length){var t,e=bI(this._options),A=null!=g?bI(g):null;return t=A?e?function(g){return e(g)&&A(g)}:A:e,this._data.getIds({filter:t,order:g&&g.order})}return[]}},{key:"forEach",value:function(g,t){if(this._data){var e,A,I=bI(this._options),C=t&&bI(t);A=C?I?function(g){return I(g)&&C(g)}:C:I,tI(e=this._data).call(e,g,{filter:A,order:t&&t.order})}}},{key:"map",value:function(g,t){if(this._data){var e,A,I=bI(this._options),C=t&&bI(t);return A=C?I?function(g){return I(g)&&C(g)}:C:I,nI(e=this._data).call(e,g,{filter:A,order:t&&t.order})}return[]}},{key:"getDataSet",value:function(){return this._data.getDataSet()}},{key:"stream",value:function(g){var t;return this._data.stream(g||ZA({},ks,gg(t=jr(this._ids)).call(t,this._ids)))}},{key:"dispose",value:function(){var g;(null===(g=this._data)||void 0===g?void 0:g.off)&&this._data.off("*",this._listener);var t="This data view has already been disposed of.";uA(this,"_data",{get:function(){throw new Error(t)},set:function(){throw new Error(t)},configurable:!1})}},{key:"_onEvent",value:function(g,t,e){if(t&&t.items&&this._data){var A=t.items,I=[],C=[],i=[],n=[],o=[],r=[];switch(g){case"add":for(var s=0,a=A.length;s<a;s++){var d=A[s];this.get(d)&&(this._ids.add(d),I.push(d))}break;case"update":for(var l=0,h=A.length;l<h;l++){var c=A[l];this.get(c)?this._ids.has(c)?(C.push(c),o.push(t.data[l]),n.push(t.oldData[l])):(this._ids.add(c),I.push(c)):this._ids.has(c)&&(this._ids.delete(c),i.push(c),r.push(t.oldData[l]))}break;case"remove":for(var u=0,f=A.length;u<f;u++){var p=A[u];this._ids.has(p)&&(this._ids.delete(p),i.push(p),r.push(t.oldData[u]))}}this.length+=I.length-i.length,I.length&&this._trigger("add",{items:I},e),C.length&&this._trigger("update",{items:C,oldData:n,data:o},e),i.length&&this._trigger("remove",{items:i,oldData:r},e)}}}]),e}(ea),na=Object.freeze({__proto__:null,DataSet:Ca,DataStream:Aa,DataView:ia,Queue:ta,createNewDataPipeFrom:function(g){return new Js(g)}}),oa=pe.f,ra=o((function(){return!Object.getOwnPropertyNames(1)}));X({target:"Object",stat:!0,forced:ra},{getOwnPropertyNames:oa});var sa=S.Object,aa=function(g){return sa.getOwnPropertyNames(g)},da=LA.trim,la=n.parseFloat,ha=1/la(TA+"-0")!=-1/0?function(g){var t=da(String(g)),e=la(t);return 0===e&&"-"==t.charAt(0)?-0:e}:la;X({global:!0,forced:parseFloat!=ha},{parseFloat:ha});var ca=S.parseFloat,ua=function(){function g(){gr(this,g)}return er(g,null,[{key:"choosify",value:function(g,t){var e=["node","edge","label"],A=!0,I=di(t,"chosen");if("boolean"==typeof I)A=I;else if("object"===dC(I)){if(-1===IC(e).call(e,g))throw new Error("choosify: subOption '"+g+"' should be one of '"+e.join("', '")+"'");var C=di(t,["chosen",g]);"boolean"!=typeof C&&"function"!=typeof C||(A=C)}return A}},{key:"pointInRect",value:function(g,t,e){if(g.width<=0||g.height<=0)return!1;if(void 0!==e){var A={x:t.x-e.x,y:t.y-e.y};if(0!==e.angle){var I=-e.angle;t={x:Math.cos(I)*A.x-Math.sin(I)*A.y,y:Math.sin(I)*A.x+Math.cos(I)*A.y}}else t=A}var C=g.x+g.width,i=g.y+g.width;return g.left<t.x&&C>t.x&&g.top<t.y&&i>t.y}},{key:"isValidLabel",value:function(g){return"string"==typeof g&&""!==g}},{key:"getSelfRefCoordinates",value:function(g,t,e,A){var I=A.x,C=A.y;if("function"==typeof A.distanceToBorder){var i=A.distanceToBorder(g,t),n=Math.sin(t)*i,o=Math.cos(t)*i;o===i?(I+=i,C=A.y):n===i?(I=A.x,C-=i):(I+=o,C-=n)}else A.shape.width>A.shape.height?(I=A.x+.5*A.shape.width,C=A.y-e):(I=A.x+e,C=A.y-.5*A.shape.height);return{x:I,y:C}}}]),g}(),fa=function(){function g(t){gr(this,g),this.measureText=t,this.current=0,this.width=0,this.height=0,this.lines=[]}return er(g,[{key:"_add",value:function(g,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"normal";void 0===this.lines[g]&&(this.lines[g]={width:0,height:0,blocks:[]});var A=t;void 0!==t&&""!==t||(A=" ");var I=this.measureText(A,e),C=rC({},Yr(I));C.text=t,C.width=I.width,C.mod=e,void 0!==t&&""!==t||(C.width=0),this.lines[g].blocks.push(C),this.lines[g].width+=C.width}},{key:"curWidth",value:function(){var g=this.lines[this.current];return void 0===g?0:g.width}},{key:"append",value:function(g){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal";this._add(this.current,g,t)}},{key:"newLine",value:function(g){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal";this._add(this.current,g,t),this.current++}},{key:"determineLineHeights",value:function(){for(var g=0;g<this.lines.length;g++){var t=this.lines[g],e=0;if(void 0!==t.blocks)for(var A=0;A<t.blocks.length;A++){var I=t.blocks[A];e<I.height&&(e=I.height)}t.height=e}}},{key:"determineLabelSize",value:function(){for(var g=0,t=0,e=0;e<this.lines.length;e++){var A=this.lines[e];A.width>g&&(g=A.width),t+=A.height}this.width=g,this.height=t}},{key:"removeEmptyBlocks",value:function(){for(var g=[],t=0;t<this.lines.length;t++){var e=this.lines[t];if(0!==e.blocks.length&&(t!==this.lines.length-1||0!==e.width)){var A={};rC(A,e),A.blocks=[];for(var I=void 0,C=[],i=0;i<e.blocks.length;i++){var n=e.blocks[i];0!==n.width?C.push(n):void 0===I&&(I=n)}0===C.length&&void 0!==I&&C.push(I),A.blocks=C,g.push(A)}}return g}},{key:"finalize",value:function(){this.determineLineHeights(),this.determineLabelSize();var g=this.removeEmptyBlocks();return{width:this.width,height:this.height,lines:g}}}]),g}(),pa={"<b>":/<b>/,"<i>":/<i>/,"<code>":/<code>/,"</b>":/<\/b>/,"</i>":/<\/i>/,"</code>":/<\/code>/,"*":/\*/,_:/\_/,"`":/`/,afterBold:/[^\*]/,afterItal:/[^_]/,afterMono:/[^`]/},va=function(){function g(t){gr(this,g),this.text=t,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}return er(g,[{key:"mod",value:function(){return 0===this.modStack.length?"normal":this.modStack[0]}},{key:"modName",value:function(){return 0===this.modStack.length?"normal":"mono"===this.modStack[0]?"mono":this.bold&&this.ital?"boldital":this.bold?"bold":this.ital?"ital":void 0}},{key:"emitBlock",value:function(){this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer="")}},{key:"add",value:function(g){" "===g&&(this.spacing=!0),this.spacing&&(this.buffer+=" ",this.spacing=!1)," "!=g&&(this.buffer+=g)}},{key:"parseWS",value:function(g){return!!/[ \t]/.test(g)&&(this.mono?this.add(g):this.spacing=!0,!0)}},{key:"setTag",value:function(g){this.emitBlock(),this[g]=!0,this.modStack.unshift(g)}},{key:"unsetTag",value:function(g){this.emitBlock(),this[g]=!1,this.modStack.shift()}},{key:"parseStartTag",value:function(g,t){return!(this.mono||this[g]||!this.match(t))&&(this.setTag(g),!0)}},{key:"match",value:function(g){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=this.prepareRegExp(g),A=uC(e,2),I=A[0],C=A[1],i=I.test(this.text.substr(this.position,C));return i&&t&&(this.position+=C-1),i}},{key:"parseEndTag",value:function(g,t,e){var A=this.mod()===g;return!(!(A="mono"===g?A&&this.mono:A&&!this.mono)||!this.match(t))&&(void 0!==e?(this.position===this.text.length-1||this.match(e,!1))&&this.unsetTag(g):this.unsetTag(g),!0)}},{key:"replace",value:function(g,t){return!!this.match(g)&&(this.add(t),this.position+=length-1,!0)}},{key:"prepareRegExp",value:function(g){var t,e;if(g instanceof RegExp)e=g,t=1;else{var A=pa[g];e=void 0!==A?A:new RegExp(g),t=g.length}return[e,t]}}]),g}(),ya=function(){function g(t,e,A,I){var C=this;gr(this,g),this.ctx=t,this.parent=e,this.selected=A,this.hover=I;this.lines=new fa((function(g,e){if(void 0===g)return 0;var i=C.parent.getFormattingValues(t,A,I,e),n=0;""!==g&&(n=C.ctx.measureText(g).width);return{width:n,values:i}}))}return er(g,[{key:"process",value:function(g){if(!ua.isValidLabel(g))return this.lines.finalize();var t=this.parent.fontOptions;g=(g=g.replace(/\r\n/g,"\n")).replace(/\r/g,"\n");var e=String(g).split("\n"),A=e.length;if(t.multi)for(var I=0;I<A;I++){var C=this.splitBlocks(e[I],t.multi);if(void 0!==C)if(0!==C.length){if(t.maxWdt>0)for(var i=0;i<C.length;i++){var n=C[i].mod,o=C[i].text;this.splitStringIntoLines(o,n,!0)}else for(var r=0;r<C.length;r++){var s=C[r].mod,a=C[r].text;this.lines.append(a,s)}this.lines.newLine()}else this.lines.newLine("")}else if(t.maxWdt>0)for(var d=0;d<A;d++)this.splitStringIntoLines(e[d]);else for(var l=0;l<A;l++)this.lines.newLine(e[l]);return this.lines.finalize()}},{key:"decodeMarkupSystem",value:function(g){var t="none";return"markdown"===g||"md"===g?t="markdown":!0!==g&&"html"!==g||(t="html"),t}},{key:"splitHtmlBlocks",value:function(g){for(var t=new va(g),e=function(g){return!!/&/.test(g)&&(t.replace(t.text,"&lt;","<")||t.replace(t.text,"&amp;","&")||t.add("&"),!0)};t.position<t.text.length;){var A=t.text.charAt(t.position);t.parseWS(A)||/</.test(A)&&(t.parseStartTag("bold","<b>")||t.parseStartTag("ital","<i>")||t.parseStartTag("mono","<code>")||t.parseEndTag("bold","</b>")||t.parseEndTag("ital","</i>")||t.parseEndTag("mono","</code>"))||e(A)||t.add(A),t.position++}return t.emitBlock(),t.blocks}},{key:"splitMarkdownBlocks",value:function(g){for(var t=this,e=new va(g),A=!0,I=function(g){return!!/\\/.test(g)&&(e.position<t.text.length+1&&(e.position++,g=t.text.charAt(e.position),/ \t/.test(g)?e.spacing=!0:(e.add(g),A=!1)),!0)};e.position<e.text.length;){var C=e.text.charAt(e.position);e.parseWS(C)||I(C)||(A||e.spacing)&&(e.parseStartTag("bold","*")||e.parseStartTag("ital","_")||e.parseStartTag("mono","`"))||e.parseEndTag("bold","*","afterBold")||e.parseEndTag("ital","_","afterItal")||e.parseEndTag("mono","`","afterMono")||(e.add(C),A=!1),e.position++}return e.emitBlock(),e.blocks}},{key:"splitBlocks",value:function(g,t){var e=this.decodeMarkupSystem(t);return"none"===e?[{text:g,mod:"normal"}]:"markdown"===e?this.splitMarkdownBlocks(g):"html"===e?this.splitHtmlBlocks(g):void 0}},{key:"overMaxWidth",value:function(g){var t=this.ctx.measureText(g).width;return this.lines.curWidth()+t>this.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(g){for(var t="",e=0;e<g.length;){var A=t+(""===t?"":" ")+g[e];if(this.overMaxWidth(A))break;t=A,e++}return e}},{key:"getLongestFitWord",value:function(g){for(var t=0;t<g.length&&!this.overMaxWidth(UI(g).call(g,0,t));)t++;return t}},{key:"splitStringIntoLines",value:function(g){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal",e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t);for(var A=(g=(g=g.replace(/^( +)/g,"$1\r")).replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r")).split("\r");A.length>0;){var I=this.getLongestFit(A);if(0===I){var C=A[0],i=this.getLongestFitWord(C);this.lines.newLine(UI(C).call(C,0,i),t),A[0]=UI(C).call(C,i)}else{var n=I;" "===A[I-1]?I--:" "===A[n]&&n++;var o=UI(A).call(A,0,I).join("");I==A.length&&e?this.lines.append(o,t):this.lines.newLine(o,t),A=UI(A).call(A,n)}}}}]),g}(),ma=["bold","ital","boldital","mono"],ba=function(){function g(t,e){var A=arguments.length>2&&void 0!==arguments[2]&&arguments[2];gr(this,g),this.body=t,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(e),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=A}return er(g,[{key:"setOptions",value:function(g){if(this.elementOptions=g,this.initFontOptions(g.font),ua.isValidLabel(g.label)?this.labelDirty=!0:g.label=void 0,void 0!==g.font&&null!==g.font)if("string"==typeof g.font)this.baseSize=this.fontOptions.size;else if("object"===dC(g.font)){var t=g.font.size;void 0!==t&&(this.baseSize=t)}}},{key:"initFontOptions",value:function(t){var e=this;VC(ma,(function(g){e.fontOptions[g]={}})),g.parseFontString(this.fontOptions,t)?this.fontOptions.vadjust=0:VC(t,(function(g,t){null!=g&&"object"!==dC(g)&&(e.fontOptions[t]=g)}))}},{key:"constrain",value:function(g){var t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},e=di(g,"widthConstraint");if("number"==typeof e)t.maxWdt=Number(e),t.minWdt=Number(e);else if("object"===dC(e)){var A=di(g,["widthConstraint","maximum"]);"number"==typeof A&&(t.maxWdt=Number(A));var I=di(g,["widthConstraint","minimum"]);"number"==typeof I&&(t.minWdt=Number(I))}var C=di(g,"heightConstraint");if("number"==typeof C)t.minHgt=Number(C);else if("object"===dC(C)){var i=di(g,["heightConstraint","minimum"]);"number"==typeof i&&(t.minHgt=Number(i));var n=di(g,["heightConstraint","valign"]);"string"==typeof n&&("top"!==n&&"bottom"!==n||(t.valign=n))}return t}},{key:"update",value:function(g,t){this.setOptions(g,!0),this.propagateFonts(t),QC(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=ua.choosify("label",t)}},{key:"adjustSizes",value:function(g){var t=g?g.right+g.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=t,this.fontOptions.minWdt-=t);var e=g?g.top+g.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=e)}},{key:"addFontOptionsToPile",value:function(g,t){for(var e=0;e<t.length;++e)this.addFontToPile(g,t[e])}},{key:"addFontToPile",value:function(g,t){if(void 0!==t&&void 0!==t.font&&null!==t.font){var e=t.font;g.push(e)}}},{key:"getBasicOptions",value:function(t){for(var e={},A=0;A<t.length;++A){var I=t[A],C={};g.parseFontString(C,I)&&(I=C),VC(I,(function(g,t){void 0!==g&&(e.hasOwnProperty(t)||(-1!==IC(ma).call(ma,t)?e[t]={}:e[t]=g))}))}return e}},{key:"getFontOption",value:function(t,e,A){for(var I,C=0;C<t.length;++C){var i=t[C];if(i.hasOwnProperty(e)){if(null==(I=i[e]))continue;var n={};if(g.parseFontString(n,I)&&(I=n),I.hasOwnProperty(A))return I[A]}}if(this.fontOptions.hasOwnProperty(A))return this.fontOptions[A];throw new Error("Did not find value for multi-font for property: '"+A+"'")}},{key:"getFontOptions",value:function(g,t){for(var e={},A=["color","size","face","mod","vadjust"],I=0;I<A.length;++I){var C=A[I];e[C]=this.getFontOption(g,t,C)}return e}},{key:"propagateFonts",value:function(g){var t=this,e=[];this.addFontOptionsToPile(e,g),this.fontOptions=this.getBasicOptions(e);for(var A=function(g){var A=ma[g],I=t.fontOptions[A];VC(t.getFontOptions(e,A),(function(g,t){I[t]=g})),I.size=Number(I.size),I.vadjust=Number(I.vadjust)},I=0;I<ma.length;++I)A(I)}},{key:"draw",value:function(g,t,e,A,I){var C=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"middle";if(void 0!==this.elementOptions.label){var i=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&i<this.elementOptions.scaling.label.drawThreshold-1||(i>=this.elementOptions.scaling.label.maxVisible&&(i=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(g,A,I,t,e,C),this._drawBackground(g),this._drawText(g,t,this.size.yLine,C,i))}}},{key:"_drawBackground",value:function(g){if(void 0!==this.fontOptions.background&&"none"!==this.fontOptions.background){g.fillStyle=this.fontOptions.background;var t=this.getSize();g.fillRect(t.left,t.top,t.width,t.height)}}},{key:"_drawText",value:function(g,t,e){var A=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"middle",I=arguments.length>4?arguments[4]:void 0,C=this._setAlignment(g,t,e,A),i=uC(C,2);t=i[0],e=i[1],g.textAlign="left",t-=this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&("top"===this.fontOptions.valign&&(e-=(this.size.height-this.size.labelHeight)/2),"bottom"===this.fontOptions.valign&&(e+=(this.size.height-this.size.labelHeight)/2));for(var n=0;n<this.lineCount;n++){var o=this.lines[n];if(o&&o.blocks){var r=0;this.isEdgeLabel||"center"===this.fontOptions.align?r+=(this.size.width-o.width)/2:"right"===this.fontOptions.align&&(r+=this.size.width-o.width);for(var s=0;s<o.blocks.length;s++){var a=o.blocks[s];g.font=a.font;var d=this._getColor(a.color,I,a.strokeColor),l=uC(d,2),h=l[0],c=l[1];a.strokeWidth>0&&(g.lineWidth=a.strokeWidth,g.strokeStyle=c,g.lineJoin="round"),g.fillStyle=h,a.strokeWidth>0&&g.strokeText(a.text,t+r,e+a.vadjust),g.fillText(a.text,t+r,e+a.vadjust),r+=a.width}e+=o.height}}}},{key:"_setAlignment",value:function(g,t,e,A){if(this.isEdgeLabel&&"horizontal"!==this.fontOptions.align&&!1===this.pointToSelf){t=0,e=0;"top"===this.fontOptions.align?(g.textBaseline="alphabetic",e-=4):"bottom"===this.fontOptions.align?(g.textBaseline="hanging",e+=4):g.textBaseline="middle"}else g.textBaseline=A;return[t,e]}},{key:"_getColor",value:function(g,t,e){var A=g||"#000000",I=e||"#ffffff";if(t<=this.elementOptions.scaling.label.drawThreshold){var C=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-t)));A=KC(A,C),I=KC(I,C)}return[A,I]}},{key:"getTextSize",value:function(g){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this._processLabel(g,t,e),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}},{key:"getSize",value:function(){var g=this.size.left,t=this.size.top-1;if(this.isEdgeLabel){var e=.5*-this.size.width;switch(this.fontOptions.align){case"middle":g=e,t=.5*-this.size.height;break;case"top":g=e,t=-(this.size.height+2);break;case"bottom":g=e,t=2}}return{left:g,top:t,width:this.size.width,height:this.size.height}}},{key:"calculateLabelSize",value:function(g,t,e){var A=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,I=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,C=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"middle";this._processLabel(g,t,e),this.size.left=A-.5*this.size.width,this.size.top=I-.5*this.size.height,this.size.yLine=I+.5*(1-this.lineCount)*this.fontOptions.size,"hanging"===C&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}},{key:"getFormattingValues",value:function(g,t,e,A){var I=function(g,t,e){return"normal"===t?"mod"===e?"":g[e]:void 0!==g[t][e]?g[t][e]:g[e]},C={color:I(this.fontOptions,A,"color"),size:I(this.fontOptions,A,"size"),face:I(this.fontOptions,A,"face"),mod:I(this.fontOptions,A,"mod"),vadjust:I(this.fontOptions,A,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(t||e)&&("normal"===A&&!0===this.fontOptions.chooser&&this.elementOptions.labelHighlightBold?C.mod="bold":"function"==typeof this.fontOptions.chooser&&this.fontOptions.chooser(C,this.elementOptions.id,t,e));var i="";return void 0!==C.mod&&""!==C.mod&&(i+=C.mod+" "),i+=C.size+"px "+C.face,g.font=i.replace(/"/g,""),C.font=g.font,C.height=C.size,C}},{key:"differentState",value:function(g,t){return g!==this.selectedState||t!==this.hoverState}},{key:"_processLabelText",value:function(g,t,e,A){return new ya(g,this,t,e).process(A)}},{key:"_processLabel",value:function(g,t,e){if(!1!==this.labelDirty||this.differentState(t,e)){var A=this._processLabelText(g,t,e,this.elementOptions.label);this.fontOptions.minWdt>0&&A.width<this.fontOptions.minWdt&&(A.width=this.fontOptions.minWdt),this.size.labelHeight=A.height,this.fontOptions.minHgt>0&&A.height<this.fontOptions.minHgt&&(A.height=this.fontOptions.minHgt),this.lines=A.lines,this.lineCount=A.lines.length,this.size.width=A.width,this.size.height=A.height,this.selectedState=t,this.hoverState=e,this.labelDirty=!1}}},{key:"visible",value:function(){return 0!==this.size.width&&0!==this.size.height&&void 0!==this.elementOptions.label&&!(this.fontOptions.size*this.body.view.scale<this.elementOptions.scaling.label.drawThreshold-1)}}],[{key:"parseFontString",value:function(g,t){if(!t||"string"!=typeof t)return!1;var e=t.split(" ");return g.size=+e[0].replace("px",""),g.face=e[1],g.color=e[2],!0}}]),g}();X({target:"Array",proto:!0},{fill:function(g){for(var t=Bg(this),e=qg(t.length),A=arguments.length,I=tt(A>1?arguments[1]:void 0,e),C=A>2?arguments[2]:void 0,i=void 0===C?e:tt(C,e);i>I;)t[I++]=g;return t}});var wa=K("Array").fill,xa=Array.prototype,ka=function(g){var t=g.fill;return g===xa||g instanceof Array&&t===xa.fill?wa:t},Da=function(){function g(t,e,A){gr(this,g),this.body=e,this.labelModule=A,this.setOptions(t),this.top=void 0,this.left=void 0,this.height=void 0,this.width=void 0,this.radius=void 0,this.margin=void 0,this.refreshNeeded=!0,this.boundingBox={top:0,left:0,right:0,bottom:0}}return er(g,[{key:"setOptions",value:function(g){this.options=g}},{key:"_setMargins",value:function(g){this.margin={},this.options.margin&&("object"==dC(this.options.margin)?(this.margin.top=this.options.margin.top,this.margin.right=this.options.margin.right,this.margin.bottom=this.options.margin.bottom,this.margin.left=this.options.margin.left):(this.margin.top=this.options.margin,this.margin.right=this.options.margin,this.margin.bottom=this.options.margin,this.margin.left=this.options.margin)),g.adjustSizes(this.margin)}},{key:"_distanceToBorder",value:function(g,t){var e=this.options.borderWidth;return g&&this.resize(g),Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+e}},{key:"enableShadow",value:function(g,t){t.shadow&&(g.shadowColor=t.shadowColor,g.shadowBlur=t.shadowSize,g.shadowOffsetX=t.shadowX,g.shadowOffsetY=t.shadowY)}},{key:"disableShadow",value:function(g,t){t.shadow&&(g.shadowColor="rgba(0,0,0,0)",g.shadowBlur=0,g.shadowOffsetX=0,g.shadowOffsetY=0)}},{key:"enableBorderDashes",value:function(g,t){if(!1!==t.borderDashes)if(void 0!==g.setLineDash){var e=t.borderDashes;!0===e&&(e=[5,15]),g.setLineDash(e)}else console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,t.borderDashes=!1}},{key:"disableBorderDashes",value:function(g,t){!1!==t.borderDashes&&(void 0!==g.setLineDash?g.setLineDash([0]):(console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,t.borderDashes=!1))}},{key:"needsRefresh",value:function(g,t){return!0===this.refreshNeeded?(this.refreshNeeded=!1,!0):void 0===this.width||this.labelModule.differentState(g,t)}},{key:"initContextForDraw",value:function(g,t){var e=t.borderWidth/this.body.view.scale;g.lineWidth=Math.min(this.width,e),g.strokeStyle=t.borderColor,g.fillStyle=t.color}},{key:"performStroke",value:function(g,t){var e=t.borderWidth/this.body.view.scale;g.save(),e>0&&(this.enableBorderDashes(g,t),g.stroke(),this.disableBorderDashes(g,t)),g.restore()}},{key:"performFill",value:function(g,t){g.save(),g.fillStyle=t.color,this.enableShadow(g,t),ka(g).call(g),this.disableShadow(g,t),g.restore(),this.performStroke(g,t)}},{key:"_addBoundingBoxMargin",value:function(g){this.boundingBox.left-=g,this.boundingBox.top-=g,this.boundingBox.bottom+=g,this.boundingBox.right+=g}},{key:"_updateBoundingBox",value:function(g,t,e,A,I){void 0!==e&&this.resize(e,A,I),this.left=g-this.width/2,this.top=t-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"updateBoundingBox",value:function(g,t,e,A,I){this._updateBoundingBox(g,t,e,A,I)}},{key:"getDimensionsFromLabel",value:function(g,t,e){this.textSize=this.labelModule.getTextSize(g,t,e);var A=this.textSize.width,I=this.textSize.height;return 0===A&&(A=14,I=14),{width:A,height:I}}}]),g}();function Oa(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var Na=function(g){_r(e,g);var t=Oa(e);function e(g,A,I){var C;return gr(this,e),(C=t.call(this,g,A,I))._setMargins(I),C}return er(e,[{key:"resize",value:function(g){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(t,e)){var A=this.getDimensionsFromLabel(g,t,e);this.width=A.width+this.margin.right+this.margin.left,this.height=A.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}},{key:"draw",value:function(g,t,e,A,I,C){this.resize(g,A,I),this.left=t-this.width/2,this.top=e-this.height/2,this.initContextForDraw(g,C),eg(g,this.left,this.top,this.width,this.height,C.borderRadius),this.performFill(g,C),this.updateBoundingBox(t,e,g,A,I),this.labelModule.draw(g,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,A,I)}},{key:"updateBoundingBox",value:function(g,t,e,A,I){this._updateBoundingBox(g,t,e,A,I);var C=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(C)}},{key:"distanceToBorder",value:function(g,t){g&&this.resize(g);var e=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+e}}]),e}(Da);function Za(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var Ma=function(g){_r(e,g);var t=Za(e);function e(g,A,I){var C;return gr(this,e),(C=t.call(this,g,A,I)).labelOffset=0,C.selected=!1,C}return er(e,[{key:"setOptions",value:function(g,t,e){this.options=g,void 0===t&&void 0===e||this.setImages(t,e)}},{key:"setImages",value:function(g,t){t&&this.selected?(this.imageObj=t,this.imageObjAlt=g):(this.imageObj=g,this.imageObjAlt=t)}},{key:"switchImages",value:function(g){var t=g&&!this.selected||!g&&this.selected;if(this.selected=g,void 0!==this.imageObjAlt&&t){var e=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=e}}},{key:"_getImagePadding",value:function(){var g={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){var t=this.options.imagePadding;"object"==dC(t)?(g.top=t.top,g.right=t.right,g.bottom=t.bottom,g.left=t.left):(g.top=t,g.right=t,g.bottom=t,g.left=t)}return g}},{key:"_resizeImage",value:function(){var g,t;if(!1===this.options.shapeProperties.useImageSize){var e=1,A=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?e=this.imageObj.width/this.imageObj.height:A=this.imageObj.height/this.imageObj.width),g=2*this.options.size*e,t=2*this.options.size*A}else{var I=this._getImagePadding();g=this.imageObj.width+I.left+I.right,t=this.imageObj.height+I.top+I.bottom}this.width=g,this.height=t,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(g,t,e,A){this.initContextForDraw(g,A),tg(g,t,e,A.size),this.performFill(g,A)}},{key:"_drawImageAtPosition",value:function(g,t){if(0!=this.imageObj.width){g.globalAlpha=void 0!==t.opacity?t.opacity:1,this.enableShadow(g,t);var e=1;!0===this.options.shapeProperties.interpolation&&(e=this.imageObj.width/this.width/this.body.view.scale);var A=this._getImagePadding(),I=this.left+A.left,C=this.top+A.top,i=this.width-A.left-A.right,n=this.height-A.top-A.bottom;this.imageObj.drawImageAtPosition(g,e,I,C,i,n),this.disableShadow(g,t)}}},{key:"_drawImageLabel",value:function(g,t,e,A,I){var C,i=0;if(void 0!==this.height){i=.5*this.height;var n=this.labelModule.getTextSize(g,A,I);n.lineCount>=1&&(i+=n.height/2)}C=e+i,this.options.label&&(this.labelOffset=i),this.labelModule.draw(g,t,C,A,I,"hanging")}}]),e}(Da);function Ea(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var Ga=function(g){_r(e,g);var t=Ea(e);function e(g,A,I){var C;return gr(this,e),(C=t.call(this,g,A,I))._setMargins(I),C}return er(e,[{key:"resize",value:function(g){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(t,e)){var A=this.getDimensionsFromLabel(g,t,e),I=Math.max(A.width+this.margin.right+this.margin.left,A.height+this.margin.top+this.margin.bottom);this.options.size=I/2,this.width=I,this.height=I,this.radius=this.width/2}}},{key:"draw",value:function(g,t,e,A,I,C){this.resize(g,A,I),this.left=t-this.width/2,this.top=e-this.height/2,this._drawRawCircle(g,t,e,C),this.updateBoundingBox(t,e),this.labelModule.draw(g,this.left+this.textSize.width/2+this.margin.left,e,A,I)}},{key:"updateBoundingBox",value:function(g,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=g-this.options.size,this.boundingBox.right=g+this.options.size,this.boundingBox.bottom=t+this.options.size}},{key:"distanceToBorder",value:function(g,t){return g&&this.resize(g),.5*this.width}}]),e}(Ma);function Ta(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var Ba=function(g){_r(e,g);var t=Ta(e);function e(g,A,I,C,i){var n;return gr(this,e),(n=t.call(this,g,A,I)).setImages(C,i),n}return er(e,[{key:"resize",value:function(g){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover,A=void 0===this.imageObj.src||void 0===this.imageObj.width||void 0===this.imageObj.height;if(A){var I=2*this.options.size;return this.width=I,this.height=I,void(this.radius=.5*this.width)}this.needsRefresh(t,e)&&this._resizeImage()}},{key:"draw",value:function(g,t,e,A,I,C){this.switchImages(A),this.resize(),this.left=t-this.width/2,this.top=e-this.height/2,this._drawRawCircle(g,t,e,C),g.save(),g.clip(),this._drawImageAtPosition(g,C),g.restore(),this._drawImageLabel(g,t,e,A,I),this.updateBoundingBox(t,e)}},{key:"updateBoundingBox",value:function(g,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=g-this.options.size,this.boundingBox.right=g+this.options.size,this.boundingBox.bottom=t+this.options.size,this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}},{key:"distanceToBorder",value:function(g,t){return g&&this.resize(g),.5*this.width}}]),e}(Ma);function Ra(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var Fa=function(g){_r(e,g);var t=Ra(e);function e(g,A,I){var C;return gr(this,e),(C=t.call(this,g,A,I))._setMargins(I),C}return er(e,[{key:"resize",value:function(g,t,e){if(this.needsRefresh(t,e)){var A=this.getDimensionsFromLabel(g,t,e).width+this.margin.right+this.margin.left;this.width=A,this.height=A,this.radius=this.width/2}}},{key:"draw",value:function(g,t,e,A,I,C){this.resize(g,A,I),this.left=t-this.width/2,this.top=e-this.height/2,this.initContextForDraw(g,C),Ig(g,t-this.width/2,e-this.height/2,this.width,this.height),this.performFill(g,C),this.updateBoundingBox(t,e,g,A,I),this.labelModule.draw(g,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,A,I)}},{key:"distanceToBorder",value:function(g,t){return this._distanceToBorder(g,t)}}]),e}(Da);function Sa(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var La=function(g){_r(e,g);var t=Sa(e);function e(g,A,I){return gr(this,e),t.call(this,g,A,I)}return er(e,[{key:"resize",value:function(g){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover,A=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{size:this.options.size};if(this.needsRefresh(t,e)){this.labelModule.getTextSize(g,t,e);var I=2*A.size;this.width=I,this.height=I,this.radius=.5*this.width}}},{key:"_drawShape",value:function(g,t,e,A,I,C,i,n){var o;if(this.resize(g,C,i,n),this.left=A-this.width/2,this.top=I-this.height/2,this.initContextForDraw(g,n),(o=t,Object.prototype.hasOwnProperty.call(ig,o)?ig[o]:function(g){for(var t=arguments.length,e=new Array(t>1?t-1:0),A=1;A<t;A++)e[A-1]=arguments[A];CanvasRenderingContext2D.prototype[o].call(g,e)})(g,A,I,n.size),this.performFill(g,n),void 0!==this.options.icon&&void 0!==this.options.icon.code&&(g.font=(C?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),g.fillStyle=this.options.icon.color||"black",g.textAlign="center",g.textBaseline="middle",g.fillText(this.options.icon.code,A,I)),void 0!==this.options.label){this.labelModule.calculateLabelSize(g,C,i,A,I,"hanging");var r=I+.5*this.height+.5*this.labelModule.size.height;this.labelModule.draw(g,A,r,C,i,"hanging")}this.updateBoundingBox(A,I)}},{key:"updateBoundingBox",value:function(g,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=g-this.options.size,this.boundingBox.right=g+this.options.size,this.boundingBox.bottom=t+this.options.size,void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}]),e}(Da);function Qa(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var Ya=function(g){_r(e,g);var t=Qa(e);function e(g,A,I){return gr(this,e),t.call(this,g,A,I)}return er(e,[{key:"draw",value:function(g,t,e,A,I,C){this._drawShape(g,"diamond",4,t,e,A,I,C)}},{key:"distanceToBorder",value:function(g,t){return this._distanceToBorder(g,t)}}]),e}(La);function Wa(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var za=function(g){_r(e,g);var t=Wa(e);function e(g,A,I){return gr(this,e),t.call(this,g,A,I)}return er(e,[{key:"draw",value:function(g,t,e,A,I,C){this._drawShape(g,"circle",2,t,e,A,I,C)}},{key:"distanceToBorder",value:function(g,t){return g&&this.resize(g),this.options.size}}]),e}(La);function Pa(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var ja=function(g){_r(e,g);var t=Pa(e);function e(g,A,I){return gr(this,e),t.call(this,g,A,I)}return er(e,[{key:"resize",value:function(g){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(t,e)){var A=this.getDimensionsFromLabel(g,t,e);this.height=2*A.height,this.width=A.width+A.height,this.radius=.5*this.width}}},{key:"draw",value:function(g,t,e,A,I,C){this.resize(g,A,I),this.left=t-.5*this.width,this.top=e-.5*this.height,this.initContextForDraw(g,C),Ag(g,this.left,this.top,this.width,this.height),this.performFill(g,C),this.updateBoundingBox(t,e,g,A,I),this.labelModule.draw(g,t,e,A,I)}},{key:"distanceToBorder",value:function(g,t){g&&this.resize(g);var e=.5*this.width,A=.5*this.height,I=Math.sin(t)*e,C=Math.cos(t)*A;return e*A/Math.sqrt(I*I+C*C)}}]),e}(Da);function Va(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var Xa=function(g){_r(e,g);var t=Va(e);function e(g,A,I){var C;return gr(this,e),(C=t.call(this,g,A,I))._setMargins(I),C}return er(e,[{key:"resize",value:function(g,t,e){this.needsRefresh(t,e)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(g,t,e,A,I,C){if(this.resize(g,A,I),this.options.icon.size=this.options.icon.size||50,this.left=t-this.width/2,this.top=e-this.height/2,this._icon(g,t,e,A,I,C),void 0!==this.options.label){this.labelModule.draw(g,this.left+this.iconSize.width/2+this.margin.left,e+this.height/2+5,A)}this.updateBoundingBox(t,e)}},{key:"updateBoundingBox",value:function(g,t){if(this.boundingBox.top=t-.5*this.options.icon.size,this.boundingBox.left=g-.5*this.options.icon.size,this.boundingBox.right=g+.5*this.options.icon.size,this.boundingBox.bottom=t+.5*this.options.icon.size,void 0!==this.options.label&&this.labelModule.size.width>0){this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+5)}}},{key:"_icon",value:function(g,t,e,A,I,C){var i=Number(this.options.icon.size);void 0!==this.options.icon.code?(g.font=[null!=this.options.icon.weight?this.options.icon.weight:A?"bold":"",(null!=this.options.icon.weight&&A?5:0)+i+"px",this.options.icon.face].join(" "),g.fillStyle=this.options.icon.color||"black",g.textAlign="center",g.textBaseline="middle",this.enableShadow(g,C),g.fillText(this.options.icon.code,t,e),this.disableShadow(g,C)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(g,t){return this._distanceToBorder(g,t)}}]),e}(Da);function Ua(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var _a=function(g){_r(e,g);var t=Ua(e);function e(g,A,I,C,i){var n;return gr(this,e),(n=t.call(this,g,A,I)).setImages(C,i),n}return er(e,[{key:"resize",value:function(g){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover,A=void 0===this.imageObj.src||void 0===this.imageObj.width||void 0===this.imageObj.height;if(A){var I=2*this.options.size;return this.width=I,void(this.height=I)}this.needsRefresh(t,e)&&this._resizeImage()}},{key:"draw",value:function(g,t,e,A,I,C){if(g.save(),this.switchImages(A),this.resize(),this.left=t-this.width/2,this.top=e-this.height/2,!0===this.options.shapeProperties.useBorderWithImage){var i=this.options.borderWidth,n=this.options.borderWidthSelected||2*this.options.borderWidth,o=(A?n:i)/this.body.view.scale;g.lineWidth=Math.min(this.width,o),g.beginPath();var r=A?this.options.color.highlight.border:I?this.options.color.hover.border:this.options.color.border,s=A?this.options.color.highlight.background:I?this.options.color.hover.background:this.options.color.background;void 0!==C.opacity&&(r=KC(r,C.opacity),s=KC(s,C.opacity)),g.strokeStyle=r,g.fillStyle=s,g.rect(this.left-.5*g.lineWidth,this.top-.5*g.lineWidth,this.width+g.lineWidth,this.height+g.lineWidth),ka(g).call(g),this.performStroke(g,C),g.closePath()}this._drawImageAtPosition(g,C),this._drawImageLabel(g,t,e,A,I),this.updateBoundingBox(t,e),g.restore()}},{key:"updateBoundingBox",value:function(g,t){this.resize(),this._updateBoundingBox(g,t),void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder",value:function(g,t){return this._distanceToBorder(g,t)}}]),e}(Ma);function Ha(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var Ja=function(g){_r(e,g);var t=Ha(e);function e(g,A,I){return gr(this,e),t.call(this,g,A,I)}return er(e,[{key:"draw",value:function(g,t,e,A,I,C){this._drawShape(g,"square",2,t,e,A,I,C)}},{key:"distanceToBorder",value:function(g,t){return this._distanceToBorder(g,t)}}]),e}(La);function Ka(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var qa=function(g){_r(e,g);var t=Ka(e);function e(g,A,I){return gr(this,e),t.call(this,g,A,I)}return er(e,[{key:"draw",value:function(g,t,e,A,I,C){this._drawShape(g,"hexagon",4,t,e,A,I,C)}},{key:"distanceToBorder",value:function(g,t){return this._distanceToBorder(g,t)}}]),e}(La);function $a(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var gd=function(g){_r(e,g);var t=$a(e);function e(g,A,I){return gr(this,e),t.call(this,g,A,I)}return er(e,[{key:"draw",value:function(g,t,e,A,I,C){this._drawShape(g,"star",4,t,e,A,I,C)}},{key:"distanceToBorder",value:function(g,t){return this._distanceToBorder(g,t)}}]),e}(La);function td(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var ed=function(g){_r(e,g);var t=td(e);function e(g,A,I){var C;return gr(this,e),(C=t.call(this,g,A,I))._setMargins(I),C}return er(e,[{key:"resize",value:function(g,t,e){this.needsRefresh(t,e)&&(this.textSize=this.labelModule.getTextSize(g,t,e),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(g,t,e,A,I,C){this.resize(g,A,I),this.left=t-this.width/2,this.top=e-this.height/2,this.enableShadow(g,C),this.labelModule.draw(g,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,A,I),this.disableShadow(g,C),this.updateBoundingBox(t,e,g,A,I)}},{key:"distanceToBorder",value:function(g,t){return this._distanceToBorder(g,t)}}]),e}(Da);function Ad(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var Id=function(g){_r(e,g);var t=Ad(e);function e(g,A,I){return gr(this,e),t.call(this,g,A,I)}return er(e,[{key:"draw",value:function(g,t,e,A,I,C){this._drawShape(g,"triangle",3,t,e,A,I,C)}},{key:"distanceToBorder",value:function(g,t){return this._distanceToBorder(g,t)}}]),e}(La);function Cd(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var id,nd=function(g){_r(e,g);var t=Cd(e);function e(g,A,I){return gr(this,e),t.call(this,g,A,I)}return er(e,[{key:"draw",value:function(g,t,e,A,I,C){this._drawShape(g,"triangleDown",3,t,e,A,I,C)}},{key:"distanceToBorder",value:function(g,t){return this._distanceToBorder(g,t)}}]),e}(La),od=!1,rd="background: #FFeeee; color: #dd0000",sd=function(){function g(){gr(this,g)}return er(g,null,[{key:"validate",value:function(t,e,A){od=!1,id=e;var I=e;return void 0!==A&&(I=e[A]),g.parse(t,I,[]),od}},{key:"parse",value:function(t,e,A){for(var I in t)t.hasOwnProperty(I)&&g.check(I,t,e,A)}},{key:"check",value:function(t,e,A,I){if(void 0!==A[t]||void 0!==A.__any__){var C=t,i=!0;void 0===A[t]&&void 0!==A.__any__&&(C="__any__",i="object"===g.getType(e[t]));var n=A[C];i&&void 0!==n.__type__&&(n=n.__type__),g.checkFields(t,e,A,C,n,I)}else g.getSuggestion(t,A,I)}},{key:"checkFields",value:function(t,e,A,I,C,i){var n=function(e){console.log("%c"+e+g.printLocation(i,t),rd)},o=g.getType(e[t]),r=C[o];void 0!==r?"array"===g.getType(r)&&-1===IC(r).call(r,e[t])?(n('Invalid option detected in "'+t+'". Allowed values are:'+g.print(r)+' not "'+e[t]+'". '),od=!0):"object"===o&&"__any__"!==I&&(i=WC(i,t),g.parse(e[t],A[I],i)):void 0===C.any&&(n('Invalid type received for "'+t+'". Expected: '+g.print(GA(C))+". Received ["+o+'] "'+e[t]+'"'),od=!0)}},{key:"getType",value:function(g){var t=dC(g);return"object"===t?null===g?"null":g instanceof Boolean?"boolean":g instanceof Number?"number":g instanceof String?"string":CC(g)?"array":g instanceof Date?"date":void 0!==g.nodeType?"dom":!0===g._isAMomentObject?"moment":"object":"number"===t?"number":"boolean"===t?"boolean":"string"===t?"string":void 0===t?"undefined":t}},{key:"getSuggestion",value:function(t,e,A){var I,C=g.findInOptions(t,e,A,!1),i=g.findInOptions(t,id,[],!0);I=void 0!==C.indexMatch?" in "+g.printLocation(C.path,t,"")+'Perhaps it was incomplete? Did you mean: "'+C.indexMatch+'"?\n\n':i.distance<=4&&C.distance>i.distance?" in "+g.printLocation(C.path,t,"")+"Perhaps it was misplaced? Matching option found at: "+g.printLocation(i.path,i.closestMatch,""):C.distance<=8?'. Did you mean "'+C.closestMatch+'"?'+g.printLocation(C.path,t):". Did you mean one of these: "+g.print(GA(e))+g.printLocation(A,t),console.log('%cUnknown option detected: "'+t+'"'+I,rd),od=!0}},{key:"findInOptions",value:function(t,e,A){var I=arguments.length>3&&void 0!==arguments[3]&&arguments[3],C=1e9,i="",n=[],o=t.toLowerCase(),r=void 0;for(var s in e){var a=void 0;if(void 0!==e[s].__type__&&!0===I){var d=g.findInOptions(t,e[s],WC(A,s));C>d.distance&&(i=d.closestMatch,n=d.path,C=d.distance,r=d.indexMatch)}else{var l;-1!==IC(l=s.toLowerCase()).call(l,o)&&(r=s),C>(a=g.levenshteinDistance(t,s))&&(i=s,n=zC(A),C=a)}}return{closestMatch:i,path:n,distance:C,indexMatch:r}}},{key:"printLocation",value:function(g,t){for(var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n",A="\n\n"+e+"options = {\n",I=0;I<g.length;I++){for(var C=0;C<I+1;C++)A+="  ";A+=g[I]+": {\n"}for(var i=0;i<g.length+1;i++)A+="  ";A+=t+"\n";for(var n=0;n<g.length+1;n++){for(var o=0;o<g.length-n;o++)A+="  ";A+="}\n"}return A+"\n\n"}},{key:"print",value:function(g){return Fr(g).replace(/(\")|(\[)|(\])|(,"__type__")/g,"").replace(/(\,)/g,", ")}},{key:"levenshteinDistance",value:function(g,t){if(0===g.length)return t.length;if(0===t.length)return g.length;var e,A,I=[];for(e=0;e<=t.length;e++)I[e]=[e];for(A=0;A<=g.length;A++)I[0][A]=A;for(e=1;e<=t.length;e++)for(A=1;A<=g.length;A++)t.charAt(e-1)==g.charAt(A-1)?I[e][A]=I[e-1][A-1]:I[e][A]=Math.min(I[e-1][A-1]+1,Math.min(I[e][A-1]+1,I[e-1][A]+1));return I[t.length][g.length]}}]),g}();function ad(g,t){var e=GA(g);if(xA){var A=xA(g);t&&(A=bI(A).call(A,(function(t){return wA(g,t).enumerable}))),e.push.apply(e,A)}return e}function dd(g){for(var t=1;t<arguments.length;t++){var e,A=null!=arguments[t]?arguments[t]:{};if(t%2)tI(e=ad(Object(A),!0)).call(e,(function(t){ZA(g,t,A[t])}));else if(vA)fA(g,vA(A));else{var I;tI(I=ad(Object(A))).call(I,(function(t){uA(g,t,wA(A,t))}))}}return g}var ld=function(){function g(t,e,A,I,C,i){gr(this,g),this.options=ri(C),this.globalOptions=C,this.defaultOptions=i,this.body=e,this.edges=[],this.id=void 0,this.imagelist=A,this.grouplist=I,this.x=void 0,this.y=void 0,this.baseSize=this.options.size,this.baseFontSize=this.options.font.size,this.predefinedPosition=!1,this.selected=!1,this.hover=!1,this.labelModule=new ba(this.body,this.options,!1),this.setOptions(t)}return er(g,[{key:"attachEdge",value:function(g){var t;-1===IC(t=this.edges).call(t,g)&&this.edges.push(g)}},{key:"detachEdge",value:function(g){var t,e,A=IC(t=this.edges).call(t,g);-1!=A&&yi(e=this.edges).call(e,A,1)}},{key:"setOptions",value:function(t){var e=this.options.shape;if(t){if(void 0!==t.color&&(this._localColor=t.color),void 0!==t.id&&(this.id=t.id),void 0===this.id)throw new Error("Node must have an id");g.checkMass(t,this.id),void 0!==t.x&&(null===t.x?(this.x=void 0,this.predefinedPosition=!1):(this.x=dI(t.x),this.predefinedPosition=!0)),void 0!==t.y&&(null===t.y?(this.y=void 0,this.predefinedPosition=!1):(this.y=dI(t.y),this.predefinedPosition=!0)),void 0!==t.size&&(this.baseSize=t.size),void 0!==t.value&&(t.value=ca(t.value)),g.parseOptions(this.options,t,!0,this.globalOptions,this.grouplist);var A=[t,this.options,this.defaultOptions];return this.chooser=ua.choosify("node",A),this._load_images(),this.updateLabelModule(t),void 0!==t.opacity&&g.checkOpacity(t.opacity)&&(this.options.opacity=t.opacity),this.updateShape(e),void 0!==t.hidden||void 0!==t.physics}}},{key:"_load_images",value:function(){if(("circularImage"===this.options.shape||"image"===this.options.shape)&&void 0===this.options.image)throw new Error("Option image must be defined for node type '"+this.options.shape+"'");if(void 0!==this.options.image){if(void 0===this.imagelist)throw new Error("Internal Error: No images provided");if("string"==typeof this.options.image)this.imageObj=this.imagelist.load(this.options.image,this.options.brokenImage,this.id);else{if(void 0===this.options.image.unselected)throw new Error("No unselected image provided");this.imageObj=this.imagelist.load(this.options.image.unselected,this.options.brokenImage,this.id),void 0!==this.options.image.selected?this.imageObjAlt=this.imagelist.load(this.options.image.selected,this.options.brokenImage,this.id):this.imageObjAlt=void 0}}}},{key:"getFormattingValues",value:function(){var g={color:this.options.color.background,opacity:this.options.opacity,borderWidth:this.options.borderWidth,borderColor:this.options.color.border,size:this.options.size,borderDashes:this.options.shapeProperties.borderDashes,borderRadius:this.options.shapeProperties.borderRadius,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y};if(this.selected||this.hover?!0===this.chooser?this.selected?(g.borderWidth*=2,g.color=this.options.color.highlight.background,g.borderColor=this.options.color.highlight.border,g.shadow=this.options.shadow.enabled):this.hover&&(g.color=this.options.color.hover.background,g.borderColor=this.options.color.hover.border,g.shadow=this.options.shadow.enabled):"function"==typeof this.chooser&&(this.chooser(g,this.options.id,this.selected,this.hover),!1===g.shadow&&(g.shadowColor===this.options.shadow.color&&g.shadowSize===this.options.shadow.size&&g.shadowX===this.options.shadow.x&&g.shadowY===this.options.shadow.y||(g.shadow=!0))):g.shadow=this.options.shadow.enabled,void 0!==this.options.opacity){var t=this.options.opacity;g.borderColor=KC(g.borderColor,t),g.color=KC(g.color,t),g.shadowColor=KC(g.shadowColor,t)}return g}},{key:"updateLabelModule",value:function(t){void 0!==this.options.label&&null!==this.options.label||(this.options.label=""),g.updateGroupOptions(this.options,dd(dd({},t),{},{color:t&&t.color||this._localColor||void 0}),this.grouplist);var e=this.grouplist.get(this.options.group,!1),A=[t,this.options,e,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,A),void 0!==this.labelModule.baseSize&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateShape",value:function(g){if(g===this.options.shape&&this.shape)this.shape.setOptions(this.options,this.imageObj,this.imageObjAlt);else switch(this.options.shape){case"box":this.shape=new Na(this.options,this.body,this.labelModule);break;case"circle":this.shape=new Ga(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new Ba(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"database":this.shape=new Fa(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new Ya(this.options,this.body,this.labelModule);break;case"dot":this.shape=new za(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new ja(this.options,this.body,this.labelModule);break;case"icon":this.shape=new Xa(this.options,this.body,this.labelModule);break;case"image":this.shape=new _a(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new Ja(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new qa(this.options,this.body,this.labelModule);break;case"star":this.shape=new gd(this.options,this.body,this.labelModule);break;case"text":this.shape=new ed(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new Id(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new nd(this.options,this.body,this.labelModule);break;default:this.shape=new ja(this.options,this.body,this.labelModule)}this.needsRefresh()}},{key:"select",value:function(){this.selected=!0,this.needsRefresh()}},{key:"unselect",value:function(){this.selected=!1,this.needsRefresh()}},{key:"needsRefresh",value:function(){this.shape.refreshNeeded=!0}},{key:"getTitle",value:function(){return this.options.title}},{key:"distanceToBorder",value:function(g,t){return this.shape.distanceToBorder(g,t)}},{key:"isFixed",value:function(){return this.options.fixed.x&&this.options.fixed.y}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"getLabelSize",value:function(){return this.labelModule.size()}},{key:"setValueRange",value:function(g,t,e){if(void 0!==this.options.value){var A=this.options.scaling.customScalingFunction(g,t,e,this.options.value),I=this.options.scaling.max-this.options.scaling.min;if(!0===this.options.scaling.label.enabled){var C=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+A*C}this.options.size=this.options.scaling.min+A*I}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}},{key:"draw",value:function(g){var t=this.getFormattingValues();this.shape.draw(g,this.x,this.y,this.selected,this.hover,t)}},{key:"updateBoundingBox",value:function(g){this.shape.updateBoundingBox(this.x,this.y,g)}},{key:"resize",value:function(g){var t=this.getFormattingValues();this.shape.resize(g,this.selected,this.hover,t)}},{key:"getItemsOnPoint",value:function(g){var t=[];return this.labelModule.visible()&&ua.pointInRect(this.labelModule.getSize(),g)&&t.push({nodeId:this.id,labelId:0}),ua.pointInRect(this.shape.boundingBox,g)&&t.push({nodeId:this.id}),t}},{key:"isOverlappingWith",value:function(g){return this.shape.left<g.right&&this.shape.left+this.shape.width>g.left&&this.shape.top<g.bottom&&this.shape.top+this.shape.height>g.top}},{key:"isBoundingBoxOverlappingWith",value:function(g){return this.shape.boundingBox.left<g.right&&this.shape.boundingBox.right>g.left&&this.shape.boundingBox.top<g.bottom&&this.shape.boundingBox.bottom>g.top}}],[{key:"checkOpacity",value:function(g){return 0<=g&&g<=1}},{key:"updateGroupOptions",value:function(t,e,A){var I;if(void 0!==A){var C=t.group;if(void 0!==e&&void 0!==e.group&&C!==e.group)throw new Error("updateGroupOptions: group values in options don't match.");if("number"==typeof C||"string"==typeof C&&""!=C){var i=A.get(C);void 0!==i.opacity&&void 0===e.opacity&&(g.checkOpacity(i.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+i.opacity),i.opacity=void 0));var n=bI(I=aa(e)).call(I,(function(g){return null!=e[g]}));n.push("font"),LC(n,t,i),t.color=$C(t.color)}}}},{key:"parseOptions",value:function(t,e){var A=arguments.length>2&&void 0!==arguments[2]&&arguments[2],I=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},C=arguments.length>4?arguments[4]:void 0,i=["color","fixed","shadow"];if(LC(i,t,e,A),g.checkMass(e),void 0!==t.opacity&&(g.checkOpacity(t.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+t.opacity),t.opacity=void 0)),void 0!==e.opacity&&(g.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),si(t,e,"shadow",I),void 0!==e.color&&null!==e.color){var n=$C(e.color);RC(t.color,n)}else!0===A&&null===e.color&&(t.color=ri(I.color));void 0!==e.fixed&&null!==e.fixed&&("boolean"==typeof e.fixed?(t.fixed.x=e.fixed,t.fixed.y=e.fixed):(void 0!==e.fixed.x&&"boolean"==typeof e.fixed.x&&(t.fixed.x=e.fixed.x),void 0!==e.fixed.y&&"boolean"==typeof e.fixed.y&&(t.fixed.y=e.fixed.y))),!0===A&&null===e.font&&(t.font=ri(I.font)),g.updateGroupOptions(t,e,C),void 0!==e.scaling&&si(t.scaling,e.scaling,"label",I.scaling)}},{key:"checkMass",value:function(g,t){if(void 0!==g.mass&&g.mass<=0){var e="";void 0!==t&&(e=" in node id: "+t),console.log("%cNegative or zero mass disallowed"+e+", setting mass to 1.",rd),g.mass=1}}}]),g}();function hd(g){if(void 0===AA||null==Jt(g)){if(CC(g)||(g=function(g,t){var e;if(!g)return;if("string"==typeof g)return cd(g,t);var A=UI(e=Object.prototype.toString.call(g)).call(e,8,-1);"Object"===A&&g.constructor&&(A=g.constructor.name);if("Map"===A||"Set"===A)return hA(g);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return cd(g,t)}(g))){var t=0,e=function(){};return{s:e,n:function(){return t>=g.length?{done:!0}:{done:!1,value:g[t++]}},e:function(g){throw g},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var A,I,C=!0,i=!1;return{s:function(){A=Ht(g)},n:function(){var g=A.next();return C=g.done,g},e:function(g){i=!0,I=g},f:function(){try{C||null==A.return||A.return()}finally{if(i)throw I}}}}function cd(g,t){(null==t||t>g.length)&&(t=g.length);for(var e=0,A=new Array(t);e<t;e++)A[e]=g[e];return A}var ud=function(){function g(t,e,A,I){var C,i=this;if(gr(this,g),this.body=t,this.images=e,this.groups=A,this.layoutEngine=I,this.body.functions.createNode=gg(C=this.create).call(C,this),this.nodesListeners={add:function(g,t){i.add(t.items)},update:function(g,t){i.update(t.items,t.data,t.oldData)},remove:function(g,t){i.remove(t.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:2,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},opacity:void 0,fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"center",vadjust:0,multi:!1,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"monospace",vadjust:2}},group:void 0,hidden:!1,icon:{face:"FontAwesome",code:void 0,size:50,color:"#2B7CE9"},image:void 0,imagePadding:{top:0,right:0,bottom:0,left:0},label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(g,t,e,A){if(t===g)return.5;var I=1/(t-g);return Math.max(0,(A-g)*I)}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=ri(this.defaultOptions),this.bindEventListeners()}return er(g,[{key:"bindEventListeners",value:function(){var g,t,e=this;this.body.emitter.on("refreshNodes",gg(g=this.refresh).call(g,this)),this.body.emitter.on("refresh",gg(t=this.refresh).call(t,this)),this.body.emitter.on("destroy",(function(){VC(e.nodesListeners,(function(g,t){e.body.data.nodes&&e.body.data.nodes.off(t,g)})),delete e.body.functions.createNode,delete e.nodesListeners.add,delete e.nodesListeners.update,delete e.nodesListeners.remove,delete e.nodesListeners}))}},{key:"setOptions",value:function(g){if(void 0!==g){if(ld.parseOptions(this.options,g),void 0!==g.opacity&&(vr(g.opacity)||!pr(g.opacity)||g.opacity<0||g.opacity>1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+g.opacity):this.options.opacity=g.opacity),void 0!==g.shape)for(var t in this.body.nodes)this.body.nodes.hasOwnProperty(t)&&this.body.nodes[t].updateShape();if(void 0!==g.font||void 0!==g.widthConstraint||void 0!==g.heightConstraint)for(var e=0,A=GA(this.body.nodes);e<A.length;e++){var I=A[e];this.body.nodes[I].updateLabelModule(),this.body.nodes[I].needsRefresh()}if(void 0!==g.size)for(var C in this.body.nodes)this.body.nodes.hasOwnProperty(C)&&this.body.nodes[C].needsRefresh();void 0===g.hidden&&void 0===g.physics||this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(g){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=this.body.data.nodes;if(g instanceof Ca||g instanceof ia)this.body.data.nodes=g;else if(CC(g))this.body.data.nodes=new Ca,this.body.data.nodes.add(g);else{if(g)throw new TypeError("Array or DataSet expected");this.body.data.nodes=new Ca}if(e&&VC(this.nodesListeners,(function(g,t){e.off(t,g)})),this.body.nodes={},this.body.data.nodes){var A=this;VC(this.nodesListeners,(function(g,t){A.body.data.nodes.on(t,g)}));var I=this.body.data.nodes.getIds();this.add(I,!0)}!1===t&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(g){for(var t,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],A=[],I=0;I<g.length;I++){t=g[I];var C=this.body.data.nodes.get(t),i=this.create(C);A.push(i),this.body.nodes[t]=i}this.layoutEngine.positionInitially(A),!1===e&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(g,t,e){for(var A=this.body.nodes,I=!1,C=0;C<g.length;C++){var i=g[C],n=A[i],o=t[C];void 0!==n?n.setOptions(o)&&(I=!0):(I=!0,n=this.create(o),A[i]=n)}I||void 0===e||(I=cr(t).call(t,(function(g,t){var A=e[t];return A&&A.level!==g.level}))),!0===I?this.body.emitter.emit("_dataChanged"):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(g){for(var t=this.body.nodes,e=0;e<g.length;e++){delete t[g[e]]}this.body.emitter.emit("_dataChanged")}},{key:"create",value:function(g){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ld;return new t(g,this.body,this.images,this.groups,this.options,this.defaultOptions)}},{key:"refresh",value:function(){var g=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];VC(this.body.nodes,(function(e,A){var I=g.body.data.nodes.get(A);void 0!==I&&(!0===t&&e.setOptions({x:null,y:null}),e.setOptions({fixed:!1}),e.setOptions(I))}))}},{key:"getPositions",value:function(g){var t={};if(void 0!==g){if(!0===CC(g)){for(var e=0;e<g.length;e++)if(void 0!==this.body.nodes[g[e]]){var A=this.body.nodes[g[e]];t[g[e]]={x:Math.round(A.x),y:Math.round(A.y)}}}else if(void 0!==this.body.nodes[g]){var I=this.body.nodes[g];t[g]={x:Math.round(I.x),y:Math.round(I.y)}}}else for(var C=0;C<this.body.nodeIndices.length;C++){var i=this.body.nodes[this.body.nodeIndices[C]];t[this.body.nodeIndices[C]]={x:Math.round(i.x),y:Math.round(i.y)}}return t}},{key:"getPosition",value:function(g){if(null==g)throw new TypeError("No id was specified for getPosition method.");if(null==this.body.nodes[g])throw new ReferenceError("NodeId provided for getPosition does not exist. Provided: ".concat(g));return{x:Math.round(this.body.nodes[g].x),y:Math.round(this.body.nodes[g].y)}}},{key:"storePositions",value:function(){var g,t=[],e=this.body.data.nodes.getDataSet(),A=hd(e.get());try{for(A.s();!(g=A.n()).done;){var I=g.value,C=I.id,i=this.body.nodes[C],n=Math.round(i.x),o=Math.round(i.y);I.x===n&&I.y===o||t.push({id:C,x:n,y:o})}}catch(g){A.e(g)}finally{A.f()}e.update(t)}},{key:"getBoundingBox",value:function(g){if(void 0!==this.body.nodes[g])return this.body.nodes[g].shape.boundingBox}},{key:"getConnectedNodes",value:function(g,t){var e=[];if(void 0!==this.body.nodes[g])for(var A=this.body.nodes[g],I={},C=0;C<A.edges.length;C++){var i=A.edges[C];"to"!==t&&i.toId==A.id?void 0===I[i.fromId]&&(e.push(i.fromId),I[i.fromId]=!0):"from"!==t&&i.fromId==A.id&&void 0===I[i.toId]&&(e.push(i.toId),I[i.toId]=!0)}return e}},{key:"getConnectedEdges",value:function(g){var t=[];if(void 0!==this.body.nodes[g])for(var e=this.body.nodes[g],A=0;A<e.edges.length;A++)t.push(e.edges[A].id);else console.log("NodeId provided for getConnectedEdges does not exist. Provided: ",g);return t}},{key:"moveNode",value:function(g,t,e){var A=this;void 0!==this.body.nodes[g]?(this.body.nodes[g].x=Number(t),this.body.nodes[g].y=Number(e),rr((function(){A.body.emitter.emit("startSimulation")}),0)):console.log("Node id supplied to moveNode does not exist. Provided: ",g)}}]),g}(),fd=bA;X({target:"Reflect",stat:!0},{get:function g(t,e){var A,I,C=arguments.length<3?t:arguments[2];return Y(t)===C?t[e]:(A=Z.f(t,e))?w(A,"value")?A.value:void 0===A.get?void 0:A.get.call(C):y(I=Lg(t))?g(I,e,C):void 0}});var pd=S.Reflect.get;var vd=function(g,t){for(;!Object.prototype.hasOwnProperty.call(g,t)&&null!==(g=Kr(g)););return g},yd=A((function(g){function t(e,A,I){return"undefined"!=typeof Reflect&&pd?g.exports=t=pd:g.exports=t=function(g,t,e){var A=vd(g,t);if(A){var I=fd(A,t);return I.get?I.get.call(e):I.value}},t(e,A,I||e)}g.exports=t})),md=Math.hypot,bd=Math.abs,wd=Math.sqrt,xd=!!md&&md(1/0,NaN)!==1/0;X({target:"Math",stat:!0,forced:xd},{hypot:function(g,t){for(var e,A,I=0,C=0,i=arguments.length,n=0;C<i;)n<(e=bd(arguments[C++]))?(I=I*(A=n/e)*A+1,n=e):I+=e>0?(A=e/n)*A:e;return n===1/0?1/0:n*wd(I)}});var kd=S.Math.hypot;function Dd(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var Od=function(){function g(){gr(this,g)}return er(g,null,[{key:"transform",value:function(g,t){CC(g)||(g=[g]);for(var e=t.point.x,A=t.point.y,I=t.angle,C=t.length,i=0;i<g.length;++i){var n=g[i],o=n.x*Math.cos(I)-n.y*Math.sin(I),r=n.x*Math.sin(I)+n.y*Math.cos(I);n.x=e+C*o,n.y=A+C*r}}},{key:"drawPath",value:function(g,t){g.beginPath(),g.moveTo(t[0].x,t[0].y);for(var e=1;e<t.length;++e)g.lineTo(t[e].x,t[e].y);g.closePath()}}]),g}(),Nd=function(g){_r(e,g);var t=Dd(e);function e(){return gr(this,e),t.apply(this,arguments)}return er(e,null,[{key:"draw",value:function(g,t){if(t.image){g.save(),g.translate(t.point.x,t.point.y),g.rotate(Math.PI/2+t.angle);var e=null!=t.imageWidth?t.imageWidth:t.image.width,A=null!=t.imageHeight?t.imageHeight:t.image.height;t.image.drawImageAtPosition(g,1,-e/2,0,e,A),g.restore()}return!1}}]),e}(Od),Zd=function(g){_r(e,g);var t=Dd(e);function e(){return gr(this,e),t.apply(this,arguments)}return er(e,null,[{key:"draw",value:function(g,t){var e=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];return Od.transform(e,t),Od.drawPath(g,e),!0}}]),e}(Od),Md=function(){function g(){gr(this,g)}return er(g,null,[{key:"draw",value:function(g,t){var e=[{x:-1,y:0},{x:0,y:.3},{x:-.4,y:0},{x:0,y:-.3}];return Od.transform(e,t),Od.drawPath(g,e),!0}}]),g}(),Ed=function(){function g(){gr(this,g)}return er(g,null,[{key:"draw",value:function(g,t){var e={x:-.4,y:0};Od.transform(e,t),g.strokeStyle=g.fillStyle,g.fillStyle="rgba(0, 0, 0, 0)";var A=Math.PI,I=t.angle-A/2,C=t.angle+A/2;return g.beginPath(),g.arc(e.x,e.y,.4*t.length,I,C,!1),g.stroke(),!0}}]),g}(),Gd=function(){function g(){gr(this,g)}return er(g,null,[{key:"draw",value:function(g,t){var e={x:-.3,y:0};Od.transform(e,t),g.strokeStyle=g.fillStyle,g.fillStyle="rgba(0, 0, 0, 0)";var A=Math.PI,I=t.angle+A/2,C=t.angle+3*A/2;return g.beginPath(),g.arc(e.x,e.y,.4*t.length,I,C,!1),g.stroke(),!0}}]),g}(),Td=function(){function g(){gr(this,g)}return er(g,null,[{key:"draw",value:function(g,t){var e=[{x:.02,y:0},{x:-1,y:.3},{x:-1,y:-.3}];return Od.transform(e,t),Od.drawPath(g,e),!0}}]),g}(),Bd=function(){function g(){gr(this,g)}return er(g,null,[{key:"draw",value:function(g,t){var e=[{x:0,y:.3},{x:0,y:-.3},{x:-1,y:0}];return Od.transform(e,t),Od.drawPath(g,e),!0}}]),g}(),Rd=function(){function g(){gr(this,g)}return er(g,null,[{key:"draw",value:function(g,t){var e={x:-.4,y:0};return Od.transform(e,t),tg(g,e.x,e.y,.4*t.length),!0}}]),g}(),Fd=function(){function g(){gr(this,g)}return er(g,null,[{key:"draw",value:function(g,t){var e=[{x:0,y:.5},{x:0,y:-.5},{x:-.15,y:-.5},{x:-.15,y:.5}];return Od.transform(e,t),Od.drawPath(g,e),!0}}]),g}(),Sd=function(){function g(){gr(this,g)}return er(g,null,[{key:"draw",value:function(g,t){var e=[{x:0,y:.3},{x:0,y:-.3},{x:-.6,y:-.3},{x:-.6,y:.3}];return Od.transform(e,t),Od.drawPath(g,e),!0}}]),g}(),Ld=function(){function g(){gr(this,g)}return er(g,null,[{key:"draw",value:function(g,t){var e=[{x:0,y:0},{x:-.5,y:-.3},{x:-1,y:0},{x:-.5,y:.3}];return Od.transform(e,t),Od.drawPath(g,e),!0}}]),g}(),Qd=function(){function g(){gr(this,g)}return er(g,null,[{key:"draw",value:function(g,t){var e=[{x:-1,y:.3},{x:-.5,y:0},{x:-1,y:-.3},{x:0,y:0}];return Od.transform(e,t),Od.drawPath(g,e),!0}}]),g}(),Yd=function(){function g(){gr(this,g)}return er(g,null,[{key:"draw",value:function(g,t){var e;switch(t.type&&(e=t.type.toLowerCase()),e){case"image":return Nd.draw(g,t);case"circle":return Rd.draw(g,t);case"box":return Sd.draw(g,t);case"crow":return Md.draw(g,t);case"curve":return Ed.draw(g,t);case"diamond":return Ld.draw(g,t);case"inv_curve":return Gd.draw(g,t);case"triangle":return Td.draw(g,t);case"inv_triangle":return Bd.draw(g,t);case"bar":return Fd.draw(g,t);case"vee":return Qd.draw(g,t);case"arrow":default:return Zd.draw(g,t)}}}]),g}();function Wd(g,t){var e=GA(g);if(xA){var A=xA(g);t&&(A=bI(A).call(A,(function(t){return wA(g,t).enumerable}))),e.push.apply(e,A)}return e}function zd(g){for(var t=1;t<arguments.length;t++){var e,A=null!=arguments[t]?arguments[t]:{};if(t%2)tI(e=Wd(Object(A),!0)).call(e,(function(t){ZA(g,t,A[t])}));else if(vA)fA(g,vA(A));else{var I;tI(I=Wd(Object(A))).call(I,(function(t){uA(g,t,wA(A,t))}))}}return g}var Pd=function(){function g(t,e,A){gr(this,g),this._body=e,this._labelModule=A,this.color={},this.colorDirty=!0,this.hoverWidth=1.5,this.selectionWidth=2,this.setOptions(t),this.fromPoint=this.from,this.toPoint=this.to}return er(g,[{key:"connect",value:function(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to]}},{key:"cleanup",value:function(){return!1}},{key:"setOptions",value:function(g){this.options=g,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.id=this.options.id}},{key:"drawLine",value:function(g,t,e,A){var I=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.getViaNode();g.strokeStyle=this.getColor(g,t),g.lineWidth=t.width,!1!==t.dashes?this._drawDashedLine(g,t,I):this._drawLine(g,t,I)}},{key:"_drawLine",value:function(g,t,e,A,I){if(this.from!=this.to)this._line(g,t,e,A,I);else{var C=this._getCircleData(g),i=uC(C,3),n=i[0],o=i[1],r=i[2];this._circle(g,t,n,o,r)}}},{key:"_drawDashedLine",value:function(g,t,e,A,I){g.lineCap="round";var C=CC(t.dashes)?t.dashes:[5,5];if(void 0!==g.setLineDash){if(g.save(),g.setLineDash(C),g.lineDashOffset=0,this.from!=this.to)this._line(g,t,e);else{var i=this._getCircleData(g),n=uC(i,3),o=n[0],r=n[1],s=n[2];this._circle(g,t,o,r,s)}g.setLineDash([0]),g.lineDashOffset=0,g.restore()}else{if(this.from!=this.to)Cg(g,this.from.x,this.from.y,this.to.x,this.to.y,C);else{var a=this._getCircleData(g),d=uC(a,3),l=d[0],h=d[1],c=d[2];this._circle(g,t,l,h,c)}this.enableShadow(g,t),g.stroke(),this.disableShadow(g,t)}}},{key:"findBorderPosition",value:function(g,t,e){return this.from!=this.to?this._findBorderPosition(g,t,e):this._findBorderPositionCircle(g,t,e)}},{key:"findBorderPositions",value:function(g){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,g),to:this._findBorderPosition(this.to,g)};var t,e=UI(t=this._getCircleData(g)).call(t,0,2),A=uC(e,2),I=A[0],C=A[1];return{from:this._findBorderPositionCircle(this.from,g,{x:I,y:C,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,g,{x:I,y:C,low:.6,high:.8,direction:1})}}},{key:"_getCircleData",value:function(g){var t=this.options.selfReference.size;void 0!==g&&void 0===this.from.shape.width&&this.from.shape.resize(g);var e=ua.getSelfRefCoordinates(g,this.options.selfReference.angle,t,this.from);return[e.x,e.y,t]}},{key:"_pointOnCircle",value:function(g,t,e,A){var I=2*A*Math.PI;return{x:g+e*Math.cos(I),y:t-e*Math.sin(I)}}},{key:"_findBorderPositionCircle",value:function(g,t,e){var A,I=e.x,C=e.y,i=e.low,n=e.high,o=e.direction,r=this.options.selfReference.size,s=.5*(i+n),a=0;do{s=.5*(i+n),A=this._pointOnCircle(I,C,r,s);var d=Math.atan2(g.y-A.y,g.x-A.x),l=g.distanceToBorder(t,d)-Math.sqrt(Math.pow(A.x-g.x,2)+Math.pow(A.y-g.y,2));if(Math.abs(l)<.05)break;l>0?o>0?i=s:n=s:o>0?n=s:i=s,++a}while(i<=n&&a<10);return zd(zd({},A),{},{t:s})}},{key:"getLineWidth",value:function(g,t){return!0===g?Math.max(this.selectionWidth,.3/this._body.view.scale):!0===t?Math.max(this.hoverWidth,.3/this._body.view.scale):Math.max(this.options.width,.3/this._body.view.scale)}},{key:"getColor",value:function(g,t){if(!1!==t.inheritsColor){if("both"===t.inheritsColor&&this.from.id!==this.to.id){var e=g.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),A=this.from.options.color.highlight.border,I=this.to.options.color.highlight.border;return!1===this.from.selected&&!1===this.to.selected?(A=KC(this.from.options.color.border,t.opacity),I=KC(this.to.options.color.border,t.opacity)):!0===this.from.selected&&!1===this.to.selected?I=this.to.options.color.border:!1===this.from.selected&&!0===this.to.selected&&(A=this.from.options.color.border),e.addColorStop(0,A),e.addColorStop(1,I),e}return"to"===t.inheritsColor?KC(this.to.options.color.border,t.opacity):KC(this.from.options.color.border,t.opacity)}return KC(t.color,t.opacity)}},{key:"_circle",value:function(g,t,e,A,I){this.enableShadow(g,t);var C=0,i=2*Math.PI;if(!this.options.selfReference.renderBehindTheNode){var n=this.options.selfReference.angle,o=this.options.selfReference.angle+Math.PI,r=this._findBorderPositionCircle(this.from,g,{x:e,y:A,low:n,high:o,direction:-1}),s=this._findBorderPositionCircle(this.from,g,{x:e,y:A,low:n,high:o,direction:1});C=Math.atan2(r.y-A,r.x-e),i=Math.atan2(s.y-A,s.x-e)}g.beginPath(),g.arc(e,A,I,C,i,!1),g.stroke(),this.disableShadow(g,t)}},{key:"getDistanceToEdge",value:function(g,t,e,A,I,C){if(this.from!=this.to)return this._getDistanceToEdge(g,t,e,A,I,C);var i=this._getCircleData(void 0),n=uC(i,3),o=n[0],r=n[1],s=n[2],a=o-I,d=r-C;return Math.abs(Math.sqrt(a*a+d*d)-s)}},{key:"_getDistanceToLine",value:function(g,t,e,A,I,C){var i=e-g,n=A-t,o=((I-g)*i+(C-t)*n)/(i*i+n*n);o>1?o=1:o<0&&(o=0);var r=g+o*i-I,s=t+o*n-C;return Math.sqrt(r*r+s*s)}},{key:"getArrowData",value:function(g,t,e,A,I,C){var i,n,o,r,s,a,d,l=C.width;"from"===t?(o=this.from,r=this.to,s=C.fromArrowScale<0,a=Math.abs(C.fromArrowScale),d=C.fromArrowType):"to"===t?(o=this.to,r=this.from,s=C.toArrowScale<0,a=Math.abs(C.toArrowScale),d=C.toArrowType):(o=this.to,r=this.from,s=C.middleArrowScale<0,a=Math.abs(C.middleArrowScale),d=C.middleArrowType);var h=15*a+3*l;if(o!=r){var c=h/kd(o.x-r.x,o.y-r.y);if("middle"!==t)if(!0===this.options.smooth.enabled){var u=this._findBorderPosition(o,g,{via:e}),f=this.getPoint(u.t+c*("from"===t?1:-1),e);i=Math.atan2(u.y-f.y,u.x-f.x),n=u}else i=Math.atan2(o.y-r.y,o.x-r.x),n=this._findBorderPosition(o,g);else{var p=(s?-c:c)/2,v=this.getPoint(.5+p,e),y=this.getPoint(.5-p,e);i=Math.atan2(v.y-y.y,v.x-y.x),n=this.getPoint(.5,e)}}else{var m=this._getCircleData(g),b=uC(m,3),w=b[0],x=b[1],k=b[2];if("from"===t){var D=this.options.selfReference.angle,O=this.options.selfReference.angle+Math.PI,N=this._findBorderPositionCircle(this.from,g,{x:w,y:x,low:D,high:O,direction:-1});i=-2*N.t*Math.PI+1.5*Math.PI+.1*Math.PI,n=N}else if("to"===t){var Z=this.options.selfReference.angle,M=this.options.selfReference.angle+Math.PI,E=this._findBorderPositionCircle(this.from,g,{x:w,y:x,low:Z,high:M,direction:1});i=-2*E.t*Math.PI+1.5*Math.PI-1.1*Math.PI,n=E}else{var G=this.options.selfReference.angle/(2*Math.PI);n=this._pointOnCircle(w,x,k,G),i=-2*G*Math.PI+1.5*Math.PI+.1*Math.PI}}return{point:n,core:{x:n.x-.9*h*Math.cos(i),y:n.y-.9*h*Math.sin(i)},angle:i,length:h,type:d}}},{key:"drawArrowHead",value:function(g,t,e,A,I){g.strokeStyle=this.getColor(g,t),g.fillStyle=g.strokeStyle,g.lineWidth=t.width,Yd.draw(g,I)&&(this.enableShadow(g,t),ka(g).call(g),this.disableShadow(g,t))}},{key:"enableShadow",value:function(g,t){!0===t.shadow&&(g.shadowColor=t.shadowColor,g.shadowBlur=t.shadowSize,g.shadowOffsetX=t.shadowX,g.shadowOffsetY=t.shadowY)}},{key:"disableShadow",value:function(g,t){!0===t.shadow&&(g.shadowColor="rgba(0,0,0,0)",g.shadowBlur=0,g.shadowOffsetX=0,g.shadowOffsetY=0)}},{key:"drawBackground",value:function(g,t){if(!1!==t.background){var e={strokeStyle:g.strokeStyle,lineWidth:g.lineWidth,dashes:g.dashes};g.strokeStyle=t.backgroundColor,g.lineWidth=t.backgroundSize,this.setStrokeDashed(g,t.backgroundDashes),g.stroke(),g.strokeStyle=e.strokeStyle,g.lineWidth=e.lineWidth,g.dashes=e.dashes,this.setStrokeDashed(g,t.dashes)}}},{key:"setStrokeDashed",value:function(g,t){if(!1!==t)if(void 0!==g.setLineDash){var e=CC(t)?t:[5,5];g.setLineDash(e)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else void 0!==g.setLineDash?g.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}]),g}();function jd(g,t){var e=GA(g);if(xA){var A=xA(g);t&&(A=bI(A).call(A,(function(t){return wA(g,t).enumerable}))),e.push.apply(e,A)}return e}function Vd(g){for(var t=1;t<arguments.length;t++){var e,A=null!=arguments[t]?arguments[t]:{};if(t%2)tI(e=jd(Object(A),!0)).call(e,(function(t){ZA(g,t,A[t])}));else if(vA)fA(g,vA(A));else{var I;tI(I=jd(Object(A))).call(I,(function(t){uA(g,t,wA(A,t))}))}}return g}function Xd(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var Ud=function(g){_r(e,g);var t=Xd(e);function e(g,A,I){return gr(this,e),t.call(this,g,A,I)}return er(e,[{key:"_findBorderPositionBezier",value:function(g,t){var e,A,I=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._getViaCoordinates(),C=10,i=.2,n=!1,o=1,r=0,s=this.to;g.id===this.from.id&&(s=this.from,n=!0);var a=0;do{A=.5*(r+o),e=this.getPoint(A,I);var d=Math.atan2(s.y-e.y,s.x-e.x),l=s.distanceToBorder(t,d),h=Math.sqrt(Math.pow(e.x-s.x,2)+Math.pow(e.y-s.y,2)),c=l-h;if(Math.abs(c)<i)break;c<0?!1===n?r=A:o=A:!1===n?o=A:r=A,++a}while(r<=o&&a<C);return Vd(Vd({},e),{},{t:A})}},{key:"_getDistanceToBezierEdge",value:function(g,t,e,A,I,C,i){var n,o,r,s,a,d=1e9,l=g,h=t;for(o=1;o<10;o++)r=.1*o,s=Math.pow(1-r,2)*g+2*r*(1-r)*i.x+Math.pow(r,2)*e,a=Math.pow(1-r,2)*t+2*r*(1-r)*i.y+Math.pow(r,2)*A,o>0&&(d=(n=this._getDistanceToLine(l,h,s,a,I,C))<d?n:d),l=s,h=a;return d}},{key:"_bezierCurve",value:function(g,t,e,A){g.beginPath(),g.moveTo(this.fromPoint.x,this.fromPoint.y),null!=e&&null!=e.x?null!=A&&null!=A.x?g.bezierCurveTo(e.x,e.y,A.x,A.y,this.toPoint.x,this.toPoint.y):g.quadraticCurveTo(e.x,e.y,this.toPoint.x,this.toPoint.y):g.lineTo(this.toPoint.x,this.toPoint.y),this.drawBackground(g,t),this.enableShadow(g,t),g.stroke(),this.disableShadow(g,t)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}}]),e}(Pd);function _d(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var Hd=function(g){_r(e,g);var t=_d(e);function e(g,A,I){var C;return gr(this,e),(C=t.call(this,g,A,I)).via=C.via,C._boundFunction=function(){C.positionBezierNode()},C._body.emitter.on("_repositionBezierNodes",C._boundFunction),C}return er(e,[{key:"setOptions",value:function(g){yd(Kr(e.prototype),"setOptions",this).call(this,g);var t=!1;this.options.physics!==g.physics&&(t=!0),this.options=g,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),!0===t&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}},{key:"connect",value:function(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],void 0===this.from||void 0===this.to||!1===this.options.physics||this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}},{key:"cleanup",value:function(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),void 0!==this.via&&(delete this._body.nodes[this.via.id],this.via=void 0,!0)}},{key:"setupSupportNode",value:function(){if(void 0===this.via){var g="edgeId:"+this.id,t=this._body.functions.createNode({id:g,shape:"circle",physics:!0,hidden:!0});this._body.nodes[g]=t,this.via=t,this.via.parentEdgeId=this.id,this.positionBezierNode()}}},{key:"positionBezierNode",value:function(){void 0!==this.via&&void 0!==this.from&&void 0!==this.to?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):void 0!==this.via&&(this.via.x=0,this.via.y=0)}},{key:"_line",value:function(g,t,e){this._bezierCurve(g,t,e)}},{key:"_getViaCoordinates",value:function(){return this.via}},{key:"getViaNode",value:function(){return this.via}},{key:"getPoint",value:function(g){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.via;if(this.from===this.to){var e=this._getCircleData(),A=uC(e,3),I=A[0],C=A[1],i=A[2],n=2*Math.PI*(1-g);return{x:I+i*Math.sin(n),y:C+i-i*(1-Math.cos(n))}}return{x:Math.pow(1-g,2)*this.fromPoint.x+2*g*(1-g)*t.x+Math.pow(g,2)*this.toPoint.x,y:Math.pow(1-g,2)*this.fromPoint.y+2*g*(1-g)*t.y+Math.pow(g,2)*this.toPoint.y}}},{key:"_findBorderPosition",value:function(g,t){return this._findBorderPositionBezier(g,t,this.via)}},{key:"_getDistanceToEdge",value:function(g,t,e,A,I,C){return this._getDistanceToBezierEdge(g,t,e,A,I,C,this.via)}}]),e}(Ud);function Jd(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var Kd=function(g){_r(e,g);var t=Jd(e);function e(g,A,I){return gr(this,e),t.call(this,g,A,I)}return er(e,[{key:"_line",value:function(g,t,e){this._bezierCurve(g,t,e)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var g,t,e=this.options.smooth.roundness,A=this.options.smooth.type,I=Math.abs(this.from.x-this.to.x),C=Math.abs(this.from.y-this.to.y);if("discrete"===A||"diagonalCross"===A){var i,n;i=n=I<=C?e*C:e*I,this.from.x>this.to.x&&(i=-i),this.from.y>=this.to.y&&(n=-n);var o=this.from.x+i,r=this.from.y+n;return"discrete"===A&&(I<=C?o=I<e*C?this.from.x:o:r=C<e*I?this.from.y:r),{x:o,y:r}}if("straightCross"===A){var s=(1-e)*I,a=(1-e)*C;return I<=C?(s=0,this.from.y<this.to.y&&(a=-a)):(this.from.x<this.to.x&&(s=-s),a=0),{x:this.to.x+s,y:this.to.y+a}}if("horizontal"===A){var d=(1-e)*I;return this.from.x<this.to.x&&(d=-d),{x:this.to.x+d,y:this.from.y}}if("vertical"===A){var l=(1-e)*C;return this.from.y<this.to.y&&(l=-l),{x:this.from.x,y:this.to.y+l}}if("curvedCW"===A){I=this.to.x-this.from.x,C=this.from.y-this.to.y;var h=Math.sqrt(I*I+C*C),c=Math.PI,u=(Math.atan2(C,I)+(.5*e+.5)*c)%(2*c);return{x:this.from.x+(.5*e+.5)*h*Math.sin(u),y:this.from.y+(.5*e+.5)*h*Math.cos(u)}}if("curvedCCW"===A){I=this.to.x-this.from.x,C=this.from.y-this.to.y;var f=Math.sqrt(I*I+C*C),p=Math.PI,v=(Math.atan2(C,I)+(.5*-e+.5)*p)%(2*p);return{x:this.from.x+(.5*e+.5)*f*Math.sin(v),y:this.from.y+(.5*e+.5)*f*Math.cos(v)}}g=t=I<=C?e*C:e*I,this.from.x>this.to.x&&(g=-g),this.from.y>=this.to.y&&(t=-t);var y=this.from.x+g,m=this.from.y+t;return I<=C?y=this.from.x<=this.to.x?this.to.x<y?this.to.x:y:this.to.x>y?this.to.x:y:m=this.from.y>=this.to.y?this.to.y>m?this.to.y:m:this.to.y<m?this.to.y:m,{x:y,y:m}}},{key:"_findBorderPosition",value:function(g,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._findBorderPositionBezier(g,t,e.via)}},{key:"_getDistanceToEdge",value:function(g,t,e,A,I,C){var i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(g,t,e,A,I,C,i)}},{key:"getPoint",value:function(g){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getViaCoordinates(),e=g,A=Math.pow(1-e,2)*this.fromPoint.x+2*e*(1-e)*t.x+Math.pow(e,2)*this.toPoint.x,I=Math.pow(1-e,2)*this.fromPoint.y+2*e*(1-e)*t.y+Math.pow(e,2)*this.toPoint.y;return{x:A,y:I}}}]),e}(Ud);function qd(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}function $d(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var gl=function(g){_r(e,g);var t=$d(e);function e(g,A,I){return gr(this,e),t.call(this,g,A,I)}return er(e,[{key:"_line",value:function(g,t,e){var A=e[0],I=e[1];this._bezierCurve(g,t,A,I)}},{key:"_getViaCoordinates",value:function(){var g,t,e,A,I=this.from.x-this.to.x,C=this.from.y-this.to.y,i=this.options.smooth.roundness;return(Math.abs(I)>Math.abs(C)||!0===this.options.smooth.forceDirection||"horizontal"===this.options.smooth.forceDirection)&&"vertical"!==this.options.smooth.forceDirection?(t=this.from.y,A=this.to.y,g=this.from.x-i*I,e=this.to.x+i*I):(t=this.from.y-i*C,A=this.to.y+i*C,g=this.from.x,e=this.to.x),[{x:g,y:t},{x:e,y:A}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(g,t){return this._findBorderPositionBezier(g,t)}},{key:"_getDistanceToEdge",value:function(g,t,e,A,I,C){var i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:this._getViaCoordinates(),n=uC(i,2),o=n[0],r=n[1];return this._getDistanceToBezierEdge2(g,t,e,A,I,C,o,r)}},{key:"getPoint",value:function(g){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getViaCoordinates(),e=uC(t,2),A=e[0],I=e[1],C=g,i=[Math.pow(1-C,3),3*C*Math.pow(1-C,2),3*Math.pow(C,2)*(1-C),Math.pow(C,3)],n=i[0]*this.fromPoint.x+i[1]*A.x+i[2]*I.x+i[3]*this.toPoint.x,o=i[0]*this.fromPoint.y+i[1]*A.y+i[2]*I.y+i[3]*this.toPoint.y;return{x:n,y:o}}}]),e}(function(g){_r(e,g);var t=qd(e);function e(g,A,I){return gr(this,e),t.call(this,g,A,I)}return er(e,[{key:"_getDistanceToBezierEdge2",value:function(g,t,e,A,I,C,i,n){for(var o=1e9,r=g,s=t,a=[0,0,0,0],d=1;d<10;d++){var l=.1*d;a[0]=Math.pow(1-l,3),a[1]=3*l*Math.pow(1-l,2),a[2]=3*Math.pow(l,2)*(1-l),a[3]=Math.pow(l,3);var h=a[0]*g+a[1]*i.x+a[2]*n.x+a[3]*e,c=a[0]*t+a[1]*i.y+a[2]*n.y+a[3]*A;if(d>0){var u=this._getDistanceToLine(r,s,h,c,I,C);o=u<o?u:o}r=h,s=c}return o}}]),e}(Ud));function tl(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var el=function(g){_r(e,g);var t=tl(e);function e(g,A,I){return gr(this,e),t.call(this,g,A,I)}return er(e,[{key:"_line",value:function(g,t){g.beginPath(),g.moveTo(this.fromPoint.x,this.fromPoint.y),g.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(g,t),g.stroke(),this.disableShadow(g,t)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(g){return{x:(1-g)*this.fromPoint.x+g*this.toPoint.x,y:(1-g)*this.fromPoint.y+g*this.toPoint.y}}},{key:"_findBorderPosition",value:function(g,t){var e=this.to,A=this.from;g.id===this.from.id&&(e=this.from,A=this.to);var I=Math.atan2(e.y-A.y,e.x-A.x),C=e.x-A.x,i=e.y-A.y,n=Math.sqrt(C*C+i*i),o=(n-g.distanceToBorder(t,I))/n;return{x:(1-o)*A.x+o*e.x,y:(1-o)*A.y+o*e.y,t:0}}},{key:"_getDistanceToEdge",value:function(g,t,e,A,I,C){return this._getDistanceToLine(g,t,e,A,I,C)}}]),e}(Pd),Al=function(){function g(t,e,A,I,C){if(gr(this,g),void 0===e)throw new Error("No body provided");this.options=ri(I),this.globalOptions=I,this.defaultOptions=C,this.body=e,this.imagelist=A,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new ba(this.body,this.options,!0),this.setOptions(t)}return er(g,[{key:"setOptions",value:function(t){if(t){var e=void 0!==t.physics&&this.options.physics!==t.physics||void 0!==t.hidden&&(this.options.hidden||!1)!==(t.hidden||!1)||void 0!==t.from&&this.options.from!==t.from||void 0!==t.to&&this.options.to!==t.to;g.parseOptions(this.options,t,!0,this.globalOptions),void 0!==t.id&&(this.id=t.id),void 0!==t.from&&(this.fromId=t.from),void 0!==t.to&&(this.toId=t.to),void 0!==t.title&&(this.title=t.title),void 0!==t.value&&(t.value=ca(t.value));var A=[t,this.options,this.defaultOptions];return this.chooser=ua.choosify("edge",A),this.updateLabelModule(t),e=this.updateEdgeType()||e,this._setInteractionWidths(),this.connect(),e}}},{key:"getFormattingValues",value:function(){var g=!0===this.options.arrows.to||!0===this.options.arrows.to.enabled,t=!0===this.options.arrows.from||!0===this.options.arrows.from.enabled,e=!0===this.options.arrows.middle||!0===this.options.arrows.middle.enabled,A=this.options.color.inherit,I={toArrow:g,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:e,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:t,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:A?void 0:this.options.color.color,inheritsColor:A,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(!0===this.chooser){if(this.selected){var C=this.options.selectionWidth;"function"==typeof C?I.width=C(I.width):"number"==typeof C&&(I.width+=C),I.width=Math.max(I.width,.3/this.body.view.scale),I.color=this.options.color.highlight,I.shadow=this.options.shadow.enabled}else if(this.hover){var i=this.options.hoverWidth;"function"==typeof i?I.width=i(I.width):"number"==typeof i&&(I.width+=i),I.width=Math.max(I.width,.3/this.body.view.scale),I.color=this.options.color.hover,I.shadow=this.options.shadow.enabled}}else"function"==typeof this.chooser&&(this.chooser(I,this.options.id,this.selected,this.hover),void 0!==I.color&&(I.inheritsColor=!1),!1===I.shadow&&(I.shadowColor===this.options.shadow.color&&I.shadowSize===this.options.shadow.size&&I.shadowX===this.options.shadow.x&&I.shadowY===this.options.shadow.y||(I.shadow=!0)));else I.shadow=this.options.shadow.enabled,I.width=Math.max(I.width,.3/this.body.view.scale);return I}},{key:"updateLabelModule",value:function(g){var t=[g,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,t),void 0!==this.labelModule.baseSize&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateEdgeType",value:function(){var g=this.options.smooth,t=!1,e=!0;return void 0!==this.edgeType&&((this.edgeType instanceof Hd&&!0===g.enabled&&"dynamic"===g.type||this.edgeType instanceof gl&&!0===g.enabled&&"cubicBezier"===g.type||this.edgeType instanceof Kd&&!0===g.enabled&&"dynamic"!==g.type&&"cubicBezier"!==g.type||this.edgeType instanceof el&&!1===g.type.enabled)&&(e=!1),!0===e&&(t=this.cleanup())),!0===e?!0===g.enabled?"dynamic"===g.type?(t=!0,this.edgeType=new Hd(this.options,this.body,this.labelModule)):"cubicBezier"===g.type?this.edgeType=new gl(this.options,this.body,this.labelModule):this.edgeType=new Kd(this.options,this.body,this.labelModule):this.edgeType=new el(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),t}},{key:"connect",value:function(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=void 0!==this.from&&void 0!==this.to,!0===this.connected?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}},{key:"disconnect",value:function(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}},{key:"getTitle",value:function(){return this.title}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"setValueRange",value:function(g,t,e){if(void 0!==this.options.value){var A=this.options.scaling.customScalingFunction(g,t,e,this.options.value),I=this.options.scaling.max-this.options.scaling.min;if(!0===this.options.scaling.label.enabled){var C=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+A*C}this.options.width=this.options.scaling.min+A*I}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}},{key:"_setInteractionWidths",value:function(){"function"==typeof this.options.hoverWidth?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,"function"==typeof this.options.selectionWidth?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}},{key:"draw",value:function(g){var t=this.getFormattingValues();if(!t.hidden){var e=this.edgeType.getViaNode(),A={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,t.fromArrow&&(A.from=this.edgeType.getArrowData(g,"from",e,this.selected,this.hover,t),!1===t.arrowStrikethrough&&(this.edgeType.fromPoint=A.from.core),t.fromArrowSrc&&(A.from.image=this.imagelist.load(t.fromArrowSrc)),t.fromArrowImageWidth&&(A.from.imageWidth=t.fromArrowImageWidth),t.fromArrowImageHeight&&(A.from.imageHeight=t.fromArrowImageHeight)),t.toArrow&&(A.to=this.edgeType.getArrowData(g,"to",e,this.selected,this.hover,t),!1===t.arrowStrikethrough&&(this.edgeType.toPoint=A.to.core),t.toArrowSrc&&(A.to.image=this.imagelist.load(t.toArrowSrc)),t.toArrowImageWidth&&(A.to.imageWidth=t.toArrowImageWidth),t.toArrowImageHeight&&(A.to.imageHeight=t.toArrowImageHeight)),t.middleArrow&&(A.middle=this.edgeType.getArrowData(g,"middle",e,this.selected,this.hover,t),t.middleArrowSrc&&(A.middle.image=this.imagelist.load(t.middleArrowSrc)),t.middleArrowImageWidth&&(A.middle.imageWidth=t.middleArrowImageWidth),t.middleArrowImageHeight&&(A.middle.imageHeight=t.middleArrowImageHeight)),this.edgeType.drawLine(g,t,this.selected,this.hover,e),this.drawArrows(g,A,t),this.drawLabel(g,e)}}},{key:"drawArrows",value:function(g,t,e){e.fromArrow&&this.edgeType.drawArrowHead(g,e,this.selected,this.hover,t.from),e.middleArrow&&this.edgeType.drawArrowHead(g,e,this.selected,this.hover,t.middle),e.toArrow&&this.edgeType.drawArrowHead(g,e,this.selected,this.hover,t.to)}},{key:"drawLabel",value:function(g,t){if(void 0!==this.options.label){var e=this.from,A=this.to;if(this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(g,this.selected,this.hover),e.id!=A.id){this.labelModule.pointToSelf=!1;var I=this.edgeType.getPoint(.5,t);g.save();var C=this._getRotation(g);0!=C.angle&&(g.translate(C.x,C.y),g.rotate(C.angle)),this.labelModule.draw(g,I.x,I.y,this.selected,this.hover),g.restore()}else{this.labelModule.pointToSelf=!0;var i=ua.getSelfRefCoordinates(g,this.options.selfReference.angle,this.options.selfReference.size,e);I=this._pointOnCircle(i.x,i.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(g,I.x,I.y,this.selected,this.hover)}}}},{key:"getItemsOnPoint",value:function(g){var t=[];if(this.labelModule.visible()){var e=this._getRotation();ua.pointInRect(this.labelModule.getSize(),g,e)&&t.push({edgeId:this.id,labelId:0})}var A={left:g.x,top:g.y};return this.isOverlappingWith(A)&&t.push({edgeId:this.id}),t}},{key:"isOverlappingWith",value:function(g){if(this.connected){var t=this.from.x,e=this.from.y,A=this.to.x,I=this.to.y,C=g.left,i=g.top;return this.edgeType.getDistanceToEdge(t,e,A,I,C,i)<10}return!1}},{key:"_getRotation",value:function(g){var t=this.edgeType.getViaNode(),e=this.edgeType.getPoint(.5,t);void 0!==g&&this.labelModule.calculateLabelSize(g,this.selected,this.hover,e.x,e.y);var A={x:e.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible())return A;if("horizontal"===this.options.font.align)return A;var I=this.from.y-this.to.y,C=this.from.x-this.to.x,i=Math.atan2(I,C);return(i<-1&&C<0||i>0&&C<0)&&(i+=Math.PI),A.angle=i,A}},{key:"_pointOnCircle",value:function(g,t,e,A){return{x:g+e*Math.cos(A),y:t-e*Math.sin(A)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}},{key:"remove",value:function(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}},{key:"endPointsValid",value:function(){return void 0!==this.body.nodes[this.fromId]&&void 0!==this.body.nodes[this.toId]}}],[{key:"parseOptions",value:function(g,t){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],A=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},I=arguments.length>4&&void 0!==arguments[4]&&arguments[4],C=["arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"];if(SC(C,g,t,e),ua.isValidLabel(t.label)?g.label=t.label:ua.isValidLabel(g.label)||(g.label=void 0),si(g,t,"smooth",A),si(g,t,"shadow",A),si(g,t,"background",A),void 0!==t.dashes&&null!==t.dashes?g.dashes=t.dashes:!0===e&&null===t.dashes&&(g.dashes=OA(A.dashes)),void 0!==t.scaling&&null!==t.scaling?(void 0!==t.scaling.min&&(g.scaling.min=t.scaling.min),void 0!==t.scaling.max&&(g.scaling.max=t.scaling.max),si(g.scaling,t.scaling,"label",A.scaling)):!0===e&&null===t.scaling&&(g.scaling=OA(A.scaling)),void 0!==t.arrows&&null!==t.arrows)if("string"==typeof t.arrows){var i=t.arrows.toLowerCase();g.arrows.to.enabled=-1!=IC(i).call(i,"to"),g.arrows.middle.enabled=-1!=IC(i).call(i,"middle"),g.arrows.from.enabled=-1!=IC(i).call(i,"from")}else{if("object"!==dC(t.arrows))throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+Fr(t.arrows));si(g.arrows,t.arrows,"to",A.arrows),si(g.arrows,t.arrows,"middle",A.arrows),si(g.arrows,t.arrows,"from",A.arrows)}else!0===e&&null===t.arrows&&(g.arrows=OA(A.arrows));if(void 0!==t.color&&null!==t.color){var n=GC(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,o=g.color;if(I)QC(o,A.color,!1,e);else for(var r in o)o.hasOwnProperty(r)&&delete o[r];if(GC(o))o.color=o,o.highlight=o,o.hover=o,o.inherit=!1,void 0===n.opacity&&(o.opacity=1);else{var s=!1;void 0!==n.color&&(o.color=n.color,s=!0),void 0!==n.highlight&&(o.highlight=n.highlight,s=!0),void 0!==n.hover&&(o.hover=n.hover,s=!0),void 0!==n.inherit&&(o.inherit=n.inherit),void 0!==n.opacity&&(o.opacity=Math.min(1,Math.max(0,n.opacity))),!0===s?o.inherit=!1:void 0===o.inherit&&(o.inherit="from")}}else!0===e&&null===t.color&&(g.color=ri(A.color));!0===e&&null===t.font&&(g.font=ri(A.font)),t.hasOwnProperty("selfReferenceSize")&&(console.log("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),g.selfReference.size=t.selfReferenceSize)}}]),g}(),Il=function(){function g(t,e,A){var I,C=this;gr(this,g),this.body=t,this.images=e,this.groups=A,this.body.functions.createEdge=gg(I=this.create).call(I,this),this.edgesListeners={add:function(g,t){C.add(t.items)},update:function(g,t){C.update(t.items)},remove:function(g,t){C.remove(t.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(g,t,e,A){if(t===g)return.5;var I=1/(t-g);return Math.max(0,(A-g)*I)}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},QC(this.options,this.defaultOptions),this.bindEventListeners()}return er(g,[{key:"bindEventListeners",value:function(){var g,t,e=this;this.body.emitter.on("_forceDisableDynamicCurves",(function(g){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];"dynamic"===g&&(g="continuous");var A=!1;for(var I in e.body.edges)if(e.body.edges.hasOwnProperty(I)){var C=e.body.edges[I],i=e.body.data.edges.get(I);if(null!=i){var n=i.smooth;void 0!==n&&!0===n.enabled&&"dynamic"===n.type&&(void 0===g?C.setOptions({smooth:!1}):C.setOptions({smooth:{type:g}}),A=!0)}}!0===t&&!0===A&&e.body.emitter.emit("_dataChanged")})),this.body.emitter.on("_dataUpdated",(function(){e.reconnectEdges()})),this.body.emitter.on("refreshEdges",gg(g=this.refresh).call(g,this)),this.body.emitter.on("refresh",gg(t=this.refresh).call(t,this)),this.body.emitter.on("destroy",(function(){VC(e.edgesListeners,(function(g,t){e.body.data.edges&&e.body.data.edges.off(t,g)})),delete e.body.functions.createEdge,delete e.edgesListeners.add,delete e.edgesListeners.update,delete e.edgesListeners.remove,delete e.edgesListeners}))}},{key:"setOptions",value:function(g){if(void 0!==g){Al.parseOptions(this.options,g,!0,this.defaultOptions,!0);var t=!1;if(void 0!==g.smooth)for(var e in this.body.edges)this.body.edges.hasOwnProperty(e)&&(t=this.body.edges[e].updateEdgeType()||t);if(void 0!==g.font)for(var A in this.body.edges)this.body.edges.hasOwnProperty(A)&&this.body.edges[A].updateLabelModule();void 0===g.hidden&&void 0===g.physics&&!0!==t||this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(g){var t=this,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],A=this.body.data.edges;if(g instanceof Ca||g instanceof ia)this.body.data.edges=g;else if(CC(g))this.body.data.edges=new Ca,this.body.data.edges.add(g);else{if(g)throw new TypeError("Array or DataSet expected");this.body.data.edges=new Ca}if(A&&VC(this.edgesListeners,(function(g,t){A.off(t,g)})),this.body.edges={},this.body.data.edges){VC(this.edgesListeners,(function(g,e){t.body.data.edges.on(e,g)}));var I=this.body.data.edges.getIds();this.add(I,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),!1===e&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(g){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=this.body.edges,A=this.body.data.edges,I=0;I<g.length;I++){var C=g[I],i=e[C];i&&i.disconnect();var n=A.get(C,{showInternalIds:!0});e[C]=this.create(n)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),!1===t&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(g){for(var t=this.body.edges,e=this.body.data.edges,A=!1,I=0;I<g.length;I++){var C=g[I],i=e.get(C),n=t[C];void 0!==n?(n.disconnect(),A=n.setOptions(i)||A,n.connect()):(this.body.edges[C]=this.create(i),A=!0)}!0===A?(this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),this.body.emitter.emit("_dataChanged")):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(g){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(0!==g.length){var e=this.body.edges;VC(g,(function(g){var t=e[g];void 0!==t&&t.remove()})),t&&this.body.emitter.emit("_dataChanged")}}},{key:"refresh",value:function(){var g=this;VC(this.body.edges,(function(t,e){var A=g.body.data.edges.get(e);void 0!==A&&t.setOptions(A)}))}},{key:"create",value:function(g){return new Al(g,this.body,this.images,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var g,t=this.body.nodes,e=this.body.edges;for(g in t)t.hasOwnProperty(g)&&(t[g].edges=[]);for(g in e)if(e.hasOwnProperty(g)){var A=e[g];A.from=null,A.to=null,A.connect()}}},{key:"getConnectedNodes",value:function(g){var t=[];if(void 0!==this.body.edges[g]){var e=this.body.edges[g];void 0!==e.fromId&&t.push(e.fromId),void 0!==e.toId&&t.push(e.toId)}return t}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var g=this,t=[];VC(this.body.edges,(function(e,A){var I=g.body.nodes[e.toId],C=g.body.nodes[e.fromId];void 0!==I&&!0===I.isCluster||void 0!==C&&!0===C.isCluster||void 0!==I&&void 0!==C||t.push(A)})),this.remove(t,!1)}},{key:"_addMissingEdges",value:function(){var g=this.body.data.edges;if(null!=g){var t=this.body.edges,e=[];tI(g).call(g,(function(g,A){void 0===t[A]&&e.push(A)})),this.add(e,!0)}}}]),g}(),Cl=function(){function g(t,e,A){gr(this,g),this.body=t,this.physicsBody=e,this.barnesHutTree,this.setOptions(A),this._rng=bC("BARNES HUT SOLVER")}return er(g,[{key:"setOptions",value:function(g){this.options=g,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}},{key:"solve",value:function(){if(0!==this.options.gravitationalConstant&&this.physicsBody.physicsNodeIndices.length>0){var g,t=this.body.nodes,e=this.physicsBody.physicsNodeIndices,A=e.length,I=this._formBarnesHutTree(t,e);this.barnesHutTree=I;for(var C=0;C<A;C++)(g=t[e[C]]).options.mass>0&&this._getForceContributions(I.root,g)}}},{key:"_getForceContributions",value:function(g,t){this._getForceContribution(g.children.NW,t),this._getForceContribution(g.children.NE,t),this._getForceContribution(g.children.SW,t),this._getForceContribution(g.children.SE,t)}},{key:"_getForceContribution",value:function(g,t){var e,A,I;g.childrenCount>0&&(e=g.centerOfMass.x-t.x,A=g.centerOfMass.y-t.y,(I=Math.sqrt(e*e+A*A))*g.calcSize>this.thetaInversed?this._calculateForces(I,e,A,t,g):4===g.childrenCount?this._getForceContributions(g,t):g.children.data.id!=t.id&&this._calculateForces(I,e,A,t,g))}},{key:"_calculateForces",value:function(g,t,e,A,I){0===g&&(t=g=.1),this.overlapAvoidanceFactor<1&&A.shape.radius&&(g=Math.max(.1+this.overlapAvoidanceFactor*A.shape.radius,g-A.shape.radius));var C=this.options.gravitationalConstant*I.mass*A.options.mass/Math.pow(g,3),i=t*C,n=e*C;this.physicsBody.forces[A.id].x+=i,this.physicsBody.forces[A.id].y+=n}},{key:"_formBarnesHutTree",value:function(g,t){for(var e,A=t.length,I=g[t[0]].x,C=g[t[0]].y,i=g[t[0]].x,n=g[t[0]].y,o=1;o<A;o++){var r=g[t[o]],s=r.x,a=r.y;r.options.mass>0&&(s<I&&(I=s),s>i&&(i=s),a<C&&(C=a),a>n&&(n=a))}var d=Math.abs(i-I)-Math.abs(n-C);d>0?(C-=.5*d,n+=.5*d):(I+=.5*d,i-=.5*d);var l=Math.max(1e-5,Math.abs(i-I)),h=.5*l,c=.5*(I+i),u=.5*(C+n),f={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:c-h,maxX:c+h,minY:u-h,maxY:u+h},size:l,calcSize:1/l,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(f.root);for(var p=0;p<A;p++)(e=g[t[p]]).options.mass>0&&this._placeInTree(f.root,e);return f}},{key:"_updateBranchMass",value:function(g,t){var e=g.centerOfMass,A=g.mass+t.options.mass,I=1/A;e.x=e.x*g.mass+t.x*t.options.mass,e.x*=I,e.y=e.y*g.mass+t.y*t.options.mass,e.y*=I,g.mass=A;var C=Math.max(Math.max(t.height,t.radius),t.width);g.maxWidth=g.maxWidth<C?C:g.maxWidth}},{key:"_placeInTree",value:function(g,t,e){1==e&&void 0!==e||this._updateBranchMass(g,t);var A,I=g.children.NW.range;A=I.maxX>t.x?I.maxY>t.y?"NW":"SW":I.maxY>t.y?"NE":"SE",this._placeInRegion(g,t,A)}},{key:"_placeInRegion",value:function(g,t,e){var A=g.children[e];switch(A.childrenCount){case 0:A.children.data=t,A.childrenCount=1,this._updateBranchMass(A,t);break;case 1:A.children.data.x===t.x&&A.children.data.y===t.y?(t.x+=this._rng(),t.y+=this._rng()):(this._splitBranch(A),this._placeInTree(A,t));break;case 4:this._placeInTree(A,t)}}},{key:"_splitBranch",value:function(g){var t=null;1===g.childrenCount&&(t=g.children.data,g.mass=0,g.centerOfMass.x=0,g.centerOfMass.y=0),g.childrenCount=4,g.children.data=null,this._insertRegion(g,"NW"),this._insertRegion(g,"NE"),this._insertRegion(g,"SW"),this._insertRegion(g,"SE"),null!=t&&this._placeInTree(g,t)}},{key:"_insertRegion",value:function(g,t){var e,A,I,C,i=.5*g.size;switch(t){case"NW":e=g.range.minX,A=g.range.minX+i,I=g.range.minY,C=g.range.minY+i;break;case"NE":e=g.range.minX+i,A=g.range.maxX,I=g.range.minY,C=g.range.minY+i;break;case"SW":e=g.range.minX,A=g.range.minX+i,I=g.range.minY+i,C=g.range.maxY;break;case"SE":e=g.range.minX+i,A=g.range.maxX,I=g.range.minY+i,C=g.range.maxY}g.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:e,maxX:A,minY:I,maxY:C},size:.5*g.size,calcSize:2*g.calcSize,children:{data:null},maxWidth:0,level:g.level+1,childrenCount:0}}},{key:"_debug",value:function(g,t){void 0!==this.barnesHutTree&&(g.lineWidth=1,this._drawBranch(this.barnesHutTree.root,g,t))}},{key:"_drawBranch",value:function(g,t,e){void 0===e&&(e="#FF0000"),4===g.childrenCount&&(this._drawBranch(g.children.NW,t),this._drawBranch(g.children.NE,t),this._drawBranch(g.children.SE,t),this._drawBranch(g.children.SW,t)),t.strokeStyle=e,t.beginPath(),t.moveTo(g.range.minX,g.range.minY),t.lineTo(g.range.maxX,g.range.minY),t.stroke(),t.beginPath(),t.moveTo(g.range.maxX,g.range.minY),t.lineTo(g.range.maxX,g.range.maxY),t.stroke(),t.beginPath(),t.moveTo(g.range.maxX,g.range.maxY),t.lineTo(g.range.minX,g.range.maxY),t.stroke(),t.beginPath(),t.moveTo(g.range.minX,g.range.maxY),t.lineTo(g.range.minX,g.range.minY),t.stroke()}}]),g}(),il=function(){function g(t,e,A){gr(this,g),this._rng=bC("REPULSION SOLVER"),this.body=t,this.physicsBody=e,this.setOptions(A)}return er(g,[{key:"setOptions",value:function(g){this.options=g}},{key:"solve",value:function(){for(var g,t,e,A,I,C,i,n,o=this.body.nodes,r=this.physicsBody.physicsNodeIndices,s=this.physicsBody.forces,a=this.options.nodeDistance,d=-2/3/a,l=0;l<r.length-1;l++){i=o[r[l]];for(var h=l+1;h<r.length;h++)g=(n=o[r[h]]).x-i.x,t=n.y-i.y,0===(e=Math.sqrt(g*g+t*t))&&(g=e=.1*this._rng()),e<2*a&&(C=e<.5*a?1:d*e+4/3,A=g*(C/=e),I=t*C,s[i.id].x-=A,s[i.id].y-=I,s[n.id].x+=A,s[n.id].y+=I)}}}]),g}(),nl=function(){function g(t,e,A){gr(this,g),this.body=t,this.physicsBody=e,this.setOptions(A)}return er(g,[{key:"setOptions",value:function(g){this.options=g,this.overlapAvoidanceFactor=Math.max(0,Math.min(1,this.options.avoidOverlap||0))}},{key:"solve",value:function(){for(var g=this.body.nodes,t=this.physicsBody.physicsNodeIndices,e=this.physicsBody.forces,A=this.options.nodeDistance,I=0;I<t.length-1;I++)for(var C=g[t[I]],i=I+1;i<t.length;i++){var n=g[t[i]];if(C.level===n.level){var o=A+this.overlapAvoidanceFactor*((C.shape.radius||0)/2+(n.shape.radius||0)/2),r=n.x-C.x,s=n.y-C.y,a=Math.sqrt(r*r+s*s),d=void 0;d=a<o?-Math.pow(.05*a,2)+Math.pow(.05*o,2):0,0!==a&&(d/=a);var l=r*d,h=s*d;e[C.id].x-=l,e[C.id].y-=h,e[n.id].x+=l,e[n.id].y+=h}}}}]),g}(),ol=function(){function g(t,e,A){gr(this,g),this.body=t,this.physicsBody=e,this.setOptions(A)}return er(g,[{key:"setOptions",value:function(g){this.options=g}},{key:"solve",value:function(){for(var g,t,e,A,I,C=this.physicsBody.physicsEdgeIndices,i=this.body.edges,n=0;n<C.length;n++)!0===(t=i[C[n]]).connected&&t.toId!==t.fromId&&void 0!==this.body.nodes[t.toId]&&void 0!==this.body.nodes[t.fromId]&&(void 0!==t.edgeType.via?(g=void 0===t.options.length?this.options.springLength:t.options.length,e=t.to,A=t.edgeType.via,I=t.from,this._calculateSpringForce(e,A,.5*g),this._calculateSpringForce(A,I,.5*g)):(g=void 0===t.options.length?1.5*this.options.springLength:t.options.length,this._calculateSpringForce(t.from,t.to,g)))}},{key:"_calculateSpringForce",value:function(g,t,e){var A=g.x-t.x,I=g.y-t.y,C=Math.max(Math.sqrt(A*A+I*I),.01),i=this.options.springConstant*(e-C)/C,n=A*i,o=I*i;void 0!==this.physicsBody.forces[g.id]&&(this.physicsBody.forces[g.id].x+=n,this.physicsBody.forces[g.id].y+=o),void 0!==this.physicsBody.forces[t.id]&&(this.physicsBody.forces[t.id].x-=n,this.physicsBody.forces[t.id].y-=o)}}]),g}(),rl=function(){function g(t,e,A){gr(this,g),this.body=t,this.physicsBody=e,this.setOptions(A)}return er(g,[{key:"setOptions",value:function(g){this.options=g}},{key:"solve",value:function(){for(var g,t,e,A,I,C,i,n,o,r,s=this.body.edges,a=this.physicsBody.physicsEdgeIndices,d=this.physicsBody.physicsNodeIndices,l=this.physicsBody.forces,h=0;h<d.length;h++){var c=d[h];l[c].springFx=0,l[c].springFy=0}for(var u=0;u<a.length;u++)!0===(t=s[a[u]]).connected&&(g=void 0===t.options.length?this.options.springLength:t.options.length,e=t.from.x-t.to.x,A=t.from.y-t.to.y,n=0===(n=Math.sqrt(e*e+A*A))?.01:n,I=e*(i=this.options.springConstant*(g-n)/n),C=A*i,t.to.level!=t.from.level?(void 0!==l[t.toId]&&(l[t.toId].springFx-=I,l[t.toId].springFy-=C),void 0!==l[t.fromId]&&(l[t.fromId].springFx+=I,l[t.fromId].springFy+=C)):(void 0!==l[t.toId]&&(l[t.toId].x-=.5*I,l[t.toId].y-=.5*C),void 0!==l[t.fromId]&&(l[t.fromId].x+=.5*I,l[t.fromId].y+=.5*C)));i=1;for(var f=0;f<d.length;f++){var p=d[f];o=Math.min(i,Math.max(-i,l[p].springFx)),r=Math.min(i,Math.max(-i,l[p].springFy)),l[p].x+=o,l[p].y+=r}for(var v=0,y=0,m=0;m<d.length;m++){var b=d[m];v+=l[b].x,y+=l[b].y}for(var w=v/d.length,x=y/d.length,k=0;k<d.length;k++){var D=d[k];l[D].x-=w,l[D].y-=x}}}]),g}(),sl=function(){function g(t,e,A){gr(this,g),this.body=t,this.physicsBody=e,this.setOptions(A)}return er(g,[{key:"setOptions",value:function(g){this.options=g}},{key:"solve",value:function(){for(var g,t,e,A,I=this.body.nodes,C=this.physicsBody.physicsNodeIndices,i=this.physicsBody.forces,n=0;n<C.length;n++){g=-(A=I[C[n]]).x,t=-A.y,e=Math.sqrt(g*g+t*t),this._calculateForces(e,g,t,i,A)}}},{key:"_calculateForces",value:function(g,t,e,A,I){var C=0===g?0:this.options.centralGravity/g;A[I.id].x=t*C,A[I.id].y=e*C}}]),g}();function al(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var dl=function(g){_r(e,g);var t=al(e);function e(g,A,I){var C;return gr(this,e),(C=t.call(this,g,A,I))._rng=bC("FORCE ATLAS 2 BASED REPULSION SOLVER"),C}return er(e,[{key:"_calculateForces",value:function(g,t,e,A,I){0===g&&(t=g=.1*this._rng()),this.overlapAvoidanceFactor<1&&A.shape.radius&&(g=Math.max(.1+this.overlapAvoidanceFactor*A.shape.radius,g-A.shape.radius));var C=A.edges.length+1,i=this.options.gravitationalConstant*I.mass*A.options.mass*C/Math.pow(g,2),n=t*i,o=e*i;this.physicsBody.forces[A.id].x+=n,this.physicsBody.forces[A.id].y+=o}}]),e}(Cl);function ll(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var hl=function(g){_r(e,g);var t=ll(e);function e(g,A,I){return gr(this,e),t.call(this,g,A,I)}return er(e,[{key:"_calculateForces",value:function(g,t,e,A,I){if(g>0){var C=I.edges.length+1,i=this.options.centralGravity*C*I.options.mass;A[I.id].x=t*i,A[I.id].y=e*i}}}]),e}(sl),cl=function(){function g(t){gr(this,g),this.body=t,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},FC(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}return er(g,[{key:"bindEventListeners",value:function(){var g=this;this.body.emitter.on("initPhysics",(function(){g.initPhysics()})),this.body.emitter.on("_layoutFailed",(function(){g.layoutFailed=!0})),this.body.emitter.on("resetPhysics",(function(){g.stopSimulation(),g.ready=!1})),this.body.emitter.on("disablePhysics",(function(){g.physicsEnabled=!1,g.stopSimulation()})),this.body.emitter.on("restorePhysics",(function(){g.setOptions(g.options),!0===g.ready&&g.startSimulation()})),this.body.emitter.on("startSimulation",(function(){!0===g.ready&&g.startSimulation()})),this.body.emitter.on("stopSimulation",(function(){g.stopSimulation()})),this.body.emitter.on("destroy",(function(){g.stopSimulation(!1),g.body.emitter.off()})),this.body.emitter.on("_dataChanged",(function(){g.updatePhysicsData()}))}},{key:"setOptions",value:function(g){if(void 0!==g)if(!1===g)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(!0===g)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,LC(["stabilization"],this.options,g),si(this.options,g,"stabilization"),void 0===g.enabled&&(this.options.enabled=!0),!1===this.options.enabled&&(this.physicsEnabled=!1,this.stopSimulation());var t=this.options.wind;t&&(("number"!=typeof t.x||vr(t.x))&&(t.x=0),("number"!=typeof t.y||vr(t.y))&&(t.y=0)),this.timestep=this.options.timestep}this.init()}},{key:"init",value:function(){var g;"forceAtlas2Based"===this.options.solver?(g=this.options.forceAtlas2Based,this.nodesSolver=new dl(this.body,this.physicsBody,g),this.edgesSolver=new ol(this.body,this.physicsBody,g),this.gravitySolver=new hl(this.body,this.physicsBody,g)):"repulsion"===this.options.solver?(g=this.options.repulsion,this.nodesSolver=new il(this.body,this.physicsBody,g),this.edgesSolver=new ol(this.body,this.physicsBody,g),this.gravitySolver=new sl(this.body,this.physicsBody,g)):"hierarchicalRepulsion"===this.options.solver?(g=this.options.hierarchicalRepulsion,this.nodesSolver=new nl(this.body,this.physicsBody,g),this.edgesSolver=new rl(this.body,this.physicsBody,g),this.gravitySolver=new sl(this.body,this.physicsBody,g)):(g=this.options.barnesHut,this.nodesSolver=new Cl(this.body,this.physicsBody,g),this.edgesSolver=new ol(this.body,this.physicsBody,g),this.gravitySolver=new sl(this.body,this.physicsBody,g)),this.modelOptions=g}},{key:"initPhysics",value:function(){!0===this.physicsEnabled&&!0===this.options.enabled?!0===this.options.stabilization.enabled?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}},{key:"startSimulation",value:function(){var g;!0===this.physicsEnabled&&!0===this.options.enabled?(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),void 0===this.viewFunction&&(this.viewFunction=gg(g=this.simulationStep).call(g,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))):this.body.emitter.emit("_redraw")}},{key:"stopSimulation",value:function(){var g=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.stabilized=!0,!0===g&&this._emitStabilized(),void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,!0===g&&this.body.emitter.emit("_stopRendering"))}},{key:"simulationStep",value:function(){var g=fC();this.physicsTick(),(fC()-g<.4*this.simulationInterval||!0===this.runDoubleSpeed)&&!1===this.stabilized&&(this.physicsTick(),this.runDoubleSpeed=!0),!0===this.stabilized&&this.stopSimulation()}},{key:"_emitStabilized",value:function(){var g=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||!0===this.startedStabilization)&&rr((function(){g.body.emitter.emit("stabilized",{iterations:t}),g.startedStabilization=!1,g.stabilizationIterations=0}),0)}},{key:"physicsStep",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}},{key:"adjustTimeStep",value:function(){!0===this._evaluateStepQuality()?this.timestep=1.2*this.timestep:this.timestep/1.2<this.options.timestep?this.timestep=this.options.timestep:(this.adaptiveCounter=-1,this.timestep=Math.max(this.options.timestep,this.timestep/1.2))}},{key:"physicsTick",value:function(){if(this._startStabilizing(),!0!==this.stabilized){if(!0===this.adaptiveTimestep&&!0===this.adaptiveTimestepEnabled)this.adaptiveCounter%this.adaptiveInterval==0?(this.timestep=2*this.timestep,this.physicsStep(),this.revert(),this.timestep=.5*this.timestep,this.physicsStep(),this.physicsStep(),this.adjustTimeStep()):this.physicsStep(),this.adaptiveCounter+=1;else this.timestep=this.options.timestep,this.physicsStep();!0===this.stabilized&&this.revert(),this.stabilizationIterations++}}},{key:"updatePhysicsData",value:function(){this.physicsBody.forces={},this.physicsBody.physicsNodeIndices=[],this.physicsBody.physicsEdgeIndices=[];var g=this.body.nodes,t=this.body.edges;for(var e in g)g.hasOwnProperty(e)&&!0===g[e].options.physics&&this.physicsBody.physicsNodeIndices.push(g[e].id);for(var A in t)t.hasOwnProperty(A)&&!0===t[A].options.physics&&this.physicsBody.physicsEdgeIndices.push(t[A].id);for(var I=0;I<this.physicsBody.physicsNodeIndices.length;I++){var C=this.physicsBody.physicsNodeIndices[I];this.physicsBody.forces[C]={x:0,y:0},void 0===this.physicsBody.velocities[C]&&(this.physicsBody.velocities[C]={x:0,y:0})}for(var i in this.physicsBody.velocities)void 0===g[i]&&delete this.physicsBody.velocities[i]}},{key:"revert",value:function(){var g=GA(this.previousStates),t=this.body.nodes,e=this.physicsBody.velocities;this.referenceState={};for(var A=0;A<g.length;A++){var I=g[A];void 0!==t[I]?!0===t[I].options.physics&&(this.referenceState[I]={positions:{x:t[I].x,y:t[I].y}},e[I].x=this.previousStates[I].vx,e[I].y=this.previousStates[I].vy,t[I].x=this.previousStates[I].x,t[I].y=this.previousStates[I].y):delete this.previousStates[I]}}},{key:"_evaluateStepQuality",value:function(){var g,t,e=this.body.nodes,A=this.referenceState;for(var I in this.referenceState)if(this.referenceState.hasOwnProperty(I)&&void 0!==e[I]&&(g=e[I].x-A[I].positions.x,t=e[I].y-A[I].positions.y,Math.sqrt(Math.pow(g,2)+Math.pow(t,2))>.3))return!1;return!0}},{key:"moveNodes",value:function(){for(var g=this.physicsBody.physicsNodeIndices,t=0,e=0,A=0;A<g.length;A++){var I=g[A],C=this._performStep(I);t=Math.max(t,C),e+=C}this.adaptiveTimestepEnabled=e/g.length<5,this.stabilized=t<this.options.minVelocity}},{key:"calculateComponentVelocity",value:function(g,t,e){g+=(t-this.modelOptions.damping*g)/e*this.timestep;var A=this.options.maxVelocity||1e9;return Math.abs(g)>A&&(g=g>0?A:-A),g}},{key:"_performStep",value:function(g){var t=this.body.nodes[g],e=this.physicsBody.forces[g];this.options.wind&&(e.x+=this.options.wind.x,e.y+=this.options.wind.y);var A=this.physicsBody.velocities[g];return this.previousStates[g]={x:t.x,y:t.y,vx:A.x,vy:A.y},!1===t.options.fixed.x?(A.x=this.calculateComponentVelocity(A.x,e.x,t.options.mass),t.x+=A.x*this.timestep):(e.x=0,A.x=0),!1===t.options.fixed.y?(A.y=this.calculateComponentVelocity(A.y,e.y,t.options.mass),t.y+=A.y*this.timestep):(e.y=0,A.y=0),Math.sqrt(Math.pow(A.x,2)+Math.pow(A.y,2))}},{key:"_freezeNodes",value:function(){var g=this.body.nodes;for(var t in g)if(g.hasOwnProperty(t)&&g[t].x&&g[t].y){var e=g[t].options.fixed;this.freezeCache[t]={x:e.x,y:e.y},e.x=!0,e.y=!0}}},{key:"_restoreFrozenNodes",value:function(){var g=this.body.nodes;for(var t in g)g.hasOwnProperty(t)&&void 0!==this.freezeCache[t]&&(g[t].options.fixed.x=this.freezeCache[t].x,g[t].options.fixed.y=this.freezeCache[t].y);this.freezeCache={}}},{key:"stabilize",value:function(){var g=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.stabilization.iterations;"number"!=typeof t&&(t=this.options.stabilization.iterations,console.log("The stabilize method needs a numeric amount of iterations. Switching to default: ",t)),0!==this.physicsBody.physicsNodeIndices.length?(this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=t,!0===this.options.stabilization.onlyDynamicEdges&&this._freezeNodes(),this.stabilizationIterations=0,rr((function(){return g._stabilizationBatch()}),0)):this.ready=!0}},{key:"_startStabilizing",value:function(){return!0!==this.startedStabilization&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}},{key:"_stabilizationBatch",value:function(){var g=this,t=function(){return!1===g.stabilized&&g.stabilizationIterations<g.targetIterations},e=function(){g.body.emitter.emit("stabilizationProgress",{iterations:g.stabilizationIterations,total:g.targetIterations})};this._startStabilizing()&&e();for(var A,I=0;t()&&I<this.options.stabilization.updateInterval;)this.physicsTick(),I++;(e(),t())?rr(gg(A=this._stabilizationBatch).call(A,this),0):this._finalizeStabilization()}},{key:"_finalizeStabilization",value:function(){this.body.emitter.emit("_allowRedraw"),!0===this.options.stabilization.fit&&this.body.emitter.emit("fit"),!0===this.options.stabilization.onlyDynamicEdges&&this._restoreFrozenNodes(),this.body.emitter.emit("stabilizationIterationsDone"),this.body.emitter.emit("_requestRedraw"),!0===this.stabilized?this._emitStabilized():this.startSimulation(),this.ready=!0}},{key:"_drawForces",value:function(g){for(var t=0;t<this.physicsBody.physicsNodeIndices.length;t++){var e=this.physicsBody.physicsNodeIndices[t],A=this.body.nodes[e],I=this.physicsBody.forces[e],C=Math.sqrt(Math.pow(I.x,2)+Math.pow(I.x,2)),i=Math.min(Math.max(5,C),15),n=3*i,o=Ii((180-180*Math.min(1,Math.max(0,.03*C)))/360,1,1),r={x:A.x+20*I.x,y:A.y+20*I.y};g.lineWidth=i,g.strokeStyle=o,g.beginPath(),g.moveTo(A.x,A.y),g.lineTo(r.x,r.y),g.stroke();var s=Math.atan2(I.y,I.x);g.fillStyle=o,Yd.draw(g,{type:"arrow",point:r,angle:s,length:n}),ka(g).call(g)}}}]),g}(),ul=[].reverse,fl=[1,2];X({target:"Array",proto:!0,forced:String(fl)===String(fl.reverse())},{reverse:function(){return Kt(this)&&(this.length=this.length),ul.call(this)}});var pl=K("Array").reverse,vl=Array.prototype,yl=function(g){var t=g.reverse;return g===vl||g instanceof Array&&t===vl.reverse?pl:t},ml=function(){function g(){gr(this,g)}return er(g,null,[{key:"getRange",value:function(g){var t,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],A=1e9,I=-1e9,C=1e9,i=-1e9;if(e.length>0)for(var n=0;n<e.length;n++)C>(t=g[e[n]]).shape.boundingBox.left&&(C=t.shape.boundingBox.left),i<t.shape.boundingBox.right&&(i=t.shape.boundingBox.right),A>t.shape.boundingBox.top&&(A=t.shape.boundingBox.top),I<t.shape.boundingBox.bottom&&(I=t.shape.boundingBox.bottom);return 1e9===C&&-1e9===i&&1e9===A&&-1e9===I&&(A=0,I=0,C=0,i=0),{minX:C,maxX:i,minY:A,maxY:I}}},{key:"getRangeCore",value:function(g){var t,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],A=1e9,I=-1e9,C=1e9,i=-1e9;if(e.length>0)for(var n=0;n<e.length;n++)C>(t=g[e[n]]).x&&(C=t.x),i<t.x&&(i=t.x),A>t.y&&(A=t.y),I<t.y&&(I=t.y);return 1e9===C&&-1e9===i&&1e9===A&&-1e9===I&&(A=0,I=0,C=0,i=0),{minX:C,maxX:i,minY:A,maxY:I}}},{key:"findCenter",value:function(g){return{x:.5*(g.maxX+g.minX),y:.5*(g.maxY+g.minY)}}},{key:"cloneOptions",value:function(g,t){var e={};return void 0===t||"node"===t?(QC(e,g.options,!0),e.x=g.x,e.y=g.y,e.amountOfConnections=g.edges.length):QC(e,g.options,!0),e}}]),g}();function bl(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var wl=function(g){_r(e,g);var t=bl(e);function e(g,A,I,C,i,n){var o;return gr(this,e),(o=t.call(this,g,A,I,C,i,n)).isCluster=!0,o.containedNodes={},o.containedEdges={},o}return er(e,[{key:"_openChildCluster",value:function(g){var t=this,e=this.body.nodes[g];if(void 0===this.containedNodes[g])throw new Error("node with id: "+g+" not in current cluster");if(!e.isCluster)throw new Error("node with id: "+g+" is not a cluster");delete this.containedNodes[g],VC(e.edges,(function(g){delete t.containedEdges[g.id]})),VC(e.containedNodes,(function(g,e){t.containedNodes[e]=g})),e.containedNodes={},VC(e.containedEdges,(function(g,e){t.containedEdges[e]=g})),e.containedEdges={},VC(e.edges,(function(g){VC(t.edges,(function(e){var A,I,C=IC(A=e.clusteringEdgeReplacingIds).call(A,g.id);-1!==C&&(VC(g.clusteringEdgeReplacingIds,(function(g){e.clusteringEdgeReplacingIds.push(g),t.body.edges[g].edgeReplacedById=e.id})),yi(I=e.clusteringEdgeReplacingIds).call(I,C,1))}))})),e.edges=[]}}]),e}(ld),xl=function(){function g(t){var e=this;gr(this,g),this.body=t,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},FC(this.options,this.defaultOptions),this.body.emitter.on("_resetData",(function(){e.clusteredNodes={},e.clusteredEdges={}}))}return er(g,[{key:"clusterByHubsize",value:function(g,t){void 0===g?g=this._getHubSize():"object"===dC(g)&&(t=this._checkOptions(g),g=this._getHubSize());for(var e=[],A=0;A<this.body.nodeIndices.length;A++){var I=this.body.nodes[this.body.nodeIndices[A]];I.edges.length>=g&&e.push(I.id)}for(var C=0;C<e.length;C++)this.clusterByConnection(e[C],t,!0);this.body.emitter.emit("_dataChanged")}},{key:"cluster",value:function(){var g=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=!(arguments.length>1&&void 0!==arguments[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);var A={},I={};VC(this.body.nodes,(function(e,C){e.options&&!0===t.joinCondition(e.options)&&(A[C]=e,VC(e.edges,(function(t){void 0===g.clusteredEdges[t.id]&&(I[t.id]=t)})))})),this._cluster(A,I,t,e)}},{key:"clusterByEdgeCount",value:function(g,t){var e=this,A=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t=this._checkOptions(t);for(var I,C,i,n=[],o={},r=function(A){var r={},s={},l=e.body.nodeIndices[A],h=e.body.nodes[l];if(void 0===o[l]){i=0,C=[];for(var c=0;c<h.edges.length;c++)I=h.edges[c],void 0===e.clusteredEdges[I.id]&&(I.toId!==I.fromId&&i++,C.push(I));if(i===g){a=function(g){if(void 0===t.joinCondition||null===t.joinCondition)return!0;var e=ml.cloneOptions(g);return t.joinCondition(e)};for(var u=!0,f=0;f<C.length;f++){I=C[f];var p=e._getConnectedId(I,l);if(!a(h)){u=!1;break}s[I.id]=I,r[l]=h,r[p]=e.body.nodes[p],o[l]=!0}if(GA(r).length>0&&GA(s).length>0&&!0===u)if(void 0!==(d=function(){for(var g=0;g<n.length;++g)for(var t in r)if(void 0!==n[g].nodes[t])return n[g]}())){for(var v in r)void 0===d.nodes[v]&&(d.nodes[v]=r[v]);for(var y in s)void 0===d.edges[y]&&(d.edges[y]=s[y])}else n.push({nodes:r,edges:s})}}},s=0;s<this.body.nodeIndices.length;s++){var a,d;r(s)}for(var l=0;l<n.length;l++)this._cluster(n[l].nodes,n[l].edges,t,!1);!0===A&&this.body.emitter.emit("_dataChanged")}},{key:"clusterOutliers",value:function(g){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.clusterByEdgeCount(1,g,t)}},{key:"clusterBridges",value:function(g){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.clusterByEdgeCount(2,g,t)}},{key:"clusterByConnection",value:function(g,t){var e,A=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0===g)throw new Error("No nodeId supplied to clusterByConnection!");if(void 0===this.body.nodes[g])throw new Error("The nodeId given to clusterByConnection does not exist!");var I=this.body.nodes[g];void 0===(t=this._checkOptions(t,I)).clusterNodeProperties.x&&(t.clusterNodeProperties.x=I.x),void 0===t.clusterNodeProperties.y&&(t.clusterNodeProperties.y=I.y),void 0===t.clusterNodeProperties.fixed&&(t.clusterNodeProperties.fixed={},t.clusterNodeProperties.fixed.x=I.options.fixed.x,t.clusterNodeProperties.fixed.y=I.options.fixed.y);var C={},i={},n=I.id,o=ml.cloneOptions(I);C[n]=I;for(var r=0;r<I.edges.length;r++){var s=I.edges[r];if(void 0===this.clusteredEdges[s.id]){var a=this._getConnectedId(s,n);if(void 0===this.clusteredNodes[a])if(a!==n)if(void 0===t.joinCondition)i[s.id]=s,C[a]=this.body.nodes[a];else{var d=ml.cloneOptions(this.body.nodes[a]);!0===t.joinCondition(o,d)&&(i[s.id]=s,C[a]=this.body.nodes[a])}else i[s.id]=s}}var l=nI(e=GA(C)).call(e,(function(g){return C[g].id}));for(h in C)if(C.hasOwnProperty(h))for(var h=C[h],c=0;c<h.edges.length;c++){var u=h.edges[c];IC(l).call(l,this._getConnectedId(u,h.id))>-1&&(i[u.id]=u)}this._cluster(C,i,t,A)}},{key:"_createClusterEdges",value:function(g,t,e,A){for(var I,C,i,n,o,r,s=GA(g),a=[],d=0;d<s.length;d++){i=g[C=s[d]];for(var l=0;l<i.edges.length;l++)I=i.edges[l],void 0===this.clusteredEdges[I.id]&&(I.toId==I.fromId?t[I.id]=I:I.toId==C?(n=e.id,r=o=I.fromId):(n=I.toId,o=e.id,r=n),void 0===g[r]&&a.push({edge:I,fromId:o,toId:n}))}for(var h=[],c=function(g){for(var t=0;t<h.length;t++){var e=h[t],A=g.fromId===e.fromId&&g.toId===e.toId,I=g.fromId===e.toId&&g.toId===e.fromId;if(A||I)return e}return null},u=0;u<a.length;u++){var f=a[u],p=f.edge,v=c(f);null===v?(v=this._createClusteredEdge(f.fromId,f.toId,p,A),h.push(v)):v.clusteringEdgeReplacingIds.push(p.id),this.body.edges[p.id].edgeReplacedById=v.id,this._backupEdgeOptions(p),p.setOptions({physics:!1})}}},{key:"_checkOptions",value:function(){var g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return void 0===g.clusterEdgeProperties&&(g.clusterEdgeProperties={}),void 0===g.clusterNodeProperties&&(g.clusterNodeProperties={}),g}},{key:"_cluster",value:function(g,t,e){var A=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],I=[];for(var C in g)g.hasOwnProperty(C)&&void 0!==this.clusteredNodes[C]&&I.push(C);for(var i=0;i<I.length;++i)delete g[I[i]];if(0!=GA(g).length&&(1!=GA(g).length||1==e.clusterNodeProperties.allowSingleNodeCluster)){var n=QC({},e.clusterNodeProperties);if(void 0!==e.processProperties){var o=[];for(var r in g)if(g.hasOwnProperty(r)){var s=ml.cloneOptions(g[r]);o.push(s)}var a=[];for(var d in t)if(t.hasOwnProperty(d)&&"clusterEdge:"!==d.substr(0,12)){var l=ml.cloneOptions(t[d],"edge");a.push(l)}if(!(n=e.processProperties(n,o,a)))throw new Error("The processProperties function does not return properties!")}void 0===n.id&&(n.id="cluster:"+Ps());var h=n.id;void 0===n.label&&(n.label="cluster");var c=void 0;void 0===n.x&&(c=this._getClusterPosition(g),n.x=c.x),void 0===n.y&&(void 0===c&&(c=this._getClusterPosition(g)),n.y=c.y),n.id=h;var u=this.body.functions.createNode(n,wl);u.containedNodes=g,u.containedEdges=t,u.clusterEdgeProperties=e.clusterEdgeProperties,this.body.nodes[n.id]=u,this._clusterEdges(g,t,n,e.clusterEdgeProperties),n.id=void 0,!0===A&&this.body.emitter.emit("_dataChanged")}}},{key:"_backupEdgeOptions",value:function(g){void 0===this.clusteredEdges[g.id]&&(this.clusteredEdges[g.id]={physics:g.options.physics})}},{key:"_restoreEdge",value:function(g){var t=this.clusteredEdges[g.id];void 0!==t&&(g.setOptions({physics:t.physics}),delete this.clusteredEdges[g.id])}},{key:"isCluster",value:function(g){return void 0!==this.body.nodes[g]?!0===this.body.nodes[g].isCluster:(console.log("Node does not exist."),!1)}},{key:"_getClusterPosition",value:function(g){for(var t,e=GA(g),A=g[e[0]].x,I=g[e[0]].x,C=g[e[0]].y,i=g[e[0]].y,n=1;n<e.length;n++)A=(t=g[e[n]]).x<A?t.x:A,I=t.x>I?t.x:I,C=t.y<C?t.y:C,i=t.y>i?t.y:i;return{x:.5*(A+I),y:.5*(C+i)}}},{key:"openCluster",value:function(g,t){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0===g)throw new Error("No clusterNodeId supplied to openCluster.");var A=this.body.nodes[g];if(void 0===A)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(!0!==A.isCluster||void 0===A.containedNodes||void 0===A.containedEdges)throw new Error("The node:"+g+" is not a valid cluster.");var I=this.findNode(g),C=IC(I).call(I,g)-1;if(C>=0){var i=I[C],n=this.body.nodes[i];return n._openChildCluster(g),delete this.body.nodes[g],void(!0===e&&this.body.emitter.emit("_dataChanged"))}var o=A.containedNodes,r=A.containedEdges;if(void 0!==t&&void 0!==t.releaseFunction&&"function"==typeof t.releaseFunction){var s={},a={x:A.x,y:A.y};for(var d in o)if(o.hasOwnProperty(d)){var l=this.body.nodes[d];s[d]={x:l.x,y:l.y}}var h=t.releaseFunction(a,s);for(var c in o)if(o.hasOwnProperty(c)){var u=this.body.nodes[c];void 0!==h[c]&&(u.x=void 0===h[c].x?A.x:h[c].x,u.y=void 0===h[c].y?A.y:h[c].y)}}else VC(o,(function(g){!1===g.options.fixed.x&&(g.x=A.x),!1===g.options.fixed.y&&(g.y=A.y)}));for(var f in o)if(o.hasOwnProperty(f)){var p=this.body.nodes[f];p.vx=A.vx,p.vy=A.vy,p.setOptions({physics:!0}),delete this.clusteredNodes[f]}for(var v=[],y=0;y<A.edges.length;y++)v.push(A.edges[y]);for(var m=0;m<v.length;m++){for(var b=v[m],w=this._getConnectedId(b,g),x=this.clusteredNodes[w],k=0;k<b.clusteringEdgeReplacingIds.length;k++){var D=b.clusteringEdgeReplacingIds[k],O=this.body.edges[D];if(void 0!==O)if(void 0!==x){var N=this.body.nodes[x.clusterId];N.containedEdges[O.id]=O,delete r[O.id];var Z=O.fromId,M=O.toId;O.toId==w?M=x.clusterId:Z=x.clusterId,this._createClusteredEdge(Z,M,O,N.clusterEdgeProperties,{hidden:!1,physics:!0})}else this._restoreEdge(O)}b.remove()}for(var E in r)r.hasOwnProperty(E)&&this._restoreEdge(r[E]);delete this.body.nodes[g],!0===e&&this.body.emitter.emit("_dataChanged")}},{key:"getNodesInCluster",value:function(g){var t=[];if(!0===this.isCluster(g)){var e=this.body.nodes[g].containedNodes;for(var A in e)e.hasOwnProperty(A)&&t.push(this.body.nodes[A].id)}return t}},{key:"findNode",value:function(g){for(var t,e=[],A=0;void 0!==this.clusteredNodes[g]&&A<100;){if(void 0===(t=this.body.nodes[g]))return[];e.push(t.id),g=this.clusteredNodes[g].clusterId,A++}return void 0===(t=this.body.nodes[g])?[]:(e.push(t.id),yl(e).call(e),e)}},{key:"updateClusteredNode",value:function(g,t){if(void 0===g)throw new Error("No clusteredNodeId supplied to updateClusteredNode.");if(void 0===t)throw new Error("No newOptions supplied to updateClusteredNode.");if(void 0===this.body.nodes[g])throw new Error("The clusteredNodeId supplied to updateClusteredNode does not exist.");this.body.nodes[g].setOptions(t),this.body.emitter.emit("_dataChanged")}},{key:"updateEdge",value:function(g,t){if(void 0===g)throw new Error("No startEdgeId supplied to updateEdge.");if(void 0===t)throw new Error("No newOptions supplied to updateEdge.");if(void 0===this.body.edges[g])throw new Error("The startEdgeId supplied to updateEdge does not exist.");for(var e=this.getClusteredEdges(g),A=0;A<e.length;A++){this.body.edges[e[A]].setOptions(t)}this.body.emitter.emit("_dataChanged")}},{key:"getClusteredEdges",value:function(g){for(var t=[],e=0;void 0!==g&&void 0!==this.body.edges[g]&&e<100;)t.push(this.body.edges[g].id),g=this.body.edges[g].edgeReplacedById,e++;return yl(t).call(t),t}},{key:"getBaseEdge",value:function(g){return this.getBaseEdges(g)[0]}},{key:"getBaseEdges",value:function(g){for(var t=[g],e=[],A=[],I=0;t.length>0&&I<100;){var C=t.pop();if(void 0!==C){var i=this.body.edges[C];if(void 0!==i){I++;var n=i.clusteringEdgeReplacingIds;if(void 0===n)A.push(C);else for(var o=0;o<n.length;++o){var r=n[o];-1===IC(t).call(t,n)&&-1===IC(e).call(e,n)&&t.push(r)}e.push(C)}}}return A}},{key:"_getConnectedId",value:function(g,t){return g.toId!=t?g.toId:(g.fromId,g.fromId)}},{key:"_getHubSize",value:function(){for(var g=0,t=0,e=0,A=0,I=0;I<this.body.nodeIndices.length;I++){var C=this.body.nodes[this.body.nodeIndices[I]];C.edges.length>A&&(A=C.edges.length),g+=C.edges.length,t+=Math.pow(C.edges.length,2),e+=1}g/=e;var i=(t/=e)-Math.pow(g,2),n=Math.sqrt(i),o=Math.floor(g+2*n);return o>A&&(o=A),o}},{key:"_createClusteredEdge",value:function(g,t,e,A,I){var C=ml.cloneOptions(e,"edge");QC(C,A),C.from=g,C.to=t,C.id="clusterEdge:"+Ps(),void 0!==I&&QC(C,I);var i=this.body.functions.createEdge(C);return i.clusteringEdgeReplacingIds=[e.id],i.connect(),this.body.edges[i.id]=i,i}},{key:"_clusterEdges",value:function(g,t,e,A){if(t instanceof Al){var I=t,C={};C[I.id]=I,t=C}if(g instanceof ld){var i=g,n={};n[i.id]=i,g=n}if(null==e)throw new Error("_clusterEdges: parameter clusterNode required");for(var o in void 0===A&&(A=e.clusterEdgeProperties),this._createClusterEdges(g,t,e,A),t)if(t.hasOwnProperty(o)&&void 0!==this.body.edges[o]){var r=this.body.edges[o];this._backupEdgeOptions(r),r.setOptions({physics:!1})}for(var s in g)g.hasOwnProperty(s)&&(this.clusteredNodes[s]={clusterId:e.id,node:this.body.nodes[s]},this.body.nodes[s].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(g){if(void 0!==g){var t=this.clusteredNodes[g];if(void 0!==t){var e=t.clusterId;if(void 0!==e)return this.body.nodes[e]}}}},{key:"_filter",value:function(g,t){var e=[];return VC(g,(function(g){t(g)&&e.push(g)})),e}},{key:"_updateState",value:function(){var g,t=this,e=[],A={},I=function(g){VC(t.body.nodes,(function(t){!0===t.isCluster&&g(t)}))};for(g in this.clusteredNodes){if(this.clusteredNodes.hasOwnProperty(g))void 0===this.body.nodes[g]&&e.push(g)}I((function(g){for(var t=0;t<e.length;t++)delete g.containedNodes[e[t]]}));for(var C=0;C<e.length;C++)delete this.clusteredNodes[e[C]];VC(this.clusteredEdges,(function(g){var e=t.body.edges[g];void 0!==e&&e.endPointsValid()||(A[g]=g)})),I((function(g){VC(g.containedEdges,(function(g,t){g.endPointsValid()||A[t]||(A[t]=t)}))})),VC(this.body.edges,(function(g,e){var I=!0,C=g.clusteringEdgeReplacingIds;if(void 0!==C){var i=0;VC(C,(function(g){var e=t.body.edges[g];void 0!==e&&e.endPointsValid()&&(i+=1)})),I=i>0}g.endPointsValid()&&I||(A[e]=e)})),I((function(g){VC(A,(function(e){delete g.containedEdges[e],VC(g.edges,(function(I,C){I.id!==e?I.clusteringEdgeReplacingIds=t._filter(I.clusteringEdgeReplacingIds,(function(g){return!A[g]})):g.edges[C]=null})),g.edges=t._filter(g.edges,(function(g){return null!==g}))}))})),VC(A,(function(g){delete t.clusteredEdges[g]})),VC(A,(function(g){delete t.body.edges[g]})),VC(GA(this.body.edges),(function(g){var e=t.body.edges[g],A=t._isClusteredNode(e.fromId)||t._isClusteredNode(e.toId);if(A!==t._isClusteredEdge(e.id))if(A){var I=t._getClusterNodeForNode(e.fromId);void 0!==I&&t._clusterEdges(t.body.nodes[e.fromId],e,I);var C=t._getClusterNodeForNode(e.toId);void 0!==C&&t._clusterEdges(t.body.nodes[e.toId],e,C)}else delete t._clusterEdges[g],t._restoreEdge(e)}));for(var i=!1,n=!0,o=function(){var g=[];I((function(t){var e=GA(t.containedNodes).length,A=!0===t.options.allowSingleNodeCluster;(A&&e<1||!A&&e<2)&&g.push(t.id)}));for(var e=0;e<g.length;++e)t.openCluster(g[e],{},!1);n=g.length>0,i=i||n};n;)o();i&&this._updateState()}},{key:"_isClusteredNode",value:function(g){return void 0!==this.clusteredNodes[g]}},{key:"_isClusteredEdge",value:function(g){return void 0!==this.clusteredEdges[g]}}]),g}();var kl=function(){function g(t,e){var A;gr(this,g),void 0!==window&&(A=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),window.requestAnimationFrame=void 0===A?function(g){g()}:A,this.body=t,this.canvas=e,this.redrawRequested=!1,this.renderTimer=void 0,this.requiresTimeout=!0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},FC(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}return er(g,[{key:"bindEventListeners",value:function(){var g,t=this;this.body.emitter.on("dragStart",(function(){t.dragging=!0})),this.body.emitter.on("dragEnd",(function(){t.dragging=!1})),this.body.emitter.on("zoom",(function(){t.zooming=!0,window.clearTimeout(t.zoomTimeoutId),t.zoomTimeoutId=window.setTimeout((function(){var g;t.zooming=!1,gg(g=t._requestRedraw).call(g,t)()}),250)})),this.body.emitter.on("_resizeNodes",(function(){t._resizeNodes()})),this.body.emitter.on("_redraw",(function(){!1===t.renderingActive&&t._redraw()})),this.body.emitter.on("_blockRedraw",(function(){t.allowRedraw=!1})),this.body.emitter.on("_allowRedraw",(function(){t.allowRedraw=!0,t.redrawRequested=!1})),this.body.emitter.on("_requestRedraw",gg(g=this._requestRedraw).call(g,this)),this.body.emitter.on("_startRendering",(function(){t.renderRequests+=1,t.renderingActive=!0,t._startRendering()})),this.body.emitter.on("_stopRendering",(function(){t.renderRequests-=1,t.renderingActive=t.renderRequests>0,t.renderTimer=void 0})),this.body.emitter.on("destroy",(function(){t.renderRequests=0,t.allowRedraw=!1,t.renderingActive=!1,!0===t.requiresTimeout?clearTimeout(t.renderTimer):window.cancelAnimationFrame(t.renderTimer),t.body.emitter.off()}))}},{key:"setOptions",value:function(g){if(void 0!==g){SC(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"],this.options,g)}}},{key:"_requestNextFrame",value:function(g,t){if("undefined"!=typeof window){var e,A=window;return!0===this.requiresTimeout?e=A.setTimeout(g,t):A.requestAnimationFrame&&(e=A.requestAnimationFrame(g)),e}}},{key:"_startRendering",value:function(){var g;!0===this.renderingActive&&(void 0===this.renderTimer&&(this.renderTimer=this._requestNextFrame(gg(g=this._renderStep).call(g,this),this.simulationInterval)))}},{key:"_renderStep",value:function(){!0===this.renderingActive&&(this.renderTimer=void 0,!0===this.requiresTimeout&&this._startRendering(),this._redraw(),!1===this.requiresTimeout&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var g=this;!0!==this.redrawRequested&&!1===this.renderingActive&&!0===this.allowRedraw&&(this.redrawRequested=!0,this._requestNextFrame((function(){g._redraw(!1)}),0))}},{key:"_redraw",value:function(){var g=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!0===this.allowRedraw){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1,0!==this.canvas.frame.canvas.width&&0!==this.canvas.frame.canvas.height||this.canvas.setSize(),this.canvas.setTransform();var t=this.canvas.getContext(),e=this.canvas.frame.canvas.clientWidth,A=this.canvas.frame.canvas.clientHeight;if(t.clearRect(0,0,e,A),0===this.canvas.frame.clientWidth)return;t.save(),t.translate(this.body.view.translation.x,this.body.view.translation.y),t.scale(this.body.view.scale,this.body.view.scale),t.beginPath(),this.body.emitter.emit("beforeDrawing",t),t.closePath(),!1===g&&(!1===this.dragging||!0===this.dragging&&!1===this.options.hideEdgesOnDrag)&&(!1===this.zooming||!0===this.zooming&&!1===this.options.hideEdgesOnZoom)&&this._drawEdges(t),(!1===this.dragging||!0===this.dragging&&!1===this.options.hideNodesOnDrag)&&this._drawNodes(t,g),t.beginPath(),this.body.emitter.emit("afterDrawing",t),t.closePath(),t.restore(),!0===g&&t.clearRect(0,0,e,A)}}},{key:"_resizeNodes",value:function(){this.canvas.setTransform();var g=this.canvas.getContext();g.save(),g.translate(this.body.view.translation.x,this.body.view.translation.y),g.scale(this.body.view.scale,this.body.view.scale);var t,e=this.body.nodes;for(var A in e)e.hasOwnProperty(A)&&((t=e[A]).resize(g),t.updateBoundingBox(g,t.selected));g.restore()}},{key:"_drawNodes",value:function(g){for(var t,e,A=arguments.length>1&&void 0!==arguments[1]&&arguments[1],I=this.body.nodes,C=this.body.nodeIndices,i=[],n=[],o=20,r=this.canvas.DOMtoCanvas({x:-o,y:-o}),s=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+o,y:this.canvas.frame.canvas.clientHeight+o}),a={top:r.y,left:r.x,bottom:s.y,right:s.x},d=0;d<C.length;d++)(t=I[C[d]]).hover?n.push(C[d]):t.isSelected()?i.push(C[d]):!0===A||!0===t.isBoundingBoxOverlappingWith(a)?t.draw(g):t.updateBoundingBox(g,t.selected);var l=i.length,h=n.length;for(e=0;e<l;e++)(t=I[i[e]]).draw(g);for(e=0;e<h;e++)(t=I[n[e]]).draw(g)}},{key:"_drawEdges",value:function(g){for(var t,e=this.body.edges,A=this.body.edgeIndices,I=0;I<A.length;I++)!0===(t=e[A[I]]).connected&&t.draw(g)}},{key:"_determineBrowserMethod",value:function(){if("undefined"!=typeof window){var g=navigator.userAgent.toLowerCase();this.requiresTimeout=!1,(-1!=IC(g).call(g,"msie 9.0")||-1!=IC(g).call(g,"safari")&&IC(g).call(g,"chrome")<=-1)&&(this.requiresTimeout=!0)}else this.requiresTimeout=!0}}]),g}(),Dl=S.setInterval,Ol=A((function(g,t){t.onTouch=function(g,t){t.inputHandler=function(g){g.isFirst&&t(g)},g.on("hammer.input",t.inputHandler)},t.onRelease=function(g,t){return t.inputHandler=function(g){g.isFinal&&t(g)},g.on("hammer.input",t.inputHandler)},t.offTouch=function(g,t){g.off("hammer.input",t.inputHandler)},t.offRelease=t.offTouch,t.disablePreventDefaultVertically=function(g){return g.getTouchAction=function(){return["pan-y"]},g}})),Nl=(Ol.onTouch,Ol.onRelease,Ol.offTouch,Ol.offRelease,Ol.disablePreventDefaultVertically,function(){function g(t){var e;gr(this,g),this.body=t,this.pixelRatio=1,this.resizeTimer=void 0,this.resizeFunction=gg(e=this._onResize).call(e,this),this.cameraState={},this.initialized=!1,this.canvasViewCenter={},this.options={},this.defaultOptions={autoResize:!0,height:"100%",width:"100%"},FC(this.options,this.defaultOptions),this.bindEventListeners()}return er(g,[{key:"bindEventListeners",value:function(){var g,t=this;this.body.emitter.once("resize",(function(g){0!==g.width&&(t.body.view.translation.x=.5*g.width),0!==g.height&&(t.body.view.translation.y=.5*g.height)})),this.body.emitter.on("setSize",gg(g=this.setSize).call(g,this)),this.body.emitter.on("destroy",(function(){t.hammerFrame.destroy(),t.hammer.destroy(),t._cleanUp()}))}},{key:"setOptions",value:function(g){var t,e=this;if(void 0!==g){SC(["width","height","autoResize"],this.options,g)}!0===this.options.autoResize&&(this._cleanUp(),this.resizeTimer=Dl((function(){!0===e.setSize()&&e.body.emitter.emit("_requestRedraw")}),1e3),this.resizeFunction=gg(t=this._onResize).call(t,this),UC(window,"resize",this.resizeFunction))}},{key:"_cleanUp",value:function(){void 0!==this.resizeTimer&&clearInterval(this.resizeTimer),_C(window,"resize",this.resizeFunction),this.resizeFunction=void 0}},{key:"_onResize",value:function(){this.setSize(),this.body.emitter.emit("_redraw")}},{key:"_getCameraState",value:function(){var g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.pixelRatio;!0===this.initialized&&(this.cameraState.previousWidth=this.frame.canvas.width/g,this.cameraState.previousHeight=this.frame.canvas.height/g,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/g,y:.5*this.frame.canvas.height/g}))}},{key:"_setCameraState",value:function(){if(void 0!==this.cameraState.scale&&0!==this.frame.canvas.clientWidth&&0!==this.frame.canvas.clientHeight&&0!==this.pixelRatio&&this.cameraState.previousWidth>0&&this.cameraState.previousHeight>0){var g=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,t=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,e=this.cameraState.scale;1!=g&&1!=t?e=.5*this.cameraState.scale*(g+t):1!=g?e=this.cameraState.scale*g:1!=t&&(e=this.cameraState.scale*t),this.body.view.scale=e;var A=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),I={x:A.x-this.cameraState.position.x,y:A.y-this.cameraState.position.y};this.body.view.translation.x+=I.x*this.body.view.scale,this.body.view.translation.y+=I.y*this.body.view.scale}}},{key:"_prepareValue",value:function(g){if("number"==typeof g)return g+"px";if("string"==typeof g){if(-1!==IC(g).call(g,"%")||-1!==IC(g).call(g,"px"))return g;if(-1===IC(g).call(g,"%"))return g+"px"}throw new Error("Could not use the value supplied for width or height:"+g)}},{key:"_create",value:function(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=900,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{var g=document.createElement("DIV");g.style.color="red",g.style.fontWeight="bold",g.style.padding="10px",g.innerHTML="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(g)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var g=this;void 0!==this.hammer&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new Ho(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:Ho.DIRECTION_ALL}),Ol.onTouch(this.hammer,(function(t){g.body.eventListeners.onTouch(t)})),this.hammer.on("tap",(function(t){g.body.eventListeners.onTap(t)})),this.hammer.on("doubletap",(function(t){g.body.eventListeners.onDoubleTap(t)})),this.hammer.on("press",(function(t){g.body.eventListeners.onHold(t)})),this.hammer.on("panstart",(function(t){g.body.eventListeners.onDragStart(t)})),this.hammer.on("panmove",(function(t){g.body.eventListeners.onDrag(t)})),this.hammer.on("panend",(function(t){g.body.eventListeners.onDragEnd(t)})),this.hammer.on("pinch",(function(t){g.body.eventListeners.onPinch(t)})),this.frame.canvas.addEventListener("wheel",(function(t){g.body.eventListeners.onMouseWheel(t)})),this.frame.canvas.addEventListener("mousemove",(function(t){g.body.eventListeners.onMouseMove(t)})),this.frame.canvas.addEventListener("contextmenu",(function(t){g.body.eventListeners.onContext(t)})),this.hammerFrame=new Ho(this.frame),Ol.onRelease(this.hammerFrame,(function(t){g.body.eventListeners.onRelease(t)}))}},{key:"setSize",value:function(){var g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.width,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.height;g=this._prepareValue(g),t=this._prepareValue(t);var e=!1,A=this.frame.canvas.width,I=this.frame.canvas.height,C=this.pixelRatio;if(this._setPixelRatio(),g!=this.options.width||t!=this.options.height||this.frame.style.width!=g||this.frame.style.height!=t)this._getCameraState(C),this.frame.style.width=g,this.frame.style.height=t,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=g,this.options.height=t,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},e=!0;else{var i=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),n=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);this.frame.canvas.width===i&&this.frame.canvas.height===n||this._getCameraState(C),this.frame.canvas.width!==i&&(this.frame.canvas.width=i,e=!0),this.frame.canvas.height!==n&&(this.frame.canvas.height=n,e=!0)}return!0===e&&(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(A/this.pixelRatio),oldHeight:Math.round(I/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,e}},{key:"getContext",value:function(){return this.frame.canvas.getContext("2d")}},{key:"_determinePixelRatio",value:function(){var g=this.getContext();if(void 0===g)throw new Error("Could not get canvax context");var t=1;return"undefined"!=typeof window&&(t=window.devicePixelRatio||1),t/(g.webkitBackingStorePixelRatio||g.mozBackingStorePixelRatio||g.msBackingStorePixelRatio||g.oBackingStorePixelRatio||g.backingStorePixelRatio||1)}},{key:"_setPixelRatio",value:function(){this.pixelRatio=this._determinePixelRatio()}},{key:"setTransform",value:function(){var g=this.getContext();if(void 0===g)throw new Error("Could not get canvax context");g.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}},{key:"_XconvertDOMtoCanvas",value:function(g){return(g-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(g){return g*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(g){return(g-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(g){return g*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(g){return{x:this._XconvertCanvasToDOM(g.x),y:this._YconvertCanvasToDOM(g.y)}}},{key:"DOMtoCanvas",value:function(g){return{x:this._XconvertDOMtoCanvas(g.x),y:this._YconvertDOMtoCanvas(g.y)}}}]),g}()),Zl=function(){function g(t,e){var A,I,C=this;gr(this,g),this.body=t,this.canvas=e,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",gg(A=this.fit).call(A,this)),this.body.emitter.on("animationFinished",(function(){C.body.emitter.emit("_stopRendering")})),this.body.emitter.on("unlockNode",gg(I=this.releaseNode).call(I,this))}return er(g,[{key:"setOptions",value:function(){var g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=g}},{key:"fit",value:function(){var g,t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{nodes:[]},A=arguments.length>1&&void 0!==arguments[1]&&arguments[1];void 0!==(e=rC({},e)).nodes&&0!==e.nodes.length||(e.nodes=this.body.nodeIndices);var I=this.canvas.frame.canvas.clientWidth,C=this.canvas.frame.canvas.clientHeight;if(0===I||0===C)t=1,g=ml.getRange(this.body.nodes,e.nodes);else if(!0===A){var i=0;for(var n in this.body.nodes)if(this.body.nodes.hasOwnProperty(n)){var o=this.body.nodes[n];!0===o.predefinedPosition&&(i+=1)}if(i>.5*this.body.nodeIndices.length)return void this.fit(e,!1);g=ml.getRange(this.body.nodes,e.nodes);var r=this.body.nodeIndices.length;t=12.662/(r+7.4147)+.0964822;var s=Math.min(I/600,C/600);t*=s}else{this.body.emitter.emit("_resizeNodes"),g=ml.getRange(this.body.nodes,e.nodes);var a=1.1*Math.abs(g.maxX-g.minX),d=1.1*Math.abs(g.maxY-g.minY),l=I/a,h=C/d;t=l<=h?l:h}(t>1||0===t)&&(t=1);var c=ml.findCenter(g),u={position:c,scale:t,animation:e.animation};this.moveTo(u)}},{key:"focus",value:function(g){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(void 0!==this.body.nodes[g]){var e={x:this.body.nodes[g].x,y:this.body.nodes[g].y};t.position=e,t.lockedOnNode=g,this.moveTo(t)}else console.log("Node: "+g+" cannot be found.")}},{key:"moveTo",value:function(g){if(void 0!==g){if(null!=g.offset){if(null!=g.offset.x){if(g.offset.x=+g.offset.x,!pr(g.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else g.offset.x=0;if(null!=g.offset.y){if(g.offset.y=+g.offset.y,!pr(g.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else g.offset.x=0}else g.offset={x:0,y:0};if(null!=g.position){if(null!=g.position.x){if(g.position.x=+g.position.x,!pr(g.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else g.position.x=0;if(null!=g.position.y){if(g.position.y=+g.position.y,!pr(g.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else g.position.x=0}else g.position=this.getViewPosition();if(null!=g.scale){if(g.scale=+g.scale,!(g.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else g.scale=this.body.view.scale;void 0===g.animation&&(g.animation={duration:0}),!1===g.animation&&(g.animation={duration:0}),!0===g.animation&&(g.animation={}),void 0===g.animation.duration&&(g.animation.duration=1e3),void 0===g.animation.easingFunction&&(g.animation.easingFunction="easeInOutQuad"),this.animateView(g)}else g={}}},{key:"animateView",value:function(g){if(void 0!==g){this.animationEasingFunction=g.animation.easingFunction,this.releaseNode(),!0===g.locked&&(this.lockedOnNodeId=g.lockedOnNode,this.lockedOnNodeOffset=g.offset),0!=this.easingTime&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=g.scale,this.body.view.scale=this.targetScale;var t,e,A=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),I=A.x-g.position.x,C=A.y-g.position.y;if(this.targetTranslation={x:this.sourceTranslation.x+I*this.targetScale+g.offset.x,y:this.sourceTranslation.y+C*this.targetScale+g.offset.y},0===g.animation.duration)if(null!=this.lockedOnNodeId)this.viewFunction=gg(t=this._lockedRedraw).call(t,this),this.body.emitter.on("initRedraw",this.viewFunction);else this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw");else this.animationSpeed=1/(60*g.animation.duration*.001)||1/60,this.animationEasingFunction=g.animation.easingFunction,this.viewFunction=gg(e=this._transitionRedraw).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}},{key:"_lockedRedraw",value:function(){var g=this.body.nodes[this.lockedOnNodeId].x,t=this.body.nodes[this.lockedOnNodeId].y,e=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),A=e.x-g,I=e.y-t,C=this.body.view.translation,i={x:C.x+A*this.body.view.scale+this.lockedOnNodeOffset.x,y:C.y+I*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=i}},{key:"releaseNode",value:function(){void 0!==this.lockedOnNodeId&&void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var g=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.easingTime+=this.animationSpeed,this.easingTime=!0===g?1:this.easingTime;var t=ai[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*t,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*t,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*t},this.easingTime>=1){var e;if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,null!=this.lockedOnNodeId)this.viewFunction=gg(e=this._lockedRedraw).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction);this.body.emitter.emit("animationFinished")}}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),g}();un('div.vis-network div.vis-navigation div.vis-button{width:34px;height:34px;-moz-border-radius:17px;border-radius:17px;position:absolute;display:inline-block;background-position:2px 2px;background-repeat:no-repeat;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.vis-network div.vis-navigation div.vis-button:hover{box-shadow:0 0 3px 3px rgba(56,207,21,.3)}div.vis-network div.vis-navigation div.vis-button:active{box-shadow:0 0 1px 3px rgba(56,207,21,.95)}div.vis-network div.vis-navigation div.vis-button.vis-up{background-image:url("data:image/png;base64, ");bottom:50px;left:55px}div.vis-network div.vis-navigation div.vis-button.vis-down{background-image:url("data:image/png;base64, ");bottom:10px;left:55px}div.vis-network div.vis-navigation div.vis-button.vis-left{background-image:url("data:image/png;base64, ");bottom:10px;left:15px}div.vis-network div.vis-navigation div.vis-button.vis-right{background-image:url("data:image/png;base64, ");bottom:10px;left:95px}div.vis-network div.vis-navigation div.vis-button.vis-zoomIn{background-image:url("data:image/png;base64, ");bottom:10px;right:15px}div.vis-network div.vis-navigation div.vis-button.vis-zoomOut{background-image:url("data:image/png;base64, ");bottom:10px;right:55px}div.vis-network div.vis-navigation div.vis-button.vis-zoomExtends{background-image:url("data:image/png;base64, ");bottom:50px;right:15px}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIk5hdmlnYXRpb25IYW5kbGVyLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxrREFDSSxVQUFVLENBQ1YsV0FBVyxDQUNYLHVCQUF3QixDQUN4QixrQkFBbUIsQ0FDbkIsaUJBQWlCLENBQ2pCLG9CQUFvQixDQUNwQiwyQkFBNEIsQ0FDNUIsMkJBQTJCLENBQzNCLGNBQWUsQ0FDZiwwQkFBMkIsQ0FDM0Isd0JBQXlCLENBQ3pCLHVCQUF3QixDQUN4QixxQkFBc0IsQ0FDdEIsb0JBQXFCLENBQ3JCLGdCQUNKLENBRUEsd0RBQ0kseUNBQ0osQ0FFQSx5REFDSSwwQ0FDSixDQUVBLHlEQUNJLDAyTEFBdUMsQ0FDdkMsV0FBVyxDQUNYLFNBQ0osQ0FDQSwyREFDSSwwMkxBQXlDLENBQ3pDLFdBQVcsQ0FDWCxTQUNKLENBQ0EsMkRBQ0ksMDhMQUF5QyxDQUN6QyxXQUFXLENBQ1gsU0FDSixDQUNBLDREQUNJLGs3TEFBMEMsQ0FDMUMsV0FBVyxDQUNYLFNBQ0osQ0FDQSw2REFDSSwwc0xBQW9DLENBQ3BDLFdBQVcsQ0FDWCxVQUNKLENBQ0EsOERBQ0ksMDhLQUFxQyxDQUNyQyxXQUFXLENBQ1gsVUFDSixDQUNBLGtFQUNJLDgyTEFBMkMsQ0FDM0MsV0FBVyxDQUNYLFVBQ0oiLCJmaWxlIjoiTmF2aWdhdGlvbkhhbmRsZXIuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiZGl2LnZpcy1uZXR3b3JrIGRpdi52aXMtbmF2aWdhdGlvbiBkaXYudmlzLWJ1dHRvbiB7XG4gICAgd2lkdGg6MzRweDtcbiAgICBoZWlnaHQ6MzRweDtcbiAgICAtbW96LWJvcmRlci1yYWRpdXM6IDE3cHg7XG4gICAgYm9yZGVyLXJhZGl1czogMTdweDtcbiAgICBwb3NpdGlvbjphYnNvbHV0ZTtcbiAgICBkaXNwbGF5OmlubGluZS1ibG9jaztcbiAgICBiYWNrZ3JvdW5kLXBvc2l0aW9uOiAycHggMnB4O1xuICAgIGJhY2tncm91bmQtcmVwZWF0Om5vLXJlcGVhdDtcbiAgICBjdXJzb3I6IHBvaW50ZXI7XG4gICAgLXdlYmtpdC10b3VjaC1jYWxsb3V0OiBub25lO1xuICAgIC13ZWJraXQtdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgLWtodG1sLXVzZXItc2VsZWN0OiBub25lO1xuICAgIC1tb3otdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgLW1zLXVzZXItc2VsZWN0OiBub25lO1xuICAgIHVzZXItc2VsZWN0OiBub25lO1xufVxuXG5kaXYudmlzLW5ldHdvcmsgZGl2LnZpcy1uYXZpZ2F0aW9uIGRpdi52aXMtYnV0dG9uOmhvdmVyIHtcbiAgICBib3gtc2hhZG93OiAwIDAgM3B4IDNweCByZ2JhKDU2LCAyMDcsIDIxLCAwLjMwKTtcbn1cblxuZGl2LnZpcy1uZXR3b3JrIGRpdi52aXMtbmF2aWdhdGlvbiBkaXYudmlzLWJ1dHRvbjphY3RpdmUge1xuICAgIGJveC1zaGFkb3c6IDAgMCAxcHggM3B4IHJnYmEoNTYsIDIwNywgMjEsIDAuOTUpO1xufVxuXG5kaXYudmlzLW5ldHdvcmsgZGl2LnZpcy1uYXZpZ2F0aW9uIGRpdi52aXMtYnV0dG9uLnZpcy11cCB7XG4gICAgYmFja2dyb3VuZC1pbWFnZTogaW5saW5lKFwidXBBcnJvdy5wbmdcIik7XG4gICAgYm90dG9tOjUwcHg7XG4gICAgbGVmdDo1NXB4O1xufVxuZGl2LnZpcy1uZXR3b3JrIGRpdi52aXMtbmF2aWdhdGlvbiBkaXYudmlzLWJ1dHRvbi52aXMtZG93biB7XG4gICAgYmFja2dyb3VuZC1pbWFnZTogaW5saW5lKFwiZG93bkFycm93LnBuZ1wiKTtcbiAgICBib3R0b206MTBweDtcbiAgICBsZWZ0OjU1cHg7XG59XG5kaXYudmlzLW5ldHdvcmsgZGl2LnZpcy1uYXZpZ2F0aW9uIGRpdi52aXMtYnV0dG9uLnZpcy1sZWZ0IHtcbiAgICBiYWNrZ3JvdW5kLWltYWdlOiBpbmxpbmUoXCJsZWZ0QXJyb3cucG5nXCIpO1xuICAgIGJvdHRvbToxMHB4O1xuICAgIGxlZnQ6MTVweDtcbn1cbmRpdi52aXMtbmV0d29yayBkaXYudmlzLW5hdmlnYXRpb24gZGl2LnZpcy1idXR0b24udmlzLXJpZ2h0IHtcbiAgICBiYWNrZ3JvdW5kLWltYWdlOiBpbmxpbmUoXCJyaWdodEFycm93LnBuZ1wiKTtcbiAgICBib3R0b206MTBweDtcbiAgICBsZWZ0Ojk1cHg7XG59XG5kaXYudmlzLW5ldHdvcmsgZGl2LnZpcy1uYXZpZ2F0aW9uIGRpdi52aXMtYnV0dG9uLnZpcy16b29tSW4ge1xuICAgIGJhY2tncm91bmQtaW1hZ2U6IGlubGluZShcInBsdXMucG5nXCIpO1xuICAgIGJvdHRvbToxMHB4O1xuICAgIHJpZ2h0OjE1cHg7XG59XG5kaXYudmlzLW5ldHdvcmsgZGl2LnZpcy1uYXZpZ2F0aW9uIGRpdi52aXMtYnV0dG9uLnZpcy16b29tT3V0IHtcbiAgICBiYWNrZ3JvdW5kLWltYWdlOiBpbmxpbmUoXCJtaW51cy5wbmdcIik7XG4gICAgYm90dG9tOjEwcHg7XG4gICAgcmlnaHQ6NTVweDtcbn1cbmRpdi52aXMtbmV0d29yayBkaXYudmlzLW5hdmlnYXRpb24gZGl2LnZpcy1idXR0b24udmlzLXpvb21FeHRlbmRzIHtcbiAgICBiYWNrZ3JvdW5kLWltYWdlOiBpbmxpbmUoXCJ6b29tRXh0ZW5kcy5wbmdcIik7XG4gICAgYm90dG9tOjUwcHg7XG4gICAgcmlnaHQ6MTVweDtcbn1cbiJdfQ== */');var Ml=function(){function g(t,e){var A=this;gr(this,g),this.body=t,this.canvas=e,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on("activate",(function(){A.activated=!0,A.configureKeyboardBindings()})),this.body.emitter.on("deactivate",(function(){A.activated=!1,A.configureKeyboardBindings()})),this.body.emitter.on("destroy",(function(){void 0!==A.keycharm&&A.keycharm.destroy()})),this.options={}}return er(g,[{key:"setOptions",value:function(g){void 0!==g&&(this.options=g,this.create())}},{key:"create",value:function(){!0===this.options.navigationButtons?!1===this.iconsCreated&&this.loadNavigationElements():!0===this.iconsCreated&&this.cleanNavigation(),this.configureKeyboardBindings()}},{key:"cleanNavigation",value:function(){if(0!=this.navigationHammers.length){for(var g=0;g<this.navigationHammers.length;g++)this.navigationHammers[g].destroy();this.navigationHammers=[]}this.navigationDOM&&this.navigationDOM.wrapper&&this.navigationDOM.wrapper.parentNode&&this.navigationDOM.wrapper.parentNode.removeChild(this.navigationDOM.wrapper),this.iconsCreated=!1}},{key:"loadNavigationElements",value:function(){var g=this;this.cleanNavigation(),this.navigationDOM={};var t=["up","down","left","right","zoomIn","zoomOut","zoomExtends"],e=["_moveUp","_moveDown","_moveLeft","_moveRight","_zoomIn","_zoomOut","_fit"];this.navigationDOM.wrapper=document.createElement("div"),this.navigationDOM.wrapper.className="vis-navigation",this.canvas.frame.appendChild(this.navigationDOM.wrapper);for(var A=0;A<t.length;A++){this.navigationDOM[t[A]]=document.createElement("div"),this.navigationDOM[t[A]].className="vis-button vis-"+t[A],this.navigationDOM.wrapper.appendChild(this.navigationDOM[t[A]]);var I,C,i=new Ho(this.navigationDOM[t[A]]);if("_fit"===e[A])Ol.onTouch(i,gg(I=this._fit).call(I,this));else Ol.onTouch(i,gg(C=this.bindToRedraw).call(C,this,e[A]));this.navigationHammers.push(i)}var n=new Ho(this.canvas.frame);Ol.onRelease(n,(function(){g._stopMovement()})),this.navigationHammers.push(n),this.iconsCreated=!0}},{key:"bindToRedraw",value:function(g){var t;void 0===this.boundFunctions[g]&&(this.boundFunctions[g]=gg(t=this[g]).call(t,this),this.body.emitter.on("initRedraw",this.boundFunctions[g]),this.body.emitter.emit("_startRendering"))}},{key:"unbindFromRedraw",value:function(g){void 0!==this.boundFunctions[g]&&(this.body.emitter.off("initRedraw",this.boundFunctions[g]),this.body.emitter.emit("_stopRendering"),delete this.boundFunctions[g])}},{key:"_fit",value:function(){(new Date).valueOf()-this.touchTime>700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=(new Date).valueOf())}},{key:"_stopMovement",value:function(){for(var g in this.boundFunctions)this.boundFunctions.hasOwnProperty(g)&&(this.body.emitter.off("initRedraw",this.boundFunctions[g]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){var g=this.body.view.scale,t=this.body.view.scale*(1+this.options.keyboard.speed.zoom),e=this.body.view.translation,A=t/g,I=(1-A)*this.canvas.canvasViewCenter.x+e.x*A,C=(1-A)*this.canvas.canvasViewCenter.y+e.y*A;this.body.view.scale=t,this.body.view.translation={x:I,y:C},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}},{key:"_zoomOut",value:function(){var g=this.body.view.scale,t=this.body.view.scale/(1+this.options.keyboard.speed.zoom),e=this.body.view.translation,A=t/g,I=(1-A)*this.canvas.canvasViewCenter.x+e.x*A,C=(1-A)*this.canvas.canvasViewCenter.y+e.y*A;this.body.view.scale=t,this.body.view.translation={x:I,y:C},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}},{key:"configureKeyboardBindings",value:function(){var g,t,e,A,I,C,i,n,o,r,s,a,d,l,h,c,u,f,p,v,y,m,b,w,x=this;(void 0!==this.keycharm&&this.keycharm.destroy(),!0===this.options.keyboard.enabled)&&(!0===this.options.keyboard.bindToWindow?this.keycharm=vn({container:window,preventDefault:!0}):this.keycharm=vn({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),!0===this.activated&&(gg(g=this.keycharm).call(g,"up",(function(){x.bindToRedraw("_moveUp")}),"keydown"),gg(t=this.keycharm).call(t,"down",(function(){x.bindToRedraw("_moveDown")}),"keydown"),gg(e=this.keycharm).call(e,"left",(function(){x.bindToRedraw("_moveLeft")}),"keydown"),gg(A=this.keycharm).call(A,"right",(function(){x.bindToRedraw("_moveRight")}),"keydown"),gg(I=this.keycharm).call(I,"=",(function(){x.bindToRedraw("_zoomIn")}),"keydown"),gg(C=this.keycharm).call(C,"num+",(function(){x.bindToRedraw("_zoomIn")}),"keydown"),gg(i=this.keycharm).call(i,"num-",(function(){x.bindToRedraw("_zoomOut")}),"keydown"),gg(n=this.keycharm).call(n,"-",(function(){x.bindToRedraw("_zoomOut")}),"keydown"),gg(o=this.keycharm).call(o,"[",(function(){x.bindToRedraw("_zoomOut")}),"keydown"),gg(r=this.keycharm).call(r,"]",(function(){x.bindToRedraw("_zoomIn")}),"keydown"),gg(s=this.keycharm).call(s,"pageup",(function(){x.bindToRedraw("_zoomIn")}),"keydown"),gg(a=this.keycharm).call(a,"pagedown",(function(){x.bindToRedraw("_zoomOut")}),"keydown"),gg(d=this.keycharm).call(d,"up",(function(){x.unbindFromRedraw("_moveUp")}),"keyup"),gg(l=this.keycharm).call(l,"down",(function(){x.unbindFromRedraw("_moveDown")}),"keyup"),gg(h=this.keycharm).call(h,"left",(function(){x.unbindFromRedraw("_moveLeft")}),"keyup"),gg(c=this.keycharm).call(c,"right",(function(){x.unbindFromRedraw("_moveRight")}),"keyup"),gg(u=this.keycharm).call(u,"=",(function(){x.unbindFromRedraw("_zoomIn")}),"keyup"),gg(f=this.keycharm).call(f,"num+",(function(){x.unbindFromRedraw("_zoomIn")}),"keyup"),gg(p=this.keycharm).call(p,"num-",(function(){x.unbindFromRedraw("_zoomOut")}),"keyup"),gg(v=this.keycharm).call(v,"-",(function(){x.unbindFromRedraw("_zoomOut")}),"keyup"),gg(y=this.keycharm).call(y,"[",(function(){x.unbindFromRedraw("_zoomOut")}),"keyup"),gg(m=this.keycharm).call(m,"]",(function(){x.unbindFromRedraw("_zoomIn")}),"keyup"),gg(b=this.keycharm).call(b,"pageup",(function(){x.unbindFromRedraw("_zoomIn")}),"keyup"),gg(w=this.keycharm).call(w,"pagedown",(function(){x.unbindFromRedraw("_zoomOut")}),"keyup")))}}]),g}();un("div.vis-tooltip{position:absolute;visibility:hidden;padding:5px;white-space:nowrap;font-family:verdana;font-size:14px;color:#000;background-color:#f5f4ed;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;border:1px solid #808074;box-shadow:3px 3px 10px rgba(0,0,0,.2);pointer-events:none;z-index:5}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBvcHVwLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxnQkFDRSxpQkFBa0IsQ0FDbEIsaUJBQWtCLENBQ2xCLFdBQVksQ0FDWixrQkFBbUIsQ0FFbkIsbUJBQW9CLENBQ3BCLGNBQWMsQ0FDZCxVQUFhLENBQ2Isd0JBQXlCLENBRXpCLHNCQUF1QixDQUN2Qix5QkFBMEIsQ0FDMUIsaUJBQWtCLENBQ2xCLHdCQUF5QixDQUV6QixzQ0FBMkMsQ0FDM0MsbUJBQW9CLENBRXBCLFNBQ0YiLCJmaWxlIjoiUG9wdXAuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiZGl2LnZpcy10b29sdGlwIHtcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICB2aXNpYmlsaXR5OiBoaWRkZW47XG4gIHBhZGRpbmc6IDVweDtcbiAgd2hpdGUtc3BhY2U6IG5vd3JhcDtcblxuICBmb250LWZhbWlseTogdmVyZGFuYTtcbiAgZm9udC1zaXplOjE0cHg7XG4gIGNvbG9yOiMwMDAwMDA7XG4gIGJhY2tncm91bmQtY29sb3I6ICNmNWY0ZWQ7XG5cbiAgLW1vei1ib3JkZXItcmFkaXVzOiAzcHg7XG4gIC13ZWJraXQtYm9yZGVyLXJhZGl1czogM3B4O1xuICBib3JkZXItcmFkaXVzOiAzcHg7XG4gIGJvcmRlcjogMXB4IHNvbGlkICM4MDgwNzQ7XG5cbiAgYm94LXNoYWRvdzogM3B4IDNweCAxMHB4IHJnYmEoMCwgMCwgMCwgMC4yKTtcbiAgcG9pbnRlci1ldmVudHM6IG5vbmU7XG5cbiAgei1pbmRleDogNTtcbn1cbiJdfQ== */");var El=function(){function g(t,e){gr(this,g),this.container=t,this.overflowMethod=e||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}return er(g,[{key:"setPosition",value:function(g,t){this.x=dI(g),this.y=dI(t)}},{key:"setText",value:function(g){g instanceof Element?(this.frame.innerHTML="",this.frame.appendChild(g)):this.frame.innerHTML=g}},{key:"show",value:function(g){if(void 0===g&&(g=!0),!0===g){var t=this.frame.clientHeight,e=this.frame.clientWidth,A=this.frame.parentNode.clientHeight,I=this.frame.parentNode.clientWidth,C=0,i=0;if("flip"==this.overflowMethod){var n=!1,o=!0;this.y-t<this.padding&&(o=!1),this.x+e>I-this.padding&&(n=!0),C=n?this.x-e:this.x,i=o?this.y-t:this.y}else(i=this.y-t)+t+this.padding>A&&(i=A-t-this.padding),i<this.padding&&(i=this.padding),(C=this.x)+e+this.padding>I&&(C=I-e-this.padding),C<this.padding&&(C=this.padding);this.frame.style.left=C+"px",this.frame.style.top=i+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}},{key:"hide",value:function(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}},{key:"destroy",value:function(){this.frame.parentNode.removeChild(this.frame)}}]),g}(),Gl=function(){function g(t,e,A){var I,C,i,n,o,r,s,a,d,l,h,c,u;gr(this,g),this.body=t,this.canvas=e,this.selectionHandler=A,this.navigationHandler=new Ml(t,e),this.body.eventListeners.onTap=gg(I=this.onTap).call(I,this),this.body.eventListeners.onTouch=gg(C=this.onTouch).call(C,this),this.body.eventListeners.onDoubleTap=gg(i=this.onDoubleTap).call(i,this),this.body.eventListeners.onHold=gg(n=this.onHold).call(n,this),this.body.eventListeners.onDragStart=gg(o=this.onDragStart).call(o,this),this.body.eventListeners.onDrag=gg(r=this.onDrag).call(r,this),this.body.eventListeners.onDragEnd=gg(s=this.onDragEnd).call(s,this),this.body.eventListeners.onMouseWheel=gg(a=this.onMouseWheel).call(a,this),this.body.eventListeners.onPinch=gg(d=this.onPinch).call(d,this),this.body.eventListeners.onMouseMove=gg(l=this.onMouseMove).call(l,this),this.body.eventListeners.onRelease=gg(h=this.onRelease).call(h,this),this.body.eventListeners.onContext=gg(c=this.onContext).call(c,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=gg(u=this.getPointer).call(u,this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0,zoomSpeed:1},FC(this.options,this.defaultOptions),this.bindEventListeners()}return er(g,[{key:"bindEventListeners",value:function(){var g=this;this.body.emitter.on("destroy",(function(){clearTimeout(g.popupTimer),delete g.body.functions.getPointer}))}},{key:"setOptions",value:function(g){if(void 0!==g){LC(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"],this.options,g),si(this.options,g,"keyboard"),g.tooltip&&(FC(this.options.tooltip,g.tooltip),g.tooltip.color&&(this.options.tooltip.color=$C(g.tooltip.color)))}this.navigationHandler.setOptions(this.options)}},{key:"getPointer",value:function(g){return{x:g.x-PC(this.canvas.frame.canvas),y:g.y-jC(this.canvas.frame.canvas)}}},{key:"onTouch",value:function(g){(new Date).valueOf()-this.touchTime>50&&(this.drag.pointer=this.getPointer(g.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=(new Date).valueOf())}},{key:"onTap",value:function(g){var t=this.getPointer(g.center),e=this.selectionHandler.options.multiselect&&(g.changedPointers[0].ctrlKey||g.changedPointers[0].metaKey);this.checkSelectionChanges(t,g,e),this.selectionHandler._generateClickEvent("click",g,t)}},{key:"onDoubleTap",value:function(g){var t=this.getPointer(g.center);this.selectionHandler._generateClickEvent("doubleClick",g,t)}},{key:"onHold",value:function(g){var t=this.getPointer(g.center),e=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,g,e),this.selectionHandler._generateClickEvent("click",g,t),this.selectionHandler._generateClickEvent("hold",g,t)}},{key:"onRelease",value:function(g){if((new Date).valueOf()-this.touchTime>10){var t=this.getPointer(g.center);this.selectionHandler._generateClickEvent("release",g,t),this.touchTime=(new Date).valueOf()}}},{key:"onContext",value:function(g){var t=this.getPointer({x:g.clientX,y:g.clientY});this.selectionHandler._generateClickEvent("oncontext",g,t)}},{key:"checkSelectionChanges",value:function(g,t){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],A=this.selectionHandler.getSelection(),I=!1;I=!0===e?this.selectionHandler.selectAdditionalOnPoint(g):this.selectionHandler.selectOnPoint(g);var C=this.selectionHandler.getSelection(),i=this._determineDifference(A,C),n=this._determineDifference(C,A);i.edges.length>0&&(this.selectionHandler._generateClickEvent("deselectEdge",t,g,A),I=!0),i.nodes.length>0&&(this.selectionHandler._generateClickEvent("deselectNode",t,g,A),I=!0),n.nodes.length>0&&(this.selectionHandler._generateClickEvent("selectNode",t,g),I=!0),n.edges.length>0&&(this.selectionHandler._generateClickEvent("selectEdge",t,g),I=!0),!0===I&&this.selectionHandler._generateClickEvent("select",t,g)}},{key:"_determineDifference",value:function(g,t){var e=function(g,t){for(var e=[],A=0;A<g.length;A++){var I=g[A];-1===IC(t).call(t,I)&&e.push(I)}return e};return{nodes:e(g.nodes,t.nodes),edges:e(g.edges,t.edges)}}},{key:"onDragStart",value:function(g){void 0===this.drag.pointer&&this.onTouch(g);var t=this.selectionHandler.getNodeAt(this.drag.pointer);if(this.drag.dragging=!0,this.drag.selection=[],this.drag.translation=FC({},this.body.view.translation),this.drag.nodeId=void 0,void 0!==t&&!0===this.options.dragNodes){this.drag.nodeId=t.id,!1===t.isSelected()&&(this.selectionHandler.unselectAll(),this.selectionHandler.selectObject(t)),this.selectionHandler._generateClickEvent("dragStart",g,this.drag.pointer);var e=this.selectionHandler.selectionObj.nodes;for(var A in e)if(e.hasOwnProperty(A)){var I=e[A],C={id:I.id,node:I,x:I.x,y:I.y,xFixed:I.options.fixed.x,yFixed:I.options.fixed.y};I.options.fixed.x=!0,I.options.fixed.y=!0,this.drag.selection.push(C)}}else this.selectionHandler._generateClickEvent("dragStart",g,this.drag.pointer,void 0,!0)}},{key:"onDrag",value:function(g){var t=this;if(!0!==this.drag.pinched){this.body.emitter.emit("unlockNode");var e=this.getPointer(g.center),A=this.drag.selection;if(A&&A.length&&!0===this.options.dragNodes){this.selectionHandler._generateClickEvent("dragging",g,e);var I=e.x-this.drag.pointer.x,C=e.y-this.drag.pointer.y;tI(A).call(A,(function(g){var e=g.node;!1===g.xFixed&&(e.x=t.canvas._XconvertDOMtoCanvas(t.canvas._XconvertCanvasToDOM(g.x)+I)),!1===g.yFixed&&(e.y=t.canvas._YconvertDOMtoCanvas(t.canvas._YconvertCanvasToDOM(g.y)+C))})),this.body.emitter.emit("startSimulation")}else if(!0===this.options.dragView){if(this.selectionHandler._generateClickEvent("dragging",g,e,void 0,!0),void 0===this.drag.pointer)return void this.onDragStart(g);var i=e.x-this.drag.pointer.x,n=e.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+i,y:this.drag.translation.y+n},this.body.emitter.emit("_requestRedraw")}}}},{key:"onDragEnd",value:function(g){this.drag.dragging=!1;var t=this.drag.selection;t&&t.length?(tI(t).call(t,(function(g){g.node.options.fixed.x=g.xFixed,g.node.options.fixed.y=g.yFixed})),this.selectionHandler._generateClickEvent("dragEnd",g,this.getPointer(g.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler._generateClickEvent("dragEnd",g,this.getPointer(g.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}},{key:"onPinch",value:function(g){var t=this.getPointer(g.center);this.drag.pinched=!0,void 0===this.pinch.scale&&(this.pinch.scale=1);var e=this.pinch.scale*g.scale;this.zoom(e,t)}},{key:"zoom",value:function(g,t){if(!0===this.options.zoomView){var e=this.body.view.scale;g<1e-5&&(g=1e-5),g>10&&(g=10);var A=void 0;void 0!==this.drag&&!0===this.drag.dragging&&(A=this.canvas.DOMtoCanvas(this.drag.pointer));var I=this.body.view.translation,C=g/e,i=(1-C)*t.x+I.x*C,n=(1-C)*t.y+I.y*C;if(this.body.view.scale=g,this.body.view.translation={x:i,y:n},null!=A){var o=this.canvas.canvasToDOM(A);this.drag.pointer.x=o.x,this.drag.pointer.y=o.y}this.body.emitter.emit("_requestRedraw"),e<g?this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:t}):this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:t})}}},{key:"onMouseWheel",value:function(g){if(!0===this.options.zoomView){if(0!==g.deltaY){var t=this.body.view.scale;t*=1+(g.deltaY<0?1:-1)*(.1*this.options.zoomSpeed);var e=this.getPointer({x:g.clientX,y:g.clientY});this.zoom(t,e)}g.preventDefault()}}},{key:"onMouseMove",value:function(g){var t=this,e=this.getPointer({x:g.clientX,y:g.clientY}),A=!1;void 0!==this.popup&&(!1===this.popup.hidden&&this._checkHidePopup(e),!1===this.popup.hidden&&(A=!0,this.popup.setPosition(e.x+3,e.y-5),this.popup.show())),!1===this.options.keyboard.bindToWindow&&!0===this.options.keyboard.enabled&&this.canvas.frame.focus(),!1===A&&(void 0!==this.popupTimer&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=rr((function(){return t._checkShowPopup(e)}),this.options.tooltipDelay))),!0===this.options.hover&&this.selectionHandler.hoverObject(g,e)}},{key:"_checkShowPopup",value:function(g){var t=this.canvas._XconvertDOMtoCanvas(g.x),e=this.canvas._YconvertDOMtoCanvas(g.y),A={left:t,top:e,right:t,bottom:e},I=void 0===this.popupObj?void 0:this.popupObj.id,C=!1,i="node";if(void 0===this.popupObj){for(var n,o=this.body.nodeIndices,r=this.body.nodes,s=[],a=0;a<o.length;a++)!0===(n=r[o[a]]).isOverlappingWith(A)&&(C=!0,void 0!==n.getTitle()&&s.push(o[a]));s.length>0&&(this.popupObj=r[s[s.length-1]],C=!0)}if(void 0===this.popupObj&&!1===C){for(var d,l=this.body.edgeIndices,h=this.body.edges,c=[],u=0;u<l.length;u++)!0===(d=h[l[u]]).isOverlappingWith(A)&&!0===d.connected&&void 0!==d.getTitle()&&c.push(l[u]);c.length>0&&(this.popupObj=h[c[c.length-1]],i="edge")}void 0!==this.popupObj?this.popupObj.id!==I&&(void 0===this.popup&&(this.popup=new El(this.canvas.frame)),this.popup.popupTargetType=i,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(g.x+3,g.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):void 0!==this.popup&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(g){var t=this.selectionHandler._pointerToPositionObject(g),e=!1;if("node"===this.popup.popupTargetType){if(void 0!==this.body.nodes[this.popup.popupTargetId]&&!0===(e=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t))){var A=this.selectionHandler.getNodeAt(g);e=void 0!==A&&A.id===this.popup.popupTargetId}}else void 0===this.selectionHandler.getNodeAt(g)&&void 0!==this.body.edges[this.popup.popupTargetId]&&(e=this.body.edges[this.popup.popupTargetId].isOverlappingWith(t));!1===e&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),g}(),Tl=function(){function g(t,e){var A=this;gr(this,g),this.body=t,this.canvas=e,this.selectionObj={nodes:[],edges:[]},this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},FC(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",(function(){A.updateSelection()}))}return er(g,[{key:"setOptions",value:function(g){if(void 0!==g){SC(["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"],this.options,g)}}},{key:"selectOnPoint",value:function(g){var t=!1;if(!0===this.options.selectable){var e=this.getNodeAt(g)||this.getEdgeAt(g);this.unselectAll(),void 0!==e&&(t=this.selectObject(e)),this.body.emitter.emit("_requestRedraw")}return t}},{key:"selectAdditionalOnPoint",value:function(g){var t=!1;if(!0===this.options.selectable){var e=this.getNodeAt(g)||this.getEdgeAt(g);void 0!==e&&(t=!0,!0===e.isSelected()?this.deselectObject(e):this.selectObject(e),this.body.emitter.emit("_requestRedraw"))}return t}},{key:"_initBaseEvent",value:function(g,t){var e={};return e.pointer={DOM:{x:t.x,y:t.y},canvas:this.canvas.DOMtoCanvas(t)},e.event=g,e}},{key:"_generateClickEvent",value:function(g,t,e,A){var I=arguments.length>4&&void 0!==arguments[4]&&arguments[4],C=this._initBaseEvent(t,e);if(!0===I)C.nodes=[],C.edges=[];else{var i=this.getSelection();C.nodes=i.nodes,C.edges=i.edges}void 0!==A&&(C.previousSelection=A),"click"==g&&(C.items=this.getClickedItems(e)),void 0!==t.controlEdge&&(C.controlEdge=t.controlEdge),this.body.emitter.emit(g,C)}},{key:"selectObject",value:function(g){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.selectConnectedEdges;return void 0!==g&&(g instanceof ld&&!0===t&&this._selectConnectedEdges(g),g.select(),this._addToSelection(g),!0)}},{key:"deselectObject",value:function(g){!0===g.isSelected()&&(g.selected=!1,this._removeFromSelection(g))}},{key:"_getAllNodesOverlappingWith",value:function(g){for(var t=[],e=this.body.nodes,A=0;A<this.body.nodeIndices.length;A++){var I=this.body.nodeIndices[A];e[I].isOverlappingWith(g)&&t.push(I)}return t}},{key:"_pointerToPositionObject",value:function(g){var t=this.canvas.DOMtoCanvas(g);return{left:t.x-1,top:t.y+1,right:t.x+1,bottom:t.y-1}}},{key:"getNodeAt",value:function(g){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=this._pointerToPositionObject(g),A=this._getAllNodesOverlappingWith(e);return A.length>0?!0===t?this.body.nodes[A[A.length-1]]:A[A.length-1]:void 0}},{key:"_getEdgesOverlappingWith",value:function(g,t){for(var e=this.body.edges,A=0;A<this.body.edgeIndices.length;A++){var I=this.body.edgeIndices[A];e[I].isOverlappingWith(g)&&t.push(I)}}},{key:"_getAllEdgesOverlappingWith",value:function(g){var t=[];return this._getEdgesOverlappingWith(g,t),t}},{key:"getEdgeAt",value:function(g){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=this.canvas.DOMtoCanvas(g),A=10,I=null,C=this.body.edges,i=0;i<this.body.edgeIndices.length;i++){var n=this.body.edgeIndices[i],o=C[n];if(o.connected){var r=o.from.x,s=o.from.y,a=o.to.x,d=o.to.y,l=o.edgeType.getDistanceToEdge(r,s,a,d,e.x,e.y);l<A&&(I=n,A=l)}}return null!==I?!0===t?this.body.edges[I]:I:void 0}},{key:"_addToSelection",value:function(g){g instanceof ld?this.selectionObj.nodes[g.id]=g:this.selectionObj.edges[g.id]=g}},{key:"_addToHover",value:function(g){g instanceof ld?this.hoverObj.nodes[g.id]=g:this.hoverObj.edges[g.id]=g}},{key:"_removeFromSelection",value:function(g){g instanceof ld?(delete this.selectionObj.nodes[g.id],this._unselectConnectedEdges(g)):delete this.selectionObj.edges[g.id]}},{key:"unselectAll",value:function(){for(var g in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(g)&&this.selectionObj.nodes[g].unselect();for(var t in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(t)&&this.selectionObj.edges[t].unselect();this.selectionObj={nodes:{},edges:{}}}},{key:"_getSelectedNodeCount",value:function(){var g=0;for(var t in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(t)&&(g+=1);return g}},{key:"_getSelectedNode",value:function(){for(var g in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(g))return this.selectionObj.nodes[g]}},{key:"_getSelectedEdge",value:function(){for(var g in this.selectionObj.edges)if(this.selectionObj.edges.hasOwnProperty(g))return this.selectionObj.edges[g]}},{key:"_getSelectedEdgeCount",value:function(){var g=0;for(var t in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(t)&&(g+=1);return g}},{key:"_getSelectedObjectCount",value:function(){var g=0;for(var t in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(t)&&(g+=1);for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&(g+=1);return g}},{key:"_selectionIsEmpty",value:function(){for(var g in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(g))return!1;for(var t in this.selectionObj.edges)if(this.selectionObj.edges.hasOwnProperty(t))return!1;return!0}},{key:"_clusterInSelection",value:function(){for(var g in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(g)&&this.selectionObj.nodes[g].clusterSize>1)return!0;return!1}},{key:"_selectConnectedEdges",value:function(g){for(var t=0;t<g.edges.length;t++){var e=g.edges[t];e.select(),this._addToSelection(e)}}},{key:"_hoverConnectedEdges",value:function(g){for(var t=0;t<g.edges.length;t++){var e=g.edges[t];e.hover=!0,this._addToHover(e)}}},{key:"_unselectConnectedEdges",value:function(g){for(var t=0;t<g.edges.length;t++){var e=g.edges[t];e.unselect(),this._removeFromSelection(e)}}},{key:"emitBlurEvent",value:function(g,t,e){var A=this._initBaseEvent(g,t);!0===e.hover&&(e.hover=!1,e instanceof ld?(A.node=e.id,this.body.emitter.emit("blurNode",A)):(A.edge=e.id,this.body.emitter.emit("blurEdge",A)))}},{key:"emitHoverEvent",value:function(g,t,e){var A=this._initBaseEvent(g,t),I=!1;return!1===e.hover&&(e.hover=!0,this._addToHover(e),I=!0,e instanceof ld?(A.node=e.id,this.body.emitter.emit("hoverNode",A)):(A.edge=e.id,this.body.emitter.emit("hoverEdge",A))),I}},{key:"hoverObject",value:function(g,t){var e=this.getNodeAt(t);void 0===e&&(e=this.getEdgeAt(t));var A=!1;for(var I in this.hoverObj.nodes)this.hoverObj.nodes.hasOwnProperty(I)&&(void 0===e||e instanceof ld&&e.id!=I||e instanceof Al)&&(this.emitBlurEvent(g,t,this.hoverObj.nodes[I]),delete this.hoverObj.nodes[I],A=!0);for(var C in this.hoverObj.edges)this.hoverObj.edges.hasOwnProperty(C)&&(!0===A?(this.hoverObj.edges[C].hover=!1,delete this.hoverObj.edges[C]):(void 0===e||e instanceof Al&&e.id!=C||e instanceof ld&&!e.hover)&&(this.emitBlurEvent(g,t,this.hoverObj.edges[C]),delete this.hoverObj.edges[C],A=!0));if(void 0!==e){var i=GA(this.hoverObj.edges).length,n=GA(this.hoverObj.nodes).length;(A||e instanceof Al&&0===i&&0===n||e instanceof ld&&0===i&&0===n)&&(A=this.emitHoverEvent(g,t,e)),e instanceof ld&&!0===this.options.hoverConnectedEdges&&this._hoverConnectedEdges(e)}!0===A&&this.body.emitter.emit("_requestRedraw")}},{key:"getSelection",value:function(){return{nodes:this.getSelectedNodes(),edges:this.getSelectedEdges()}}},{key:"getSelectedNodes",value:function(){var g=[];if(!0===this.options.selectable)for(var t in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(t)&&g.push(this.selectionObj.nodes[t].id);return g}},{key:"getSelectedEdges",value:function(){var g=[];if(!0===this.options.selectable)for(var t in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(t)&&g.push(this.selectionObj.edges[t].id);return g}},{key:"setSelection",value:function(g){var t,e,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!g||!g.nodes&&!g.edges)throw"Selection must be an object with nodes and/or edges properties";if((A.unselectAll||void 0===A.unselectAll)&&this.unselectAll(),g.nodes)for(t=0;t<g.nodes.length;t++){e=g.nodes[t];var I=this.body.nodes[e];if(!I)throw new RangeError('Node with id "'+e+'" not found');this.selectObject(I,A.highlightEdges)}if(g.edges)for(t=0;t<g.edges.length;t++){e=g.edges[t];var C=this.body.edges[e];if(!C)throw new RangeError('Edge with id "'+e+'" not found');this.selectObject(C)}this.body.emitter.emit("_requestRedraw")}},{key:"selectNodes",value:function(g){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!g||void 0===g.length)throw"Selection must be an array with ids";this.setSelection({nodes:g},{highlightEdges:t})}},{key:"selectEdges",value:function(g){if(!g||void 0===g.length)throw"Selection must be an array with ids";this.setSelection({edges:g})}},{key:"updateSelection",value:function(){for(var g in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(g)&&(this.body.nodes.hasOwnProperty(g)||delete this.selectionObj.nodes[g]);for(var t in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(t)&&(this.body.edges.hasOwnProperty(t)||delete this.selectionObj.edges[t])}},{key:"getClickedItems",value:function(g){for(var t=this.canvas.DOMtoCanvas(g),e=[],A=this.body.nodeIndices,I=this.body.nodes,C=A.length-1;C>=0;C--){var i=I[A[C]].getItemsOnPoint(t);e.push.apply(e,i)}for(var n=this.body.edgeIndices,o=this.body.edges,r=n.length-1;r>=0;r--){var s=o[n[r]].getItemsOnPoint(t);e.push.apply(e,s)}return e}}]),g}(),Bl=A((function(g,t){!function(g){g.__esModule=!0,g.sort=function(g,t,e,i){if(!Array.isArray(g))throw new TypeError("Can only sort arrays");t?"function"!=typeof t&&(i=e,e=t,t=A):t=A,e||(e=0),i||(i=g.length);var n=i-e;if(!(n<2)){var r=0;if(n<32)return r=I(g,e,i,t),void C(g,e,i,e+r,t);var s=new o(g,t),a=function(g){for(var t=0;g>=32;)t|=1&g,g>>=1;return g+t}(n);do{if((r=I(g,e,i,t))<a){var d=n;d>a&&(d=a),C(g,e,e+d,e+r,t),r=d}s.pushRun(e,r),s.mergeRuns(),n-=r,e+=r}while(0!==n);s.forceMergeRuns()}};var t=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9];function e(g){return g<1e5?g<100?g<10?0:1:g<1e4?g<1e3?2:3:4:g<1e7?g<1e6?5:6:g<1e9?g<1e8?7:8:9}function A(g,A){if(g===A)return 0;if(~~g===g&&~~A===A){if(0===g||0===A)return g<A?-1:1;if(g<0||A<0){if(A>=0)return-1;if(g>=0)return 1;g=-g,A=-A}var I=e(g),C=e(A),i=0;return I<C?(g*=t[C-I-1],A/=10,i=-1):I>C&&(A*=t[I-C-1],g/=10,i=1),g===A?i:g<A?-1:1}var n=String(g),o=String(A);return n===o?0:n<o?-1:1}function I(g,t,e,A){var I=t+1;if(I===e)return 1;if(A(g[I++],g[t])<0){for(;I<e&&A(g[I],g[I-1])<0;)I++;!function(g,t,e){for(e--;t<e;){var A=g[t];g[t++]=g[e],g[e--]=A}}(g,t,I)}else for(;I<e&&A(g[I],g[I-1])>=0;)I++;return I-t}function C(g,t,e,A,I){for(A===t&&A++;A<e;A++){for(var C=g[A],i=t,n=A;i<n;){var o=i+n>>>1;I(C,g[o])<0?n=o:i=o+1}var r=A-i;switch(r){case 3:g[i+3]=g[i+2];case 2:g[i+2]=g[i+1];case 1:g[i+1]=g[i];break;default:for(;r>0;)g[i+r]=g[i+r-1],r--}g[i]=C}}function i(g,t,e,A,I,C){var i=0,n=0,o=1;if(C(g,t[e+I])>0){for(n=A-I;o<n&&C(g,t[e+I+o])>0;)i=o,(o=1+(o<<1))<=0&&(o=n);o>n&&(o=n),i+=I,o+=I}else{for(n=I+1;o<n&&C(g,t[e+I-o])<=0;)i=o,(o=1+(o<<1))<=0&&(o=n);o>n&&(o=n);var r=i;i=I-o,o=I-r}for(i++;i<o;){var s=i+(o-i>>>1);C(g,t[e+s])>0?i=s+1:o=s}return o}function n(g,t,e,A,I,C){var i=0,n=0,o=1;if(C(g,t[e+I])<0){for(n=I+1;o<n&&C(g,t[e+I-o])<0;)i=o,(o=1+(o<<1))<=0&&(o=n);o>n&&(o=n);var r=i;i=I-o,o=I-r}else{for(n=A-I;o<n&&C(g,t[e+I+o])>=0;)i=o,(o=1+(o<<1))<=0&&(o=n);o>n&&(o=n),i+=I,o+=I}for(i++;i<o;){var s=i+(o-i>>>1);C(g,t[e+s])<0?o=s:i=s+1}return o}var o=function(){function g(t,e){!function(g,t){if(!(g instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),this.array=null,this.compare=null,this.minGallop=7,this.length=0,this.tmpStorageLength=256,this.stackLength=0,this.runStart=null,this.runLength=null,this.stackSize=0,this.array=t,this.compare=e,this.length=t.length,this.length<512&&(this.tmpStorageLength=this.length>>>1),this.tmp=new Array(this.tmpStorageLength),this.stackLength=this.length<120?5:this.length<1542?10:this.length<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength)}return g.prototype.pushRun=function(g,t){this.runStart[this.stackSize]=g,this.runLength[this.stackSize]=t,this.stackSize+=1},g.prototype.mergeRuns=function(){for(;this.stackSize>1;){var g=this.stackSize-2;if(g>=1&&this.runLength[g-1]<=this.runLength[g]+this.runLength[g+1]||g>=2&&this.runLength[g-2]<=this.runLength[g]+this.runLength[g-1])this.runLength[g-1]<this.runLength[g+1]&&g--;else if(this.runLength[g]>this.runLength[g+1])break;this.mergeAt(g)}},g.prototype.forceMergeRuns=function(){for(;this.stackSize>1;){var g=this.stackSize-2;g>0&&this.runLength[g-1]<this.runLength[g+1]&&g--,this.mergeAt(g)}},g.prototype.mergeAt=function(g){var t=this.compare,e=this.array,A=this.runStart[g],I=this.runLength[g],C=this.runStart[g+1],o=this.runLength[g+1];this.runLength[g]=I+o,g===this.stackSize-3&&(this.runStart[g+1]=this.runStart[g+2],this.runLength[g+1]=this.runLength[g+2]),this.stackSize--;var r=n(e[C],e,A,I,0,t);A+=r,0!=(I-=r)&&0!==(o=i(e[A+I-1],e,C,o,o-1,t))&&(I<=o?this.mergeLow(A,I,C,o):this.mergeHigh(A,I,C,o))},g.prototype.mergeLow=function(g,t,e,A){var I=this.compare,C=this.array,o=this.tmp,r=0;for(r=0;r<t;r++)o[r]=C[g+r];var s=0,a=e,d=g;if(C[d++]=C[a++],0!=--A)if(1!==t){for(var l=this.minGallop;;){var h=0,c=0,u=!1;do{if(I(C[a],o[s])<0){if(C[d++]=C[a++],c++,h=0,0==--A){u=!0;break}}else if(C[d++]=o[s++],h++,c=0,1==--t){u=!0;break}}while((h|c)<l);if(u)break;do{if(0!==(h=n(C[a],o,s,t,0,I))){for(r=0;r<h;r++)C[d+r]=o[s+r];if(d+=h,s+=h,(t-=h)<=1){u=!0;break}}if(C[d++]=C[a++],0==--A){u=!0;break}if(0!==(c=i(o[s],C,a,A,0,I))){for(r=0;r<c;r++)C[d+r]=C[a+r];if(d+=c,a+=c,0==(A-=c)){u=!0;break}}if(C[d++]=o[s++],1==--t){u=!0;break}l--}while(h>=7||c>=7);if(u)break;l<0&&(l=0),l+=2}if(this.minGallop=l,l<1&&(this.minGallop=1),1===t){for(r=0;r<A;r++)C[d+r]=C[a+r];C[d+A]=o[s]}else{if(0===t)throw new Error("mergeLow preconditions were not respected");for(r=0;r<t;r++)C[d+r]=o[s+r]}}else{for(r=0;r<A;r++)C[d+r]=C[a+r];C[d+A]=o[s]}else for(r=0;r<t;r++)C[d+r]=o[s+r]},g.prototype.mergeHigh=function(g,t,e,A){var I=this.compare,C=this.array,o=this.tmp,r=0;for(r=0;r<A;r++)o[r]=C[e+r];var s=g+t-1,a=A-1,d=e+A-1,l=0,h=0;if(C[d--]=C[s--],0!=--t)if(1!==A){for(var c=this.minGallop;;){var u=0,f=0,p=!1;do{if(I(o[a],C[s])<0){if(C[d--]=C[s--],u++,f=0,0==--t){p=!0;break}}else if(C[d--]=o[a--],f++,u=0,1==--A){p=!0;break}}while((u|f)<c);if(p)break;do{if(0!=(u=t-n(o[a],C,g,t,t-1,I))){for(t-=u,h=1+(d-=u),l=1+(s-=u),r=u-1;r>=0;r--)C[h+r]=C[l+r];if(0===t){p=!0;break}}if(C[d--]=o[a--],1==--A){p=!0;break}if(0!=(f=A-i(C[s],o,0,A,A-1,I))){for(A-=f,h=1+(d-=f),l=1+(a-=f),r=0;r<f;r++)C[h+r]=o[l+r];if(A<=1){p=!0;break}}if(C[d--]=C[s--],0==--t){p=!0;break}c--}while(u>=7||f>=7);if(p)break;c<0&&(c=0),c+=2}if(this.minGallop=c,c<1&&(this.minGallop=1),1===A){for(h=1+(d-=t),l=1+(s-=t),r=t-1;r>=0;r--)C[h+r]=C[l+r];C[d]=o[a]}else{if(0===A)throw new Error("mergeHigh preconditions were not respected");for(l=d-(A-1),r=0;r<A;r++)C[l+r]=o[r]}}else{for(h=1+(d-=t),l=1+(s-=t),r=t-1;r>=0;r--)C[h+r]=C[l+r];C[d]=o[a]}else for(l=d-(A-1),r=0;r<A;r++)C[l+r]=o[r]},g}()}(t)}));e(Bl);var Rl=Bl,Fl=Rl.sort;function Sl(g){var t=function(){if("undefined"==typeof Reflect||!kr)return!1;if(kr.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(kr(Date,[],(function(){}))),!0}catch(g){return!1}}();return function(){var e,A=Kr(g);if(t){var I=Kr(this).constructor;e=kr(A,arguments,I)}else e=A.apply(this,arguments);return Hr(this,e)}}var Ll=function(){function g(){gr(this,g)}return er(g,[{key:"abstract",value:function(){throw new Error("Can't instantiate abstract class!")}},{key:"fake_use",value:function(){}},{key:"curveType",value:function(){return this.abstract()}},{key:"getPosition",value:function(g){return this.fake_use(g),this.abstract()}},{key:"setPosition",value:function(g,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;this.fake_use(g,t,e),this.abstract()}},{key:"getTreeSize",value:function(g){return this.fake_use(g),this.abstract()}},{key:"sort",value:function(g){this.fake_use(g),this.abstract()}},{key:"fix",value:function(g,t){this.fake_use(g,t),this.abstract()}},{key:"shift",value:function(g,t){this.fake_use(g,t),this.abstract()}}]),g}(),Ql=function(g){_r(e,g);var t=Sl(e);function e(g){var A;return gr(this,e),(A=t.call(this)).layout=g,A}return er(e,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(g){return g.x}},{key:"setPosition",value:function(g,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;void 0!==e&&this.layout.hierarchical.addToOrdering(g,e),g.x=t}},{key:"getTreeSize",value:function(g){var t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,g);return{min:t.min_x,max:t.max_x}}},{key:"sort",value:function(g){Fl(g,(function(g,t){return g.x-t.x}))}},{key:"fix",value:function(g,t){g.y=this.layout.options.hierarchical.levelSeparation*t,g.options.fixed.y=!0}},{key:"shift",value:function(g,t){this.layout.body.nodes[g].x+=t}}]),e}(Ll),Yl=function(g){_r(e,g);var t=Sl(e);function e(g){var A;return gr(this,e),(A=t.call(this)).layout=g,A}return er(e,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(g){return g.y}},{key:"setPosition",value:function(g,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;void 0!==e&&this.layout.hierarchical.addToOrdering(g,e),g.y=t}},{key:"getTreeSize",value:function(g){var t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,g);return{min:t.min_y,max:t.max_y}}},{key:"sort",value:function(g){Fl(g,(function(g,t){return g.y-t.y}))}},{key:"fix",value:function(g,t){g.x=this.layout.options.hierarchical.levelSeparation*t,g.options.fixed.x=!0}},{key:"shift",value:function(g,t){this.layout.body.nodes[g].y+=t}}]),e}(Ll),Wl=ke.every,zl=PA("every"),Pl=UA("every");X({target:"Array",proto:!0,forced:!zl||!Pl},{every:function(g){return Wl(this,g,arguments.length>1?arguments[1]:void 0)}});var jl=K("Array").every,Vl=Array.prototype,Xl=function(g){var t=g.every;return g===Vl||g instanceof Array&&t===Vl.every?jl:t};function Ul(g){if(void 0===AA||null==Jt(g)){if(CC(g)||(g=function(g,t){var e;if(!g)return;if("string"==typeof g)return _l(g,t);var A=UI(e=Object.prototype.toString.call(g)).call(e,8,-1);"Object"===A&&g.constructor&&(A=g.constructor.name);if("Map"===A||"Set"===A)return hA(g);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return _l(g,t)}(g))){var t=0,e=function(){};return{s:e,n:function(){return t>=g.length?{done:!0}:{done:!1,value:g[t++]}},e:function(g){throw g},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var A,I,C=!0,i=!1;return{s:function(){A=Ht(g)},n:function(){var g=A.next();return C=g.done,g},e:function(g){i=!0,I=g},f:function(){try{C||null==A.return||A.return()}finally{if(i)throw I}}}}function _l(g,t){(null==t||t>g.length)&&(t=g.length);for(var e=0,A=new Array(t);e<t;e++)A[e]=g[e];return A}function Hl(g,t){var e=new bs;return tI(g).call(g,(function(g){var t;tI(t=g.edges).call(t,(function(g){g.connected&&e.add(g)}))})),tI(e).call(e,(function(g){var e=g.from.id,A=g.to.id;null==t[e]&&(t[e]=0),(null==t[A]||t[e]>=t[A])&&(t[A]=t[e]+1)})),t}function Jl(g,t,e,A,I){var C,i=A.size,n=e+"Id",o="to"===e?1:-1,r=Ul(A);try{var s=function(){var r=uC(C.value,2),s=r[0],a=r[1];if(!A.has(s)||!g(a))return"continue";I[s]=0;for(var d=[a],l=0,h=void 0,c=function(){var g,C;if(!A.has(s))return"continue";var r=I[h.id]+o;if(tI(g=bI(C=h.edges).call(C,(function(g){return g.connected&&g.to!==g.from&&g[e]!==h&&A.has(g.toId)&&A.has(g.fromId)}))).call(g,(function(g){var A=g[n],C=I[A];(null==C||t(r,C))&&(I[A]=r,d.push(g[e]))})),l>i)return{v:{v:Hl(A,I)}};++l};h=d.pop();){var u=c();switch(u){case"continue":continue;default:if("object"===dC(u))return u.v}}};for(r.s();!(C=r.n()).done;){var a=s();switch(a){case"continue":continue;default:if("object"===dC(a))return a.v}}}catch(g){r.e(g)}finally{r.f()}return I}var Kl=function(){function g(){gr(this,g),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return er(g,[{key:"addRelation",value:function(g,t){void 0===this.childrenReference[g]&&(this.childrenReference[g]=[]),this.childrenReference[g].push(t),void 0===this.parentReference[t]&&(this.parentReference[t]=[]),this.parentReference[t].push(g)}},{key:"checkIfTree",value:function(){for(var g in this.parentReference)if(this.parentReference[g].length>1)return void(this.isTree=!1);this.isTree=!0}},{key:"numTrees",value:function(){return this.treeIndex+1}},{key:"setTreeIndex",value:function(g,t){void 0!==t&&void 0===this.trees[g.id]&&(this.trees[g.id]=t,this.treeIndex=Math.max(t,this.treeIndex))}},{key:"ensureLevel",value:function(g){void 0===this.levels[g]&&(this.levels[g]=0)}},{key:"getMaxLevel",value:function(g){var t=this,e={};return function g(A){if(void 0!==e[A])return e[A];var I=t.levels[A];if(t.childrenReference[A]){var C=t.childrenReference[A];if(C.length>0)for(var i=0;i<C.length;i++)I=Math.max(I,g(C[i]))}return e[A]=I,I}(g)}},{key:"levelDownstream",value:function(g,t){void 0===this.levels[t.id]&&(void 0===this.levels[g.id]&&(this.levels[g.id]=0),this.levels[t.id]=this.levels[g.id]+1)}},{key:"setMinLevelToZero",value:function(g){var t=1e9;for(var e in g)g.hasOwnProperty(e)&&void 0!==this.levels[e]&&(t=Math.min(this.levels[e],t));for(var A in g)g.hasOwnProperty(A)&&void 0!==this.levels[A]&&(this.levels[A]-=t)}},{key:"getTreeSize",value:function(g,t){var e=1e9,A=-1e9,I=1e9,C=-1e9;for(var i in this.trees)if(this.trees.hasOwnProperty(i)&&this.trees[i]===t){var n=g[i];e=Math.min(n.x,e),A=Math.max(n.x,A),I=Math.min(n.y,I),C=Math.max(n.y,C)}return{min_x:e,max_x:A,min_y:I,max_y:C}}},{key:"hasSameParent",value:function(g,t){var e=this.parentReference[g.id],A=this.parentReference[t.id];if(void 0===e||void 0===A)return!1;for(var I=0;I<e.length;I++)for(var C=0;C<A.length;C++)if(e[I]==A[C])return!0;return!1}},{key:"inSameSubNetwork",value:function(g,t){return this.trees[g.id]===this.trees[t.id]}},{key:"getLevels",value:function(){return GA(this.distributionOrdering)}},{key:"addToOrdering",value:function(g,t){void 0===this.distributionOrdering[t]&&(this.distributionOrdering[t]=[]);var e=!1,A=this.distributionOrdering[t];for(var I in A)if(A[I]===g){e=!0;break}e||(this.distributionOrdering[t].push(g),this.distributionIndex[g.id]=this.distributionOrdering[t].length-1)}}]),g}(),ql=function(){function g(t){gr(this,g),this.body=t,this._resetRNG(Math.random()+":"+fC()),this.setPhysics=!1,this.options={},this.optionsBackup={physics:{}},this.defaultOptions={randomSeed:void 0,improvedLayout:!0,clusterThreshold:150,hierarchical:{enabled:!1,levelSeparation:150,nodeSpacing:100,treeSpacing:200,blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:"UD",sortMethod:"hubsize"}},FC(this.options,this.defaultOptions),this.bindEventListeners()}return er(g,[{key:"bindEventListeners",value:function(){var g=this;this.body.emitter.on("_dataChanged",(function(){g.setupHierarchicalLayout()})),this.body.emitter.on("_dataLoaded",(function(){g.layoutNetwork()})),this.body.emitter.on("_resetHierarchicalLayout",(function(){g.setupHierarchicalLayout()})),this.body.emitter.on("_adjustEdgesForHierarchicalLayout",(function(){if(!0===g.options.hierarchical.enabled){var t=g.direction.curveType();g.body.emitter.emit("_forceDisableDynamicCurves",t,!1)}}))}},{key:"setOptions",value:function(g,t){if(void 0!==g){var e=this.options.hierarchical,A=e.enabled;if(SC(["randomSeed","improvedLayout","clusterThreshold"],this.options,g),si(this.options,g,"hierarchical"),void 0!==g.randomSeed&&this._resetRNG(g.randomSeed),!0===e.enabled)return!0===A&&this.body.emitter.emit("refresh",!0),"RL"===e.direction||"DU"===e.direction?e.levelSeparation>0&&(e.levelSeparation*=-1):e.levelSeparation<0&&(e.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(!0===A)return this.body.emitter.emit("refresh"),QC(t,this.optionsBackup)}return t}},{key:"_resetRNG",value:function(g){this.initialRandomSeed=g,this._rng=bC(this.initialRandomSeed)}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(g){if(!0===this.options.hierarchical.enabled){var t=this.optionsBackup.physics;void 0===g.physics||!0===g.physics?(g.physics={enabled:void 0===t.enabled||t.enabled,solver:"hierarchicalRepulsion"},t.enabled=void 0===t.enabled||t.enabled,t.solver=t.solver||"barnesHut"):"object"===dC(g.physics)?(t.enabled=void 0===g.physics.enabled||g.physics.enabled,t.solver=g.physics.solver||"barnesHut",g.physics.solver="hierarchicalRepulsion"):!1!==g.physics&&(t.solver="barnesHut",g.physics={solver:"hierarchicalRepulsion"});var e=this.direction.curveType();if(void 0===g.edges)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},g.edges={smooth:!1};else if(void 0===g.edges.smooth)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},g.edges.smooth=!1;else if("boolean"==typeof g.edges.smooth)this.optionsBackup.edges={smooth:g.edges.smooth},g.edges.smooth={enabled:g.edges.smooth,type:e};else{var A=g.edges.smooth;void 0!==A.type&&"dynamic"!==A.type&&(e=A.type),this.optionsBackup.edges={smooth:{enabled:void 0===A.enabled||A.enabled,type:void 0===A.type?"dynamic":A.type,roundness:void 0===A.roundness?.5:A.roundness,forceDirection:void 0!==A.forceDirection&&A.forceDirection}},g.edges.smooth={enabled:void 0===A.enabled||A.enabled,type:e,roundness:void 0===A.roundness?.5:A.roundness,forceDirection:void 0!==A.forceDirection&&A.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",e)}return g}},{key:"positionInitially",value:function(g){if(!0!==this.options.hierarchical.enabled){this._resetRNG(this.initialRandomSeed);for(var t=g.length+50,e=0;e<g.length;e++){var A=g[e],I=2*Math.PI*this._rng();void 0===A.x&&(A.x=t*Math.cos(I)),void 0===A.y&&(A.y=t*Math.sin(I))}}}},{key:"layoutNetwork",value:function(){if(!0!==this.options.hierarchical.enabled&&!0===this.options.improvedLayout){for(var g=this.body.nodeIndices,t=0,e=0;e<g.length;e++){!0===this.body.nodes[g[e]].predefinedPosition&&(t+=1)}if(t<.5*g.length){var A=0,I=this.options.clusterThreshold,C={clusterNodeProperties:{shape:"ellipse",label:"",group:"",font:{multi:!1}},clusterEdgeProperties:{label:"",font:{multi:!1},smooth:{enabled:!1}}};if(g.length>I){for(var i=g.length;g.length>I&&A<=10;){A+=1;var n=g.length;if(A%3==0?this.body.modules.clustering.clusterBridges(C):this.body.modules.clustering.clusterOutliers(C),n==g.length&&A%3!=0)return this._declusterAll(),this.body.emitter.emit("_layoutFailed"),void console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.")}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*i)})}A>10&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(g,this.body.edgeIndices,!0),this._shiftToCenter();for(var o=0;o<g.length;o++){var r=this.body.nodes[g[o]];!1===r.predefinedPosition&&(r.x+=70*(.5-this._rng()),r.y+=70*(.5-this._rng()))}this._declusterAll(),this.body.emitter.emit("_repositionBezierNodes")}}}},{key:"_shiftToCenter",value:function(){for(var g=ml.getRangeCore(this.body.nodes,this.body.nodeIndices),t=ml.findCenter(g),e=0;e<this.body.nodeIndices.length;e++){var A=this.body.nodes[this.body.nodeIndices[e]];A.x-=t.x,A.y-=t.y}}},{key:"_declusterAll",value:function(){for(var g=!0;!0===g;){g=!1;for(var t=0;t<this.body.nodeIndices.length;t++)!0===this.body.nodes[this.body.nodeIndices[t]].isCluster&&(g=!0,this.body.modules.clustering.openCluster(this.body.nodeIndices[t],{},!1));!0===g&&this.body.emitter.emit("_dataChanged")}}},{key:"getSeed",value:function(){return this.initialRandomSeed}},{key:"setupHierarchicalLayout",value:function(){if(!0===this.options.hierarchical.enabled&&this.body.nodeIndices.length>0){var g,t,e=!1,A=!1;for(t in this.lastNodeOnLevel={},this.hierarchical=new Kl,this.body.nodes)this.body.nodes.hasOwnProperty(t)&&(void 0!==(g=this.body.nodes[t]).options.level?(e=!0,this.hierarchical.levels[t]=g.options.level):A=!0);if(!0===A&&!0===e)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");if(!0===A){var I=this.options.hierarchical.sortMethod;"hubsize"===I?this._determineLevelsByHubsize():"directed"===I?this._determineLevelsDirected():"custom"===I&&this._determineLevelsCustomCallback()}for(var C in this.body.nodes)this.body.nodes.hasOwnProperty(C)&&this.hierarchical.ensureLevel(C);var i=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(i),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var g=this,t=!1,e={},A=function(t,e){var A=g.hierarchical.trees;for(var I in A)A.hasOwnProperty(I)&&A[I]===t&&g.direction.shift(I,e)},I=function(){for(var t=[],e=0;e<g.hierarchical.numTrees();e++)t.push(g.direction.getTreeSize(e));return t},C=function t(e,A){if(!A[e.id]&&(A[e.id]=!0,g.hierarchical.childrenReference[e.id])){var I=g.hierarchical.childrenReference[e.id];if(I.length>0)for(var C=0;C<I.length;C++)t(g.body.nodes[I[C]],A)}},i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e9,A=1e9,I=1e9,C=1e9,i=-1e9;for(var n in t)if(t.hasOwnProperty(n)){var o=g.body.nodes[n],r=g.hierarchical.levels[o.id],s=g.direction.getPosition(o),a=g._getSpaceAroundNode(o,t),d=uC(a,2),l=d[0],h=d[1];A=Math.min(l,A),I=Math.min(h,I),r<=e&&(C=Math.min(s,C),i=Math.max(s,i))}return[C,i,A,I]},n=function(t,e){var A=g.hierarchical.getMaxLevel(t.id),I=g.hierarchical.getMaxLevel(e.id);return Math.min(A,I)},o=function(t,e,A){for(var I=g.hierarchical,C=0;C<e.length;C++){var i=e[C],n=I.distributionOrdering[i];if(n.length>1)for(var o=0;o<n.length-1;o++){var r=n[o],s=n[o+1];I.hasSameParent(r,s)&&I.inSameSubNetwork(r,s)&&t(r,s,A)}}},r=function(e,A){var I=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=g.direction.getPosition(e),r=g.direction.getPosition(A),s=Math.abs(r-o),a=g.options.hierarchical.nodeSpacing;if(s>a){var d={},l={};C(e,d),C(A,l);var h=n(e,A),c=i(d,h),u=i(l,h),f=c[1],p=u[0],v=u[2],y=Math.abs(f-p);if(y>a){var m=f-p+a;m<-v+a&&(m=-v+a),m<0&&(g._shiftBlock(A.id,m),t=!0,!0===I&&g._centerParent(A))}}},s=function(A,I){for(var n=I.id,o=I.edges,r=g.hierarchical.levels[I.id],s=g.options.hierarchical.levelSeparation*g.options.hierarchical.levelSeparation,a={},d=[],l=0;l<o.length;l++){var h=o[l];if(h.toId!=h.fromId){var c=h.toId==n?h.from:h.to;a[o[l].id]=c,g.hierarchical.levels[c.id]<r&&d.push(h)}}var u=function(t,e){for(var A=0,I=0;I<e.length;I++)if(void 0!==a[e[I].id]){var C=g.direction.getPosition(a[e[I].id])-t;A+=C/Math.sqrt(C*C+s)}return A},f=function(t,e){for(var A=0,I=0;I<e.length;I++)if(void 0!==a[e[I].id]){var C=g.direction.getPosition(a[e[I].id])-t;A-=s*Math.pow(C*C+s,-1.5)}return A},p=function(t,e){for(var A=g.direction.getPosition(I),C={},i=0;i<t;i++){var n=u(A,e),o=f(A,e);if(void 0!==C[A-=Math.max(-40,Math.min(40,Math.round(n/o)))])break;C[A]=i}return A},v=p(A,d);!function(A){var n=g.direction.getPosition(I);if(void 0===e[I.id]){var o={};C(I,o),e[I.id]=o}var r=i(e[I.id]),s=r[2],a=r[3],d=A-n,l=0;d>0?l=Math.min(d,a-g.options.hierarchical.nodeSpacing):d<0&&(l=-Math.min(-d,s-g.options.hierarchical.nodeSpacing)),0!=l&&(g._shiftBlock(I.id,l),t=!0)}(v),function(e){var A=g.direction.getPosition(I),C=g._getSpaceAroundNode(I),i=uC(C,2),n=i[0],o=i[1],r=e-A,s=A;r>0?s=Math.min(A+(o-g.options.hierarchical.nodeSpacing),e):r<0&&(s=Math.max(A-(n-g.options.hierarchical.nodeSpacing),e)),s!==A&&(g.direction.setPosition(I,s),t=!0)}(v=p(A,o))};!0===this.options.hierarchical.blockShifting&&(function(e){var A=g.hierarchical.getLevels();A=yl(A).call(A);for(var I=0;I<e&&(t=!1,o(r,A,!0),!0===t);I++);}(5),function(){for(var t in g.body.nodes)g.body.nodes.hasOwnProperty(t)&&g._centerParent(g.body.nodes[t])}()),!0===this.options.hierarchical.edgeMinimization&&function(e){var A=g.hierarchical.getLevels();A=yl(A).call(A);for(var I=0;I<e;I++){t=!1;for(var C=0;C<A.length;C++)for(var i=A[C],n=g.hierarchical.distributionOrdering[i],o=0;o<n.length;o++)s(1e3,n[o]);if(!0!==t)break}}(20),!0===this.options.hierarchical.parentCentralization&&function(){var t=g.hierarchical.getLevels();t=yl(t).call(t);for(var e=0;e<t.length;e++)for(var A=t[e],I=g.hierarchical.distributionOrdering[A],C=0;C<I.length;C++)g._centerParent(I[C])}(),function(){for(var t=I(),e=0,C=0;C<t.length-1;C++){e+=t[C].max-t[C+1].min+g.options.hierarchical.treeSpacing,A(C+1,e)}}()}},{key:"_getSpaceAroundNode",value:function(g,t){var e=!0;void 0===t&&(e=!1);var A=this.hierarchical.levels[g.id];if(void 0!==A){var I=this.hierarchical.distributionIndex[g.id],C=this.direction.getPosition(g),i=this.hierarchical.distributionOrdering[A],n=1e9,o=1e9;if(0!==I){var r=i[I-1];if(!0===e&&void 0===t[r.id]||!1===e)n=C-this.direction.getPosition(r)}if(I!=i.length-1){var s=i[I+1];if(!0===e&&void 0===t[s.id]||!1===e){var a=this.direction.getPosition(s);o=Math.min(o,a-C)}}return[n,o]}return[0,0]}},{key:"_centerParent",value:function(g){if(this.hierarchical.parentReference[g.id])for(var t=this.hierarchical.parentReference[g.id],e=0;e<t.length;e++){var A=t[e],I=this.body.nodes[A],C=this.hierarchical.childrenReference[A];if(void 0!==C){var i=this._getCenterPosition(C),n=this.direction.getPosition(I),o=this._getSpaceAroundNode(I),r=uC(o,2),s=r[0],a=r[1],d=n-i;(d<0&&Math.abs(d)<a-this.options.hierarchical.nodeSpacing||d>0&&Math.abs(d)<s-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(I,i)}}}},{key:"_placeNodesByHierarchy",value:function(g){for(var t in this.positionedNodes={},g)if(g.hasOwnProperty(t)){var e,A=GA(g[t]);A=this._indexArrayToNodes(A),Cs(e=this.direction).call(e,A);for(var I=0,C=0;C<A.length;C++){var i=A[C];if(void 0===this.positionedNodes[i.id]){var n=this.options.hierarchical.nodeSpacing,o=n*I;I>0&&(o=this.direction.getPosition(A[C-1])+n),this.direction.setPosition(i,o,t),this._validatePositionAndContinue(i,t,o),I++}}}}},{key:"_placeBranchNodes",value:function(g,t){var e,A=this.hierarchical.childrenReference[g];if(void 0!==A){for(var I=[],C=0;C<A.length;C++)I.push(this.body.nodes[A[C]]);Cs(e=this.direction).call(e,I);for(var i=0;i<I.length;i++){var n=I[i],o=this.hierarchical.levels[n.id];if(!(o>t&&void 0===this.positionedNodes[n.id]))return;var r=this.options.hierarchical.nodeSpacing,s=void 0;s=0===i?this.direction.getPosition(this.body.nodes[g]):this.direction.getPosition(I[i-1])+r,this.direction.setPosition(n,s,o),this._validatePositionAndContinue(n,o,s)}var a=this._getCenterPosition(I);this.direction.setPosition(this.body.nodes[g],a,t)}}},{key:"_validatePositionAndContinue",value:function(g,t,e){if(this.hierarchical.isTree){if(void 0!==this.lastNodeOnLevel[t]){var A=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(e-A<this.options.hierarchical.nodeSpacing){var I=A+this.options.hierarchical.nodeSpacing-e,C=this._findCommonParent(this.lastNodeOnLevel[t],g.id);this._shiftBlock(C.withChild,I)}}this.lastNodeOnLevel[t]=g.id,this.positionedNodes[g.id]=!0,this._placeBranchNodes(g.id,t)}}},{key:"_indexArrayToNodes",value:function(g){for(var t=[],e=0;e<g.length;e++)t.push(this.body.nodes[g[e]]);return t}},{key:"_getDistribution",value:function(){var g,t,e={};for(g in this.body.nodes)if(this.body.nodes.hasOwnProperty(g)){t=this.body.nodes[g];var A=void 0===this.hierarchical.levels[g]?0:this.hierarchical.levels[g];this.direction.fix(t,A),void 0===e[A]&&(e[A]={}),e[A][g]=t}return e}},{key:"_getActiveEdges",value:function(g){var t=this,e=[];return VC(g.edges,(function(g){var A;-1!==IC(A=t.body.edgeIndices).call(A,g.id)&&e.push(g)})),e}},{key:"_getHubSizes",value:function(){var g=this,t={};VC(this.body.nodeIndices,(function(e){var A=g.body.nodes[e],I=g._getActiveEdges(A).length;t[I]=!0}));var e=[];return VC(t,(function(g){e.push(Number(g))})),Cs(Rl).call(Rl,e,(function(g,t){return t-g})),e}},{key:"_determineLevelsByHubsize",value:function(){for(var g=this,t=function(t,e){g.hierarchical.levelDownstream(t,e)},e=this._getHubSizes(),A=function(A){var I=e[A];if(0===I)return"break";VC(g.body.nodeIndices,(function(e){var A=g.body.nodes[e];I===g._getActiveEdges(A).length&&g._crawlNetwork(t,e)}))},I=0;I<e.length;++I){if("break"===A(I))break}}},{key:"_determineLevelsCustomCallback",value:function(){var g=this;this._crawlNetwork((function(t,e,A){var I=g.hierarchical.levels[t.id];void 0===I&&(I=g.hierarchical.levels[t.id]=1e5);var C=(ml.cloneOptions(t,"node"),ml.cloneOptions(e,"node"),void ml.cloneOptions(A,"edge"));g.hierarchical.levels[e.id]=I+C})),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_determineLevelsDirected",value:function(){var g,t=this,e=Ss(g=this.body.nodeIndices).call(g,(function(g,e){return g.set(e,t.body.nodes[e]),g}),new ws),A=this.hierarchical.levels;"roots"===this.options.hierarchical.shakeTowards?this.hierarchical.levels=function(g){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:OA(null);return Jl((function(t){var e,A;return Xl(e=bI(A=t.edges).call(A,(function(t){return g.has(t.toId)}))).call(e,(function(g){return g.from===t}))}),(function(g,t){return t<g}),"to",g,t)}(e,A):this.hierarchical.levels=function(g){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:OA(null);return Jl((function(t){var e,A;return Xl(e=bI(A=t.edges).call(A,(function(t){return g.has(t.toId)}))).call(e,(function(g){return g.to===t}))}),(function(g,t){return t>g}),"from",g,t)}(e,A),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_generateMap",value:function(){var g=this;this._crawlNetwork((function(t,e){g.hierarchical.levels[e.id]>g.hierarchical.levels[t.id]&&g.hierarchical.addRelation(t.id,e.id)})),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var g=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},e=arguments.length>1?arguments[1]:void 0,A={},I=function e(I,C){if(void 0===A[I.id]){var i;g.hierarchical.setTreeIndex(I,C),A[I.id]=!0;for(var n=g._getActiveEdges(I),o=0;o<n.length;o++){var r=n[o];!0===r.connected&&(i=r.toId==I.id?r.from:r.to,I.id!=i.id&&(t(I,i,r),e(i,C)))}}};if(void 0===e)for(var C=0,i=0;i<this.body.nodeIndices.length;i++){var n=this.body.nodeIndices[i];if(void 0===A[n]){var o=this.body.nodes[n];I(o,C),C+=1}}else{var r=this.body.nodes[e];if(void 0===r)return void console.error("Node not found:",e);I(r)}}},{key:"_shiftBlock",value:function(g,t){var e=this,A={};!function g(I){if(!A[I]){A[I]=!0,e.direction.shift(I,t);var C=e.hierarchical.childrenReference[I];if(void 0!==C)for(var i=0;i<C.length;i++)g(C[i])}}(g)}},{key:"_findCommonParent",value:function(g,t){var e=this,A={};return function g(t,A){var I=e.hierarchical.parentReference[A];if(void 0!==I)for(var C=0;C<I.length;C++){var i=I[C];t[i]=!0,g(t,i)}}(A,g),function g(t,A){var I=e.hierarchical.parentReference[A];if(void 0!==I)for(var C=0;C<I.length;C++){var i=I[C];if(void 0!==t[i])return{foundParent:i,withChild:A};var n=g(t,i);if(null!==n.foundParent)return n}return{foundParent:null,withChild:A}}(A,t)}},{key:"setDirectionStrategy",value:function(){var g="UD"===this.options.hierarchical.direction||"DU"===this.options.hierarchical.direction;this.direction=g?new Ql(this):new Yl(this)}},{key:"_getCenterPosition",value:function(g){for(var t=1e9,e=-1e9,A=0;A<g.length;A++){var I=void 0;if(void 0!==g[A].id)I=g[A];else{var C=g[A];I=this.body.nodes[C]}var i=this.direction.getPosition(I);t=Math.min(t,i),e=Math.max(e,i)}return.5*(t+e)}}]),g}();un('div.vis-network div.vis-manipulation{box-sizing:content-box;border:0 solid #d6d9d8;border-bottom:1px;background:#fff;background:-moz-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(48%,#fcfcfc),color-stop(50%,#fafafa),color-stop(100%,#fcfcfc));background:-webkit-linear-gradient(top,#fff,#fcfcfc 48%,#fafafa 50%,#fcfcfc);background:-o-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-ms-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:linear-gradient(180deg,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffff",endColorstr="#fcfcfc",GradientType=0);padding-top:4px;position:absolute;left:0;top:0;width:100%;height:28px}div.vis-network div.vis-edit-mode{position:absolute;left:0;top:5px;height:30px}div.vis-network div.vis-close{position:absolute;right:0;top:0;width:30px;height:30px;background-position:20px 3px;background-repeat:no-repeat;background-image:url("data:image/png;base64, ");cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.vis-network div.vis-close:hover{opacity:.6}div.vis-network div.vis-edit-mode div.vis-button,div.vis-network div.vis-manipulation div.vis-button{float:left;font-family:verdana;font-size:12px;-moz-border-radius:15px;border-radius:15px;display:inline-block;background-position:0 0;background-repeat:no-repeat;height:24px;margin-left:10px;cursor:pointer;padding:0 8px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.vis-network div.vis-manipulation div.vis-button:hover{box-shadow:1px 1px 8px rgba(0,0,0,.2)}div.vis-network div.vis-manipulation div.vis-button:active{box-shadow:1px 1px 8px rgba(0,0,0,.5)}div.vis-network div.vis-manipulation div.vis-button.vis-back{background-image:url("data:image/png;base64, ")}div.vis-network div.vis-manipulation div.vis-button.vis-none:hover{box-shadow:1px 1px 8px transparent;cursor:default}div.vis-network div.vis-manipulation div.vis-button.vis-none:active{box-shadow:1px 1px 8px transparent}div.vis-network div.vis-manipulation div.vis-button.vis-none{padding:0}div.vis-network div.vis-manipulation div.notification{margin:2px;font-weight:700}div.vis-network div.vis-manipulation div.vis-button.vis-add{background-image:url("data:image/png;base64, ")}div.vis-network div.vis-edit-mode div.vis-button.vis-edit,div.vis-network div.vis-manipulation div.vis-button.vis-edit{background-image:url("data:image/png;base64, ")}div.vis-network div.vis-edit-mode div.vis-button.vis-edit.vis-edit-mode{background-color:#fcfcfc;border:1px solid #ccc}div.vis-network div.vis-manipulation div.vis-button.vis-connect{background-image:url("data:image/png;base64, ")}div.vis-network div.vis-manipulation div.vis-button.vis-delete{background-image:url("data:image/png;base64, ")}div.vis-network div.vis-edit-mode div.vis-label,div.vis-network div.vis-manipulation div.vis-label{margin:0 0 0 23px;line-height:25px}div.vis-network div.vis-manipulation div.vis-separator-line{float:left;display:inline-block;width:1px;height:21px;background-color:#bdbdbd;margin:0 7px 0 15px}\n/*# sourceMappingURL=data:application/json;base64,  */');var $l=function(){function g(t,e,A,I){var C,i,n=this;gr(this,g),this.body=t,this.canvas=e,this.selectionHandler=A,this.interactionHandler=I,this.editMode=!1,this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0,this.manipulationHammers=[],this.temporaryUIFunctions={},this.temporaryEventFunctions=[],this.touchTime=0,this.temporaryIds={nodes:[],edges:[]},this.guiEnabled=!1,this.inMode=!1,this.selectedControlNode=void 0,this.options={},this.defaultOptions={enabled:!1,initiallyActive:!1,addNode:!0,addEdge:!0,editNode:void 0,editEdge:!0,deleteNode:!0,deleteEdge:!0,controlNodeStyle:{shape:"dot",size:6,color:{background:"#ff0000",border:"#3c3c3c",highlight:{background:"#07f968",border:"#3c3c3c"}},borderWidth:2,borderWidthSelected:2}},FC(this.options,this.defaultOptions),this.body.emitter.on("destroy",(function(){n._clean()})),this.body.emitter.on("_dataChanged",gg(C=this._restore).call(C,this)),this.body.emitter.on("_resetData",gg(i=this._restore).call(i,this))}return er(g,[{key:"_restore",value:function(){!1!==this.inMode&&(!0===this.options.initiallyActive?this.enableEditMode():this.disableEditMode())}},{key:"setOptions",value:function(g,t,e){void 0!==t&&(void 0!==t.locale?this.options.locale=t.locale:this.options.locale=e.locale,void 0!==t.locales?this.options.locales=t.locales:this.options.locales=e.locales),void 0!==g&&("boolean"==typeof g?this.options.enabled=g:(this.options.enabled=!0,QC(this.options,g)),!0===this.options.initiallyActive&&(this.editMode=!0),this._setup())}},{key:"toggleEditMode",value:function(){!0===this.editMode?this.disableEditMode():this.enableEditMode()}},{key:"enableEditMode",value:function(){this.editMode=!0,this._clean(),!0===this.guiEnabled&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}},{key:"disableEditMode",value:function(){this.editMode=!1,this._clean(),!0===this.guiEnabled&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}},{key:"showManipulatorToolbar",value:function(){if(this._clean(),this.manipulationDOM={},!0===this.guiEnabled){var g,t;this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";var e=this.selectionHandler._getSelectedNodeCount(),A=this.selectionHandler._getSelectedEdgeCount(),I=e+A,C=this.options.locales[this.options.locale],i=!1;!1!==this.options.addNode&&(this._createAddNodeButton(C),i=!0),!1!==this.options.addEdge&&(!0===i?this._createSeperator(1):i=!0,this._createAddEdgeButton(C)),1===e&&"function"==typeof this.options.editNode?(!0===i?this._createSeperator(2):i=!0,this._createEditNodeButton(C)):1===A&&0===e&&!1!==this.options.editEdge&&(!0===i?this._createSeperator(3):i=!0,this._createEditEdgeButton(C)),0!==I&&(e>0&&!1!==this.options.deleteNode||0===e&&!1!==this.options.deleteEdge)&&(!0===i&&this._createSeperator(4),this._createDeleteButton(C)),this._bindHammerToDiv(this.closeDiv,gg(g=this.toggleEditMode).call(g,this)),this._temporaryBindEvent("select",gg(t=this.showManipulatorToolbar).call(t,this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){var g;if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="addNode",!0===this.guiEnabled){var t,e=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.addDescription||this.options.locales.en.addDescription),this._bindHammerToDiv(this.closeDiv,gg(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent("click",gg(g=this._performAddNode).call(g,this))}},{key:"editNode",value:function(){var g=this;!0!==this.editMode&&this.enableEditMode(),this._clean();var t=this.selectionHandler._getSelectedNode();if(void 0!==t){if(this.inMode="editNode","function"!=typeof this.options.editNode)throw new Error("No function has been configured to handle the editing of nodes.");if(!0!==t.isCluster){var e=QC({},t.options,!1);if(e.x=t.x,e.y=t.y,2!==this.options.editNode.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editNode(e,(function(t){null!=t&&"editNode"===g.inMode&&g.body.data.nodes.getDataSet().update(t),g.showManipulatorToolbar()}))}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError)}else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){var g,t,e,A,I;if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="addEdge",!0===this.guiEnabled){var C,i=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(i),this._createSeperator(),this._createDescription(i.edgeDescription||this.options.locales.en.edgeDescription),this._bindHammerToDiv(this.closeDiv,gg(C=this.toggleEditMode).call(C,this))}this._temporaryBindUI("onTouch",gg(g=this._handleConnect).call(g,this)),this._temporaryBindUI("onDragEnd",gg(t=this._finishConnect).call(t,this)),this._temporaryBindUI("onDrag",gg(e=this._dragControlNode).call(e,this)),this._temporaryBindUI("onRelease",gg(A=this._finishConnect).call(A,this)),this._temporaryBindUI("onDragStart",gg(I=this._dragStartEdge).call(I,this)),this._temporaryBindUI("onHold",(function(){}))}},{key:"editEdgeMode",value:function(){if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="editEdge","object"!==dC(this.options.editEdge)||"function"!=typeof this.options.editEdge.editWithoutDrag||(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],void 0===this.edgeBeingEditedId)){if(!0===this.guiEnabled){var g,t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindHammerToDiv(this.closeDiv,gg(g=this.toggleEditMode).call(g,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],void 0!==this.edgeBeingEditedId){var e,A,I,C,i=this.body.edges[this.edgeBeingEditedId],n=this._getNewTargetNode(i.from.x,i.from.y),o=this._getNewTargetNode(i.to.x,i.to.y);this.temporaryIds.nodes.push(n.id),this.temporaryIds.nodes.push(o.id),this.body.nodes[n.id]=n,this.body.nodeIndices.push(n.id),this.body.nodes[o.id]=o,this.body.nodeIndices.push(o.id),this._temporaryBindUI("onTouch",gg(e=this._controlNodeTouch).call(e,this)),this._temporaryBindUI("onTap",(function(){})),this._temporaryBindUI("onHold",(function(){})),this._temporaryBindUI("onDragStart",gg(A=this._controlNodeDragStart).call(A,this)),this._temporaryBindUI("onDrag",gg(I=this._controlNodeDrag).call(I,this)),this._temporaryBindUI("onDragEnd",gg(C=this._controlNodeDragEnd).call(C,this)),this._temporaryBindUI("onMouseMove",(function(){})),this._temporaryBindEvent("beforeDrawing",(function(g){var t=i.edgeType.findBorderPositions(g);!1===n.selected&&(n.x=t.from.x,n.y=t.from.y),!1===o.selected&&(o.x=t.to.x,o.y=t.to.y)})),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}else{var r=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(r.from.id,r.to.id)}}},{key:"deleteSelected",value:function(){var g=this;!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="delete";var t=this.selectionHandler.getSelectedNodes(),e=this.selectionHandler.getSelectedEdges(),A=void 0;if(t.length>0){for(var I=0;I<t.length;I++)if(!0===this.body.nodes[t[I]].isCluster)return void alert(this.options.locales[this.options.locale].deleteClusterError||this.options.locales.en.deleteClusterError);"function"==typeof this.options.deleteNode&&(A=this.options.deleteNode)}else e.length>0&&"function"==typeof this.options.deleteEdge&&(A=this.options.deleteEdge);if("function"==typeof A){var C={nodes:t,edges:e};if(2!==A.length)throw new Error("The function for delete does not support two arguments (data, callback)");A(C,(function(t){null!=t&&"delete"===g.inMode?(g.body.data.edges.getDataSet().remove(t.edges),g.body.data.nodes.getDataSet().remove(t.nodes),g.body.emitter.emit("startSimulation"),g.showManipulatorToolbar()):(g.body.emitter.emit("startSimulation"),g.showManipulatorToolbar())}))}else this.body.data.edges.getDataSet().remove(e),this.body.data.nodes.getDataSet().remove(t),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){!0===this.options.enabled?(this.guiEnabled=!0,this._createWrappers(),!1===this.editMode?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){void 0===this.manipulationDiv&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",!0===this.editMode?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),void 0===this.editModeDiv&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",!0===this.editMode?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),void 0===this.closeDiv&&(this.closeDiv=document.createElement("div"),this.closeDiv.className="vis-close",this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv))}},{key:"_getNewTargetNode",value:function(g,t){var e=QC({},this.options.controlNodeStyle);e.id="targetNode"+Ps(),e.hidden=!1,e.physics=!1,e.x=g,e.y=t;var A=this.body.functions.createNode(e);return A.shape.boundingBox={left:g,right:g,top:t,bottom:t},A}},{key:"_createEditButton",value:function(){var g;this._clean(),this.manipulationDOM={},EC(this.editModeDiv);var t=this.options.locales[this.options.locale],e=this._createButton("editMode","vis-button vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(e),this._bindHammerToDiv(e,gg(g=this.toggleEditMode).call(g,this))}},{key:"_clean",value:function(){this.inMode=!1,!0===this.guiEnabled&&(EC(this.editModeDiv),EC(this.manipulationDiv),this._cleanManipulatorHammers()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanManipulatorHammers",value:function(){if(0!=this.manipulationHammers.length){for(var g=0;g<this.manipulationHammers.length;g++)this.manipulationHammers[g].destroy();this.manipulationHammers=[]}}},{key:"_removeManipulationDOM",value:function(){this._clean(),EC(this.manipulationDiv),EC(this.editModeDiv),EC(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}},{key:"_createSeperator",value:function(){var g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+g]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+g].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+g])}},{key:"_createAddNodeButton",value:function(g){var t,e=this._createButton("addNode","vis-button vis-add",g.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,gg(t=this.addNodeMode).call(t,this))}},{key:"_createAddEdgeButton",value:function(g){var t,e=this._createButton("addEdge","vis-button vis-connect",g.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,gg(t=this.addEdgeMode).call(t,this))}},{key:"_createEditNodeButton",value:function(g){var t,e=this._createButton("editNode","vis-button vis-edit",g.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,gg(t=this.editNode).call(t,this))}},{key:"_createEditEdgeButton",value:function(g){var t,e=this._createButton("editEdge","vis-button vis-edit",g.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,gg(t=this.editEdgeMode).call(t,this))}},{key:"_createDeleteButton",value:function(g){var t,e;e=this.options.rtl?"vis-button vis-delete-rtl":"vis-button vis-delete";var A=this._createButton("delete",e,g.del||this.options.locales.en.del);this.manipulationDiv.appendChild(A),this._bindHammerToDiv(A,gg(t=this.deleteSelected).call(t,this))}},{key:"_createBackButton",value:function(g){var t,e=this._createButton("back","vis-button vis-back",g.back||this.options.locales.en.back);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,gg(t=this.showManipulatorToolbar).call(t,this))}},{key:"_createButton",value:function(g,t,e){var A=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"vis-label";return this.manipulationDOM[g+"Div"]=document.createElement("div"),this.manipulationDOM[g+"Div"].className=t,this.manipulationDOM[g+"Label"]=document.createElement("div"),this.manipulationDOM[g+"Label"].className=A,this.manipulationDOM[g+"Label"].innerHTML=e,this.manipulationDOM[g+"Div"].appendChild(this.manipulationDOM[g+"Label"]),this.manipulationDOM[g+"Div"]}},{key:"_createDescription",value:function(g){this.manipulationDiv.appendChild(this._createButton("description","vis-button vis-none",g))}},{key:"_temporaryBindEvent",value:function(g,t){this.temporaryEventFunctions.push({event:g,boundFunction:t}),this.body.emitter.on(g,t)}},{key:"_temporaryBindUI",value:function(g,t){if(void 0===this.body.eventListeners[g])throw new Error("This UI function does not exist. Typo? You tried: "+g+" possible are: "+Fr(GA(this.body.eventListeners)));this.temporaryUIFunctions[g]=this.body.eventListeners[g],this.body.eventListeners[g]=t}},{key:"_unbindTemporaryUIs",value:function(){for(var g in this.temporaryUIFunctions)this.temporaryUIFunctions.hasOwnProperty(g)&&(this.body.eventListeners[g]=this.temporaryUIFunctions[g],delete this.temporaryUIFunctions[g]);this.temporaryUIFunctions={}}},{key:"_unbindTemporaryEvents",value:function(){for(var g=0;g<this.temporaryEventFunctions.length;g++){var t=this.temporaryEventFunctions[g].event,e=this.temporaryEventFunctions[g].boundFunction;this.body.emitter.off(t,e)}this.temporaryEventFunctions=[]}},{key:"_bindHammerToDiv",value:function(g,t){var e=new Ho(g,{});Ol.onTouch(e,t),this.manipulationHammers.push(e)}},{key:"_cleanupTemporaryNodesAndEdges",value:function(){for(var g=0;g<this.temporaryIds.edges.length;g++){var t;this.body.edges[this.temporaryIds.edges[g]].disconnect(),delete this.body.edges[this.temporaryIds.edges[g]];var e,A=IC(t=this.body.edgeIndices).call(t,this.temporaryIds.edges[g]);if(-1!==A)yi(e=this.body.edgeIndices).call(e,A,1)}for(var I=0;I<this.temporaryIds.nodes.length;I++){var C;delete this.body.nodes[this.temporaryIds.nodes[I]];var i,n=IC(C=this.body.nodeIndices).call(C,this.temporaryIds.nodes[I]);if(-1!==n)yi(i=this.body.nodeIndices).call(i,n,1)}this.temporaryIds={nodes:[],edges:[]}}},{key:"_controlNodeTouch",value:function(g){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(g.center),this.lastTouch.translation=FC({},this.body.view.translation)}},{key:"_controlNodeDragStart",value:function(g){var t=this.lastTouch,e=this.selectionHandler._pointerToPositionObject(t),A=this.body.nodes[this.temporaryIds.nodes[0]],I=this.body.nodes[this.temporaryIds.nodes[1]],C=this.body.edges[this.edgeBeingEditedId];this.selectedControlNode=void 0;var i=A.isOverlappingWith(e),n=I.isOverlappingWith(e);!0===i?(this.selectedControlNode=A,C.edgeType.from=A):!0===n&&(this.selectedControlNode=I,C.edgeType.to=I),void 0!==this.selectedControlNode&&this.selectionHandler.selectObject(this.selectedControlNode),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDrag",value:function(g){this.body.emitter.emit("disablePhysics");var t=this.body.functions.getPointer(g.center),e=this.canvas.DOMtoCanvas(t);void 0!==this.selectedControlNode?(this.selectedControlNode.x=e.x,this.selectedControlNode.y=e.y):this.interactionHandler.onDrag(g),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDragEnd",value:function(g){var t=this.body.functions.getPointer(g.center),e=this.selectionHandler._pointerToPositionObject(t),A=this.body.edges[this.edgeBeingEditedId];if(void 0!==this.selectedControlNode){this.selectionHandler.unselectAll();for(var I=this.selectionHandler._getAllNodesOverlappingWith(e),C=void 0,i=I.length-1;i>=0;i--)if(I[i]!==this.selectedControlNode.id){C=this.body.nodes[I[i]];break}if(void 0!==C&&void 0!==this.selectedControlNode)if(!0===C.isCluster)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var n=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===n.id?this._performEditEdge(C.id,A.to.id):this._performEditEdge(A.from.id,C.id)}else A.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(g){if((new Date).valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(g.center),this.lastTouch.translation=FC({},this.body.view.translation);var t=this.lastTouch,e=this.selectionHandler.getNodeAt(t);if(void 0!==e)if(!0===e.isCluster)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var A=this._getNewTargetNode(e.x,e.y);this.body.nodes[A.id]=A,this.body.nodeIndices.push(A.id);var I=this.body.functions.createEdge({id:"connectionEdge"+Ps(),from:e.id,to:A.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[I.id]=I,this.body.edgeIndices.push(I.id),this.temporaryIds.nodes.push(A.id),this.temporaryIds.edges.push(I.id)}this.touchTime=(new Date).valueOf()}}},{key:"_dragControlNode",value:function(g){var t=this.body.functions.getPointer(g.center),e=this.selectionHandler._pointerToPositionObject(t),A=void 0;void 0!==this.temporaryIds.edges[0]&&(A=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var I=this.selectionHandler._getAllNodesOverlappingWith(e),C=void 0,i=I.length-1;i>=0;i--){var n;if(-1===IC(n=this.temporaryIds.nodes).call(n,I[i])){C=this.body.nodes[I[i]];break}}if(g.controlEdge={from:A,to:C?C.id:void 0},this.selectionHandler._generateClickEvent("controlNodeDragging",g,t),void 0!==this.temporaryIds.nodes[0]){var o=this.body.nodes[this.temporaryIds.nodes[0]];o.x=this.canvas._XconvertDOMtoCanvas(t.x),o.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(g)}},{key:"_finishConnect",value:function(g){var t=this.body.functions.getPointer(g.center),e=this.selectionHandler._pointerToPositionObject(t),A=void 0;void 0!==this.temporaryIds.edges[0]&&(A=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var I=this.selectionHandler._getAllNodesOverlappingWith(e),C=void 0,i=I.length-1;i>=0;i--){var n;if(-1===IC(n=this.temporaryIds.nodes).call(n,I[i])){C=this.body.nodes[I[i]];break}}this._cleanupTemporaryNodesAndEdges(),void 0!==C&&(!0===C.isCluster?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):void 0!==this.body.nodes[A]&&void 0!==this.body.nodes[C.id]&&this._performAddEdge(A,C.id)),g.controlEdge={from:A,to:C?C.id:void 0},this.selectionHandler._generateClickEvent("controlNodeDragEnd",g,t),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(g){var t=this.lastTouch;this.selectionHandler._generateClickEvent("dragStart",g,t,void 0,!0)}},{key:"_performAddNode",value:function(g){var t=this,e={id:Ps(),x:g.pointer.canvas.x,y:g.pointer.canvas.y,label:"new"};if("function"==typeof this.options.addNode){if(2!==this.options.addNode.length)throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");this.options.addNode(e,(function(g){null!=g&&"addNode"===t.inMode&&t.body.data.nodes.getDataSet().add(g),t.showManipulatorToolbar()}))}else this.body.data.nodes.getDataSet().add(e),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(g,t){var e=this,A={from:g,to:t};if("function"==typeof this.options.addEdge){if(2!==this.options.addEdge.length)throw new Error("The function for connect does not support two arguments (data,callback)");this.options.addEdge(A,(function(g){null!=g&&"addEdge"===e.inMode&&(e.body.data.edges.getDataSet().add(g),e.selectionHandler.unselectAll(),e.showManipulatorToolbar())}))}else this.body.data.edges.getDataSet().add(A),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(g,t){var e=this,A={id:this.edgeBeingEditedId,from:g,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label},I=this.options.editEdge;if("object"===dC(I)&&(I=I.editWithoutDrag),"function"==typeof I){if(2!==I.length)throw new Error("The function for edit does not support two arguments (data, callback)");I(A,(function(g){null==g||"editEdge"!==e.inMode?(e.body.edges[A.id].updateEdgeType(),e.body.emitter.emit("_redraw"),e.showManipulatorToolbar()):(e.body.data.edges.getDataSet().update(g),e.selectionHandler.unselectAll(),e.showManipulatorToolbar())}))}else this.body.data.edges.getDataSet().update(A),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),g}();un('div.vis-configuration{position:relative;display:block;float:left;font-size:12px}div.vis-configuration-wrapper{display:block;width:700px}div.vis-configuration-wrapper:after{clear:both;content:"";display:block}div.vis-configuration.vis-config-option-container{display:block;width:495px;background-color:#fff;border:2px solid #f7f8fa;border-radius:4px;margin-top:20px;left:10px;padding-left:5px}div.vis-configuration.vis-config-button{display:block;width:495px;height:25px;vertical-align:middle;line-height:25px;background-color:#f7f8fa;border:2px solid #ceced0;border-radius:4px;margin-top:20px;left:10px;padding-left:5px;cursor:pointer;margin-bottom:30px}div.vis-configuration.vis-config-button.hover{background-color:#4588e6;border:2px solid #214373;color:#fff}div.vis-configuration.vis-config-item{display:block;float:left;width:495px;height:25px;vertical-align:middle;line-height:25px}div.vis-configuration.vis-config-item.vis-config-s2{left:10px;background-color:#f7f8fa;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-item.vis-config-s3{left:20px;background-color:#e4e9f0;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-item.vis-config-s4{left:30px;background-color:#cfd8e6;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-header{font-size:18px;font-weight:700}div.vis-configuration.vis-config-label{width:120px;height:25px;line-height:25px}div.vis-configuration.vis-config-label.vis-config-s3{width:110px}div.vis-configuration.vis-config-label.vis-config-s4{width:100px}div.vis-configuration.vis-config-colorBlock{top:1px;width:30px;height:19px;border:1px solid #444;border-radius:2px;padding:0;margin:0;cursor:pointer}input.vis-configuration.vis-config-checkbox{left:-5px}input.vis-configuration.vis-config-rangeinput{position:relative;top:-5px;width:60px;padding:1px;margin:0;pointer-events:none}input.vis-configuration.vis-config-range{-webkit-appearance:none;border:0 solid #fff;background-color:transparent;width:300px;height:20px}input.vis-configuration.vis-config-range::-webkit-slider-runnable-track{width:300px;height:5px;background:#dedede;background:-moz-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#dedede),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#dedede,#c8c8c8 99%);background:-o-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:linear-gradient(180deg,#dedede 0,#c8c8c8 99%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#dedede",endColorstr="#c8c8c8",GradientType=0);border:1px solid #999;box-shadow:0 0 3px 0 #aaa;border-radius:3px}input.vis-configuration.vis-config-range::-webkit-slider-thumb{-webkit-appearance:none;border:1px solid #14334b;height:17px;width:17px;border-radius:50%;background:#3876c2;background:-moz-linear-gradient(top,#3876c2 0,#385380 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#3876c2),color-stop(100%,#385380));background:-webkit-linear-gradient(top,#3876c2,#385380);background:-o-linear-gradient(top,#3876c2 0,#385380 100%);background:-ms-linear-gradient(top,#3876c2 0,#385380 100%);background:linear-gradient(180deg,#3876c2 0,#385380);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#3876c2",endColorstr="#385380",GradientType=0);box-shadow:0 0 1px 0 #111927;margin-top:-7px}input.vis-configuration.vis-config-range:focus{outline:none}input.vis-configuration.vis-config-range:focus::-webkit-slider-runnable-track{background:#9d9d9d;background:-moz-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#9d9d9d),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#9d9d9d,#c8c8c8 99%);background:-o-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:linear-gradient(180deg,#9d9d9d 0,#c8c8c8 99%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#9d9d9d",endColorstr="#c8c8c8",GradientType=0)}input.vis-configuration.vis-config-range::-moz-range-track{width:300px;height:10px;background:#dedede;background:-moz-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#dedede),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#dedede,#c8c8c8 99%);background:-o-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:linear-gradient(180deg,#dedede 0,#c8c8c8 99%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#dedede",endColorstr="#c8c8c8",GradientType=0);border:1px solid #999;box-shadow:0 0 3px 0 #aaa;border-radius:3px}input.vis-configuration.vis-config-range::-moz-range-thumb{border:none;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:-moz-focusring{outline:1px solid #fff;outline-offset:-1px}input.vis-configuration.vis-config-range::-ms-track{width:300px;height:5px;background:transparent;border-color:transparent;border-width:6px 0;color:transparent}input.vis-configuration.vis-config-range::-ms-fill-lower{background:#777;border-radius:10px}input.vis-configuration.vis-config-range::-ms-fill-upper{background:#ddd;border-radius:10px}input.vis-configuration.vis-config-range::-ms-thumb{border:none;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:focus::-ms-fill-lower{background:#888}input.vis-configuration.vis-config-range:focus::-ms-fill-upper{background:#ccc}.vis-configuration-popup{position:absolute;background:rgba(57,76,89,.85);border:2px solid #f2faff;line-height:30px;height:30px;width:150px;text-align:center;color:#fff;font-size:14px;border-radius:4px;-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.vis-configuration-popup:after,.vis-configuration-popup:before{left:100%;top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.vis-configuration-popup:after{border-color:rgba(136,183,213,0) rgba(136,183,213,0) rgba(136,183,213,0) rgba(57,76,89,.85);border-width:8px;margin-top:-8px}.vis-configuration-popup:before{border-color:rgba(194,225,245,0) rgba(194,225,245,0) rgba(194,225,245,0) #f2faff;border-width:12px;margin-top:-12px}\n/*# sourceMappingURL=data:application/json;base64,  */');un('div.vis-color-picker{position:absolute;top:0;left:30px;margin-top:-140px;margin-left:30px;width:310px;height:444px;z-index:1;padding:10px;border-radius:15px;background-color:#fff;display:none;box-shadow:0 0 10px 0 rgba(0,0,0,.5)}div.vis-color-picker div.vis-arrow{position:absolute;top:147px;left:5px}div.vis-color-picker div.vis-arrow:after,div.vis-color-picker div.vis-arrow:before{right:100%;top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}div.vis-color-picker div.vis-arrow:after{border-color:hsla(0,0%,100%,0) #fff hsla(0,0%,100%,0) hsla(0,0%,100%,0);border-width:30px;margin-top:-30px}div.vis-color-picker div.vis-color{position:absolute;width:289px;height:289px;cursor:pointer}div.vis-color-picker div.vis-brightness{position:absolute;top:313px}div.vis-color-picker div.vis-opacity{position:absolute;top:350px}div.vis-color-picker div.vis-selector{position:absolute;top:137px;left:137px;width:15px;height:15px;border-radius:15px;border:1px solid #fff;background:#4c4c4c;background:-moz-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#4c4c4c),color-stop(12%,#595959),color-stop(25%,#666),color-stop(39%,#474747),color-stop(50%,#2c2c2c),color-stop(51%,#000),color-stop(60%,#111),color-stop(76%,#2b2b2b),color-stop(91%,#1c1c1c),color-stop(100%,#131313));background:-webkit-linear-gradient(top,#4c4c4c,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313);background:-o-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-ms-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:linear-gradient(180deg,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#4c4c4c",endColorstr="#131313",GradientType=0)}div.vis-color-picker div.vis-new-color{left:159px;text-align:right;padding-right:2px}div.vis-color-picker div.vis-initial-color,div.vis-color-picker div.vis-new-color{position:absolute;width:140px;height:20px;border:1px solid rgba(0,0,0,.1);border-radius:5px;top:380px;font-size:10px;color:rgba(0,0,0,.4);vertical-align:middle;line-height:20px}div.vis-color-picker div.vis-initial-color{left:10px;text-align:left;padding-left:2px}div.vis-color-picker div.vis-label{position:absolute;width:300px;left:10px}div.vis-color-picker div.vis-label.vis-brightness{top:300px}div.vis-color-picker div.vis-label.vis-opacity{top:338px}div.vis-color-picker div.vis-button{position:absolute;width:68px;height:25px;border-radius:10px;vertical-align:middle;text-align:center;line-height:25px;top:410px;border:2px solid #d9d9d9;background-color:#f7f7f7;cursor:pointer}div.vis-color-picker div.vis-button.vis-cancel{left:5px}div.vis-color-picker div.vis-button.vis-load{left:82px}div.vis-color-picker div.vis-button.vis-apply{left:159px}div.vis-color-picker div.vis-button.vis-save{left:236px}div.vis-color-picker input.vis-range{width:290px;height:20px}\n/*# sourceMappingURL=data:application/json;base64,  */');var gh={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"},th=function(){function g(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;gr(this,g),this.pixelRatio=t,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return er(g,[{key:"insertTo",value:function(g){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=g,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(g){if("function"!=typeof g)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=g}},{key:"setCloseCallback",value:function(g){if("function"!=typeof g)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=g}},{key:"_isColorString",value:function(g){if("string"==typeof g)return gh[g]}},{key:"setColor",value:function(g){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"!==g){var e,A=this._isColorString(g);if(void 0!==A&&(g=A),!0===GC(g)){if(!0===ni(g)){var I=g.substr(4).substr(0,g.length-5).split(",");e={r:I[0],g:I[1],b:I[2],a:1}}else if(!0===oi(g)){var C=g.substr(5).substr(0,g.length-6).split(",");e={r:C[0],g:C[1],b:C[2],a:C[3]}}else if(!0===ii(g)){var i=JC(g);e={r:i.r,g:i.g,b:i.b,a:1}}}else if(g instanceof Object&&void 0!==g.r&&void 0!==g.g&&void 0!==g.b){var n=void 0!==g.a?g.a:"1.0";e={r:g.r,g:g.g,b:g.b,a:n}}if(void 0===e)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+Fr(g));this._setColor(e,t)}}},{key:"show",value:function(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var g=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];!0===t&&(this.previousColor=FC({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",rr((function(){void 0!==g.closeCallback&&(g.closeCallback(),g.closeCallback=void 0)}),0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(g){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];!0===t&&(this.initialColor=FC({},g)),this.color=g;var e=gi(g.r,g.g,g.b),A=2*Math.PI,I=this.r*e.s,C=this.centerCoordinates.x+I*Math.sin(A*e.h),i=this.centerCoordinates.y+I*Math.cos(A*e.h);this.colorPickerSelector.style.left=C-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=i-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(g)}},{key:"_setOpacity",value:function(g){this.color.a=g/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(g){var t=gi(this.color.r,this.color.g,this.color.b);t.v=g/100;var e=Ai(t.h,t.s,t.v);e.a=this.color.a,this.color=e,this._updatePicker()}},{key:"_updatePicker",value:function(){var g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color,t=gi(g.r,g.g,g.b),e=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var A=this.colorPickerCanvas.clientWidth,I=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,A,I),e.putImageData(this.hueCircle,0,0),e.fillStyle="rgba(0,0,0,"+(1-t.v)+")",e.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),ka(e).call(e),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*g.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){var g,t,e,A;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var I=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(I.webkitBackingStorePixelRatio||I.mozBackingStorePixelRatio||I.msBackingStorePixelRatio||I.oBackingStorePixelRatio||I.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var C=document.createElement("DIV");C.style.color="red",C.style.fontWeight="bold",C.style.padding="10px",C.innerHTML="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(C)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(g){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(g){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var i=this;this.opacityRange.onchange=function(){i._setOpacity(this.value)},this.opacityRange.oninput=function(){i._setOpacity(this.value)},this.brightnessRange.onchange=function(){i._setBrightness(this.value)},this.brightnessRange.oninput=function(){i._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerHTML="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerHTML="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerHTML="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerHTML="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerHTML="cancel",this.cancelButton.onclick=gg(g=this._hide).call(g,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerHTML="apply",this.applyButton.onclick=gg(t=this._apply).call(t,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerHTML="save",this.saveButton.onclick=gg(e=this._save).call(e,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerHTML="load last",this.loadButton.onclick=gg(A=this._loadLast).call(A,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var g=this;this.drag={},this.pinch={},this.hammer=new Ho(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),Ol.onTouch(this.hammer,(function(t){g._moveSelector(t)})),this.hammer.on("tap",(function(t){g._moveSelector(t)})),this.hammer.on("panstart",(function(t){g._moveSelector(t)})),this.hammer.on("panmove",(function(t){g._moveSelector(t)})),this.hammer.on("panend",(function(t){g._moveSelector(t)}))}},{key:"_generateHueCircle",value:function(){if(!1===this.generated){var g=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(g.webkitBackingStorePixelRatio||g.mozBackingStorePixelRatio||g.msBackingStorePixelRatio||g.oBackingStorePixelRatio||g.backingStorePixelRatio||1)),g.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var t,e,A,I,C=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;g.clearRect(0,0,C,i),this.centerCoordinates={x:.5*C,y:.5*i},this.r=.49*C;var n,o=2*Math.PI/360,r=1/this.r;for(A=0;A<360;A++)for(I=0;I<this.r;I++)t=this.centerCoordinates.x+I*Math.sin(o*A),e=this.centerCoordinates.y+I*Math.cos(o*A),n=Ai(A*(1/360),I*r,1),g.fillStyle="rgb("+n.r+","+n.g+","+n.b+")",g.fillRect(t-.5,e-.5,2,2);g.strokeStyle="rgba(0,0,0,1)",g.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),g.stroke(),this.hueCircle=g.getImageData(0,0,C,i)}this.generated=!0}},{key:"_moveSelector",value:function(g){var t=this.colorPickerDiv.getBoundingClientRect(),e=g.center.x-t.left,A=g.center.y-t.top,I=.5*this.colorPickerDiv.clientHeight,C=.5*this.colorPickerDiv.clientWidth,i=e-C,n=A-I,o=Math.atan2(i,n),r=.98*Math.min(Math.sqrt(i*i+n*n),C),s=Math.cos(o)*r+I,a=Math.sin(o)*r+C;this.colorPickerSelector.style.top=s-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=a-.5*this.colorPickerSelector.clientWidth+"px";var d=o/(2*Math.PI);d=d<0?d+1:d;var l=r/this.r,h=gi(this.color.r,this.color.g,this.color.b);h.h=d,h.s=l;var c=Ai(h.h,h.s,h.v);c.a=this.color.a,this.color=c,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}}]),g}(),eh=function(){function g(t,e,A){var I=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;gr(this,g),this.parent=t,this.changedOptions=[],this.container=e,this.allowCreation=!1,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},FC(this.options,this.defaultOptions),this.configureOptions=A,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new th(I),this.wrapper=void 0}return er(g,[{key:"setOptions",value:function(g){if(void 0!==g){this.popupHistory={},this._removePopup();var t=!0;if("string"==typeof g)this.options.filter=g;else if(g instanceof Array)this.options.filter=g.join();else if("object"===dC(g)){if(null==g)throw new TypeError("options cannot be null");void 0!==g.container&&(this.options.container=g.container),void 0!==bI(g)&&(this.options.filter=bI(g)),void 0!==g.showButton&&(this.options.showButton=g.showButton),void 0!==g.enabled&&(t=g.enabled)}else"boolean"==typeof g?(this.options.filter=!0,t=g):"function"==typeof g&&(this.options.filter=g,t=!0);!1===bI(this.options)&&(t=!1),this.options.enabled=t}this._clean()}},{key:"setModuleOptions",value:function(g){this.moduleOptions=g,!0===this.options.enabled&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){this._clean(),this.changedOptions=[];var g=bI(this.options),t=0,e=!1;for(var A in this.configureOptions)this.configureOptions.hasOwnProperty(A)&&(this.allowCreation=!1,e=!1,"function"==typeof g?e=(e=g(A,[]))||this._handleObject(this.configureOptions[A],[A],!0):!0!==g&&-1===IC(g).call(g,A)||(e=!0),!1!==e&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(A),this._handleObject(this.configureOptions[A],[A])),t++);this._makeButton(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var g=0;g<this.domElements.length;g++)this.wrapper.appendChild(this.domElements[g]);this._showPopupIfNeeded()}},{key:"_clean",value:function(){for(var g=0;g<this.domElements.length;g++)this.wrapper.removeChild(this.domElements[g]);void 0!==this.wrapper&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}},{key:"_getValue",value:function(g){for(var t=this.moduleOptions,e=0;e<g.length;e++){if(void 0===t[g[e]]){t=void 0;break}t=t[g[e]]}return t}},{key:"_makeItem",value:function(g){if(!0===this.allowCreation){var t=document.createElement("div");t.className="vis-configuration vis-config-item vis-config-s"+g.length;for(var e=arguments.length,A=new Array(e>1?e-1:0),I=1;I<e;I++)A[I-1]=arguments[I];return tI(A).call(A,(function(g){t.appendChild(g)})),this.domElements.push(t),this.domElements.length}return 0}},{key:"_makeHeader",value:function(g){var t=document.createElement("div");t.className="vis-configuration vis-config-header",t.innerHTML=g,this._makeItem([],t)}},{key:"_makeLabel",value:function(g,t){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],A=document.createElement("div");return A.className="vis-configuration vis-config-label vis-config-s"+t.length,A.innerHTML=!0===e?"<i><b>"+g+":</b></i>":g+":",A}},{key:"_makeDropdown",value:function(g,t,e){var A=document.createElement("select");A.className="vis-configuration vis-config-select";var I=0;void 0!==t&&-1!==IC(g).call(g,t)&&(I=IC(g).call(g,t));for(var C=0;C<g.length;C++){var i=document.createElement("option");i.value=g[C],C===I&&(i.selected="selected"),i.innerHTML=g[C],A.appendChild(i)}var n=this;A.onchange=function(){n._update(this.value,e)};var o=this._makeLabel(e[e.length-1],e);this._makeItem(e,o,A)}},{key:"_makeRange",value:function(g,t,e){var A=g[0],I=g[1],C=g[2],i=g[3],n=document.createElement("input");n.className="vis-configuration vis-config-range";try{n.type="range",n.min=I,n.max=C}catch(g){}n.step=i;var o="",r=0;if(void 0!==t){t<0&&1.2*t<I?(n.min=Math.ceil(1.2*t),r=n.min,o="range increased"):t/1.2<I&&(n.min=Math.ceil(t/1.2),r=n.min,o="range increased"),1.2*t>C&&1!==C&&(n.max=Math.ceil(1.2*t),r=n.max,o="range increased"),n.value=t}else n.value=A;var s=document.createElement("input");s.className="vis-configuration vis-config-rangeinput",s.value=n.value;var a=this;n.onchange=function(){s.value=this.value,a._update(Number(this.value),e)},n.oninput=function(){s.value=this.value};var d=this._makeLabel(e[e.length-1],e),l=this._makeItem(e,d,n,s);""!==o&&this.popupHistory[l]!==r&&(this.popupHistory[l]=r,this._setupPopup(o,l))}},{key:"_makeButton",value:function(){var g=this;if(!0===this.options.showButton){var t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerHTML="generate options",t.onclick=function(){g._printOptions()},t.onmouseover=function(){t.className="vis-configuration vis-config-button hover"},t.onmouseout=function(){t.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(t)}}},{key:"_setupPopup",value:function(g,t){var e=this;if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter<this.popupLimit){var A=document.createElement("div");A.id="vis-configuration-popup",A.className="vis-configuration-popup",A.innerHTML=g,A.onclick=function(){e._removePopup()},this.popupCounter+=1,this.popupDiv={html:A,index:t}}}},{key:"_removePopup",value:function(){void 0!==this.popupDiv.html&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}},{key:"_showPopupIfNeeded",value:function(){var g=this;if(void 0!==this.popupDiv.html){var t=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=t.left+"px",this.popupDiv.html.style.top=t.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=rr((function(){g.popupDiv.html.style.opacity=0}),1500),this.popupDiv.deleteTimeout=rr((function(){g._removePopup()}),1800)}}},{key:"_makeCheckbox",value:function(g,t,e){var A=document.createElement("input");A.type="checkbox",A.className="vis-configuration vis-config-checkbox",A.checked=g,void 0!==t&&(A.checked=t,t!==g&&("object"===dC(g)?t!==g.enabled&&this.changedOptions.push({path:e,value:t}):this.changedOptions.push({path:e,value:t})));var I=this;A.onchange=function(){I._update(this.checked,e)};var C=this._makeLabel(e[e.length-1],e);this._makeItem(e,C,A)}},{key:"_makeTextInput",value:function(g,t,e){var A=document.createElement("input");A.type="text",A.className="vis-configuration vis-config-text",A.value=t,t!==g&&this.changedOptions.push({path:e,value:t});var I=this;A.onchange=function(){I._update(this.value,e)};var C=this._makeLabel(e[e.length-1],e);this._makeItem(e,C,A)}},{key:"_makeColorField",value:function(g,t,e){var A=this,I=g[1],C=document.createElement("div");"none"!==(t=void 0===t?I:t)?(C.className="vis-configuration vis-config-colorBlock",C.style.backgroundColor=t):C.className="vis-configuration vis-config-colorBlock none",t=void 0===t?I:t,C.onclick=function(){A._showColorPicker(t,C,e)};var i=this._makeLabel(e[e.length-1],e);this._makeItem(e,i,C)}},{key:"_showColorPicker",value:function(g,t,e){var A=this;t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(g),this.colorPicker.setUpdateCallback((function(g){var I="rgba("+g.r+","+g.g+","+g.b+","+g.a+")";t.style.backgroundColor=I,A._update(I,e)})),this.colorPicker.setCloseCallback((function(){t.onclick=function(){A._showColorPicker(g,t,e)}}))}},{key:"_handleObject",value:function(g){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],A=!1,I=bI(this.options),C=!1;for(var i in g)if(g.hasOwnProperty(i)){A=!0;var n=g[i],o=WC(t,i);if("function"==typeof I&&!1===(A=I(i,t))&&!(n instanceof Array)&&"string"!=typeof n&&"boolean"!=typeof n&&n instanceof Object&&(this.allowCreation=!1,A=this._handleObject(n,o,!0),this.allowCreation=!1===e),!1!==A){C=!0;var r=this._getValue(o);if(n instanceof Array)this._handleArray(n,r,o);else if("string"==typeof n)this._makeTextInput(n,r,o);else if("boolean"==typeof n)this._makeCheckbox(n,r,o);else if(n instanceof Object){var s=!0;if(-1!==IC(t).call(t,"physics")&&this.moduleOptions.physics.solver!==i&&"wind"!==i&&(s=!1),!0===s)if(void 0!==n.enabled){var a=WC(o,"enabled"),d=this._getValue(a);if(!0===d){var l=this._makeLabel(i,o,!0);this._makeItem(o,l),C=this._handleObject(n,o)||C}else this._makeCheckbox(n,d,o)}else{var h=this._makeLabel(i,o,!0);this._makeItem(o,h),C=this._handleObject(n,o)||C}}else console.error("dont know how to handle",n,i,o)}}return C}},{key:"_handleArray",value:function(g,t,e){"string"==typeof g[0]&&"color"===g[0]?(this._makeColorField(g,t,e),g[1]!==t&&this.changedOptions.push({path:e,value:t})):"string"==typeof g[0]?(this._makeDropdown(g,t,e),g[0]!==t&&this.changedOptions.push({path:e,value:t})):"number"==typeof g[0]&&(this._makeRange(g,t,e),g[0]!==t&&this.changedOptions.push({path:e,value:Number(t)}))}},{key:"_update",value:function(g,t){var e=this._constructOptions(g,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",e),this.initialized=!0,this.parent.setOptions(e)}},{key:"_constructOptions",value:function(g,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},A=e;g="false"!==(g="true"===g||g)&&g;for(var I=0;I<t.length;I++)"global"!==t[I]&&(void 0===A[t[I]]&&(A[t[I]]={}),I!==t.length-1?A=A[t[I]]:A[t[I]]=g);return e}},{key:"_printOptions",value:function(){var g=this.getOptions();this.optionsContainer.innerHTML="<pre>var options = "+Fr(g,null,2)+"</pre>"}},{key:"getOptions",value:function(){for(var g={},t=0;t<this.changedOptions.length;t++)this._constructOptions(this.changedOptions[t].value,this.changedOptions[t].path,g);return g}}]),g}(),Ah="string",Ih="boolean",Ch="number",ih="object",nh=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],oh={configure:{enabled:{boolean:Ih},filter:{boolean:Ih,string:Ah,array:"array",function:"function"},container:{dom:"dom"},showButton:{boolean:Ih},__type__:{object:ih,boolean:Ih,string:Ah,array:"array",function:"function"}},edges:{arrows:{to:{enabled:{boolean:Ih},scaleFactor:{number:Ch},type:{string:nh},imageHeight:{number:Ch},imageWidth:{number:Ch},src:{string:Ah},__type__:{object:ih,boolean:Ih}},middle:{enabled:{boolean:Ih},scaleFactor:{number:Ch},type:{string:nh},imageWidth:{number:Ch},imageHeight:{number:Ch},src:{string:Ah},__type__:{object:ih,boolean:Ih}},from:{enabled:{boolean:Ih},scaleFactor:{number:Ch},type:{string:nh},imageWidth:{number:Ch},imageHeight:{number:Ch},src:{string:Ah},__type__:{object:ih,boolean:Ih}},__type__:{string:["from","to","middle"],object:ih}},arrowStrikethrough:{boolean:Ih},background:{enabled:{boolean:Ih},color:{string:Ah},size:{number:Ch},dashes:{boolean:Ih,array:"array"},__type__:{object:ih,boolean:Ih}},chosen:{label:{boolean:Ih,function:"function"},edge:{boolean:Ih,function:"function"},__type__:{object:ih,boolean:Ih}},color:{color:{string:Ah},highlight:{string:Ah},hover:{string:Ah},inherit:{string:["from","to","both"],boolean:Ih},opacity:{number:Ch},__type__:{object:ih,string:Ah}},dashes:{boolean:Ih,array:"array"},font:{color:{string:Ah},size:{number:Ch},face:{string:Ah},background:{string:Ah},strokeWidth:{number:Ch},strokeColor:{string:Ah},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:Ch},multi:{boolean:Ih,string:Ah},bold:{color:{string:Ah},size:{number:Ch},face:{string:Ah},mod:{string:Ah},vadjust:{number:Ch},__type__:{object:ih,string:Ah}},boldital:{color:{string:Ah},size:{number:Ch},face:{string:Ah},mod:{string:Ah},vadjust:{number:Ch},__type__:{object:ih,string:Ah}},ital:{color:{string:Ah},size:{number:Ch},face:{string:Ah},mod:{string:Ah},vadjust:{number:Ch},__type__:{object:ih,string:Ah}},mono:{color:{string:Ah},size:{number:Ch},face:{string:Ah},mod:{string:Ah},vadjust:{number:Ch},__type__:{object:ih,string:Ah}},__type__:{object:ih,string:Ah}},hidden:{boolean:Ih},hoverWidth:{function:"function",number:Ch},label:{string:Ah,undefined:"undefined"},labelHighlightBold:{boolean:Ih},length:{number:Ch,undefined:"undefined"},physics:{boolean:Ih},scaling:{min:{number:Ch},max:{number:Ch},label:{enabled:{boolean:Ih},min:{number:Ch},max:{number:Ch},maxVisible:{number:Ch},drawThreshold:{number:Ch},__type__:{object:ih,boolean:Ih}},customScalingFunction:{function:"function"},__type__:{object:ih}},selectionWidth:{function:"function",number:Ch},selfReferenceSize:{number:Ch},selfReference:{size:{number:Ch},angle:{number:Ch},renderBehindTheNode:{boolean:Ih},__type__:{object:ih}},shadow:{enabled:{boolean:Ih},color:{string:Ah},size:{number:Ch},x:{number:Ch},y:{number:Ch},__type__:{object:ih,boolean:Ih}},smooth:{enabled:{boolean:Ih},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:Ch},forceDirection:{string:["horizontal","vertical","none"],boolean:Ih},__type__:{object:ih,boolean:Ih}},title:{string:Ah,undefined:"undefined"},width:{number:Ch},widthConstraint:{maximum:{number:Ch},__type__:{object:ih,boolean:Ih,number:Ch}},value:{number:Ch,undefined:"undefined"},__type__:{object:ih}},groups:{useDefaultGroups:{boolean:Ih},__any__:"get from nodes, will be overwritten below",__type__:{object:ih}},interaction:{dragNodes:{boolean:Ih},dragView:{boolean:Ih},hideEdgesOnDrag:{boolean:Ih},hideEdgesOnZoom:{boolean:Ih},hideNodesOnDrag:{boolean:Ih},hover:{boolean:Ih},keyboard:{enabled:{boolean:Ih},speed:{x:{number:Ch},y:{number:Ch},zoom:{number:Ch},__type__:{object:ih}},bindToWindow:{boolean:Ih},__type__:{object:ih,boolean:Ih}},multiselect:{boolean:Ih},navigationButtons:{boolean:Ih},selectable:{boolean:Ih},selectConnectedEdges:{boolean:Ih},hoverConnectedEdges:{boolean:Ih},tooltipDelay:{number:Ch},zoomView:{boolean:Ih},zoomSpeed:{number:Ch},__type__:{object:ih}},layout:{randomSeed:{undefined:"undefined",number:Ch},improvedLayout:{boolean:Ih},clusterThreshold:{number:Ch},hierarchical:{enabled:{boolean:Ih},levelSeparation:{number:Ch},nodeSpacing:{number:Ch},treeSpacing:{number:Ch},blockShifting:{boolean:Ih},edgeMinimization:{boolean:Ih},parentCentralization:{boolean:Ih},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:ih,boolean:Ih}},__type__:{object:ih}},manipulation:{enabled:{boolean:Ih},initiallyActive:{boolean:Ih},addNode:{boolean:Ih,function:"function"},addEdge:{boolean:Ih,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:ih,boolean:Ih,function:"function"}},deleteNode:{boolean:Ih,function:"function"},deleteEdge:{boolean:Ih,function:"function"},controlNodeStyle:"get from nodes, will be overwritten below",__type__:{object:ih,boolean:Ih}},nodes:{borderWidth:{number:Ch},borderWidthSelected:{number:Ch,undefined:"undefined"},brokenImage:{string:Ah,undefined:"undefined"},chosen:{label:{boolean:Ih,function:"function"},node:{boolean:Ih,function:"function"},__type__:{object:ih,boolean:Ih}},color:{border:{string:Ah},background:{string:Ah},highlight:{border:{string:Ah},background:{string:Ah},__type__:{object:ih,string:Ah}},hover:{border:{string:Ah},background:{string:Ah},__type__:{object:ih,string:Ah}},__type__:{object:ih,string:Ah}},opacity:{number:Ch,undefined:"undefined"},fixed:{x:{boolean:Ih},y:{boolean:Ih},__type__:{object:ih,boolean:Ih}},font:{align:{string:Ah},color:{string:Ah},size:{number:Ch},face:{string:Ah},background:{string:Ah},strokeWidth:{number:Ch},strokeColor:{string:Ah},vadjust:{number:Ch},multi:{boolean:Ih,string:Ah},bold:{color:{string:Ah},size:{number:Ch},face:{string:Ah},mod:{string:Ah},vadjust:{number:Ch},__type__:{object:ih,string:Ah}},boldital:{color:{string:Ah},size:{number:Ch},face:{string:Ah},mod:{string:Ah},vadjust:{number:Ch},__type__:{object:ih,string:Ah}},ital:{color:{string:Ah},size:{number:Ch},face:{string:Ah},mod:{string:Ah},vadjust:{number:Ch},__type__:{object:ih,string:Ah}},mono:{color:{string:Ah},size:{number:Ch},face:{string:Ah},mod:{string:Ah},vadjust:{number:Ch},__type__:{object:ih,string:Ah}},__type__:{object:ih,string:Ah}},group:{string:Ah,number:Ch,undefined:"undefined"},heightConstraint:{minimum:{number:Ch},valign:{string:Ah},__type__:{object:ih,boolean:Ih,number:Ch}},hidden:{boolean:Ih},icon:{face:{string:Ah},code:{string:Ah},size:{number:Ch},color:{string:Ah},weight:{string:Ah,number:Ch},__type__:{object:ih}},id:{string:Ah,number:Ch},image:{selected:{string:Ah,undefined:"undefined"},unselected:{string:Ah,undefined:"undefined"},__type__:{object:ih,string:Ah}},imagePadding:{top:{number:Ch},right:{number:Ch},bottom:{number:Ch},left:{number:Ch},__type__:{object:ih,number:Ch}},label:{string:Ah,undefined:"undefined"},labelHighlightBold:{boolean:Ih},level:{number:Ch,undefined:"undefined"},margin:{top:{number:Ch},right:{number:Ch},bottom:{number:Ch},left:{number:Ch},__type__:{object:ih,number:Ch}},mass:{number:Ch},physics:{boolean:Ih},scaling:{min:{number:Ch},max:{number:Ch},label:{enabled:{boolean:Ih},min:{number:Ch},max:{number:Ch},maxVisible:{number:Ch},drawThreshold:{number:Ch},__type__:{object:ih,boolean:Ih}},customScalingFunction:{function:"function"},__type__:{object:ih}},shadow:{enabled:{boolean:Ih},color:{string:Ah},size:{number:Ch},x:{number:Ch},y:{number:Ch},__type__:{object:ih,boolean:Ih}},shape:{string:["ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},shapeProperties:{borderDashes:{boolean:Ih,array:"array"},borderRadius:{number:Ch},interpolation:{boolean:Ih},useImageSize:{boolean:Ih},useBorderWithImage:{boolean:Ih},__type__:{object:ih}},size:{number:Ch},title:{string:Ah,dom:"dom",undefined:"undefined"},value:{number:Ch,undefined:"undefined"},widthConstraint:{minimum:{number:Ch},maximum:{number:Ch},__type__:{object:ih,boolean:Ih,number:Ch}},x:{number:Ch},y:{number:Ch},__type__:{object:ih}},physics:{enabled:{boolean:Ih},barnesHut:{theta:{number:Ch},gravitationalConstant:{number:Ch},centralGravity:{number:Ch},springLength:{number:Ch},springConstant:{number:Ch},damping:{number:Ch},avoidOverlap:{number:Ch},__type__:{object:ih}},forceAtlas2Based:{theta:{number:Ch},gravitationalConstant:{number:Ch},centralGravity:{number:Ch},springLength:{number:Ch},springConstant:{number:Ch},damping:{number:Ch},avoidOverlap:{number:Ch},__type__:{object:ih}},repulsion:{centralGravity:{number:Ch},springLength:{number:Ch},springConstant:{number:Ch},nodeDistance:{number:Ch},damping:{number:Ch},__type__:{object:ih}},hierarchicalRepulsion:{centralGravity:{number:Ch},springLength:{number:Ch},springConstant:{number:Ch},nodeDistance:{number:Ch},damping:{number:Ch},avoidOverlap:{number:Ch},__type__:{object:ih}},maxVelocity:{number:Ch},minVelocity:{number:Ch},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:Ih},iterations:{number:Ch},updateInterval:{number:Ch},onlyDynamicEdges:{boolean:Ih},fit:{boolean:Ih},__type__:{object:ih,boolean:Ih}},timestep:{number:Ch},adaptiveTimestep:{boolean:Ih},wind:{x:{number:Ch},y:{number:Ch},__type__:{object:ih}},__type__:{object:ih,boolean:Ih}},autoResize:{boolean:Ih},clickToUse:{boolean:Ih},locale:{string:Ah},locales:{__any__:{any:"any"},__type__:{object:ih}},height:{string:Ah},width:{string:Ah},__type__:{object:ih}};oh.groups.__any__=oh.nodes,oh.manipulation.controlNodeStyle=oh.nodes;var rh={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},opacity:[0,0,1,.1],fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown","hexagon"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],selfReference:{size:[20,0,200,1],angle:[Math.PI/2,-6*Math.PI,6*Math.PI,Math.PI/8],renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"],shakeTowards:["leaves","roots"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0,zoomSpeed:[1,.1,2,.1]},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{theta:[.5,.1,1,.05],gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{theta:[.5,.1,1,.05],gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01],wind:{x:[0,-10,10,.1],y:[0,-10,10,.1]}}},sh=Object.freeze({__proto__:null,allOptions:oh,configureOptions:rh}),ah=function(){function g(){gr(this,g)}return er(g,[{key:"getDistances",value:function(g,t,e){for(var A={},I=g.edges,C=0;C<t.length;C++){var i={};A[t[C]]=i;for(var n=0;n<t.length;n++)i[t[n]]=C==n?0:1e9}for(var o=0;o<e.length;o++){var r=I[e[o]];!0===r.connected&&void 0!==A[r.fromId]&&void 0!==A[r.toId]&&(A[r.fromId][r.toId]=1,A[r.toId][r.fromId]=1)}for(var s=t.length,a=0;a<s;a++)for(var d=t[a],l=A[d],h=0;h<s-1;h++)for(var c=t[h],u=A[c],f=h+1;f<s;f++){var p=t[f],v=A[p],y=Math.min(u[p],u[d]+l[p]);u[p]=y,v[c]=y}return A}}]),g}(),dh=function(){function g(t,e,A){gr(this,g),this.body=t,this.springLength=e,this.springConstant=A,this.distanceSolver=new ah}return er(g,[{key:"setOptions",value:function(g){g&&(g.springLength&&(this.springLength=g.springLength),g.springConstant&&(this.springConstant=g.springConstant))}},{key:"solve",value:function(g,t){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],A=this.distanceSolver.getDistances(this.body,g,t);this._createL_matrix(A),this._createK_matrix(A),this._createE_matrix();for(var I=.01,C=1,i=0,n=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),o=5,r=1e9,s=0,a=0,d=0,l=0,h=0;r>I&&i<n;){i+=1;var c=this._getHighestEnergyNode(e),u=uC(c,4);for(s=u[0],r=u[1],a=u[2],d=u[3],l=r,h=0;l>C&&h<o;){h+=1,this._moveNode(s,a,d);var f=this._getEnergy(s),p=uC(f,3);l=p[0],a=p[1],d=p[2]}}}},{key:"_getHighestEnergyNode",value:function(g){for(var t=this.body.nodeIndices,e=this.body.nodes,A=0,I=t[0],C=0,i=0,n=0;n<t.length;n++){var o=t[n];if(!1===e[o].predefinedPosition||!0===e[o].isCluster&&!0===g||!0===e[o].options.fixed.x||!0===e[o].options.fixed.y){var r=this._getEnergy(o),s=uC(r,3),a=s[0],d=s[1],l=s[2];A<a&&(A=a,I=o,C=d,i=l)}}return[I,A,C,i]}},{key:"_getEnergy",value:function(g){var t=uC(this.E_sums[g],2),e=t[0],A=t[1];return[Math.sqrt(Math.pow(e,2)+Math.pow(A,2)),e,A]}},{key:"_moveNode",value:function(g,t,e){for(var A=this.body.nodeIndices,I=this.body.nodes,C=0,i=0,n=0,o=I[g].x,r=I[g].y,s=this.K_matrix[g],a=this.L_matrix[g],d=0;d<A.length;d++){var l=A[d];if(l!==g){var h=I[l].x,c=I[l].y,u=s[l],f=a[l],p=1/Math.pow(Math.pow(o-h,2)+Math.pow(r-c,2),1.5);C+=u*(1-f*Math.pow(r-c,2)*p),i+=u*(f*(o-h)*(r-c)*p),n+=u*(1-f*Math.pow(o-h,2)*p)}}var v=(t/C+e/i)/(i/C-n/i),y=-(i*v+t)/C;I[g].x+=y,I[g].y+=v,this._updateE_matrix(g)}},{key:"_createL_matrix",value:function(g){var t=this.body.nodeIndices,e=this.springLength;this.L_matrix=[];for(var A=0;A<t.length;A++){this.L_matrix[t[A]]={};for(var I=0;I<t.length;I++)this.L_matrix[t[A]][t[I]]=e*g[t[A]][t[I]]}}},{key:"_createK_matrix",value:function(g){var t=this.body.nodeIndices,e=this.springConstant;this.K_matrix=[];for(var A=0;A<t.length;A++){this.K_matrix[t[A]]={};for(var I=0;I<t.length;I++)this.K_matrix[t[A]][t[I]]=e*Math.pow(g[t[A]][t[I]],-2)}}},{key:"_createE_matrix",value:function(){var g=this.body.nodeIndices,t=this.body.nodes;this.E_matrix={},this.E_sums={};for(var e=0;e<g.length;e++)this.E_matrix[g[e]]=[];for(var A=0;A<g.length;A++){for(var I=g[A],C=t[I].x,i=t[I].y,n=0,o=0,r=A;r<g.length;r++){var s=g[r];if(s!==I){var a=t[s].x,d=t[s].y,l=1/Math.sqrt(Math.pow(C-a,2)+Math.pow(i-d,2));this.E_matrix[I][r]=[this.K_matrix[I][s]*(C-a-this.L_matrix[I][s]*(C-a)*l),this.K_matrix[I][s]*(i-d-this.L_matrix[I][s]*(i-d)*l)],this.E_matrix[s][A]=this.E_matrix[I][r],n+=this.E_matrix[I][r][0],o+=this.E_matrix[I][r][1]}}this.E_sums[I]=[n,o]}}},{key:"_updateE_matrix",value:function(g){for(var t=this.body.nodeIndices,e=this.body.nodes,A=this.E_matrix[g],I=this.K_matrix[g],C=this.L_matrix[g],i=e[g].x,n=e[g].y,o=0,r=0,s=0;s<t.length;s++){var a=t[s];if(a!==g){var d=A[s],l=d[0],h=d[1],c=e[a].x,u=e[a].y,f=1/Math.sqrt(Math.pow(i-c,2)+Math.pow(n-u,2)),p=I[a]*(i-c-C[a]*(i-c)*f),v=I[a]*(n-u-C[a]*(n-u)*f);A[s]=[p,v],o+=p,r+=v;var y=this.E_sums[a];y[0]+=p-l,y[1]+=v-h}}this.E_sums[g]=[o,r]}}]),g}();function lh(g,t,e){var A,I,C,i,n=this;if(!(this instanceof lh))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:$o,clickToUse:!1},FC(this.options,this.defaultOptions),this.body={container:g,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:gg(A=this.on).call(A,this),off:gg(I=this.off).call(I,this),emit:gg(C=this.emit).call(C,this),once:gg(i=this.once).call(i,this)},eventListeners:{onTap:function(){},onTouch:function(){},onDoubleTap:function(){},onHold:function(){},onDragStart:function(){},onDrag:function(){},onDragEnd:function(){},onMouseWheel:function(){},onPinch:function(){},onMouseMove:function(){},onRelease:function(){},onContext:function(){}},data:{nodes:null,edges:null},functions:{createNode:function(){},createEdge:function(){},getPointer:function(){}},modules:{},view:{scale:1,translation:{x:0,y:0}}},this.bindEventListeners(),this.images=new Ir((function(){return n.body.emitter.emit("_requestRedraw")})),this.groups=new Cr,this.canvas=new Nl(this.body),this.selectionHandler=new Tl(this.body,this.canvas),this.interactionHandler=new Gl(this.body,this.canvas,this.selectionHandler),this.view=new Zl(this.body,this.canvas),this.renderer=new kl(this.body,this.canvas),this.physics=new cl(this.body),this.layoutEngine=new ql(this.body),this.clustering=new xl(this.body),this.manipulation=new $l(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new ud(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new Il(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new dh(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(e),this.setData(t)}ng(lh.prototype),lh.prototype.setOptions=function(g){var t=this;if(null===g&&(g=void 0),void 0!==g){!0===sd.validate(g,oh)&&console.log("%cErrors have been found in the supplied options object.",rd);if(SC(["locale","locales","clickToUse"],this.options,g),g=this.layoutEngine.setOptions(g.layout,g),this.canvas.setOptions(g),this.groups.setOptions(g.groups),this.nodesHandler.setOptions(g.nodes),this.edgesHandler.setOptions(g.edges),this.physics.setOptions(g.physics),this.manipulation.setOptions(g.manipulation,g,this.options),this.interactionHandler.setOptions(g.interaction),this.renderer.setOptions(g.interaction),this.selectionHandler.setOptions(g.interaction),void 0!==g.groups&&this.body.emitter.emit("refreshNodes"),"configure"in g&&(this.configurator||(this.configurator=new eh(this,this.body.container,rh,this.canvas.pixelRatio)),this.configurator.setOptions(g.configure)),this.configurator&&!0===this.configurator.options.enabled){var e={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};QC(e.nodes,this.nodesHandler.options),QC(e.edges,this.edgesHandler.options),QC(e.layout,this.layoutEngine.options),QC(e.interaction,this.selectionHandler.options),QC(e.interaction,this.renderer.options),QC(e.interaction,this.interactionHandler.options),QC(e.manipulation,this.manipulation.options),QC(e.physics,this.physics.options),QC(e.global,this.canvas.options),QC(e.global,this.options),this.configurator.setModuleOptions(e)}void 0!==g.clickToUse?!0===g.clickToUse?void 0===this.activator&&(this.activator=new qo(this.canvas.frame),this.activator.on("change",(function(){t.body.emitter.emit("activate")}))):(void 0!==this.activator&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}},lh.prototype._updateVisibleIndices=function(){var g=this.body.nodes,t=this.body.edges;for(var e in this.body.nodeIndices=[],this.body.edgeIndices=[],g)g.hasOwnProperty(e)&&(this.clustering._isClusteredNode(e)||!1!==g[e].options.hidden||this.body.nodeIndices.push(g[e].id));for(var A in t)if(t.hasOwnProperty(A)){var I=t[A],C=g[I.fromId],i=g[I.toId],n=void 0!==C&&void 0!==i;!this.clustering._isClusteredEdge(A)&&!1===I.options.hidden&&n&&!1===C.options.hidden&&!1===i.options.hidden&&this.body.edgeIndices.push(I.id)}},lh.prototype.bindEventListeners=function(){var g=this;this.body.emitter.on("_dataChanged",(function(){g.edgesHandler._updateState(),g.body.emitter.emit("_dataUpdated")})),this.body.emitter.on("_dataUpdated",(function(){g.clustering._updateState(),g._updateVisibleIndices(),g._updateValueRange(g.body.nodes),g._updateValueRange(g.body.edges),g.body.emitter.emit("startSimulation"),g.body.emitter.emit("_requestRedraw")}))},lh.prototype.setData=function(g){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),g&&g.dot&&(g.nodes||g.edges))throw new SyntaxError('Data must contain either parameter "dot" or  parameter pair "nodes" and "edges", but not both.');if(this.setOptions(g&&g.options),g&&g.dot){console.log("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");var t=dn.DOTToGraph(g.dot);this.setData(t)}else if(g&&g.gephi){console.log("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");var e=hn(g.gephi);this.setData(e)}else this.nodesHandler.setData(g&&g.nodes,!0),this.edgesHandler.setData(g&&g.edges,!0),this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")},lh.prototype.destroy=function(){for(var g in this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images,this.body.nodes)this.body.nodes.hasOwnProperty(g)&&delete this.body.nodes[g];for(var t in this.body.edges)this.body.edges.hasOwnProperty(t)&&delete this.body.edges[t];EC(this.body.container)},lh.prototype._updateValueRange=function(g){var t,e=void 0,A=void 0,I=0;for(t in g)if(g.hasOwnProperty(t)){var C=g[t].getValue();void 0!==C&&(e=void 0===e?C:Math.min(C,e),A=void 0===A?C:Math.max(C,A),I+=C)}if(void 0!==e&&void 0!==A)for(t in g)g.hasOwnProperty(t)&&g[t].setValueRange(e,A,I)},lh.prototype.isActive=function(){return!this.activator||this.activator.active},lh.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)},lh.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)},lh.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)},lh.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)},lh.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)},lh.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)},lh.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)},lh.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)},lh.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)},lh.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)},lh.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)},lh.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)},lh.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)},lh.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)},lh.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)},lh.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)},lh.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)},lh.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)},lh.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)},lh.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)},lh.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)},lh.prototype.editNodeMode=function(){return console.log("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)},lh.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)},lh.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)},lh.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)},lh.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)},lh.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)},lh.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)},lh.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)},lh.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)},lh.prototype.getConnectedNodes=function(g){return void 0!==this.body.nodes[g]?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)},lh.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)},lh.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)},lh.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)},lh.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)},lh.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)},lh.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)},lh.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodes.apply(this.selectionHandler,arguments)},lh.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdges.apply(this.selectionHandler,arguments)},lh.prototype.getNodeAt=function(){var g=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return void 0!==g&&void 0!==g.id?g.id:g},lh.prototype.getEdgeAt=function(){var g=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return void 0!==g&&void 0!==g.id?g.id:g},lh.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)},lh.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)},lh.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.redraw()},lh.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)},lh.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)},lh.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)},lh.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)},lh.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)},lh.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)},lh.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)},lh.prototype.getOptionsFromConfigurator=function(){var g={};return this.configurator&&(g=this.configurator.getOptions.apply(this.configurator)),g};var hh=an;g.DataSet=Ca,g.DataView=ia,g.Network=lh,g.NetworkImages=Ir,g.Queue=ta,g.data=na,g.networkDOTParser=ln,g.networkGephiParser=cn,g.networkOptions=sh,g.parseDOTNetwork=hh,g.parseGephiNetwork=hn,g.util=li,Object.defineProperty(g,"__esModule",{value:!0})}));
//# sourceMappingURL=vis-network.min.js.map
