30 lines
426 KiB
JavaScript
30 lines
426 KiB
JavaScript
|
/**
|
||
|
* vis.js
|
||
|
* https://github.com/almende/vis
|
||
|
*
|
||
|
* A dynamic, browser-based visualization library.
|
||
|
*
|
||
|
* @version 4.20.1-SNAPSHOT
|
||
|
* @date 2017-10-12
|
||
|
*
|
||
|
* @license
|
||
|
* Copyright (C) 2011-2017 Almende B.V, http://almende.com
|
||
|
*
|
||
|
* Vis.js is dual licensed under both
|
||
|
*
|
||
|
* * The Apache 2.0 License
|
||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||
|
*
|
||
|
* and
|
||
|
*
|
||
|
* * The MIT License
|
||
|
* http://opensource.org/licenses/MIT
|
||
|
*
|
||
|
* Vis.js may be distributed under either license.
|
||
|
*/
|
||
|
"use strict";!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.vis=t():e.vis=t()}(this,function(){return function(e){function t(n){if(i[n])return i[n].exports;var o=i[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var i={};return t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=83)}([function(e,t,i){t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,i){t.__esModule=!0;var n=i(127),o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,o.default)(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}()},function(e,t,i){e.exports={default:i(143),__esModule:!0}},function(e,t,i){t.__esModule=!0;var n=i(7),o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,o.default)(t))&&"function"!=typeof t?e:t}},function(e,t,i){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=i(145),s=n(o),r=i(30),a=n(r),d=i(7),h=n(d);t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,h.default)(t)));e.prototype=(0,a.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(s.default?(0,s.default)(e,t):e.__proto__=t)}},function(e,t,i){function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t,i,n){var o=!1;!0===n&&(o=null===t[i]&&void 0!==e[i]),o?delete e[i]:e[i]=t[i]}var s=i(58),r=n(s),a=i(30),d=n(a),h=i(10),l=n(h),u=i(7),c=n(u),f=i(71),p=i(117);t.isNumber=function(e){return e instanceof Number||"number"==typeof e},t.recursiveDOMDelete=function(e){if(e)for(;!0===e.hasChildNodes();)t.recursiveDOMDelete(e.firstChild),e.removeChild(e.firstChild)},t.giveRange=function(e,t,i,n){if(t==e)return.5;var o=1/(t-e);return Math.max(0,(n-e)*o)},t.isString=function(e){return e instanceof String||"string"==typeof e},t.isDate=function(e){if(e instanceof Date)return!0;if(t.isString(e)){if(v.exec(e))return!0;if(!isNaN(Date.parse(e)))return!0}return!1},t.randomUUID=function(){return p.v4()},t.assignAllKeys=function(e,t){for(var i in e)e.hasOwnProperty(i)&&"object"!==(0,c.default)(e[i])&&(e[i]=t)},t.fillIfDefined=function(e,i){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var s in e)void 0!==i[s]&&(null===i[s]||"object"!==(0,c.default)(i[s])?o(e,i,s,n):"object"===(0,c.default)(e[s])&&t.fillIfDefined(e[s],i[s],n))},t.extend=function(e,t){for(var i=1;i<arguments.length;i++){var n=arguments[i];for(var o in n)n.hasOwnProperty(o)&&(e[o]=n[o])}return e},t.selectiveExtend=function(e,t,i){if(!Array.isArray(e))throw new Error("Array with property names expected as first argument");for(var n=2;n<arguments.length;n++)for(var o=arguments[n],s=0;s<e.length;s++){var r=e[s];o&&o.hasOwnProperty(r)&&(t[r]=o[r])}return t},t.selectiveDeepExtend=function(e,i,n){var s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(Array.isArray(n))throw new TypeError("Arrays are not supported by deepExtend");for(var r=0;r<e.length;r++){var a=e[r];if(n.hasOwnProperty(a))if(n[a]&&n[a].constructor===Object)void 0===i[a]&&(i[a]={}),i[a].constructor===Object?t.deepExtend(i[a],n[a],!1,s):o(i,n,a,s);else{if(Array.isArray(n[a]))throw new TypeError("Arrays are not supported by deepExtend");o(i,n,a,s)}}return i},t.selectiveNotDeepExtend=function(e,i,n){var s=arguments.length>3&&void 0!==arguments
|
||
|
* http://hammerjs.github.io/
|
||
|
*
|
||
|
* Copyright (c) 2016 Jorik Tangelder;
|
||
|
* Licensed under the MIT license */
|
||
|
!function(o,s,r,a){function d(e,t,i){return setTimeout(f(e,i),t)}function h(e,t,i){return!!Array.isArray(e)&&(l(e,i[t],i),!0)}function l(e,t,i){var n;if(e)if(e.forEach)e.forEach(t,i);else if(e.length!==a)for(n=0;n<e.length;)t.call(i,e[n],n,e),n++;else for(n in e)e.hasOwnProperty(n)&&t.call(i,e[n],n,e)}function u(e,t,i){var n="DEPRECATED METHOD: "+t+"\n"+i+" AT \n";return function(){var t=new Error("get-stack-trace"),i=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=o.console&&(o.console.warn||o.console.log);return s&&s.call(o.console,n,i),e.apply(this,arguments)}}function c(e,t,i){var n,o=t.prototype;n=e.prototype=Object.create(o),n.constructor=e,n._super=o,i&&pe(n,i)}function f(e,t){return function(){return e.apply(t,arguments)}}function p(e,t){return typeof e==ye?e.apply(t?t[0]||a:a,t):e}function v(e,t){return e===a?t:e}function g(e,t,i){l(_(t),function(t){e.addEventListener(t,i,!1)})}function y(e,t,i){l(_(t),function(t){e.removeEventListener(t,i,!1)})}function m(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function b(e,t){return e.indexOf(t)>-1}function _(e){return e.trim().split(/\s+/g)}function w(e,t,i){if(e.indexOf&&!i)return e.indexOf(t);for(var n=0;n<e.length;){if(i&&e[n][i]==t||!i&&e[n]===t)return n;n++}return-1}function k(e){return Array.prototype.slice.call(e,0)}function x(e,t,i){for(var n=[],o=[],s=0;s<e.length;){var r=t?e[s][t]:e[s];w(o,r)<0&&n.push(e[s]),o[s]=r,s++}return i&&(n=t?n.sort(function(e,i){return e[t]>i[t]}):n.sort()),n}function O(e,t){for(var i,n,o=t[0].toUpperCase()+t.slice(1),s=0;s<ve.length;){if(i=ve[s],(n=i?i+o:t)in e)return n;s++}return a}function M(){return xe++}function E(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||o}function S(e,t){var i=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){p(e.options.enable,[e])&&i.handler(t)},this.init()}function D(e){var t=e.options.inputClass;return new(t||(Ee?W:Se?U:Me?G:H))(e,C)}function C(e,t,i){var n=i.pointers.length,o=i.changedPointers.length,s=t&Ce&&n-o==0,r=t&(Pe|Ie)&&n-o==0;i.isFirst=!!s,i.isFinal=!!r,s&&(e.session={}),i.eventType=t,T(e,i),e.emit("hammer.input",i),e.recognize(i),e.session.prevInput=i}function T(e,t){var i=e.session,n=t.pointers,o=n.length;i.firstInput||(i.firstInput=F(t)),o>1&&!i.firstMultiple?i.firstMultiple=F(t):1===o&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,d=t.center=N(n);t.timeStamp=_e(),t.deltaTime=t.timeStamp-s.timeStamp,t.angle=A(a,d),t.distance=R(a,d),P(i,t),t.offsetDirection=z(t.deltaX,t.deltaY);var h=B(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=h.x,t.overallVelocityY=h.y,t.overallVelocity=be(h.x)>be(h.y)?h.x:h.y,t.scale=r?L(r.pointers,n):1,t.rotation=r?j(r.pointers,n):0,t.maxPointers=i.prevInput?t.pointers.length>i.prevInput.maxPointers?t.pointers.length:i.prevInput.maxPointers:t.pointers.length,I(i,t);var l=e.element;m(t.srcEvent.target,l)&&(l=t.srcEvent.target),t.target=l}function P(e,t){var i=t.center,n=e.offsetDelta||{},o=e.prevDelta||{},s=e.prevInput||{};t.eventType!==Ce&&s.eventType!==Pe||(o=e.prevDelta={x:s.deltaX||0,y:s.deltaY||0},n=e.offsetDelta={x:i.x,y:i.y}),t.deltaX=o.x+(i.x-n.x),t.deltaY=o.y+(i.y-n.y)}function I(e,t){var i,n,o,s,r=e.lastInterval||t,d=t.timeStamp-r.timeStamp;if(t.eventType!=Ie&&(d>De||r.velocity===a)){var h=t.deltaX-r.deltaX,l=t.deltaY-r.deltaY,u=B(d,h,l);n=u.x,o=u.y,i=be(u.x)>be(u.y)?u.x:u.y,s=z(h,l),e.lastInterval=t}else i=r.velocity,n=r.velocityX,o=r.velocityY,s=r.direction;t.velocity=i,t.velocityX=n,t.velocityY=o,t.direction=s}function F(e){for(var t=[],i=0;i<e.pointers.length;)t[i]={clientX:me(e.pointers[i].clientX),clientY:me(e.pointers[i].clientY)},i++;return{timeStamp:_e(),pointers:t,center:N(t),deltaX:e.deltaX,deltaY:e.deltaY}}function N(e){var t=e.length;if(1===t)return{x:me(e[0].clientX),y:me(e[0].clientY)};for(var i=0,n=0,o=0;o<t;)i+=e[o].clientX,n+=e[o].clientY,o++;return{x:me(i/t),y:me(n/t)}}function B(e,t,i){return{x:t/e|
|