UNPKG

vis-network

Version:

A dynamic, browser-based visualization library.

26 lines 372 kB
/** * vis-network * https://visjs.github.io/vis-network/ * * A dynamic, browser-based visualization library. * * @version 6.5.2 * @date 2020-01-12T20:06:21.030Z * * @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. */ import t,{extend as e,topMost as i,forEach as o,deepExtend as n,overrideOpacity as s,copyAndExtendArray as r,copyArray as a,selectiveNotDeepExtend as h,parseColor as d,mergeOptions as l,fillIfDefined as c,bridgeObject as u,selectiveDeepExtend as p,isString as f,HSVToHex as v,randomUUID as g,addEventListener as y,removeEventListener as m,easingFunctions as b,getAbsoluteLeft as w,getAbsoluteTop as k,recursiveDOMDelete as _,isValidRGB as x,isValidRGBA as E,isValidHex as O,hexToRGB as C,RGBToHSV as T,HSVToRGB as S}from"vis-util";import M from"keycharm";import{DataSet as D,DataView as I}from"vis-data";var P="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function F(t,e){return t(e={exports:{}},e.exports),e.exports}function z(t){return t&&t.default||t}var B=function(t){return t&&t.Math==Math&&t},N=B("object"==typeof globalThis&&globalThis)||B("object"==typeof window&&window)||B("object"==typeof self&&self)||B("object"==typeof P&&P)||Function("return this")(),A=function(t){try{return!!t()}catch(t){return!0}},R=!A((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),L={}.propertyIsEnumerable,j=Object.getOwnPropertyDescriptor,H={f:j&&!L.call({1:2},1)?function(t){var e=j(this,t);return!!e&&e.enumerable}:L},W=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},q={}.toString,V=function(t){return q.call(t).slice(8,-1)},U="".split,Y=A((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==V(t)?U.call(t,""):Object(t)}:Object,X=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},G=function(t){return Y(X(t))},K=function(t){return"object"==typeof t?null!==t:"function"==typeof t},Z=function(t,e){if(!K(t))return t;var i,o;if(e&&"function"==typeof(i=t.toString)&&!K(o=i.call(t)))return o;if("function"==typeof(i=t.valueOf)&&!K(o=i.call(t)))return o;if(!e&&"function"==typeof(i=t.toString)&&!K(o=i.call(t)))return o;throw TypeError("Can't convert object to primitive value")},$={}.hasOwnProperty,J=function(t,e){return $.call(t,e)},Q=N.document,tt=K(Q)&&K(Q.createElement),et=function(t){return tt?Q.createElement(t):{}},it=!R&&!A((function(){return 7!=Object.defineProperty(et("div"),"a",{get:function(){return 7}}).a})),ot=Object.getOwnPropertyDescriptor,nt={f:R?ot:function(t,e){if(t=G(t),e=Z(e,!0),it)try{return ot(t,e)}catch(t){}if(J(t,e))return W(!H.f.call(t,e),t[e])}},st=/#|\.prototype\./,rt=function(t,e){var i=ht[at(t)];return i==lt||i!=dt&&("function"==typeof e?A(e):!!e)},at=rt.normalize=function(t){return String(t).replace(st,".").toLowerCase()},ht=rt.data={},dt=rt.NATIVE="N",lt=rt.POLYFILL="P",ct=rt,ut={},pt=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},ft=function(t,e,i){if(pt(t),void 0===e)return t;switch(i){case 0:return function(){return t.call(e)};case 1:return function(i){return t.call(e,i)};case 2:return function(i,o){return t.call(e,i,o)};case 3:return function(i,o,n){return t.call(e,i,o,n)}}return function(){return t.apply(e,arguments)}},vt=function(t){if(!K(t))throw TypeError(String(t)+" is not an object");return t},gt=Object.defineProperty,yt={f:R?gt:function(t,e,i){if(vt(t),e=Z(e,!0),vt(i),it)try{return gt(t,e,i)}catch(t){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(t[e]=i.value),t}},mt=R?function(t,e,i){return yt.f(t,e,W(1,i))}:function(t,e,i){return t[e]=i,t},bt=nt.f,wt=function(t){var e=function(e,i,o){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,i)}return new t(e,i,o)}return t.apply(this,arguments)};return e.prototype=t.prototype,e},kt=function(t,e){var i,o,n,s,r,a,h,d,l=t.target,c=t.global,u=t.stat,p=t.proto,f=c?N:u?N[l]:(N[l]||{}).prototype,v=c?ut:ut[l]||(ut[l]={}),g=v.prototype;for(n in e)i=!ct(c?n:l+(u?".":"#")+n,t.forced)&&f&&J(f,n),r=v[n],i&&(a=t.noTargetGet?(d=bt(f,n))&&d.value:f[n]),s=i&&a?a:e[n],i&&typeof r==typeof s||(h=t.bind&&i?ft(s,N):t.wrap&&i?wt(s):p&&"function"==typeof s?ft(Function.call,s):s,(t.sham||s&&s.sham||r&&r.sham)&&mt(h,"sham",!0),v[n]=h,p&&(J(ut,o=l+"Prototype")||mt(ut,o,{}),ut[o][n]=s,t.real&&g&&!g[n]&&mt(g,n,s)))},_t=[].slice,xt={},Et=function(t,e,i){if(!(e in xt)){for(var o=[],n=0;n<e;n++)o[n]="a["+n+"]";xt[e]=Function("C,a","return new C("+o.join(",")+")")}return xt[e](t,i)},Ot=Function.bind||function(t){var e=pt(this),i=_t.call(arguments,1),o=function(){var n=i.concat(_t.call(arguments));return this instanceof o?Et(e,n.length,n):e.apply(t,n)};return K(e.prototype)&&(o.prototype=e.prototype),o};kt({target:"Function",proto:!0},{bind:Ot});var Ct=function(t){return ut[t+"Prototype"]},Tt=Ct("Function").bind,St=Function.prototype,Mt=function(t){var e=t.bind;return t===St||t instanceof Function&&e===St.bind?Tt:e};function Dt(t,e,i,o){t.beginPath(),t.arc(e,i,o,0,2*Math.PI,!1),t.closePath()}function It(t,e,i,o,n,s){var r=Math.PI/180;o-2*s<0&&(s=o/2),n-2*s<0&&(s=n/2),t.beginPath(),t.moveTo(e+s,i),t.lineTo(e+o-s,i),t.arc(e+o-s,i+s,s,270*r,360*r,!1),t.lineTo(e+o,i+n-s),t.arc(e+o-s,i+n-s,s,0,90*r,!1),t.lineTo(e+s,i+n),t.arc(e+s,i+n-s,s,90*r,180*r,!1),t.lineTo(e,i+s),t.arc(e+s,i+s,s,180*r,270*r,!1),t.closePath()}function Pt(t,e,i,o,n){var s=o/2*.5522848,r=n/2*.5522848,a=e+o,h=i+n,d=e+o/2,l=i+n/2;t.beginPath(),t.moveTo(e,l),t.bezierCurveTo(e,l-r,d-s,i,d,i),t.bezierCurveTo(d+s,i,a,l-r,a,l),t.bezierCurveTo(a,l+r,d+s,h,d,h),t.bezierCurveTo(d-s,h,e,l+r,e,l),t.closePath()}function Ft(t,e,i,o,n){var s=n*(1/3),r=o/2*.5522848,a=s/2*.5522848,h=e+o,d=i+s,l=e+o/2,c=i+s/2,u=i+(n-s/2),p=i+n;t.beginPath(),t.moveTo(h,c),t.bezierCurveTo(h,c+a,l+r,d,l,d),t.bezierCurveTo(l-r,d,e,c+a,e,c),t.bezierCurveTo(e,c-a,l-r,i,l,i),t.bezierCurveTo(l+r,i,h,c-a,h,c),t.lineTo(h,u),t.bezierCurveTo(h,u+a,l+r,p,l,p),t.bezierCurveTo(l-r,p,e,u+a,e,u),t.lineTo(e,c)}function zt(t,e,i,o,n,s){t.beginPath(),t.moveTo(e,i);for(var r=s.length,a=o-e,h=n-i,d=h/a,l=Math.sqrt(a*a+h*h),c=0,u=!0,p=0,f=+s[0];l>=.1;)(f=+s[c++%r])>l&&(f=l),p=Math.sqrt(f*f/(1+d*d)),e+=p=a<0?-p:p,i+=d*p,!0===u?t.lineTo(e,i):t.moveTo(e,i),l-=f,u=!u}var Bt={circle:Dt,dashedLine:zt,database:Ft,diamond:function(t,e,i,o){t.beginPath(),t.lineTo(e,i+o),t.lineTo(e+o,i),t.lineTo(e,i-o),t.lineTo(e-o,i),t.closePath()},ellipse:Pt,ellipse_vis:Pt,hexagon:function(t,e,i,o){t.beginPath();var n=2*Math.PI/6;t.moveTo(e+o,i);for(var s=1;s<6;s++)t.lineTo(e+o*Math.cos(n*s),i+o*Math.sin(n*s));t.closePath()},roundRect:It,square:function(t,e,i,o){t.beginPath(),t.rect(e-o,i-o,2*o,2*o),t.closePath()},star:function(t,e,i,o){t.beginPath(),i+=.1*(o*=.82);for(var n=0;n<10;n++){var s=n%2==0?1.3*o:.5*o;t.lineTo(e+s*Math.sin(2*n*Math.PI/10),i-s*Math.cos(2*n*Math.PI/10))}t.closePath()},triangle:function(t,e,i,o){t.beginPath(),i+=.275*(o*=1.15);var n=2*o,s=n/2,r=Math.sqrt(3)/6*n,a=Math.sqrt(n*n-s*s);t.moveTo(e,i-(a-r)),t.lineTo(e+s,i+r),t.lineTo(e-s,i+r),t.lineTo(e,i-(a-r)),t.closePath()},triangleDown:function(t,e,i,o){t.beginPath(),i-=.275*(o*=1.15);var n=2*o,s=n/2,r=Math.sqrt(3)/6*n,a=Math.sqrt(n*n-s*s);t.moveTo(e,i+(a-r)),t.lineTo(e+s,i-r),t.lineTo(e-s,i-r),t.lineTo(e,i+(a-r)),t.closePath()}};var Nt=F((function(t){function e(t){if(t)return function(t){for(var i in e.prototype)t[i]=e.prototype[i];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function i(){this.off(t,i),e.apply(this,arguments)}return i.fn=e,this.on(t,i),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i,o=this._callbacks["$"+t];if(!o)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var n=0;n<o.length;n++)if((i=o[n])===e||i.fn===e){o.splice(n,1);break}return 0===o.length&&delete this._callbacks["$"+t],this},e.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),i=this._callbacks["$"+t],o=1;o<arguments.length;o++)e[o-1]=arguments[o];if(i){o=0;for(var n=(i=i.slice(0)).length;o<n;++o)i[o].apply(this,e)}return this},e.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},e.prototype.hasListeners=function(t){return!!this.listeners(t).length}})),At={},Rt=N["__core-js_shared__"]||function(t,e){try{mt(N,t,e)}catch(i){N[t]=e}return e}("__core-js_shared__",{}),Lt=Function.toString;"function"!=typeof Rt.inspectSource&&(Rt.inspectSource=function(t){return Lt.call(t)});var jt,Ht,Wt,qt=Rt.inspectSource,Vt=N.WeakMap,Ut="function"==typeof Vt&&/native code/.test(qt(Vt)),Yt=F((function(t){(t.exports=function(t,e){return Rt[t]||(Rt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.3",mode:"pure",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),Xt=0,Gt=Math.random(),Kt=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++Xt+Gt).toString(36)},Zt=Yt("keys"),$t=function(t){return Zt[t]||(Zt[t]=Kt(t))},Jt={},Qt=N.WeakMap;if(Ut){var te=new Qt,ee=te.get,ie=te.has,oe=te.set;jt=function(t,e){return oe.call(te,t,e),e},Ht=function(t){return ee.call(te,t)||{}},Wt=function(t){return ie.call(te,t)}}else{var ne=$t("state");Jt[ne]=!0,jt=function(t,e){return mt(t,ne,e),e},Ht=function(t){return J(t,ne)?t[ne]:{}},Wt=function(t){return J(t,ne)}}var se,re,ae,he={set:jt,get:Ht,has:Wt,enforce:function(t){return Wt(t)?Ht(t):jt(t,{})},getterFor:function(t){return function(e){var i;if(!K(e)||(i=Ht(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return i}}},de=function(t){return Object(X(t))},le=!A((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),ce=$t("IE_PROTO"),ue=Object.prototype,pe=le?Object.getPrototypeOf:function(t){return t=de(t),J(t,ce)?t[ce]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?ue:null},fe=!!Object.getOwnPropertySymbols&&!A((function(){return!String(Symbol())})),ve=fe&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ge=Yt("wks"),ye=N.Symbol,me=ve?ye:ye&&ye.withoutSetter||Kt,be=function(t){return J(ge,t)||(fe&&J(ye,t)?ge[t]=ye[t]:ge[t]=me("Symbol."+t)),ge[t]},we=(be("iterator"),!1);[].keys&&("next"in(ae=[].keys())?(re=pe(pe(ae)))!==Object.prototype&&(se=re):we=!0),null==se&&(se={});var ke,_e={IteratorPrototype:se,BUGGY_SAFARI_ITERATORS:we},xe=Math.ceil,Ee=Math.floor,Oe=function(t){return isNaN(t=+t)?0:(t>0?Ee:xe)(t)},Ce=Math.min,Te=function(t){return t>0?Ce(Oe(t),9007199254740991):0},Se=Math.max,Me=Math.min,De=function(t,e){var i=Oe(t);return i<0?Se(i+e,0):Me(i,e)},Ie=function(t){return function(e,i,o){var n,s=G(e),r=Te(s.length),a=De(o,r);if(t&&i!=i){for(;r>a;)if((n=s[a++])!=n)return!0}else for(;r>a;a++)if((t||a in s)&&s[a]===i)return t||a||0;return!t&&-1}},Pe={includes:Ie(!0),indexOf:Ie(!1)},Fe=Pe.indexOf,ze=function(t,e){var i,o=G(t),n=0,s=[];for(i in o)!J(Jt,i)&&J(o,i)&&s.push(i);for(;e.length>n;)J(o,i=e[n++])&&(~Fe(s,i)||s.push(i));return s},Be=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ne=Object.keys||function(t){return ze(t,Be)},Ae=R?Object.defineProperties:function(t,e){vt(t);for(var i,o=Ne(e),n=o.length,s=0;n>s;)yt.f(t,i=o[s++],e[i]);return t},Re=function(t){return"function"==typeof t?t:void 0},Le=function(t,e){return arguments.length<2?Re(ut[t])||Re(N[t]):ut[t]&&ut[t][e]||N[t]&&N[t][e]},je=Le("document","documentElement"),He=$t("IE_PROTO"),We=function(){},qe=function(t){return"<script>"+t+"<\/script>"},Ve=function(){try{ke=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;Ve=ke?function(t){t.write(qe("")),t.close();var e=t.parentWindow.Object;return t=null,e}(ke):((e=et("iframe")).style.display="none",je.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(qe("document.F=Object")),t.close(),t.F);for(var i=Be.length;i--;)delete Ve.prototype[Be[i]];return Ve()};Jt[He]=!0;var Ue=Object.create||function(t,e){var i;return null!==t?(We.prototype=vt(t),i=new We,We.prototype=null,i[He]=t):i=Ve(),void 0===e?i:Ae(i,e)},Ye={};Ye[be("toStringTag")]="z";var Xe="[object z]"===String(Ye),Ge=be("toStringTag"),Ke="Arguments"==V(function(){return arguments}()),Ze=Xe?V:function(t){var e,i,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Ge))?i:Ke?V(e):"Object"==(o=V(e))&&"function"==typeof e.callee?"Arguments":o},$e=Xe?{}.toString:function(){return"[object "+Ze(this)+"]"},Je=yt.f,Qe=be("toStringTag"),ti=function(t,e,i,o){if(t){var n=i?t:t.prototype;J(n,Qe)||Je(n,Qe,{configurable:!0,value:e}),o&&!Xe&&mt(n,"toString",$e)}},ei=_e.IteratorPrototype,ii=function(){return this},oi=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,i={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(i,[]),e=i instanceof Array}catch(t){}return function(i,o){return vt(i),function(t){if(!K(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(o),e?t.call(i,o):i.__proto__=o,i}}():void 0),ni=function(t,e,i,o){o&&o.enumerable?t[e]=i:mt(t,e,i)},si=_e.IteratorPrototype,ri=_e.BUGGY_SAFARI_ITERATORS,ai=be("iterator"),hi=function(){return this},di=function(t,e,i,o,n,s,r){!function(t,e,i){var o=e+" Iterator";t.prototype=Ue(ei,{next:W(1,i)}),ti(t,o,!1,!0),At[o]=ii}(i,e,o);var a,h,d,l=function(t){if(t===n&&v)return v;if(!ri&&t in p)return p[t];switch(t){case"keys":case"values":case"entries":return function(){return new i(this,t)}}return function(){return new i(this)}},c=e+" Iterator",u=!1,p=t.prototype,f=p[ai]||p["@@iterator"]||n&&p[n],v=!ri&&f||l(n),g="Array"==e&&p.entries||f;if(g&&(a=pe(g.call(new t)),si!==Object.prototype&&a.next&&(ti(a,c,!0,!0),At[c]=hi)),"values"==n&&f&&"values"!==f.name&&(u=!0,v=function(){return f.call(this)}),r&&p[ai]!==v&&mt(p,ai,v),At[e]=v,n)if(h={values:l("values"),keys:s?v:l("keys"),entries:l("entries")},r)for(d in h)!ri&&!u&&d in p||ni(p,d,h[d]);else kt({target:e,proto:!0,forced:ri||u},h);return h},li=he.set,ci=he.getterFor("Array Iterator");di(Array,"Array",(function(t,e){li(this,{type:"Array Iterator",target:G(t),index:0,kind:e})}),(function(){var t=ci(this),e=t.target,i=t.kind,o=t.index++;return!e||o>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==i?{value:o,done:!1}:"values"==i?{value:e[o],done:!1}:{value:[o,e[o]],done:!1}}),"values");At.Arguments=At.Array;var ui=be("toStringTag");for(var pi 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 fi=N[pi],vi=fi&&fi.prototype;vi&&Ze(vi)!==ui&&mt(vi,ui,pi),At[pi]=At.Array}var gi=Array.isArray||function(t){return"Array"==V(t)},yi=be("species"),mi=function(t,e){var i;return gi(t)&&("function"!=typeof(i=t.constructor)||i!==Array&&!gi(i.prototype)?K(i)&&null===(i=i[yi])&&(i=void 0):i=void 0),new(void 0===i?Array:i)(0===e?0:e)},bi=[].push,wi=function(t){var e=1==t,i=2==t,o=3==t,n=4==t,s=6==t,r=5==t||s;return function(a,h,d,l){for(var c,u,p=de(a),f=Y(p),v=ft(h,d,3),g=Te(f.length),y=0,m=l||mi,b=e?m(a,g):i?m(a,0):void 0;g>y;y++)if((r||y in f)&&(u=v(c=f[y],y,p),t))if(e)b[y]=u;else if(u)switch(t){case 3:return!0;case 5:return c;case 6:return y;case 2:bi.call(b,c)}else if(n)return!1;return s?-1:o||n?n:b}},ki={forEach:wi(0),map:wi(1),filter:wi(2),some:wi(3),every:wi(4),find:wi(5),findIndex:wi(6)},_i=function(t,e){var i=[][t];return!!i&&A((function(){i.call(null,e||function(){throw 1},1)}))},xi=Object.defineProperty,Ei=function(t){throw t},Oi=function(t,e){e||(e={});var i=[][t],o=!!J(e,"ACCESSORS")&&e.ACCESSORS,n=J(e,0)?e[0]:Ei,s=J(e,1)?e[1]:void 0;return!!i&&!A((function(){if(o&&!R)return!0;var t={length:-1},e=function(e){o?xi(t,e,{enumerable:!0,get:Ei}):t[e]=1};e(1),e(2147483646),e(4294967294),i.call(t,n,s)}))},Ci=ki.forEach,Ti=_i("forEach"),Si=Oi("forEach"),Mi=Ti&&Si?[].forEach:function(t){return Ci(this,t,arguments.length>1?arguments[1]:void 0)};kt({target:"Array",proto:!0,forced:[].forEach!=Mi},{forEach:Mi});var Di=Ct("Array").forEach,Ii=Array.prototype,Pi={DOMTokenList:!0,NodeList:!0},Fi=function(t){var e=t.forEach;return t===Ii||t instanceof Array&&e===Ii.forEach||Pi.hasOwnProperty(Ze(t))?Di:e};kt({target:"Array",stat:!0},{isArray:gi});var zi,Bi,Ni=ut.Array.isArray,Ai=Ni,Ri=function(t,e,i){var o=Z(e);o in t?yt.f(t,o,W(0,i)):t[o]=i},Li=Le("navigator","userAgent")||"",ji=N.process,Hi=ji&&ji.versions,Wi=Hi&&Hi.v8;Wi?Bi=(zi=Wi.split("."))[0]+zi[1]:Li&&(!(zi=Li.match(/Edge\/(\d+)/))||zi[1]>=74)&&(zi=Li.match(/Chrome\/(\d+)/))&&(Bi=zi[1]);var qi=Bi&&+Bi,Vi=be("species"),Ui=function(t){return qi>=51||!A((function(){var e=[];return(e.constructor={})[Vi]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Yi=Ui("splice"),Xi=Oi("splice",{ACCESSORS:!0,0:0,1:2}),Gi=Math.max,Ki=Math.min;kt({target:"Array",proto:!0,forced:!Yi||!Xi},{splice:function(t,e){var i,o,n,s,r,a,h=de(this),d=Te(h.length),l=De(t,d),c=arguments.length;if(0===c?i=o=0:1===c?(i=0,o=d-l):(i=c-2,o=Ki(Gi(Oe(e),0),d-l)),d+i-o>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(n=mi(h,o),s=0;s<o;s++)(r=l+s)in h&&Ri(n,s,h[r]);if(n.length=o,i<o){for(s=l;s<d-o;s++)a=s+i,(r=s+o)in h?h[a]=h[r]:delete h[a];for(s=d;s>d-o+i;s--)delete h[s-1]}else if(i>o)for(s=d-o;s>l;s--)a=s+i-1,(r=s+o-1)in h?h[a]=h[r]:delete h[a];for(s=0;s<i;s++)h[s+l]=arguments[s+2];return h.length=d-o+i,n}});var Zi=Ct("Array").splice,$i=Array.prototype,Ji=function(t){var e=t.splice;return t===$i||t instanceof Array&&e===$i.splice?Zi:e},Qi=Pe.includes,to=Oi("indexOf",{ACCESSORS:!0,1:0});kt({target:"Array",proto:!0,forced:!to},{includes:function(t){return Qi(this,t,arguments.length>1?arguments[1]:void 0)}});var eo=Ct("Array").includes,io=be("match"),oo=function(t){if(function(t){var e;return K(t)&&(void 0!==(e=t[io])?!!e:"RegExp"==V(t))}(t))throw TypeError("The method doesn't accept regular expressions");return t},no=be("match");kt({target:"String",proto:!0,forced:!function(t){var e=/./;try{"/./"[t](e)}catch(i){try{return e[no]=!1,"/./"[t](e)}catch(t){}}return!1}("includes")},{includes:function(t){return!!~String(X(this)).indexOf(oo(t),arguments.length>1?arguments[1]:void 0)}});var so=Ct("String").includes,ro=Array.prototype,ao=String.prototype,ho=function(t){var e=t.includes;return t===ro||t instanceof Array&&e===ro.includes?eo:"string"==typeof t||t===ao||t instanceof String&&e===ao.includes?so:e},lo=Pe.indexOf,co=[].indexOf,uo=!!co&&1/[1].indexOf(1,-0)<0,po=_i("indexOf"),fo=Oi("indexOf",{ACCESSORS:!0,1:0});kt({target:"Array",proto:!0,forced:uo||!po||!fo},{indexOf:function(t){return uo?co.apply(this,arguments)||0:lo(this,t,arguments.length>1?arguments[1]:void 0)}});var vo=Ct("Array").indexOf,go=Array.prototype,yo=function(t){var e=t.indexOf;return t===go||t instanceof Array&&e===go.indexOf?vo:e};kt({target:"Object",stat:!0,sham:!R},{create:Ue});var mo=ut.Object,bo=function(t,e){return mo.create(t,e)},wo=bo;function ko(t){return Co=t,function(){var t={};To=0,void(So=Co.charAt(0)),jo(),"strict"===Mo&&(t.strict=!0,jo());"graph"!==Mo&&"digraph"!==Mo||(t.type=Mo,jo());Do===Eo.IDENTIFIER&&(t.id=Mo,jo());if("{"!=Mo)throw Yo("Angle bracket { expected");if(jo(),Ho(t),"}"!=Mo)throw Yo("Angle bracket } expected");if(jo(),""!==Mo)throw Yo("End of file expected");return jo(),delete t.node,delete t.edge,delete t.graph,t}()}var _o={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},xo=wo(_o);xo.color="color.color",xo.style="dashes";var Eo={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},Oo={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},Co="",To=0,So="",Mo="",Do=Eo.NULL;function Io(){To++,So=Co.charAt(To)}function Po(){return Co.charAt(To+1)}var Fo=/[a-zA-Z_0-9.:#]/;function zo(t){return Fo.test(t)}function Bo(t,e){if(t||(t={}),e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function No(t,e,i){for(var o=e.split("."),n=t;o.length;){var s=o.shift();o.length?(n[s]||(n[s]={}),n=n[s]):n[s]=i}}function Ao(t,e){for(var i,o,n=null,s=[t],r=t;r.parent;)s.push(r.parent),r=r.parent;if(r.nodes)for(i=0,o=r.nodes.length;i<o;i++)if(e.id===r.nodes[i].id){n=r.nodes[i];break}for(n||(n={id:e.id},t.node&&(n.attr=Bo(n.attr,t.node))),i=s.length-1;i>=0;i--){var a,h=s[i];h.nodes||(h.nodes=[]),-1===yo(a=h.nodes).call(a,n)&&h.nodes.push(n)}e.attr&&(n.attr=Bo(n.attr,e.attr))}function Ro(t,e){if(t.edges||(t.edges=[]),t.edges.push(e),t.edge){var i=Bo({},t.edge);e.attr=Bo(i,e.attr)}}function Lo(t,e,i,o,n){var s={from:e,to:i,type:o};return t.edge&&(s.attr=Bo({},t.edge)),s.attr=Bo(s.attr||{},n),null!=n&&n.hasOwnProperty("arrows")&&null!=n.arrows&&(s.arrows={to:{enabled:!0,type:n.arrows.type}},n.arrows=null),s}function jo(){for(Do=Eo.NULL,Mo="";" "===So||"\t"===So||"\n"===So||"\r"===So;)Io();do{var t=!1;if("#"===So){for(var e=To-1;" "===Co.charAt(e)||"\t"===Co.charAt(e);)e--;if("\n"===Co.charAt(e)||""===Co.charAt(e)){for(;""!=So&&"\n"!=So;)Io();t=!0}}if("/"===So&&"/"===Po()){for(;""!=So&&"\n"!=So;)Io();t=!0}if("/"===So&&"*"===Po()){for(;""!=So;){if("*"===So&&"/"===Po()){Io(),Io();break}Io()}t=!0}for(;" "===So||"\t"===So||"\n"===So||"\r"===So;)Io()}while(t);if(""!==So){var i=So+Po();if(Oo[i])return Do=Eo.DELIMITER,Mo=i,Io(),void Io();if(Oo[So])return Do=Eo.DELIMITER,Mo=So,void Io();if(zo(So)||"-"===So){for(Mo+=So,Io();zo(So);)Mo+=So,Io();return"false"===Mo?Mo=!1:"true"===Mo?Mo=!0:isNaN(Number(Mo))||(Mo=Number(Mo)),void(Do=Eo.IDENTIFIER)}if('"'===So){for(Io();""!=So&&('"'!=So||'"'===So&&'"'===Po());)'"'===So?(Mo+=So,Io()):"\\"===So&&"n"===Po()?(Mo+="\n",Io()):Mo+=So,Io();if('"'!=So)throw Yo('End of string " expected');return Io(),void(Do=Eo.IDENTIFIER)}for(Do=Eo.UNKNOWN;""!=So;)Mo+=So,Io();throw new SyntaxError('Syntax error in part "'+Xo(Mo,30)+'"')}Do=Eo.DELIMITER}function Ho(t){for(;""!==Mo&&"}"!=Mo;)Wo(t),";"===Mo&&jo()}function Wo(t){var e=qo(t);if(e)Vo(t,e);else if(!function(t){if("node"===Mo)return jo(),t.node=Uo(),"node";if("edge"===Mo)return jo(),t.edge=Uo(),"edge";if("graph"===Mo)return jo(),t.graph=Uo(),"graph";return null}(t)){if(Do!=Eo.IDENTIFIER)throw Yo("Identifier expected");var i=Mo;if(jo(),"="===Mo){if(jo(),Do!=Eo.IDENTIFIER)throw Yo("Identifier expected");t[i]=Mo,jo()}else!function(t,e){var i={id:e},o=Uo();o&&(i.attr=o);Ao(t,i),Vo(t,e)}(t,i)}}function qo(t){var e=null;if("subgraph"===Mo&&((e={}).type="subgraph",jo(),Do===Eo.IDENTIFIER&&(e.id=Mo,jo())),"{"===Mo){if(jo(),e||(e={}),e.parent=t,e.node=t.node,e.edge=t.edge,e.graph=t.graph,Ho(e),"}"!=Mo)throw Yo("Angle bracket } expected");jo(),delete e.node,delete e.edge,delete e.graph,delete e.parent,t.subgraphs||(t.subgraphs=[]),t.subgraphs.push(e)}return e}function Vo(t,e){for(;"->"===Mo||"--"===Mo;){var i,o=Mo;jo();var n=qo(t);if(n)i=n;else{if(Do!=Eo.IDENTIFIER)throw Yo("Identifier or subgraph expected");Ao(t,{id:i=Mo}),jo()}Ro(t,Lo(t,e,i,o,Uo())),e=i}}function Uo(){for(var t,e,i=null,o={dashed:!0,solid:!1,dotted:[1,5]},n={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},s=new Array,r=new Array;"["===Mo;){for(jo(),i={};""!==Mo&&"]"!=Mo;){if(Do!=Eo.IDENTIFIER)throw Yo("Attribute name expected");var a=Mo;if(jo(),"="!=Mo)throw Yo("Equal sign = expected");if(jo(),Do!=Eo.IDENTIFIER)throw Yo("Attribute value expected");var h=Mo;"style"===a&&(h=o[h]),"arrowhead"===a&&(a="arrows",h={to:{enabled:!0,type:n[h]}}),"arrowtail"===a&&(a="arrows",h={from:{enabled:!0,type:n[h]}}),s.push({attr:i,name:a,value:h}),r.push(a),jo(),","==Mo&&jo()}if("]"!=Mo)throw Yo("Bracket ] expected");jo()}if(ho(r).call(r,"dir")){var d={arrows:{}};for(t=0;t<s.length;t++)if("arrows"===s[t].name)if(null!=s[t].value.to)d.arrows.to=t;else{if(null==s[t].value.from)throw Yo("Invalid value of arrows");d.arrows.from=t}else"dir"===s[t].name&&(d.dir=t);var l,c,u=s[d.dir].value;if(!ho(r).call(r,"arrows"))if("both"===u)s.push({attr:s[d.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),d.arrows.to=s.length-1,s.push({attr:s[d.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),d.arrows.from=s.length-1;else if("forward"===u)s.push({attr:s[d.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),d.arrows.to=s.length-1;else if("back"===u)s.push({attr:s[d.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),d.arrows.from=s.length-1;else{if("none"!==u)throw Yo('Invalid dir type "'+u+'"');s.push({attr:s[d.dir].attr,name:"arrows",value:""}),d.arrows.to=s.length-1}if("both"===u)d.arrows.to&&d.arrows.from?(c=s[d.arrows.to].value.to.type,l=s[d.arrows.from].value.from.type,s[d.arrows.to]={attr:s[d.arrows.to].attr,name:s[d.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}},Ji(s).call(s,d.arrows.from,1)):d.arrows.to?(c=s[d.arrows.to].value.to.type,l="arrow",s[d.arrows.to]={attr:s[d.arrows.to].attr,name:s[d.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}}):d.arrows.from&&(c="arrow",l=s[d.arrows.from].value.from.type,s[d.arrows.from]={attr:s[d.arrows.from].attr,name:s[d.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}});else if("back"===u)d.arrows.to&&d.arrows.from?(c="",l=s[d.arrows.from].value.from.type,s[d.arrows.from]={attr:s[d.arrows.from].attr,name:s[d.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}}):d.arrows.to?(c="",l="arrow",d.arrows.from=d.arrows.to,s[d.arrows.from]={attr:s[d.arrows.from].attr,name:s[d.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}}):d.arrows.from&&(c="",l=s[d.arrows.from].value.from.type,s[d.arrows.to]={attr:s[d.arrows.from].attr,name:s[d.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}}),s[d.arrows.from]={attr:s[d.arrows.from].attr,name:s[d.arrows.from].name,value:{from:{enabled:!0,type:s[d.arrows.from].value.from.type}}};else if("none"===u){var p;s[p=d.arrows.to?d.arrows.to:d.arrows.from]={attr:s[p].attr,name:s[p].name,value:""}}else{if("forward"!==u)throw Yo('Invalid dir type "'+u+'"');d.arrows.to&&d.arrows.from?(c=s[d.arrows.to].value.to.type,l="",s[d.arrows.to]={attr:s[d.arrows.to].attr,name:s[d.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}}):d.arrows.to?(c=s[d.arrows.to].value.to.type,l="",s[d.arrows.to]={attr:s[d.arrows.to].attr,name:s[d.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}}):d.arrows.from&&(c="arrow",l="",d.arrows.to=d.arrows.from,s[d.arrows.to]={attr:s[d.arrows.to].attr,name:s[d.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}}),s[d.arrows.to]={attr:s[d.arrows.to].attr,name:s[d.arrows.to].name,value:{to:{enabled:!0,type:s[d.arrows.to].value.to.type}}}}Ji(s).call(s,d.dir,1)}if(ho(r).call(r,"penwidth")){var f=[];for(e=s.length,t=0;t<e;t++)"width"!==s[t].name&&("penwidth"===s[t].name&&(s[t].name="width"),f.push(s[t]));s=f}for(e=s.length,t=0;t<e;t++)No(s[t].attr,s[t].name,s[t].value);return i}function Yo(t){return new SyntaxError(t+', got "'+Xo(Mo,30)+'" (char '+To+")")}function Xo(t,e){return t.length<=e?t:t.substr(0,27)+"..."}function Go(t,e,i){for(var o=e.split("."),n=o.pop(),s=t,r=0;r<o.length;r++){var a=o[r];a in s||(s[a]={}),s=s[a]}return s[n]=i,t}function Ko(t,e){var i={};for(var o in t)if(t.hasOwnProperty(o)){var n=e[o];Ai(n)?Fi(n).call(n,(function(e){Go(i,e,t[o])})):Go(i,"string"==typeof n?n:o,t[o])}return i}var Zo=ko,$o=function(t){var e,i=ko(t),o={nodes:[],edges:[],options:{}};if(i.nodes&&Fi(e=i.nodes).call(e,(function(t){var e={id:t.id,label:String(t.label||t.id)};Bo(e,Ko(t.attr,_o)),e.image&&(e.shape="image"),o.nodes.push(e)})),i.edges){var n,s=function(t){var e={from:t.from,to:t.to};return Bo(e,Ko(t.attr,xo)),null==e.arrows&&"->"===t.type&&(e.arrows="to"),e};Fi(n=i.edges).call(n,(function(t){var e,i,n,r,a,h,d;(e=t.from instanceof Object?t.from.nodes:{id:t.from},i=t.to instanceof Object?t.to.nodes:{id:t.to},t.from instanceof Object&&t.from.edges)&&Fi(n=t.from.edges).call(n,(function(t){var e=s(t);o.edges.push(e)}));(a=i,h=function(e,i){var n=Lo(o,e.id,i.id,t.type,t.attr),r=s(n);o.edges.push(r)},Ai(r=e)?Fi(r).call(r,(function(t){Ai(a)?Fi(a).call(a,(function(e){h(t,e)})):h(t,a)})):Ai(a)?Fi(a).call(a,(function(t){h(r,t)})):h(r,a),t.to instanceof Object&&t.to.edges)&&Fi(d=t.to.edges).call(d,(function(t){var e=s(t);o.edges.push(e)}))}))}return i.attr&&(o.options=i.attr),o},Jo={parseDOT:Zo,DOTToGraph:$o},Qo=Object.freeze({__proto__:null,default:Jo,__moduleExports:Jo,parseDOT:Zo,DOTToGraph:$o}),tn=ki.map,en=Ui("map"),on=Oi("map");kt({target:"Array",proto:!0,forced:!en||!on},{map:function(t){return tn(this,t,arguments.length>1?arguments[1]:void 0)}});var nn=Ct("Array").map,sn=Array.prototype,rn=function(t){var e=t.map;return t===sn||t instanceof Array&&e===sn.map?nn:e};function an(t,e){var i,o={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};null!=e&&(null!=e.fixed&&(o.nodes.fixed=e.fixed),null!=e.parseColor&&(o.nodes.parseColor=e.parseColor),null!=e.inheritColor&&(o.edges.inheritColor=e.inheritColor));var n=t.edges,s=rn(n).call(n,(function(t){var e={from:t.source,id:t.id,to:t.target};return null!=t.attributes&&(e.attributes=t.attributes),null!=t.label&&(e.label=t.label),null!=t.attributes&&null!=t.attributes.title&&(e.title=t.attributes.title),"Directed"===t.type&&(e.arrows="to"),t.color&&!1===o.edges.inheritColor&&(e.color=t.color),e}));return{nodes:rn(i=t.nodes).call(i,(function(t){var e={id:t.id,fixed:o.nodes.fixed&&null!=t.x&&null!=t.y};return null!=t.attributes&&(e.attributes=t.attributes),null!=t.label&&(e.label=t.label),null!=t.size&&(e.size=t.size),null!=t.attributes&&null!=t.attributes.title&&(e.title=t.attributes.title),null!=t.title&&(e.title=t.title),null!=t.x&&(e.x=t.x),null!=t.y&&(e.y=t.y),null!=t.color&&(!0===o.nodes.parseColor?e.color=t.color:e.color={background:t.color,border:t.color,highlight:{background:t.color,border:t.color},hover:{background:t.color,border:t.color}}),e})),edges:s}}var hn=Object.freeze({__proto__:null,parseGephi:an}),dn=Object.freeze({__proto__:null,default:void 0});function ln(){return(ln=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t}).apply(this,arguments)}function cn(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function un(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var pn,fn="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var o=arguments[i];if(null!=o)for(var n in o)o.hasOwnProperty(n)&&(e[n]=o[n])}return e}:Object.assign,vn=["","webkit","Moz","MS","ms","o"],gn="undefined"==typeof document?{style:{}}:document.createElement("div"),yn="function",mn=Math.round,bn=Math.abs,wn=Date.now;function kn(t,e){for(var i,o,n=e[0].toUpperCase()+e.slice(1),s=0;s<vn.length;){if((o=(i=vn[s])?i+n:e)in t)return o;s++}}pn="undefined"==typeof window?{}:window;var _n=kn(gn.style,"touchAction"),xn=void 0!==_n;var En="auto",On="manipulation",Cn="none",Tn="pan-x",Sn="pan-y",Mn=function(){if(!xn)return!1;var t={},e=pn.CSS&&pn.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(i){return t[i]=!e||pn.CSS.supports("touch-action",i)})),t}(),Dn="ontouchstart"in pn,In=void 0!==kn(pn,"PointerEvent"),Pn=Dn&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),Fn="touch",zn="mouse",Bn=25,Nn=1,An=2,Rn=4,Ln=8,jn=1,Hn=2,Wn=4,qn=8,Vn=16,Un=Hn|Wn,Yn=qn|Vn,Xn=Un|Yn,Gn=["x","y"],Kn=["clientX","clientY"];function Zn(t,e,i){var o;if(t)if(t.forEach)t.forEach(e,i);else if(void 0!==t.length)for(o=0;o<t.length;)e.call(i,t[o],o,t),o++;else for(o in t)t.hasOwnProperty(o)&&e.call(i,t[o],o,t)}function $n(t,e){return typeof t===yn?t.apply(e&&e[0]||void 0,e):t}function Jn(t,e){return t.indexOf(e)>-1}var Qn=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){"compute"===t&&(t=this.compute()),xn&&this.manager.element.style&&Mn[t]&&(this.manager.element.style[_n]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var t=[];return Zn(this.manager.recognizers,(function(e){$n(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(Jn(t,Cn))return Cn;var e=Jn(t,Tn),i=Jn(t,Sn);return e&&i?Cn:e||i?e?Tn:Sn:Jn(t,On)?On:En}(t.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var o=this.actions,n=Jn(o,Cn)&&!Mn[Cn],s=Jn(o,Sn)&&!Mn[Sn],r=Jn(o,Tn)&&!Mn[Tn];if(n){var a=1===t.pointers.length,h=t.distance<2,d=t.deltaTime<250;if(a&&h&&d)return}if(!r||!s)return n||s&&i&Un||r&&i&Yn?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function ts(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function es(t){var e=t.length;if(1===e)return{x:mn(t[0].clientX),y:mn(t[0].clientY)};for(var i=0,o=0,n=0;n<e;)i+=t[n].clientX,o+=t[n].clientY,n++;return{x:mn(i/e),y:mn(o/e)}}function is(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:mn(t.pointers[i].clientX),clientY:mn(t.pointers[i].clientY)},i++;return{timeStamp:wn(),pointers:e,center:es(e),deltaX:t.deltaX,deltaY:t.deltaY}}function os(t,e,i){i||(i=Gn);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return Math.sqrt(o*o+n*n)}function ns(t,e,i){i||(i=Gn);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return 180*Math.atan2(n,o)/Math.PI}function ss(t,e){return t===e?jn:bn(t)>=bn(e)?t<0?Hn:Wn:e<0?qn:Vn}function rs(t,e,i){return{x:e/t||0,y:i/t||0}}function as(t,e){var i=t.session,o=e.pointers,n=o.length;i.firstInput||(i.firstInput=is(e)),n>1&&!i.firstMultiple?i.firstMultiple=is(e):1===n&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,h=e.center=es(o);e.timeStamp=wn(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=ns(a,h),e.distance=os(a,h),function(t,e){var i=e.center,o=t.offsetDelta||{},n=t.prevDelta||{},s=t.prevInput||{};e.eventType!==Nn&&s.eventType!==Rn||(n=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},o=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=n.x+(i.x-o.x),e.deltaY=n.y+(i.y-o.y)}(i,e),e.offsetDirection=ss(e.deltaX,e.deltaY);var d,l,c=rs(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=bn(c.x)>bn(c.y)?c.x:c.y,e.scale=r?(d=r.pointers,os((l=o)[0],l[1],Kn)/os(d[0],d[1],Kn)):1,e.rotation=r?function(t,e){return ns(e[1],e[0],Kn)+ns(t[1],t[0],Kn)}(r.pointers,o):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,o,n,s,r=t.lastInterval||e,a=e.timeStamp-r.timeStamp;if(e.eventType!==Ln&&(a>Bn||void 0===r.velocity)){var h=e.deltaX-r.deltaX,d=e.deltaY-r.deltaY,l=rs(a,h,d);o=l.x,n=l.y,i=bn(l.x)>bn(l.y)?l.x:l.y,s=ss(h,d),t.lastInterval=e}else i=r.velocity,o=r.velocityX,n=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=o,e.velocityY=n,e.direction=s}(i,e);var u,p=t.element,f=e.srcEvent;ts(u=f.composedPath?f.composedPath()[0]:f.path?f.path[0]:f.target,p)&&(p=u),e.target=p}function hs(t,e,i){var o=i.pointers.length,n=i.changedPointers.length,s=e&Nn&&o-n==0,r=e&(Rn|Ln)&&o-n==0;i.isFirst=!!s,i.isFinal=!!r,s&&(t.session={}),i.eventType=e,as(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function ds(t){return t.trim().split(/\s+/g)}function ls(t,e,i){Zn(ds(e),(function(e){t.addEventListener(e,i,!1)}))}function cs(t,e,i){Zn(ds(e),(function(e){t.removeEventListener(e,i,!1)}))}function us(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var ps=function(){function t(t,e){var i=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){$n(t.options.enable,[t])&&i.handler(e)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&ls(this.element,this.evEl,this.domHandler),this.evTarget&&ls(this.target,this.evTarget,this.domHandler),this.evWin&&ls(us(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&cs(this.element,this.evEl,this.domHandler),this.evTarget&&cs(this.target,this.evTarget,this.domHandler),this.evWin&&cs(us(this.element),this.evWin,this.domHandler)},t}();function fs(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;o<t.length;){if(i&&t[o][i]==e||!i&&t[o]===e)return o;o++}return-1}var vs={pointerdown:Nn,pointermove:An,pointerup:Rn,pointercancel:Ln,pointerout:Ln},gs={2:Fn,3:"pen",4:zn,5:"kinect"},ys="pointerdown",ms="pointermove pointerup pointercancel";pn.MSPointerEvent&&!pn.PointerEvent&&(ys="MSPointerDown",ms="MSPointerMove MSPointerUp MSPointerCancel");var bs=function(t){function e(){var i,o=e.prototype;return o.evEl=ys,o.evWin=ms,(i=t.apply(this,arguments)||this).store=i.manager.session.pointerEvents=[],i}return cn(e,t),e.prototype.handler=function(t){var e=this.store,i=!1,o=t.type.toLowerCase().replace("ms",""),n=vs[o],s=gs[t.pointerType]||t.pointerType,r=s===Fn,a=fs(e,t.pointerId,"pointerId");n&Nn&&(0===t.button||r)?a<0&&(e.push(t),a=e.length-1):n&(Rn|Ln)&&(i=!0),a<0||(e[a]=t,this.callback(this.manager,n,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),i&&e.splice(a,1))},e}(ps);function ws(t){return Array.prototype.slice.call(t,0)}function ks(t,e,i){for(var o=[],n=[],s=0;s<t.length;){var r=e?t[s][e]:t[s];fs(n,r)<0&&o.push(t[s]),n[s]=r,s++}return i&&(o=e?o.sort((function(t,i){return t[e]>i[e]})):o.sort()),o}var _s={touchstart:Nn,touchmove:An,touchend:Rn,touchcancel:Ln},xs="touchstart touchmove touchend touchcancel",Es=function(t){function e(){var i;return e.prototype.evTarget=xs,(i=t.apply(this,arguments)||this).targetIds={},i}return cn(e,t),e.prototype.handler=function(t){var e=_s[t.type],i=Os.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Fn,srcEvent:t})},e}(ps);function Os(t,e){var i,o,n=ws(t.touches),s=this.targetIds;if(e&(Nn|An)&&1===n.length)return s[n[0].identifier]=!0,[n,n];var r=ws(t.changedTouches),a=[],h=this.target;if(o=n.filter((function(t){return ts(t.target,h)})),e===Nn)for(i=0;i<o.length;)s[o[i].identifier]=!0,i++;for(i=0;i<r.length;)s[r[i].identifier]&&a.push(r[i]),e&(Rn|Ln)&&delete s[r[i].identifier],i++;return a.length?[ks(o.concat(a),"identifier",!0),a]:void 0}var Cs={mousedown:Nn,mousemove:An,mouseup:Rn},Ts="mousedown",Ss="mousemove mouseup",Ms=function(t){function e(){var i,o=e.prototype;return o.evEl=Ts,o.evWin=Ss,(i=t.apply(this,arguments)||this).pressed=!1,i}return cn(e,t),e.prototype.handler=function(t){var e=Cs[t.type];e&Nn&&0===t.button&&(this.pressed=!0),e&An&&1!==t.which&&(e=Rn),this.pressed&&(e&Rn&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:zn,srcEvent:t}))},e}(ps),Ds=2500,Is=25;function Ps(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY},o=this.lastTouches;this.lastTouches.push(i);setTimeout((function(){var t=o.indexOf(i);t>-1&&o.splice(t,1)}),Ds)}}function Fs(t,e){t&Nn?(this.primaryTouch=e.changedPointers[0].identifier,Ps.call(this,e)):t&(Rn|Ln)&&Ps.call(this,e)}function zs(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,o=0;o<this.lastTouches.length;o++){var n=this.lastTouches[o],s=Math.abs(e-n.x),r=Math.abs(i-n.y);if(s<=Is&&r<=Is)return!0}return!1}var Bs=function(){return function(t){function e(e,i){var o;return(o=t.call(this,e,i)||this).handler=function(t,e,i){var n=i.pointerType===Fn,s=i.pointerType===zn;if(!(s&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(n)Fs.call(un(un(o)),e,i);else if(s&&zs.call(un(un(o)),i))return;o.callback(t,e,i)}},o.touch=new Es(o.manager,o.handler),o.mouse=new Ms(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}return cn(e,t),e.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(ps)}();function Ns(t,e,i){return!!Array.isArray(t)&&(Zn(t,i[e],i),!0)}var As=1,Rs=2,Ls=4,js=8,Hs=js,Ws=16,qs=1;function Vs(t,e){var i=e.manager;return i?i.get(t):t}function Us(t){return t&Ws?"cancel":t&js?"end":t&Ls?"move":t&Rs?"start":""}var Ys=function(){function t(t){void 0===t&&(t={}),this.options=ln({enable:!0},t),this.id=qs++,this.manager=null,this.state=As,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return fn(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(Ns(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Vs(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},e.dropRecognizeWith=function(t){return Ns(t,"dropRecognizeWith",this)?this:(t=Vs(t,this),delete this.simultaneous[t.id],this)},e.requireFailure=function(t){if(Ns(t,"requireFailure",this))return this;var e=this.requireFail;return-1===fs(e,t=Vs(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(Ns(t,"dropRequireFailure",this))return this;t=Vs(t,this);var e=fs(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},e.emit=function(t){var e=this,i=this.state;function o(i){e.manager.emit(i,t)}i<js&&o(e.options.event+Us(i)),o(e.options.event),t.additionalEvent&&o(t.additionalEvent),i>=js&&o(e.options.event+Us(i))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=32},e.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(32|As)))return!1;t++}return!0},e.recognize=function(t){var e=fn({},t);if(!$n(this.options.enable,[this,e]))return this.reset(),void(this.state=32);this.state&(Hs|Ws|32)&&(this.state=As),this.state=this.process(e),this.state&(Rs|Ls|js|Ws)&&this.tryEmit(e)},e.process=function(t){},e.getTouchAction=function(){},e.reset=function(){},t}(),Xs=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,ln({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},e))||this).pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}cn(e,t);var i=e.prototype;return i.getTouchAction=function(){return[On]},i.process=function(t){var e=this,i=this.options,o=t.pointers.length===i.pointers,n=t.distance<i.threshold,s=t.deltaTime<i.time;if(this.reset(),t.eventType&Nn&&0===this.count)return this.failTimeout();if(n&&s&&o){if(t.eventType!==Rn)return this.failTimeout();var r=!this.pTime||t.timeStamp-this.pTime<i.interval,a=!this.pCenter||os(this.pCenter,t.center)<i.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,a&&r?this.count+=1:this.count=1,this._input=t,0===this.count%i.taps)return this.hasRequireFailures()?(this._timer=setTimeout((function(){e.state=Hs,e.tryEmit()}),i.interval),Rs):Hs}return 32},i.failTimeout=function(){var t=this;return this._timer=setTimeout((function(){t.state=32}),this.options.interval),32},i.reset=function(){clearTimeout(this._timer)},i.emit=function(){this.state===Hs&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e}(Ys),Gs=function(t){function e(e){return void 0===e&&(e={}),t.call(this,ln({pointers:1},e))||this}cn(e,t);var i=e.prototype;return i.attrTest=function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},i.process=function(t){var e=this.state,i=t.eventType,o=e&(Rs|Ls),n=this.attrTest(t);return o&&(i&Ln||!n)?e|Ws:o||n?i&Rn?e|js:e&Rs?e|Ls:Rs:32},e}(Ys);function Ks(t){return t===Vn?"down":t===qn?"up":t===Hn?"left":t===Wn?"right":""}var Zs=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,ln({event:"pan",threshold:10,pointers:1,direction:Xn},e))||this).pX=null,i.pY=null,i}cn(e,t);var i=e.prototype;return i.getTouchAction=function(){var t=this.options.direction,e=[];return t&Un&&e.push(Sn),t&Yn&&e.push(Tn),e},i.directionTest=function(t){var e=this.options,i=!0,o=t.distance,n=t.direction,s=t.deltaX,r=t.deltaY;return n&e.direction||(e.direction&Un?(n=0===s?jn:s<0?Hn:Wn,i=s!==this.pX,o=Math.abs(t.deltaX)):(n=0===r?jn:r<0?qn:Vn,i=r!==this.pY,o=Math.abs(t.deltaY))),t.direction=n,i&&o>e.threshold&&n&e.direction},i.attrTest=function(t){return Gs.prototype.attrTest.call(this,t)&&(this.state&Rs||!(this.state&Rs)&&this.directionTest(t))},i.emit=function(e){this.pX=e.deltaX,this.pY=e.deltaY;var i=Ks(e.direction);i&&(e.additionalEvent=this.options.event+i),t.prototype.emit.call(this,e)},e}(Gs),$s=function(t){function e(e){return void 0===e&&(e={}),t.call(this,ln({event:"swipe",threshold:10,velocity:.3,direction:Un|Yn,pointers:1},e))||this}cn(e,t);var i=e.prototype;return i.getTouchAction=function(){return Zs.prototype.getTouchAction.call(this)},i.attrTest=function(e){var i,o=this.options.direction;return o&(Un|Yn)?i=e.overallVelocity:o&Un?i=e.overallVelocityX:o&Yn&&(i=e.overallVelocityY),t.prototype.attrTest.call(this,e)&&o&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&bn(i)>this.options.velocity&&e.eventType&Rn},i.emit=function(t){var e=Ks(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},e}(Gs),Js=function(t){function e(e){return void 0===e&&(e={}),t.call(this,ln({event:"pinch",threshold:0,pointers:2},e))||this}cn(e,t);var i=e.prototype;return i.getTouchAction=function(){return[Cn]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||this.state&Rs)},i.emit=function(e){if(1!==e.scale){var i=e.scale<1?"in":"out";e.additionalEvent=this.options.event+i}t.prototype.emit.call(this,e)},e}(Gs),Qs=function(t){function e(e){return void 0===e&&(e={}),t.call(this,ln({event:"rotate",threshold:0,pointers:2},e))||this}cn(e,t);var i=e.prototype;return i.getTouchAction=function(){return[Cn]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||this.state&Rs)},e}(Gs),tr=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,ln({event:"press",pointers:1,time:251,threshold:9},e))||this)._timer=null,i._input=null,i}cn(e,t);var i=e.prototype;return i.getTouchAction=function(){return[En]},i.process=function(t){var e=this,i=this.options,o=t.pointers.length===i.pointers,n=t.distance<i.threshold,s=t.deltaTime>i.time;if(this._input=t,!n||!o||t.eventType&(Rn|Ln)&&!s)this.reset();else if(t.eventType&Nn)this.reset(),this._timer=setTimeout((function(){e.state=Hs,e.tryEmit()}),i.time);else if(t.eventType&Rn)return Hs;return 32},i.reset=function(){clearTimeout(this._timer)},i.emit=function(t){this.state===Hs&&(t&&t.eventType&Rn?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=wn(),this.manager.emit(this.options.event,this._input)))},e}(Ys),er={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)"}},ir=[[Qs,{enable:!1}],[Js,{enable:!1},["rotate"]],[$s,{direction:Un}],[Zs,{direction:Un},["swipe"]],[Xs],[Xs,{event:"doubletap",taps:2},["tap"]],[tr]];function or(t,e){var i,o=t.element;o.style&&(Zn(t.options.cssProps,(function(n,s){i=kn(o.style,s),e?(t.oldCssProps[i]=o.style[i],o.style[i]=n):o.style[i]=t.oldCssProps[i]||""})),e||(t.oldCssProps={}))}var nr=function(){function t(t,e){var i,o=this;this.options=fn({},er,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((i=this).options.inputClass||(In?bs:Pn?Es:Dn?Bs:Ms))(i,hs),this.touchAction=new Qn(this,this.options.touchAction),or(this,!0),Zn(this.options.recognizers,(function(t){var e=o.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}var e=t.prototype;return e.set=function(t){return fn(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e=this.session;if(!e.stopped){var i;this.touchAction.preventDefaults(t);var o=this.recognizers,n=e.curRecognizer;(!n||n&&n.state&Hs)&&(e.curRecognizer=null,n=null);for(var s=0;s<o.length;)i=o[s],2===e.stopped||n&&i!==n&&!i.canRecognizeWith(n)?i.reset():i.recognize(t),!n&&i.state&(Rs|Ls|js)&&(e.curRecognizer=i,n=i),s++}},e.get=function(t){if(t instanceof Ys)return t;for(var e=this.recognizers,i=0;i<e.length;i++)if(e[i].options.event===t)return e[i];return null},e.add=function(t){if(Ns(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},e.remove=function(t){if(Ns(t,"remove",this))return this;var e=this.get(t);if(