diff --git a/HISTORY.md b/HISTORY.md index 49e09d02..7a118e05 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,6 +2,24 @@ http://visjs.org +## 2016-03-08, version 4.15.1 + +## General + +- Updated all dependencies. + +### Graph2d + +- Fixed #1455: allow vertical panning of the web page on touch devices. +- Fixed #1692: Error when y-axis values are equal. + +### Timeline + +- Fixed #1455: allow vertical panning of the web page on touch devices. +- Fixed #1695: Item line and dot not correctly reckoning with the line width + when using left or right align. + + ## 2016-02-23, version 4.15.0 ### Timeline diff --git a/dist/vis.js b/dist/vis.js index 7e097494..43b53bf7 100644 --- a/dist/vis.js +++ b/dist/vis.js @@ -4,8 +4,8 @@ * * A dynamic, browser-based visualization library. * - * @version 4.15.0 - * @date 2016-02-23 + * @version 4.15.1 + * @date 2016-03-08 * * @license * Copyright (C) 2011-2016 Almende B.V, http://almende.com @@ -81,9 +81,9 @@ return /******/ (function(modules) { // webpackBootstrap /* 0 */ /***/ function(module, exports, __webpack_require__) { - // utils 'use strict'; + // utils exports.util = __webpack_require__(1); exports.DOMutil = __webpack_require__(7); @@ -107,43 +107,43 @@ return /******/ (function(modules) { // webpackBootstrap exports.Timeline = __webpack_require__(19); exports.Graph2d = __webpack_require__(48); exports.timeline = { - Core: __webpack_require__(27), - DateUtil: __webpack_require__(26), - Range: __webpack_require__(23), - stack: __webpack_require__(31), - TimeStep: __webpack_require__(29), + Core: __webpack_require__(30), + DateUtil: __webpack_require__(29), + Range: __webpack_require__(27), + stack: __webpack_require__(34), + TimeStep: __webpack_require__(32), components: { items: { - Item: __webpack_require__(33), - BackgroundItem: __webpack_require__(37), - BoxItem: __webpack_require__(35), - PointItem: __webpack_require__(36), - RangeItem: __webpack_require__(32) + Item: __webpack_require__(36), + BackgroundItem: __webpack_require__(40), + BoxItem: __webpack_require__(38), + PointItem: __webpack_require__(39), + RangeItem: __webpack_require__(35) }, - BackgroundGroup: __webpack_require__(34), - Component: __webpack_require__(25), - CurrentTime: __webpack_require__(43), - CustomTime: __webpack_require__(41), + BackgroundGroup: __webpack_require__(37), + Component: __webpack_require__(28), + CurrentTime: __webpack_require__(46), + CustomTime: __webpack_require__(44), DataAxis: __webpack_require__(50), DataScale: __webpack_require__(51), GraphGroup: __webpack_require__(52), - Group: __webpack_require__(30), - ItemSet: __webpack_require__(28), + Group: __webpack_require__(33), + ItemSet: __webpack_require__(31), Legend: __webpack_require__(56), LineGraph: __webpack_require__(49), - TimeAxis: __webpack_require__(38) + TimeAxis: __webpack_require__(41) } }; // Network exports.Network = __webpack_require__(58); exports.network = { - Images: __webpack_require__(116), - dotparser: __webpack_require__(114), - gephiParser: __webpack_require__(115), - allOptions: __webpack_require__(110) + Images: __webpack_require__(59), + dotparser: __webpack_require__(115), + gephiParser: __webpack_require__(116), + allOptions: __webpack_require__(111) }; exports.network.convertDot = function (input) { return exports.network.dotparser.DOTToGraph(input); @@ -154,20 +154,22 @@ return /******/ (function(modules) { // webpackBootstrap // bundled external libraries exports.moment = __webpack_require__(2); - exports.Hammer = __webpack_require__(20); - exports.keycharm = __webpack_require__(40); + exports.Hammer = __webpack_require__(22); + exports.keycharm = __webpack_require__(43); /***/ }, /* 1 */ /***/ function(module, exports, __webpack_require__) { + 'use strict'; + + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + // utility functions // first check if moment.js is already loaded in the browser window, if so, // use this instance. Else, load via commonjs. - 'use strict'; - var moment = __webpack_require__(2); var uuid = __webpack_require__(6); @@ -258,7 +260,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.assignAllKeys = function (obj, value) { for (var prop in obj) { if (obj.hasOwnProperty(prop)) { - if (typeof obj[prop] !== 'object') { + if (_typeof(obj[prop]) !== 'object') { obj[prop] = value; } } @@ -276,14 +278,14 @@ return /******/ (function(modules) { // webpackBootstrap for (var prop in a) { if (b[prop] !== undefined) { - if (typeof b[prop] !== 'object') { + if (_typeof(b[prop]) !== 'object') { if ((b[prop] === undefined || b[prop] === null) && a[prop] !== undefined && allowDeletion === true) { delete a[prop]; } else { a[prop] = b[prop]; } } else { - if (typeof a[prop] === 'object') { + if (_typeof(a[prop]) === 'object') { exports.fillIfDefined(a[prop], b[prop], allowDeletion); } } @@ -645,7 +647,7 @@ return /******/ (function(modules) { // webpackBootstrap * @return {String} type */ exports.getType = function (object) { - var type = typeof object; + var type = typeof object === 'undefined' ? 'undefined' : _typeof(object); if (type == 'object') { if (object === null) { @@ -1321,11 +1323,11 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {*} */ exports.selectiveBridgeObject = function (fields, referenceObject) { - if (typeof referenceObject == "object") { + if ((typeof referenceObject === 'undefined' ? 'undefined' : _typeof(referenceObject)) == "object") { var objectTo = Object.create(referenceObject); for (var i = 0; i < fields.length; i++) { if (referenceObject.hasOwnProperty(fields[i])) { - if (typeof referenceObject[fields[i]] == "object") { + if (_typeof(referenceObject[fields[i]]) == "object") { objectTo[fields[i]] = exports.bridgeObject(referenceObject[fields[i]]); } } @@ -1344,11 +1346,11 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {*} */ exports.bridgeObject = function (referenceObject) { - if (typeof referenceObject == "object") { + if ((typeof referenceObject === 'undefined' ? 'undefined' : _typeof(referenceObject)) == "object") { var objectTo = Object.create(referenceObject); for (var i in referenceObject) { if (referenceObject.hasOwnProperty(i)) { - if (typeof referenceObject[i] == "object") { + if (_typeof(referenceObject[i]) == "object") { objectTo[i] = exports.bridgeObject(referenceObject[i]); } } @@ -1571,10 +1573,10 @@ return /******/ (function(modules) { // webpackBootstrap /* 2 */ /***/ function(module, exports, __webpack_require__) { - // first check if moment.js is already loaded in the browser window, if so, - // use this instance. Else, load via commonjs. 'use strict'; + // first check if moment.js is already loaded in the browser window, if so, + // use this instance. Else, load via commonjs. module.exports = typeof window !== 'undefined' && window['moment'] || __webpack_require__(3); /***/ }, @@ -1582,7 +1584,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {//! moment.js - //! version : 2.11.2 + //! version : 2.12.0 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com @@ -1606,7 +1608,7 @@ return /******/ (function(modules) { // webpackBootstrap } function isArray(input) { - return Object.prototype.toString.call(input) === '[object Array]'; + return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; } function isDate(input) { @@ -1812,7 +1814,82 @@ return /******/ (function(modules) { // webpackBootstrap return diffs + lengthDiff; } - function Locale() { + function warn(msg) { + if (utils_hooks__hooks.suppressDeprecationWarnings === false && + (typeof console !== 'undefined') && console.warn) { + console.warn('Deprecation warning: ' + msg); + } + } + + function deprecate(msg, fn) { + var firstTime = true; + + return extend(function () { + if (firstTime) { + warn(msg + '\nArguments: ' + Array.prototype.slice.call(arguments).join(', ') + '\n' + (new Error()).stack); + firstTime = false; + } + return fn.apply(this, arguments); + }, fn); + } + + var deprecations = {}; + + function deprecateSimple(name, msg) { + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; + } + } + + utils_hooks__hooks.suppressDeprecationWarnings = false; + + function isFunction(input) { + return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; + } + + function isObject(input) { + return Object.prototype.toString.call(input) === '[object Object]'; + } + + function locale_set__set (config) { + var prop, i; + for (i in config) { + prop = config[i]; + if (isFunction(prop)) { + this[i] = prop; + } else { + this['_' + i] = prop; + } + } + this._config = config; + // Lenient ordinal parsing accepts just a number in addition to + // number + (possibly) stuff coming from _ordinalParseLenient. + this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\d{1,2}/).source); + } + + function mergeConfigs(parentConfig, childConfig) { + var res = extend({}, parentConfig), prop; + for (prop in childConfig) { + if (hasOwnProp(childConfig, prop)) { + if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { + res[prop] = {}; + extend(res[prop], parentConfig[prop]); + extend(res[prop], childConfig[prop]); + } else if (childConfig[prop] != null) { + res[prop] = childConfig[prop]; + } else { + delete res[prop]; + } + } + } + return res; + } + + function Locale(config) { + if (config != null) { + this.set(config); + } } // internal storage for locale config files @@ -1888,11 +1965,25 @@ return /******/ (function(modules) { // webpackBootstrap return globalLocale._abbr; } - function defineLocale (name, values) { - if (values !== null) { - values.abbr = name; - locales[name] = locales[name] || new Locale(); - locales[name].set(values); + function defineLocale (name, config) { + if (config !== null) { + config.abbr = name; + if (locales[name] != null) { + deprecateSimple('defineLocaleOverride', + 'use moment.updateLocale(localeName, config) to change ' + + 'an existing locale. moment.defineLocale(localeName, ' + + 'config) should only be used for creating a new locale'); + config = mergeConfigs(locales[name]._config, config); + } else if (config.parentLocale != null) { + if (locales[config.parentLocale] != null) { + config = mergeConfigs(locales[config.parentLocale]._config, config); + } else { + // treat as if there is no base config + deprecateSimple('parentLocaleUndefined', + 'specified parentLocale is not defined yet'); + } + } + locales[name] = new Locale(config); // backwards compat for now: also set the locale locale_locales__getSetGlobalLocale(name); @@ -1905,6 +1996,31 @@ return /******/ (function(modules) { // webpackBootstrap } } + function updateLocale(name, config) { + if (config != null) { + var locale; + if (locales[name] != null) { + config = mergeConfigs(locales[name]._config, config); + } + locale = new Locale(config); + locale.parentLocale = locales[name]; + locales[name] = locale; + + // backwards compat for now: also set the locale + locale_locales__getSetGlobalLocale(name); + } else { + // pass null for config to unupdate, useful for tests + if (locales[name] != null) { + if (locales[name].parentLocale != null) { + locales[name] = locales[name].parentLocale; + } else if (locales[name] != null) { + delete locales[name]; + } + } + } + return locales[name]; + } + // returns locale data function locale_locales__getLocale (key) { var locale; @@ -1929,6 +2045,10 @@ return /******/ (function(modules) { // webpackBootstrap return chooseLocale(key); } + function locale_locales__listLocales() { + return Object.keys(locales); + } + var aliases = {}; function addUnitAlias (unit, shorthand) { @@ -1957,10 +2077,6 @@ return /******/ (function(modules) { // webpackBootstrap return normalizedInput; } - function isFunction(input) { - return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; - } - function makeGetSet (unit, keepTime) { return function (value) { if (value != null) { @@ -2294,12 +2410,15 @@ return /******/ (function(modules) { // webpackBootstrap return mom; } - // TODO: Move this out of here! if (typeof value === 'string') { - value = mom.localeData().monthsParse(value); - // TODO: Another silent failure? - if (typeof value !== 'number') { - return mom; + if (/^\d+$/.test(value)) { + value = toInt(value); + } else { + value = mom.localeData().monthsParse(value); + // TODO: Another silent failure? + if (typeof value !== 'number') { + return mom; + } } } @@ -2418,36 +2537,6 @@ return /******/ (function(modules) { // webpackBootstrap return m; } - function warn(msg) { - if (utils_hooks__hooks.suppressDeprecationWarnings === false && - (typeof console !== 'undefined') && console.warn) { - console.warn('Deprecation warning: ' + msg); - } - } - - function deprecate(msg, fn) { - var firstTime = true; - - return extend(function () { - if (firstTime) { - warn(msg + '\nArguments: ' + Array.prototype.slice.call(arguments).join(', ') + '\n' + (new Error()).stack); - firstTime = false; - } - return fn.apply(this, arguments); - }, fn); - } - - var deprecations = {}; - - function deprecateSimple(name, msg) { - if (!deprecations[name]) { - warn(msg); - deprecations[name] = true; - } - } - - utils_hooks__hooks.suppressDeprecationWarnings = false; - // iso 8601 regex // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) var extendedIsoRegex = /^\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)?)?/; @@ -3093,7 +3182,7 @@ return /******/ (function(modules) { // webpackBootstrap } var prototypeMin = deprecate( - 'moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548', + 'moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548', function () { var other = local__createLocal.apply(null, arguments); if (this.isValid() && other.isValid()) { @@ -3105,7 +3194,7 @@ return /******/ (function(modules) { // webpackBootstrap ); var prototypeMax = deprecate( - 'moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548', + 'moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548', function () { var other = local__createLocal.apply(null, arguments); if (this.isValid() && other.isValid()) { @@ -3403,7 +3492,8 @@ return /******/ (function(modules) { // webpackBootstrap // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere - var isoRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/; + // and further modified to allow for strings containing both week and day + var isoRegex = /^(-)?P(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)W)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?$/; function create__createDuration (input, key) { var duration = input, @@ -3441,11 +3531,11 @@ return /******/ (function(modules) { // webpackBootstrap duration = { y : parseIso(match[2], sign), M : parseIso(match[3], sign), - d : parseIso(match[4], sign), - h : parseIso(match[5], sign), - m : parseIso(match[6], sign), - s : parseIso(match[7], sign), - w : parseIso(match[8], sign) + w : parseIso(match[4], sign), + d : parseIso(match[5], sign), + h : parseIso(match[6], sign), + m : parseIso(match[7], sign), + s : parseIso(match[8], sign) }; } else if (duration == null) {// checks for null or undefined duration = {}; @@ -3509,6 +3599,14 @@ return /******/ (function(modules) { // webpackBootstrap return res; } + function absRound (number) { + if (number < 0) { + return Math.round(-1 * number) * -1; + } else { + return Math.round(number); + } + } + // TODO: remove 'name' arg after deprecation is removed function createAdder(direction, name) { return function (val, period) { @@ -3528,8 +3626,8 @@ return /******/ (function(modules) { // webpackBootstrap function add_subtract__addSubtract (mom, duration, isAdding, updateOffset) { var milliseconds = duration._milliseconds, - days = duration._days, - months = duration._months; + days = absRound(duration._days), + months = absRound(duration._months); if (!mom.isValid()) { // No op @@ -3855,8 +3953,8 @@ return /******/ (function(modules) { // webpackBootstrap } function toJSON () { - // JSON.stringify(new Date(NaN)) === 'null' - return this.isValid() ? this.toISOString() : 'null'; + // new Date(NaN).toJSON() === null + return this.isValid() ? this.toISOString() : null; } function moment_valid__isValid () { @@ -3966,7 +4064,6 @@ return /******/ (function(modules) { // webpackBootstrap var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); - // console.log("got", weekYear, week, weekday, "set", date.toISOString()); this.year(date.getUTCFullYear()); this.month(date.getUTCMonth()); this.date(date.getUTCDate()); @@ -4676,21 +4773,6 @@ return /******/ (function(modules) { // webpackBootstrap return isFunction(format) ? format(output) : format.replace(/%s/i, output); } - function locale_set__set (config) { - var prop, i; - for (i in config) { - prop = config[i]; - if (isFunction(prop)) { - this[i] = prop; - } else { - this['_' + i] = prop; - } - } - // Lenient ordinal parsing accepts just a number in addition to - // number + (possibly) stuff coming from _ordinalParseLenient. - this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\d{1,2}/).source); - } - var prototype__proto = Locale.prototype; prototype__proto._calendar = defaultCalendar; @@ -5154,7 +5236,7 @@ return /******/ (function(modules) { // webpackBootstrap // Side effect imports - utils_hooks__hooks.version = '2.11.2'; + utils_hooks__hooks.version = '2.12.0'; setHookCallback(local__createLocal); @@ -5177,6 +5259,8 @@ return /******/ (function(modules) { // webpackBootstrap utils_hooks__hooks.monthsShort = lists__listMonthsShort; utils_hooks__hooks.weekdaysMin = lists__listWeekdaysMin; utils_hooks__hooks.defineLocale = defineLocale; + utils_hooks__hooks.updateLocale = updateLocale; + utils_hooks__hooks.locales = locale_locales__listLocales; utils_hooks__hooks.weekdaysShort = lists__listWeekdaysShort; utils_hooks__hooks.normalizeUnits = normalizeUnits; utils_hooks__hooks.relativeTimeThreshold = duration_humanize__getSetRelativeTimeThreshold; @@ -5244,7 +5328,7 @@ return /******/ (function(modules) { // webpackBootstrap // If all else fails, use Math.random(). It's fast, but is of unspecified // quality. var _rnds = new Array(16); - _rng = function () { + _rng = function _rng() { for (var i = 0, r; i < 16; i++) { if ((i & 0x03) === 0) r = Math.random() * 0x100000000; _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; @@ -5438,6 +5522,8 @@ return /******/ (function(modules) { // webpackBootstrap /* 7 */ /***/ function(module, exports) { + 'use strict'; + // DOM utility methods /** @@ -5445,8 +5531,6 @@ return /******/ (function(modules) { // webpackBootstrap * @param JSONcontainer * @private */ - 'use strict'; - exports.prepareElements = function (JSONcontainer) { // cleanup the redundant svgElements; for (var elementType in JSONcontainer) { @@ -5652,6 +5736,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + var util = __webpack_require__(1); var Queue = __webpack_require__(9); @@ -5766,7 +5852,7 @@ return /******/ (function(modules) { // webpackBootstrap }); } - if (typeof options.queue === 'object') { + if (_typeof(options.queue) === 'object') { this._queue.setOptions(options.queue); } } @@ -6577,6 +6663,8 @@ return /******/ (function(modules) { // webpackBootstrap /* 9 */ /***/ function(module, exports) { + 'use strict'; + /** * A queue * @param {Object} options @@ -6590,8 +6678,6 @@ return /******/ (function(modules) { // webpackBootstrap * Default value of max is Infinity. * @constructor */ - 'use strict'; - function Queue(options) { // options this.delay = null; @@ -6989,7 +7075,7 @@ return /******/ (function(modules) { // webpackBootstrap if (options && options.filter) { if (defaultFilter) { - filter = function (item) { + filter = function filter(item) { return defaultFilter(item) && options.filter(item); }; } else { @@ -7029,7 +7115,7 @@ return /******/ (function(modules) { // webpackBootstrap if (options && options.filter) { if (defaultFilter) { - filter = function (item) { + filter = function filter(item) { return defaultFilter(item) && options.filter(item); }; } else { @@ -7167,6 +7253,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + var Emitter = __webpack_require__(12); var DataSet = __webpack_require__(8); var DataView = __webpack_require__(10); @@ -7342,6 +7430,7 @@ return /******/ (function(modules) { // webpackBootstrap cy = this.camera.getCameraLocation().y, cz = this.camera.getCameraLocation().z, + // calculate angles sinTx = Math.sin(this.camera.getCameraRotation().x), cosTx = Math.cos(this.camera.getCameraRotation().x), @@ -7350,6 +7439,7 @@ return /******/ (function(modules) { // webpackBootstrap sinTz = Math.sin(this.camera.getCameraRotation().z), cosTz = Math.cos(this.camera.getCameraRotation().z), + // calculate translation dx = cosTy * (sinTz * (ay - cy) + cosTz * (ax - cx)) - sinTy * (az - cz), dy = sinTx * (cosTy * (az - cz) + sinTy * (sinTz * (ay - cy) + cosTz * (ax - cx))) + cosTx * (cosTz * (ay - cy) - sinTz * (ax - cx)), @@ -7402,7 +7492,7 @@ return /******/ (function(modules) { // webpackBootstrap fill = backgroundColor; stroke = 'none'; strokeWidth = 0; - } else if (typeof backgroundColor === 'object') { + } else if ((typeof backgroundColor === 'undefined' ? 'undefined' : _typeof(backgroundColor)) === 'object') { if (backgroundColor.fill !== undefined) fill = backgroundColor.fill; if (backgroundColor.stroke !== undefined) stroke = backgroundColor.stroke; if (backgroundColor.strokeWidth !== undefined) strokeWidth = backgroundColor.strokeWidth; @@ -9587,14 +9677,14 @@ return /******/ (function(modules) { // webpackBootstrap /* 13 */ /***/ function(module, exports) { + "use strict"; + /** * @prototype Point3d * @param {Number} [x] * @param {Number} [y] * @param {Number} [z] */ - "use strict"; - function Point3d(x, y, z) { this.x = x !== undefined ? x : 0; this.y = y !== undefined ? y : 0; @@ -9670,13 +9760,13 @@ return /******/ (function(modules) { // webpackBootstrap /* 14 */ /***/ function(module, exports) { + "use strict"; + /** * @prototype Point2d * @param {Number} [x] * @param {Number} [y] */ - "use strict"; - function Point2d(x, y) { this.x = x !== undefined ? x : 0; this.y = y !== undefined ? y : 0; @@ -10388,6 +10478,8 @@ return /******/ (function(modules) { // webpackBootstrap /* 18 */ /***/ function(module, exports) { + "use strict"; + /** * @prototype StepNumber * The class StepNumber is an iterator for Numbers. You provide a start and end @@ -10413,8 +10505,6 @@ return /******/ (function(modules) { // webpackBootstrap * @param {boolean} prettyStep Optional. If true, the step size is rounded * To a pretty step size (like 1, 2, 5, 10, 20, 50, ...) */ - "use strict"; - function StepNumber(start, end, step, prettyStep) { // set default values this._start = 0; @@ -10534,22 +10624,30 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; + var _Configurator = __webpack_require__(20); + + var _Configurator2 = _interopRequireDefault(_Configurator); + + var _Validator = __webpack_require__(26); + + var _Validator2 = _interopRequireDefault(_Validator); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + var Emitter = __webpack_require__(12); - var Hammer = __webpack_require__(20); + var Hammer = __webpack_require__(22); var moment = __webpack_require__(2); var util = __webpack_require__(1); var DataSet = __webpack_require__(8); var DataView = __webpack_require__(10); - var Range = __webpack_require__(23); - var Core = __webpack_require__(27); - var TimeAxis = __webpack_require__(38); - var CurrentTime = __webpack_require__(43); - var CustomTime = __webpack_require__(41); - var ItemSet = __webpack_require__(28); - - var Configurator = __webpack_require__(44); - var Validator = __webpack_require__(46)['default']; - var printStyle = __webpack_require__(46).printStyle; + var Range = __webpack_require__(27); + var Core = __webpack_require__(30); + var TimeAxis = __webpack_require__(41); + var CurrentTime = __webpack_require__(46); + var CustomTime = __webpack_require__(44); + var ItemSet = __webpack_require__(31); + + var printStyle = __webpack_require__(26).printStyle; var allOptions = __webpack_require__(47).allOptions; var configureOptions = __webpack_require__(47).configureOptions; @@ -10706,7 +10804,7 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ Timeline.prototype._createConfigurator = function () { - return new Configurator(this, this.dom.container, configureOptions); + return new _Configurator2.default(this, this.dom.container, configureOptions); }; /** @@ -10723,7 +10821,7 @@ return /******/ (function(modules) { // webpackBootstrap Timeline.prototype.setOptions = function (options) { // validate options - var errorFound = Validator.validate(options, allOptions); + var errorFound = _Validator2.default.validate(options, allOptions); if (errorFound === true) { console.log('%cErrors have been found in the supplied options object.', printStyle); } @@ -10936,18 +11034,18 @@ return /******/ (function(modules) { // webpackBootstrap var getEnd = function getEnd(item) { var end = item.data.end != undefined ? item.data.end : item.data.start; return util.convert(end, 'Date').valueOf(); - } + }; // calculate the date of the left side and right side of the items given - ; - interval = max - min; - // ms + + interval = max - min; // ms + if (interval <= 0) { interval = 10; } factor = interval / _this.props.center.width; - util.forEach(_this.itemSet.items, (function (item) { + util.forEach(_this.itemSet.items, function (item) { item.show(); item.repositionX(); @@ -10965,13 +11063,12 @@ return /******/ (function(modules) { // webpackBootstrap max = right; maxItem = item; } - }).bind(_this)); + }.bind(_this)); if (minItem && maxItem) { lhs = minItem.getWidthLeft() + 10; rhs = maxItem.getWidthRight() + 10; - delta = _this.props.center.width - lhs - rhs; - // px + delta = _this.props.center.width - lhs - rhs; // px if (delta > 0) { min = getStart(minItem) - lhs * interval / delta; // ms @@ -11075,12879 +11172,12969 @@ return /******/ (function(modules) { // webpackBootstrap /* 20 */ /***/ function(module, exports, __webpack_require__) { - // Only load hammer.js when in a browser environment - // (loading hammer.js in a node.js environment gives errors) 'use strict'; - if (typeof window !== 'undefined') { - var propagating = __webpack_require__(21); - var Hammer = window['Hammer'] || __webpack_require__(22); - module.exports = propagating(Hammer, { - preventDefault: 'mouse' - }); - } else { - module.exports = function () { - throw Error('hammer.js is only available in a browser, not in node.js.'); - }; - } - -/***/ }, -/* 21 */ -/***/ function(module, exports, __webpack_require__) { + Object.defineProperty(exports, "__esModule", { + value: true + }); - var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict'; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; - (function (factory) { - if (true) { - // AMD. Register as an anonymous module. - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else if (typeof exports === 'object') { - // Node. Does not work with strict CommonJS, but - // only CommonJS-like environments that support module.exports, - // like Node. - module.exports = factory(); - } else { - // Browser globals (root is window) - window.propagating = factory(); - } - }(function () { - var _firstTarget = null; // singleton, will contain the target element where the touch event started - var _processing = false; // singleton, true when a touch event is being handled + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - /** - * Extend an Hammer.js instance with event propagation. - * - * Features: - * - Events emitted by hammer will propagate in order from child to parent - * elements. - * - Events are extended with a function `event.stopPropagation()` to stop - * propagation to parent elements. - * - An option `preventDefault` to stop all default browser behavior. - * - * Usage: - * var hammer = propagatingHammer(new Hammer(element)); - * var hammer = propagatingHammer(new Hammer(element), {preventDefault: true}); - * - * @param {Hammer.Manager} hammer An hammer instance. - * @param {Object} [options] Available options: - * - `preventDefault: true | 'mouse' | 'touch' | 'pen'`. - * Enforce preventing the default browser behavior. - * Cannot be set to `false`. - * @return {Hammer.Manager} Returns the same hammer instance with extended - * functionality - */ - return function propagating(hammer, options) { - var _options = options || { - preventDefault: false - }; + var _ColorPicker = __webpack_require__(21); - if (hammer.Manager) { - // This looks like the Hammer constructor. - // Overload the constructors with our own. - var Hammer = hammer; + var _ColorPicker2 = _interopRequireDefault(_ColorPicker); - var PropagatingHammer = function(element, options) { - var o = Object.create(_options); - if (options) Hammer.assign(o, options); - return propagating(new Hammer(element, o), o); - }; - Hammer.assign(PropagatingHammer, Hammer); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - PropagatingHammer.Manager = function (element, options) { - var o = Object.create(_options); - if (options) Hammer.assign(o, options); - return propagating(new Hammer.Manager(element, o), o); - }; + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - return PropagatingHammer; - } + var util = __webpack_require__(1); - // create a wrapper object which will override the functions - // `on`, `off`, `destroy`, and `emit` of the hammer instance - var wrapper = Object.create(hammer); + /** + * The way this works is for all properties of this.possible options, you can supply the property name in any form to list the options. + * Boolean options are recognised as Boolean + * Number options should be written as array: [default value, min value, max value, stepsize] + * Colors should be written as array: ['color', '#ffffff'] + * Strings with should be written as array: [option1, option2, option3, ..] + * + * The options are matched with their counterparts in each of the modules and the values used in the configuration are + * + * @param parentModule | the location where parentModule.setOptions() can be called + * @param defaultContainer | the default container of the module + * @param configureOptions | the fully configured and predefined options set found in allOptions.js + * @param pixelRatio | canvas pixel ratio + */ - // attach to DOM element - var element = hammer.element; + var Configurator = function () { + function Configurator(parentModule, defaultContainer, configureOptions) { + var pixelRatio = arguments.length <= 3 || arguments[3] === undefined ? 1 : arguments[3]; - if(!element.hammer) element.hammer = []; - element.hammer.push(wrapper); + _classCallCheck(this, Configurator); - // register an event to catch the start of a gesture and store the - // target in a singleton - hammer.on('hammer.input', function (event) { - if (_options.preventDefault === true || (_options.preventDefault === event.pointerType)) { - event.preventDefault(); - } - if (event.isFirst) { - _firstTarget = event.target; - } - }); + this.parent = parentModule; + this.changedOptions = []; + this.container = defaultContainer; + this.allowCreation = false; - /** @type {Object.>} */ - wrapper._handlers = {}; + this.options = {}; + this.initialized = false; + this.popupCounter = 0; + this.defaultOptions = { + enabled: false, + filter: true, + container: undefined, + showButton: true + }; + util.extend(this.options, this.defaultOptions); - /** - * Register a handler for one or multiple events - * @param {String} events A space separated string with events - * @param {function} handler A callback function, called as handler(event) - * @returns {Hammer.Manager} Returns the hammer instance - */ - wrapper.on = function (events, handler) { - // register the handler - split(events).forEach(function (event) { - var _handlers = wrapper._handlers[event]; - if (!_handlers) { - wrapper._handlers[event] = _handlers = []; + this.configureOptions = configureOptions; + this.moduleOptions = {}; + this.domElements = []; + this.popupDiv = {}; + this.popupLimit = 5; + this.popupHistory = {}; + this.colorPicker = new _ColorPicker2.default(pixelRatio); + this.wrapper = undefined; + } - // register the static, propagated handler - hammer.on(event, propagatedHandler); - } - _handlers.push(handler); - }); + /** + * refresh all options. + * Because all modules parse their options by themselves, we just use their options. We copy them here. + * + * @param options + */ - return wrapper; - }; - /** - * Unregister a handler for one or multiple events - * @param {String} events A space separated string with events - * @param {function} [handler] Optional. The registered handler. If not - * provided, all handlers for given events - * are removed. - * @returns {Hammer.Manager} Returns the hammer instance - */ - wrapper.off = function (events, handler) { - // unregister the handler - split(events).forEach(function (event) { - var _handlers = wrapper._handlers[event]; - if (_handlers) { - _handlers = handler ? _handlers.filter(function (h) { - return h !== handler; - }) : []; + _createClass(Configurator, [{ + key: 'setOptions', + value: function setOptions(options) { + if (options !== undefined) { + // reset the popup history because the indices may have been changed. + this.popupHistory = {}; + this._removePopup(); - if (_handlers.length > 0) { - wrapper._handlers[event] = _handlers; + var enabled = true; + if (typeof options === 'string') { + this.options.filter = options; + } else if (options instanceof Array) { + this.options.filter = options.join(); + } else if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') { + if (options.container !== undefined) { + this.options.container = options.container; } - else { - // remove static, propagated handler - hammer.off(event, propagatedHandler); - delete wrapper._handlers[event]; + if (options.filter !== undefined) { + this.options.filter = options.filter; + } + if (options.showButton !== undefined) { + this.options.showButton = options.showButton; + } + if (options.enabled !== undefined) { + enabled = options.enabled; } + } else if (typeof options === 'boolean') { + this.options.filter = true; + enabled = options; + } else if (typeof options === 'function') { + this.options.filter = options; + enabled = true; + } + if (this.options.filter === false) { + enabled = false; } - }); - return wrapper; - }; + this.options.enabled = enabled; + } + this._clean(); + } + }, { + key: 'setModuleOptions', + value: function setModuleOptions(moduleOptions) { + this.moduleOptions = moduleOptions; + if (this.options.enabled === true) { + this._clean(); + if (this.options.container !== undefined) { + this.container = this.options.container; + } + this._create(); + } + } /** - * Emit to the event listeners - * @param {string} eventType - * @param {Event} event + * Create all DOM elements + * @private */ - wrapper.emit = function(eventType, event) { - _firstTarget = event.target; - hammer.emit(eventType, event); - }; - wrapper.destroy = function () { - // Detach from DOM element - var hammers = hammer.element.hammer; - var idx = hammers.indexOf(wrapper); - if(idx !== -1) hammers.splice(idx,1); - if(!hammers.length) delete hammer.element.hammer; + }, { + key: '_create', + value: function _create() { + var _this = this; - // clear all handlers - wrapper._handlers = {}; + this._clean(); + this.changedOptions = []; - // call original hammer destroy - hammer.destroy(); - }; + var filter = this.options.filter; + var counter = 0; + var show = false; + for (var option in this.configureOptions) { + if (this.configureOptions.hasOwnProperty(option)) { + this.allowCreation = false; + show = false; + if (typeof filter === 'function') { + show = filter(option, []); + show = show || this._handleObject(this.configureOptions[option], [option], true); + } else if (filter === true || filter.indexOf(option) !== -1) { + show = true; + } - // split a string with space separated words - function split(events) { - return events.match(/[^ ]+/g); - } + if (show !== false) { + this.allowCreation = true; - /** - * A static event handler, applying event propagation. - * @param {Object} event - */ - function propagatedHandler(event) { - // let only a single hammer instance handle this event - if (event.type !== 'hammer.input') { - // it is possible that the same srcEvent is used with multiple hammer events, - // we keep track on which events are handled in an object _handled - if (!event.srcEvent._handled) { - event.srcEvent._handled = {}; - } + // linebreak between categories + if (counter > 0) { + this._makeItem([]); + } + // a header for the category + this._makeHeader(option); - if (event.srcEvent._handled[event.type]) { - return; - } - else { - event.srcEvent._handled[event.type] = true; + // get the sub options + this._handleObject(this.configureOptions[option], [option]); + } + counter++; } } - // attach a stopPropagation function to the event - var stopped = false; - event.stopPropagation = function () { - stopped = true; - }; + if (this.options.showButton === true) { + (function () { + var generateButton = document.createElement('div'); + generateButton.className = 'vis-configuration vis-config-button'; + generateButton.innerHTML = 'generate options'; + generateButton.onclick = function () { + _this._printOptions(); + }; + generateButton.onmouseover = function () { + generateButton.className = 'vis-configuration vis-config-button hover'; + }; + generateButton.onmouseout = function () { + generateButton.className = 'vis-configuration vis-config-button'; + }; - //wrap the srcEvent's stopPropagation to also stop hammer propagation: - var srcStop = event.srcEvent.stopPropagation; - if(typeof srcStop == "function") { - event.srcEvent.stopPropagation = function(){ - srcStop(); - event.stopPropagation(); - } + _this.optionsContainer = document.createElement('div'); + _this.optionsContainer.className = 'vis-configuration vis-config-option-container'; + + _this.domElements.push(_this.optionsContainer); + _this.domElements.push(generateButton); + })(); } - // attach firstTarget property to the event - event.firstTarget = _firstTarget; + this._push(); + //~ this.colorPicker.insertTo(this.container); + } - // propagate over all elements (until stopped) - var elem = _firstTarget; - while (elem && !stopped) { - var elemHammer = elem.hammer; - if(elemHammer){ - var _handlers; - for(var k = 0; k < elemHammer.length; k++){ - _handlers = elemHammer[k]._handlers[event.type]; - if(_handlers) for (var i = 0; i < _handlers.length && !stopped; i++) { - _handlers[i](event); - } - } - } - elem = elem.parentNode; + /** + * draw all DOM elements on the screen + * @private + */ + + }, { + key: '_push', + value: function _push() { + this.wrapper = document.createElement('div'); + this.wrapper.className = 'vis-configuration-wrapper'; + this.container.appendChild(this.wrapper); + for (var i = 0; i < this.domElements.length; i++) { + this.wrapper.appendChild(this.domElements[i]); } + + this._showPopupIfNeeded(); } - return wrapper; - }; - })); + /** + * delete all DOM elements + * @private + */ + }, { + key: '_clean', + value: function _clean() { + for (var i = 0; i < this.domElements.length; i++) { + this.wrapper.removeChild(this.domElements[i]); + } -/***/ }, -/* 22 */ -/***/ function(module, exports, __webpack_require__) { + if (this.wrapper !== undefined) { + this.container.removeChild(this.wrapper); + this.wrapper = undefined; + } + this.domElements = []; - var __WEBPACK_AMD_DEFINE_RESULT__;/*! Hammer.JS - v2.0.6 - 2015-12-23 - * http://hammerjs.github.io/ - * - * Copyright (c) 2015 Jorik Tangelder; - * Licensed under the license */ - (function(window, document, exportName, undefined) { - 'use strict'; + this._removePopup(); + } - var VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o']; - var TEST_ELEMENT = document.createElement('div'); + /** + * get the value from the actualOptions if it exists + * @param {array} path | where to look for the actual option + * @returns {*} + * @private + */ - var TYPE_FUNCTION = 'function'; + }, { + key: '_getValue', + value: function _getValue(path) { + var base = this.moduleOptions; + for (var i = 0; i < path.length; i++) { + if (base[path[i]] !== undefined) { + base = base[path[i]]; + } else { + base = undefined; + break; + } + } + return base; + } - var round = Math.round; - var abs = Math.abs; - var now = Date.now; + /** + * all option elements are wrapped in an item + * @param path + * @param domElements + * @private + */ - /** - * set a timeout with a given scope - * @param {Function} fn - * @param {Number} timeout - * @param {Object} context - * @returns {number} - */ - function setTimeoutContext(fn, timeout, context) { - return setTimeout(bindFn(fn, context), timeout); - } + }, { + key: '_makeItem', + value: function _makeItem(path) { + var _arguments = arguments, + _this2 = this; - /** - * if the argument is an array, we want to execute the fn on each entry - * if it aint an array we don't want to do a thing. - * this is used by all the methods that accept a single and array argument. - * @param {*|Array} arg - * @param {String} fn - * @param {Object} [context] - * @returns {Boolean} - */ - function invokeArrayArg(arg, fn, context) { - if (Array.isArray(arg)) { - each(arg, context[fn], context); - return true; + if (this.allowCreation === true) { + var _len, domElements, _key; + + var _ret2 = function () { + var item = document.createElement('div'); + item.className = 'vis-configuration vis-config-item vis-config-s' + path.length; + + for (_len = _arguments.length, domElements = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + domElements[_key - 1] = _arguments[_key]; + } + + domElements.forEach(function (element) { + item.appendChild(element); + }); + _this2.domElements.push(item); + return { + v: _this2.domElements.length + }; + }(); + + if ((typeof _ret2 === 'undefined' ? 'undefined' : _typeof(_ret2)) === "object") return _ret2.v; + } + return 0; } - return false; - } - /** - * walk objects and arrays - * @param {Object} obj - * @param {Function} iterator - * @param {Object} context - */ - function each(obj, iterator, context) { - var i; + /** + * header for major subjects + * @param name + * @private + */ - if (!obj) { - return; + }, { + key: '_makeHeader', + value: function _makeHeader(name) { + var div = document.createElement('div'); + div.className = 'vis-configuration vis-config-header'; + div.innerHTML = name; + this._makeItem([], div); } - if (obj.forEach) { - obj.forEach(iterator, context); - } else if (obj.length !== undefined) { - i = 0; - while (i < obj.length) { - iterator.call(context, obj[i], i, obj); - i++; - } - } else { - for (i in obj) { - obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj); - } + /** + * make a label, if it is an object label, it gets different styling. + * @param name + * @param path + * @param objectLabel + * @returns {HTMLElement} + * @private + */ + + }, { + key: '_makeLabel', + value: function _makeLabel(name, path) { + var objectLabel = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; + + var div = document.createElement('div'); + div.className = 'vis-configuration vis-config-label vis-config-s' + path.length; + if (objectLabel === true) { + div.innerHTML = '' + name + ':'; + } else { + div.innerHTML = name + ':'; + } + return div; } - } - /** - * wrap a method with a deprecation warning and stack trace - * @param {Function} method - * @param {String} name - * @param {String} message - * @returns {Function} A new function wrapping the supplied method. - */ - function deprecate(method, name, message) { - var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\n' + message + ' AT \n'; - return function() { - var e = new Error('get-stack-trace'); - var stack = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, '') - .replace(/^\s+at\s+/gm, '') - .replace(/^Object.\s*\(/gm, '{anonymous}()@') : 'Unknown Stack Trace'; + /** + * make a dropdown list for multiple possible string optoins + * @param arr + * @param value + * @param path + * @private + */ - var log = window.console && (window.console.warn || window.console.log); - if (log) { - log.call(window.console, deprecationMessage, stack); + }, { + key: '_makeDropdown', + value: function _makeDropdown(arr, value, path) { + var select = document.createElement('select'); + select.className = 'vis-configuration vis-config-select'; + var selectedValue = 0; + if (value !== undefined) { + if (arr.indexOf(value) !== -1) { + selectedValue = arr.indexOf(value); } - return method.apply(this, arguments); - }; - } + } - /** - * extend object. - * means that properties in dest will be overwritten by the ones in src. - * @param {Object} target - * @param {...Object} objects_to_assign - * @returns {Object} target - */ - var assign; - if (typeof Object.assign !== 'function') { - assign = function assign(target) { - if (target === undefined || target === null) { - throw new TypeError('Cannot convert undefined or null to object'); + for (var i = 0; i < arr.length; i++) { + var option = document.createElement('option'); + option.value = arr[i]; + if (i === selectedValue) { + option.selected = 'selected'; } + option.innerHTML = arr[i]; + select.appendChild(option); + } - var output = Object(target); - for (var index = 1; index < arguments.length; index++) { - var source = arguments[index]; - if (source !== undefined && source !== null) { - for (var nextKey in source) { - if (source.hasOwnProperty(nextKey)) { - output[nextKey] = source[nextKey]; - } - } - } - } - return output; - }; - } else { - assign = Object.assign; - } + var me = this; + select.onchange = function () { + me._update(this.value, path); + }; - /** - * extend object. - * means that properties in dest will be overwritten by the ones in src. - * @param {Object} dest - * @param {Object} src - * @param {Boolean=false} [merge] - * @returns {Object} dest - */ - var extend = deprecate(function extend(dest, src, merge) { - var keys = Object.keys(src); - var i = 0; - while (i < keys.length) { - if (!merge || (merge && dest[keys[i]] === undefined)) { - dest[keys[i]] = src[keys[i]]; - } - i++; + var label = this._makeLabel(path[path.length - 1], path); + this._makeItem(path, label, select); } - return dest; - }, 'extend', 'Use `assign`.'); - /** - * merge the values from src in the dest. - * means that properties that exist in dest will not be overwritten by src - * @param {Object} dest - * @param {Object} src - * @returns {Object} dest - */ - var merge = deprecate(function merge(dest, src) { - return extend(dest, src, true); - }, 'merge', 'Use `assign`.'); + /** + * make a range object for numeric options + * @param arr + * @param value + * @param path + * @private + */ - /** - * simple class inheritance - * @param {Function} child - * @param {Function} base - * @param {Object} [properties] - */ - function inherit(child, base, properties) { - var baseP = base.prototype, - childP; + }, { + key: '_makeRange', + value: function _makeRange(arr, value, path) { + var defaultValue = arr[0]; + var min = arr[1]; + var max = arr[2]; + var step = arr[3]; + var range = document.createElement('input'); + range.className = 'vis-configuration vis-config-range'; + try { + range.type = 'range'; // not supported on IE9 + range.min = min; + range.max = max; + } catch (err) {} + range.step = step; - childP = child.prototype = Object.create(baseP); - childP.constructor = child; - childP._super = baseP; + // set up the popup settings in case they are needed. + var popupString = ''; + var popupValue = 0; - if (properties) { - assign(childP, properties); - } - } + if (value !== undefined) { + var factor = 1.20; + if (value < 0 && value * factor < min) { + range.min = Math.ceil(value * factor); + popupValue = range.min; + popupString = 'range increased'; + } else if (value / factor < min) { + range.min = Math.ceil(value / factor); + popupValue = range.min; + popupString = 'range increased'; + } + if (value * factor > max && max !== 1) { + range.max = Math.ceil(value * factor); + popupValue = range.max; + popupString = 'range increased'; + } + range.value = value; + } else { + range.value = defaultValue; + } - /** - * simple function bind - * @param {Function} fn - * @param {Object} context - * @returns {Function} - */ - function bindFn(fn, context) { - return function boundFn() { - return fn.apply(context, arguments); - }; - } + var input = document.createElement('input'); + input.className = 'vis-configuration vis-config-rangeinput'; + input.value = range.value; - /** - * let a boolean value also be a function that must return a boolean - * this first item in args will be used as the context - * @param {Boolean|Function} val - * @param {Array} [args] - * @returns {Boolean} - */ - function boolOrFn(val, args) { - if (typeof val == TYPE_FUNCTION) { - return val.apply(args ? args[0] || undefined : undefined, args); - } - return val; - } + var me = this; + range.onchange = function () { + input.value = this.value;me._update(Number(this.value), path); + }; + range.oninput = function () { + input.value = this.value; + }; - /** - * use the val2 when val1 is undefined - * @param {*} val1 - * @param {*} val2 - * @returns {*} - */ - function ifUndefined(val1, val2) { - return (val1 === undefined) ? val2 : val1; - } + var label = this._makeLabel(path[path.length - 1], path); + var itemIndex = this._makeItem(path, label, range, input); - /** - * addEventListener with multiple events at once - * @param {EventTarget} target - * @param {String} types - * @param {Function} handler - */ - function addEventListeners(target, types, handler) { - each(splitStr(types), function(type) { - target.addEventListener(type, handler, false); - }); - } + // if a popup is needed AND it has not been shown for this value, show it. + if (popupString !== '' && this.popupHistory[itemIndex] !== popupValue) { + this.popupHistory[itemIndex] = popupValue; + this._setupPopup(popupString, itemIndex); + } + } - /** - * removeEventListener with multiple events at once - * @param {EventTarget} target - * @param {String} types - * @param {Function} handler - */ - function removeEventListeners(target, types, handler) { - each(splitStr(types), function(type) { - target.removeEventListener(type, handler, false); - }); - } + /** + * prepare the popup + * @param string + * @param index + * @private + */ - /** - * find if a node is in the given parent - * @method hasParent - * @param {HTMLElement} node - * @param {HTMLElement} parent - * @return {Boolean} found - */ - function hasParent(node, parent) { - while (node) { - if (node == parent) { - return true; - } - node = node.parentNode; + }, { + key: '_setupPopup', + value: function _setupPopup(string, index) { + var _this3 = this; + + if (this.initialized === true && this.allowCreation === true && this.popupCounter < this.popupLimit) { + var div = document.createElement("div"); + div.id = "vis-configuration-popup"; + div.className = "vis-configuration-popup"; + div.innerHTML = string; + div.onclick = function () { + _this3._removePopup(); + }; + this.popupCounter += 1; + this.popupDiv = { html: div, index: index }; + } } - return false; - } - /** - * small indexOf wrapper - * @param {String} str - * @param {String} find - * @returns {Boolean} found - */ - function inStr(str, find) { - return str.indexOf(find) > -1; - } + /** + * remove the popup from the dom + * @private + */ - /** - * split string on whitespace - * @param {String} str - * @returns {Array} words - */ - function splitStr(str) { - return str.trim().split(/\s+/g); - } + }, { + key: '_removePopup', + value: function _removePopup() { + if (this.popupDiv.html !== undefined) { + this.popupDiv.html.parentNode.removeChild(this.popupDiv.html); + clearTimeout(this.popupDiv.hideTimeout); + clearTimeout(this.popupDiv.deleteTimeout); + this.popupDiv = {}; + } + } - /** - * find if a array contains the object using indexOf or a simple polyFill - * @param {Array} src - * @param {String} find - * @param {String} [findByKey] - * @return {Boolean|Number} false when not found, or the index - */ - function inArray(src, find, findByKey) { - if (src.indexOf && !findByKey) { - return src.indexOf(find); - } else { - var i = 0; - while (i < src.length) { - if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) { - return i; + /** + * Show the popup if it is needed. + * @private + */ + + }, { + key: '_showPopupIfNeeded', + value: function _showPopupIfNeeded() { + var _this4 = this; + + if (this.popupDiv.html !== undefined) { + var correspondingElement = this.domElements[this.popupDiv.index]; + var rect = correspondingElement.getBoundingClientRect(); + this.popupDiv.html.style.left = rect.left + "px"; + this.popupDiv.html.style.top = rect.top - 30 + "px"; // 30 is the height; + document.body.appendChild(this.popupDiv.html); + this.popupDiv.hideTimeout = setTimeout(function () { + _this4.popupDiv.html.style.opacity = 0; + }, 1500); + this.popupDiv.deleteTimeout = setTimeout(function () { + _this4._removePopup(); + }, 1800); + } + } + + /** + * make a checkbox for boolean options. + * @param defaultValue + * @param value + * @param path + * @private + */ + + }, { + key: '_makeCheckbox', + value: function _makeCheckbox(defaultValue, value, path) { + var checkbox = document.createElement('input'); + checkbox.type = 'checkbox'; + checkbox.className = 'vis-configuration vis-config-checkbox'; + checkbox.checked = defaultValue; + if (value !== undefined) { + checkbox.checked = value; + if (value !== defaultValue) { + if ((typeof defaultValue === 'undefined' ? 'undefined' : _typeof(defaultValue)) === 'object') { + if (value !== defaultValue.enabled) { + this.changedOptions.push({ path: path, value: value }); } - i++; + } else { + this.changedOptions.push({ path: path, value: value }); + } } - return -1; + } + + var me = this; + checkbox.onchange = function () { + me._update(this.checked, path); + }; + + var label = this._makeLabel(path[path.length - 1], path); + this._makeItem(path, label, checkbox); } - } - /** - * convert array-like objects to real arrays - * @param {Object} obj - * @returns {Array} - */ - function toArray(obj) { - return Array.prototype.slice.call(obj, 0); - } + /** + * make a text input field for string options. + * @param defaultValue + * @param value + * @param path + * @private + */ - /** - * unique array with objects based on a key (like 'id') or just by the array's value - * @param {Array} src [{id:1},{id:2},{id:1}] - * @param {String} [key] - * @param {Boolean} [sort=False] - * @returns {Array} [{id:1},{id:2}] - */ - function uniqueArray(src, key, sort) { - var results = []; - var values = []; - var i = 0; + }, { + key: '_makeTextInput', + value: function _makeTextInput(defaultValue, value, path) { + var checkbox = document.createElement('input'); + checkbox.type = 'text'; + checkbox.className = 'vis-configuration vis-config-text'; + checkbox.value = value; + if (value !== defaultValue) { + this.changedOptions.push({ path: path, value: value }); + } - while (i < src.length) { - var val = key ? src[i][key] : src[i]; - if (inArray(values, val) < 0) { - results.push(src[i]); - } - values[i] = val; - i++; - } + var me = this; + checkbox.onchange = function () { + me._update(this.value, path); + }; - if (sort) { - if (!key) { - results = results.sort(); - } else { - results = results.sort(function sortUniqueArray(a, b) { - return a[key] > b[key]; - }); - } + var label = this._makeLabel(path[path.length - 1], path); + this._makeItem(path, label, checkbox); } - return results; - } + /** + * make a color field with a color picker for color fields + * @param arr + * @param value + * @param path + * @private + */ - /** - * get the prefixed property - * @param {Object} obj - * @param {String} property - * @returns {String|Undefined} prefixed - */ - function prefixed(obj, property) { - var prefix, prop; - var camelProp = property[0].toUpperCase() + property.slice(1); + }, { + key: '_makeColorField', + value: function _makeColorField(arr, value, path) { + var _this5 = this; - var i = 0; - while (i < VENDOR_PREFIXES.length) { - prefix = VENDOR_PREFIXES[i]; - prop = (prefix) ? prefix + camelProp : property; + var defaultColor = arr[1]; + var div = document.createElement('div'); + value = value === undefined ? defaultColor : value; - if (prop in obj) { - return prop; - } - i++; - } - return undefined; - } + if (value !== 'none') { + div.className = 'vis-configuration vis-config-colorBlock'; + div.style.backgroundColor = value; + } else { + div.className = 'vis-configuration vis-config-colorBlock none'; + } - /** - * get a unique id - * @returns {number} uniqueId - */ - var _uniqueId = 1; - function uniqueId() { - return _uniqueId++; - } + value = value === undefined ? defaultColor : value; + div.onclick = function () { + _this5._showColorPicker(value, div, path); + }; - /** - * get the window object of an element - * @param {HTMLElement} element - * @returns {DocumentView|Window} - */ - function getWindowForElement(element) { - var doc = element.ownerDocument || element; - return (doc.defaultView || doc.parentWindow || window); - } + var label = this._makeLabel(path[path.length - 1], path); + this._makeItem(path, label, div); + } - var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i; + /** + * used by the color buttons to call the color picker. + * @param event + * @param value + * @param div + * @param path + * @private + */ - var SUPPORT_TOUCH = ('ontouchstart' in window); - var SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined; - var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent); + }, { + key: '_showColorPicker', + value: function _showColorPicker(value, div, path) { + var _this6 = this; - var INPUT_TYPE_TOUCH = 'touch'; - var INPUT_TYPE_PEN = 'pen'; - var INPUT_TYPE_MOUSE = 'mouse'; - var INPUT_TYPE_KINECT = 'kinect'; + // clear the callback from this div + div.onclick = function () {}; - var COMPUTE_INTERVAL = 25; + this.colorPicker.insertTo(div); + this.colorPicker.show(); - var INPUT_START = 1; - var INPUT_MOVE = 2; - var INPUT_END = 4; - var INPUT_CANCEL = 8; + this.colorPicker.setColor(value); + this.colorPicker.setUpdateCallback(function (color) { + var colorString = 'rgba(' + color.r + ',' + color.g + ',' + color.b + ',' + color.a + ')'; + div.style.backgroundColor = colorString; + _this6._update(colorString, path); + }); - var DIRECTION_NONE = 1; - var DIRECTION_LEFT = 2; - var DIRECTION_RIGHT = 4; - var DIRECTION_UP = 8; - var DIRECTION_DOWN = 16; + // on close of the colorpicker, restore the callback. + this.colorPicker.setCloseCallback(function () { + div.onclick = function () { + _this6._showColorPicker(value, div, path); + }; + }); + } - var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT; - var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN; - var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL; + /** + * parse an object and draw the correct items + * @param obj + * @param path + * @private + */ - var PROPS_XY = ['x', 'y']; - var PROPS_CLIENT_XY = ['clientX', 'clientY']; + }, { + key: '_handleObject', + value: function _handleObject(obj) { + var path = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1]; + var checkOnly = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; - /** - * create new input type manager - * @param {Manager} manager - * @param {Function} callback - * @returns {Input} - * @constructor - */ - function Input(manager, callback) { - var self = this; - this.manager = manager; - this.callback = callback; - this.element = manager.element; - this.target = manager.options.inputTarget; + var show = false; + var filter = this.options.filter; + var visibleInSet = false; + for (var subObj in obj) { + if (obj.hasOwnProperty(subObj)) { + show = true; + var item = obj[subObj]; + var newPath = util.copyAndExtendArray(path, subObj); + if (typeof filter === 'function') { + show = filter(subObj, path); - // smaller wrapper around the handler, for the scope and the enabled state of the manager, - // so when disabled the input events are completely bypassed. - this.domHandler = function(ev) { - if (boolOrFn(manager.options.enable, [manager])) { - self.handler(ev); - } - }; + // if needed we must go deeper into the object. + if (show === false) { + if (!(item instanceof Array) && typeof item !== 'string' && typeof item !== 'boolean' && item instanceof Object) { + this.allowCreation = false; + show = this._handleObject(item, newPath, true); + this.allowCreation = checkOnly === false; + } + } + } - this.init(); + if (show !== false) { + visibleInSet = true; + var value = this._getValue(newPath); - } + if (item instanceof Array) { + this._handleArray(item, value, newPath); + } else if (typeof item === 'string') { + this._makeTextInput(item, value, newPath); + } else if (typeof item === 'boolean') { + this._makeCheckbox(item, value, newPath); + } else if (item instanceof Object) { + // collapse the physics options that are not enabled + var draw = true; + if (path.indexOf('physics') !== -1) { + if (this.moduleOptions.physics.solver !== subObj) { + draw = false; + } + } - Input.prototype = { - /** - * should handle the inputEvent data and trigger the callback - * @virtual - */ - handler: function() { }, + if (draw === true) { + // initially collapse options with an disabled enabled option. + if (item.enabled !== undefined) { + var enabledPath = util.copyAndExtendArray(newPath, 'enabled'); + var enabledValue = this._getValue(enabledPath); + if (enabledValue === true) { + var label = this._makeLabel(subObj, newPath, true); + this._makeItem(newPath, label); + visibleInSet = this._handleObject(item, newPath) || visibleInSet; + } else { + this._makeCheckbox(item, enabledValue, newPath); + } + } else { + var _label = this._makeLabel(subObj, newPath, true); + this._makeItem(newPath, _label); + visibleInSet = this._handleObject(item, newPath) || visibleInSet; + } + } + } else { + console.error('dont know how to handle', item, subObj, newPath); + } + } + } + } + return visibleInSet; + } /** - * bind the events + * handle the array type of option + * @param optionName + * @param arr + * @param value + * @param path + * @private */ - init: function() { - this.evEl && addEventListeners(this.element, this.evEl, this.domHandler); - this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler); - this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); - }, + + }, { + key: '_handleArray', + value: function _handleArray(arr, value, path) { + if (typeof arr[0] === 'string' && arr[0] === 'color') { + this._makeColorField(arr, value, path); + if (arr[1] !== value) { + this.changedOptions.push({ path: path, value: value }); + } + } else if (typeof arr[0] === 'string') { + this._makeDropdown(arr, value, path); + if (arr[0] !== value) { + this.changedOptions.push({ path: path, value: value }); + } + } else if (typeof arr[0] === 'number') { + this._makeRange(arr, value, path); + if (arr[0] !== value) { + this.changedOptions.push({ path: path, value: Number(value) }); + } + } + } /** - * unbind the events + * called to update the network with the new settings. + * @param value + * @param path + * @private */ - destroy: function() { - this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler); - this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler); - this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); - } - }; - /** - * create new input type manager - * called by the Manager constructor - * @param {Hammer} manager - * @returns {Input} - */ - function createInputInstance(manager) { - var Type; - var inputClass = manager.options.inputClass; + }, { + key: '_update', + value: function _update(value, path) { + var options = this._constructOptions(value, path); - if (inputClass) { - Type = inputClass; - } else if (SUPPORT_POINTER_EVENTS) { - Type = PointerEventInput; - } else if (SUPPORT_ONLY_TOUCH) { - Type = TouchInput; - } else if (!SUPPORT_TOUCH) { - Type = MouseInput; - } else { - Type = TouchMouseInput; + if (this.parent.body && this.parent.body.emitter && this.parent.body.emitter.emit) { + this.parent.body.emitter.emit("configChange", options); + } + this.initialized = true; + this.parent.setOptions(options); } - return new (Type)(manager, inputHandler); - } + }, { + key: '_constructOptions', + value: function _constructOptions(value, path) { + var optionsObj = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; - /** - * handle input events - * @param {Manager} manager - * @param {String} eventType - * @param {Object} input - */ - function inputHandler(manager, eventType, input) { - var pointersLen = input.pointers.length; - var changedPointersLen = input.changedPointers.length; - var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0)); - var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0)); + var pointer = optionsObj; - input.isFirst = !!isFirst; - input.isFinal = !!isFinal; + // when dropdown boxes can be string or boolean, we typecast it into correct types + value = value === 'true' ? true : value; + value = value === 'false' ? false : value; - if (isFirst) { - manager.session = {}; + for (var i = 0; i < path.length; i++) { + if (path[i] !== 'global') { + if (pointer[path[i]] === undefined) { + pointer[path[i]] = {}; + } + if (i !== path.length - 1) { + pointer = pointer[path[i]]; + } else { + pointer[path[i]] = value; + } + } + } + return optionsObj; + } + }, { + key: '_printOptions', + value: function _printOptions() { + var options = this.getOptions(); + this.optionsContainer.innerHTML = '
var options = ' + JSON.stringify(options, null, 2) + '
'; + } + }, { + key: 'getOptions', + value: function getOptions() { + var options = {}; + for (var i = 0; i < this.changedOptions.length; i++) { + this._constructOptions(this.changedOptions[i].value, this.changedOptions[i].path, options); + } + return options; } + }]); - // source event is the normalized value of the domEvents - // like 'touchstart, mouseup, pointerdown' - input.eventType = eventType; + return Configurator; + }(); - // compute scale, rotation etc - computeInputData(manager, input); + exports.default = Configurator; - // emit secret event - manager.emit('hammer.input', input); +/***/ }, +/* 21 */ +/***/ function(module, exports, __webpack_require__) { - manager.recognize(input); - manager.session.prevInput = input; - } + 'use strict'; - /** - * extend the data with some usable properties like scale, rotate, velocity etc - * @param {Object} manager - * @param {Object} input - */ - function computeInputData(manager, input) { - var session = manager.session; - var pointers = input.pointers; - var pointersLength = pointers.length; + Object.defineProperty(exports, "__esModule", { + value: true + }); - // store the first input to calculate the distance and direction - if (!session.firstInput) { - session.firstInput = simpleCloneInputData(input); - } + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - // to compute scale and rotation we need to store the multiple touches - if (pointersLength > 1 && !session.firstMultiple) { - session.firstMultiple = simpleCloneInputData(input); - } else if (pointersLength === 1) { - session.firstMultiple = false; - } - - var firstInput = session.firstInput; - var firstMultiple = session.firstMultiple; - var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center; - - var center = input.center = getCenter(pointers); - input.timeStamp = now(); - input.deltaTime = input.timeStamp - firstInput.timeStamp; + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - input.angle = getAngle(offsetCenter, center); - input.distance = getDistance(offsetCenter, center); + var Hammer = __webpack_require__(22); + var hammerUtil = __webpack_require__(25); + var util = __webpack_require__(1); - computeDeltaXY(session, input); - input.offsetDirection = getDirection(input.deltaX, input.deltaY); + var ColorPicker = function () { + function ColorPicker() { + var pixelRatio = arguments.length <= 0 || arguments[0] === undefined ? 1 : arguments[0]; - var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY); - input.overallVelocityX = overallVelocity.x; - input.overallVelocityY = overallVelocity.y; - input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y; + _classCallCheck(this, ColorPicker); - input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1; - input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0; + this.pixelRatio = pixelRatio; + this.generated = false; + this.centerCoordinates = { x: 289 / 2, y: 289 / 2 }; + this.r = 289 * 0.49; + this.color = { r: 255, g: 255, b: 255, a: 1.0 }; + this.hueCircle = undefined; + this.initialColor = { r: 255, g: 255, b: 255, a: 1.0 }; + this.previousColor = undefined; + this.applied = false; - input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length > - session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers); + // bound by + this.updateCallback = function () {}; + this.closeCallback = function () {}; - computeIntervalInputData(session, input); + // create all DOM elements + this._create(); + } - // find the correct target - var target = manager.element; - if (hasParent(input.srcEvent.target, target)) { - target = input.srcEvent.target; - } - input.target = target; - } + /** + * this inserts the colorPicker into a div from the DOM + * @param container + */ - function computeDeltaXY(session, input) { - var center = input.center; - var offset = session.offsetDelta || {}; - var prevDelta = session.prevDelta || {}; - var prevInput = session.prevInput || {}; - if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) { - prevDelta = session.prevDelta = { - x: prevInput.deltaX || 0, - y: prevInput.deltaY || 0 - }; + _createClass(ColorPicker, [{ + key: 'insertTo', + value: function insertTo(container) { + if (this.hammer !== undefined) { + this.hammer.destroy(); + this.hammer = undefined; + } + this.container = container; + this.container.appendChild(this.frame); + this._bindHammer(); - offset = session.offsetDelta = { - x: center.x, - y: center.y - }; + this._setSize(); } - input.deltaX = prevDelta.x + (center.x - offset.x); - input.deltaY = prevDelta.y + (center.y - offset.y); - } - - /** - * velocity is calculated every x ms - * @param {Object} session - * @param {Object} input - */ - function computeIntervalInputData(session, input) { - var last = session.lastInterval || input, - deltaTime = input.timeStamp - last.timeStamp, - velocity, velocityX, velocityY, direction; - - if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) { - var deltaX = input.deltaX - last.deltaX; - var deltaY = input.deltaY - last.deltaY; - - var v = getVelocity(deltaTime, deltaX, deltaY); - velocityX = v.x; - velocityY = v.y; - velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y; - direction = getDirection(deltaX, deltaY); + /** + * the callback is executed on apply and save. Bind it to the application + * @param callback + */ - session.lastInterval = input; - } else { - // use latest velocity info if it doesn't overtake a minimum period - velocity = last.velocity; - velocityX = last.velocityX; - velocityY = last.velocityY; - direction = last.direction; + }, { + key: 'setUpdateCallback', + value: function setUpdateCallback(callback) { + if (typeof callback === 'function') { + this.updateCallback = callback; + } else { + throw new Error("Function attempted to set as colorPicker update callback is not a function."); + } } - input.velocity = velocity; - input.velocityX = velocityX; - input.velocityY = velocityY; - input.direction = direction; - } + /** + * the callback is executed on apply and save. Bind it to the application + * @param callback + */ - /** - * create a simple clone from the input used for storage of firstInput and firstMultiple - * @param {Object} input - * @returns {Object} clonedInputData - */ - function simpleCloneInputData(input) { - // make a simple copy of the pointers because we will get a reference if we don't - // we only need clientXY for the calculations - var pointers = []; - var i = 0; - while (i < input.pointers.length) { - pointers[i] = { - clientX: round(input.pointers[i].clientX), - clientY: round(input.pointers[i].clientY) - }; - i++; + }, { + key: 'setCloseCallback', + value: function setCloseCallback(callback) { + if (typeof callback === 'function') { + this.closeCallback = callback; + } else { + throw new Error("Function attempted to set as colorPicker closing callback is not a function."); + } + } + }, { + key: '_isColorString', + value: function _isColorString(color) { + var htmlColors = { 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' }; + if (typeof color === 'string') { + return htmlColors[color]; + } } - return { - timeStamp: now(), - pointers: pointers, - center: getCenter(pointers), - deltaX: input.deltaX, - deltaY: input.deltaY - }; - } - - /** - * get the center of all the pointers - * @param {Array} pointers - * @return {Object} center contains `x` and `y` properties - */ - function getCenter(pointers) { - var pointersLength = pointers.length; + /** + * Set the color of the colorPicker + * Supported formats: + * 'red' --> HTML color string + * '#ffffff' --> hex string + * 'rbg(255,255,255)' --> rgb string + * 'rgba(255,255,255,1.0)' --> rgba string + * {r:255,g:255,b:255} --> rgb object + * {r:255,g:255,b:255,a:1.0} --> rgba object + * @param color + * @param setInitial + */ - // no need to loop when only one touch - if (pointersLength === 1) { - return { - x: round(pointers[0].clientX), - y: round(pointers[0].clientY) - }; - } + }, { + key: 'setColor', + value: function setColor(color) { + var setInitial = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; - var x = 0, y = 0, i = 0; - while (i < pointersLength) { - x += pointers[i].clientX; - y += pointers[i].clientY; - i++; - } + if (color === 'none') { + return; + } - return { - x: round(x / pointersLength), - y: round(y / pointersLength) - }; - } + var rgba = void 0; - /** - * calculate the velocity between two points. unit is in px per ms. - * @param {Number} deltaTime - * @param {Number} x - * @param {Number} y - * @return {Object} velocity `x` and `y` - */ - function getVelocity(deltaTime, x, y) { - return { - x: x / deltaTime || 0, - y: y / deltaTime || 0 - }; - } + // if a html color shorthand is used, convert to hex + var htmlColor = this._isColorString(color); + if (htmlColor !== undefined) { + color = htmlColor; + } - /** - * get the direction between two points - * @param {Number} x - * @param {Number} y - * @return {Number} direction - */ - function getDirection(x, y) { - if (x === y) { - return DIRECTION_NONE; - } + // check format + if (util.isString(color) === true) { + if (util.isValidRGB(color) === true) { + var rgbaArray = color.substr(4).substr(0, color.length - 5).split(','); + rgba = { r: rgbaArray[0], g: rgbaArray[1], b: rgbaArray[2], a: 1.0 }; + } else if (util.isValidRGBA(color) === true) { + var _rgbaArray = color.substr(5).substr(0, color.length - 6).split(','); + rgba = { r: _rgbaArray[0], g: _rgbaArray[1], b: _rgbaArray[2], a: _rgbaArray[3] }; + } else if (util.isValidHex(color) === true) { + var rgbObj = util.hexToRGB(color); + rgba = { r: rgbObj.r, g: rgbObj.g, b: rgbObj.b, a: 1.0 }; + } + } else { + if (color instanceof Object) { + if (color.r !== undefined && color.g !== undefined && color.b !== undefined) { + var alpha = color.a !== undefined ? color.a : '1.0'; + rgba = { r: color.r, g: color.g, b: color.b, a: alpha }; + } + } + } - if (abs(x) >= abs(y)) { - return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; + // set color + if (rgba === undefined) { + 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: " + JSON.stringify(color)); + } else { + this._setColor(rgba, setInitial); + } } - return y < 0 ? DIRECTION_UP : DIRECTION_DOWN; - } - /** - * calculate the absolute distance between two points - * @param {Object} p1 {x, y} - * @param {Object} p2 {x, y} - * @param {Array} [props] containing x and y keys - * @return {Number} distance - */ - function getDistance(p1, p2, props) { - if (!props) { - props = PROPS_XY; - } - var x = p2[props[0]] - p1[props[0]], - y = p2[props[1]] - p1[props[1]]; + /** + * this shows the color picker. + * The hue circle is constructed once and stored. + */ - return Math.sqrt((x * x) + (y * y)); - } + }, { + key: 'show', + value: function show() { + if (this.closeCallback !== undefined) { + this.closeCallback(); + this.closeCallback = undefined; + } - /** - * calculate the angle between two coordinates - * @param {Object} p1 - * @param {Object} p2 - * @param {Array} [props] containing x and y keys - * @return {Number} angle - */ - function getAngle(p1, p2, props) { - if (!props) { - props = PROPS_XY; + this.applied = false; + this.frame.style.display = 'block'; + this._generateHueCircle(); } - var x = p2[props[0]] - p1[props[0]], - y = p2[props[1]] - p1[props[1]]; - return Math.atan2(y, x) * 180 / Math.PI; - } - /** - * calculate the rotation degrees between two pointersets - * @param {Array} start array of pointers - * @param {Array} end array of pointers - * @return {Number} rotation - */ - function getRotation(start, end) { - return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY); - } + // ------------------------------------------ PRIVATE ----------------------------- // - /** - * calculate the scale factor between two pointersets - * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out - * @param {Array} start array of pointers - * @param {Array} end array of pointers - * @return {Number} scale - */ - function getScale(start, end) { - return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY); - } + /** + * Hide the picker. Is called by the cancel button. + * Optional boolean to store the previous color for easy access later on. + * @param storePrevious + * @private + */ - var MOUSE_INPUT_MAP = { - mousedown: INPUT_START, - mousemove: INPUT_MOVE, - mouseup: INPUT_END - }; + }, { + key: '_hide', + value: function _hide() { + var _this = this; - var MOUSE_ELEMENT_EVENTS = 'mousedown'; - var MOUSE_WINDOW_EVENTS = 'mousemove mouseup'; + var storePrevious = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0]; - /** - * Mouse events input - * @constructor - * @extends Input - */ - function MouseInput() { - this.evEl = MOUSE_ELEMENT_EVENTS; - this.evWin = MOUSE_WINDOW_EVENTS; + // store the previous color for next time; + if (storePrevious === true) { + this.previousColor = util.extend({}, this.color); + } - this.allow = true; // used by Input.TouchMouse to disable mouse events - this.pressed = false; // mousedown state + if (this.applied === true) { + this.updateCallback(this.initialColor); + } - Input.apply(this, arguments); - } + this.frame.style.display = 'none'; + + // call the closing callback, restoring the onclick method. + // this is in a setTimeout because it will trigger the show again before the click is done. + setTimeout(function () { + if (_this.closeCallback !== undefined) { + _this.closeCallback(); + _this.closeCallback = undefined; + } + }, 0); + } - inherit(MouseInput, Input, { /** - * handle mouse events - * @param {Object} ev + * bound to the save button. Saves and hides. + * @private */ - handler: function MEhandler(ev) { - var eventType = MOUSE_INPUT_MAP[ev.type]; - // on start we want to have the left mouse button down - if (eventType & INPUT_START && ev.button === 0) { - this.pressed = true; - } + }, { + key: '_save', + value: function _save() { + this.updateCallback(this.color); + this.applied = false; + this._hide(); + } - if (eventType & INPUT_MOVE && ev.which !== 1) { - eventType = INPUT_END; - } + /** + * Bound to apply button. Saves but does not close. Is undone by the cancel button. + * @private + */ - // mouse must be down, and mouse events are allowed (see the TouchMouse input) - if (!this.pressed || !this.allow) { - return; - } + }, { + key: '_apply', + value: function _apply() { + this.applied = true; + this.updateCallback(this.color); + this._updatePicker(this.color); + } - if (eventType & INPUT_END) { - this.pressed = false; - } + /** + * load the color from the previous session. + * @private + */ - this.callback(this.manager, eventType, { - pointers: [ev], - changedPointers: [ev], - pointerType: INPUT_TYPE_MOUSE, - srcEvent: ev - }); + }, { + key: '_loadLast', + value: function _loadLast() { + if (this.previousColor !== undefined) { + this.setColor(this.previousColor, false); + } else { + alert("There is no last color to load..."); + } } - }); - var POINTER_INPUT_MAP = { - pointerdown: INPUT_START, - pointermove: INPUT_MOVE, - pointerup: INPUT_END, - pointercancel: INPUT_CANCEL, - pointerout: INPUT_CANCEL - }; + /** + * set the color, place the picker + * @param rgba + * @param setInitial + * @private + */ - // in IE10 the pointer types is defined as an enum - var IE10_POINTER_TYPE_ENUM = { - 2: INPUT_TYPE_TOUCH, - 3: INPUT_TYPE_PEN, - 4: INPUT_TYPE_MOUSE, - 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816 - }; + }, { + key: '_setColor', + value: function _setColor(rgba) { + var setInitial = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; - var POINTER_ELEMENT_EVENTS = 'pointerdown'; - var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; + // store the initial color + if (setInitial === true) { + this.initialColor = util.extend({}, rgba); + } - // IE10 has prefixed support, and case-sensitive - if (window.MSPointerEvent && !window.PointerEvent) { - POINTER_ELEMENT_EVENTS = 'MSPointerDown'; - POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel'; - } + this.color = rgba; + var hsv = util.RGBToHSV(rgba.r, rgba.g, rgba.b); - /** - * Pointer events input - * @constructor - * @extends Input - */ - function PointerEventInput() { - this.evEl = POINTER_ELEMENT_EVENTS; - this.evWin = POINTER_WINDOW_EVENTS; + var angleConvert = 2 * Math.PI; + var radius = this.r * hsv.s; + var x = this.centerCoordinates.x + radius * Math.sin(angleConvert * hsv.h); + var y = this.centerCoordinates.y + radius * Math.cos(angleConvert * hsv.h); - Input.apply(this, arguments); + this.colorPickerSelector.style.left = x - 0.5 * this.colorPickerSelector.clientWidth + 'px'; + this.colorPickerSelector.style.top = y - 0.5 * this.colorPickerSelector.clientHeight + 'px'; - this.store = (this.manager.session.pointerEvents = []); - } + this._updatePicker(rgba); + } - inherit(PointerEventInput, Input, { /** - * handle mouse events - * @param {Object} ev + * bound to opacity control + * @param value + * @private */ - handler: function PEhandler(ev) { - var store = this.store; - var removePointer = false; - var eventTypeNormalized = ev.type.toLowerCase().replace('ms', ''); - var eventType = POINTER_INPUT_MAP[eventTypeNormalized]; - var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType; - - var isTouch = (pointerType == INPUT_TYPE_TOUCH); - - // get index of the event in the store - var storeIndex = inArray(store, ev.pointerId, 'pointerId'); - - // start and mouse must be down - if (eventType & INPUT_START && (ev.button === 0 || isTouch)) { - if (storeIndex < 0) { - store.push(ev); - storeIndex = store.length - 1; - } - } else if (eventType & (INPUT_END | INPUT_CANCEL)) { - removePointer = true; - } - - // it not found, so the pointer hasn't been down (so it's probably a hover) - if (storeIndex < 0) { - return; - } - - // update the event in the store - store[storeIndex] = ev; + }, { + key: '_setOpacity', + value: function _setOpacity(value) { + this.color.a = value / 100; + this._updatePicker(this.color); + } - this.callback(this.manager, eventType, { - pointers: store, - changedPointers: [ev], - pointerType: pointerType, - srcEvent: ev - }); + /** + * bound to brightness control + * @param value + * @private + */ - if (removePointer) { - // remove from the store - store.splice(storeIndex, 1); - } + }, { + key: '_setBrightness', + value: function _setBrightness(value) { + var hsv = util.RGBToHSV(this.color.r, this.color.g, this.color.b); + hsv.v = value / 100; + var rgba = util.HSVToRGB(hsv.h, hsv.s, hsv.v); + rgba['a'] = this.color.a; + this.color = rgba; + this._updatePicker(); } - }); - var SINGLE_TOUCH_INPUT_MAP = { - touchstart: INPUT_START, - touchmove: INPUT_MOVE, - touchend: INPUT_END, - touchcancel: INPUT_CANCEL - }; + /** + * update the color picker. A black circle overlays the hue circle to mimic the brightness decreasing. + * @param rgba + * @private + */ - var SINGLE_TOUCH_TARGET_EVENTS = 'touchstart'; - var SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel'; + }, { + key: '_updatePicker', + value: function _updatePicker() { + var rgba = arguments.length <= 0 || arguments[0] === undefined ? this.color : arguments[0]; - /** - * Touch events input - * @constructor - * @extends Input - */ - function SingleTouchInput() { - this.evTarget = SINGLE_TOUCH_TARGET_EVENTS; - this.evWin = SINGLE_TOUCH_WINDOW_EVENTS; - this.started = false; + var hsv = util.RGBToHSV(rgba.r, rgba.g, rgba.b); + var ctx = this.colorPickerCanvas.getContext('2d'); + if (this.pixelRation === undefined) { + this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1); + } + ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); - Input.apply(this, arguments); - } + // clear the canvas + var w = this.colorPickerCanvas.clientWidth; + var h = this.colorPickerCanvas.clientHeight; + ctx.clearRect(0, 0, w, h); - inherit(SingleTouchInput, Input, { - handler: function TEhandler(ev) { - var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; + ctx.putImageData(this.hueCircle, 0, 0); + ctx.fillStyle = 'rgba(0,0,0,' + (1 - hsv.v) + ')'; + ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r); + ctx.fill(); - // should we handle the touch events? - if (type === INPUT_START) { - this.started = true; - } + this.brightnessRange.value = 100 * hsv.v; + this.opacityRange.value = 100 * rgba.a; - if (!this.started) { - return; - } + 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 + ')'; + } - var touches = normalizeSingleTouches.call(this, ev, type); + /** + * used by create to set the size of the canvas. + * @private + */ - // when done, reset the started state - if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) { - this.started = false; - } + }, { + key: '_setSize', + value: function _setSize() { + this.colorPickerCanvas.style.width = '100%'; + this.colorPickerCanvas.style.height = '100%'; - this.callback(this.manager, type, { - pointers: touches[0], - changedPointers: touches[1], - pointerType: INPUT_TYPE_TOUCH, - srcEvent: ev - }); + this.colorPickerCanvas.width = 289 * this.pixelRatio; + this.colorPickerCanvas.height = 289 * this.pixelRatio; } - }); - /** - * @this {TouchInput} - * @param {Object} ev - * @param {Number} type flag - * @returns {undefined|Array} [all, changed] - */ - function normalizeSingleTouches(ev, type) { - var all = toArray(ev.touches); - var changed = toArray(ev.changedTouches); + /** + * create all dom elements + * TODO: cleanup, lots of similar dom elements + * @private + */ - if (type & (INPUT_END | INPUT_CANCEL)) { - all = uniqueArray(all.concat(changed), 'identifier', true); - } + }, { + key: '_create', + value: function _create() { + this.frame = document.createElement('div'); + this.frame.className = 'vis-color-picker'; - return [all, changed]; - } + this.colorPickerDiv = document.createElement('div'); + this.colorPickerSelector = document.createElement('div'); + this.colorPickerSelector.className = 'vis-selector'; + this.colorPickerDiv.appendChild(this.colorPickerSelector); - var TOUCH_INPUT_MAP = { - touchstart: INPUT_START, - touchmove: INPUT_MOVE, - touchend: INPUT_END, - touchcancel: INPUT_CANCEL - }; + this.colorPickerCanvas = document.createElement('canvas'); + this.colorPickerDiv.appendChild(this.colorPickerCanvas); - var TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel'; + if (!this.colorPickerCanvas.getContext) { + var noCanvas = document.createElement('DIV'); + noCanvas.style.color = 'red'; + noCanvas.style.fontWeight = 'bold'; + noCanvas.style.padding = '10px'; + noCanvas.innerHTML = 'Error: your browser does not support HTML canvas'; + this.colorPickerCanvas.appendChild(noCanvas); + } else { + var ctx = this.colorPickerCanvas.getContext("2d"); + this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1); - /** - * Multi-user touch events input - * @constructor - * @extends Input - */ - function TouchInput() { - this.evTarget = TOUCH_TARGET_EVENTS; - this.targetIds = {}; + this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); + } - Input.apply(this, arguments); - } + this.colorPickerDiv.className = 'vis-color'; - inherit(TouchInput, Input, { - handler: function MTEhandler(ev) { - var type = TOUCH_INPUT_MAP[ev.type]; - var touches = getTouches.call(this, ev, type); - if (!touches) { - return; - } + this.opacityDiv = document.createElement('div'); + this.opacityDiv.className = 'vis-opacity'; - this.callback(this.manager, type, { - pointers: touches[0], - changedPointers: touches[1], - pointerType: INPUT_TYPE_TOUCH, - srcEvent: ev - }); - } - }); + this.brightnessDiv = document.createElement('div'); + this.brightnessDiv.className = 'vis-brightness'; - /** - * @this {TouchInput} - * @param {Object} ev - * @param {Number} type flag - * @returns {undefined|Array} [all, changed] - */ - function getTouches(ev, type) { - var allTouches = toArray(ev.touches); - var targetIds = this.targetIds; + this.arrowDiv = document.createElement('div'); + this.arrowDiv.className = 'vis-arrow'; - // when there is only one touch, the process can be simplified - if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) { - targetIds[allTouches[0].identifier] = true; - return [allTouches, allTouches]; - } + this.opacityRange = document.createElement('input'); + try { + this.opacityRange.type = 'range'; // Not supported on IE9 + this.opacityRange.min = '0'; + this.opacityRange.max = '100'; + } catch (err) {} + this.opacityRange.value = '100'; + this.opacityRange.className = 'vis-range'; - var i, - targetTouches, - changedTouches = toArray(ev.changedTouches), - changedTargetTouches = [], - target = this.target; + this.brightnessRange = document.createElement('input'); + try { + this.brightnessRange.type = 'range'; // Not supported on IE9 + this.brightnessRange.min = '0'; + this.brightnessRange.max = '100'; + } catch (err) {} + this.brightnessRange.value = '100'; + this.brightnessRange.className = 'vis-range'; - // get target touches from touches - targetTouches = allTouches.filter(function(touch) { - return hasParent(touch.target, target); - }); + this.opacityDiv.appendChild(this.opacityRange); + this.brightnessDiv.appendChild(this.brightnessRange); - // collect touches - if (type === INPUT_START) { - i = 0; - while (i < targetTouches.length) { - targetIds[targetTouches[i].identifier] = true; - i++; - } - } + var me = this; + this.opacityRange.onchange = function () { + me._setOpacity(this.value); + }; + this.opacityRange.oninput = function () { + me._setOpacity(this.value); + }; + this.brightnessRange.onchange = function () { + me._setBrightness(this.value); + }; + this.brightnessRange.oninput = function () { + me._setBrightness(this.value); + }; - // filter changed touches to only contain touches that exist in the collected target ids - i = 0; - while (i < changedTouches.length) { - if (targetIds[changedTouches[i].identifier]) { - changedTargetTouches.push(changedTouches[i]); - } + this.brightnessLabel = document.createElement("div"); + this.brightnessLabel.className = "vis-label vis-brightness"; + this.brightnessLabel.innerHTML = 'brightness:'; - // cleanup removed touches - if (type & (INPUT_END | INPUT_CANCEL)) { - delete targetIds[changedTouches[i].identifier]; - } - i++; - } + this.opacityLabel = document.createElement("div"); + this.opacityLabel.className = "vis-label vis-opacity"; + this.opacityLabel.innerHTML = 'opacity:'; - if (!changedTargetTouches.length) { - return; - } + this.newColorDiv = document.createElement("div"); + this.newColorDiv.className = "vis-new-color"; + this.newColorDiv.innerHTML = 'new'; - return [ - // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel' - uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), - changedTargetTouches - ]; - } + this.initialColorDiv = document.createElement("div"); + this.initialColorDiv.className = "vis-initial-color"; + this.initialColorDiv.innerHTML = 'initial'; - /** - * Combined touch and mouse input - * - * Touch has a higher priority then mouse, and while touching no mouse events are allowed. - * This because touch devices also emit mouse events while doing a touch. - * - * @constructor - * @extends Input - */ - function TouchMouseInput() { - Input.apply(this, arguments); + this.cancelButton = document.createElement("div"); + this.cancelButton.className = "vis-button vis-cancel"; + this.cancelButton.innerHTML = 'cancel'; + this.cancelButton.onclick = this._hide.bind(this, false); - var handler = bindFn(this.handler, this); - this.touch = new TouchInput(this.manager, handler); - this.mouse = new MouseInput(this.manager, handler); - } + this.applyButton = document.createElement("div"); + this.applyButton.className = "vis-button vis-apply"; + this.applyButton.innerHTML = 'apply'; + this.applyButton.onclick = this._apply.bind(this); - inherit(TouchMouseInput, Input, { - /** - * handle mouse and touch events - * @param {Hammer} manager - * @param {String} inputEvent - * @param {Object} inputData - */ - handler: function TMEhandler(manager, inputEvent, inputData) { - var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH), - isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE); + this.saveButton = document.createElement("div"); + this.saveButton.className = "vis-button vis-save"; + this.saveButton.innerHTML = 'save'; + this.saveButton.onclick = this._save.bind(this); - // when we're in a touch event, so block all upcoming mouse events - // most mobile browser also emit mouseevents, right after touchstart - if (isTouch) { - this.mouse.allow = false; - } else if (isMouse && !this.mouse.allow) { - return; - } + this.loadButton = document.createElement("div"); + this.loadButton.className = "vis-button vis-load"; + this.loadButton.innerHTML = 'load last'; + this.loadButton.onclick = this._loadLast.bind(this); - // reset the allowMouse when we're done - if (inputEvent & (INPUT_END | INPUT_CANCEL)) { - this.mouse.allow = true; - } + 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.callback(manager, inputEvent, inputData); - }, + this.frame.appendChild(this.cancelButton); + this.frame.appendChild(this.applyButton); + this.frame.appendChild(this.saveButton); + this.frame.appendChild(this.loadButton); + } /** - * remove the event listeners + * bind hammer to the color picker + * @private */ - destroy: function destroy() { - this.touch.destroy(); - this.mouse.destroy(); - } - }); - var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction'); - var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined; + }, { + key: '_bindHammer', + value: function _bindHammer() { + var _this2 = this; - // magical touchAction value - var TOUCH_ACTION_COMPUTE = 'compute'; - var TOUCH_ACTION_AUTO = 'auto'; - var TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented - var TOUCH_ACTION_NONE = 'none'; - var TOUCH_ACTION_PAN_X = 'pan-x'; - var TOUCH_ACTION_PAN_Y = 'pan-y'; + this.drag = {}; + this.pinch = {}; + this.hammer = new Hammer(this.colorPickerCanvas); + this.hammer.get('pinch').set({ enable: true }); - /** - * Touch Action - * sets the touchAction property or uses the js alternative - * @param {Manager} manager - * @param {String} value - * @constructor - */ - function TouchAction(manager, value) { - this.manager = manager; - this.set(value); - } + hammerUtil.onTouch(this.hammer, function (event) { + _this2._moveSelector(event); + }); + this.hammer.on('tap', function (event) { + _this2._moveSelector(event); + }); + this.hammer.on('panstart', function (event) { + _this2._moveSelector(event); + }); + this.hammer.on('panmove', function (event) { + _this2._moveSelector(event); + }); + this.hammer.on('panend', function (event) { + _this2._moveSelector(event); + }); + } - TouchAction.prototype = { /** - * set the touchAction value on the element or enable the polyfill - * @param {String} value + * generate the hue circle. This is relatively heavy (200ms) and is done only once on the first time it is shown. + * @private */ - set: function(value) { - // find out the touch-action by the event handlers - if (value == TOUCH_ACTION_COMPUTE) { - value = this.compute(); + + }, { + key: '_generateHueCircle', + value: function _generateHueCircle() { + if (this.generated === false) { + var ctx = this.colorPickerCanvas.getContext('2d'); + if (this.pixelRation === undefined) { + this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1); } + ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); - if (NATIVE_TOUCH_ACTION && this.manager.element.style) { - this.manager.element.style[PREFIXED_TOUCH_ACTION] = value; + // clear the canvas + var w = this.colorPickerCanvas.clientWidth; + var h = this.colorPickerCanvas.clientHeight; + ctx.clearRect(0, 0, w, h); + + // draw hue circle + var x = void 0, + y = void 0, + hue = void 0, + sat = void 0; + this.centerCoordinates = { x: w * 0.5, y: h * 0.5 }; + this.r = 0.49 * w; + var angleConvert = 2 * Math.PI / 360; + var hfac = 1 / 360; + var sfac = 1 / this.r; + var rgb = void 0; + for (hue = 0; hue < 360; hue++) { + for (sat = 0; sat < this.r; sat++) { + x = this.centerCoordinates.x + sat * Math.sin(angleConvert * hue); + y = this.centerCoordinates.y + sat * Math.cos(angleConvert * hue); + rgb = util.HSVToRGB(hue * hfac, sat * sfac, 1); + ctx.fillStyle = 'rgb(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ')'; + ctx.fillRect(x - 0.5, y - 0.5, 2, 2); + } } - this.actions = value.toLowerCase().trim(); - }, + ctx.strokeStyle = 'rgba(0,0,0,1)'; + ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r); + ctx.stroke(); - /** - * just re-set the touchAction value - */ - update: function() { - this.set(this.manager.options.touchAction); - }, + this.hueCircle = ctx.getImageData(0, 0, w, h); + } + this.generated = true; + } /** - * compute the value for the touchAction property based on the recognizer's settings - * @returns {String} value + * move the selector. This is called by hammer functions. + * + * @param event + * @private */ - compute: function() { - var actions = []; - each(this.manager.recognizers, function(recognizer) { - if (boolOrFn(recognizer.options.enable, [recognizer])) { - actions = actions.concat(recognizer.getTouchAction()); - } - }); - return cleanTouchActions(actions.join(' ')); - }, - /** - * this method is called on each input cycle and provides the preventing of the browser behavior - * @param {Object} input - */ - preventDefaults: function(input) { - // not needed with native support for the touchAction property - if (NATIVE_TOUCH_ACTION) { - return; - } + }, { + key: '_moveSelector', + value: function _moveSelector(event) { + var rect = this.colorPickerDiv.getBoundingClientRect(); + var left = event.center.x - rect.left; + var top = event.center.y - rect.top; - var srcEvent = input.srcEvent; - var direction = input.offsetDirection; + var centerY = 0.5 * this.colorPickerDiv.clientHeight; + var centerX = 0.5 * this.colorPickerDiv.clientWidth; - // if the touch action did prevented once this session - if (this.manager.session.prevented) { - srcEvent.preventDefault(); - return; - } - - var actions = this.actions; - var hasNone = inStr(actions, TOUCH_ACTION_NONE); - var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); - var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); - - if (hasNone) { - //do not prevent defaults if this is a tap gesture - - var isTapPointer = input.pointers.length === 1; - var isTapMovement = input.distance < 2; - var isTapTouchTime = input.deltaTime < 250; + var x = left - centerX; + var y = top - centerY; - if (isTapPointer && isTapMovement && isTapTouchTime) { - return; - } - } + var angle = Math.atan2(x, y); + var radius = 0.98 * Math.min(Math.sqrt(x * x + y * y), centerX); - if (hasPanX && hasPanY) { - // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent - return; - } + var newTop = Math.cos(angle) * radius + centerY; + var newLeft = Math.sin(angle) * radius + centerX; - if (hasNone || - (hasPanY && direction & DIRECTION_HORIZONTAL) || - (hasPanX && direction & DIRECTION_VERTICAL)) { - return this.preventSrc(srcEvent); - } - }, + this.colorPickerSelector.style.top = newTop - 0.5 * this.colorPickerSelector.clientHeight + 'px'; + this.colorPickerSelector.style.left = newLeft - 0.5 * this.colorPickerSelector.clientWidth + 'px'; - /** - * call preventDefault to prevent the browser's default behavior (scrolling in most cases) - * @param {Object} srcEvent - */ - preventSrc: function(srcEvent) { - this.manager.session.prevented = true; - srcEvent.preventDefault(); - } - }; + // set color + var h = angle / (2 * Math.PI); + h = h < 0 ? h + 1 : h; + var s = radius / this.r; + var hsv = util.RGBToHSV(this.color.r, this.color.g, this.color.b); + hsv.h = h; + hsv.s = s; + var rgba = util.HSVToRGB(hsv.h, hsv.s, hsv.v); + rgba['a'] = this.color.a; + this.color = rgba; - /** - * when the touchActions are collected they are not a valid value, so we need to clean things up. * - * @param {String} actions - * @returns {*} - */ - function cleanTouchActions(actions) { - // none - if (inStr(actions, TOUCH_ACTION_NONE)) { - return TOUCH_ACTION_NONE; + // update previews + 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 + ')'; } + }]); - var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); - var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); + return ColorPicker; + }(); - // if both pan-x and pan-y are set (different recognizers - // for different directions, e.g. horizontal pan but vertical swipe?) - // we need none (as otherwise with pan-x pan-y combined none of these - // recognizers will work, since the browser would handle all panning - if (hasPanX && hasPanY) { - return TOUCH_ACTION_NONE; - } + exports.default = ColorPicker; - // pan-x OR pan-y - if (hasPanX || hasPanY) { - return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y; - } +/***/ }, +/* 22 */ +/***/ function(module, exports, __webpack_require__) { - // manipulation - if (inStr(actions, TOUCH_ACTION_MANIPULATION)) { - return TOUCH_ACTION_MANIPULATION; - } + 'use strict'; - return TOUCH_ACTION_AUTO; + // Only load hammer.js when in a browser environment + // (loading hammer.js in a node.js environment gives errors) + if (typeof window !== 'undefined') { + var propagating = __webpack_require__(23); + var Hammer = window['Hammer'] || __webpack_require__(24); + module.exports = propagating(Hammer, { + preventDefault: 'mouse' + }); + } else { + module.exports = function () { + throw Error('hammer.js is only available in a browser, not in node.js.'); + }; } - /** - * Recognizer flow explained; * - * All recognizers have the initial state of POSSIBLE when a input session starts. - * The definition of a input session is from the first input until the last input, with all it's movement in it. * - * Example session for mouse-input: mousedown -> mousemove -> mouseup - * - * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed - * which determines with state it should be. - * - * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to - * POSSIBLE to give it another change on the next cycle. - * - * Possible - * | - * +-----+---------------+ - * | | - * +-----+-----+ | - * | | | - * Failed Cancelled | - * +-------+------+ - * | | - * Recognized Began - * | - * Changed - * | - * Ended/Recognized - */ - var STATE_POSSIBLE = 1; - var STATE_BEGAN = 2; - var STATE_CHANGED = 4; - var STATE_ENDED = 8; - var STATE_RECOGNIZED = STATE_ENDED; - var STATE_CANCELLED = 16; - var STATE_FAILED = 32; +/***/ }, +/* 23 */ +/***/ function(module, exports, __webpack_require__) { - /** - * Recognizer - * Every recognizer needs to extend from this class. - * @constructor - * @param {Object} options - */ - function Recognizer(options) { - this.options = assign({}, this.defaults, options || {}); + var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict'; - this.id = uniqueId(); + (function (factory) { + if (true) { + // AMD. Register as an anonymous module. + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals (root is window) + window.propagating = factory(); + } + }(function () { + var _firstTarget = null; // singleton, will contain the target element where the touch event started - this.manager = null; + /** + * Extend an Hammer.js instance with event propagation. + * + * Features: + * - Events emitted by hammer will propagate in order from child to parent + * elements. + * - Events are extended with a function `event.stopPropagation()` to stop + * propagation to parent elements. + * - An option `preventDefault` to stop all default browser behavior. + * + * Usage: + * var hammer = propagatingHammer(new Hammer(element)); + * var hammer = propagatingHammer(new Hammer(element), {preventDefault: true}); + * + * @param {Hammer.Manager} hammer An hammer instance. + * @param {Object} [options] Available options: + * - `preventDefault: true | false | 'mouse' | 'touch' | 'pen'`. + * Enforce preventing the default browser behavior. + * Cannot be set to `false`. + * @return {Hammer.Manager} Returns the same hammer instance with extended + * functionality + */ + return function propagating(hammer, options) { + var _options = options || { + preventDefault: false + }; - // default is enable true - this.options.enable = ifUndefined(this.options.enable, true); + if (hammer.Manager) { + // This looks like the Hammer constructor. + // Overload the constructors with our own. + var Hammer = hammer; - this.state = STATE_POSSIBLE; + var PropagatingHammer = function(element, options) { + var o = Object.create(_options); + if (options) Hammer.assign(o, options); + return propagating(new Hammer(element, o), o); + }; + Hammer.assign(PropagatingHammer, Hammer); - this.simultaneous = {}; - this.requireFail = []; - } + PropagatingHammer.Manager = function (element, options) { + var o = Object.create(_options); + if (options) Hammer.assign(o, options); + return propagating(new Hammer.Manager(element, o), o); + }; - Recognizer.prototype = { - /** - * @virtual - * @type {Object} - */ - defaults: {}, + return PropagatingHammer; + } - /** - * set options - * @param {Object} options - * @return {Recognizer} - */ - set: function(options) { - assign(this.options, options); + // create a wrapper object which will override the functions + // `on`, `off`, `destroy`, and `emit` of the hammer instance + var wrapper = Object.create(hammer); - // also update the touchAction, in case something changed about the directions/enabled state - this.manager && this.manager.touchAction.update(); - return this; - }, + // attach to DOM element + var element = hammer.element; - /** - * recognize simultaneous with an other recognizer. - * @param {Recognizer} otherRecognizer - * @returns {Recognizer} this - */ - recognizeWith: function(otherRecognizer) { - if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) { - return this; - } + if(!element.hammer) element.hammer = []; + element.hammer.push(wrapper); - var simultaneous = this.simultaneous; - otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); - if (!simultaneous[otherRecognizer.id]) { - simultaneous[otherRecognizer.id] = otherRecognizer; - otherRecognizer.recognizeWith(this); - } - return this; - }, + // register an event to catch the start of a gesture and store the + // target in a singleton + hammer.on('hammer.input', function (event) { + if (_options.preventDefault === true || (_options.preventDefault === event.pointerType)) { + event.preventDefault(); + } + if (event.isFirst) { + _firstTarget = event.target; + } + }); + + /** @type {Object.>} */ + wrapper._handlers = {}; /** - * drop the simultaneous link. it doesnt remove the link on the other recognizer. - * @param {Recognizer} otherRecognizer - * @returns {Recognizer} this + * Register a handler for one or multiple events + * @param {String} events A space separated string with events + * @param {function} handler A callback function, called as handler(event) + * @returns {Hammer.Manager} Returns the hammer instance */ - dropRecognizeWith: function(otherRecognizer) { - if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) { - return this; + wrapper.on = function (events, handler) { + // register the handler + split(events).forEach(function (event) { + var _handlers = wrapper._handlers[event]; + if (!_handlers) { + wrapper._handlers[event] = _handlers = []; + + // register the static, propagated handler + hammer.on(event, propagatedHandler); } + _handlers.push(handler); + }); - otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); - delete this.simultaneous[otherRecognizer.id]; - return this; - }, + return wrapper; + }; /** - * recognizer can only run when an other is failing - * @param {Recognizer} otherRecognizer - * @returns {Recognizer} this + * Unregister a handler for one or multiple events + * @param {String} events A space separated string with events + * @param {function} [handler] Optional. The registered handler. If not + * provided, all handlers for given events + * are removed. + * @returns {Hammer.Manager} Returns the hammer instance */ - requireFailure: function(otherRecognizer) { - if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) { - return this; - } + wrapper.off = function (events, handler) { + // unregister the handler + split(events).forEach(function (event) { + var _handlers = wrapper._handlers[event]; + if (_handlers) { + _handlers = handler ? _handlers.filter(function (h) { + return h !== handler; + }) : []; - var requireFail = this.requireFail; - otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); - if (inArray(requireFail, otherRecognizer) === -1) { - requireFail.push(otherRecognizer); - otherRecognizer.requireFailure(this); + if (_handlers.length > 0) { + wrapper._handlers[event] = _handlers; + } + else { + // remove static, propagated handler + hammer.off(event, propagatedHandler); + delete wrapper._handlers[event]; + } } - return this; - }, + }); + + return wrapper; + }; /** - * drop the requireFailure link. it does not remove the link on the other recognizer. - * @param {Recognizer} otherRecognizer - * @returns {Recognizer} this + * Emit to the event listeners + * @param {string} eventType + * @param {Event} event */ - dropRequireFailure: function(otherRecognizer) { - if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) { - return this; - } + wrapper.emit = function(eventType, event) { + _firstTarget = event.target; + hammer.emit(eventType, event); + }; - otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); - var index = inArray(this.requireFail, otherRecognizer); - if (index > -1) { - this.requireFail.splice(index, 1); - } - return this; - }, + wrapper.destroy = function () { + // Detach from DOM element + var hammers = hammer.element.hammer; + var idx = hammers.indexOf(wrapper); + if(idx !== -1) hammers.splice(idx,1); + if(!hammers.length) delete hammer.element.hammer; - /** - * has require failures boolean - * @returns {boolean} - */ - hasRequireFailures: function() { - return this.requireFail.length > 0; - }, + // clear all handlers + wrapper._handlers = {}; - /** - * if the recognizer can recognize simultaneous with an other recognizer - * @param {Recognizer} otherRecognizer - * @returns {Boolean} - */ - canRecognizeWith: function(otherRecognizer) { - return !!this.simultaneous[otherRecognizer.id]; - }, + // call original hammer destroy + hammer.destroy(); + }; + + // split a string with space separated words + function split(events) { + return events.match(/[^ ]+/g); + } /** - * You should use `tryEmit` instead of `emit` directly to check - * that all the needed recognizers has failed before emitting. - * @param {Object} input + * A static event handler, applying event propagation. + * @param {Object} event */ - emit: function(input) { - var self = this; - var state = this.state; - - function emit(event) { - self.manager.emit(event, input); + function propagatedHandler(event) { + // let only a single hammer instance handle this event + if (event.type !== 'hammer.input') { + // it is possible that the same srcEvent is used with multiple hammer events, + // we keep track on which events are handled in an object _handled + if (!event.srcEvent._handled) { + event.srcEvent._handled = {}; } - // 'panstart' and 'panmove' - if (state < STATE_ENDED) { - emit(self.options.event + stateStr(state)); + if (event.srcEvent._handled[event.type]) { + return; } - - emit(self.options.event); // simple 'eventName' events - - if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...) - emit(input.additionalEvent); + else { + event.srcEvent._handled[event.type] = true; } + } - // panend and pancancel - if (state >= STATE_ENDED) { - emit(self.options.event + stateStr(state)); - } - }, + // attach a stopPropagation function to the event + var stopped = false; + event.stopPropagation = function () { + stopped = true; + }; - /** - * Check that all the require failure recognizers has failed, - * if true, it emits a gesture event, - * otherwise, setup the state to FAILED. - * @param {Object} input - */ - tryEmit: function(input) { - if (this.canEmit()) { - return this.emit(input); + //wrap the srcEvent's stopPropagation to also stop hammer propagation: + var srcStop = event.srcEvent.stopPropagation.bind(event.srcEvent); + if(typeof srcStop == "function") { + event.srcEvent.stopPropagation = function(){ + srcStop(); + event.stopPropagation(); } - // it's failing anyway - this.state = STATE_FAILED; - }, + } - /** - * can we emit? - * @returns {boolean} - */ - canEmit: function() { - var i = 0; - while (i < this.requireFail.length) { - if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) { - return false; + // attach firstTarget property to the event + event.firstTarget = _firstTarget; + + // propagate over all elements (until stopped) + var elem = _firstTarget; + while (elem && !stopped) { + var elemHammer = elem.hammer; + if(elemHammer){ + var _handlers; + for(var k = 0; k < elemHammer.length; k++){ + _handlers = elemHammer[k]._handlers[event.type]; + if(_handlers) for (var i = 0; i < _handlers.length && !stopped; i++) { + _handlers[i](event); } - i++; + } } - return true; - }, + elem = elem.parentNode; + } + } - /** - * update the recognizer - * @param {Object} inputData - */ - recognize: function(inputData) { - // make a new copy of the inputData - // so we can change the inputData without messing up the other recognizers - var inputDataClone = assign({}, inputData); + return wrapper; + }; + })); - // is is enabled and allow recognizing? - if (!boolOrFn(this.options.enable, [this, inputDataClone])) { - this.reset(); - this.state = STATE_FAILED; - return; - } - // reset when we've reached the end - if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) { - this.state = STATE_POSSIBLE; - } +/***/ }, +/* 24 */ +/***/ function(module, exports, __webpack_require__) { - this.state = this.process(inputDataClone); + var __WEBPACK_AMD_DEFINE_RESULT__;/*! Hammer.JS - v2.0.6 - 2015-12-23 + * http://hammerjs.github.io/ + * + * Copyright (c) 2015 Jorik Tangelder; + * Licensed under the license */ + (function(window, document, exportName, undefined) { + 'use strict'; - // the recognizer has recognized a gesture - // so trigger an event - if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) { - this.tryEmit(inputDataClone); - } - }, - - /** - * return the state of the recognizer - * the actual recognizing happens in this method - * @virtual - * @param {Object} inputData - * @returns {Const} STATE - */ - process: function(inputData) { }, // jshint ignore:line - - /** - * return the preferred touch-action - * @virtual - * @returns {Array} - */ - getTouchAction: function() { }, + var VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o']; + var TEST_ELEMENT = document.createElement('div'); - /** - * called when the gesture isn't allowed to recognize - * like when another is being recognized or it is disabled - * @virtual - */ - reset: function() { } - }; + var TYPE_FUNCTION = 'function'; - /** - * get a usable string, used as event postfix - * @param {Const} state - * @returns {String} state - */ - function stateStr(state) { - if (state & STATE_CANCELLED) { - return 'cancel'; - } else if (state & STATE_ENDED) { - return 'end'; - } else if (state & STATE_CHANGED) { - return 'move'; - } else if (state & STATE_BEGAN) { - return 'start'; - } - return ''; - } + var round = Math.round; + var abs = Math.abs; + var now = Date.now; /** - * direction cons to string - * @param {Const} direction - * @returns {String} + * set a timeout with a given scope + * @param {Function} fn + * @param {Number} timeout + * @param {Object} context + * @returns {number} */ - function directionStr(direction) { - if (direction == DIRECTION_DOWN) { - return 'down'; - } else if (direction == DIRECTION_UP) { - return 'up'; - } else if (direction == DIRECTION_LEFT) { - return 'left'; - } else if (direction == DIRECTION_RIGHT) { - return 'right'; - } - return ''; + function setTimeoutContext(fn, timeout, context) { + return setTimeout(bindFn(fn, context), timeout); } /** - * get a recognizer by name if it is bound to a manager - * @param {Recognizer|String} otherRecognizer - * @param {Recognizer} recognizer - * @returns {Recognizer} + * if the argument is an array, we want to execute the fn on each entry + * if it aint an array we don't want to do a thing. + * this is used by all the methods that accept a single and array argument. + * @param {*|Array} arg + * @param {String} fn + * @param {Object} [context] + * @returns {Boolean} */ - function getRecognizerByNameIfManager(otherRecognizer, recognizer) { - var manager = recognizer.manager; - if (manager) { - return manager.get(otherRecognizer); + function invokeArrayArg(arg, fn, context) { + if (Array.isArray(arg)) { + each(arg, context[fn], context); + return true; } - return otherRecognizer; + return false; } /** - * This recognizer is just used as a base for the simple attribute recognizers. - * @constructor - * @extends Recognizer + * walk objects and arrays + * @param {Object} obj + * @param {Function} iterator + * @param {Object} context */ - function AttrRecognizer() { - Recognizer.apply(this, arguments); - } - - inherit(AttrRecognizer, Recognizer, { - /** - * @namespace - * @memberof AttrRecognizer - */ - defaults: { - /** - * @type {Number} - * @default 1 - */ - pointers: 1 - }, - - /** - * Used to check if it the recognizer receives valid input, like input.distance > 10. - * @memberof AttrRecognizer - * @param {Object} input - * @returns {Boolean} recognized - */ - attrTest: function(input) { - var optionPointers = this.options.pointers; - return optionPointers === 0 || input.pointers.length === optionPointers; - }, - - /** - * Process the input and return the state for the recognizer - * @memberof AttrRecognizer - * @param {Object} input - * @returns {*} State - */ - process: function(input) { - var state = this.state; - var eventType = input.eventType; + function each(obj, iterator, context) { + var i; - var isRecognized = state & (STATE_BEGAN | STATE_CHANGED); - var isValid = this.attrTest(input); + if (!obj) { + return; + } - // on cancel input and we've recognized before, return STATE_CANCELLED - if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) { - return state | STATE_CANCELLED; - } else if (isRecognized || isValid) { - if (eventType & INPUT_END) { - return state | STATE_ENDED; - } else if (!(state & STATE_BEGAN)) { - return STATE_BEGAN; - } - return state | STATE_CHANGED; + if (obj.forEach) { + obj.forEach(iterator, context); + } else if (obj.length !== undefined) { + i = 0; + while (i < obj.length) { + iterator.call(context, obj[i], i, obj); + i++; + } + } else { + for (i in obj) { + obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj); } - return STATE_FAILED; } - }); + } /** - * Pan - * Recognized when the pointer is down and moved in the allowed direction. - * @constructor - * @extends AttrRecognizer + * wrap a method with a deprecation warning and stack trace + * @param {Function} method + * @param {String} name + * @param {String} message + * @returns {Function} A new function wrapping the supplied method. */ - function PanRecognizer() { - AttrRecognizer.apply(this, arguments); + function deprecate(method, name, message) { + var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\n' + message + ' AT \n'; + return function() { + var e = new Error('get-stack-trace'); + var stack = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, '') + .replace(/^\s+at\s+/gm, '') + .replace(/^Object.\s*\(/gm, '{anonymous}()@') : 'Unknown Stack Trace'; - this.pX = null; - this.pY = null; + var log = window.console && (window.console.warn || window.console.log); + if (log) { + log.call(window.console, deprecationMessage, stack); + } + return method.apply(this, arguments); + }; } - inherit(PanRecognizer, AttrRecognizer, { - /** - * @namespace - * @memberof PanRecognizer - */ - defaults: { - event: 'pan', - threshold: 10, - pointers: 1, - direction: DIRECTION_ALL - }, - - getTouchAction: function() { - var direction = this.options.direction; - var actions = []; - if (direction & DIRECTION_HORIZONTAL) { - actions.push(TOUCH_ACTION_PAN_Y); - } - if (direction & DIRECTION_VERTICAL) { - actions.push(TOUCH_ACTION_PAN_X); + /** + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} target + * @param {...Object} objects_to_assign + * @returns {Object} target + */ + var assign; + if (typeof Object.assign !== 'function') { + assign = function assign(target) { + if (target === undefined || target === null) { + throw new TypeError('Cannot convert undefined or null to object'); } - return actions; - }, - - directionTest: function(input) { - var options = this.options; - var hasMoved = true; - var distance = input.distance; - var direction = input.direction; - var x = input.deltaX; - var y = input.deltaY; - // lock to axis? - if (!(direction & options.direction)) { - if (options.direction & DIRECTION_HORIZONTAL) { - direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT; - hasMoved = x != this.pX; - distance = Math.abs(input.deltaX); - } else { - direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN; - hasMoved = y != this.pY; - distance = Math.abs(input.deltaY); + var output = Object(target); + for (var index = 1; index < arguments.length; index++) { + var source = arguments[index]; + if (source !== undefined && source !== null) { + for (var nextKey in source) { + if (source.hasOwnProperty(nextKey)) { + output[nextKey] = source[nextKey]; + } + } } } - input.direction = direction; - return hasMoved && distance > options.threshold && direction & options.direction; - }, - - attrTest: function(input) { - return AttrRecognizer.prototype.attrTest.call(this, input) && - (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input))); - }, - - emit: function(input) { - - this.pX = input.deltaX; - this.pY = input.deltaY; - - var direction = directionStr(input.direction); + return output; + }; + } else { + assign = Object.assign; + } - if (direction) { - input.additionalEvent = this.options.event + direction; + /** + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} dest + * @param {Object} src + * @param {Boolean=false} [merge] + * @returns {Object} dest + */ + var extend = deprecate(function extend(dest, src, merge) { + var keys = Object.keys(src); + var i = 0; + while (i < keys.length) { + if (!merge || (merge && dest[keys[i]] === undefined)) { + dest[keys[i]] = src[keys[i]]; } - this._super.emit.call(this, input); + i++; } - }); + return dest; + }, 'extend', 'Use `assign`.'); /** - * Pinch - * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out). - * @constructor - * @extends AttrRecognizer + * merge the values from src in the dest. + * means that properties that exist in dest will not be overwritten by src + * @param {Object} dest + * @param {Object} src + * @returns {Object} dest */ - function PinchRecognizer() { - AttrRecognizer.apply(this, arguments); - } - - inherit(PinchRecognizer, AttrRecognizer, { - /** - * @namespace - * @memberof PinchRecognizer - */ - defaults: { - event: 'pinch', - threshold: 0, - pointers: 2 - }, + var merge = deprecate(function merge(dest, src) { + return extend(dest, src, true); + }, 'merge', 'Use `assign`.'); - getTouchAction: function() { - return [TOUCH_ACTION_NONE]; - }, + /** + * simple class inheritance + * @param {Function} child + * @param {Function} base + * @param {Object} [properties] + */ + function inherit(child, base, properties) { + var baseP = base.prototype, + childP; - attrTest: function(input) { - return this._super.attrTest.call(this, input) && - (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN); - }, + childP = child.prototype = Object.create(baseP); + childP.constructor = child; + childP._super = baseP; - emit: function(input) { - if (input.scale !== 1) { - var inOut = input.scale < 1 ? 'in' : 'out'; - input.additionalEvent = this.options.event + inOut; - } - this._super.emit.call(this, input); + if (properties) { + assign(childP, properties); } - }); + } /** - * Press - * Recognized when the pointer is down for x ms without any movement. - * @constructor - * @extends Recognizer + * simple function bind + * @param {Function} fn + * @param {Object} context + * @returns {Function} */ - function PressRecognizer() { - Recognizer.apply(this, arguments); - - this._timer = null; - this._input = null; + function bindFn(fn, context) { + return function boundFn() { + return fn.apply(context, arguments); + }; } - inherit(PressRecognizer, Recognizer, { - /** - * @namespace - * @memberof PressRecognizer - */ - defaults: { - event: 'press', - pointers: 1, - time: 251, // minimal time of the pointer to be pressed - threshold: 9 // a minimal movement is ok, but keep it low - }, - - getTouchAction: function() { - return [TOUCH_ACTION_AUTO]; - }, - - process: function(input) { - var options = this.options; - var validPointers = input.pointers.length === options.pointers; - var validMovement = input.distance < options.threshold; - var validTime = input.deltaTime > options.time; - - this._input = input; - - // we only allow little movement - // and we've reached an end event, so a tap is possible - if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) { - this.reset(); - } else if (input.eventType & INPUT_START) { - this.reset(); - this._timer = setTimeoutContext(function() { - this.state = STATE_RECOGNIZED; - this.tryEmit(); - }, options.time, this); - } else if (input.eventType & INPUT_END) { - return STATE_RECOGNIZED; - } - return STATE_FAILED; - }, - - reset: function() { - clearTimeout(this._timer); - }, - - emit: function(input) { - if (this.state !== STATE_RECOGNIZED) { - return; - } - - if (input && (input.eventType & INPUT_END)) { - this.manager.emit(this.options.event + 'up', input); - } else { - this._input.timeStamp = now(); - this.manager.emit(this.options.event, this._input); - } + /** + * let a boolean value also be a function that must return a boolean + * this first item in args will be used as the context + * @param {Boolean|Function} val + * @param {Array} [args] + * @returns {Boolean} + */ + function boolOrFn(val, args) { + if (typeof val == TYPE_FUNCTION) { + return val.apply(args ? args[0] || undefined : undefined, args); } - }); + return val; + } /** - * Rotate - * Recognized when two or more pointer are moving in a circular motion. - * @constructor - * @extends AttrRecognizer + * use the val2 when val1 is undefined + * @param {*} val1 + * @param {*} val2 + * @returns {*} */ - function RotateRecognizer() { - AttrRecognizer.apply(this, arguments); + function ifUndefined(val1, val2) { + return (val1 === undefined) ? val2 : val1; } - inherit(RotateRecognizer, AttrRecognizer, { - /** - * @namespace - * @memberof RotateRecognizer - */ - defaults: { - event: 'rotate', - threshold: 0, - pointers: 2 - }, + /** + * addEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ + function addEventListeners(target, types, handler) { + each(splitStr(types), function(type) { + target.addEventListener(type, handler, false); + }); + } - getTouchAction: function() { - return [TOUCH_ACTION_NONE]; - }, + /** + * removeEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ + function removeEventListeners(target, types, handler) { + each(splitStr(types), function(type) { + target.removeEventListener(type, handler, false); + }); + } - attrTest: function(input) { - return this._super.attrTest.call(this, input) && - (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN); + /** + * find if a node is in the given parent + * @method hasParent + * @param {HTMLElement} node + * @param {HTMLElement} parent + * @return {Boolean} found + */ + function hasParent(node, parent) { + while (node) { + if (node == parent) { + return true; + } + node = node.parentNode; } - }); + return false; + } /** - * Swipe - * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction. - * @constructor - * @extends AttrRecognizer + * small indexOf wrapper + * @param {String} str + * @param {String} find + * @returns {Boolean} found */ - function SwipeRecognizer() { - AttrRecognizer.apply(this, arguments); + function inStr(str, find) { + return str.indexOf(find) > -1; } - inherit(SwipeRecognizer, AttrRecognizer, { - /** - * @namespace - * @memberof SwipeRecognizer - */ - defaults: { - event: 'swipe', - threshold: 10, - velocity: 0.3, - direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL, - pointers: 1 - }, - - getTouchAction: function() { - return PanRecognizer.prototype.getTouchAction.call(this); - }, - - attrTest: function(input) { - var direction = this.options.direction; - var velocity; - - if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) { - velocity = input.overallVelocity; - } else if (direction & DIRECTION_HORIZONTAL) { - velocity = input.overallVelocityX; - } else if (direction & DIRECTION_VERTICAL) { - velocity = input.overallVelocityY; - } - - return this._super.attrTest.call(this, input) && - direction & input.offsetDirection && - input.distance > this.options.threshold && - input.maxPointers == this.options.pointers && - abs(velocity) > this.options.velocity && input.eventType & INPUT_END; - }, + /** + * split string on whitespace + * @param {String} str + * @returns {Array} words + */ + function splitStr(str) { + return str.trim().split(/\s+/g); + } - emit: function(input) { - var direction = directionStr(input.offsetDirection); - if (direction) { - this.manager.emit(this.options.event + direction, input); + /** + * find if a array contains the object using indexOf or a simple polyFill + * @param {Array} src + * @param {String} find + * @param {String} [findByKey] + * @return {Boolean|Number} false when not found, or the index + */ + function inArray(src, find, findByKey) { + if (src.indexOf && !findByKey) { + return src.indexOf(find); + } else { + var i = 0; + while (i < src.length) { + if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) { + return i; + } + i++; } - - this.manager.emit(this.options.event, input); + return -1; } - }); + } /** - * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur - * between the given interval and position. The delay option can be used to recognize multi-taps without firing - * a single tap. - * - * The eventData from the emitted event contains the property `tapCount`, which contains the amount of - * multi-taps being recognized. - * @constructor - * @extends Recognizer + * convert array-like objects to real arrays + * @param {Object} obj + * @returns {Array} */ - function TapRecognizer() { - Recognizer.apply(this, arguments); - - // previous time and center, - // used for tap counting - this.pTime = false; - this.pCenter = false; - - this._timer = null; - this._input = null; - this.count = 0; + function toArray(obj) { + return Array.prototype.slice.call(obj, 0); } - inherit(TapRecognizer, Recognizer, { - /** - * @namespace - * @memberof PinchRecognizer - */ - defaults: { - event: 'tap', - pointers: 1, - taps: 1, - interval: 300, // max time between the multi-tap taps - time: 250, // max time of the pointer to be down (like finger on the screen) - threshold: 9, // a minimal movement is ok, but keep it low - posThreshold: 10 // a multi-tap can be a bit off the initial position - }, + /** + * unique array with objects based on a key (like 'id') or just by the array's value + * @param {Array} src [{id:1},{id:2},{id:1}] + * @param {String} [key] + * @param {Boolean} [sort=False] + * @returns {Array} [{id:1},{id:2}] + */ + function uniqueArray(src, key, sort) { + var results = []; + var values = []; + var i = 0; - getTouchAction: function() { - return [TOUCH_ACTION_MANIPULATION]; - }, + while (i < src.length) { + var val = key ? src[i][key] : src[i]; + if (inArray(values, val) < 0) { + results.push(src[i]); + } + values[i] = val; + i++; + } - process: function(input) { - var options = this.options; + if (sort) { + if (!key) { + results = results.sort(); + } else { + results = results.sort(function sortUniqueArray(a, b) { + return a[key] > b[key]; + }); + } + } - var validPointers = input.pointers.length === options.pointers; - var validMovement = input.distance < options.threshold; - var validTouchTime = input.deltaTime < options.time; + return results; + } - this.reset(); + /** + * get the prefixed property + * @param {Object} obj + * @param {String} property + * @returns {String|Undefined} prefixed + */ + function prefixed(obj, property) { + var prefix, prop; + var camelProp = property[0].toUpperCase() + property.slice(1); - if ((input.eventType & INPUT_START) && (this.count === 0)) { - return this.failTimeout(); + var i = 0; + while (i < VENDOR_PREFIXES.length) { + prefix = VENDOR_PREFIXES[i]; + prop = (prefix) ? prefix + camelProp : property; + + if (prop in obj) { + return prop; } + i++; + } + return undefined; + } - // we only allow little movement - // and we've reached an end event, so a tap is possible - if (validMovement && validTouchTime && validPointers) { - if (input.eventType != INPUT_END) { - return this.failTimeout(); - } + /** + * get a unique id + * @returns {number} uniqueId + */ + var _uniqueId = 1; + function uniqueId() { + return _uniqueId++; + } - var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true; - var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold; + /** + * get the window object of an element + * @param {HTMLElement} element + * @returns {DocumentView|Window} + */ + function getWindowForElement(element) { + var doc = element.ownerDocument || element; + return (doc.defaultView || doc.parentWindow || window); + } - this.pTime = input.timeStamp; - this.pCenter = input.center; + var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i; - if (!validMultiTap || !validInterval) { - this.count = 1; - } else { - this.count += 1; - } + var SUPPORT_TOUCH = ('ontouchstart' in window); + var SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined; + var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent); - this._input = input; + var INPUT_TYPE_TOUCH = 'touch'; + var INPUT_TYPE_PEN = 'pen'; + var INPUT_TYPE_MOUSE = 'mouse'; + var INPUT_TYPE_KINECT = 'kinect'; - // if tap count matches we have recognized it, - // else it has began recognizing... - var tapCount = this.count % options.taps; - if (tapCount === 0) { - // no failing requirements, immediately trigger the tap event - // or wait as long as the multitap interval to trigger - if (!this.hasRequireFailures()) { - return STATE_RECOGNIZED; - } else { - this._timer = setTimeoutContext(function() { - this.state = STATE_RECOGNIZED; - this.tryEmit(); - }, options.interval, this); - return STATE_BEGAN; - } - } - } - return STATE_FAILED; - }, + var COMPUTE_INTERVAL = 25; - failTimeout: function() { - this._timer = setTimeoutContext(function() { - this.state = STATE_FAILED; - }, this.options.interval, this); - return STATE_FAILED; - }, + var INPUT_START = 1; + var INPUT_MOVE = 2; + var INPUT_END = 4; + var INPUT_CANCEL = 8; - reset: function() { - clearTimeout(this._timer); - }, + var DIRECTION_NONE = 1; + var DIRECTION_LEFT = 2; + var DIRECTION_RIGHT = 4; + var DIRECTION_UP = 8; + var DIRECTION_DOWN = 16; - emit: function() { - if (this.state == STATE_RECOGNIZED) { - this._input.tapCount = this.count; - this.manager.emit(this.options.event, this._input); - } - } - }); + var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT; + var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN; + var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL; + + var PROPS_XY = ['x', 'y']; + var PROPS_CLIENT_XY = ['clientX', 'clientY']; /** - * Simple way to create a manager with a default set of recognizers. - * @param {HTMLElement} element - * @param {Object} [options] + * create new input type manager + * @param {Manager} manager + * @param {Function} callback + * @returns {Input} * @constructor */ - function Hammer(element, options) { - options = options || {}; - options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset); - return new Manager(element, options); - } + function Input(manager, callback) { + var self = this; + this.manager = manager; + this.callback = callback; + this.element = manager.element; + this.target = manager.options.inputTarget; - /** - * @const {string} - */ - Hammer.VERSION = '2.0.6'; + // smaller wrapper around the handler, for the scope and the enabled state of the manager, + // so when disabled the input events are completely bypassed. + this.domHandler = function(ev) { + if (boolOrFn(manager.options.enable, [manager])) { + self.handler(ev); + } + }; - /** - * default settings - * @namespace - */ - Hammer.defaults = { - /** - * set if DOM events are being triggered. - * But this is slower and unused by simple implementations, so disabled by default. - * @type {Boolean} - * @default false - */ - domEvents: false, + this.init(); - /** - * The value for the touchAction property/fallback. - * When set to `compute` it will magically set the correct value based on the added recognizers. - * @type {String} - * @default compute - */ - touchAction: TOUCH_ACTION_COMPUTE, + } + Input.prototype = { /** - * @type {Boolean} - * @default true + * should handle the inputEvent data and trigger the callback + * @virtual */ - enable: true, + handler: function() { }, /** - * EXPERIMENTAL FEATURE -- can be removed/changed - * Change the parent input target element. - * If Null, then it is being set the to main element. - * @type {Null|EventTarget} - * @default null + * bind the events */ - inputTarget: null, + init: function() { + this.evEl && addEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + }, /** - * force an input class - * @type {Null|Function} - * @default null + * unbind the events */ - inputClass: null, + destroy: function() { + this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + } + }; - /** - * Default recognizer setup when calling `Hammer()` - * When creating a new Manager these will be skipped. - * @type {Array} - */ - preset: [ - // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...] - [RotateRecognizer, {enable: false}], - [PinchRecognizer, {enable: false}, ['rotate']], - [SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}], - [PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']], - [TapRecognizer], - [TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']], - [PressRecognizer] - ], + /** + * create new input type manager + * called by the Manager constructor + * @param {Hammer} manager + * @returns {Input} + */ + function createInputInstance(manager) { + var Type; + var inputClass = manager.options.inputClass; - /** - * Some CSS properties can be used to improve the working of Hammer. - * Add them to this method and they will be set when creating a new Manager. - * @namespace - */ - cssProps: { - /** - * Disables text selection to improve the dragging gesture. Mainly for desktop browsers. - * @type {String} - * @default 'none' - */ - userSelect: 'none', + if (inputClass) { + Type = inputClass; + } else if (SUPPORT_POINTER_EVENTS) { + Type = PointerEventInput; + } else if (SUPPORT_ONLY_TOUCH) { + Type = TouchInput; + } else if (!SUPPORT_TOUCH) { + Type = MouseInput; + } else { + Type = TouchMouseInput; + } + return new (Type)(manager, inputHandler); + } - /** - * Disable the Windows Phone grippers when pressing an element. - * @type {String} - * @default 'none' - */ - touchSelect: 'none', + /** + * handle input events + * @param {Manager} manager + * @param {String} eventType + * @param {Object} input + */ + function inputHandler(manager, eventType, input) { + var pointersLen = input.pointers.length; + var changedPointersLen = input.changedPointers.length; + var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0)); + var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0)); - /** - * Disables the default callout shown when you touch and hold a touch target. - * On iOS, when you touch and hold a touch target such as a link, Safari displays - * a callout containing information about the link. This property allows you to disable that callout. - * @type {String} - * @default 'none' - */ - touchCallout: 'none', + input.isFirst = !!isFirst; + input.isFinal = !!isFinal; - /** - * Specifies whether zooming is enabled. Used by IE10> - * @type {String} - * @default 'none' - */ - contentZooming: 'none', + if (isFirst) { + manager.session = {}; + } - /** - * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers. - * @type {String} - * @default 'none' - */ - userDrag: 'none', + // source event is the normalized value of the domEvents + // like 'touchstart, mouseup, pointerdown' + input.eventType = eventType; - /** - * Overrides the highlight color shown when the user taps a link or a JavaScript - * clickable element in iOS. This property obeys the alpha value, if specified. - * @type {String} - * @default 'rgba(0,0,0,0)' - */ - tapHighlightColor: 'rgba(0,0,0,0)' - } - }; + // compute scale, rotation etc + computeInputData(manager, input); - var STOP = 1; - var FORCED_STOP = 2; + // emit secret event + manager.emit('hammer.input', input); + + manager.recognize(input); + manager.session.prevInput = input; + } /** - * Manager - * @param {HTMLElement} element - * @param {Object} [options] - * @constructor + * extend the data with some usable properties like scale, rotate, velocity etc + * @param {Object} manager + * @param {Object} input */ - function Manager(element, options) { - this.options = assign({}, Hammer.defaults, options || {}); + function computeInputData(manager, input) { + var session = manager.session; + var pointers = input.pointers; + var pointersLength = pointers.length; - this.options.inputTarget = this.options.inputTarget || element; + // store the first input to calculate the distance and direction + if (!session.firstInput) { + session.firstInput = simpleCloneInputData(input); + } - this.handlers = {}; - this.session = {}; - this.recognizers = []; + // to compute scale and rotation we need to store the multiple touches + if (pointersLength > 1 && !session.firstMultiple) { + session.firstMultiple = simpleCloneInputData(input); + } else if (pointersLength === 1) { + session.firstMultiple = false; + } - this.element = element; - this.input = createInputInstance(this); - this.touchAction = new TouchAction(this, this.options.touchAction); + var firstInput = session.firstInput; + var firstMultiple = session.firstMultiple; + var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center; - toggleCssProps(this, true); + var center = input.center = getCenter(pointers); + input.timeStamp = now(); + input.deltaTime = input.timeStamp - firstInput.timeStamp; - each(this.options.recognizers, function(item) { - var recognizer = this.add(new (item[0])(item[1])); - item[2] && recognizer.recognizeWith(item[2]); - item[3] && recognizer.requireFailure(item[3]); - }, this); - } + input.angle = getAngle(offsetCenter, center); + input.distance = getDistance(offsetCenter, center); - Manager.prototype = { - /** - * set options - * @param {Object} options - * @returns {Manager} - */ - set: function(options) { - assign(this.options, options); + computeDeltaXY(session, input); + input.offsetDirection = getDirection(input.deltaX, input.deltaY); - // Options that need a little more setup - if (options.touchAction) { - this.touchAction.update(); - } - if (options.inputTarget) { - // Clean up existing event listeners and reinitialize - this.input.destroy(); - this.input.target = options.inputTarget; - this.input.init(); - } - return this; - }, - - /** - * stop recognizing for this session. - * This session will be discarded, when a new [input]start event is fired. - * When forced, the recognizer cycle is stopped immediately. - * @param {Boolean} [force] - */ - stop: function(force) { - this.session.stopped = force ? FORCED_STOP : STOP; - }, - - /** - * run the recognizers! - * called by the inputHandler function on every movement of the pointers (touches) - * it walks through all the recognizers and tries to detect the gesture that is being made - * @param {Object} inputData - */ - recognize: function(inputData) { - var session = this.session; - if (session.stopped) { - return; - } - - // run the touch-action polyfill - this.touchAction.preventDefaults(inputData); - - var recognizer; - var recognizers = this.recognizers; - - // this holds the recognizer that is being recognized. - // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED - // if no recognizer is detecting a thing, it is set to `null` - var curRecognizer = session.curRecognizer; - - // reset when the last recognizer is recognized - // or when we're in a new session - if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) { - curRecognizer = session.curRecognizer = null; - } + var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY); + input.overallVelocityX = overallVelocity.x; + input.overallVelocityY = overallVelocity.y; + input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y; - var i = 0; - while (i < recognizers.length) { - recognizer = recognizers[i]; + input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1; + input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0; - // find out if we are allowed try to recognize the input for this one. - // 1. allow if the session is NOT forced stopped (see the .stop() method) - // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one - // that is being recognized. - // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer. - // this can be setup with the `recognizeWith()` method on the recognizer. - if (session.stopped !== FORCED_STOP && ( // 1 - !curRecognizer || recognizer == curRecognizer || // 2 - recognizer.canRecognizeWith(curRecognizer))) { // 3 - recognizer.recognize(inputData); - } else { - recognizer.reset(); - } + input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length > + session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers); - // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the - // current active recognizer. but only if we don't already have an active recognizer - if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) { - curRecognizer = session.curRecognizer = recognizer; - } - i++; - } - }, + computeIntervalInputData(session, input); - /** - * get a recognizer by its event name. - * @param {Recognizer|String} recognizer - * @returns {Recognizer|Null} - */ - get: function(recognizer) { - if (recognizer instanceof Recognizer) { - return recognizer; - } + // find the correct target + var target = manager.element; + if (hasParent(input.srcEvent.target, target)) { + target = input.srcEvent.target; + } + input.target = target; + } - var recognizers = this.recognizers; - for (var i = 0; i < recognizers.length; i++) { - if (recognizers[i].options.event == recognizer) { - return recognizers[i]; - } - } - return null; - }, + function computeDeltaXY(session, input) { + var center = input.center; + var offset = session.offsetDelta || {}; + var prevDelta = session.prevDelta || {}; + var prevInput = session.prevInput || {}; - /** - * add a recognizer to the manager - * existing recognizers with the same event name will be removed - * @param {Recognizer} recognizer - * @returns {Recognizer|Manager} - */ - add: function(recognizer) { - if (invokeArrayArg(recognizer, 'add', this)) { - return this; - } + if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) { + prevDelta = session.prevDelta = { + x: prevInput.deltaX || 0, + y: prevInput.deltaY || 0 + }; - // remove existing - var existing = this.get(recognizer.options.event); - if (existing) { - this.remove(existing); - } + offset = session.offsetDelta = { + x: center.x, + y: center.y + }; + } - this.recognizers.push(recognizer); - recognizer.manager = this; + input.deltaX = prevDelta.x + (center.x - offset.x); + input.deltaY = prevDelta.y + (center.y - offset.y); + } - this.touchAction.update(); - return recognizer; - }, + /** + * velocity is calculated every x ms + * @param {Object} session + * @param {Object} input + */ + function computeIntervalInputData(session, input) { + var last = session.lastInterval || input, + deltaTime = input.timeStamp - last.timeStamp, + velocity, velocityX, velocityY, direction; - /** - * remove a recognizer by name or instance - * @param {Recognizer|String} recognizer - * @returns {Manager} - */ - remove: function(recognizer) { - if (invokeArrayArg(recognizer, 'remove', this)) { - return this; - } + if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) { + var deltaX = input.deltaX - last.deltaX; + var deltaY = input.deltaY - last.deltaY; - recognizer = this.get(recognizer); + var v = getVelocity(deltaTime, deltaX, deltaY); + velocityX = v.x; + velocityY = v.y; + velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y; + direction = getDirection(deltaX, deltaY); - // let's make sure this recognizer exists - if (recognizer) { - var recognizers = this.recognizers; - var index = inArray(recognizers, recognizer); + session.lastInterval = input; + } else { + // use latest velocity info if it doesn't overtake a minimum period + velocity = last.velocity; + velocityX = last.velocityX; + velocityY = last.velocityY; + direction = last.direction; + } - if (index !== -1) { - recognizers.splice(index, 1); - this.touchAction.update(); - } - } + input.velocity = velocity; + input.velocityX = velocityX; + input.velocityY = velocityY; + input.direction = direction; + } - return this; - }, + /** + * create a simple clone from the input used for storage of firstInput and firstMultiple + * @param {Object} input + * @returns {Object} clonedInputData + */ + function simpleCloneInputData(input) { + // make a simple copy of the pointers because we will get a reference if we don't + // we only need clientXY for the calculations + var pointers = []; + var i = 0; + while (i < input.pointers.length) { + pointers[i] = { + clientX: round(input.pointers[i].clientX), + clientY: round(input.pointers[i].clientY) + }; + i++; + } - /** - * bind event - * @param {String} events - * @param {Function} handler - * @returns {EventEmitter} this - */ - on: function(events, handler) { - var handlers = this.handlers; - each(splitStr(events), function(event) { - handlers[event] = handlers[event] || []; - handlers[event].push(handler); - }); - return this; - }, + return { + timeStamp: now(), + pointers: pointers, + center: getCenter(pointers), + deltaX: input.deltaX, + deltaY: input.deltaY + }; + } - /** - * unbind event, leave emit blank to remove all handlers - * @param {String} events - * @param {Function} [handler] - * @returns {EventEmitter} this - */ - off: function(events, handler) { - var handlers = this.handlers; - each(splitStr(events), function(event) { - if (!handler) { - delete handlers[event]; - } else { - handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1); - } - }); - return this; - }, + /** + * get the center of all the pointers + * @param {Array} pointers + * @return {Object} center contains `x` and `y` properties + */ + function getCenter(pointers) { + var pointersLength = pointers.length; - /** - * emit event to the listeners - * @param {String} event - * @param {Object} data - */ - emit: function(event, data) { - // we also want to trigger dom events - if (this.options.domEvents) { - triggerDomEvent(event, data); - } + // no need to loop when only one touch + if (pointersLength === 1) { + return { + x: round(pointers[0].clientX), + y: round(pointers[0].clientY) + }; + } - // no handlers, so skip it all - var handlers = this.handlers[event] && this.handlers[event].slice(); - if (!handlers || !handlers.length) { - return; - } + var x = 0, y = 0, i = 0; + while (i < pointersLength) { + x += pointers[i].clientX; + y += pointers[i].clientY; + i++; + } - data.type = event; - data.preventDefault = function() { - data.srcEvent.preventDefault(); - }; + return { + x: round(x / pointersLength), + y: round(y / pointersLength) + }; + } - var i = 0; - while (i < handlers.length) { - handlers[i](data); - i++; - } - }, + /** + * calculate the velocity between two points. unit is in px per ms. + * @param {Number} deltaTime + * @param {Number} x + * @param {Number} y + * @return {Object} velocity `x` and `y` + */ + function getVelocity(deltaTime, x, y) { + return { + x: x / deltaTime || 0, + y: y / deltaTime || 0 + }; + } - /** - * destroy the manager and unbinds all events - * it doesn't unbind dom events, that is the user own responsibility - */ - destroy: function() { - this.element && toggleCssProps(this, false); + /** + * get the direction between two points + * @param {Number} x + * @param {Number} y + * @return {Number} direction + */ + function getDirection(x, y) { + if (x === y) { + return DIRECTION_NONE; + } - this.handlers = {}; - this.session = {}; - this.input.destroy(); - this.element = null; + if (abs(x) >= abs(y)) { + return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; } - }; + return y < 0 ? DIRECTION_UP : DIRECTION_DOWN; + } /** - * add/remove the css properties as defined in manager.options.cssProps - * @param {Manager} manager - * @param {Boolean} add + * calculate the absolute distance between two points + * @param {Object} p1 {x, y} + * @param {Object} p2 {x, y} + * @param {Array} [props] containing x and y keys + * @return {Number} distance */ - function toggleCssProps(manager, add) { - var element = manager.element; - if (!element.style) { - return; + function getDistance(p1, p2, props) { + if (!props) { + props = PROPS_XY; } - each(manager.options.cssProps, function(value, name) { - element.style[prefixed(element.style, name)] = add ? value : ''; - }); + var x = p2[props[0]] - p1[props[0]], + y = p2[props[1]] - p1[props[1]]; + + return Math.sqrt((x * x) + (y * y)); } /** - * trigger dom event - * @param {String} event - * @param {Object} data + * calculate the angle between two coordinates + * @param {Object} p1 + * @param {Object} p2 + * @param {Array} [props] containing x and y keys + * @return {Number} angle */ - function triggerDomEvent(event, data) { - var gestureEvent = document.createEvent('Event'); - gestureEvent.initEvent(event, true, true); - gestureEvent.gesture = data; - data.target.dispatchEvent(gestureEvent); + function getAngle(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + var x = p2[props[0]] - p1[props[0]], + y = p2[props[1]] - p1[props[1]]; + return Math.atan2(y, x) * 180 / Math.PI; } - assign(Hammer, { - INPUT_START: INPUT_START, - INPUT_MOVE: INPUT_MOVE, - INPUT_END: INPUT_END, - INPUT_CANCEL: INPUT_CANCEL, - - STATE_POSSIBLE: STATE_POSSIBLE, - STATE_BEGAN: STATE_BEGAN, - STATE_CHANGED: STATE_CHANGED, - STATE_ENDED: STATE_ENDED, - STATE_RECOGNIZED: STATE_RECOGNIZED, - STATE_CANCELLED: STATE_CANCELLED, - STATE_FAILED: STATE_FAILED, - - DIRECTION_NONE: DIRECTION_NONE, - DIRECTION_LEFT: DIRECTION_LEFT, - DIRECTION_RIGHT: DIRECTION_RIGHT, - DIRECTION_UP: DIRECTION_UP, - DIRECTION_DOWN: DIRECTION_DOWN, - DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL, - DIRECTION_VERTICAL: DIRECTION_VERTICAL, - DIRECTION_ALL: DIRECTION_ALL, + /** + * calculate the rotation degrees between two pointersets + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} rotation + */ + function getRotation(start, end) { + return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY); + } - Manager: Manager, - Input: Input, - TouchAction: TouchAction, + /** + * calculate the scale factor between two pointersets + * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} scale + */ + function getScale(start, end) { + return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY); + } - TouchInput: TouchInput, - MouseInput: MouseInput, - PointerEventInput: PointerEventInput, - TouchMouseInput: TouchMouseInput, - SingleTouchInput: SingleTouchInput, + var MOUSE_INPUT_MAP = { + mousedown: INPUT_START, + mousemove: INPUT_MOVE, + mouseup: INPUT_END + }; - Recognizer: Recognizer, - AttrRecognizer: AttrRecognizer, - Tap: TapRecognizer, - Pan: PanRecognizer, - Swipe: SwipeRecognizer, - Pinch: PinchRecognizer, - Rotate: RotateRecognizer, - Press: PressRecognizer, + var MOUSE_ELEMENT_EVENTS = 'mousedown'; + var MOUSE_WINDOW_EVENTS = 'mousemove mouseup'; - on: addEventListeners, - off: removeEventListeners, - each: each, - merge: merge, - extend: extend, - assign: assign, - inherit: inherit, - bindFn: bindFn, - prefixed: prefixed - }); + /** + * Mouse events input + * @constructor + * @extends Input + */ + function MouseInput() { + this.evEl = MOUSE_ELEMENT_EVENTS; + this.evWin = MOUSE_WINDOW_EVENTS; - // this prevents errors when Hammer is loaded in the presence of an AMD - // style loader but by script tag, not by the loader. - var freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line - freeGlobal.Hammer = Hammer; + this.allow = true; // used by Input.TouchMouse to disable mouse events + this.pressed = false; // mousedown state - if (true) { - !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { - return Hammer; - }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else if (typeof module != 'undefined' && module.exports) { - module.exports = Hammer; - } else { - window[exportName] = Hammer; + Input.apply(this, arguments); } - })(window, document, 'Hammer'); + inherit(MouseInput, Input, { + /** + * handle mouse events + * @param {Object} ev + */ + handler: function MEhandler(ev) { + var eventType = MOUSE_INPUT_MAP[ev.type]; + // on start we want to have the left mouse button down + if (eventType & INPUT_START && ev.button === 0) { + this.pressed = true; + } -/***/ }, -/* 23 */ -/***/ function(module, exports, __webpack_require__) { + if (eventType & INPUT_MOVE && ev.which !== 1) { + eventType = INPUT_END; + } - 'use strict'; + // mouse must be down, and mouse events are allowed (see the TouchMouse input) + if (!this.pressed || !this.allow) { + return; + } - var util = __webpack_require__(1); - var hammerUtil = __webpack_require__(24); - var moment = __webpack_require__(2); - var Component = __webpack_require__(25); - var DateUtil = __webpack_require__(26); + if (eventType & INPUT_END) { + this.pressed = false; + } - /** - * @constructor Range - * A Range controls a numeric range with a start and end value. - * The Range adjusts the range based on mouse events or programmatic changes, - * and triggers events when the range is changing or has been changed. - * @param {{dom: Object, domProps: Object, emitter: Emitter}} body - * @param {Object} [options] See description at Range.setOptions - */ - function Range(body, options) { - var now = moment().hours(0).minutes(0).seconds(0).milliseconds(0); - this.start = now.clone().add(-3, 'days').valueOf(); // Number - this.end = now.clone().add(4, 'days').valueOf(); // Number - - this.body = body; - this.deltaDifference = 0; - this.scaleOffset = 0; - this.startToFront = false; - this.endToFront = true; - - // default options - this.defaultOptions = { - start: null, - end: null, - moment: moment, - direction: 'horizontal', // 'horizontal' or 'vertical' - moveable: true, - zoomable: true, - min: null, - max: null, - zoomMin: 10, // milliseconds - zoomMax: 1000 * 60 * 60 * 24 * 365 * 10000 // milliseconds - }; - this.options = util.extend({}, this.defaultOptions); - - this.props = { - touch: {} - }; - this.animationTimer = null; + this.callback(this.manager, eventType, { + pointers: [ev], + changedPointers: [ev], + pointerType: INPUT_TYPE_MOUSE, + srcEvent: ev + }); + } + }); - // drag listeners for dragging - this.body.emitter.on('panstart', this._onDragStart.bind(this)); - this.body.emitter.on('panmove', this._onDrag.bind(this)); - this.body.emitter.on('panend', this._onDragEnd.bind(this)); + var POINTER_INPUT_MAP = { + pointerdown: INPUT_START, + pointermove: INPUT_MOVE, + pointerup: INPUT_END, + pointercancel: INPUT_CANCEL, + pointerout: INPUT_CANCEL + }; - // mouse wheel for zooming - this.body.emitter.on('mousewheel', this._onMouseWheel.bind(this)); + // in IE10 the pointer types is defined as an enum + var IE10_POINTER_TYPE_ENUM = { + 2: INPUT_TYPE_TOUCH, + 3: INPUT_TYPE_PEN, + 4: INPUT_TYPE_MOUSE, + 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816 + }; - // pinch to zoom - this.body.emitter.on('touch', this._onTouch.bind(this)); - this.body.emitter.on('pinch', this._onPinch.bind(this)); + var POINTER_ELEMENT_EVENTS = 'pointerdown'; + var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; - this.setOptions(options); + // IE10 has prefixed support, and case-sensitive + if (window.MSPointerEvent && !window.PointerEvent) { + POINTER_ELEMENT_EVENTS = 'MSPointerDown'; + POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel'; } - Range.prototype = new Component(); - /** - * Set options for the range controller - * @param {Object} options Available options: - * {Number | Date | String} start Start date for the range - * {Number | Date | String} end End date for the range - * {Number} min Minimum value for start - * {Number} max Maximum value for end - * {Number} zoomMin Set a minimum value for - * (end - start). - * {Number} zoomMax Set a maximum value for - * (end - start). - * {Boolean} moveable Enable moving of the range - * by dragging. True by default - * {Boolean} zoomable Enable zooming of the range - * by pinching/scrolling. True by default + * Pointer events input + * @constructor + * @extends Input */ - Range.prototype.setOptions = function (options) { - if (options) { - // copy the options that we know - var fields = ['direction', 'min', 'max', 'zoomMin', 'zoomMax', 'moveable', 'zoomable', 'moment', 'activate', 'hiddenDates', 'zoomKey']; - util.selectiveExtend(fields, this.options, options); + function PointerEventInput() { + this.evEl = POINTER_ELEMENT_EVENTS; + this.evWin = POINTER_WINDOW_EVENTS; - if ('start' in options || 'end' in options) { - // apply a new range. both start and end are optional - this.setRange(options.start, options.end); - } - } - }; + Input.apply(this, arguments); - /** - * Test whether direction has a valid value - * @param {String} direction 'horizontal' or 'vertical' - */ - function validateDirection(direction) { - if (direction != 'horizontal' && direction != 'vertical') { - throw new TypeError('Unknown direction "' + direction + '". ' + 'Choose "horizontal" or "vertical".'); - } + this.store = (this.manager.session.pointerEvents = []); } - /** - * Set a new start and end range - * @param {Date | Number | String} [start] - * @param {Date | Number | String} [end] - * @param {boolean | {duration: number, easingFunction: string}} [animation=false] - * If true (default), the range is animated - * smoothly to the new window. An object can be - * provided to specify duration and easing function. - * Default duration is 500 ms, and default easing - * function is 'easeInOutQuad'. - * @param {Boolean} [byUser=false] - * - */ - Range.prototype.setRange = function (start, end, animation, byUser) { - if (byUser !== true) { - byUser = false; - } - var finalStart = start != undefined ? util.convert(start, 'Date').valueOf() : null; - var finalEnd = end != undefined ? util.convert(end, 'Date').valueOf() : null; - this._cancelAnimation(); + inherit(PointerEventInput, Input, { + /** + * handle mouse events + * @param {Object} ev + */ + handler: function PEhandler(ev) { + var store = this.store; + var removePointer = false; - if (animation) { - // true or an Object - var me = this; - var initStart = this.start; - var initEnd = this.end; - var duration = typeof animation === 'object' && 'duration' in animation ? animation.duration : 500; - var easingName = typeof animation === 'object' && 'easingFunction' in animation ? animation.easingFunction : 'easeInOutQuad'; - var easingFunction = util.easingFunctions[easingName]; - if (!easingFunction) { - throw new Error('Unknown easing function ' + JSON.stringify(easingName) + '. ' + 'Choose from: ' + Object.keys(util.easingFunctions).join(', ')); - } + var eventTypeNormalized = ev.type.toLowerCase().replace('ms', ''); + var eventType = POINTER_INPUT_MAP[eventTypeNormalized]; + var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType; - var initTime = new Date().valueOf(); - var anyChanged = false; + var isTouch = (pointerType == INPUT_TYPE_TOUCH); - var next = function next() { - if (!me.props.touch.dragging) { - var now = new Date().valueOf(); - var time = now - initTime; - var ease = easingFunction(time / duration); - var done = time > duration; - var s = done || finalStart === null ? finalStart : initStart + (finalStart - initStart) * ease; - var e = done || finalEnd === null ? finalEnd : initEnd + (finalEnd - initEnd) * ease; + // get index of the event in the store + var storeIndex = inArray(store, ev.pointerId, 'pointerId'); - changed = me._applyRange(s, e); - DateUtil.updateHiddenDates(me.options.moment, me.body, me.options.hiddenDates); - anyChanged = anyChanged || changed; - if (changed) { - me.body.emitter.emit('rangechange', { start: new Date(me.start), end: new Date(me.end), byUser: byUser }); + // start and mouse must be down + if (eventType & INPUT_START && (ev.button === 0 || isTouch)) { + if (storeIndex < 0) { + store.push(ev); + storeIndex = store.length - 1; + } + } else if (eventType & (INPUT_END | INPUT_CANCEL)) { + removePointer = true; } - if (done) { - if (anyChanged) { - me.body.emitter.emit('rangechanged', { start: new Date(me.start), end: new Date(me.end), byUser: byUser }); - } - } else { - // animate with as high as possible frame rate, leave 20 ms in between - // each to prevent the browser from blocking - me.animationTimer = setTimeout(next, 20); + // it not found, so the pointer hasn't been down (so it's probably a hover) + if (storeIndex < 0) { + return; } - } - }; - return next(); - } else { - var changed = this._applyRange(finalStart, finalEnd); - DateUtil.updateHiddenDates(this.options.moment, this.body, this.options.hiddenDates); - if (changed) { - var params = { start: new Date(this.start), end: new Date(this.end), byUser: byUser }; - this.body.emitter.emit('rangechange', params); - this.body.emitter.emit('rangechanged', params); + // update the event in the store + store[storeIndex] = ev; + + this.callback(this.manager, eventType, { + pointers: store, + changedPointers: [ev], + pointerType: pointerType, + srcEvent: ev + }); + + if (removePointer) { + // remove from the store + store.splice(storeIndex, 1); + } } - } - }; + }); - /** - * Stop an animation - * @private - */ - Range.prototype._cancelAnimation = function () { - if (this.animationTimer) { - clearTimeout(this.animationTimer); - this.animationTimer = null; - } + var SINGLE_TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL }; + var SINGLE_TOUCH_TARGET_EVENTS = 'touchstart'; + var SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel'; + /** - * Set a new start and end range. This method is the same as setRange, but - * does not trigger a range change and range changed event, and it returns - * true when the range is changed - * @param {Number} [start] - * @param {Number} [end] - * @return {Boolean} changed - * @private + * Touch events input + * @constructor + * @extends Input */ - Range.prototype._applyRange = function (start, end) { - var newStart = start != null ? util.convert(start, 'Date').valueOf() : this.start, - newEnd = end != null ? util.convert(end, 'Date').valueOf() : this.end, - max = this.options.max != null ? util.convert(this.options.max, 'Date').valueOf() : null, - min = this.options.min != null ? util.convert(this.options.min, 'Date').valueOf() : null, - diff; + function SingleTouchInput() { + this.evTarget = SINGLE_TOUCH_TARGET_EVENTS; + this.evWin = SINGLE_TOUCH_WINDOW_EVENTS; + this.started = false; - // check for valid number - if (isNaN(newStart) || newStart === null) { - throw new Error('Invalid start "' + start + '"'); - } - if (isNaN(newEnd) || newEnd === null) { - throw new Error('Invalid end "' + end + '"'); - } + Input.apply(this, arguments); + } - // prevent start < end - if (newEnd < newStart) { - newEnd = newStart; - } + inherit(SingleTouchInput, Input, { + handler: function TEhandler(ev) { + var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; - // prevent start < min - if (min !== null) { - if (newStart < min) { - diff = min - newStart; - newStart += diff; - newEnd += diff; + // should we handle the touch events? + if (type === INPUT_START) { + this.started = true; + } - // prevent end > max - if (max != null) { - if (newEnd > max) { - newEnd = max; + if (!this.started) { + return; } - } - } - } - // prevent end > max - if (max !== null) { - if (newEnd > max) { - diff = newEnd - max; - newStart -= diff; - newEnd -= diff; + var touches = normalizeSingleTouches.call(this, ev, type); - // prevent start < min - if (min != null) { - if (newStart < min) { - newStart = min; + // when done, reset the started state + if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) { + this.started = false; } - } - } - } - // prevent (end-start) < zoomMin - if (this.options.zoomMin !== null) { - var zoomMin = parseFloat(this.options.zoomMin); - if (zoomMin < 0) { - zoomMin = 0; - } - if (newEnd - newStart < zoomMin) { - if (this.end - this.start === zoomMin && newStart > this.start && newEnd < this.end) { - // ignore this action, we are already zoomed to the minimum - newStart = this.start; - newEnd = this.end; - } else { - // zoom to the minimum - diff = zoomMin - (newEnd - newStart); - newStart -= diff / 2; - newEnd += diff / 2; - } + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); } - } + }); - // prevent (end-start) > zoomMax - if (this.options.zoomMax !== null) { - var zoomMax = parseFloat(this.options.zoomMax); - if (zoomMax < 0) { - zoomMax = 0; - } + /** + * @this {TouchInput} + * @param {Object} ev + * @param {Number} type flag + * @returns {undefined|Array} [all, changed] + */ + function normalizeSingleTouches(ev, type) { + var all = toArray(ev.touches); + var changed = toArray(ev.changedTouches); - if (newEnd - newStart > zoomMax) { - if (this.end - this.start === zoomMax && newStart < this.start && newEnd > this.end) { - // ignore this action, we are already zoomed to the maximum - newStart = this.start; - newEnd = this.end; - } else { - // zoom to the maximum - diff = newEnd - newStart - zoomMax; - newStart += diff / 2; - newEnd -= diff / 2; - } + if (type & (INPUT_END | INPUT_CANCEL)) { + all = uniqueArray(all.concat(changed), 'identifier', true); } - } - - var changed = this.start != newStart || this.end != newEnd; - - // if the new range does NOT overlap with the old range, emit checkRangedItems to avoid not showing ranged items (ranged meaning has end time, not necessarily of type Range) - if (!(newStart >= this.start && newStart <= this.end || newEnd >= this.start && newEnd <= this.end) && !(this.start >= newStart && this.start <= newEnd || this.end >= newStart && this.end <= newEnd)) { - this.body.emitter.emit('checkRangedItems'); - } - - this.start = newStart; - this.end = newEnd; - return changed; - }; - /** - * Retrieve the current range. - * @return {Object} An object with start and end properties - */ - Range.prototype.getRange = function () { - return { - start: this.start, - end: this.end - }; - }; + return [all, changed]; + } - /** - * Calculate the conversion offset and scale for current range, based on - * the provided width - * @param {Number} width - * @returns {{offset: number, scale: number}} conversion - */ - Range.prototype.conversion = function (width, totalHidden) { - return Range.conversion(this.start, this.end, width, totalHidden); + var TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL }; - /** - * Static method to calculate the conversion offset and scale for a range, - * based on the provided start, end, and width - * @param {Number} start - * @param {Number} end - * @param {Number} width - * @returns {{offset: number, scale: number}} conversion - */ - Range.conversion = function (start, end, width, totalHidden) { - if (totalHidden === undefined) { - totalHidden = 0; - } - if (width != 0 && end - start != 0) { - return { - offset: start, - scale: width / (end - start - totalHidden) - }; - } else { - return { - offset: 0, - scale: 1 - }; - } - }; + var TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel'; /** - * Start dragging horizontally or vertically - * @param {Event} event - * @private + * Multi-user touch events input + * @constructor + * @extends Input */ - Range.prototype._onDragStart = function (event) { - this.deltaDifference = 0; - this.previousDelta = 0; - - // only allow dragging when configured as movable - if (!this.options.moveable) return; - - // only start dragging when the mouse is inside the current range - if (!this._isInsideRange(event)) return; + function TouchInput() { + this.evTarget = TOUCH_TARGET_EVENTS; + this.targetIds = {}; - // refuse to drag when we where pinching to prevent the timeline make a jump - // when releasing the fingers in opposite order from the touch screen - if (!this.props.touch.allowDragging) return; + Input.apply(this, arguments); + } - this.props.touch.start = this.start; - this.props.touch.end = this.end; - this.props.touch.dragging = true; + inherit(TouchInput, Input, { + handler: function MTEhandler(ev) { + var type = TOUCH_INPUT_MAP[ev.type]; + var touches = getTouches.call(this, ev, type); + if (!touches) { + return; + } - if (this.body.dom.root) { - this.body.dom.root.style.cursor = 'move'; - } - }; + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + } + }); /** - * Perform dragging operation - * @param {Event} event - * @private + * @this {TouchInput} + * @param {Object} ev + * @param {Number} type flag + * @returns {undefined|Array} [all, changed] */ - Range.prototype._onDrag = function (event) { - if (!this.props.touch.dragging) return; + function getTouches(ev, type) { + var allTouches = toArray(ev.touches); + var targetIds = this.targetIds; - // only allow dragging when configured as movable - if (!this.options.moveable) return; + // when there is only one touch, the process can be simplified + if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) { + targetIds[allTouches[0].identifier] = true; + return [allTouches, allTouches]; + } - // TODO: this may be redundant in hammerjs2 - // refuse to drag when we where pinching to prevent the timeline make a jump - // when releasing the fingers in opposite order from the touch screen - if (!this.props.touch.allowDragging) return; + var i, + targetTouches, + changedTouches = toArray(ev.changedTouches), + changedTargetTouches = [], + target = this.target; - var direction = this.options.direction; - validateDirection(direction); - var delta = direction == 'horizontal' ? event.deltaX : event.deltaY; - delta -= this.deltaDifference; - var interval = this.props.touch.end - this.props.touch.start; + // get target touches from touches + targetTouches = allTouches.filter(function(touch) { + return hasParent(touch.target, target); + }); - // normalize dragging speed if cutout is in between. - var duration = DateUtil.getHiddenDurationBetween(this.body.hiddenDates, this.start, this.end); - interval -= duration; + // collect touches + if (type === INPUT_START) { + i = 0; + while (i < targetTouches.length) { + targetIds[targetTouches[i].identifier] = true; + i++; + } + } - var width = direction == 'horizontal' ? this.body.domProps.center.width : this.body.domProps.center.height; - var diffRange = -delta / width * interval; - var newStart = this.props.touch.start + diffRange; - var newEnd = this.props.touch.end + diffRange; - - // snapping times away from hidden zones - var safeStart = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newStart, this.previousDelta - delta, true); - var safeEnd = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newEnd, this.previousDelta - delta, true); - if (safeStart != newStart || safeEnd != newEnd) { - this.deltaDifference += delta; - this.props.touch.start = safeStart; - this.props.touch.end = safeEnd; - this._onDrag(event); - return; - } + // filter changed touches to only contain touches that exist in the collected target ids + i = 0; + while (i < changedTouches.length) { + if (targetIds[changedTouches[i].identifier]) { + changedTargetTouches.push(changedTouches[i]); + } - this.previousDelta = delta; - this._applyRange(newStart, newEnd); + // cleanup removed touches + if (type & (INPUT_END | INPUT_CANCEL)) { + delete targetIds[changedTouches[i].identifier]; + } + i++; + } - var startDate = new Date(this.start); - var endDate = new Date(this.end); + if (!changedTargetTouches.length) { + return; + } - // fire a rangechange event - this.body.emitter.emit('rangechange', { - start: startDate, - end: endDate, - byUser: true - }); - }; + return [ + // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel' + uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), + changedTargetTouches + ]; + } /** - * Stop dragging operation - * @param {event} event - * @private + * Combined touch and mouse input + * + * Touch has a higher priority then mouse, and while touching no mouse events are allowed. + * This because touch devices also emit mouse events while doing a touch. + * + * @constructor + * @extends Input */ - Range.prototype._onDragEnd = function (event) { - if (!this.props.touch.dragging) return; - - // only allow dragging when configured as movable - if (!this.options.moveable) return; - - // TODO: this may be redundant in hammerjs2 - // refuse to drag when we where pinching to prevent the timeline make a jump - // when releasing the fingers in opposite order from the touch screen - if (!this.props.touch.allowDragging) return; - - this.props.touch.dragging = false; - if (this.body.dom.root) { - this.body.dom.root.style.cursor = 'auto'; - } - - // fire a rangechanged event - this.body.emitter.emit('rangechanged', { - start: new Date(this.start), - end: new Date(this.end), - byUser: true - }); - }; + function TouchMouseInput() { + Input.apply(this, arguments); - /** - * Event handler for mouse wheel event, used to zoom - * Code from http://adomas.org/javascript-mouse-wheel/ - * @param {Event} event - * @private - */ - Range.prototype._onMouseWheel = function (event) { - // only allow zooming when configured as zoomable and moveable - if (!(this.options.zoomable && this.options.moveable)) return; + var handler = bindFn(this.handler, this); + this.touch = new TouchInput(this.manager, handler); + this.mouse = new MouseInput(this.manager, handler); + } - // only zoom when the mouse is inside the current range - if (!this._isInsideRange(event)) return; + inherit(TouchMouseInput, Input, { + /** + * handle mouse and touch events + * @param {Hammer} manager + * @param {String} inputEvent + * @param {Object} inputData + */ + handler: function TMEhandler(manager, inputEvent, inputData) { + var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH), + isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE); - // only zoom when the according key is pressed and the zoomKey option is set - if (this.options.zoomKey && !event[this.options.zoomKey]) return; + // when we're in a touch event, so block all upcoming mouse events + // most mobile browser also emit mouseevents, right after touchstart + if (isTouch) { + this.mouse.allow = false; + } else if (isMouse && !this.mouse.allow) { + return; + } - // retrieve delta - var delta = 0; - if (event.wheelDelta) { - /* IE/Opera. */ - delta = event.wheelDelta / 120; - } else if (event.detail) { - /* Mozilla case. */ - // In Mozilla, sign of delta is different than in IE. - // Also, delta is multiple of 3. - delta = -event.detail / 3; - } + // reset the allowMouse when we're done + if (inputEvent & (INPUT_END | INPUT_CANCEL)) { + this.mouse.allow = true; + } - // If delta is nonzero, handle it. - // Basically, delta is now positive if wheel was scrolled up, - // and negative, if wheel was scrolled down. - if (delta) { - // perform the zoom action. Delta is normally 1 or -1 + this.callback(manager, inputEvent, inputData); + }, - // adjust a negative delta such that zooming in with delta 0.1 - // equals zooming out with a delta -0.1 - var scale; - if (delta < 0) { - scale = 1 - delta / 5; - } else { - scale = 1 / (1 + delta / 5); + /** + * remove the event listeners + */ + destroy: function destroy() { + this.touch.destroy(); + this.mouse.destroy(); } + }); - // calculate center, the date to zoom around - var pointer = getPointer({ x: event.clientX, y: event.clientY }, this.body.dom.center); - var pointerDate = this._pointerToDate(pointer); - - this.zoom(scale, pointerDate, delta); - } - - // Prevent default actions caused by mouse wheel - // (else the page and timeline both zoom and scroll) - event.preventDefault(); - }; + var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction'); + var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined; - /** - * Start of a touch gesture - * @private - */ - Range.prototype._onTouch = function (event) { - this.props.touch.start = this.start; - this.props.touch.end = this.end; - this.props.touch.allowDragging = true; - this.props.touch.center = null; - this.scaleOffset = 0; - this.deltaDifference = 0; - }; + // magical touchAction value + var TOUCH_ACTION_COMPUTE = 'compute'; + var TOUCH_ACTION_AUTO = 'auto'; + var TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented + var TOUCH_ACTION_NONE = 'none'; + var TOUCH_ACTION_PAN_X = 'pan-x'; + var TOUCH_ACTION_PAN_Y = 'pan-y'; /** - * Handle pinch event - * @param {Event} event - * @private + * Touch Action + * sets the touchAction property or uses the js alternative + * @param {Manager} manager + * @param {String} value + * @constructor */ - Range.prototype._onPinch = function (event) { - // only allow zooming when configured as zoomable and moveable - if (!(this.options.zoomable && this.options.moveable)) return; + function TouchAction(manager, value) { + this.manager = manager; + this.set(value); + } - this.props.touch.allowDragging = false; + TouchAction.prototype = { + /** + * set the touchAction value on the element or enable the polyfill + * @param {String} value + */ + set: function(value) { + // find out the touch-action by the event handlers + if (value == TOUCH_ACTION_COMPUTE) { + value = this.compute(); + } - if (!this.props.touch.center) { - this.props.touch.center = getPointer(event.center, this.body.dom.center); - } + if (NATIVE_TOUCH_ACTION && this.manager.element.style) { + this.manager.element.style[PREFIXED_TOUCH_ACTION] = value; + } + this.actions = value.toLowerCase().trim(); + }, - var scale = 1 / (event.scale + this.scaleOffset); - var centerDate = this._pointerToDate(this.props.touch.center); + /** + * just re-set the touchAction value + */ + update: function() { + this.set(this.manager.options.touchAction); + }, - var hiddenDuration = DateUtil.getHiddenDurationBetween(this.body.hiddenDates, this.start, this.end); - var hiddenDurationBefore = DateUtil.getHiddenDurationBefore(this.options.moment, this.body.hiddenDates, this, centerDate); - var hiddenDurationAfter = hiddenDuration - hiddenDurationBefore; + /** + * compute the value for the touchAction property based on the recognizer's settings + * @returns {String} value + */ + compute: function() { + var actions = []; + each(this.manager.recognizers, function(recognizer) { + if (boolOrFn(recognizer.options.enable, [recognizer])) { + actions = actions.concat(recognizer.getTouchAction()); + } + }); + return cleanTouchActions(actions.join(' ')); + }, - // calculate new start and end - var newStart = centerDate - hiddenDurationBefore + (this.props.touch.start - (centerDate - hiddenDurationBefore)) * scale; - var newEnd = centerDate + hiddenDurationAfter + (this.props.touch.end - (centerDate + hiddenDurationAfter)) * scale; + /** + * this method is called on each input cycle and provides the preventing of the browser behavior + * @param {Object} input + */ + preventDefaults: function(input) { + // not needed with native support for the touchAction property + if (NATIVE_TOUCH_ACTION) { + return; + } - // snapping times away from hidden zones - this.startToFront = 1 - scale <= 0; // used to do the right auto correction with periodic hidden times - this.endToFront = scale - 1 <= 0; // used to do the right auto correction with periodic hidden times + var srcEvent = input.srcEvent; + var direction = input.offsetDirection; - var safeStart = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newStart, 1 - scale, true); - var safeEnd = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newEnd, scale - 1, true); - if (safeStart != newStart || safeEnd != newEnd) { - this.props.touch.start = safeStart; - this.props.touch.end = safeEnd; - this.scaleOffset = 1 - event.scale; - newStart = safeStart; - newEnd = safeEnd; - } + // if the touch action did prevented once this session + if (this.manager.session.prevented) { + srcEvent.preventDefault(); + return; + } - this.setRange(newStart, newEnd, false, true); + var actions = this.actions; + var hasNone = inStr(actions, TOUCH_ACTION_NONE); + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); - this.startToFront = false; // revert to default - this.endToFront = true; // revert to default - }; + if (hasNone) { + //do not prevent defaults if this is a tap gesture - /** - * Test whether the mouse from a mouse event is inside the visible window, - * between the current start and end date - * @param {Object} event - * @return {boolean} Returns true when inside the visible window - * @private - */ - Range.prototype._isInsideRange = function (event) { - // calculate the time where the mouse is, check whether inside - // and no scroll action should happen. - var clientX = event.center ? event.center.x : event.clientX; - var x = clientX - util.getAbsoluteLeft(this.body.dom.centerContainer); - var time = this.body.util.toTime(x); + var isTapPointer = input.pointers.length === 1; + var isTapMovement = input.distance < 2; + var isTapTouchTime = input.deltaTime < 250; - return time >= this.start && time <= this.end; - }; + if (isTapPointer && isTapMovement && isTapTouchTime) { + return; + } + } - /** - * Helper function to calculate the center date for zooming - * @param {{x: Number, y: Number}} pointer - * @return {number} date - * @private - */ - Range.prototype._pointerToDate = function (pointer) { - var conversion; - var direction = this.options.direction; + if (hasPanX && hasPanY) { + // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent + return; + } - validateDirection(direction); + if (hasNone || + (hasPanY && direction & DIRECTION_HORIZONTAL) || + (hasPanX && direction & DIRECTION_VERTICAL)) { + return this.preventSrc(srcEvent); + } + }, - if (direction == 'horizontal') { - return this.body.util.toTime(pointer.x).valueOf(); - } else { - var height = this.body.domProps.center.height; - conversion = this.conversion(height); - return pointer.y / conversion.scale + conversion.offset; - } + /** + * call preventDefault to prevent the browser's default behavior (scrolling in most cases) + * @param {Object} srcEvent + */ + preventSrc: function(srcEvent) { + this.manager.session.prevented = true; + srcEvent.preventDefault(); + } }; /** - * Get the pointer location relative to the location of the dom element - * @param {{x: Number, y: Number}} touch - * @param {Element} element HTML DOM element - * @return {{x: Number, y: Number}} pointer - * @private - */ - function getPointer(touch, element) { - return { - x: touch.x - util.getAbsoluteLeft(element), - y: touch.y - util.getAbsoluteTop(element) - }; - } - - /** - * Zoom the range the given scale in or out. Start and end date will - * be adjusted, and the timeline will be redrawn. You can optionally give a - * date around which to zoom. - * For example, try scale = 0.9 or 1.1 - * @param {Number} scale Scaling factor. Values above 1 will zoom out, - * values below 1 will zoom in. - * @param {Number} [center] Value representing a date around which will - * be zoomed. + * when the touchActions are collected they are not a valid value, so we need to clean things up. * + * @param {String} actions + * @returns {*} */ - Range.prototype.zoom = function (scale, center, delta) { - // if centerDate is not provided, take it half between start Date and end Date - if (center == null) { - center = (this.start + this.end) / 2; - } + function cleanTouchActions(actions) { + // none + if (inStr(actions, TOUCH_ACTION_NONE)) { + return TOUCH_ACTION_NONE; + } - var hiddenDuration = DateUtil.getHiddenDurationBetween(this.body.hiddenDates, this.start, this.end); - var hiddenDurationBefore = DateUtil.getHiddenDurationBefore(this.options.moment, this.body.hiddenDates, this, center); - var hiddenDurationAfter = hiddenDuration - hiddenDurationBefore; + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); - // calculate new start and end - var newStart = center - hiddenDurationBefore + (this.start - (center - hiddenDurationBefore)) * scale; - var newEnd = center + hiddenDurationAfter + (this.end - (center + hiddenDurationAfter)) * scale; + // if both pan-x and pan-y are set (different recognizers + // for different directions, e.g. horizontal pan but vertical swipe?) + // we need none (as otherwise with pan-x pan-y combined none of these + // recognizers will work, since the browser would handle all panning + if (hasPanX && hasPanY) { + return TOUCH_ACTION_NONE; + } - // snapping times away from hidden zones - this.startToFront = delta > 0 ? false : true; // used to do the right autocorrection with periodic hidden times - this.endToFront = -delta > 0 ? false : true; // used to do the right autocorrection with periodic hidden times - var safeStart = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newStart, delta, true); - var safeEnd = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newEnd, -delta, true); - if (safeStart != newStart || safeEnd != newEnd) { - newStart = safeStart; - newEnd = safeEnd; - } + // pan-x OR pan-y + if (hasPanX || hasPanY) { + return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y; + } - this.setRange(newStart, newEnd, false, true); + // manipulation + if (inStr(actions, TOUCH_ACTION_MANIPULATION)) { + return TOUCH_ACTION_MANIPULATION; + } - this.startToFront = false; // revert to default - this.endToFront = true; // revert to default - }; + return TOUCH_ACTION_AUTO; + } /** - * Move the range with a given delta to the left or right. Start and end - * value will be adjusted. For example, try delta = 0.1 or -0.1 - * @param {Number} delta Moving amount. Positive value will move right, - * negative value will move left + * Recognizer flow explained; * + * All recognizers have the initial state of POSSIBLE when a input session starts. + * The definition of a input session is from the first input until the last input, with all it's movement in it. * + * Example session for mouse-input: mousedown -> mousemove -> mouseup + * + * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed + * which determines with state it should be. + * + * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to + * POSSIBLE to give it another change on the next cycle. + * + * Possible + * | + * +-----+---------------+ + * | | + * +-----+-----+ | + * | | | + * Failed Cancelled | + * +-------+------+ + * | | + * Recognized Began + * | + * Changed + * | + * Ended/Recognized */ - Range.prototype.move = function (delta) { - // zoom start Date and end Date relative to the centerDate - var diff = this.end - this.start; - - // apply new values - var newStart = this.start + diff * delta; - var newEnd = this.end + diff * delta; - - // TODO: reckon with min and max range - - this.start = newStart; - this.end = newEnd; - }; + var STATE_POSSIBLE = 1; + var STATE_BEGAN = 2; + var STATE_CHANGED = 4; + var STATE_ENDED = 8; + var STATE_RECOGNIZED = STATE_ENDED; + var STATE_CANCELLED = 16; + var STATE_FAILED = 32; /** - * Move the range to a new center point - * @param {Number} moveTo New center point of the range + * Recognizer + * Every recognizer needs to extend from this class. + * @constructor + * @param {Object} options */ - Range.prototype.moveTo = function (moveTo) { - var center = (this.start + this.end) / 2; + function Recognizer(options) { + this.options = assign({}, this.defaults, options || {}); - var diff = center - moveTo; + this.id = uniqueId(); - // calculate new start and end - var newStart = this.start - diff; - var newEnd = this.end - diff; + this.manager = null; - this.setRange(newStart, newEnd); - }; + // default is enable true + this.options.enable = ifUndefined(this.options.enable, true); - module.exports = Range; + this.state = STATE_POSSIBLE; -/***/ }, -/* 24 */ -/***/ function(module, exports, __webpack_require__) { + this.simultaneous = {}; + this.requireFail = []; + } - 'use strict'; + Recognizer.prototype = { + /** + * @virtual + * @type {Object} + */ + defaults: {}, - var Hammer = __webpack_require__(20); + /** + * set options + * @param {Object} options + * @return {Recognizer} + */ + set: function(options) { + assign(this.options, options); - /** - * Register a touch event, taking place before a gesture - * @param {Hammer} hammer A hammer instance - * @param {function} callback Callback, called as callback(event) - */ - exports.onTouch = function (hammer, callback) { - callback.inputHandler = function (event) { - if (event.isFirst) { - callback(event); - } - }; + // also update the touchAction, in case something changed about the directions/enabled state + this.manager && this.manager.touchAction.update(); + return this; + }, - hammer.on('hammer.input', callback.inputHandler); - }; + /** + * recognize simultaneous with an other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + recognizeWith: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) { + return this; + } - /** - * Register a release event, taking place after a gesture - * @param {Hammer} hammer A hammer instance - * @param {function} callback Callback, called as callback(event) - */ - exports.onRelease = function (hammer, callback) { - callback.inputHandler = function (event) { - if (event.isFinal) { - callback(event); - } - }; + var simultaneous = this.simultaneous; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + if (!simultaneous[otherRecognizer.id]) { + simultaneous[otherRecognizer.id] = otherRecognizer; + otherRecognizer.recognizeWith(this); + } + return this; + }, - return hammer.on('hammer.input', callback.inputHandler); - }; + /** + * drop the simultaneous link. it doesnt remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + dropRecognizeWith: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) { + return this; + } - /** - * Unregister a touch event, taking place before a gesture - * @param {Hammer} hammer A hammer instance - * @param {function} callback Callback, called as callback(event) - */ - exports.offTouch = function (hammer, callback) { - hammer.off('hammer.input', callback.inputHandler); - }; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + delete this.simultaneous[otherRecognizer.id]; + return this; + }, - /** - * Unregister a release event, taking place before a gesture - * @param {Hammer} hammer A hammer instance - * @param {function} callback Callback, called as callback(event) - */ - exports.offRelease = exports.offTouch; + /** + * recognizer can only run when an other is failing + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + requireFailure: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) { + return this; + } -/***/ }, -/* 25 */ -/***/ function(module, exports) { + var requireFail = this.requireFail; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + if (inArray(requireFail, otherRecognizer) === -1) { + requireFail.push(otherRecognizer); + otherRecognizer.requireFailure(this); + } + return this; + }, - /** - * Prototype for visual components - * @param {{dom: Object, domProps: Object, emitter: Emitter, range: Range}} [body] - * @param {Object} [options] - */ - "use strict"; + /** + * drop the requireFailure link. it does not remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + dropRequireFailure: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) { + return this; + } - function Component(body, options) { - this.options = null; - this.props = null; - } + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + var index = inArray(this.requireFail, otherRecognizer); + if (index > -1) { + this.requireFail.splice(index, 1); + } + return this; + }, - /** - * Set options for the component. The new options will be merged into the - * current options. - * @param {Object} options - */ - Component.prototype.setOptions = function (options) { - if (options) { - util.extend(this.options, options); - } + /** + * has require failures boolean + * @returns {boolean} + */ + hasRequireFailures: function() { + return this.requireFail.length > 0; + }, + + /** + * if the recognizer can recognize simultaneous with an other recognizer + * @param {Recognizer} otherRecognizer + * @returns {Boolean} + */ + canRecognizeWith: function(otherRecognizer) { + return !!this.simultaneous[otherRecognizer.id]; + }, + + /** + * You should use `tryEmit` instead of `emit` directly to check + * that all the needed recognizers has failed before emitting. + * @param {Object} input + */ + emit: function(input) { + var self = this; + var state = this.state; + + function emit(event) { + self.manager.emit(event, input); + } + + // 'panstart' and 'panmove' + if (state < STATE_ENDED) { + emit(self.options.event + stateStr(state)); + } + + emit(self.options.event); // simple 'eventName' events + + if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...) + emit(input.additionalEvent); + } + + // panend and pancancel + if (state >= STATE_ENDED) { + emit(self.options.event + stateStr(state)); + } + }, + + /** + * Check that all the require failure recognizers has failed, + * if true, it emits a gesture event, + * otherwise, setup the state to FAILED. + * @param {Object} input + */ + tryEmit: function(input) { + if (this.canEmit()) { + return this.emit(input); + } + // it's failing anyway + this.state = STATE_FAILED; + }, + + /** + * can we emit? + * @returns {boolean} + */ + canEmit: function() { + var i = 0; + while (i < this.requireFail.length) { + if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) { + return false; + } + i++; + } + return true; + }, + + /** + * update the recognizer + * @param {Object} inputData + */ + recognize: function(inputData) { + // make a new copy of the inputData + // so we can change the inputData without messing up the other recognizers + var inputDataClone = assign({}, inputData); + + // is is enabled and allow recognizing? + if (!boolOrFn(this.options.enable, [this, inputDataClone])) { + this.reset(); + this.state = STATE_FAILED; + return; + } + + // reset when we've reached the end + if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) { + this.state = STATE_POSSIBLE; + } + + this.state = this.process(inputDataClone); + + // the recognizer has recognized a gesture + // so trigger an event + if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) { + this.tryEmit(inputDataClone); + } + }, + + /** + * return the state of the recognizer + * the actual recognizing happens in this method + * @virtual + * @param {Object} inputData + * @returns {Const} STATE + */ + process: function(inputData) { }, // jshint ignore:line + + /** + * return the preferred touch-action + * @virtual + * @returns {Array} + */ + getTouchAction: function() { }, + + /** + * called when the gesture isn't allowed to recognize + * like when another is being recognized or it is disabled + * @virtual + */ + reset: function() { } }; /** - * Repaint the component - * @return {boolean} Returns true if the component is resized + * get a usable string, used as event postfix + * @param {Const} state + * @returns {String} state */ - Component.prototype.redraw = function () { - // should be implemented by the component - return false; - }; + function stateStr(state) { + if (state & STATE_CANCELLED) { + return 'cancel'; + } else if (state & STATE_ENDED) { + return 'end'; + } else if (state & STATE_CHANGED) { + return 'move'; + } else if (state & STATE_BEGAN) { + return 'start'; + } + return ''; + } /** - * Destroy the component. Cleanup DOM and event listeners + * direction cons to string + * @param {Const} direction + * @returns {String} */ - Component.prototype.destroy = function () { - // should be implemented by the component - }; + function directionStr(direction) { + if (direction == DIRECTION_DOWN) { + return 'down'; + } else if (direction == DIRECTION_UP) { + return 'up'; + } else if (direction == DIRECTION_LEFT) { + return 'left'; + } else if (direction == DIRECTION_RIGHT) { + return 'right'; + } + return ''; + } /** - * Test whether the component is resized since the last time _isResized() was - * called. - * @return {Boolean} Returns true if the component is resized - * @protected + * get a recognizer by name if it is bound to a manager + * @param {Recognizer|String} otherRecognizer + * @param {Recognizer} recognizer + * @returns {Recognizer} */ - Component.prototype._isResized = function () { - var resized = this.props._previousWidth !== this.props.width || this.props._previousHeight !== this.props.height; - - this.props._previousWidth = this.props.width; - this.props._previousHeight = this.props.height; + function getRecognizerByNameIfManager(otherRecognizer, recognizer) { + var manager = recognizer.manager; + if (manager) { + return manager.get(otherRecognizer); + } + return otherRecognizer; + } - return resized; - }; + /** + * This recognizer is just used as a base for the simple attribute recognizers. + * @constructor + * @extends Recognizer + */ + function AttrRecognizer() { + Recognizer.apply(this, arguments); + } - module.exports = Component; + inherit(AttrRecognizer, Recognizer, { + /** + * @namespace + * @memberof AttrRecognizer + */ + defaults: { + /** + * @type {Number} + * @default 1 + */ + pointers: 1 + }, -/***/ }, -/* 26 */ -/***/ function(module, exports) { + /** + * Used to check if it the recognizer receives valid input, like input.distance > 10. + * @memberof AttrRecognizer + * @param {Object} input + * @returns {Boolean} recognized + */ + attrTest: function(input) { + var optionPointers = this.options.pointers; + return optionPointers === 0 || input.pointers.length === optionPointers; + }, - - /** - * used in Core to convert the options into a volatile variable - * - * @param {function} moment - * @param {Object} body - * @param {Array | Object} hiddenDates - */ - "use strict"; + /** + * Process the input and return the state for the recognizer + * @memberof AttrRecognizer + * @param {Object} input + * @returns {*} State + */ + process: function(input) { + var state = this.state; + var eventType = input.eventType; - exports.convertHiddenOptions = function (moment, body, hiddenDates) { - if (hiddenDates && !Array.isArray(hiddenDates)) { - return exports.convertHiddenOptions(moment, body, [hiddenDates]); - } + var isRecognized = state & (STATE_BEGAN | STATE_CHANGED); + var isValid = this.attrTest(input); - body.hiddenDates = []; - if (hiddenDates) { - if (Array.isArray(hiddenDates) == true) { - for (var i = 0; i < hiddenDates.length; i++) { - if (hiddenDates[i].repeat === undefined) { - var dateItem = {}; - dateItem.start = moment(hiddenDates[i].start).toDate().valueOf(); - dateItem.end = moment(hiddenDates[i].end).toDate().valueOf(); - body.hiddenDates.push(dateItem); + // on cancel input and we've recognized before, return STATE_CANCELLED + if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) { + return state | STATE_CANCELLED; + } else if (isRecognized || isValid) { + if (eventType & INPUT_END) { + return state | STATE_ENDED; + } else if (!(state & STATE_BEGAN)) { + return STATE_BEGAN; + } + return state | STATE_CHANGED; } - } - body.hiddenDates.sort(function (a, b) { - return a.start - b.start; - }); // sort by start time + return STATE_FAILED; } - } - }; + }); /** - * create new entrees for the repeating hidden dates - * @param {function} moment - * @param {Object} body - * @param {Array | Object} hiddenDates + * Pan + * Recognized when the pointer is down and moved in the allowed direction. + * @constructor + * @extends AttrRecognizer */ - exports.updateHiddenDates = function (moment, body, hiddenDates) { - if (hiddenDates && !Array.isArray(hiddenDates)) { - return exports.updateHiddenDates(moment, body, [hiddenDates]); - } - - if (hiddenDates && body.domProps.centerContainer.width !== undefined) { - exports.convertHiddenOptions(moment, body, hiddenDates); - - var start = moment(body.range.start); - var end = moment(body.range.end); + function PanRecognizer() { + AttrRecognizer.apply(this, arguments); - var totalRange = body.range.end - body.range.start; - var pixelTime = totalRange / body.domProps.centerContainer.width; + this.pX = null; + this.pY = null; + } - for (var i = 0; i < hiddenDates.length; i++) { - if (hiddenDates[i].repeat !== undefined) { - var startDate = moment(hiddenDates[i].start); - var endDate = moment(hiddenDates[i].end); + inherit(PanRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof PanRecognizer + */ + defaults: { + event: 'pan', + threshold: 10, + pointers: 1, + direction: DIRECTION_ALL + }, - if (startDate._d == "Invalid Date") { - throw new Error("Supplied start date is not valid: " + hiddenDates[i].start); + getTouchAction: function() { + var direction = this.options.direction; + var actions = []; + if (direction & DIRECTION_HORIZONTAL) { + actions.push(TOUCH_ACTION_PAN_Y); } - if (endDate._d == "Invalid Date") { - throw new Error("Supplied end date is not valid: " + hiddenDates[i].end); + if (direction & DIRECTION_VERTICAL) { + actions.push(TOUCH_ACTION_PAN_X); } + return actions; + }, - var duration = endDate - startDate; - if (duration >= 4 * pixelTime) { - - var offset = 0; - var runUntil = end.clone(); - switch (hiddenDates[i].repeat) { - case "daily": - // case of time - if (startDate.day() != endDate.day()) { - offset = 1; - } - startDate.dayOfYear(start.dayOfYear()); - startDate.year(start.year()); - startDate.subtract(7, 'days'); + directionTest: function(input) { + var options = this.options; + var hasMoved = true; + var distance = input.distance; + var direction = input.direction; + var x = input.deltaX; + var y = input.deltaY; - endDate.dayOfYear(start.dayOfYear()); - endDate.year(start.year()); - endDate.subtract(7 - offset, 'days'); + // lock to axis? + if (!(direction & options.direction)) { + if (options.direction & DIRECTION_HORIZONTAL) { + direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT; + hasMoved = x != this.pX; + distance = Math.abs(input.deltaX); + } else { + direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN; + hasMoved = y != this.pY; + distance = Math.abs(input.deltaY); + } + } + input.direction = direction; + return hasMoved && distance > options.threshold && direction & options.direction; + }, - runUntil.add(1, 'weeks'); - break; - case "weekly": - var dayOffset = endDate.diff(startDate, 'days'); - var day = startDate.day(); + attrTest: function(input) { + return AttrRecognizer.prototype.attrTest.call(this, input) && + (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input))); + }, - // set the start date to the range.start - startDate.date(start.date()); - startDate.month(start.month()); - startDate.year(start.year()); - endDate = startDate.clone(); + emit: function(input) { - // force - startDate.day(day); - endDate.day(day); - endDate.add(dayOffset, 'days'); + this.pX = input.deltaX; + this.pY = input.deltaY; - startDate.subtract(1, 'weeks'); - endDate.subtract(1, 'weeks'); + var direction = directionStr(input.direction); - runUntil.add(1, 'weeks'); - break; - case "monthly": - if (startDate.month() != endDate.month()) { - offset = 1; - } - startDate.month(start.month()); - startDate.year(start.year()); - startDate.subtract(1, 'months'); - - endDate.month(start.month()); - endDate.year(start.year()); - endDate.subtract(1, 'months'); - endDate.add(offset, 'months'); - - runUntil.add(1, 'months'); - break; - case "yearly": - if (startDate.year() != endDate.year()) { - offset = 1; - } - startDate.year(start.year()); - startDate.subtract(1, 'years'); - endDate.year(start.year()); - endDate.subtract(1, 'years'); - endDate.add(offset, 'years'); - - runUntil.add(1, 'years'); - break; - default: - console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:", hiddenDates[i].repeat); - return; - } - while (startDate < runUntil) { - body.hiddenDates.push({ start: startDate.valueOf(), end: endDate.valueOf() }); - switch (hiddenDates[i].repeat) { - case "daily": - startDate.add(1, 'days'); - endDate.add(1, 'days'); - break; - case "weekly": - startDate.add(1, 'weeks'); - endDate.add(1, 'weeks'); - break; - case "monthly": - startDate.add(1, 'months'); - endDate.add(1, 'months'); - break; - case "yearly": - startDate.add(1, 'y'); - endDate.add(1, 'y'); - break; - default: - console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:", hiddenDates[i].repeat); - return; - } - } - body.hiddenDates.push({ start: startDate.valueOf(), end: endDate.valueOf() }); + if (direction) { + input.additionalEvent = this.options.event + direction; } - } - } - // remove duplicates, merge where possible - exports.removeDuplicates(body); - // ensure the new positions are not on hidden dates - var startHidden = exports.isHidden(body.range.start, body.hiddenDates); - var endHidden = exports.isHidden(body.range.end, body.hiddenDates); - var rangeStart = body.range.start; - var rangeEnd = body.range.end; - if (startHidden.hidden == true) { - rangeStart = body.range.startToFront == true ? startHidden.startDate - 1 : startHidden.endDate + 1; - } - if (endHidden.hidden == true) { - rangeEnd = body.range.endToFront == true ? endHidden.startDate - 1 : endHidden.endDate + 1; - } - if (startHidden.hidden == true || endHidden.hidden == true) { - body.range._applyRange(rangeStart, rangeEnd); + this._super.emit.call(this, input); } - } - }; + }); /** - * remove duplicates from the hidden dates list. Duplicates are evil. They mess everything up. - * Scales with N^2 - * @param body + * Pinch + * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out). + * @constructor + * @extends AttrRecognizer */ - exports.removeDuplicates = function (body) { - var hiddenDates = body.hiddenDates; - var safeDates = []; - for (var i = 0; i < hiddenDates.length; i++) { - for (var j = 0; j < hiddenDates.length; j++) { - if (i != j && hiddenDates[j].remove != true && hiddenDates[i].remove != true) { - // j inside i - if (hiddenDates[j].start >= hiddenDates[i].start && hiddenDates[j].end <= hiddenDates[i].end) { - hiddenDates[j].remove = true; - } - // j start inside i - else if (hiddenDates[j].start >= hiddenDates[i].start && hiddenDates[j].start <= hiddenDates[i].end) { - hiddenDates[i].end = hiddenDates[j].end; - hiddenDates[j].remove = true; - } - // j end inside i - else if (hiddenDates[j].end >= hiddenDates[i].start && hiddenDates[j].end <= hiddenDates[i].end) { - hiddenDates[i].start = hiddenDates[j].start; - hiddenDates[j].remove = true; - } - } - } - } + function PinchRecognizer() { + AttrRecognizer.apply(this, arguments); + } - for (var i = 0; i < hiddenDates.length; i++) { - if (hiddenDates[i].remove !== true) { - safeDates.push(hiddenDates[i]); - } - } + inherit(PinchRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof PinchRecognizer + */ + defaults: { + event: 'pinch', + threshold: 0, + pointers: 2 + }, - body.hiddenDates = safeDates; - body.hiddenDates.sort(function (a, b) { - return a.start - b.start; - }); // sort by start time - }; + getTouchAction: function() { + return [TOUCH_ACTION_NONE]; + }, - exports.printDates = function (dates) { - for (var i = 0; i < dates.length; i++) { - console.log(i, new Date(dates[i].start), new Date(dates[i].end), dates[i].start, dates[i].end, dates[i].remove); - } - }; + attrTest: function(input) { + return this._super.attrTest.call(this, input) && + (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN); + }, + + emit: function(input) { + if (input.scale !== 1) { + var inOut = input.scale < 1 ? 'in' : 'out'; + input.additionalEvent = this.options.event + inOut; + } + this._super.emit.call(this, input); + } + }); /** - * Used in TimeStep to avoid the hidden times. - * @param {function} moment - * @param {TimeStep} timeStep - * @param previousTime + * Press + * Recognized when the pointer is down for x ms without any movement. + * @constructor + * @extends Recognizer */ - exports.stepOverHiddenDates = function (moment, timeStep, previousTime) { - var stepInHidden = false; - var currentValue = timeStep.current.valueOf(); - for (var i = 0; i < timeStep.hiddenDates.length; i++) { - var startDate = timeStep.hiddenDates[i].start; - var endDate = timeStep.hiddenDates[i].end; - if (currentValue >= startDate && currentValue < endDate) { - stepInHidden = true; - break; - } - } + function PressRecognizer() { + Recognizer.apply(this, arguments); - if (stepInHidden == true && currentValue < timeStep._end.valueOf() && currentValue != previousTime) { - var prevValue = moment(previousTime); - var newValue = moment(endDate); - //check if the next step should be major - if (prevValue.year() != newValue.year()) { - timeStep.switchedYear = true; - } else if (prevValue.month() != newValue.month()) { - timeStep.switchedMonth = true; - } else if (prevValue.dayOfYear() != newValue.dayOfYear()) { - timeStep.switchedDay = true; - } + this._timer = null; + this._input = null; + } - timeStep.current = newValue; - } - }; + inherit(PressRecognizer, Recognizer, { + /** + * @namespace + * @memberof PressRecognizer + */ + defaults: { + event: 'press', + pointers: 1, + time: 251, // minimal time of the pointer to be pressed + threshold: 9 // a minimal movement is ok, but keep it low + }, - ///** - // * Used in TimeStep to avoid the hidden times. - // * @param timeStep - // * @param previousTime - // */ - //exports.checkFirstStep = function(timeStep) { - // var stepInHidden = false; - // var currentValue = timeStep.current.valueOf(); - // for (var i = 0; i < timeStep.hiddenDates.length; i++) { - // var startDate = timeStep.hiddenDates[i].start; - // var endDate = timeStep.hiddenDates[i].end; - // if (currentValue >= startDate && currentValue < endDate) { - // stepInHidden = true; - // break; - // } - // } - // - // if (stepInHidden == true && currentValue <= timeStep._end.valueOf()) { - // var newValue = moment(endDate); - // timeStep.current = newValue.toDate(); - // } - //}; + getTouchAction: function() { + return [TOUCH_ACTION_AUTO]; + }, - /** - * replaces the Core toScreen methods - * @param Core - * @param time - * @param width - * @returns {number} - */ - exports.toScreen = function (Core, time, width) { - if (Core.body.hiddenDates.length == 0) { - var conversion = Core.range.conversion(width); - return (time.valueOf() - conversion.offset) * conversion.scale; - } else { - var hidden = exports.isHidden(time, Core.body.hiddenDates); - if (hidden.hidden == true) { - time = hidden.startDate; - } + process: function(input) { + var options = this.options; + var validPointers = input.pointers.length === options.pointers; + var validMovement = input.distance < options.threshold; + var validTime = input.deltaTime > options.time; - var duration = exports.getHiddenDurationBetween(Core.body.hiddenDates, Core.range.start, Core.range.end); - time = exports.correctTimeForHidden(Core.options.moment, Core.body.hiddenDates, Core.range, time); + this._input = input; - var conversion = Core.range.conversion(width, duration); - return (time.valueOf() - conversion.offset) * conversion.scale; - } - }; + // we only allow little movement + // and we've reached an end event, so a tap is possible + if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) { + this.reset(); + } else if (input.eventType & INPUT_START) { + this.reset(); + this._timer = setTimeoutContext(function() { + this.state = STATE_RECOGNIZED; + this.tryEmit(); + }, options.time, this); + } else if (input.eventType & INPUT_END) { + return STATE_RECOGNIZED; + } + return STATE_FAILED; + }, - /** - * Replaces the core toTime methods - * @param body - * @param range - * @param x - * @param width - * @returns {Date} - */ - exports.toTime = function (Core, x, width) { - if (Core.body.hiddenDates.length == 0) { - var conversion = Core.range.conversion(width); - return new Date(x / conversion.scale + conversion.offset); - } else { - var hiddenDuration = exports.getHiddenDurationBetween(Core.body.hiddenDates, Core.range.start, Core.range.end); - var totalDuration = Core.range.end - Core.range.start - hiddenDuration; - var partialDuration = totalDuration * x / width; - var accumulatedHiddenDuration = exports.getAccumulatedHiddenDuration(Core.body.hiddenDates, Core.range, partialDuration); + reset: function() { + clearTimeout(this._timer); + }, - var newTime = new Date(accumulatedHiddenDuration + partialDuration + Core.range.start); - return newTime; - } - }; + emit: function(input) { + if (this.state !== STATE_RECOGNIZED) { + return; + } - /** - * Support function - * - * @param hiddenDates - * @param range - * @returns {number} - */ - exports.getHiddenDurationBetween = function (hiddenDates, start, end) { - var duration = 0; - for (var i = 0; i < hiddenDates.length; i++) { - var startDate = hiddenDates[i].start; - var endDate = hiddenDates[i].end; - // if time after the cutout, and the - if (startDate >= start && endDate < end) { - duration += endDate - startDate; + if (input && (input.eventType & INPUT_END)) { + this.manager.emit(this.options.event + 'up', input); + } else { + this._input.timeStamp = now(); + this.manager.emit(this.options.event, this._input); + } } - } - return duration; - }; + }); /** - * Support function - * @param moment - * @param hiddenDates - * @param range - * @param time - * @returns {{duration: number, time: *, offset: number}} + * Rotate + * Recognized when two or more pointer are moving in a circular motion. + * @constructor + * @extends AttrRecognizer */ - exports.correctTimeForHidden = function (moment, hiddenDates, range, time) { - time = moment(time).toDate().valueOf(); - time -= exports.getHiddenDurationBefore(moment, hiddenDates, range, time); - return time; - }; + function RotateRecognizer() { + AttrRecognizer.apply(this, arguments); + } - exports.getHiddenDurationBefore = function (moment, hiddenDates, range, time) { - var timeOffset = 0; - time = moment(time).toDate().valueOf(); + inherit(RotateRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof RotateRecognizer + */ + defaults: { + event: 'rotate', + threshold: 0, + pointers: 2 + }, - for (var i = 0; i < hiddenDates.length; i++) { - var startDate = hiddenDates[i].start; - var endDate = hiddenDates[i].end; - // if time after the cutout, and the - if (startDate >= range.start && endDate < range.end) { - if (time >= endDate) { - timeOffset += endDate - startDate; - } + getTouchAction: function() { + return [TOUCH_ACTION_NONE]; + }, + + attrTest: function(input) { + return this._super.attrTest.call(this, input) && + (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN); } - } - return timeOffset; - }; + }); /** - * sum the duration from start to finish, including the hidden duration, - * until the required amount has been reached, return the accumulated hidden duration - * @param hiddenDates - * @param range - * @param time - * @returns {{duration: number, time: *, offset: number}} + * Swipe + * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction. + * @constructor + * @extends AttrRecognizer */ - exports.getAccumulatedHiddenDuration = function (hiddenDates, range, requiredDuration) { - var hiddenDuration = 0; - var duration = 0; - var previousPoint = range.start; - //exports.printDates(hiddenDates) - for (var i = 0; i < hiddenDates.length; i++) { - var startDate = hiddenDates[i].start; - var endDate = hiddenDates[i].end; - // if time after the cutout, and the - if (startDate >= range.start && endDate < range.end) { - duration += startDate - previousPoint; - previousPoint = endDate; - if (duration >= requiredDuration) { - break; - } else { - hiddenDuration += endDate - startDate; - } - } - } + function SwipeRecognizer() { + AttrRecognizer.apply(this, arguments); + } - return hiddenDuration; - }; + inherit(SwipeRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof SwipeRecognizer + */ + defaults: { + event: 'swipe', + threshold: 10, + velocity: 0.3, + direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL, + pointers: 1 + }, - /** - * used to step over to either side of a hidden block. Correction is disabled on tablets, might be set to true - * @param hiddenDates - * @param time - * @param direction - * @param correctionEnabled - * @returns {*} - */ - exports.snapAwayFromHidden = function (hiddenDates, time, direction, correctionEnabled) { - var isHidden = exports.isHidden(time, hiddenDates); - if (isHidden.hidden == true) { - if (direction < 0) { - if (correctionEnabled == true) { - return isHidden.startDate - (isHidden.endDate - time) - 1; - } else { - return isHidden.startDate - 1; - } - } else { - if (correctionEnabled == true) { - return isHidden.endDate + (time - isHidden.startDate) + 1; - } else { - return isHidden.endDate + 1; - } - } - } else { - return time; - } - }; + getTouchAction: function() { + return PanRecognizer.prototype.getTouchAction.call(this); + }, - /** - * Check if a time is hidden - * - * @param time - * @param hiddenDates - * @returns {{hidden: boolean, startDate: Window.start, endDate: *}} - */ - exports.isHidden = function (time, hiddenDates) { - for (var i = 0; i < hiddenDates.length; i++) { - var startDate = hiddenDates[i].start; - var endDate = hiddenDates[i].end; + attrTest: function(input) { + var direction = this.options.direction; + var velocity; - if (time >= startDate && time < endDate) { - // if the start is entering a hidden zone - return { hidden: true, startDate: startDate, endDate: endDate }; - break; - } - } - return { hidden: false, startDate: startDate, endDate: endDate }; - }; + if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) { + velocity = input.overallVelocity; + } else if (direction & DIRECTION_HORIZONTAL) { + velocity = input.overallVelocityX; + } else if (direction & DIRECTION_VERTICAL) { + velocity = input.overallVelocityY; + } -/***/ }, -/* 27 */ -/***/ function(module, exports, __webpack_require__) { + return this._super.attrTest.call(this, input) && + direction & input.offsetDirection && + input.distance > this.options.threshold && + input.maxPointers == this.options.pointers && + abs(velocity) > this.options.velocity && input.eventType & INPUT_END; + }, - 'use strict'; + emit: function(input) { + var direction = directionStr(input.offsetDirection); + if (direction) { + this.manager.emit(this.options.event + direction, input); + } - var Emitter = __webpack_require__(12); - var Hammer = __webpack_require__(20); - var hammerUtil = __webpack_require__(24); - var util = __webpack_require__(1); - var DataSet = __webpack_require__(8); - var DataView = __webpack_require__(10); - var Range = __webpack_require__(23); - var ItemSet = __webpack_require__(28); - var TimeAxis = __webpack_require__(38); - var Activator = __webpack_require__(39); - var DateUtil = __webpack_require__(26); - var CustomTime = __webpack_require__(41); + this.manager.emit(this.options.event, input); + } + }); /** - * Create a timeline visualization + * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur + * between the given interval and position. The delay option can be used to recognize multi-taps without firing + * a single tap. + * + * The eventData from the emitted event contains the property `tapCount`, which contains the amount of + * multi-taps being recognized. * @constructor + * @extends Recognizer */ - function Core() {} - - // turn Core into an event emitter - Emitter(Core.prototype); - - /** - * Create the main DOM for the Core: a root panel containing left, right, - * top, bottom, content, and background panel. - * @param {Element} container The container element where the Core will - * be attached. - * @protected - */ - Core.prototype._create = function (container) { - this.dom = {}; - - this.dom.container = container; + function TapRecognizer() { + Recognizer.apply(this, arguments); - this.dom.root = document.createElement('div'); - this.dom.background = document.createElement('div'); - this.dom.backgroundVertical = document.createElement('div'); - this.dom.backgroundHorizontal = document.createElement('div'); - this.dom.centerContainer = document.createElement('div'); - this.dom.leftContainer = document.createElement('div'); - this.dom.rightContainer = document.createElement('div'); - this.dom.center = document.createElement('div'); - this.dom.left = document.createElement('div'); - this.dom.right = document.createElement('div'); - this.dom.top = document.createElement('div'); - this.dom.bottom = document.createElement('div'); - this.dom.shadowTop = document.createElement('div'); - this.dom.shadowBottom = document.createElement('div'); - this.dom.shadowTopLeft = document.createElement('div'); - this.dom.shadowBottomLeft = document.createElement('div'); - this.dom.shadowTopRight = document.createElement('div'); - this.dom.shadowBottomRight = document.createElement('div'); + // previous time and center, + // used for tap counting + this.pTime = false; + this.pCenter = false; - this.dom.root.className = 'vis-timeline'; - this.dom.background.className = 'vis-panel vis-background'; - this.dom.backgroundVertical.className = 'vis-panel vis-background vis-vertical'; - this.dom.backgroundHorizontal.className = 'vis-panel vis-background vis-horizontal'; - this.dom.centerContainer.className = 'vis-panel vis-center'; - this.dom.leftContainer.className = 'vis-panel vis-left'; - this.dom.rightContainer.className = 'vis-panel vis-right'; - this.dom.top.className = 'vis-panel vis-top'; - this.dom.bottom.className = 'vis-panel vis-bottom'; - this.dom.left.className = 'vis-content'; - this.dom.center.className = 'vis-content'; - this.dom.right.className = 'vis-content'; - this.dom.shadowTop.className = 'vis-shadow vis-top'; - this.dom.shadowBottom.className = 'vis-shadow vis-bottom'; - this.dom.shadowTopLeft.className = 'vis-shadow vis-top'; - this.dom.shadowBottomLeft.className = 'vis-shadow vis-bottom'; - this.dom.shadowTopRight.className = 'vis-shadow vis-top'; - this.dom.shadowBottomRight.className = 'vis-shadow vis-bottom'; + this._timer = null; + this._input = null; + this.count = 0; + } - this.dom.root.appendChild(this.dom.background); - this.dom.root.appendChild(this.dom.backgroundVertical); - this.dom.root.appendChild(this.dom.backgroundHorizontal); - this.dom.root.appendChild(this.dom.centerContainer); - this.dom.root.appendChild(this.dom.leftContainer); - this.dom.root.appendChild(this.dom.rightContainer); - this.dom.root.appendChild(this.dom.top); - this.dom.root.appendChild(this.dom.bottom); + inherit(TapRecognizer, Recognizer, { + /** + * @namespace + * @memberof PinchRecognizer + */ + defaults: { + event: 'tap', + pointers: 1, + taps: 1, + interval: 300, // max time between the multi-tap taps + time: 250, // max time of the pointer to be down (like finger on the screen) + threshold: 9, // a minimal movement is ok, but keep it low + posThreshold: 10 // a multi-tap can be a bit off the initial position + }, - this.dom.centerContainer.appendChild(this.dom.center); - this.dom.leftContainer.appendChild(this.dom.left); - this.dom.rightContainer.appendChild(this.dom.right); + getTouchAction: function() { + return [TOUCH_ACTION_MANIPULATION]; + }, - this.dom.centerContainer.appendChild(this.dom.shadowTop); - this.dom.centerContainer.appendChild(this.dom.shadowBottom); - this.dom.leftContainer.appendChild(this.dom.shadowTopLeft); - this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft); - this.dom.rightContainer.appendChild(this.dom.shadowTopRight); - this.dom.rightContainer.appendChild(this.dom.shadowBottomRight); + process: function(input) { + var options = this.options; - this.on('rangechange', (function () { - if (this.initialDrawDone === true) { - this._redraw(); // this allows overriding the _redraw method - } - }).bind(this)); - this.on('touch', this._onTouch.bind(this)); - this.on('pan', this._onDrag.bind(this)); + var validPointers = input.pointers.length === options.pointers; + var validMovement = input.distance < options.threshold; + var validTouchTime = input.deltaTime < options.time; - var me = this; - this.on('_change', function (properties) { - if (properties && properties.queue == true) { - // redraw once on next tick - if (!me._redrawTimer) { - me._redrawTimer = setTimeout(function () { - me._redrawTimer = null; - me._redraw(); - }, 0); - } - } else { - // redraw immediately - me._redraw(); - } - }); + this.reset(); - // create event listeners for all interesting events, these events will be - // emitted via emitter - this.hammer = new Hammer(this.dom.root); - this.hammer.get('pinch').set({ enable: true }); - this.hammer.get('pan').set({ threshold: 5, direction: 30 }); // 30 is ALL_DIRECTIONS in hammer. - this.listeners = {}; + if ((input.eventType & INPUT_START) && (this.count === 0)) { + return this.failTimeout(); + } - var events = ['tap', 'doubletap', 'press', 'pinch', 'pan', 'panstart', 'panmove', 'panend' - // TODO: cleanup - //'touch', 'pinch', - //'tap', 'doubletap', 'hold', - //'dragstart', 'drag', 'dragend', - //'mousewheel', 'DOMMouseScroll' // DOMMouseScroll is needed for Firefox - ]; - events.forEach(function (type) { - var listener = function listener(event) { - if (me.isActive()) { - me.emit(type, event); - } - }; - me.hammer.on(type, listener); - me.listeners[type] = listener; - }); + // we only allow little movement + // and we've reached an end event, so a tap is possible + if (validMovement && validTouchTime && validPointers) { + if (input.eventType != INPUT_END) { + return this.failTimeout(); + } - // emulate a touch event (emitted before the start of a pan, pinch, tap, or press) - hammerUtil.onTouch(this.hammer, (function (event) { - me.emit('touch', event); - }).bind(this)); + var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true; + var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold; - // emulate a release event (emitted after a pan, pinch, tap, or press) - hammerUtil.onRelease(this.hammer, (function (event) { - me.emit('release', event); - }).bind(this)); + this.pTime = input.timeStamp; + this.pCenter = input.center; - function onMouseWheel(event) { - if (me.isActive()) { - me.emit('mousewheel', event); - } - } - this.dom.root.addEventListener('mousewheel', onMouseWheel); - this.dom.root.addEventListener('DOMMouseScroll', onMouseWheel); + if (!validMultiTap || !validInterval) { + this.count = 1; + } else { + this.count += 1; + } - // size properties of each of the panels - this.props = { - root: {}, - background: {}, - centerContainer: {}, - leftContainer: {}, - rightContainer: {}, - center: {}, - left: {}, - right: {}, - top: {}, - bottom: {}, - border: {}, - scrollTop: 0, - scrollTopMin: 0 - }; + this._input = input; - this.customTimes = []; + // if tap count matches we have recognized it, + // else it has began recognizing... + var tapCount = this.count % options.taps; + if (tapCount === 0) { + // no failing requirements, immediately trigger the tap event + // or wait as long as the multitap interval to trigger + if (!this.hasRequireFailures()) { + return STATE_RECOGNIZED; + } else { + this._timer = setTimeoutContext(function() { + this.state = STATE_RECOGNIZED; + this.tryEmit(); + }, options.interval, this); + return STATE_BEGAN; + } + } + } + return STATE_FAILED; + }, - // store state information needed for touch events - this.touch = {}; + failTimeout: function() { + this._timer = setTimeoutContext(function() { + this.state = STATE_FAILED; + }, this.options.interval, this); + return STATE_FAILED; + }, - this.redrawCount = 0; - this.initialDrawDone = false; + reset: function() { + clearTimeout(this._timer); + }, - // attach the root panel to the provided container - if (!container) throw new Error('No container provided'); - container.appendChild(this.dom.root); - }; + emit: function() { + if (this.state == STATE_RECOGNIZED) { + this._input.tapCount = this.count; + this.manager.emit(this.options.event, this._input); + } + } + }); /** - * Set options. Options will be passed to all components loaded in the Timeline. + * Simple way to create a manager with a default set of recognizers. + * @param {HTMLElement} element * @param {Object} [options] - * {String} orientation - * Vertical orientation for the Timeline, - * can be 'bottom' (default) or 'top'. - * {String | Number} width - * Width for the timeline, a number in pixels or - * a css string like '1000px' or '75%'. '100%' by default. - * {String | Number} height - * Fixed height for the Timeline, a number in pixels or - * a css string like '400px' or '75%'. If undefined, - * The Timeline will automatically size such that - * its contents fit. - * {String | Number} minHeight - * Minimum height for the Timeline, a number in pixels or - * a css string like '400px' or '75%'. - * {String | Number} maxHeight - * Maximum height for the Timeline, a number in pixels or - * a css string like '400px' or '75%'. - * {Number | Date | String} start - * Start date for the visible window - * {Number | Date | String} end - * End date for the visible window + * @constructor */ - Core.prototype.setOptions = function (options) { - if (options) { - // copy the known options - var fields = ['width', 'height', 'minHeight', 'maxHeight', 'autoResize', 'start', 'end', 'clickToUse', 'dataAttributes', 'hiddenDates', 'locale', 'locales', 'moment', 'throttleRedraw']; - util.selectiveExtend(fields, this.options, options); + function Hammer(element, options) { + options = options || {}; + options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset); + return new Manager(element, options); + } - this.options.orientation = { item: undefined, axis: undefined }; - if ('orientation' in options) { - if (typeof options.orientation === 'string') { - this.options.orientation = { - item: options.orientation, - axis: options.orientation - }; - } else if (typeof options.orientation === 'object') { - if ('item' in options.orientation) { - this.options.orientation.item = options.orientation.item; - } - if ('axis' in options.orientation) { - this.options.orientation.axis = options.orientation.axis; - } - } - } + /** + * @const {string} + */ + Hammer.VERSION = '2.0.6'; - if (this.options.orientation.axis === 'both') { - if (!this.timeAxis2) { - var timeAxis2 = this.timeAxis2 = new TimeAxis(this.body); - timeAxis2.setOptions = function (options) { - var _options = options ? util.extend({}, options) : {}; - _options.orientation = 'top'; // override the orientation option, always top - TimeAxis.prototype.setOptions.call(timeAxis2, _options); - }; - this.components.push(timeAxis2); - } - } else { - if (this.timeAxis2) { - var index = this.components.indexOf(this.timeAxis2); - if (index !== -1) { - this.components.splice(index, 1); - } - this.timeAxis2.destroy(); - this.timeAxis2 = null; - } - } + /** + * default settings + * @namespace + */ + Hammer.defaults = { + /** + * set if DOM events are being triggered. + * But this is slower and unused by simple implementations, so disabled by default. + * @type {Boolean} + * @default false + */ + domEvents: false, - // if the graph2d's drawPoints is a function delegate the callback to the onRender property - if (typeof options.drawPoints == 'function') { - options.drawPoints = { - onRender: options.drawPoints - }; - } + /** + * The value for the touchAction property/fallback. + * When set to `compute` it will magically set the correct value based on the added recognizers. + * @type {String} + * @default compute + */ + touchAction: TOUCH_ACTION_COMPUTE, - if ('hiddenDates' in this.options) { - DateUtil.convertHiddenOptions(this.options.moment, this.body, this.options.hiddenDates); - } + /** + * @type {Boolean} + * @default true + */ + enable: true, - if ('clickToUse' in options) { - if (options.clickToUse) { - if (!this.activator) { - this.activator = new Activator(this.dom.root); - } - } else { - if (this.activator) { - this.activator.destroy(); - delete this.activator; - } - } - } + /** + * EXPERIMENTAL FEATURE -- can be removed/changed + * Change the parent input target element. + * If Null, then it is being set the to main element. + * @type {Null|EventTarget} + * @default null + */ + inputTarget: null, - if ('showCustomTime' in options) { - throw new Error('Option `showCustomTime` is deprecated. Create a custom time bar via timeline.addCustomTime(time [, id])'); - } + /** + * force an input class + * @type {Null|Function} + * @default null + */ + inputClass: null, - // enable/disable autoResize - this._initAutoResize(); - } + /** + * Default recognizer setup when calling `Hammer()` + * When creating a new Manager these will be skipped. + * @type {Array} + */ + preset: [ + // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...] + [RotateRecognizer, {enable: false}], + [PinchRecognizer, {enable: false}, ['rotate']], + [SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}], + [PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']], + [TapRecognizer], + [TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']], + [PressRecognizer] + ], - // propagate options to all components - this.components.forEach(function (component) { - return component.setOptions(options); - }); + /** + * Some CSS properties can be used to improve the working of Hammer. + * Add them to this method and they will be set when creating a new Manager. + * @namespace + */ + cssProps: { + /** + * Disables text selection to improve the dragging gesture. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userSelect: 'none', - // enable/disable configure - if ('configure' in options) { - if (!this.configurator) { - this.configurator = this._createConfigurator(); - } + /** + * Disable the Windows Phone grippers when pressing an element. + * @type {String} + * @default 'none' + */ + touchSelect: 'none', - this.configurator.setOptions(options.configure); + /** + * Disables the default callout shown when you touch and hold a touch target. + * On iOS, when you touch and hold a touch target such as a link, Safari displays + * a callout containing information about the link. This property allows you to disable that callout. + * @type {String} + * @default 'none' + */ + touchCallout: 'none', - // collect the settings of all components, and pass them to the configuration system - var appliedOptions = util.deepExtend({}, this.options); - this.components.forEach(function (component) { - util.deepExtend(appliedOptions, component.options); - }); - this.configurator.setModuleOptions({ global: appliedOptions }); - } + /** + * Specifies whether zooming is enabled. Used by IE10> + * @type {String} + * @default 'none' + */ + contentZooming: 'none', - // override redraw with a throttled version - if (!this._origRedraw) { - this._origRedraw = this._redraw.bind(this); - this._redraw = util.throttle(this._origRedraw, this.options.throttleRedraw); - } else { - // Not the initial run: redraw everything - this._redraw(); - } - }; + /** + * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userDrag: 'none', - /** - * Returns true when the Timeline is active. - * @returns {boolean} - */ - Core.prototype.isActive = function () { - return !this.activator || this.activator.active; + /** + * Overrides the highlight color shown when the user taps a link or a JavaScript + * clickable element in iOS. This property obeys the alpha value, if specified. + * @type {String} + * @default 'rgba(0,0,0,0)' + */ + tapHighlightColor: 'rgba(0,0,0,0)' + } }; + var STOP = 1; + var FORCED_STOP = 2; + /** - * Destroy the Core, clean up all DOM elements and event listeners. + * Manager + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor */ - Core.prototype.destroy = function () { - // unbind datasets - this.setItems(null); - this.setGroups(null); - - // remove all event listeners - this.off(); + function Manager(element, options) { + this.options = assign({}, Hammer.defaults, options || {}); - // stop checking for changed size - this._stopAutoResize(); + this.options.inputTarget = this.options.inputTarget || element; - // remove from DOM - if (this.dom.root.parentNode) { - this.dom.root.parentNode.removeChild(this.dom.root); - } - this.dom = null; + this.handlers = {}; + this.session = {}; + this.recognizers = []; - // remove Activator - if (this.activator) { - this.activator.destroy(); - delete this.activator; - } + this.element = element; + this.input = createInputInstance(this); + this.touchAction = new TouchAction(this, this.options.touchAction); - // cleanup hammer touch events - for (var event in this.listeners) { - if (this.listeners.hasOwnProperty(event)) { - delete this.listeners[event]; - } - } - this.listeners = null; - this.hammer = null; + toggleCssProps(this, true); - // give all components the opportunity to cleanup - this.components.forEach(function (component) { - return component.destroy(); - }); + each(this.options.recognizers, function(item) { + var recognizer = this.add(new (item[0])(item[1])); + item[2] && recognizer.recognizeWith(item[2]); + item[3] && recognizer.requireFailure(item[3]); + }, this); + } - this.body = null; - }; + Manager.prototype = { + /** + * set options + * @param {Object} options + * @returns {Manager} + */ + set: function(options) { + assign(this.options, options); - /** - * Set a custom time bar - * @param {Date} time - * @param {number} [id=undefined] Optional id of the custom time bar to be adjusted. - */ - Core.prototype.setCustomTime = function (time, id) { - var customTimes = this.customTimes.filter(function (component) { - return id === component.options.id; - }); + // Options that need a little more setup + if (options.touchAction) { + this.touchAction.update(); + } + if (options.inputTarget) { + // Clean up existing event listeners and reinitialize + this.input.destroy(); + this.input.target = options.inputTarget; + this.input.init(); + } + return this; + }, - if (customTimes.length === 0) { - throw new Error('No custom time bar found with id ' + JSON.stringify(id)); - } + /** + * stop recognizing for this session. + * This session will be discarded, when a new [input]start event is fired. + * When forced, the recognizer cycle is stopped immediately. + * @param {Boolean} [force] + */ + stop: function(force) { + this.session.stopped = force ? FORCED_STOP : STOP; + }, - if (customTimes.length > 0) { - customTimes[0].setCustomTime(time); - } - }; + /** + * run the recognizers! + * called by the inputHandler function on every movement of the pointers (touches) + * it walks through all the recognizers and tries to detect the gesture that is being made + * @param {Object} inputData + */ + recognize: function(inputData) { + var session = this.session; + if (session.stopped) { + return; + } - /** - * Retrieve the current custom time. - * @param {number} [id=undefined] Id of the custom time bar. - * @return {Date | undefined} customTime - */ - Core.prototype.getCustomTime = function (id) { - var customTimes = this.customTimes.filter(function (component) { - return component.options.id === id; - }); + // run the touch-action polyfill + this.touchAction.preventDefaults(inputData); - if (customTimes.length === 0) { - throw new Error('No custom time bar found with id ' + JSON.stringify(id)); - } - return customTimes[0].getCustomTime(); - }; + var recognizer; + var recognizers = this.recognizers; - /** - * Set a custom title for the custom time bar. - * @param {String} [title] Custom title - * @param {number} [id=undefined] Id of the custom time bar. - */ - Core.prototype.setCustomTimeTitle = function (title, id) { - var customTimes = this.customTimes.filter(function (component) { - return component.options.id === id; - }); + // this holds the recognizer that is being recognized. + // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED + // if no recognizer is detecting a thing, it is set to `null` + var curRecognizer = session.curRecognizer; - if (customTimes.length === 0) { - throw new Error('No custom time bar found with id ' + JSON.stringify(id)); - } - if (customTimes.length > 0) { - return customTimes[0].setCustomTitle(title); - } - }; + // reset when the last recognizer is recognized + // or when we're in a new session + if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) { + curRecognizer = session.curRecognizer = null; + } - /** - * Retrieve meta information from an event. - * Should be overridden by classes extending Core - * @param {Event} event - * @return {Object} An object with related information. - */ - Core.prototype.getEventProperties = function (event) { - return { event: event }; - }; + var i = 0; + while (i < recognizers.length) { + recognizer = recognizers[i]; - /** - * Add custom vertical bar - * @param {Date | String | Number} [time] A Date, unix timestamp, or - * ISO date string. Time point where - * the new bar should be placed. - * If not provided, `new Date()` will - * be used. - * @param {Number | String} [id=undefined] Id of the new bar. Optional - * @return {Number | String} Returns the id of the new bar - */ - Core.prototype.addCustomTime = function (time, id) { - var timestamp = time !== undefined ? util.convert(time, 'Date').valueOf() : new Date(); + // find out if we are allowed try to recognize the input for this one. + // 1. allow if the session is NOT forced stopped (see the .stop() method) + // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one + // that is being recognized. + // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer. + // this can be setup with the `recognizeWith()` method on the recognizer. + if (session.stopped !== FORCED_STOP && ( // 1 + !curRecognizer || recognizer == curRecognizer || // 2 + recognizer.canRecognizeWith(curRecognizer))) { // 3 + recognizer.recognize(inputData); + } else { + recognizer.reset(); + } - var exists = this.customTimes.some(function (customTime) { - return customTime.options.id === id; - }); - if (exists) { - throw new Error('A custom time with id ' + JSON.stringify(id) + ' already exists'); - } + // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the + // current active recognizer. but only if we don't already have an active recognizer + if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) { + curRecognizer = session.curRecognizer = recognizer; + } + i++; + } + }, - var customTime = new CustomTime(this.body, util.extend({}, this.options, { - time: timestamp, - id: id - })); + /** + * get a recognizer by its event name. + * @param {Recognizer|String} recognizer + * @returns {Recognizer|Null} + */ + get: function(recognizer) { + if (recognizer instanceof Recognizer) { + return recognizer; + } - this.customTimes.push(customTime); - this.components.push(customTime); - this._redraw(); + var recognizers = this.recognizers; + for (var i = 0; i < recognizers.length; i++) { + if (recognizers[i].options.event == recognizer) { + return recognizers[i]; + } + } + return null; + }, - return id; - }; + /** + * add a recognizer to the manager + * existing recognizers with the same event name will be removed + * @param {Recognizer} recognizer + * @returns {Recognizer|Manager} + */ + add: function(recognizer) { + if (invokeArrayArg(recognizer, 'add', this)) { + return this; + } - /** - * Remove previously added custom bar - * @param {int} id ID of the custom bar to be removed - * @return {boolean} True if the bar exists and is removed, false otherwise - */ - Core.prototype.removeCustomTime = function (id) { - var customTimes = this.customTimes.filter(function (bar) { - return bar.options.id === id; - }); + // remove existing + var existing = this.get(recognizer.options.event); + if (existing) { + this.remove(existing); + } - if (customTimes.length === 0) { - throw new Error('No custom time bar found with id ' + JSON.stringify(id)); - } + this.recognizers.push(recognizer); + recognizer.manager = this; - customTimes.forEach((function (customTime) { - this.customTimes.splice(this.customTimes.indexOf(customTime), 1); - this.components.splice(this.components.indexOf(customTime), 1); - customTime.destroy(); - }).bind(this)); - }; + this.touchAction.update(); + return recognizer; + }, - /** - * Get the id's of the currently visible items. - * @returns {Array} The ids of the visible items - */ - Core.prototype.getVisibleItems = function () { - return this.itemSet && this.itemSet.getVisibleItems() || []; - }; + /** + * remove a recognizer by name or instance + * @param {Recognizer|String} recognizer + * @returns {Manager} + */ + remove: function(recognizer) { + if (invokeArrayArg(recognizer, 'remove', this)) { + return this; + } - /** - * Set Core window such that it fits all items - * @param {Object} [options] Available options: - * `animation: boolean | {duration: number, easingFunction: string}` - * If true (default), the range is animated - * smoothly to the new window. An object can be - * provided to specify duration and easing function. - * Default duration is 500 ms, and default easing - * function is 'easeInOutQuad'. - */ - Core.prototype.fit = function (options) { - var range = this.getDataRange(); + recognizer = this.get(recognizer); - // skip range set if there is no min and max date - if (range.min === null && range.max === null) { - return; - } + // let's make sure this recognizer exists + if (recognizer) { + var recognizers = this.recognizers; + var index = inArray(recognizers, recognizer); - // apply a margin of 1% left and right of the data - var interval = range.max - range.min; - var min = new Date(range.min.valueOf() - interval * 0.01); - var max = new Date(range.max.valueOf() + interval * 0.01); + if (index !== -1) { + recognizers.splice(index, 1); + this.touchAction.update(); + } + } - var animation = options && options.animation !== undefined ? options.animation : true; - this.range.setRange(min, max, animation); - }; + return this; + }, - /** - * Calculate the data range of the items start and end dates - * @returns {{min: Date | null, max: Date | null}} - * @protected - */ - Core.prototype.getDataRange = function () { - // must be implemented by Timeline and Graph2d - throw new Error('Cannot invoke abstract method getDataRange'); - }; + /** + * bind event + * @param {String} events + * @param {Function} handler + * @returns {EventEmitter} this + */ + on: function(events, handler) { + var handlers = this.handlers; + each(splitStr(events), function(event) { + handlers[event] = handlers[event] || []; + handlers[event].push(handler); + }); + return this; + }, - /** - * Set the visible window. Both parameters are optional, you can change only - * start or only end. Syntax: - * - * TimeLine.setWindow(start, end) - * TimeLine.setWindow(start, end, options) - * TimeLine.setWindow(range) - * - * Where start and end can be a Date, number, or string, and range is an - * object with properties start and end. - * - * @param {Date | Number | String | Object} [start] Start date of visible window - * @param {Date | Number | String} [end] End date of visible window - * @param {Object} [options] Available options: - * `animation: boolean | {duration: number, easingFunction: string}` - * If true (default), the range is animated - * smoothly to the new window. An object can be - * provided to specify duration and easing function. - * Default duration is 500 ms, and default easing - * function is 'easeInOutQuad'. - */ - Core.prototype.setWindow = function (start, end, options) { - var animation; - if (arguments.length == 1) { - var range = arguments[0]; - animation = range.animation !== undefined ? range.animation : true; - this.range.setRange(range.start, range.end, animation); - } else { - animation = options && options.animation !== undefined ? options.animation : true; - this.range.setRange(start, end, animation); - } - }; + /** + * unbind event, leave emit blank to remove all handlers + * @param {String} events + * @param {Function} [handler] + * @returns {EventEmitter} this + */ + off: function(events, handler) { + var handlers = this.handlers; + each(splitStr(events), function(event) { + if (!handler) { + delete handlers[event]; + } else { + handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1); + } + }); + return this; + }, - /** - * Move the window such that given time is centered on screen. - * @param {Date | Number | String} time - * @param {Object} [options] Available options: - * `animation: boolean | {duration: number, easingFunction: string}` - * If true (default), the range is animated - * smoothly to the new window. An object can be - * provided to specify duration and easing function. - * Default duration is 500 ms, and default easing - * function is 'easeInOutQuad'. - */ - Core.prototype.moveTo = function (time, options) { - var interval = this.range.end - this.range.start; - var t = util.convert(time, 'Date').valueOf(); + /** + * emit event to the listeners + * @param {String} event + * @param {Object} data + */ + emit: function(event, data) { + // we also want to trigger dom events + if (this.options.domEvents) { + triggerDomEvent(event, data); + } - var start = t - interval / 2; - var end = t + interval / 2; - var animation = options && options.animation !== undefined ? options.animation : true; + // no handlers, so skip it all + var handlers = this.handlers[event] && this.handlers[event].slice(); + if (!handlers || !handlers.length) { + return; + } - this.range.setRange(start, end, animation); - }; + data.type = event; + data.preventDefault = function() { + data.srcEvent.preventDefault(); + }; - /** - * Get the visible window - * @return {{start: Date, end: Date}} Visible range - */ - Core.prototype.getWindow = function () { - var range = this.range.getRange(); - return { - start: new Date(range.start), - end: new Date(range.end) - }; + var i = 0; + while (i < handlers.length) { + handlers[i](data); + i++; + } + }, + + /** + * destroy the manager and unbinds all events + * it doesn't unbind dom events, that is the user own responsibility + */ + destroy: function() { + this.element && toggleCssProps(this, false); + + this.handlers = {}; + this.session = {}; + this.input.destroy(); + this.element = null; + } }; /** - * Force a redraw. Can be overridden by implementations of Core - * - * Note: this function will be overridden on construction with a trottled version + * add/remove the css properties as defined in manager.options.cssProps + * @param {Manager} manager + * @param {Boolean} add */ - Core.prototype.redraw = function () { - this._redraw(); - }; + function toggleCssProps(manager, add) { + var element = manager.element; + if (!element.style) { + return; + } + each(manager.options.cssProps, function(value, name) { + element.style[prefixed(element.style, name)] = add ? value : ''; + }); + } /** - * Redraw for internal use. Redraws all components. See also the public - * method redraw. - * @protected + * trigger dom event + * @param {String} event + * @param {Object} data */ - Core.prototype._redraw = function () { - this.redrawCount++; - var resized = false; - var options = this.options; - var props = this.props; - var dom = this.dom; + function triggerDomEvent(event, data) { + var gestureEvent = document.createEvent('Event'); + gestureEvent.initEvent(event, true, true); + gestureEvent.gesture = data; + data.target.dispatchEvent(gestureEvent); + } - if (!dom || !dom.container || dom.container.clientWidth == 0) return; // when destroyed, or invisible + assign(Hammer, { + INPUT_START: INPUT_START, + INPUT_MOVE: INPUT_MOVE, + INPUT_END: INPUT_END, + INPUT_CANCEL: INPUT_CANCEL, - DateUtil.updateHiddenDates(this.options.moment, this.body, this.options.hiddenDates); + STATE_POSSIBLE: STATE_POSSIBLE, + STATE_BEGAN: STATE_BEGAN, + STATE_CHANGED: STATE_CHANGED, + STATE_ENDED: STATE_ENDED, + STATE_RECOGNIZED: STATE_RECOGNIZED, + STATE_CANCELLED: STATE_CANCELLED, + STATE_FAILED: STATE_FAILED, - // update class names - if (options.orientation == 'top') { - util.addClassName(dom.root, 'vis-top'); - util.removeClassName(dom.root, 'vis-bottom'); - } else { - util.removeClassName(dom.root, 'vis-top'); - util.addClassName(dom.root, 'vis-bottom'); - } + DIRECTION_NONE: DIRECTION_NONE, + DIRECTION_LEFT: DIRECTION_LEFT, + DIRECTION_RIGHT: DIRECTION_RIGHT, + DIRECTION_UP: DIRECTION_UP, + DIRECTION_DOWN: DIRECTION_DOWN, + DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL, + DIRECTION_VERTICAL: DIRECTION_VERTICAL, + DIRECTION_ALL: DIRECTION_ALL, - // update root width and height options - dom.root.style.maxHeight = util.option.asSize(options.maxHeight, ''); - dom.root.style.minHeight = util.option.asSize(options.minHeight, ''); - dom.root.style.width = util.option.asSize(options.width, ''); + Manager: Manager, + Input: Input, + TouchAction: TouchAction, - // calculate border widths - props.border.left = (dom.centerContainer.offsetWidth - dom.centerContainer.clientWidth) / 2; - props.border.right = props.border.left; - props.border.top = (dom.centerContainer.offsetHeight - dom.centerContainer.clientHeight) / 2; - props.border.bottom = props.border.top; - var borderRootHeight = dom.root.offsetHeight - dom.root.clientHeight; - var borderRootWidth = dom.root.offsetWidth - dom.root.clientWidth; + TouchInput: TouchInput, + MouseInput: MouseInput, + PointerEventInput: PointerEventInput, + TouchMouseInput: TouchMouseInput, + SingleTouchInput: SingleTouchInput, - // workaround for a bug in IE: the clientWidth of an element with - // a height:0px and overflow:hidden is not calculated and always has value 0 - if (dom.centerContainer.clientHeight === 0) { - props.border.left = props.border.top; - props.border.right = props.border.left; - } - if (dom.root.clientHeight === 0) { - borderRootWidth = borderRootHeight; - } + Recognizer: Recognizer, + AttrRecognizer: AttrRecognizer, + Tap: TapRecognizer, + Pan: PanRecognizer, + Swipe: SwipeRecognizer, + Pinch: PinchRecognizer, + Rotate: RotateRecognizer, + Press: PressRecognizer, - // calculate the heights. If any of the side panels is empty, we set the height to - // minus the border width, such that the border will be invisible - props.center.height = dom.center.offsetHeight; - props.left.height = dom.left.offsetHeight; - props.right.height = dom.right.offsetHeight; - props.top.height = dom.top.clientHeight || -props.border.top; - props.bottom.height = dom.bottom.clientHeight || -props.border.bottom; - - // TODO: compensate borders when any of the panels is empty. - - // apply auto height - // TODO: only calculate autoHeight when needed (else we cause an extra reflow/repaint of the DOM) - var contentHeight = Math.max(props.left.height, props.center.height, props.right.height); - var autoHeight = props.top.height + contentHeight + props.bottom.height + borderRootHeight + props.border.top + props.border.bottom; - dom.root.style.height = util.option.asSize(options.height, autoHeight + 'px'); - - // calculate heights of the content panels - props.root.height = dom.root.offsetHeight; - props.background.height = props.root.height - borderRootHeight; - var containerHeight = props.root.height - props.top.height - props.bottom.height - borderRootHeight; - props.centerContainer.height = containerHeight; - props.leftContainer.height = containerHeight; - props.rightContainer.height = props.leftContainer.height; - - // calculate the widths of the panels - props.root.width = dom.root.offsetWidth; - props.background.width = props.root.width - borderRootWidth; - props.left.width = dom.leftContainer.clientWidth || -props.border.left; - props.leftContainer.width = props.left.width; - props.right.width = dom.rightContainer.clientWidth || -props.border.right; - props.rightContainer.width = props.right.width; - var centerWidth = props.root.width - props.left.width - props.right.width - borderRootWidth; - props.center.width = centerWidth; - props.centerContainer.width = centerWidth; - props.top.width = centerWidth; - props.bottom.width = centerWidth; - - // resize the panels - dom.background.style.height = props.background.height + 'px'; - dom.backgroundVertical.style.height = props.background.height + 'px'; - dom.backgroundHorizontal.style.height = props.centerContainer.height + 'px'; - dom.centerContainer.style.height = props.centerContainer.height + 'px'; - dom.leftContainer.style.height = props.leftContainer.height + 'px'; - dom.rightContainer.style.height = props.rightContainer.height + 'px'; - - dom.background.style.width = props.background.width + 'px'; - dom.backgroundVertical.style.width = props.centerContainer.width + 'px'; - dom.backgroundHorizontal.style.width = props.background.width + 'px'; - dom.centerContainer.style.width = props.center.width + 'px'; - dom.top.style.width = props.top.width + 'px'; - dom.bottom.style.width = props.bottom.width + 'px'; + on: addEventListeners, + off: removeEventListeners, + each: each, + merge: merge, + extend: extend, + assign: assign, + inherit: inherit, + bindFn: bindFn, + prefixed: prefixed + }); - // reposition the panels - dom.background.style.left = '0'; - dom.background.style.top = '0'; - dom.backgroundVertical.style.left = props.left.width + props.border.left + 'px'; - dom.backgroundVertical.style.top = '0'; - dom.backgroundHorizontal.style.left = '0'; - dom.backgroundHorizontal.style.top = props.top.height + 'px'; - dom.centerContainer.style.left = props.left.width + 'px'; - dom.centerContainer.style.top = props.top.height + 'px'; - dom.leftContainer.style.left = '0'; - dom.leftContainer.style.top = props.top.height + 'px'; - dom.rightContainer.style.left = props.left.width + props.center.width + 'px'; - dom.rightContainer.style.top = props.top.height + 'px'; - dom.top.style.left = props.left.width + 'px'; - dom.top.style.top = '0'; - dom.bottom.style.left = props.left.width + 'px'; - dom.bottom.style.top = props.top.height + props.centerContainer.height + 'px'; + // this prevents errors when Hammer is loaded in the presence of an AMD + // style loader but by script tag, not by the loader. + var freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line + freeGlobal.Hammer = Hammer; - // update the scrollTop, feasible range for the offset can be changed - // when the height of the Core or of the contents of the center changed - this._updateScrollTop(); + if (true) { + !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { + return Hammer; + }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof module != 'undefined' && module.exports) { + module.exports = Hammer; + } else { + window[exportName] = Hammer; + } - // reposition the scrollable contents - var offset = this.props.scrollTop; - if (options.orientation.item != 'top') { - offset += Math.max(this.props.centerContainer.height - this.props.center.height - this.props.border.top - this.props.border.bottom, 0); - } - dom.center.style.left = '0'; - dom.center.style.top = offset + 'px'; - dom.left.style.left = '0'; - dom.left.style.top = offset + 'px'; - dom.right.style.left = '0'; - dom.right.style.top = offset + 'px'; + })(window, document, 'Hammer'); - // show shadows when vertical scrolling is available - var visibilityTop = this.props.scrollTop == 0 ? 'hidden' : ''; - var visibilityBottom = this.props.scrollTop == this.props.scrollTopMin ? 'hidden' : ''; - dom.shadowTop.style.visibility = visibilityTop; - dom.shadowBottom.style.visibility = visibilityBottom; - dom.shadowTopLeft.style.visibility = visibilityTop; - dom.shadowBottomLeft.style.visibility = visibilityBottom; - dom.shadowTopRight.style.visibility = visibilityTop; - dom.shadowBottomRight.style.visibility = visibilityBottom; - // redraw all components - this.components.forEach(function (component) { - resized = component.redraw() || resized; - }); - var MAX_REDRAW = 5; - if (resized) { - if (this.redrawCount < MAX_REDRAW) { - this.body.emitter.emit('_change'); - return; - } else { - console.log('WARNING: infinite loop in redraw?'); - } - } else { - this.redrawCount = 0; - } - this.initialDrawDone = true; +/***/ }, +/* 25 */ +/***/ function(module, exports, __webpack_require__) { - //Emit public 'changed' event for UI updates, see issue #1592 - this.body.emitter.emit("changed"); - }; + 'use strict'; - // TODO: deprecated since version 1.1.0, remove some day - Core.prototype.repaint = function () { - throw new Error('Function repaint is deprecated. Use redraw instead.'); - }; + var Hammer = __webpack_require__(22); /** - * Set a current time. This can be used for example to ensure that a client's - * time is synchronized with a shared server time. - * Only applicable when option `showCurrentTime` is true. - * @param {Date | String | Number} time A Date, unix timestamp, or - * ISO date string. + * Register a touch event, taking place before a gesture + * @param {Hammer} hammer A hammer instance + * @param {function} callback Callback, called as callback(event) */ - Core.prototype.setCurrentTime = function (time) { - if (!this.currentTime) { - throw new Error('Option showCurrentTime must be true'); - } + exports.onTouch = function (hammer, callback) { + callback.inputHandler = function (event) { + if (event.isFirst) { + callback(event); + } + }; - this.currentTime.setCurrentTime(time); + hammer.on('hammer.input', callback.inputHandler); }; /** - * Get the current time. - * Only applicable when option `showCurrentTime` is true. - * @return {Date} Returns the current time. + * Register a release event, taking place after a gesture + * @param {Hammer} hammer A hammer instance + * @param {function} callback Callback, called as callback(event) */ - Core.prototype.getCurrentTime = function () { - if (!this.currentTime) { - throw new Error('Option showCurrentTime must be true'); - } + exports.onRelease = function (hammer, callback) { + callback.inputHandler = function (event) { + if (event.isFinal) { + callback(event); + } + }; - return this.currentTime.getCurrentTime(); + return hammer.on('hammer.input', callback.inputHandler); }; /** - * Convert a position on screen (pixels) to a datetime - * @param {int} x Position on the screen in pixels - * @return {Date} time The datetime the corresponds with given position x - * @protected + * Unregister a touch event, taking place before a gesture + * @param {Hammer} hammer A hammer instance + * @param {function} callback Callback, called as callback(event) */ - // TODO: move this function to Range - Core.prototype._toTime = function (x) { - return DateUtil.toTime(this, x, this.props.center.width); + exports.offTouch = function (hammer, callback) { + hammer.off('hammer.input', callback.inputHandler); }; /** - * Convert a position on the global screen (pixels) to a datetime - * @param {int} x Position on the screen in pixels - * @return {Date} time The datetime the corresponds with given position x - * @protected + * Unregister a release event, taking place before a gesture + * @param {Hammer} hammer A hammer instance + * @param {function} callback Callback, called as callback(event) */ - // TODO: move this function to Range - Core.prototype._toGlobalTime = function (x) { - return DateUtil.toTime(this, x, this.props.root.width); - //var conversion = this.range.conversion(this.props.root.width); - //return new Date(x / conversion.scale + conversion.offset); - }; + exports.offRelease = exports.offTouch; /** - * Convert a datetime (Date object) into a position on the screen - * @param {Date} time A date - * @return {int} x The position on the screen in pixels which corresponds - * with the given date. - * @protected + * Hack the PinchRecognizer such that it doesn't prevent default behavior + * for vertical panning. + * + * Yeah ... this is quite a hack ... see https://github.com/hammerjs/hammer.js/issues/932 + * + * @param {Hammer.Pinch} pinchRecognizer + * @return {Hammer.Pinch} returns the pinchRecognizer */ - // TODO: move this function to Range - Core.prototype._toScreen = function (time) { - return DateUtil.toScreen(this, time, this.props.center.width); - }; + exports.disablePreventDefaultVertically = function (pinchRecognizer) { + var TOUCH_ACTION_PAN_Y = 'pan-y'; - /** - * Convert a datetime (Date object) into a position on the root - * This is used to get the pixel density estimate for the screen, not the center panel - * @param {Date} time A date - * @return {int} x The position on root in pixels which corresponds - * with the given date. - * @protected - */ - // TODO: move this function to Range - Core.prototype._toGlobalScreen = function (time) { - return DateUtil.toScreen(this, time, this.props.root.width); - //var conversion = this.range.conversion(this.props.root.width); - //return (time.valueOf() - conversion.offset) * conversion.scale; - }; + pinchRecognizer.getTouchAction = function () { + // default method returns [TOUCH_ACTION_NONE] + return [TOUCH_ACTION_PAN_Y]; + }; - /** - * Initialize watching when option autoResize is true - * @private - */ - Core.prototype._initAutoResize = function () { - if (this.options.autoResize == true) { - this._startAutoResize(); - } else { - this._stopAutoResize(); - } + return pinchRecognizer; }; - /** - * Watch for changes in the size of the container. On resize, the Panel will - * automatically redraw itself. - * @private - */ - Core.prototype._startAutoResize = function () { - var me = this; - - this._stopAutoResize(); +/***/ }, +/* 26 */ +/***/ function(module, exports, __webpack_require__) { - this._onResize = function () { - if (me.options.autoResize != true) { - // stop watching when the option autoResize is changed to false - me._stopAutoResize(); - return; - } + 'use strict'; - if (me.dom.root) { - // check whether the frame is resized - // Note: we compare offsetWidth here, not clientWidth. For some reason, - // IE does not restore the clientWidth from 0 to the actual width after - // changing the timeline's container display style from none to visible - if (me.dom.root.offsetWidth != me.props.lastWidth || me.dom.root.offsetHeight != me.props.lastHeight) { - me.props.lastWidth = me.dom.root.offsetWidth; - me.props.lastHeight = me.dom.root.offsetHeight; + Object.defineProperty(exports, "__esModule", { + value: true + }); - me.body.emitter.emit('_change'); - } - } - }; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; - // add event listener to window resize - util.addEventListener(window, 'resize', this._onResize); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - //Prevent initial unnecessary redraw - if (me.dom.root) { - me.props.lastWidth = me.dom.root.offsetWidth; - me.props.lastHeight = me.dom.root.offsetHeight; - } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - this.watchTimer = setInterval(this._onResize, 1000); - }; + var util = __webpack_require__(1); + var errorFound = false; + var allOptions = void 0; + var printStyle = 'background: #FFeeee; color: #dd0000'; /** - * Stop watching for a resize of the frame. - * @private + * Used to validate options. */ - Core.prototype._stopAutoResize = function () { - if (this.watchTimer) { - clearInterval(this.watchTimer); - this.watchTimer = undefined; - } - // remove event listener on window.resize - if (this._onResize) { - util.removeEventListener(window, 'resize', this._onResize); - this._onResize = null; + var Validator = function () { + function Validator() { + _classCallCheck(this, Validator); } - }; - /** - * Start moving the timeline vertically - * @param {Event} event - * @private - */ - Core.prototype._onTouch = function (event) { - this.touch.allowDragging = true; - this.touch.initialScrollTop = this.props.scrollTop; - }; + /** + * Main function to be called + * @param options + * @param subObject + * @returns {boolean} + */ - /** - * Start moving the timeline vertically - * @param {Event} event - * @private - */ - Core.prototype._onPinch = function (event) { - this.touch.allowDragging = false; - }; - /** - * Move the timeline vertically - * @param {Event} event - * @private - */ - Core.prototype._onDrag = function (event) { - // refuse to drag when we where pinching to prevent the timeline make a jump - // when releasing the fingers in opposite order from the touch screen - if (!this.touch.allowDragging) return; + _createClass(Validator, null, [{ + key: 'validate', + value: function validate(options, referenceOptions, subObject) { + errorFound = false; + allOptions = referenceOptions; + var usedOptions = referenceOptions; + if (subObject !== undefined) { + usedOptions = referenceOptions[subObject]; + } + Validator.parse(options, usedOptions, []); + return errorFound; + } - var delta = event.deltaY; + /** + * Will traverse an object recursively and check every value + * @param options + * @param referenceOptions + * @param path + */ - var oldScrollTop = this._getScrollTop(); - var newScrollTop = this._setScrollTop(this.touch.initialScrollTop + delta); + }, { + key: 'parse', + value: function parse(options, referenceOptions, path) { + for (var option in options) { + if (options.hasOwnProperty(option)) { + Validator.check(option, options, referenceOptions, path); + } + } + } - if (newScrollTop != oldScrollTop) { - this.emit("verticalDrag"); - } - }; + /** + * Check every value. If the value is an object, call the parse function on that object. + * @param option + * @param options + * @param referenceOptions + * @param path + */ - /** - * Apply a scrollTop - * @param {Number} scrollTop - * @returns {Number} scrollTop Returns the applied scrollTop - * @private - */ - Core.prototype._setScrollTop = function (scrollTop) { - this.props.scrollTop = scrollTop; - this._updateScrollTop(); - return this.props.scrollTop; - }; + }, { + key: 'check', + value: function check(option, options, referenceOptions, path) { + if (referenceOptions[option] === undefined && referenceOptions.__any__ === undefined) { + Validator.getSuggestion(option, referenceOptions, path); + } else if (referenceOptions[option] === undefined && referenceOptions.__any__ !== undefined) { + // __any__ is a wildcard. Any value is accepted and will be further analysed by reference. + if (Validator.getType(options[option]) === 'object' && referenceOptions['__any__'].__type__ !== undefined) { + // if the any subgroup is not a predefined object int he configurator we do not look deeper into the object. + Validator.checkFields(option, options, referenceOptions, '__any__', referenceOptions['__any__'].__type__, path); + } else { + Validator.checkFields(option, options, referenceOptions, '__any__', referenceOptions['__any__'], path); + } + } else { + // Since all options in the reference are objects, we can check whether they are supposed to be object to look for the __type__ field. + if (referenceOptions[option].__type__ !== undefined) { + // if this should be an object, we check if the correct type has been supplied to account for shorthand options. + Validator.checkFields(option, options, referenceOptions, option, referenceOptions[option].__type__, path); + } else { + Validator.checkFields(option, options, referenceOptions, option, referenceOptions[option], path); + } + } + } - /** - * Update the current scrollTop when the height of the containers has been changed - * @returns {Number} scrollTop Returns the applied scrollTop - * @private - */ - Core.prototype._updateScrollTop = function () { - // recalculate the scrollTopMin - var scrollTopMin = Math.min(this.props.centerContainer.height - this.props.center.height, 0); // is negative or zero - if (scrollTopMin != this.props.scrollTopMin) { - // in case of bottom orientation, change the scrollTop such that the contents - // do not move relative to the time axis at the bottom - if (this.options.orientation.item != 'top') { - this.props.scrollTop += scrollTopMin - this.props.scrollTopMin; + /** + * + * @param {String} option | the option property + * @param {Object} options | The supplied options object + * @param {Object} referenceOptions | The reference options containing all options and their allowed formats + * @param {String} referenceOption | Usually this is the same as option, except when handling an __any__ tag. + * @param {String} refOptionType | This is the type object from the reference options + * @param {Array} path | where in the object is the option + */ + + }, { + key: 'checkFields', + value: function checkFields(option, options, referenceOptions, referenceOption, refOptionObj, path) { + var optionType = Validator.getType(options[option]); + var refOptionType = refOptionObj[optionType]; + if (refOptionType !== undefined) { + // if the type is correct, we check if it is supposed to be one of a few select values + if (Validator.getType(refOptionType) === 'array') { + if (refOptionType.indexOf(options[option]) === -1) { + console.log('%cInvalid option detected in "' + option + '".' + ' Allowed values are:' + Validator.print(refOptionType) + ' not "' + options[option] + '". ' + Validator.printLocation(path, option), printStyle); + errorFound = true; + } else if (optionType === 'object' && referenceOption !== "__any__") { + path = util.copyAndExtendArray(path, option); + Validator.parse(options[option], referenceOptions[referenceOption], path); + } + } else if (optionType === 'object' && referenceOption !== "__any__") { + path = util.copyAndExtendArray(path, option); + Validator.parse(options[option], referenceOptions[referenceOption], path); + } + } else if (refOptionObj['any'] === undefined) { + // type of the field is incorrect and the field cannot be any + console.log('%cInvalid type received for "' + option + '". Expected: ' + Validator.print(Object.keys(refOptionObj)) + '. Received [' + optionType + '] "' + options[option] + '"' + Validator.printLocation(path, option), printStyle); + errorFound = true; + } } - this.props.scrollTopMin = scrollTopMin; - } + }, { + key: 'getType', + value: function getType(object) { + var type = typeof object === 'undefined' ? 'undefined' : _typeof(object); - // limit the scrollTop to the feasible scroll range - if (this.props.scrollTop > 0) this.props.scrollTop = 0; - if (this.props.scrollTop < scrollTopMin) this.props.scrollTop = scrollTopMin; + if (type === 'object') { + if (object === null) { + return 'null'; + } + if (object instanceof Boolean) { + return 'boolean'; + } + if (object instanceof Number) { + return 'number'; + } + if (object instanceof String) { + return 'string'; + } + if (Array.isArray(object)) { + return 'array'; + } + if (object instanceof Date) { + return 'date'; + } + if (object.nodeType !== undefined) { + return 'dom'; + } + if (object._isAMomentObject === true) { + return 'moment'; + } + return 'object'; + } else if (type === 'number') { + return 'number'; + } else if (type === 'boolean') { + return 'boolean'; + } else if (type === 'string') { + return 'string'; + } else if (type === undefined) { + return 'undefined'; + } + return type; + } + }, { + key: 'getSuggestion', + value: function getSuggestion(option, options, path) { + var localSearch = Validator.findInOptions(option, options, path, false); + var globalSearch = Validator.findInOptions(option, allOptions, [], true); - return this.props.scrollTop; - }; + var localSearchThreshold = 8; + var globalSearchThreshold = 4; - /** - * Get the current scrollTop - * @returns {number} scrollTop - * @private - */ - Core.prototype._getScrollTop = function () { - return this.props.scrollTop; - }; + if (localSearch.indexMatch !== undefined) { + console.log('%cUnknown option detected: "' + option + '" in ' + Validator.printLocation(localSearch.path, option, '') + 'Perhaps it was incomplete? Did you mean: "' + localSearch.indexMatch + '"?\n\n', printStyle); + } else if (globalSearch.distance <= globalSearchThreshold && localSearch.distance > globalSearch.distance) { + console.log('%cUnknown option detected: "' + option + '" in ' + Validator.printLocation(localSearch.path, option, '') + 'Perhaps it was misplaced? Matching option found at: ' + Validator.printLocation(globalSearch.path, globalSearch.closestMatch, ''), printStyle); + } else if (localSearch.distance <= localSearchThreshold) { + console.log('%cUnknown option detected: "' + option + '". Did you mean "' + localSearch.closestMatch + '"?' + Validator.printLocation(localSearch.path, option), printStyle); + } else { + console.log('%cUnknown option detected: "' + option + '". Did you mean one of these: ' + Validator.print(Object.keys(options)) + Validator.printLocation(path, option), printStyle); + } - /** - * Load a configurator - * @return {Object} - * @private - */ - Core.prototype._createConfigurator = function () { - throw new Error('Cannot invoke abstract method _createConfigurator'); - }; + errorFound = true; + } - module.exports = Core; + /** + * traverse the options in search for a match. + * @param option + * @param options + * @param path + * @param recursive + * @returns {{closestMatch: string, path: Array, distance: number}} + */ -/***/ }, -/* 28 */ -/***/ function(module, exports, __webpack_require__) { + }, { + key: 'findInOptions', + value: function findInOptions(option, options, path) { + var recursive = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3]; - 'use strict'; + var min = 1e9; + var closestMatch = ''; + var closestMatchPath = []; + var lowerCaseOption = option.toLowerCase(); + var indexMatch = undefined; + for (var op in options) { + var distance = void 0; + if (options[op].__type__ !== undefined && recursive === true) { + var result = Validator.findInOptions(option, options[op], util.copyAndExtendArray(path, op)); + if (min > result.distance) { + closestMatch = result.closestMatch; + closestMatchPath = result.path; + min = result.distance; + indexMatch = result.indexMatch; + } + } else { + if (op.toLowerCase().indexOf(lowerCaseOption) !== -1) { + indexMatch = op; + } + distance = Validator.levenshteinDistance(option, op); + if (min > distance) { + closestMatch = op; + closestMatchPath = util.copyArray(path); + min = distance; + } + } + } + return { closestMatch: closestMatch, path: closestMatchPath, distance: min, indexMatch: indexMatch }; + } + }, { + key: 'printLocation', + value: function printLocation(path, option) { + var prefix = arguments.length <= 2 || arguments[2] === undefined ? 'Problem value found at: \n' : arguments[2]; - var Hammer = __webpack_require__(20); - var util = __webpack_require__(1); - var DataSet = __webpack_require__(8); - var DataView = __webpack_require__(10); - var TimeStep = __webpack_require__(29); - var Component = __webpack_require__(25); - var Group = __webpack_require__(30); - var BackgroundGroup = __webpack_require__(34); - var BoxItem = __webpack_require__(35); - var PointItem = __webpack_require__(36); - var RangeItem = __webpack_require__(32); - var BackgroundItem = __webpack_require__(37); + var str = '\n\n' + prefix + 'options = {\n'; + for (var i = 0; i < path.length; i++) { + for (var j = 0; j < i + 1; j++) { + str += ' '; + } + str += path[i] + ': {\n'; + } + for (var _j = 0; _j < path.length + 1; _j++) { + str += ' '; + } + str += option + '\n'; + for (var _i = 0; _i < path.length + 1; _i++) { + for (var _j2 = 0; _j2 < path.length - _i; _j2++) { + str += ' '; + } + str += '}\n'; + } + return str + '\n\n'; + } + }, { + key: 'print', + value: function print(options) { + return JSON.stringify(options).replace(/(\")|(\[)|(\])|(,"__type__")/g, "").replace(/(\,)/g, ', '); + } - var UNGROUPED = '__ungrouped__'; // reserved group id for ungrouped items - var BACKGROUND = '__background__'; // reserved group id for background items without group + // Compute the edit distance between the two given strings + // http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#JavaScript + /* + Copyright (c) 2011 Andrei Mackenzie + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ - /** - * An ItemSet holds a set of items and ranges which can be displayed in a - * range. The width is determined by the parent of the ItemSet, and the height - * is determined by the size of the items. - * @param {{dom: Object, domProps: Object, emitter: Emitter, range: Range}} body - * @param {Object} [options] See ItemSet.setOptions for the available options. - * @constructor ItemSet - * @extends Component - */ - function ItemSet(body, options) { - this.body = body; + }, { + key: 'levenshteinDistance', + value: function levenshteinDistance(a, b) { + if (a.length === 0) return b.length; + if (b.length === 0) return a.length; - this.defaultOptions = { - type: null, // 'box', 'point', 'range', 'background' - orientation: { - item: 'bottom' // item orientation: 'top' or 'bottom' - }, - align: 'auto', // alignment of box items - stack: true, - groupOrderSwap: function groupOrderSwap(fromGroup, toGroup, groups) { - var targetOrder = toGroup.order; - toGroup.order = fromGroup.order; - fromGroup.order = targetOrder; - }, - groupOrder: 'order', + var matrix = []; - selectable: true, - multiselect: false, - itemsAlwaysDraggable: false, + // increment along the first column of each row + var i; + for (i = 0; i <= b.length; i++) { + matrix[i] = [i]; + } - editable: { - updateTime: false, - updateGroup: false, - add: false, - remove: false - }, + // increment each column in the first row + var j; + for (j = 0; j <= a.length; j++) { + matrix[0][j] = j; + } - groupEditable: { - order: false, - add: false, - remove: false - }, + // Fill in the rest of the matrix + for (i = 1; i <= b.length; i++) { + for (j = 1; j <= a.length; j++) { + if (b.charAt(i - 1) == a.charAt(j - 1)) { + matrix[i][j] = matrix[i - 1][j - 1]; + } else { + matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution + Math.min(matrix[i][j - 1] + 1, // insertion + matrix[i - 1][j] + 1)); // deletion + } + } + } - snap: TimeStep.snap, + return matrix[b.length][a.length]; + } + }]); - onAdd: function onAdd(item, callback) { - callback(item); - }, - onUpdate: function onUpdate(item, callback) { - callback(item); - }, - onMove: function onMove(item, callback) { - callback(item); - }, - onRemove: function onRemove(item, callback) { - callback(item); - }, - onMoving: function onMoving(item, callback) { - callback(item); - }, - onAddGroup: function onAddGroup(item, callback) { - callback(item); - }, - onMoveGroup: function onMoveGroup(item, callback) { - callback(item); - }, - onRemoveGroup: function onRemoveGroup(item, callback) { - callback(item); - }, + return Validator; + }(); - margin: { - item: { - horizontal: 10, - vertical: 10 - }, - axis: 20 - } - }; + exports.default = Validator; + exports.printStyle = printStyle; - // options is shared by this ItemSet and all its items - this.options = util.extend({}, this.defaultOptions); +/***/ }, +/* 27 */ +/***/ function(module, exports, __webpack_require__) { - // options for getting items from the DataSet with the correct type - this.itemOptions = { - type: { start: 'Date', end: 'Date' } - }; + 'use strict'; - this.conversion = { - toScreen: body.util.toScreen, - toTime: body.util.toTime - }; - this.dom = {}; - this.props = {}; - this.hammer = null; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; - var me = this; - this.itemsData = null; // DataSet - this.groupsData = null; // DataSet + var util = __webpack_require__(1); + var hammerUtil = __webpack_require__(25); + var moment = __webpack_require__(2); + var Component = __webpack_require__(28); + var DateUtil = __webpack_require__(29); - // listeners for the DataSet of the items - this.itemListeners = { - 'add': function add(event, params, senderId) { - me._onAdd(params.items); - }, - 'update': function update(event, params, senderId) { - me._onUpdate(params.items); - }, - 'remove': function remove(event, params, senderId) { - me._onRemove(params.items); - } - }; + /** + * @constructor Range + * A Range controls a numeric range with a start and end value. + * The Range adjusts the range based on mouse events or programmatic changes, + * and triggers events when the range is changing or has been changed. + * @param {{dom: Object, domProps: Object, emitter: Emitter}} body + * @param {Object} [options] See description at Range.setOptions + */ + function Range(body, options) { + var now = moment().hours(0).minutes(0).seconds(0).milliseconds(0); + this.start = now.clone().add(-3, 'days').valueOf(); // Number + this.end = now.clone().add(4, 'days').valueOf(); // Number - // listeners for the DataSet of the groups - this.groupListeners = { - 'add': function add(event, params, senderId) { - me._onAddGroups(params.items); - }, - 'update': function update(event, params, senderId) { - me._onUpdateGroups(params.items); - }, - 'remove': function remove(event, params, senderId) { - me._onRemoveGroups(params.items); - } + this.body = body; + this.deltaDifference = 0; + this.scaleOffset = 0; + this.startToFront = false; + this.endToFront = true; + + // default options + this.defaultOptions = { + start: null, + end: null, + moment: moment, + direction: 'horizontal', // 'horizontal' or 'vertical' + moveable: true, + zoomable: true, + min: null, + max: null, + zoomMin: 10, // milliseconds + zoomMax: 1000 * 60 * 60 * 24 * 365 * 10000 // milliseconds }; + this.options = util.extend({}, this.defaultOptions); - this.items = {}; // object with an Item for every data item - this.groups = {}; // Group object for every group - this.groupIds = []; + this.props = { + touch: {} + }; + this.animationTimer = null; - this.selection = []; // list with the ids of all selected nodes - this.stackDirty = true; // if true, all items will be restacked on next redraw + // drag listeners for dragging + this.body.emitter.on('panstart', this._onDragStart.bind(this)); + this.body.emitter.on('panmove', this._onDrag.bind(this)); + this.body.emitter.on('panend', this._onDragEnd.bind(this)); - this.touchParams = {}; // stores properties while dragging - this.groupTouchParams = {}; - // create the HTML DOM + // mouse wheel for zooming + this.body.emitter.on('mousewheel', this._onMouseWheel.bind(this)); - this._create(); + // pinch to zoom + this.body.emitter.on('touch', this._onTouch.bind(this)); + this.body.emitter.on('pinch', this._onPinch.bind(this)); this.setOptions(options); } - ItemSet.prototype = new Component(); + Range.prototype = new Component(); - // available item types will be registered here - ItemSet.types = { - background: BackgroundItem, - box: BoxItem, - range: RangeItem, - point: PointItem + /** + * Set options for the range controller + * @param {Object} options Available options: + * {Number | Date | String} start Start date for the range + * {Number | Date | String} end End date for the range + * {Number} min Minimum value for start + * {Number} max Maximum value for end + * {Number} zoomMin Set a minimum value for + * (end - start). + * {Number} zoomMax Set a maximum value for + * (end - start). + * {Boolean} moveable Enable moving of the range + * by dragging. True by default + * {Boolean} zoomable Enable zooming of the range + * by pinching/scrolling. True by default + */ + Range.prototype.setOptions = function (options) { + if (options) { + // copy the options that we know + var fields = ['direction', 'min', 'max', 'zoomMin', 'zoomMax', 'moveable', 'zoomable', 'moment', 'activate', 'hiddenDates', 'zoomKey']; + util.selectiveExtend(fields, this.options, options); + + if ('start' in options || 'end' in options) { + // apply a new range. both start and end are optional + this.setRange(options.start, options.end); + } + } }; /** - * Create the HTML DOM for the ItemSet + * Test whether direction has a valid value + * @param {String} direction 'horizontal' or 'vertical' */ - ItemSet.prototype._create = function () { - var frame = document.createElement('div'); - frame.className = 'vis-itemset'; - frame['timeline-itemset'] = this; - this.dom.frame = frame; - - // create background panel - var background = document.createElement('div'); - background.className = 'vis-background'; - frame.appendChild(background); - this.dom.background = background; + function validateDirection(direction) { + if (direction != 'horizontal' && direction != 'vertical') { + throw new TypeError('Unknown direction "' + direction + '". ' + 'Choose "horizontal" or "vertical".'); + } + } - // create foreground panel - var foreground = document.createElement('div'); - foreground.className = 'vis-foreground'; - frame.appendChild(foreground); - this.dom.foreground = foreground; + /** + * Set a new start and end range + * @param {Date | Number | String} [start] + * @param {Date | Number | String} [end] + * @param {boolean | {duration: number, easingFunction: string}} [animation=false] + * If true (default), the range is animated + * smoothly to the new window. An object can be + * provided to specify duration and easing function. + * Default duration is 500 ms, and default easing + * function is 'easeInOutQuad'. + * @param {Boolean} [byUser=false] + * + */ + Range.prototype.setRange = function (start, end, animation, byUser) { + if (byUser !== true) { + byUser = false; + } + var finalStart = start != undefined ? util.convert(start, 'Date').valueOf() : null; + var finalEnd = end != undefined ? util.convert(end, 'Date').valueOf() : null; + this._cancelAnimation(); - // create axis panel - var axis = document.createElement('div'); - axis.className = 'vis-axis'; - this.dom.axis = axis; + if (animation) { + // true or an Object + var me = this; + var initStart = this.start; + var initEnd = this.end; + var duration = (typeof animation === 'undefined' ? 'undefined' : _typeof(animation)) === 'object' && 'duration' in animation ? animation.duration : 500; + var easingName = (typeof animation === 'undefined' ? 'undefined' : _typeof(animation)) === 'object' && 'easingFunction' in animation ? animation.easingFunction : 'easeInOutQuad'; + var easingFunction = util.easingFunctions[easingName]; + if (!easingFunction) { + throw new Error('Unknown easing function ' + JSON.stringify(easingName) + '. ' + 'Choose from: ' + Object.keys(util.easingFunctions).join(', ')); + } - // create labelset - var labelSet = document.createElement('div'); - labelSet.className = 'vis-labelset'; - this.dom.labelSet = labelSet; + var initTime = new Date().valueOf(); + var anyChanged = false; - // create ungrouped Group - this._updateUngrouped(); + var next = function next() { + if (!me.props.touch.dragging) { + var now = new Date().valueOf(); + var time = now - initTime; + var ease = easingFunction(time / duration); + var done = time > duration; + var s = done || finalStart === null ? finalStart : initStart + (finalStart - initStart) * ease; + var e = done || finalEnd === null ? finalEnd : initEnd + (finalEnd - initEnd) * ease; - // create background Group - var backgroundGroup = new BackgroundGroup(BACKGROUND, null, this); - backgroundGroup.show(); - this.groups[BACKGROUND] = backgroundGroup; + changed = me._applyRange(s, e); + DateUtil.updateHiddenDates(me.options.moment, me.body, me.options.hiddenDates); + anyChanged = anyChanged || changed; + if (changed) { + me.body.emitter.emit('rangechange', { start: new Date(me.start), end: new Date(me.end), byUser: byUser }); + } - // attach event listeners - // Note: we bind to the centerContainer for the case where the height - // of the center container is larger than of the ItemSet, so we - // can click in the empty area to create a new item or deselect an item. - this.hammer = new Hammer(this.body.dom.centerContainer); + if (done) { + if (anyChanged) { + me.body.emitter.emit('rangechanged', { start: new Date(me.start), end: new Date(me.end), byUser: byUser }); + } + } else { + // animate with as high as possible frame rate, leave 20 ms in between + // each to prevent the browser from blocking + me.animationTimer = setTimeout(next, 20); + } + } + }; - // drag items when selected - this.hammer.on('hammer.input', (function (event) { - if (event.isFirst) { - this._onTouch(event); + return next(); + } else { + var changed = this._applyRange(finalStart, finalEnd); + DateUtil.updateHiddenDates(this.options.moment, this.body, this.options.hiddenDates); + if (changed) { + var params = { start: new Date(this.start), end: new Date(this.end), byUser: byUser }; + this.body.emitter.emit('rangechange', params); + this.body.emitter.emit('rangechanged', params); } - }).bind(this)); - this.hammer.on('panstart', this._onDragStart.bind(this)); - this.hammer.on('panmove', this._onDrag.bind(this)); - this.hammer.on('panend', this._onDragEnd.bind(this)); - this.hammer.get('pan').set({ threshold: 5, direction: 30 }); // 30 is ALL_DIRECTIONS in hammer. - - // single select (or unselect) when tapping an item - this.hammer.on('tap', this._onSelectItem.bind(this)); + } + }; - // multi select when holding mouse/touch, or on ctrl+click - this.hammer.on('press', this._onMultiSelectItem.bind(this)); + /** + * Stop an animation + * @private + */ + Range.prototype._cancelAnimation = function () { + if (this.animationTimer) { + clearTimeout(this.animationTimer); + this.animationTimer = null; + } + }; - // add item on doubletap - this.hammer.on('doubletap', this._onAddItem.bind(this)); + /** + * Set a new start and end range. This method is the same as setRange, but + * does not trigger a range change and range changed event, and it returns + * true when the range is changed + * @param {Number} [start] + * @param {Number} [end] + * @return {Boolean} changed + * @private + */ + Range.prototype._applyRange = function (start, end) { + var newStart = start != null ? util.convert(start, 'Date').valueOf() : this.start, + newEnd = end != null ? util.convert(end, 'Date').valueOf() : this.end, + max = this.options.max != null ? util.convert(this.options.max, 'Date').valueOf() : null, + min = this.options.min != null ? util.convert(this.options.min, 'Date').valueOf() : null, + diff; - this.groupHammer = new Hammer(this.body.dom.leftContainer); - this.groupHammer.on('panstart', this._onGroupDragStart.bind(this)); - this.groupHammer.on('panmove', this._onGroupDrag.bind(this)); - this.groupHammer.on('panend', this._onGroupDragEnd.bind(this)); - this.groupHammer.get('pan').set({ threshold: 5, direction: 30 }); + // check for valid number + if (isNaN(newStart) || newStart === null) { + throw new Error('Invalid start "' + start + '"'); + } + if (isNaN(newEnd) || newEnd === null) { + throw new Error('Invalid end "' + end + '"'); + } - // attach to the DOM - this.show(); - }; + // prevent start < end + if (newEnd < newStart) { + newEnd = newStart; + } - /** - * Set options for the ItemSet. Existing options will be extended/overwritten. - * @param {Object} [options] The following options are available: - * {String} type - * Default type for the items. Choose from 'box' - * (default), 'point', 'range', or 'background'. - * The default style can be overwritten by - * individual items. - * {String} align - * Alignment for the items, only applicable for - * BoxItem. Choose 'center' (default), 'left', or - * 'right'. - * {String} orientation.item - * Orientation of the item set. Choose 'top' or - * 'bottom' (default). - * {Function} groupOrder - * A sorting function for ordering groups - * {Boolean} stack - * If true (default), items will be stacked on - * top of each other. - * {Number} margin.axis - * Margin between the axis and the items in pixels. - * Default is 20. - * {Number} margin.item.horizontal - * Horizontal margin between items in pixels. - * Default is 10. - * {Number} margin.item.vertical - * Vertical Margin between items in pixels. - * Default is 10. - * {Number} margin.item - * Margin between items in pixels in both horizontal - * and vertical direction. Default is 10. - * {Number} margin - * Set margin for both axis and items in pixels. - * {Boolean} selectable - * If true (default), items can be selected. - * {Boolean} multiselect - * If true, multiple items can be selected. - * False by default. - * {Boolean} editable - * Set all editable options to true or false - * {Boolean} editable.updateTime - * Allow dragging an item to an other moment in time - * {Boolean} editable.updateGroup - * Allow dragging an item to an other group - * {Boolean} editable.add - * Allow creating new items on double tap - * {Boolean} editable.remove - * Allow removing items by clicking the delete button - * top right of a selected item. - * {Function(item: Item, callback: Function)} onAdd - * Callback function triggered when an item is about to be added: - * when the user double taps an empty space in the Timeline. - * {Function(item: Item, callback: Function)} onUpdate - * Callback function fired when an item is about to be updated. - * This function typically has to show a dialog where the user - * change the item. If not implemented, nothing happens. - * {Function(item: Item, callback: Function)} onMove - * Fired when an item has been moved. If not implemented, - * the move action will be accepted. - * {Function(item: Item, callback: Function)} onRemove - * Fired when an item is about to be deleted. - * If not implemented, the item will be always removed. - */ - ItemSet.prototype.setOptions = function (options) { - if (options) { - // copy all options that we know - var fields = ['type', 'align', 'order', 'stack', 'selectable', 'multiselect', 'itemsAlwaysDraggable', 'multiselectPerGroup', 'groupOrder', 'dataAttributes', 'template', 'groupTemplate', 'hide', 'snap', 'groupOrderSwap']; - util.selectiveExtend(fields, this.options, options); + // prevent start < min + if (min !== null) { + if (newStart < min) { + diff = min - newStart; + newStart += diff; + newEnd += diff; - if ('orientation' in options) { - if (typeof options.orientation === 'string') { - this.options.orientation.item = options.orientation === 'top' ? 'top' : 'bottom'; - } else if (typeof options.orientation === 'object' && 'item' in options.orientation) { - this.options.orientation.item = options.orientation.item; + // prevent end > max + if (max != null) { + if (newEnd > max) { + newEnd = max; + } } } + } - if ('margin' in options) { - if (typeof options.margin === 'number') { - this.options.margin.axis = options.margin; - this.options.margin.item.horizontal = options.margin; - this.options.margin.item.vertical = options.margin; - } else if (typeof options.margin === 'object') { - util.selectiveExtend(['axis'], this.options.margin, options.margin); - if ('item' in options.margin) { - if (typeof options.margin.item === 'number') { - this.options.margin.item.horizontal = options.margin.item; - this.options.margin.item.vertical = options.margin.item; - } else if (typeof options.margin.item === 'object') { - util.selectiveExtend(['horizontal', 'vertical'], this.options.margin.item, options.margin.item); - } + // prevent end > max + if (max !== null) { + if (newEnd > max) { + diff = newEnd - max; + newStart -= diff; + newEnd -= diff; + + // prevent start < min + if (min != null) { + if (newStart < min) { + newStart = min; } } } + } - if ('editable' in options) { - if (typeof options.editable === 'boolean') { - this.options.editable.updateTime = options.editable; - this.options.editable.updateGroup = options.editable; - this.options.editable.add = options.editable; - this.options.editable.remove = options.editable; - } else if (typeof options.editable === 'object') { - util.selectiveExtend(['updateTime', 'updateGroup', 'add', 'remove'], this.options.editable, options.editable); + // prevent (end-start) < zoomMin + if (this.options.zoomMin !== null) { + var zoomMin = parseFloat(this.options.zoomMin); + if (zoomMin < 0) { + zoomMin = 0; + } + if (newEnd - newStart < zoomMin) { + if (this.end - this.start === zoomMin && newStart > this.start && newEnd < this.end) { + // ignore this action, we are already zoomed to the minimum + newStart = this.start; + newEnd = this.end; + } else { + // zoom to the minimum + diff = zoomMin - (newEnd - newStart); + newStart -= diff / 2; + newEnd += diff / 2; } } + } - if ('groupEditable' in options) { - if (typeof options.groupEditable === 'boolean') { - this.options.groupEditable.order = options.groupEditable; - this.options.groupEditable.add = options.groupEditable; - this.options.groupEditable.remove = options.groupEditable; - } else if (typeof options.groupEditable === 'object') { - util.selectiveExtend(['order', 'add', 'remove'], this.options.groupEditable, options.groupEditable); - } + // prevent (end-start) > zoomMax + if (this.options.zoomMax !== null) { + var zoomMax = parseFloat(this.options.zoomMax); + if (zoomMax < 0) { + zoomMax = 0; } - // callback functions - var addCallback = (function (name) { - var fn = options[name]; - if (fn) { - if (!(fn instanceof Function)) { - throw new Error('option ' + name + ' must be a function ' + name + '(item, callback)'); - } - this.options[name] = fn; + if (newEnd - newStart > zoomMax) { + if (this.end - this.start === zoomMax && newStart < this.start && newEnd > this.end) { + // ignore this action, we are already zoomed to the maximum + newStart = this.start; + newEnd = this.end; + } else { + // zoom to the maximum + diff = newEnd - newStart - zoomMax; + newStart += diff / 2; + newEnd -= diff / 2; } - }).bind(this); - ['onAdd', 'onUpdate', 'onRemove', 'onMove', 'onMoving', 'onAddGroup', 'onMoveGroup', 'onRemoveGroup'].forEach(addCallback); + } + } - // force the itemSet to refresh: options like orientation and margins may be changed - this.markDirty(); + var changed = this.start != newStart || this.end != newEnd; + + // if the new range does NOT overlap with the old range, emit checkRangedItems to avoid not showing ranged items (ranged meaning has end time, not necessarily of type Range) + if (!(newStart >= this.start && newStart <= this.end || newEnd >= this.start && newEnd <= this.end) && !(this.start >= newStart && this.start <= newEnd || this.end >= newStart && this.end <= newEnd)) { + this.body.emitter.emit('checkRangedItems'); } + + this.start = newStart; + this.end = newEnd; + return changed; }; /** - * Mark the ItemSet dirty so it will refresh everything with next redraw. - * Optionally, all items can be marked as dirty and be refreshed. - * @param {{refreshItems: boolean}} [options] + * Retrieve the current range. + * @return {Object} An object with start and end properties */ - ItemSet.prototype.markDirty = function (options) { - this.groupIds = []; - this.stackDirty = true; - - if (options && options.refreshItems) { - util.forEach(this.items, function (item) { - item.dirty = true; - if (item.displayed) item.redraw(); - }); - } + Range.prototype.getRange = function () { + return { + start: this.start, + end: this.end + }; }; /** - * Destroy the ItemSet + * Calculate the conversion offset and scale for current range, based on + * the provided width + * @param {Number} width + * @returns {{offset: number, scale: number}} conversion */ - ItemSet.prototype.destroy = function () { - this.hide(); - this.setItems(null); - this.setGroups(null); - - this.hammer = null; - - this.body = null; - this.conversion = null; + Range.prototype.conversion = function (width, totalHidden) { + return Range.conversion(this.start, this.end, width, totalHidden); }; /** - * Hide the component from the DOM + * Static method to calculate the conversion offset and scale for a range, + * based on the provided start, end, and width + * @param {Number} start + * @param {Number} end + * @param {Number} width + * @returns {{offset: number, scale: number}} conversion */ - ItemSet.prototype.hide = function () { - // remove the frame containing the items - if (this.dom.frame.parentNode) { - this.dom.frame.parentNode.removeChild(this.dom.frame); - } - - // remove the axis with dots - if (this.dom.axis.parentNode) { - this.dom.axis.parentNode.removeChild(this.dom.axis); + Range.conversion = function (start, end, width, totalHidden) { + if (totalHidden === undefined) { + totalHidden = 0; } - - // remove the labelset containing all group labels - if (this.dom.labelSet.parentNode) { - this.dom.labelSet.parentNode.removeChild(this.dom.labelSet); + if (width != 0 && end - start != 0) { + return { + offset: start, + scale: width / (end - start - totalHidden) + }; + } else { + return { + offset: 0, + scale: 1 + }; } }; /** - * Show the component in the DOM (when not already visible). - * @return {Boolean} changed + * Start dragging horizontally or vertically + * @param {Event} event + * @private */ - ItemSet.prototype.show = function () { - // show frame containing the items - if (!this.dom.frame.parentNode) { - this.body.dom.center.appendChild(this.dom.frame); - } + Range.prototype._onDragStart = function (event) { + this.deltaDifference = 0; + this.previousDelta = 0; - // show axis with dots - if (!this.dom.axis.parentNode) { - this.body.dom.backgroundVertical.appendChild(this.dom.axis); - } + // only allow dragging when configured as movable + if (!this.options.moveable) return; - // show labelset containing labels - if (!this.dom.labelSet.parentNode) { - this.body.dom.left.appendChild(this.dom.labelSet); + // only start dragging when the mouse is inside the current range + if (!this._isInsideRange(event)) return; + + // refuse to drag when we where pinching to prevent the timeline make a jump + // when releasing the fingers in opposite order from the touch screen + if (!this.props.touch.allowDragging) return; + + this.props.touch.start = this.start; + this.props.touch.end = this.end; + this.props.touch.dragging = true; + + if (this.body.dom.root) { + this.body.dom.root.style.cursor = 'move'; } }; /** - * Set selected items by their id. Replaces the current selection - * Unknown id's are silently ignored. - * @param {string[] | string} [ids] An array with zero or more id's of the items to be - * selected, or a single item id. If ids is undefined - * or an empty array, all items will be unselected. + * Perform dragging operation + * @param {Event} event + * @private */ - ItemSet.prototype.setSelection = function (ids) { - var i, ii, id, item; + Range.prototype._onDrag = function (event) { + if (!this.props.touch.dragging) return; - if (ids == undefined) ids = []; - if (!Array.isArray(ids)) ids = [ids]; + // only allow dragging when configured as movable + if (!this.options.moveable) return; - // unselect currently selected items - for (i = 0, ii = this.selection.length; i < ii; i++) { - id = this.selection[i]; - item = this.items[id]; - if (item) item.unselect(); - } + // TODO: this may be redundant in hammerjs2 + // refuse to drag when we where pinching to prevent the timeline make a jump + // when releasing the fingers in opposite order from the touch screen + if (!this.props.touch.allowDragging) return; - // select items - this.selection = []; - for (i = 0, ii = ids.length; i < ii; i++) { - id = ids[i]; - item = this.items[id]; - if (item) { - this.selection.push(id); - item.select(); - } + var direction = this.options.direction; + validateDirection(direction); + var delta = direction == 'horizontal' ? event.deltaX : event.deltaY; + delta -= this.deltaDifference; + var interval = this.props.touch.end - this.props.touch.start; + + // normalize dragging speed if cutout is in between. + var duration = DateUtil.getHiddenDurationBetween(this.body.hiddenDates, this.start, this.end); + interval -= duration; + + var width = direction == 'horizontal' ? this.body.domProps.center.width : this.body.domProps.center.height; + var diffRange = -delta / width * interval; + var newStart = this.props.touch.start + diffRange; + var newEnd = this.props.touch.end + diffRange; + + // snapping times away from hidden zones + var safeStart = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newStart, this.previousDelta - delta, true); + var safeEnd = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newEnd, this.previousDelta - delta, true); + if (safeStart != newStart || safeEnd != newEnd) { + this.deltaDifference += delta; + this.props.touch.start = safeStart; + this.props.touch.end = safeEnd; + this._onDrag(event); + return; } + + this.previousDelta = delta; + this._applyRange(newStart, newEnd); + + var startDate = new Date(this.start); + var endDate = new Date(this.end); + + // fire a rangechange event + this.body.emitter.emit('rangechange', { + start: startDate, + end: endDate, + byUser: true + }); }; /** - * Get the selected items by their id - * @return {Array} ids The ids of the selected items + * Stop dragging operation + * @param {event} event + * @private */ - ItemSet.prototype.getSelection = function () { - return this.selection.concat([]); + Range.prototype._onDragEnd = function (event) { + if (!this.props.touch.dragging) return; + + // only allow dragging when configured as movable + if (!this.options.moveable) return; + + // TODO: this may be redundant in hammerjs2 + // refuse to drag when we where pinching to prevent the timeline make a jump + // when releasing the fingers in opposite order from the touch screen + if (!this.props.touch.allowDragging) return; + + this.props.touch.dragging = false; + if (this.body.dom.root) { + this.body.dom.root.style.cursor = 'auto'; + } + + // fire a rangechanged event + this.body.emitter.emit('rangechanged', { + start: new Date(this.start), + end: new Date(this.end), + byUser: true + }); }; /** - * Get the id's of the currently visible items. - * @returns {Array} The ids of the visible items + * Event handler for mouse wheel event, used to zoom + * Code from http://adomas.org/javascript-mouse-wheel/ + * @param {Event} event + * @private */ - ItemSet.prototype.getVisibleItems = function () { - var range = this.body.range.getRange(); - var left = this.body.util.toScreen(range.start); - var right = this.body.util.toScreen(range.end); + Range.prototype._onMouseWheel = function (event) { + // only allow zooming when configured as zoomable and moveable + if (!(this.options.zoomable && this.options.moveable)) return; - var ids = []; - for (var groupId in this.groups) { - if (this.groups.hasOwnProperty(groupId)) { - var group = this.groups[groupId]; - var rawVisibleItems = group.visibleItems; + // only zoom when the mouse is inside the current range + if (!this._isInsideRange(event)) return; - // filter the "raw" set with visibleItems into a set which is really - // visible by pixels - for (var i = 0; i < rawVisibleItems.length; i++) { - var item = rawVisibleItems[i]; - // TODO: also check whether visible vertically - if (item.left < right && item.left + item.width > left) { - ids.push(item.id); - } - } + // only zoom when the according key is pressed and the zoomKey option is set + if (this.options.zoomKey && !event[this.options.zoomKey]) return; + + // retrieve delta + var delta = 0; + if (event.wheelDelta) { + /* IE/Opera. */ + delta = event.wheelDelta / 120; + } else if (event.detail) { + /* Mozilla case. */ + // In Mozilla, sign of delta is different than in IE. + // Also, delta is multiple of 3. + delta = -event.detail / 3; + } + + // If delta is nonzero, handle it. + // Basically, delta is now positive if wheel was scrolled up, + // and negative, if wheel was scrolled down. + if (delta) { + // perform the zoom action. Delta is normally 1 or -1 + + // adjust a negative delta such that zooming in with delta 0.1 + // equals zooming out with a delta -0.1 + var scale; + if (delta < 0) { + scale = 1 - delta / 5; + } else { + scale = 1 / (1 + delta / 5); } + + // calculate center, the date to zoom around + var pointer = getPointer({ x: event.clientX, y: event.clientY }, this.body.dom.center); + var pointerDate = this._pointerToDate(pointer); + + this.zoom(scale, pointerDate, delta); } - return ids; + // Prevent default actions caused by mouse wheel + // (else the page and timeline both zoom and scroll) + event.preventDefault(); }; /** - * Deselect a selected item - * @param {String | Number} id + * Start of a touch gesture * @private */ - ItemSet.prototype._deselect = function (id) { - var selection = this.selection; - for (var i = 0, ii = selection.length; i < ii; i++) { - if (selection[i] == id) { - // non-strict comparison! - selection.splice(i, 1); - break; - } - } + Range.prototype._onTouch = function (event) { + this.props.touch.start = this.start; + this.props.touch.end = this.end; + this.props.touch.allowDragging = true; + this.props.touch.center = null; + this.scaleOffset = 0; + this.deltaDifference = 0; }; /** - * Repaint the component - * @return {boolean} Returns true if the component is resized + * Handle pinch event + * @param {Event} event + * @private */ - ItemSet.prototype.redraw = function () { - var margin = this.options.margin, - range = this.body.range, - asSize = util.option.asSize, - options = this.options, - orientation = options.orientation.item, - resized = false, - frame = this.dom.frame; + Range.prototype._onPinch = function (event) { + // only allow zooming when configured as zoomable and moveable + if (!(this.options.zoomable && this.options.moveable)) return; - // recalculate absolute position (before redrawing groups) - this.props.top = this.body.domProps.top.height + this.body.domProps.border.top; - this.props.left = this.body.domProps.left.width + this.body.domProps.border.left; + this.props.touch.allowDragging = false; - // update class name - frame.className = 'vis-itemset'; + if (!this.props.touch.center) { + this.props.touch.center = getPointer(event.center, this.body.dom.center); + } - // reorder the groups (if needed) - resized = this._orderGroups() || resized; + var scale = 1 / (event.scale + this.scaleOffset); + var centerDate = this._pointerToDate(this.props.touch.center); - // check whether zoomed (in that case we need to re-stack everything) - // TODO: would be nicer to get this as a trigger from Range - var visibleInterval = range.end - range.start; - var zoomed = visibleInterval != this.lastVisibleInterval || this.props.width != this.props.lastWidth; - if (zoomed) this.stackDirty = true; - this.lastVisibleInterval = visibleInterval; - this.props.lastWidth = this.props.width; + var hiddenDuration = DateUtil.getHiddenDurationBetween(this.body.hiddenDates, this.start, this.end); + var hiddenDurationBefore = DateUtil.getHiddenDurationBefore(this.options.moment, this.body.hiddenDates, this, centerDate); + var hiddenDurationAfter = hiddenDuration - hiddenDurationBefore; - var restack = this.stackDirty; - var firstGroup = this._firstGroup(); - var firstMargin = { - item: margin.item, - axis: margin.axis - }; - var nonFirstMargin = { - item: margin.item, - axis: margin.item.vertical / 2 - }; - var height = 0; - var minHeight = margin.axis + margin.item.vertical; - - // redraw the background group - this.groups[BACKGROUND].redraw(range, nonFirstMargin, restack); - - // redraw all regular groups - util.forEach(this.groups, function (group) { - var groupMargin = group == firstGroup ? firstMargin : nonFirstMargin; - var groupResized = group.redraw(range, groupMargin, restack); - resized = groupResized || resized; - height += group.height; - }); - height = Math.max(height, minHeight); - this.stackDirty = false; - - // update frame height - frame.style.height = asSize(height); + // calculate new start and end + var newStart = centerDate - hiddenDurationBefore + (this.props.touch.start - (centerDate - hiddenDurationBefore)) * scale; + var newEnd = centerDate + hiddenDurationAfter + (this.props.touch.end - (centerDate + hiddenDurationAfter)) * scale; - // calculate actual size - this.props.width = frame.offsetWidth; - this.props.height = height; + // snapping times away from hidden zones + this.startToFront = 1 - scale <= 0; // used to do the right auto correction with periodic hidden times + this.endToFront = scale - 1 <= 0; // used to do the right auto correction with periodic hidden times - // reposition axis - this.dom.axis.style.top = asSize(orientation == 'top' ? this.body.domProps.top.height + this.body.domProps.border.top : this.body.domProps.top.height + this.body.domProps.centerContainer.height); - this.dom.axis.style.left = '0'; + var safeStart = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newStart, 1 - scale, true); + var safeEnd = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newEnd, scale - 1, true); + if (safeStart != newStart || safeEnd != newEnd) { + this.props.touch.start = safeStart; + this.props.touch.end = safeEnd; + this.scaleOffset = 1 - event.scale; + newStart = safeStart; + newEnd = safeEnd; + } - // check if this component is resized - resized = this._isResized() || resized; + this.setRange(newStart, newEnd, false, true); - return resized; + this.startToFront = false; // revert to default + this.endToFront = true; // revert to default }; /** - * Get the first group, aligned with the axis - * @return {Group | null} firstGroup + * Test whether the mouse from a mouse event is inside the visible window, + * between the current start and end date + * @param {Object} event + * @return {boolean} Returns true when inside the visible window * @private */ - ItemSet.prototype._firstGroup = function () { - var firstGroupIndex = this.options.orientation.item == 'top' ? 0 : this.groupIds.length - 1; - var firstGroupId = this.groupIds[firstGroupIndex]; - var firstGroup = this.groups[firstGroupId] || this.groups[UNGROUPED]; + Range.prototype._isInsideRange = function (event) { + // calculate the time where the mouse is, check whether inside + // and no scroll action should happen. + var clientX = event.center ? event.center.x : event.clientX; + var x = clientX - util.getAbsoluteLeft(this.body.dom.centerContainer); + var time = this.body.util.toTime(x); - return firstGroup || null; + return time >= this.start && time <= this.end; }; /** - * Create or delete the group holding all ungrouped items. This group is used when - * there are no groups specified. - * @protected + * Helper function to calculate the center date for zooming + * @param {{x: Number, y: Number}} pointer + * @return {number} date + * @private */ - ItemSet.prototype._updateUngrouped = function () { - var ungrouped = this.groups[UNGROUPED]; - var background = this.groups[BACKGROUND]; - var item, itemId; + Range.prototype._pointerToDate = function (pointer) { + var conversion; + var direction = this.options.direction; - if (this.groupsData) { - // remove the group holding all ungrouped items - if (ungrouped) { - ungrouped.hide(); - delete this.groups[UNGROUPED]; + validateDirection(direction); - for (itemId in this.items) { - if (this.items.hasOwnProperty(itemId)) { - item = this.items[itemId]; - item.parent && item.parent.remove(item); - var groupId = this._getGroupId(item.data); - var group = this.groups[groupId]; - group && group.add(item) || item.hide(); - } - } - } + if (direction == 'horizontal') { + return this.body.util.toTime(pointer.x).valueOf(); } else { - // create a group holding all (unfiltered) items - if (!ungrouped) { - var id = null; - var data = null; - ungrouped = new Group(id, data, this); - this.groups[UNGROUPED] = ungrouped; - - for (itemId in this.items) { - if (this.items.hasOwnProperty(itemId)) { - item = this.items[itemId]; - ungrouped.add(item); - } - } - - ungrouped.show(); - } + var height = this.body.domProps.center.height; + conversion = this.conversion(height); + return pointer.y / conversion.scale + conversion.offset; } }; /** - * Get the element for the labelset - * @return {HTMLElement} labelSet + * Get the pointer location relative to the location of the dom element + * @param {{x: Number, y: Number}} touch + * @param {Element} element HTML DOM element + * @return {{x: Number, y: Number}} pointer + * @private */ - ItemSet.prototype.getLabelSet = function () { - return this.dom.labelSet; - }; + function getPointer(touch, element) { + return { + x: touch.x - util.getAbsoluteLeft(element), + y: touch.y - util.getAbsoluteTop(element) + }; + } /** - * Set items - * @param {vis.DataSet | null} items + * Zoom the range the given scale in or out. Start and end date will + * be adjusted, and the timeline will be redrawn. You can optionally give a + * date around which to zoom. + * For example, try scale = 0.9 or 1.1 + * @param {Number} scale Scaling factor. Values above 1 will zoom out, + * values below 1 will zoom in. + * @param {Number} [center] Value representing a date around which will + * be zoomed. */ - ItemSet.prototype.setItems = function (items) { - var me = this, - ids, - oldItemsData = this.itemsData; - - // replace the dataset - if (!items) { - this.itemsData = null; - } else if (items instanceof DataSet || items instanceof DataView) { - this.itemsData = items; - } else { - throw new TypeError('Data must be an instance of DataSet or DataView'); - } - - if (oldItemsData) { - // unsubscribe from old dataset - util.forEach(this.itemListeners, function (callback, event) { - oldItemsData.off(event, callback); - }); - - // remove all drawn items - ids = oldItemsData.getIds(); - this._onRemove(ids); + Range.prototype.zoom = function (scale, center, delta) { + // if centerDate is not provided, take it half between start Date and end Date + if (center == null) { + center = (this.start + this.end) / 2; } - if (this.itemsData) { - // subscribe to new dataset - var id = this.id; - util.forEach(this.itemListeners, function (callback, event) { - me.itemsData.on(event, callback, id); - }); + var hiddenDuration = DateUtil.getHiddenDurationBetween(this.body.hiddenDates, this.start, this.end); + var hiddenDurationBefore = DateUtil.getHiddenDurationBefore(this.options.moment, this.body.hiddenDates, this, center); + var hiddenDurationAfter = hiddenDuration - hiddenDurationBefore; - // add all new items - ids = this.itemsData.getIds(); - this._onAdd(ids); + // calculate new start and end + var newStart = center - hiddenDurationBefore + (this.start - (center - hiddenDurationBefore)) * scale; + var newEnd = center + hiddenDurationAfter + (this.end - (center + hiddenDurationAfter)) * scale; - // update the group holding all ungrouped items - this._updateUngrouped(); + // snapping times away from hidden zones + this.startToFront = delta > 0 ? false : true; // used to do the right autocorrection with periodic hidden times + this.endToFront = -delta > 0 ? false : true; // used to do the right autocorrection with periodic hidden times + var safeStart = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newStart, delta, true); + var safeEnd = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newEnd, -delta, true); + if (safeStart != newStart || safeEnd != newEnd) { + newStart = safeStart; + newEnd = safeEnd; } - this.body.emitter.emit('_change', { queue: true }); + this.setRange(newStart, newEnd, false, true); + + this.startToFront = false; // revert to default + this.endToFront = true; // revert to default }; /** - * Get the current items - * @returns {vis.DataSet | null} + * Move the range with a given delta to the left or right. Start and end + * value will be adjusted. For example, try delta = 0.1 or -0.1 + * @param {Number} delta Moving amount. Positive value will move right, + * negative value will move left */ - ItemSet.prototype.getItems = function () { - return this.itemsData; + Range.prototype.move = function (delta) { + // zoom start Date and end Date relative to the centerDate + var diff = this.end - this.start; + + // apply new values + var newStart = this.start + diff * delta; + var newEnd = this.end + diff * delta; + + // TODO: reckon with min and max range + + this.start = newStart; + this.end = newEnd; }; /** - * Set groups - * @param {vis.DataSet} groups + * Move the range to a new center point + * @param {Number} moveTo New center point of the range */ - ItemSet.prototype.setGroups = function (groups) { - var me = this, - ids; - - // unsubscribe from current dataset - if (this.groupsData) { - util.forEach(this.groupListeners, function (callback, event) { - me.groupsData.off(event, callback); - }); - - // remove all drawn groups - ids = this.groupsData.getIds(); - this.groupsData = null; - this._onRemoveGroups(ids); // note: this will cause a redraw - } + Range.prototype.moveTo = function (moveTo) { + var center = (this.start + this.end) / 2; - // replace the dataset - if (!groups) { - this.groupsData = null; - } else if (groups instanceof DataSet || groups instanceof DataView) { - this.groupsData = groups; - } else { - throw new TypeError('Data must be an instance of DataSet or DataView'); - } + var diff = center - moveTo; - if (this.groupsData) { - // subscribe to new dataset - var id = this.id; - util.forEach(this.groupListeners, function (callback, event) { - me.groupsData.on(event, callback, id); - }); + // calculate new start and end + var newStart = this.start - diff; + var newEnd = this.end - diff; - // draw all ms - ids = this.groupsData.getIds(); - this._onAddGroups(ids); - } + this.setRange(newStart, newEnd); + }; - // update the group holding all ungrouped items - this._updateUngrouped(); + module.exports = Range; - // update the order of all items in each group - this._order(); +/***/ }, +/* 28 */ +/***/ function(module, exports) { - this.body.emitter.emit('_change', { queue: true }); - }; + "use strict"; /** - * Get the current groups - * @returns {vis.DataSet | null} groups + * Prototype for visual components + * @param {{dom: Object, domProps: Object, emitter: Emitter, range: Range}} [body] + * @param {Object} [options] */ - ItemSet.prototype.getGroups = function () { - return this.groupsData; - }; + function Component(body, options) { + this.options = null; + this.props = null; + } /** - * Remove an item by its id - * @param {String | Number} id + * Set options for the component. The new options will be merged into the + * current options. + * @param {Object} options */ - ItemSet.prototype.removeItem = function (id) { - var item = this.itemsData.get(id), - dataset = this.itemsData.getDataSet(); - - if (item) { - // confirm deletion - this.options.onRemove(item, function (item) { - if (item) { - // remove by id here, it is possible that an item has no id defined - // itself, so better not delete by the item itself - dataset.remove(id); - } - }); + Component.prototype.setOptions = function (options) { + if (options) { + util.extend(this.options, options); } }; /** - * Get the time of an item based on it's data and options.type - * @param {Object} itemData - * @returns {string} Returns the type - * @private + * Repaint the component + * @return {boolean} Returns true if the component is resized */ - ItemSet.prototype._getType = function (itemData) { - return itemData.type || this.options.type || (itemData.end ? 'range' : 'box'); + Component.prototype.redraw = function () { + // should be implemented by the component + return false; }; /** - * Get the group id for an item - * @param {Object} itemData - * @returns {string} Returns the groupId - * @private + * Destroy the component. Cleanup DOM and event listeners */ - ItemSet.prototype._getGroupId = function (itemData) { - var type = this._getType(itemData); - if (type == 'background' && itemData.group == undefined) { - return BACKGROUND; - } else { - return this.groupsData ? itemData.group : UNGROUPED; - } + Component.prototype.destroy = function () { + // should be implemented by the component }; /** - * Handle updated items - * @param {Number[]} ids + * Test whether the component is resized since the last time _isResized() was + * called. + * @return {Boolean} Returns true if the component is resized * @protected */ - ItemSet.prototype._onUpdate = function (ids) { - var me = this; + Component.prototype._isResized = function () { + var resized = this.props._previousWidth !== this.props.width || this.props._previousHeight !== this.props.height; - ids.forEach((function (id) { - var itemData = me.itemsData.get(id, me.itemOptions); - var item = me.items[id]; - var type = me._getType(itemData); + this.props._previousWidth = this.props.width; + this.props._previousHeight = this.props.height; - var constructor = ItemSet.types[type]; - var selected; + return resized; + }; - if (item) { - // update item - if (!constructor || !(item instanceof constructor)) { - // item type has changed, delete the item and recreate it - selected = item.selected; // preserve selection of this item - me._removeItem(item); - item = null; - } else { - me._updateItem(item, itemData); - } - } + module.exports = Component; - if (!item) { - // create item - if (constructor) { - item = new constructor(itemData, me.conversion, me.options); - item.id = id; // TODO: not so nice setting id afterwards - me._addItem(item); - if (selected) { - this.selection.push(id); - item.select(); - } - } else if (type == 'rangeoverflow') { - // TODO: deprecated since version 2.1.0 (or 3.0.0?). cleanup some day - throw new TypeError('Item type "rangeoverflow" is deprecated. Use css styling instead: ' + '.vis-item.vis-range .vis-item-content {overflow: visible;}'); - } else { - throw new TypeError('Unknown item type "' + type + '"'); - } - } - }).bind(this)); +/***/ }, +/* 29 */ +/***/ function(module, exports) { - this._order(); - this.stackDirty = true; // force re-stacking of all items next redraw - this.body.emitter.emit('_change', { queue: true }); - }; + "use strict"; /** - * Handle added items - * @param {Number[]} ids - * @protected + * used in Core to convert the options into a volatile variable + * + * @param {function} moment + * @param {Object} body + * @param {Array | Object} hiddenDates */ - ItemSet.prototype._onAdd = ItemSet.prototype._onUpdate; + exports.convertHiddenOptions = function (moment, body, hiddenDates) { + if (hiddenDates && !Array.isArray(hiddenDates)) { + return exports.convertHiddenOptions(moment, body, [hiddenDates]); + } - /** - * Handle removed items - * @param {Number[]} ids - * @protected - */ - ItemSet.prototype._onRemove = function (ids) { - var count = 0; - var me = this; - ids.forEach(function (id) { - var item = me.items[id]; - if (item) { - count++; - me._removeItem(item); + body.hiddenDates = []; + if (hiddenDates) { + if (Array.isArray(hiddenDates) == true) { + for (var i = 0; i < hiddenDates.length; i++) { + if (hiddenDates[i].repeat === undefined) { + var dateItem = {}; + dateItem.start = moment(hiddenDates[i].start).toDate().valueOf(); + dateItem.end = moment(hiddenDates[i].end).toDate().valueOf(); + body.hiddenDates.push(dateItem); + } + } + body.hiddenDates.sort(function (a, b) { + return a.start - b.start; + }); // sort by start time } - }); - - if (count) { - // update order - this._order(); - this.stackDirty = true; // force re-stacking of all items next redraw - this.body.emitter.emit('_change', { queue: true }); } }; /** - * Update the order of item in all groups - * @private - */ - ItemSet.prototype._order = function () { - // reorder the items in all groups - // TODO: optimization: only reorder groups affected by the changed items - util.forEach(this.groups, function (group) { - group.order(); - }); - }; - - /** - * Handle updated groups - * @param {Number[]} ids - * @private - */ - ItemSet.prototype._onUpdateGroups = function (ids) { - this._onAddGroups(ids); - }; - - /** - * Handle changed groups (added or updated) - * @param {Number[]} ids - * @private + * create new entrees for the repeating hidden dates + * @param {function} moment + * @param {Object} body + * @param {Array | Object} hiddenDates */ - ItemSet.prototype._onAddGroups = function (ids) { - var me = this; + exports.updateHiddenDates = function (moment, body, hiddenDates) { + if (hiddenDates && !Array.isArray(hiddenDates)) { + return exports.updateHiddenDates(moment, body, [hiddenDates]); + } - ids.forEach(function (id) { - var groupData = me.groupsData.get(id); - var group = me.groups[id]; + if (hiddenDates && body.domProps.centerContainer.width !== undefined) { + exports.convertHiddenOptions(moment, body, hiddenDates); - if (!group) { - // check for reserved ids - if (id == UNGROUPED || id == BACKGROUND) { - throw new Error('Illegal group id. ' + id + ' is a reserved id.'); - } + var start = moment(body.range.start); + var end = moment(body.range.end); - var groupOptions = Object.create(me.options); - util.extend(groupOptions, { - height: null - }); + var totalRange = body.range.end - body.range.start; + var pixelTime = totalRange / body.domProps.centerContainer.width; - group = new Group(id, groupData, me); - me.groups[id] = group; + for (var i = 0; i < hiddenDates.length; i++) { + if (hiddenDates[i].repeat !== undefined) { + var startDate = moment(hiddenDates[i].start); + var endDate = moment(hiddenDates[i].end); - // add items with this groupId to the new group - for (var itemId in me.items) { - if (me.items.hasOwnProperty(itemId)) { - var item = me.items[itemId]; - if (item.data.group == id) { - group.add(item); - } + if (startDate._d == "Invalid Date") { + throw new Error("Supplied start date is not valid: " + hiddenDates[i].start); + } + if (endDate._d == "Invalid Date") { + throw new Error("Supplied end date is not valid: " + hiddenDates[i].end); } - } - group.order(); - group.show(); - } else { - // update group - group.setData(groupData); - } - }); + var duration = endDate - startDate; + if (duration >= 4 * pixelTime) { - this.body.emitter.emit('_change', { queue: true }); - }; + var offset = 0; + var runUntil = end.clone(); + switch (hiddenDates[i].repeat) { + case "daily": + // case of time + if (startDate.day() != endDate.day()) { + offset = 1; + } + startDate.dayOfYear(start.dayOfYear()); + startDate.year(start.year()); + startDate.subtract(7, 'days'); - /** - * Handle removed groups - * @param {Number[]} ids - * @private - */ - ItemSet.prototype._onRemoveGroups = function (ids) { - var groups = this.groups; - ids.forEach(function (id) { - var group = groups[id]; + endDate.dayOfYear(start.dayOfYear()); + endDate.year(start.year()); + endDate.subtract(7 - offset, 'days'); - if (group) { - group.hide(); - delete groups[id]; - } - }); + runUntil.add(1, 'weeks'); + break; + case "weekly": + var dayOffset = endDate.diff(startDate, 'days'); + var day = startDate.day(); - this.markDirty(); + // set the start date to the range.start + startDate.date(start.date()); + startDate.month(start.month()); + startDate.year(start.year()); + endDate = startDate.clone(); - this.body.emitter.emit('_change', { queue: true }); - }; + // force + startDate.day(day); + endDate.day(day); + endDate.add(dayOffset, 'days'); - /** - * Reorder the groups if needed - * @return {boolean} changed - * @private - */ - ItemSet.prototype._orderGroups = function () { - if (this.groupsData) { - // reorder the groups - var groupIds = this.groupsData.getIds({ - order: this.options.groupOrder - }); + startDate.subtract(1, 'weeks'); + endDate.subtract(1, 'weeks'); - var changed = !util.equalArray(groupIds, this.groupIds); - if (changed) { - // hide all groups, removes them from the DOM - var groups = this.groups; - groupIds.forEach(function (groupId) { - groups[groupId].hide(); - }); + runUntil.add(1, 'weeks'); + break; + case "monthly": + if (startDate.month() != endDate.month()) { + offset = 1; + } + startDate.month(start.month()); + startDate.year(start.year()); + startDate.subtract(1, 'months'); - // show the groups again, attach them to the DOM in correct order - groupIds.forEach(function (groupId) { - groups[groupId].show(); - }); + endDate.month(start.month()); + endDate.year(start.year()); + endDate.subtract(1, 'months'); + endDate.add(offset, 'months'); - this.groupIds = groupIds; - } + runUntil.add(1, 'months'); + break; + case "yearly": + if (startDate.year() != endDate.year()) { + offset = 1; + } + startDate.year(start.year()); + startDate.subtract(1, 'years'); + endDate.year(start.year()); + endDate.subtract(1, 'years'); + endDate.add(offset, 'years'); - return changed; - } else { - return false; + runUntil.add(1, 'years'); + break; + default: + console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:", hiddenDates[i].repeat); + return; + } + while (startDate < runUntil) { + body.hiddenDates.push({ start: startDate.valueOf(), end: endDate.valueOf() }); + switch (hiddenDates[i].repeat) { + case "daily": + startDate.add(1, 'days'); + endDate.add(1, 'days'); + break; + case "weekly": + startDate.add(1, 'weeks'); + endDate.add(1, 'weeks'); + break; + case "monthly": + startDate.add(1, 'months'); + endDate.add(1, 'months'); + break; + case "yearly": + startDate.add(1, 'y'); + endDate.add(1, 'y'); + break; + default: + console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:", hiddenDates[i].repeat); + return; + } + } + body.hiddenDates.push({ start: startDate.valueOf(), end: endDate.valueOf() }); + } + } + } + // remove duplicates, merge where possible + exports.removeDuplicates(body); + // ensure the new positions are not on hidden dates + var startHidden = exports.isHidden(body.range.start, body.hiddenDates); + var endHidden = exports.isHidden(body.range.end, body.hiddenDates); + var rangeStart = body.range.start; + var rangeEnd = body.range.end; + if (startHidden.hidden == true) { + rangeStart = body.range.startToFront == true ? startHidden.startDate - 1 : startHidden.endDate + 1; + } + if (endHidden.hidden == true) { + rangeEnd = body.range.endToFront == true ? endHidden.startDate - 1 : endHidden.endDate + 1; + } + if (startHidden.hidden == true || endHidden.hidden == true) { + body.range._applyRange(rangeStart, rangeEnd); + } } }; /** - * Add a new item - * @param {Item} item - * @private - */ - ItemSet.prototype._addItem = function (item) { - this.items[item.id] = item; - - // add to group - var groupId = this._getGroupId(item.data); - var group = this.groups[groupId]; - if (group) group.add(item); - }; - - /** - * Update an existing item - * @param {Item} item - * @param {Object} itemData - * @private + * remove duplicates from the hidden dates list. Duplicates are evil. They mess everything up. + * Scales with N^2 + * @param body */ - ItemSet.prototype._updateItem = function (item, itemData) { - var oldGroupId = item.data.group; - var oldSubGroupId = item.data.subgroup; + exports.removeDuplicates = function (body) { + var hiddenDates = body.hiddenDates; + var safeDates = []; + for (var i = 0; i < hiddenDates.length; i++) { + for (var j = 0; j < hiddenDates.length; j++) { + if (i != j && hiddenDates[j].remove != true && hiddenDates[i].remove != true) { + // j inside i + if (hiddenDates[j].start >= hiddenDates[i].start && hiddenDates[j].end <= hiddenDates[i].end) { + hiddenDates[j].remove = true; + } + // j start inside i + else if (hiddenDates[j].start >= hiddenDates[i].start && hiddenDates[j].start <= hiddenDates[i].end) { + hiddenDates[i].end = hiddenDates[j].end; + hiddenDates[j].remove = true; + } + // j end inside i + else if (hiddenDates[j].end >= hiddenDates[i].start && hiddenDates[j].end <= hiddenDates[i].end) { + hiddenDates[i].start = hiddenDates[j].start; + hiddenDates[j].remove = true; + } + } + } + } - // update the items data (will redraw the item when displayed) - item.setData(itemData); + for (var i = 0; i < hiddenDates.length; i++) { + if (hiddenDates[i].remove !== true) { + safeDates.push(hiddenDates[i]); + } + } - // update group - if (oldGroupId != item.data.group || oldSubGroupId != item.data.subgroup) { - var oldGroup = this.groups[oldGroupId]; - if (oldGroup) oldGroup.remove(item); + body.hiddenDates = safeDates; + body.hiddenDates.sort(function (a, b) { + return a.start - b.start; + }); // sort by start time + }; - var groupId = this._getGroupId(item.data); - var group = this.groups[groupId]; - if (group) group.add(item); + exports.printDates = function (dates) { + for (var i = 0; i < dates.length; i++) { + console.log(i, new Date(dates[i].start), new Date(dates[i].end), dates[i].start, dates[i].end, dates[i].remove); } }; /** - * Delete an item from the ItemSet: remove it from the DOM, from the map - * with items, and from the map with visible items, and from the selection - * @param {Item} item - * @private + * Used in TimeStep to avoid the hidden times. + * @param {function} moment + * @param {TimeStep} timeStep + * @param previousTime */ - ItemSet.prototype._removeItem = function (item) { - // remove from DOM - item.hide(); - - // remove from items - delete this.items[item.id]; + exports.stepOverHiddenDates = function (moment, timeStep, previousTime) { + var stepInHidden = false; + var currentValue = timeStep.current.valueOf(); + for (var i = 0; i < timeStep.hiddenDates.length; i++) { + var startDate = timeStep.hiddenDates[i].start; + var endDate = timeStep.hiddenDates[i].end; + if (currentValue >= startDate && currentValue < endDate) { + stepInHidden = true; + break; + } + } - // remove from selection - var index = this.selection.indexOf(item.id); - if (index != -1) this.selection.splice(index, 1); + if (stepInHidden == true && currentValue < timeStep._end.valueOf() && currentValue != previousTime) { + var prevValue = moment(previousTime); + var newValue = moment(endDate); + //check if the next step should be major + if (prevValue.year() != newValue.year()) { + timeStep.switchedYear = true; + } else if (prevValue.month() != newValue.month()) { + timeStep.switchedMonth = true; + } else if (prevValue.dayOfYear() != newValue.dayOfYear()) { + timeStep.switchedDay = true; + } - // remove from group - item.parent && item.parent.remove(item); + timeStep.current = newValue; + } }; + ///** + // * Used in TimeStep to avoid the hidden times. + // * @param timeStep + // * @param previousTime + // */ + //exports.checkFirstStep = function(timeStep) { + // var stepInHidden = false; + // var currentValue = timeStep.current.valueOf(); + // for (var i = 0; i < timeStep.hiddenDates.length; i++) { + // var startDate = timeStep.hiddenDates[i].start; + // var endDate = timeStep.hiddenDates[i].end; + // if (currentValue >= startDate && currentValue < endDate) { + // stepInHidden = true; + // break; + // } + // } + // + // if (stepInHidden == true && currentValue <= timeStep._end.valueOf()) { + // var newValue = moment(endDate); + // timeStep.current = newValue.toDate(); + // } + //}; + /** - * Create an array containing all items being a range (having an end date) - * @param array - * @returns {Array} - * @private + * replaces the Core toScreen methods + * @param Core + * @param time + * @param width + * @returns {number} */ - ItemSet.prototype._constructByEndArray = function (array) { - var endArray = []; - - for (var i = 0; i < array.length; i++) { - if (array[i] instanceof RangeItem) { - endArray.push(array[i]); + exports.toScreen = function (Core, time, width) { + if (Core.body.hiddenDates.length == 0) { + var conversion = Core.range.conversion(width); + return (time.valueOf() - conversion.offset) * conversion.scale; + } else { + var hidden = exports.isHidden(time, Core.body.hiddenDates); + if (hidden.hidden == true) { + time = hidden.startDate; } + + var duration = exports.getHiddenDurationBetween(Core.body.hiddenDates, Core.range.start, Core.range.end); + time = exports.correctTimeForHidden(Core.options.moment, Core.body.hiddenDates, Core.range, time); + + var conversion = Core.range.conversion(width, duration); + return (time.valueOf() - conversion.offset) * conversion.scale; } - return endArray; }; /** - * Register the clicked item on touch, before dragStart is initiated. - * - * dragStart is initiated from a mousemove event, AFTER the mouse/touch is - * already moving. Therefore, the mouse/touch can sometimes be above an other - * DOM element than the item itself. - * - * @param {Event} event - * @private + * Replaces the core toTime methods + * @param body + * @param range + * @param x + * @param width + * @returns {Date} */ - ItemSet.prototype._onTouch = function (event) { - // store the touched item, used in _onDragStart - this.touchParams.item = this.itemFromTarget(event); - this.touchParams.dragLeftItem = event.target.dragLeftItem || false; - this.touchParams.dragRightItem = event.target.dragRightItem || false; - this.touchParams.itemProps = null; + exports.toTime = function (Core, x, width) { + if (Core.body.hiddenDates.length == 0) { + var conversion = Core.range.conversion(width); + return new Date(x / conversion.scale + conversion.offset); + } else { + var hiddenDuration = exports.getHiddenDurationBetween(Core.body.hiddenDates, Core.range.start, Core.range.end); + var totalDuration = Core.range.end - Core.range.start - hiddenDuration; + var partialDuration = totalDuration * x / width; + var accumulatedHiddenDuration = exports.getAccumulatedHiddenDuration(Core.body.hiddenDates, Core.range, partialDuration); + + var newTime = new Date(accumulatedHiddenDuration + partialDuration + Core.range.start); + return newTime; + } }; /** - * Given an group id, returns the index it has. + * Support function * - * @param {Number} groupID - * @private + * @param hiddenDates + * @param range + * @returns {number} */ - ItemSet.prototype._getGroupIndex = function (groupId) { - for (var i = 0; i < this.groupIds.length; i++) { - if (groupId == this.groupIds[i]) return i; + exports.getHiddenDurationBetween = function (hiddenDates, start, end) { + var duration = 0; + for (var i = 0; i < hiddenDates.length; i++) { + var startDate = hiddenDates[i].start; + var endDate = hiddenDates[i].end; + // if time after the cutout, and the + if (startDate >= start && endDate < end) { + duration += endDate - startDate; + } } + return duration; }; /** - * Start dragging the selected events - * @param {Event} event - * @private + * Support function + * @param moment + * @param hiddenDates + * @param range + * @param time + * @returns {{duration: number, time: *, offset: number}} */ - ItemSet.prototype._onDragStart = function (event) { - var item = this.touchParams.item || null; - var me = this; - var props; + exports.correctTimeForHidden = function (moment, hiddenDates, range, time) { + time = moment(time).toDate().valueOf(); + time -= exports.getHiddenDurationBefore(moment, hiddenDates, range, time); + return time; + }; - if (item && (item.selected || this.options.itemsAlwaysDraggable)) { + exports.getHiddenDurationBefore = function (moment, hiddenDates, range, time) { + var timeOffset = 0; + time = moment(time).toDate().valueOf(); - if (!this.options.editable.updateTime && !this.options.editable.updateGroup && !item.editable) { - return; + for (var i = 0; i < hiddenDates.length; i++) { + var startDate = hiddenDates[i].start; + var endDate = hiddenDates[i].end; + // if time after the cutout, and the + if (startDate >= range.start && endDate < range.end) { + if (time >= endDate) { + timeOffset += endDate - startDate; + } } + } + return timeOffset; + }; - // override options.editable - if (item.editable === false) { - return; + /** + * sum the duration from start to finish, including the hidden duration, + * until the required amount has been reached, return the accumulated hidden duration + * @param hiddenDates + * @param range + * @param time + * @returns {{duration: number, time: *, offset: number}} + */ + exports.getAccumulatedHiddenDuration = function (hiddenDates, range, requiredDuration) { + var hiddenDuration = 0; + var duration = 0; + var previousPoint = range.start; + //exports.printDates(hiddenDates) + for (var i = 0; i < hiddenDates.length; i++) { + var startDate = hiddenDates[i].start; + var endDate = hiddenDates[i].end; + // if time after the cutout, and the + if (startDate >= range.start && endDate < range.end) { + duration += startDate - previousPoint; + previousPoint = endDate; + if (duration >= requiredDuration) { + break; + } else { + hiddenDuration += endDate - startDate; + } } + } - var dragLeftItem = this.touchParams.dragLeftItem; - var dragRightItem = this.touchParams.dragRightItem; - - if (dragLeftItem) { - props = { - item: dragLeftItem, - initialX: event.center.x, - dragLeft: true, - data: this._cloneItemData(item.data) - }; - - this.touchParams.itemProps = [props]; - } else if (dragRightItem) { - props = { - item: dragRightItem, - initialX: event.center.x, - dragRight: true, - data: this._cloneItemData(item.data) - }; + return hiddenDuration; + }; - this.touchParams.itemProps = [props]; + /** + * used to step over to either side of a hidden block. Correction is disabled on tablets, might be set to true + * @param hiddenDates + * @param time + * @param direction + * @param correctionEnabled + * @returns {*} + */ + exports.snapAwayFromHidden = function (hiddenDates, time, direction, correctionEnabled) { + var isHidden = exports.isHidden(time, hiddenDates); + if (isHidden.hidden == true) { + if (direction < 0) { + if (correctionEnabled == true) { + return isHidden.startDate - (isHidden.endDate - time) - 1; + } else { + return isHidden.startDate - 1; + } } else { - this.touchParams.selectedItem = item; - - var baseGroupIndex = this._getGroupIndex(item.data.group); - - var itemsToDrag = this.options.itemsAlwaysDraggable && !item.selected ? [item.id] : this.getSelection(); - - this.touchParams.itemProps = itemsToDrag.map((function (id) { - var item = me.items[id]; - var groupIndex = me._getGroupIndex(item.data.group); - return { - item: item, - initialX: event.center.x, - groupOffset: baseGroupIndex - groupIndex, - data: this._cloneItemData(item.data) - }; - }).bind(this)); + if (correctionEnabled == true) { + return isHidden.endDate + (time - isHidden.startDate) + 1; + } else { + return isHidden.endDate + 1; + } } - - event.stopPropagation(); - } else if (this.options.editable.add && (event.srcEvent.ctrlKey || event.srcEvent.metaKey)) { - // create a new range item when dragging with ctrl key down - this._onDragStartAddItem(event); + } else { + return time; } }; /** - * Start creating a new range item by dragging. - * @param {Event} event - * @private + * Check if a time is hidden + * + * @param time + * @param hiddenDates + * @returns {{hidden: boolean, startDate: Window.start, endDate: *}} */ - ItemSet.prototype._onDragStartAddItem = function (event) { - var snap = this.options.snap || null; - var xAbs = util.getAbsoluteLeft(this.dom.frame); - var x = event.center.x - xAbs - 10; // minus 10 to compensate for the drag starting as soon as you've moved 10px - var time = this.body.util.toTime(x); - var scale = this.body.util.getScale(); - var step = this.body.util.getStep(); - var start = snap ? snap(time, scale, step) : time; - var end = start; + exports.isHidden = function (time, hiddenDates) { + for (var i = 0; i < hiddenDates.length; i++) { + var startDate = hiddenDates[i].start; + var endDate = hiddenDates[i].end; - var itemData = { - type: 'range', - start: start, - end: end, - content: 'new item' - }; + if (time >= startDate && time < endDate) { + // if the start is entering a hidden zone + return { hidden: true, startDate: startDate, endDate: endDate }; + break; + } + } + return { hidden: false, startDate: startDate, endDate: endDate }; + }; - var id = util.randomUUID(); - itemData[this.itemsData._fieldId] = id; +/***/ }, +/* 30 */ +/***/ function(module, exports, __webpack_require__) { - var group = this.groupFromTarget(event); - if (group) { - itemData.group = group.groupId; - } + 'use strict'; - var newItem = new RangeItem(itemData, this.conversion, this.options); - newItem.id = id; // TODO: not so nice setting id afterwards - newItem.data = this._cloneItemData(itemData); - this._addItem(newItem); + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; - var props = { - item: newItem, - dragRight: true, - initialX: event.center.x, - data: newItem.data - }; - this.touchParams.itemProps = [props]; + var Emitter = __webpack_require__(12); + var Hammer = __webpack_require__(22); + var hammerUtil = __webpack_require__(25); + var util = __webpack_require__(1); + var DataSet = __webpack_require__(8); + var DataView = __webpack_require__(10); + var Range = __webpack_require__(27); + var ItemSet = __webpack_require__(31); + var TimeAxis = __webpack_require__(41); + var Activator = __webpack_require__(42); + var DateUtil = __webpack_require__(29); + var CustomTime = __webpack_require__(44); - event.stopPropagation(); - }; + /** + * Create a timeline visualization + * @constructor + */ + function Core() {} + + // turn Core into an event emitter + Emitter(Core.prototype); /** - * Drag selected items - * @param {Event} event - * @private + * Create the main DOM for the Core: a root panel containing left, right, + * top, bottom, content, and background panel. + * @param {Element} container The container element where the Core will + * be attached. + * @protected */ - ItemSet.prototype._onDrag = function (event) { - if (this.touchParams.itemProps) { - event.stopPropagation(); + Core.prototype._create = function (container) { + this.dom = {}; - var me = this; - var snap = this.options.snap || null; - var xOffset = this.body.dom.root.offsetLeft + this.body.domProps.left.width; - var scale = this.body.util.getScale(); - var step = this.body.util.getStep(); + this.dom.container = container; - //only calculate the new group for the item that's actually dragged - var selectedItem = this.touchParams.selectedItem; - var updateGroupAllowed = me.options.editable.updateGroup; - var newGroupBase = null; - if (updateGroupAllowed && selectedItem) { - if (selectedItem.data.group != undefined) { - // drag from one group to another - var group = me.groupFromTarget(event); - if (group) { - //we know the offset for all items, so the new group for all items - //will be relative to this one. - newGroupBase = this._getGroupIndex(group.groupId); - } + this.dom.root = document.createElement('div'); + this.dom.background = document.createElement('div'); + this.dom.backgroundVertical = document.createElement('div'); + this.dom.backgroundHorizontal = document.createElement('div'); + this.dom.centerContainer = document.createElement('div'); + this.dom.leftContainer = document.createElement('div'); + this.dom.rightContainer = document.createElement('div'); + this.dom.center = document.createElement('div'); + this.dom.left = document.createElement('div'); + this.dom.right = document.createElement('div'); + this.dom.top = document.createElement('div'); + this.dom.bottom = document.createElement('div'); + this.dom.shadowTop = document.createElement('div'); + this.dom.shadowBottom = document.createElement('div'); + this.dom.shadowTopLeft = document.createElement('div'); + this.dom.shadowBottomLeft = document.createElement('div'); + this.dom.shadowTopRight = document.createElement('div'); + this.dom.shadowBottomRight = document.createElement('div'); + + this.dom.root.className = 'vis-timeline'; + this.dom.background.className = 'vis-panel vis-background'; + this.dom.backgroundVertical.className = 'vis-panel vis-background vis-vertical'; + this.dom.backgroundHorizontal.className = 'vis-panel vis-background vis-horizontal'; + this.dom.centerContainer.className = 'vis-panel vis-center'; + this.dom.leftContainer.className = 'vis-panel vis-left'; + this.dom.rightContainer.className = 'vis-panel vis-right'; + this.dom.top.className = 'vis-panel vis-top'; + this.dom.bottom.className = 'vis-panel vis-bottom'; + this.dom.left.className = 'vis-content'; + this.dom.center.className = 'vis-content'; + this.dom.right.className = 'vis-content'; + this.dom.shadowTop.className = 'vis-shadow vis-top'; + this.dom.shadowBottom.className = 'vis-shadow vis-bottom'; + this.dom.shadowTopLeft.className = 'vis-shadow vis-top'; + this.dom.shadowBottomLeft.className = 'vis-shadow vis-bottom'; + this.dom.shadowTopRight.className = 'vis-shadow vis-top'; + this.dom.shadowBottomRight.className = 'vis-shadow vis-bottom'; + + this.dom.root.appendChild(this.dom.background); + this.dom.root.appendChild(this.dom.backgroundVertical); + this.dom.root.appendChild(this.dom.backgroundHorizontal); + this.dom.root.appendChild(this.dom.centerContainer); + this.dom.root.appendChild(this.dom.leftContainer); + this.dom.root.appendChild(this.dom.rightContainer); + this.dom.root.appendChild(this.dom.top); + this.dom.root.appendChild(this.dom.bottom); + + this.dom.centerContainer.appendChild(this.dom.center); + this.dom.leftContainer.appendChild(this.dom.left); + this.dom.rightContainer.appendChild(this.dom.right); + + this.dom.centerContainer.appendChild(this.dom.shadowTop); + this.dom.centerContainer.appendChild(this.dom.shadowBottom); + this.dom.leftContainer.appendChild(this.dom.shadowTopLeft); + this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft); + this.dom.rightContainer.appendChild(this.dom.shadowTopRight); + this.dom.rightContainer.appendChild(this.dom.shadowBottomRight); + + this.on('rangechange', function () { + if (this.initialDrawDone === true) { + this._redraw(); // this allows overriding the _redraw method + } + }.bind(this)); + this.on('touch', this._onTouch.bind(this)); + this.on('pan', this._onDrag.bind(this)); + + var me = this; + this.on('_change', function (properties) { + if (properties && properties.queue == true) { + // redraw once on next tick + if (!me._redrawTimer) { + me._redrawTimer = setTimeout(function () { + me._redrawTimer = null; + me._redraw(); + }, 0); } + } else { + // redraw immediately + me._redraw(); } + }); - // move - this.touchParams.itemProps.forEach((function (props) { - var current = me.body.util.toTime(event.center.x - xOffset); - var initial = me.body.util.toTime(props.initialX - xOffset); - var offset = current - initial; // ms + // create event listeners for all interesting events, these events will be + // emitted via emitter + this.hammer = new Hammer(this.dom.root); + var pinchRecognizer = this.hammer.get('pinch').set({ enable: true }); + hammerUtil.disablePreventDefaultVertically(pinchRecognizer); + this.hammer.get('pan').set({ threshold: 5, direction: Hammer.DIRECTION_HORIZONTAL }); + this.listeners = {}; - var itemData = this._cloneItemData(props.item.data); // clone the data - if (props.item.editable === false) { - return; + var events = ['tap', 'doubletap', 'press', 'pinch', 'pan', 'panstart', 'panmove', 'panend' + // TODO: cleanup + //'touch', 'pinch', + //'tap', 'doubletap', 'hold', + //'dragstart', 'drag', 'dragend', + //'mousewheel', 'DOMMouseScroll' // DOMMouseScroll is needed for Firefox + ]; + events.forEach(function (type) { + var listener = function listener(event) { + if (me.isActive()) { + me.emit(type, event); } + }; + me.hammer.on(type, listener); + me.listeners[type] = listener; + }); - var updateTimeAllowed = me.options.editable.updateTime || props.item.editable === true; + // emulate a touch event (emitted before the start of a pan, pinch, tap, or press) + hammerUtil.onTouch(this.hammer, function (event) { + me.emit('touch', event); + }.bind(this)); - if (updateTimeAllowed) { - if (props.dragLeft) { - // drag left side of a range item - if (itemData.start != undefined) { - var initialStart = util.convert(props.data.start, 'Date'); - var start = new Date(initialStart.valueOf() + offset); - // TODO: pass a Moment instead of a Date to snap(). (Breaking change) - itemData.start = snap ? snap(start, scale, step) : start; - } - } else if (props.dragRight) { - // drag right side of a range item - if (itemData.end != undefined) { - var initialEnd = util.convert(props.data.end, 'Date'); - var end = new Date(initialEnd.valueOf() + offset); - // TODO: pass a Moment instead of a Date to snap(). (Breaking change) - itemData.end = snap ? snap(end, scale, step) : end; - } - } else { - // drag both start and end - if (itemData.start != undefined) { - var initialStart = util.convert(props.data.start, 'Date').valueOf(); - var start = new Date(initialStart + offset); + // emulate a release event (emitted after a pan, pinch, tap, or press) + hammerUtil.onRelease(this.hammer, function (event) { + me.emit('release', event); + }.bind(this)); - if (itemData.end != undefined) { - var initialEnd = util.convert(props.data.end, 'Date'); - var duration = initialEnd.valueOf() - initialStart.valueOf(); + function onMouseWheel(event) { + if (me.isActive()) { + me.emit('mousewheel', event); + } + } + this.dom.root.addEventListener('mousewheel', onMouseWheel); + this.dom.root.addEventListener('DOMMouseScroll', onMouseWheel); - // TODO: pass a Moment instead of a Date to snap(). (Breaking change) - itemData.start = snap ? snap(start, scale, step) : start; - itemData.end = new Date(itemData.start.valueOf() + duration); - } else { - // TODO: pass a Moment instead of a Date to snap(). (Breaking change) - itemData.start = snap ? snap(start, scale, step) : start; - } - } + // size properties of each of the panels + this.props = { + root: {}, + background: {}, + centerContainer: {}, + leftContainer: {}, + rightContainer: {}, + center: {}, + left: {}, + right: {}, + top: {}, + bottom: {}, + border: {}, + scrollTop: 0, + scrollTopMin: 0 + }; + + this.customTimes = []; + + // store state information needed for touch events + this.touch = {}; + + this.redrawCount = 0; + this.initialDrawDone = false; + + // attach the root panel to the provided container + if (!container) throw new Error('No container provided'); + container.appendChild(this.dom.root); + }; + + /** + * Set options. Options will be passed to all components loaded in the Timeline. + * @param {Object} [options] + * {String} orientation + * Vertical orientation for the Timeline, + * can be 'bottom' (default) or 'top'. + * {String | Number} width + * Width for the timeline, a number in pixels or + * a css string like '1000px' or '75%'. '100%' by default. + * {String | Number} height + * Fixed height for the Timeline, a number in pixels or + * a css string like '400px' or '75%'. If undefined, + * The Timeline will automatically size such that + * its contents fit. + * {String | Number} minHeight + * Minimum height for the Timeline, a number in pixels or + * a css string like '400px' or '75%'. + * {String | Number} maxHeight + * Maximum height for the Timeline, a number in pixels or + * a css string like '400px' or '75%'. + * {Number | Date | String} start + * Start date for the visible window + * {Number | Date | String} end + * End date for the visible window + */ + Core.prototype.setOptions = function (options) { + if (options) { + // copy the known options + var fields = ['width', 'height', 'minHeight', 'maxHeight', 'autoResize', 'start', 'end', 'clickToUse', 'dataAttributes', 'hiddenDates', 'locale', 'locales', 'moment', 'throttleRedraw']; + util.selectiveExtend(fields, this.options, options); + + this.options.orientation = { item: undefined, axis: undefined }; + if ('orientation' in options) { + if (typeof options.orientation === 'string') { + this.options.orientation = { + item: options.orientation, + axis: options.orientation + }; + } else if (_typeof(options.orientation) === 'object') { + if ('item' in options.orientation) { + this.options.orientation.item = options.orientation.item; + } + if ('axis' in options.orientation) { + this.options.orientation.axis = options.orientation.axis; } } + } - var updateGroupAllowed = me.options.editable.updateGroup || props.item.editable === true; + if (this.options.orientation.axis === 'both') { + if (!this.timeAxis2) { + var timeAxis2 = this.timeAxis2 = new TimeAxis(this.body); + timeAxis2.setOptions = function (options) { + var _options = options ? util.extend({}, options) : {}; + _options.orientation = 'top'; // override the orientation option, always top + TimeAxis.prototype.setOptions.call(timeAxis2, _options); + }; + this.components.push(timeAxis2); + } + } else { + if (this.timeAxis2) { + var index = this.components.indexOf(this.timeAxis2); + if (index !== -1) { + this.components.splice(index, 1); + } + this.timeAxis2.destroy(); + this.timeAxis2 = null; + } + } - if (updateGroupAllowed && !props.dragLeft && !props.dragRight && newGroupBase != null) { - if (itemData.group != undefined) { - var newOffset = newGroupBase - props.groupOffset; + // if the graph2d's drawPoints is a function delegate the callback to the onRender property + if (typeof options.drawPoints == 'function') { + options.drawPoints = { + onRender: options.drawPoints + }; + } - //make sure we stay in bounds - newOffset = Math.max(0, newOffset); - newOffset = Math.min(me.groupIds.length - 1, newOffset); + if ('hiddenDates' in this.options) { + DateUtil.convertHiddenOptions(this.options.moment, this.body, this.options.hiddenDates); + } - itemData.group = me.groupIds[newOffset]; + if ('clickToUse' in options) { + if (options.clickToUse) { + if (!this.activator) { + this.activator = new Activator(this.dom.root); + } + } else { + if (this.activator) { + this.activator.destroy(); + delete this.activator; } } + } - // confirm moving the item - itemData = this._cloneItemData(itemData); // convert start and end to the correct type - me.options.onMoving(itemData, (function (itemData) { - if (itemData) { - props.item.setData(this._cloneItemData(itemData, 'Date')); - } - }).bind(this)); - }).bind(this)); + if ('showCustomTime' in options) { + throw new Error('Option `showCustomTime` is deprecated. Create a custom time bar via timeline.addCustomTime(time [, id])'); + } - this.stackDirty = true; // force re-stacking of all items next redraw - this.body.emitter.emit('_change'); + // enable/disable autoResize + this._initAutoResize(); } - }; - /** - * Move an item to another group - * @param {Item} item - * @param {String | Number} groupId - * @private - */ - ItemSet.prototype._moveToGroup = function (item, groupId) { - var group = this.groups[groupId]; - if (group && group.groupId != item.data.group) { - var oldGroup = item.parent; - oldGroup.remove(item); - oldGroup.order(); - group.add(item); - group.order(); + // propagate options to all components + this.components.forEach(function (component) { + return component.setOptions(options); + }); - item.data.group = group.groupId; + // enable/disable configure + if ('configure' in options) { + if (!this.configurator) { + this.configurator = this._createConfigurator(); + } + + this.configurator.setOptions(options.configure); + + // collect the settings of all components, and pass them to the configuration system + var appliedOptions = util.deepExtend({}, this.options); + this.components.forEach(function (component) { + util.deepExtend(appliedOptions, component.options); + }); + this.configurator.setModuleOptions({ global: appliedOptions }); + } + + // override redraw with a throttled version + if (!this._origRedraw) { + this._origRedraw = this._redraw.bind(this); + this._redraw = util.throttle(this._origRedraw, this.options.throttleRedraw); + } else { + // Not the initial run: redraw everything + this._redraw(); } }; /** - * End of dragging selected items - * @param {Event} event - * @private + * Returns true when the Timeline is active. + * @returns {boolean} */ - ItemSet.prototype._onDragEnd = function (event) { - if (this.touchParams.itemProps) { - event.stopPropagation(); - - var me = this; - var dataset = this.itemsData.getDataSet(); - var itemProps = this.touchParams.itemProps; - this.touchParams.itemProps = null; + Core.prototype.isActive = function () { + return !this.activator || this.activator.active; + }; - itemProps.forEach((function (props) { - var id = props.item.id; - var exists = me.itemsData.get(id, me.itemOptions) != null; + /** + * Destroy the Core, clean up all DOM elements and event listeners. + */ + Core.prototype.destroy = function () { + // unbind datasets + this.setItems(null); + this.setGroups(null); - if (!exists) { - // add a new item - me.options.onAdd(props.item.data, function (itemData) { - me._removeItem(props.item); // remove temporary item - if (itemData) { - me.itemsData.getDataSet().add(itemData); - } + // remove all event listeners + this.off(); - // force re-stacking of all items next redraw - me.stackDirty = true; - me.body.emitter.emit('_change'); - }); - } else { - // update existing item - var itemData = this._cloneItemData(props.item.data); // convert start and end to the correct type - me.options.onMove(itemData, function (itemData) { - if (itemData) { - // apply changes - itemData[dataset._fieldId] = id; // ensure the item contains its id (can be undefined) - dataset.update(itemData); - } else { - // restore original values - props.item.setData(props.data); + // stop checking for changed size + this._stopAutoResize(); - me.stackDirty = true; // force re-stacking of all items next redraw - me.body.emitter.emit('_change'); - } - }); - } - }).bind(this)); + // remove from DOM + if (this.dom.root.parentNode) { + this.dom.root.parentNode.removeChild(this.dom.root); } - }; - - ItemSet.prototype._onGroupDragStart = function (event) { - if (this.options.groupEditable.order) { - this.groupTouchParams.group = this.groupFromTarget(event); + this.dom = null; - if (this.groupTouchParams.group) { - event.stopPropagation(); + // remove Activator + if (this.activator) { + this.activator.destroy(); + delete this.activator; + } - this.groupTouchParams.originalOrder = this.groupsData.getIds({ - order: this.options.groupOrder - }); + // cleanup hammer touch events + for (var event in this.listeners) { + if (this.listeners.hasOwnProperty(event)) { + delete this.listeners[event]; } } - }; + this.listeners = null; + this.hammer = null; - ItemSet.prototype._onGroupDrag = function (event) { - if (this.options.groupEditable.order && this.groupTouchParams.group) { - event.stopPropagation(); + // give all components the opportunity to cleanup + this.components.forEach(function (component) { + return component.destroy(); + }); - // drag from one group to another - var group = this.groupFromTarget(event); + this.body = null; + }; - // try to avoid toggling when groups differ in height - if (group && group.height != this.groupTouchParams.group.height) { - var movingUp = group.top < this.groupTouchParams.group.top; - var clientY = event.center ? event.center.y : event.clientY; - var targetGroupTop = util.getAbsoluteTop(group.dom.foreground); - var draggedGroupHeight = this.groupTouchParams.group.height; - if (movingUp) { - // skip swapping the groups when the dragged group is not below clientY afterwards - if (targetGroupTop + draggedGroupHeight < clientY) { - return; - } - } else { - var targetGroupHeight = group.height; - // skip swapping the groups when the dragged group is not below clientY afterwards - if (targetGroupTop + targetGroupHeight - draggedGroupHeight > clientY) { - return; - } - } - } - - if (group && group != this.groupTouchParams.group) { - var groupsData = this.groupsData; - var targetGroup = groupsData.get(group.groupId); - var draggedGroup = groupsData.get(this.groupTouchParams.group.groupId); - - // switch groups - if (draggedGroup && targetGroup) { - this.options.groupOrderSwap(draggedGroup, targetGroup, this.groupsData); - this.groupsData.update(draggedGroup); - this.groupsData.update(targetGroup); - } - - // fetch current order of groups - var newOrder = this.groupsData.getIds({ - order: this.options.groupOrder - }); - - // in case of changes since _onGroupDragStart - if (!util.equalArray(newOrder, this.groupTouchParams.originalOrder)) { - var groupsData = this.groupsData; - var origOrder = this.groupTouchParams.originalOrder; - var draggedId = this.groupTouchParams.group.groupId; - var numGroups = Math.min(origOrder.length, newOrder.length); - var curPos = 0; - var newOffset = 0; - var orgOffset = 0; - while (curPos < numGroups) { - // as long as the groups are where they should be step down along the groups order - while (curPos + newOffset < numGroups && curPos + orgOffset < numGroups && newOrder[curPos + newOffset] == origOrder[curPos + orgOffset]) { - curPos++; - } - - // all ok - if (curPos + newOffset >= numGroups) { - break; - } - - // not all ok - // if dragged group was move upwards everything below should have an offset - if (newOrder[curPos + newOffset] == draggedId) { - newOffset = 1; - continue; - } - // if dragged group was move downwards everything above should have an offset - else if (origOrder[curPos + orgOffset] == draggedId) { - orgOffset = 1; - continue; - } - // found a group (apart from dragged group) that has the wrong position -> switch with the - // group at the position where other one should be, fix index arrays and continue - else { - var slippedPosition = newOrder.indexOf(origOrder[curPos + orgOffset]); - var switchGroup = groupsData.get(newOrder[curPos + newOffset]); - var shouldBeGroup = groupsData.get(origOrder[curPos + orgOffset]); - this.options.groupOrderSwap(switchGroup, shouldBeGroup, groupsData); - groupsData.update(switchGroup); - groupsData.update(shouldBeGroup); - - var switchGroupId = newOrder[curPos + newOffset]; - newOrder[curPos + newOffset] = origOrder[curPos + orgOffset]; - newOrder[slippedPosition] = switchGroupId; + /** + * Set a custom time bar + * @param {Date} time + * @param {number} [id=undefined] Optional id of the custom time bar to be adjusted. + */ + Core.prototype.setCustomTime = function (time, id) { + var customTimes = this.customTimes.filter(function (component) { + return id === component.options.id; + }); - curPos++; - } - } - } - } + if (customTimes.length === 0) { + throw new Error('No custom time bar found with id ' + JSON.stringify(id)); } - }; - - ItemSet.prototype._onGroupDragEnd = function (event) { - if (this.options.groupEditable.order && this.groupTouchParams.group) { - event.stopPropagation(); - - // update existing group - var me = this; - var id = me.groupTouchParams.group.groupId; - var dataset = me.groupsData.getDataSet(); - var groupData = util.extend({}, dataset.get(id)); // clone the data - me.options.onMoveGroup(groupData, function (groupData) { - if (groupData) { - // apply changes - groupData[dataset._fieldId] = id; // ensure the group contains its id (can be undefined) - dataset.update(groupData); - } else { - - // fetch current order of groups - var newOrder = dataset.getIds({ - order: me.options.groupOrder - }); - - // restore original order - if (!util.equalArray(newOrder, me.groupTouchParams.originalOrder)) { - var origOrder = me.groupTouchParams.originalOrder; - var numGroups = Math.min(origOrder.length, newOrder.length); - var curPos = 0; - while (curPos < numGroups) { - // as long as the groups are where they should be step down along the groups order - while (curPos < numGroups && newOrder[curPos] == origOrder[curPos]) { - curPos++; - } - - // all ok - if (curPos >= numGroups) { - break; - } - - // found a group that has the wrong position -> switch with the - // group at the position where other one should be, fix index arrays and continue - var slippedPosition = newOrder.indexOf(origOrder[curPos]); - var switchGroup = dataset.get(newOrder[curPos]); - var shouldBeGroup = dataset.get(origOrder[curPos]); - me.options.groupOrderSwap(switchGroup, shouldBeGroup, dataset); - groupsData.update(switchGroup); - groupsData.update(shouldBeGroup); - - var switchGroupId = newOrder[curPos]; - newOrder[curPos] = origOrder[curPos]; - newOrder[slippedPosition] = switchGroupId; - - curPos++; - } - } - } - }); - me.body.emitter.emit('groupDragged', { groupId: id }); + if (customTimes.length > 0) { + customTimes[0].setCustomTime(time); } }; /** - * Handle selecting/deselecting an item when tapping it - * @param {Event} event - * @private + * Retrieve the current custom time. + * @param {number} [id=undefined] Id of the custom time bar. + * @return {Date | undefined} customTime */ - ItemSet.prototype._onSelectItem = function (event) { - if (!this.options.selectable) return; - - var ctrlKey = event.srcEvent && (event.srcEvent.ctrlKey || event.srcEvent.metaKey); - var shiftKey = event.srcEvent && event.srcEvent.shiftKey; - if (ctrlKey || shiftKey) { - this._onMultiSelectItem(event); - return; - } - - var oldSelection = this.getSelection(); - - var item = this.itemFromTarget(event); - var selection = item ? [item.id] : []; - this.setSelection(selection); - - var newSelection = this.getSelection(); + Core.prototype.getCustomTime = function (id) { + var customTimes = this.customTimes.filter(function (component) { + return component.options.id === id; + }); - // emit a select event, - // except when old selection is empty and new selection is still empty - if (newSelection.length > 0 || oldSelection.length > 0) { - this.body.emitter.emit('select', { - items: newSelection, - event: event - }); + if (customTimes.length === 0) { + throw new Error('No custom time bar found with id ' + JSON.stringify(id)); } + return customTimes[0].getCustomTime(); }; /** - * Handle creation and updates of an item on double tap - * @param event - * @private + * Set a custom title for the custom time bar. + * @param {String} [title] Custom title + * @param {number} [id=undefined] Id of the custom time bar. */ - ItemSet.prototype._onAddItem = function (event) { - if (!this.options.selectable) return; - if (!this.options.editable.add) return; - - var me = this; - var snap = this.options.snap || null; - var item = this.itemFromTarget(event); - - if (item) { - // update item - - // execute async handler to update the item (or cancel it) - var itemData = me.itemsData.get(item.id); // get a clone of the data from the dataset - this.options.onUpdate(itemData, function (itemData) { - if (itemData) { - me.itemsData.getDataSet().update(itemData); - } - }); - } else { - // add item - var xAbs = util.getAbsoluteLeft(this.dom.frame); - var x = event.center.x - xAbs; - var start = this.body.util.toTime(x); - var scale = this.body.util.getScale(); - var step = this.body.util.getStep(); - - var newItemData = { - start: snap ? snap(start, scale, step) : start, - content: 'new item' - }; - - // when default type is a range, add a default end date to the new item - if (this.options.type === 'range') { - var end = this.body.util.toTime(x + this.props.width / 5); - newItemData.end = snap ? snap(end, scale, step) : end; - } - - newItemData[this.itemsData._fieldId] = util.randomUUID(); - - var group = this.groupFromTarget(event); - if (group) { - newItemData.group = group.groupId; - } + Core.prototype.setCustomTimeTitle = function (title, id) { + var customTimes = this.customTimes.filter(function (component) { + return component.options.id === id; + }); - // execute async handler to customize (or cancel) adding an item - newItemData = this._cloneItemData(newItemData); // convert start and end to the correct type - this.options.onAdd(newItemData, function (item) { - if (item) { - me.itemsData.getDataSet().add(item); - // TODO: need to trigger a redraw? - } - }); + if (customTimes.length === 0) { + throw new Error('No custom time bar found with id ' + JSON.stringify(id)); + } + if (customTimes.length > 0) { + return customTimes[0].setCustomTitle(title); } }; /** - * Handle selecting/deselecting multiple items when holding an item + * Retrieve meta information from an event. + * Should be overridden by classes extending Core * @param {Event} event - * @private + * @return {Object} An object with related information. */ - ItemSet.prototype._onMultiSelectItem = function (event) { - if (!this.options.selectable) return; - - var item = this.itemFromTarget(event); - - if (item) { - // multi select items (if allowed) - - var selection = this.options.multiselect ? this.getSelection() // take current selection - : []; // deselect current selection - - var shiftKey = event.srcEvent && event.srcEvent.shiftKey || false; - - if (shiftKey && this.options.multiselect) { - // select all items between the old selection and the tapped item - var itemGroup = this.itemsData.get(item.id).group; - - // when filtering get the group of the last selected item - var lastSelectedGroup = undefined; - if (this.options.multiselectPerGroup) { - if (selection.length > 0) { - lastSelectedGroup = this.itemsData.get(selection[0]).group; - } - } - - // determine the selection range - if (!this.options.multiselectPerGroup || lastSelectedGroup == undefined || lastSelectedGroup == itemGroup) { - selection.push(item.id); - } - var range = ItemSet._getItemRange(this.itemsData.get(selection, this.itemOptions)); - - if (!this.options.multiselectPerGroup || lastSelectedGroup == itemGroup) { - // select all items within the selection range - selection = []; - for (var id in this.items) { - if (this.items.hasOwnProperty(id)) { - var _item = this.items[id]; - var start = _item.data.start; - var end = _item.data.end !== undefined ? _item.data.end : start; - - if (start >= range.min && end <= range.max && (!this.options.multiselectPerGroup || lastSelectedGroup == this.itemsData.get(_item.id).group) && !(_item instanceof BackgroundItem)) { - selection.push(_item.id); // do not use id but item.id, id itself is stringified - } - } - } - } - } else { - // add/remove this item from the current selection - var index = selection.indexOf(item.id); - if (index == -1) { - // item is not yet selected -> select it - selection.push(item.id); - } else { - // item is already selected -> deselect it - selection.splice(index, 1); - } - } - - this.setSelection(selection); - - this.body.emitter.emit('select', { - items: this.getSelection(), - event: event - }); - } + Core.prototype.getEventProperties = function (event) { + return { event: event }; }; /** - * Calculate the time range of a list of items - * @param {Array.} itemsData - * @return {{min: Date, max: Date}} Returns the range of the provided items - * @private + * Add custom vertical bar + * @param {Date | String | Number} [time] A Date, unix timestamp, or + * ISO date string. Time point where + * the new bar should be placed. + * If not provided, `new Date()` will + * be used. + * @param {Number | String} [id=undefined] Id of the new bar. Optional + * @return {Number | String} Returns the id of the new bar */ - ItemSet._getItemRange = function (itemsData) { - var max = null; - var min = null; - - itemsData.forEach(function (data) { - if (min == null || data.start < min) { - min = data.start; - } + Core.prototype.addCustomTime = function (time, id) { + var timestamp = time !== undefined ? util.convert(time, 'Date').valueOf() : new Date(); - if (data.end != undefined) { - if (max == null || data.end > max) { - max = data.end; - } - } else { - if (max == null || data.start > max) { - max = data.start; - } - } + var exists = this.customTimes.some(function (customTime) { + return customTime.options.id === id; }); + if (exists) { + throw new Error('A custom time with id ' + JSON.stringify(id) + ' already exists'); + } - return { - min: min, - max: max - }; - }; + var customTime = new CustomTime(this.body, util.extend({}, this.options, { + time: timestamp, + id: id + })); - /** - * Find an item from an event target: - * searches for the attribute 'timeline-item' in the event target's element tree - * @param {Event} event - * @return {Item | null} item - */ - ItemSet.prototype.itemFromTarget = function (event) { - var target = event.target; - while (target) { - if (target.hasOwnProperty('timeline-item')) { - return target['timeline-item']; - } - target = target.parentNode; - } + this.customTimes.push(customTime); + this.components.push(customTime); + this._redraw(); - return null; + return id; }; /** - * Find the Group from an event target: - * searches for the attribute 'timeline-group' in the event target's element tree - * @param {Event} event - * @return {Group | null} group + * Remove previously added custom bar + * @param {int} id ID of the custom bar to be removed + * @return {boolean} True if the bar exists and is removed, false otherwise */ - ItemSet.prototype.groupFromTarget = function (event) { - var clientY = event.center ? event.center.y : event.clientY; - for (var i = 0; i < this.groupIds.length; i++) { - var groupId = this.groupIds[i]; - var group = this.groups[groupId]; - var foreground = group.dom.foreground; - var top = util.getAbsoluteTop(foreground); - if (clientY > top && clientY < top + foreground.offsetHeight) { - return group; - } + Core.prototype.removeCustomTime = function (id) { + var customTimes = this.customTimes.filter(function (bar) { + return bar.options.id === id; + }); - if (this.options.orientation.item === 'top') { - if (i === this.groupIds.length - 1 && clientY > top) { - return group; - } - } else { - if (i === 0 && clientY < top + foreground.offset) { - return group; - } - } + if (customTimes.length === 0) { + throw new Error('No custom time bar found with id ' + JSON.stringify(id)); } - return null; + customTimes.forEach(function (customTime) { + this.customTimes.splice(this.customTimes.indexOf(customTime), 1); + this.components.splice(this.components.indexOf(customTime), 1); + customTime.destroy(); + }.bind(this)); }; /** - * Find the ItemSet from an event target: - * searches for the attribute 'timeline-itemset' in the event target's element tree - * @param {Event} event - * @return {ItemSet | null} item + * Get the id's of the currently visible items. + * @returns {Array} The ids of the visible items */ - ItemSet.itemSetFromTarget = function (event) { - var target = event.target; - while (target) { - if (target.hasOwnProperty('timeline-itemset')) { - return target['timeline-itemset']; - } - target = target.parentNode; - } - - return null; + Core.prototype.getVisibleItems = function () { + return this.itemSet && this.itemSet.getVisibleItems() || []; }; /** - * Clone the data of an item, and "normalize" it: convert the start and end date - * to the type (Date, Moment, ...) configured in the DataSet. If not configured, - * start and end are converted to Date. - * @param {Object} itemData, typically `item.data` - * @param {string} [type] Optional Date type. If not provided, the type from the DataSet is taken - * @return {Object} The cloned object - * @private + * Set Core window such that it fits all items + * @param {Object} [options] Available options: + * `animation: boolean | {duration: number, easingFunction: string}` + * If true (default), the range is animated + * smoothly to the new window. An object can be + * provided to specify duration and easing function. + * Default duration is 500 ms, and default easing + * function is 'easeInOutQuad'. */ - ItemSet.prototype._cloneItemData = function (itemData, type) { - var clone = util.extend({}, itemData); + Core.prototype.fit = function (options) { + var range = this.getDataRange(); - if (!type) { - // convert start and end date to the type (Date, Moment, ...) configured in the DataSet - type = this.itemsData.getDataSet()._options.type; + // skip range set if there is no min and max date + if (range.min === null && range.max === null) { + return; } - if (clone.start != undefined) { - clone.start = util.convert(clone.start, type && type.start || 'Date'); - } - if (clone.end != undefined) { - clone.end = util.convert(clone.end, type && type.end || 'Date'); - } + // apply a margin of 1% left and right of the data + var interval = range.max - range.min; + var min = new Date(range.min.valueOf() - interval * 0.01); + var max = new Date(range.max.valueOf() + interval * 0.01); - return clone; + var animation = options && options.animation !== undefined ? options.animation : true; + this.range.setRange(min, max, animation); }; - module.exports = ItemSet; - -/***/ }, -/* 29 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var moment = __webpack_require__(2); - var DateUtil = __webpack_require__(26); - var util = __webpack_require__(1); + /** + * Calculate the data range of the items start and end dates + * @returns {{min: Date | null, max: Date | null}} + * @protected + */ + Core.prototype.getDataRange = function () { + // must be implemented by Timeline and Graph2d + throw new Error('Cannot invoke abstract method getDataRange'); + }; /** - * @constructor TimeStep - * The class TimeStep is an iterator for dates. You provide a start date and an - * end date. The class itself determines the best scale (step size) based on the - * provided start Date, end Date, and minimumStep. + * Set the visible window. Both parameters are optional, you can change only + * start or only end. Syntax: * - * If minimumStep is provided, the step size is chosen as close as possible - * to the minimumStep but larger than minimumStep. If minimumStep is not - * provided, the scale is set to 1 DAY. - * The minimumStep should correspond with the onscreen size of about 6 characters - * - * Alternatively, you can set a scale by hand. - * After creation, you can initialize the class by executing first(). Then you - * can iterate from the start date to the end date via next(). You can check if - * the end date is reached with the function hasNext(). After each step, you can - * retrieve the current date via getCurrent(). - * The TimeStep has scales ranging from milliseconds, seconds, minutes, hours, - * days, to years. + * TimeLine.setWindow(start, end) + * TimeLine.setWindow(start, end, options) + * TimeLine.setWindow(range) * - * Version: 1.2 + * Where start and end can be a Date, number, or string, and range is an + * object with properties start and end. * - * @param {Date} [start] The start date, for example new Date(2010, 9, 21) - * or new Date(2010, 9, 21, 23, 45, 00) - * @param {Date} [end] The end date - * @param {Number} [minimumStep] Optional. Minimum step size in milliseconds + * @param {Date | Number | String | Object} [start] Start date of visible window + * @param {Date | Number | String} [end] End date of visible window + * @param {Object} [options] Available options: + * `animation: boolean | {duration: number, easingFunction: string}` + * If true (default), the range is animated + * smoothly to the new window. An object can be + * provided to specify duration and easing function. + * Default duration is 500 ms, and default easing + * function is 'easeInOutQuad'. */ - function TimeStep(start, end, minimumStep, hiddenDates) { - this.moment = moment; - - // variables - this.current = this.moment(); - this._start = this.moment(); - this._end = this.moment(); - - this.autoScale = true; - this.scale = 'day'; - this.step = 1; - - // initialize the range - this.setRange(start, end, minimumStep); - - // hidden Dates options - this.switchedDay = false; - this.switchedMonth = false; - this.switchedYear = false; - if (Array.isArray(hiddenDates)) { - this.hiddenDates = hiddenDates; - } else if (hiddenDates != undefined) { - this.hiddenDates = [hiddenDates]; + Core.prototype.setWindow = function (start, end, options) { + var animation; + if (arguments.length == 1) { + var range = arguments[0]; + animation = range.animation !== undefined ? range.animation : true; + this.range.setRange(range.start, range.end, animation); } else { - this.hiddenDates = []; + animation = options && options.animation !== undefined ? options.animation : true; + this.range.setRange(start, end, animation); } + }; - this.format = TimeStep.FORMAT; // default formatting - } + /** + * Move the window such that given time is centered on screen. + * @param {Date | Number | String} time + * @param {Object} [options] Available options: + * `animation: boolean | {duration: number, easingFunction: string}` + * If true (default), the range is animated + * smoothly to the new window. An object can be + * provided to specify duration and easing function. + * Default duration is 500 ms, and default easing + * function is 'easeInOutQuad'. + */ + Core.prototype.moveTo = function (time, options) { + var interval = this.range.end - this.range.start; + var t = util.convert(time, 'Date').valueOf(); - // Time formatting - TimeStep.FORMAT = { - minorLabels: { - millisecond: 'SSS', - second: 's', - minute: 'HH:mm', - hour: 'HH:mm', - weekday: 'ddd D', - day: 'D', - month: 'MMM', - year: 'YYYY' - }, - majorLabels: { - millisecond: 'HH:mm:ss', - second: 'D MMMM HH:mm', - minute: 'ddd D MMMM', - hour: 'ddd D MMMM', - weekday: 'MMMM YYYY', - day: 'MMMM YYYY', - month: 'YYYY', - year: '' - } + var start = t - interval / 2; + var end = t + interval / 2; + var animation = options && options.animation !== undefined ? options.animation : true; + + this.range.setRange(start, end, animation); }; /** - * Set custom constructor function for moment. Can be used to set dates - * to UTC or to set a utcOffset. - * @param {function} moment + * Get the visible window + * @return {{start: Date, end: Date}} Visible range */ - TimeStep.prototype.setMoment = function (moment) { - this.moment = moment; - - // update the date properties, can have a new utcOffset - this.current = this.moment(this.current); - this._start = this.moment(this._start); - this._end = this.moment(this._end); + Core.prototype.getWindow = function () { + var range = this.range.getRange(); + return { + start: new Date(range.start), + end: new Date(range.end) + }; }; /** - * Set custom formatting for the minor an major labels of the TimeStep. - * Both `minorLabels` and `majorLabels` are an Object with properties: - * 'millisecond', 'second', 'minute', 'hour', 'weekday', 'day', 'month', 'year'. - * @param {{minorLabels: Object, majorLabels: Object}} format + * Force a redraw. Can be overridden by implementations of Core + * + * Note: this function will be overridden on construction with a trottled version */ - TimeStep.prototype.setFormat = function (format) { - var defaultFormat = util.deepExtend({}, TimeStep.FORMAT); - this.format = util.deepExtend(defaultFormat, format); + Core.prototype.redraw = function () { + this._redraw(); }; /** - * Set a new range - * If minimumStep is provided, the step size is chosen as close as possible - * to the minimumStep but larger than minimumStep. If minimumStep is not - * provided, the scale is set to 1 DAY. - * The minimumStep should correspond with the onscreen size of about 6 characters - * @param {Date} [start] The start date and time. - * @param {Date} [end] The end date and time. - * @param {int} [minimumStep] Optional. Minimum step size in milliseconds + * Redraw for internal use. Redraws all components. See also the public + * method redraw. + * @protected */ - TimeStep.prototype.setRange = function (start, end, minimumStep) { - if (!(start instanceof Date) || !(end instanceof Date)) { - throw "No legal start or end date in method setRange"; + Core.prototype._redraw = function () { + this.redrawCount++; + var resized = false; + var options = this.options; + var props = this.props; + var dom = this.dom; + + if (!dom || !dom.container || dom.container.clientWidth == 0) return; // when destroyed, or invisible + + DateUtil.updateHiddenDates(this.options.moment, this.body, this.options.hiddenDates); + + // update class names + if (options.orientation == 'top') { + util.addClassName(dom.root, 'vis-top'); + util.removeClassName(dom.root, 'vis-bottom'); + } else { + util.removeClassName(dom.root, 'vis-top'); + util.addClassName(dom.root, 'vis-bottom'); } - this._start = start != undefined ? this.moment(start.valueOf()) : new Date(); - this._end = end != undefined ? this.moment(end.valueOf()) : new Date(); + // update root width and height options + dom.root.style.maxHeight = util.option.asSize(options.maxHeight, ''); + dom.root.style.minHeight = util.option.asSize(options.minHeight, ''); + dom.root.style.width = util.option.asSize(options.width, ''); - if (this.autoScale) { - this.setMinimumStep(minimumStep); + // calculate border widths + props.border.left = (dom.centerContainer.offsetWidth - dom.centerContainer.clientWidth) / 2; + props.border.right = props.border.left; + props.border.top = (dom.centerContainer.offsetHeight - dom.centerContainer.clientHeight) / 2; + props.border.bottom = props.border.top; + var borderRootHeight = dom.root.offsetHeight - dom.root.clientHeight; + var borderRootWidth = dom.root.offsetWidth - dom.root.clientWidth; + + // workaround for a bug in IE: the clientWidth of an element with + // a height:0px and overflow:hidden is not calculated and always has value 0 + if (dom.centerContainer.clientHeight === 0) { + props.border.left = props.border.top; + props.border.right = props.border.left; + } + if (dom.root.clientHeight === 0) { + borderRootWidth = borderRootHeight; } - }; - /** - * Set the range iterator to the start date. - */ - TimeStep.prototype.start = function () { - this.current = this._start.clone(); - this.roundToMinor(); - }; + // calculate the heights. If any of the side panels is empty, we set the height to + // minus the border width, such that the border will be invisible + props.center.height = dom.center.offsetHeight; + props.left.height = dom.left.offsetHeight; + props.right.height = dom.right.offsetHeight; + props.top.height = dom.top.clientHeight || -props.border.top; + props.bottom.height = dom.bottom.clientHeight || -props.border.bottom; - /** - * Round the current date to the first minor date value - * This must be executed once when the current date is set to start Date - */ - TimeStep.prototype.roundToMinor = function () { - // round to floor - // IMPORTANT: we have no breaks in this switch! (this is no bug) - // noinspection FallThroughInSwitchStatementJS - switch (this.scale) { - case 'year': - this.current.year(this.step * Math.floor(this.current.year() / this.step)); - this.current.month(0); - case 'month': - this.current.date(1); - case 'day': // intentional fall through - case 'weekday': - this.current.hours(0); - case 'hour': - this.current.minutes(0); - case 'minute': - this.current.seconds(0); - case 'second': - this.current.milliseconds(0); - //case 'millisecond': // nothing to do for milliseconds + // TODO: compensate borders when any of the panels is empty. + + // apply auto height + // TODO: only calculate autoHeight when needed (else we cause an extra reflow/repaint of the DOM) + var contentHeight = Math.max(props.left.height, props.center.height, props.right.height); + var autoHeight = props.top.height + contentHeight + props.bottom.height + borderRootHeight + props.border.top + props.border.bottom; + dom.root.style.height = util.option.asSize(options.height, autoHeight + 'px'); + + // calculate heights of the content panels + props.root.height = dom.root.offsetHeight; + props.background.height = props.root.height - borderRootHeight; + var containerHeight = props.root.height - props.top.height - props.bottom.height - borderRootHeight; + props.centerContainer.height = containerHeight; + props.leftContainer.height = containerHeight; + props.rightContainer.height = props.leftContainer.height; + + // calculate the widths of the panels + props.root.width = dom.root.offsetWidth; + props.background.width = props.root.width - borderRootWidth; + props.left.width = dom.leftContainer.clientWidth || -props.border.left; + props.leftContainer.width = props.left.width; + props.right.width = dom.rightContainer.clientWidth || -props.border.right; + props.rightContainer.width = props.right.width; + var centerWidth = props.root.width - props.left.width - props.right.width - borderRootWidth; + props.center.width = centerWidth; + props.centerContainer.width = centerWidth; + props.top.width = centerWidth; + props.bottom.width = centerWidth; + + // resize the panels + dom.background.style.height = props.background.height + 'px'; + dom.backgroundVertical.style.height = props.background.height + 'px'; + dom.backgroundHorizontal.style.height = props.centerContainer.height + 'px'; + dom.centerContainer.style.height = props.centerContainer.height + 'px'; + dom.leftContainer.style.height = props.leftContainer.height + 'px'; + dom.rightContainer.style.height = props.rightContainer.height + 'px'; + + dom.background.style.width = props.background.width + 'px'; + dom.backgroundVertical.style.width = props.centerContainer.width + 'px'; + dom.backgroundHorizontal.style.width = props.background.width + 'px'; + dom.centerContainer.style.width = props.center.width + 'px'; + dom.top.style.width = props.top.width + 'px'; + dom.bottom.style.width = props.bottom.width + 'px'; + + // reposition the panels + dom.background.style.left = '0'; + dom.background.style.top = '0'; + dom.backgroundVertical.style.left = props.left.width + props.border.left + 'px'; + dom.backgroundVertical.style.top = '0'; + dom.backgroundHorizontal.style.left = '0'; + dom.backgroundHorizontal.style.top = props.top.height + 'px'; + dom.centerContainer.style.left = props.left.width + 'px'; + dom.centerContainer.style.top = props.top.height + 'px'; + dom.leftContainer.style.left = '0'; + dom.leftContainer.style.top = props.top.height + 'px'; + dom.rightContainer.style.left = props.left.width + props.center.width + 'px'; + dom.rightContainer.style.top = props.top.height + 'px'; + dom.top.style.left = props.left.width + 'px'; + dom.top.style.top = '0'; + dom.bottom.style.left = props.left.width + 'px'; + dom.bottom.style.top = props.top.height + props.centerContainer.height + 'px'; + + // update the scrollTop, feasible range for the offset can be changed + // when the height of the Core or of the contents of the center changed + this._updateScrollTop(); + + // reposition the scrollable contents + var offset = this.props.scrollTop; + if (options.orientation.item != 'top') { + offset += Math.max(this.props.centerContainer.height - this.props.center.height - this.props.border.top - this.props.border.bottom, 0); } + dom.center.style.left = '0'; + dom.center.style.top = offset + 'px'; + dom.left.style.left = '0'; + dom.left.style.top = offset + 'px'; + dom.right.style.left = '0'; + dom.right.style.top = offset + 'px'; - if (this.step != 1) { - // round down to the first minor value that is a multiple of the current step size - switch (this.scale) { - case 'millisecond': - this.current.subtract(this.current.milliseconds() % this.step, 'milliseconds');break; - case 'second': - this.current.subtract(this.current.seconds() % this.step, 'seconds');break; - case 'minute': - this.current.subtract(this.current.minutes() % this.step, 'minutes');break; - case 'hour': - this.current.subtract(this.current.hours() % this.step, 'hours');break; - case 'weekday': // intentional fall through - case 'day': - this.current.subtract((this.current.date() - 1) % this.step, 'day');break; - case 'month': - this.current.subtract(this.current.month() % this.step, 'month');break; - case 'year': - this.current.subtract(this.current.year() % this.step, 'year');break; - default: - break; + // show shadows when vertical scrolling is available + var visibilityTop = this.props.scrollTop == 0 ? 'hidden' : ''; + var visibilityBottom = this.props.scrollTop == this.props.scrollTopMin ? 'hidden' : ''; + dom.shadowTop.style.visibility = visibilityTop; + dom.shadowBottom.style.visibility = visibilityBottom; + dom.shadowTopLeft.style.visibility = visibilityTop; + dom.shadowBottomLeft.style.visibility = visibilityBottom; + dom.shadowTopRight.style.visibility = visibilityTop; + dom.shadowBottomRight.style.visibility = visibilityBottom; + + // enable/disable vertical panning + var contentsOverflow = this.props.center.height > this.props.centerContainer.height; + this.hammer.get('pan').set({ + direction: contentsOverflow ? Hammer.DIRECTION_ALL : Hammer.DIRECTION_HORIZONTAL + }); + + // redraw all components + this.components.forEach(function (component) { + resized = component.redraw() || resized; + }); + var MAX_REDRAW = 5; + if (resized) { + if (this.redrawCount < MAX_REDRAW) { + this.body.emitter.emit('_change'); + return; + } else { + console.log('WARNING: infinite loop in redraw?'); } + } else { + this.redrawCount = 0; } + this.initialDrawDone = true; + + //Emit public 'changed' event for UI updates, see issue #1592 + this.body.emitter.emit("changed"); }; - /** - * Check if the there is a next step - * @return {boolean} true if the current date has not passed the end date - */ - TimeStep.prototype.hasNext = function () { - return this.current.valueOf() <= this._end.valueOf(); + // TODO: deprecated since version 1.1.0, remove some day + Core.prototype.repaint = function () { + throw new Error('Function repaint is deprecated. Use redraw instead.'); }; /** - * Do the next step + * Set a current time. This can be used for example to ensure that a client's + * time is synchronized with a shared server time. + * Only applicable when option `showCurrentTime` is true. + * @param {Date | String | Number} time A Date, unix timestamp, or + * ISO date string. */ - TimeStep.prototype.next = function () { - var prev = this.current.valueOf(); - - // Two cases, needed to prevent issues with switching daylight savings - // (end of March and end of October) - if (this.current.month() < 6) { - switch (this.scale) { - case 'millisecond': - this.current.add(this.step, 'millisecond');break; - case 'second': - this.current.add(this.step, 'second');break; - case 'minute': - this.current.add(this.step, 'minute');break; - case 'hour': - this.current.add(this.step, 'hour'); - // in case of skipping an hour for daylight savings, adjust the hour again (else you get: 0h 5h 9h ... instead of 0h 4h 8h ...) - // TODO: is this still needed now we use the function of moment.js? - this.current.subtract(this.current.hours() % this.step, 'hour'); - break; - case 'weekday': // intentional fall through - case 'day': - this.current.add(this.step, 'day');break; - case 'month': - this.current.add(this.step, 'month');break; - case 'year': - this.current.add(this.step, 'year');break; - default: - break; - } - } else { - switch (this.scale) { - case 'millisecond': - this.current.add(this.step, 'millisecond');break; - case 'second': - this.current.add(this.step, 'second');break; - case 'minute': - this.current.add(this.step, 'minute');break; - case 'hour': - this.current.add(this.step, 'hour');break; - case 'weekday': // intentional fall through - case 'day': - this.current.add(this.step, 'day');break; - case 'month': - this.current.add(this.step, 'month');break; - case 'year': - this.current.add(this.step, 'year');break; - default: - break; - } + Core.prototype.setCurrentTime = function (time) { + if (!this.currentTime) { + throw new Error('Option showCurrentTime must be true'); } - if (this.step != 1) { - // round down to the correct major value - switch (this.scale) { - case 'millisecond': - if (this.current.milliseconds() < this.step) this.current.milliseconds(0);break; - case 'second': - if (this.current.seconds() < this.step) this.current.seconds(0);break; - case 'minute': - if (this.current.minutes() < this.step) this.current.minutes(0);break; - case 'hour': - if (this.current.hours() < this.step) this.current.hours(0);break; - case 'weekday': // intentional fall through - case 'day': - if (this.current.date() < this.step + 1) this.current.date(1);break; - case 'month': - if (this.current.month() < this.step) this.current.month(0);break; - case 'year': - break; // nothing to do for year - default: - break; - } - } + this.currentTime.setCurrentTime(time); + }; - // safety mechanism: if current time is still unchanged, move to the end - if (this.current.valueOf() == prev) { - this.current = this._end.clone(); + /** + * Get the current time. + * Only applicable when option `showCurrentTime` is true. + * @return {Date} Returns the current time. + */ + Core.prototype.getCurrentTime = function () { + if (!this.currentTime) { + throw new Error('Option showCurrentTime must be true'); } - DateUtil.stepOverHiddenDates(this.moment, this, prev); + return this.currentTime.getCurrentTime(); }; /** - * Get the current datetime - * @return {Moment} current The current date + * Convert a position on screen (pixels) to a datetime + * @param {int} x Position on the screen in pixels + * @return {Date} time The datetime the corresponds with given position x + * @protected */ - TimeStep.prototype.getCurrent = function () { - return this.current; + // TODO: move this function to Range + Core.prototype._toTime = function (x) { + return DateUtil.toTime(this, x, this.props.center.width); }; /** - * Set a custom scale. Autoscaling will be disabled. - * For example setScale('minute', 5) will result - * in minor steps of 5 minutes, and major steps of an hour. - * - * @param {{scale: string, step: number}} params - * An object containing two properties: - * - A string 'scale'. Choose from 'millisecond', 'second', - * 'minute', 'hour', 'weekday', 'day', 'month', 'year'. - * - A number 'step'. A step size, by default 1. - * Choose for example 1, 2, 5, or 10. + * Convert a position on the global screen (pixels) to a datetime + * @param {int} x Position on the screen in pixels + * @return {Date} time The datetime the corresponds with given position x + * @protected */ - TimeStep.prototype.setScale = function (params) { - if (params && typeof params.scale == 'string') { - this.scale = params.scale; - this.step = params.step > 0 ? params.step : 1; - this.autoScale = false; - } + // TODO: move this function to Range + Core.prototype._toGlobalTime = function (x) { + return DateUtil.toTime(this, x, this.props.root.width); + //var conversion = this.range.conversion(this.props.root.width); + //return new Date(x / conversion.scale + conversion.offset); }; /** - * Enable or disable autoscaling - * @param {boolean} enable If true, autoascaling is set true + * Convert a datetime (Date object) into a position on the screen + * @param {Date} time A date + * @return {int} x The position on the screen in pixels which corresponds + * with the given date. + * @protected */ - TimeStep.prototype.setAutoScale = function (enable) { - this.autoScale = enable; + // TODO: move this function to Range + Core.prototype._toScreen = function (time) { + return DateUtil.toScreen(this, time, this.props.center.width); }; /** - * Automatically determine the scale that bests fits the provided minimum step - * @param {Number} [minimumStep] The minimum step size in milliseconds - */ - TimeStep.prototype.setMinimumStep = function (minimumStep) { - if (minimumStep == undefined) { - return; - } - - //var b = asc + ds; - - var stepYear = 1000 * 60 * 60 * 24 * 30 * 12; - var stepMonth = 1000 * 60 * 60 * 24 * 30; - var stepDay = 1000 * 60 * 60 * 24; - var stepHour = 1000 * 60 * 60; - var stepMinute = 1000 * 60; - var stepSecond = 1000; - var stepMillisecond = 1; + * Convert a datetime (Date object) into a position on the root + * This is used to get the pixel density estimate for the screen, not the center panel + * @param {Date} time A date + * @return {int} x The position on root in pixels which corresponds + * with the given date. + * @protected + */ + // TODO: move this function to Range + Core.prototype._toGlobalScreen = function (time) { + return DateUtil.toScreen(this, time, this.props.root.width); + //var conversion = this.range.conversion(this.props.root.width); + //return (time.valueOf() - conversion.offset) * conversion.scale; + }; - // find the smallest step that is larger than the provided minimumStep - if (stepYear * 1000 > minimumStep) { - this.scale = 'year';this.step = 1000; - } - if (stepYear * 500 > minimumStep) { - this.scale = 'year';this.step = 500; - } - if (stepYear * 100 > minimumStep) { - this.scale = 'year';this.step = 100; - } - if (stepYear * 50 > minimumStep) { - this.scale = 'year';this.step = 50; - } - if (stepYear * 10 > minimumStep) { - this.scale = 'year';this.step = 10; - } - if (stepYear * 5 > minimumStep) { - this.scale = 'year';this.step = 5; - } - if (stepYear > minimumStep) { - this.scale = 'year';this.step = 1; - } - if (stepMonth * 3 > minimumStep) { - this.scale = 'month';this.step = 3; - } - if (stepMonth > minimumStep) { - this.scale = 'month';this.step = 1; - } - if (stepDay * 5 > minimumStep) { - this.scale = 'day';this.step = 5; - } - if (stepDay * 2 > minimumStep) { - this.scale = 'day';this.step = 2; - } - if (stepDay > minimumStep) { - this.scale = 'day';this.step = 1; - } - if (stepDay / 2 > minimumStep) { - this.scale = 'weekday';this.step = 1; - } - if (stepHour * 4 > minimumStep) { - this.scale = 'hour';this.step = 4; - } - if (stepHour > minimumStep) { - this.scale = 'hour';this.step = 1; - } - if (stepMinute * 15 > minimumStep) { - this.scale = 'minute';this.step = 15; - } - if (stepMinute * 10 > minimumStep) { - this.scale = 'minute';this.step = 10; - } - if (stepMinute * 5 > minimumStep) { - this.scale = 'minute';this.step = 5; - } - if (stepMinute > minimumStep) { - this.scale = 'minute';this.step = 1; - } - if (stepSecond * 15 > minimumStep) { - this.scale = 'second';this.step = 15; - } - if (stepSecond * 10 > minimumStep) { - this.scale = 'second';this.step = 10; - } - if (stepSecond * 5 > minimumStep) { - this.scale = 'second';this.step = 5; - } - if (stepSecond > minimumStep) { - this.scale = 'second';this.step = 1; - } - if (stepMillisecond * 200 > minimumStep) { - this.scale = 'millisecond';this.step = 200; - } - if (stepMillisecond * 100 > minimumStep) { - this.scale = 'millisecond';this.step = 100; - } - if (stepMillisecond * 50 > minimumStep) { - this.scale = 'millisecond';this.step = 50; - } - if (stepMillisecond * 10 > minimumStep) { - this.scale = 'millisecond';this.step = 10; - } - if (stepMillisecond * 5 > minimumStep) { - this.scale = 'millisecond';this.step = 5; - } - if (stepMillisecond > minimumStep) { - this.scale = 'millisecond';this.step = 1; + /** + * Initialize watching when option autoResize is true + * @private + */ + Core.prototype._initAutoResize = function () { + if (this.options.autoResize == true) { + this._startAutoResize(); + } else { + this._stopAutoResize(); } }; /** - * Snap a date to a rounded value. - * The snap intervals are dependent on the current scale and step. - * Static function - * @param {Date} date the date to be snapped. - * @param {string} scale Current scale, can be 'millisecond', 'second', - * 'minute', 'hour', 'weekday, 'day', 'month', 'year'. - * @param {number} step Current step (1, 2, 4, 5, ... - * @return {Date} snappedDate + * Watch for changes in the size of the container. On resize, the Panel will + * automatically redraw itself. + * @private */ - TimeStep.snap = function (date, scale, step) { - var clone = moment(date); + Core.prototype._startAutoResize = function () { + var me = this; - if (scale == 'year') { - var year = clone.year() + Math.round(clone.month() / 12); - clone.year(Math.round(year / step) * step); - clone.month(0); - clone.date(0); - clone.hours(0); - clone.minutes(0); - clone.seconds(0); - clone.milliseconds(0); - } else if (scale == 'month') { - if (clone.date() > 15) { - clone.date(1); - clone.add(1, 'month'); - // important: first set Date to 1, after that change the month. - } else { - clone.date(1); - } + this._stopAutoResize(); - clone.hours(0); - clone.minutes(0); - clone.seconds(0); - clone.milliseconds(0); - } else if (scale == 'day') { - //noinspection FallthroughInSwitchStatementJS - switch (step) { - case 5: - case 2: - clone.hours(Math.round(clone.hours() / 24) * 24);break; - default: - clone.hours(Math.round(clone.hours() / 12) * 12);break; - } - clone.minutes(0); - clone.seconds(0); - clone.milliseconds(0); - } else if (scale == 'weekday') { - //noinspection FallthroughInSwitchStatementJS - switch (step) { - case 5: - case 2: - clone.hours(Math.round(clone.hours() / 12) * 12);break; - default: - clone.hours(Math.round(clone.hours() / 6) * 6);break; - } - clone.minutes(0); - clone.seconds(0); - clone.milliseconds(0); - } else if (scale == 'hour') { - switch (step) { - case 4: - clone.minutes(Math.round(clone.minutes() / 60) * 60);break; - default: - clone.minutes(Math.round(clone.minutes() / 30) * 30);break; - } - clone.seconds(0); - clone.milliseconds(0); - } else if (scale == 'minute') { - //noinspection FallthroughInSwitchStatementJS - switch (step) { - case 15: - case 10: - clone.minutes(Math.round(clone.minutes() / 5) * 5); - clone.seconds(0); - break; - case 5: - clone.seconds(Math.round(clone.seconds() / 60) * 60);break; - default: - clone.seconds(Math.round(clone.seconds() / 30) * 30);break; + this._onResize = function () { + if (me.options.autoResize != true) { + // stop watching when the option autoResize is changed to false + me._stopAutoResize(); + return; } - clone.milliseconds(0); - } else if (scale == 'second') { - //noinspection FallthroughInSwitchStatementJS - switch (step) { - case 15: - case 10: - clone.seconds(Math.round(clone.seconds() / 5) * 5); - clone.milliseconds(0); - break; - case 5: - clone.milliseconds(Math.round(clone.milliseconds() / 1000) * 1000);break; - default: - clone.milliseconds(Math.round(clone.milliseconds() / 500) * 500);break; + + if (me.dom.root) { + // check whether the frame is resized + // Note: we compare offsetWidth here, not clientWidth. For some reason, + // IE does not restore the clientWidth from 0 to the actual width after + // changing the timeline's container display style from none to visible + if (me.dom.root.offsetWidth != me.props.lastWidth || me.dom.root.offsetHeight != me.props.lastHeight) { + me.props.lastWidth = me.dom.root.offsetWidth; + me.props.lastHeight = me.dom.root.offsetHeight; + + me.body.emitter.emit('_change'); + } } - } else if (scale == 'millisecond') { - var _step = step > 5 ? step / 2 : 1; - clone.milliseconds(Math.round(clone.milliseconds() / _step) * _step); + }; + + // add event listener to window resize + util.addEventListener(window, 'resize', this._onResize); + + //Prevent initial unnecessary redraw + if (me.dom.root) { + me.props.lastWidth = me.dom.root.offsetWidth; + me.props.lastHeight = me.dom.root.offsetHeight; } - return clone; + this.watchTimer = setInterval(this._onResize, 1000); }; /** - * Check if the current value is a major value (for example when the step - * is DAY, a major value is each first day of the MONTH) - * @return {boolean} true if current date is major, else false. + * Stop watching for a resize of the frame. + * @private */ - TimeStep.prototype.isMajor = function () { - if (this.switchedYear == true) { - this.switchedYear = false; - switch (this.scale) { - case 'year': - case 'month': - case 'weekday': - case 'day': - case 'hour': - case 'minute': - case 'second': - case 'millisecond': - return true; - default: - return false; - } - } else if (this.switchedMonth == true) { - this.switchedMonth = false; - switch (this.scale) { - case 'weekday': - case 'day': - case 'hour': - case 'minute': - case 'second': - case 'millisecond': - return true; - default: - return false; - } - } else if (this.switchedDay == true) { - this.switchedDay = false; - switch (this.scale) { - case 'millisecond': - case 'second': - case 'minute': - case 'hour': - return true; - default: - return false; - } + Core.prototype._stopAutoResize = function () { + if (this.watchTimer) { + clearInterval(this.watchTimer); + this.watchTimer = undefined; } - var date = this.moment(this.current); - switch (this.scale) { - case 'millisecond': - return date.milliseconds() == 0; - case 'second': - return date.seconds() == 0; - case 'minute': - return date.hours() == 0 && date.minutes() == 0; - case 'hour': - return date.hours() == 0; - case 'weekday': // intentional fall through - case 'day': - return date.date() == 1; - case 'month': - return date.month() == 0; - case 'year': - return false; - default: - return false; + // remove event listener on window.resize + if (this._onResize) { + util.removeEventListener(window, 'resize', this._onResize); + this._onResize = null; } }; /** - * Returns formatted text for the minor axislabel, depending on the current - * date and the scale. For example when scale is MINUTE, the current time is - * formatted as "hh:mm". - * @param {Date} [date] custom date. if not provided, current date is taken + * Start moving the timeline vertically + * @param {Event} event + * @private */ - TimeStep.prototype.getLabelMinor = function (date) { - if (date == undefined) { - date = this.current; - } - - var format = this.format.minorLabels[this.scale]; - return format && format.length > 0 ? this.moment(date).format(format) : ''; + Core.prototype._onTouch = function (event) { + this.touch.allowDragging = true; + this.touch.initialScrollTop = this.props.scrollTop; }; /** - * Returns formatted text for the major axis label, depending on the current - * date and the scale. For example when scale is MINUTE, the major scale is - * hours, and the hour will be formatted as "hh". - * @param {Date} [date] custom date. if not provided, current date is taken + * Start moving the timeline vertically + * @param {Event} event + * @private */ - TimeStep.prototype.getLabelMajor = function (date) { - if (date == undefined) { - date = this.current; - } - - var format = this.format.majorLabels[this.scale]; - return format && format.length > 0 ? this.moment(date).format(format) : ''; + Core.prototype._onPinch = function (event) { + this.touch.allowDragging = false; }; - TimeStep.prototype.getClassName = function () { - var _moment = this.moment; - var m = this.moment(this.current); - var current = m.locale ? m.locale('en') : m.lang('en'); // old versions of moment have .lang() function - var step = this.step; + /** + * Move the timeline vertically + * @param {Event} event + * @private + */ + Core.prototype._onDrag = function (event) { + // refuse to drag when we where pinching to prevent the timeline make a jump + // when releasing the fingers in opposite order from the touch screen + if (!this.touch.allowDragging) return; - function even(value) { - return value / step % 2 == 0 ? ' vis-even' : ' vis-odd'; - } + var delta = event.deltaY; - function today(date) { - if (date.isSame(new Date(), 'day')) { - return ' vis-today'; - } - if (date.isSame(_moment().add(1, 'day'), 'day')) { - return ' vis-tomorrow'; - } - if (date.isSame(_moment().add(-1, 'day'), 'day')) { - return ' vis-yesterday'; - } - return ''; - } + var oldScrollTop = this._getScrollTop(); + var newScrollTop = this._setScrollTop(this.touch.initialScrollTop + delta); - function currentWeek(date) { - return date.isSame(new Date(), 'week') ? ' vis-current-week' : ''; + if (newScrollTop != oldScrollTop) { + this.emit("verticalDrag"); } + }; - function currentMonth(date) { - return date.isSame(new Date(), 'month') ? ' vis-current-month' : ''; - } + /** + * Apply a scrollTop + * @param {Number} scrollTop + * @returns {Number} scrollTop Returns the applied scrollTop + * @private + */ + Core.prototype._setScrollTop = function (scrollTop) { + this.props.scrollTop = scrollTop; + this._updateScrollTop(); + return this.props.scrollTop; + }; - function currentYear(date) { - return date.isSame(new Date(), 'year') ? ' vis-current-year' : ''; + /** + * Update the current scrollTop when the height of the containers has been changed + * @returns {Number} scrollTop Returns the applied scrollTop + * @private + */ + Core.prototype._updateScrollTop = function () { + // recalculate the scrollTopMin + var scrollTopMin = Math.min(this.props.centerContainer.height - this.props.center.height, 0); // is negative or zero + if (scrollTopMin != this.props.scrollTopMin) { + // in case of bottom orientation, change the scrollTop such that the contents + // do not move relative to the time axis at the bottom + if (this.options.orientation.item != 'top') { + this.props.scrollTop += scrollTopMin - this.props.scrollTopMin; + } + this.props.scrollTopMin = scrollTopMin; } - switch (this.scale) { - case 'millisecond': - return even(current.milliseconds()).trim(); - - case 'second': - return even(current.seconds()).trim(); - - case 'minute': - return even(current.minutes()).trim(); - - case 'hour': - var hours = current.hours(); - if (this.step == 4) { - hours = hours + '-h' + (hours + 4); - } - return 'vis-h' + hours + today(current) + even(current.hours()); - - case 'weekday': - return 'vis-' + current.format('dddd').toLowerCase() + today(current) + currentWeek(current) + even(current.date()); - - case 'day': - var day = current.date(); - var month = current.format('MMMM').toLowerCase(); - return 'vis-day' + day + ' vis-' + month + currentMonth(current) + even(day - 1); + // limit the scrollTop to the feasible scroll range + if (this.props.scrollTop > 0) this.props.scrollTop = 0; + if (this.props.scrollTop < scrollTopMin) this.props.scrollTop = scrollTopMin; - case 'month': - return 'vis-' + current.format('MMMM').toLowerCase() + currentMonth(current) + even(current.month()); + return this.props.scrollTop; + }; - case 'year': - var year = current.year(); - return 'vis-year' + year + currentYear(current) + even(year); + /** + * Get the current scrollTop + * @returns {number} scrollTop + * @private + */ + Core.prototype._getScrollTop = function () { + return this.props.scrollTop; + }; - default: - return ''; - } + /** + * Load a configurator + * @return {Object} + * @private + */ + Core.prototype._createConfigurator = function () { + throw new Error('Cannot invoke abstract method _createConfigurator'); }; - module.exports = TimeStep; + module.exports = Core; /***/ }, -/* 30 */ +/* 31 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + + var Hammer = __webpack_require__(22); var util = __webpack_require__(1); - var stack = __webpack_require__(31); - var RangeItem = __webpack_require__(32); + var DataSet = __webpack_require__(8); + var DataView = __webpack_require__(10); + var TimeStep = __webpack_require__(32); + var Component = __webpack_require__(28); + var Group = __webpack_require__(33); + var BackgroundGroup = __webpack_require__(37); + var BoxItem = __webpack_require__(38); + var PointItem = __webpack_require__(39); + var RangeItem = __webpack_require__(35); + var BackgroundItem = __webpack_require__(40); + + var UNGROUPED = '__ungrouped__'; // reserved group id for ungrouped items + var BACKGROUND = '__background__'; // reserved group id for background items without group /** - * @constructor Group - * @param {Number | String} groupId - * @param {Object} data - * @param {ItemSet} itemSet + * An ItemSet holds a set of items and ranges which can be displayed in a + * range. The width is determined by the parent of the ItemSet, and the height + * is determined by the size of the items. + * @param {{dom: Object, domProps: Object, emitter: Emitter, range: Range}} body + * @param {Object} [options] See ItemSet.setOptions for the available options. + * @constructor ItemSet + * @extends Component */ - function Group(groupId, data, itemSet) { - this.groupId = groupId; - this.subgroups = {}; - this.subgroupIndex = 0; - this.subgroupOrderer = data && data.subgroupOrder; - this.itemSet = itemSet; - - this.dom = {}; - this.props = { - label: { - width: 0, - height: 0 - } - }; - this.className = null; + function ItemSet(body, options) { + this.body = body; - this.items = {}; // items filtered by groupId of this group - this.visibleItems = []; // items currently visible in window - this.orderedItems = { - byStart: [], - byEnd: [] + this.defaultOptions = { + type: null, // 'box', 'point', 'range', 'background' + orientation: { + item: 'bottom' // item orientation: 'top' or 'bottom' + }, + align: 'auto', // alignment of box items + stack: true, + groupOrderSwap: function groupOrderSwap(fromGroup, toGroup, groups) { + var targetOrder = toGroup.order; + toGroup.order = fromGroup.order; + fromGroup.order = targetOrder; + }, + groupOrder: 'order', + + selectable: true, + multiselect: false, + itemsAlwaysDraggable: false, + + editable: { + updateTime: false, + updateGroup: false, + add: false, + remove: false + }, + + groupEditable: { + order: false, + add: false, + remove: false + }, + + snap: TimeStep.snap, + + onAdd: function onAdd(item, callback) { + callback(item); + }, + onUpdate: function onUpdate(item, callback) { + callback(item); + }, + onMove: function onMove(item, callback) { + callback(item); + }, + onRemove: function onRemove(item, callback) { + callback(item); + }, + onMoving: function onMoving(item, callback) { + callback(item); + }, + onAddGroup: function onAddGroup(item, callback) { + callback(item); + }, + onMoveGroup: function onMoveGroup(item, callback) { + callback(item); + }, + onRemoveGroup: function onRemoveGroup(item, callback) { + callback(item); + }, + + margin: { + item: { + horizontal: 10, + vertical: 10 + }, + axis: 20 + } }; - this.checkRangedItems = false; // needed to refresh the ranged items if the window is programatically changed with NO overlap. + + // options is shared by this ItemSet and all its items + this.options = util.extend({}, this.defaultOptions); + + // options for getting items from the DataSet with the correct type + this.itemOptions = { + type: { start: 'Date', end: 'Date' } + }; + + this.conversion = { + toScreen: body.util.toScreen, + toTime: body.util.toTime + }; + this.dom = {}; + this.props = {}; + this.hammer = null; + var me = this; - this.itemSet.body.emitter.on("checkRangedItems", function () { - me.checkRangedItems = true; - }); + this.itemsData = null; // DataSet + this.groupsData = null; // DataSet + + // listeners for the DataSet of the items + this.itemListeners = { + 'add': function add(event, params, senderId) { + me._onAdd(params.items); + }, + 'update': function update(event, params, senderId) { + me._onUpdate(params.items); + }, + 'remove': function remove(event, params, senderId) { + me._onRemove(params.items); + } + }; + + // listeners for the DataSet of the groups + this.groupListeners = { + 'add': function add(event, params, senderId) { + me._onAddGroups(params.items); + }, + 'update': function update(event, params, senderId) { + me._onUpdateGroups(params.items); + }, + 'remove': function remove(event, params, senderId) { + me._onRemoveGroups(params.items); + } + }; + + this.items = {}; // object with an Item for every data item + this.groups = {}; // Group object for every group + this.groupIds = []; + + this.selection = []; // list with the ids of all selected nodes + this.stackDirty = true; // if true, all items will be restacked on next redraw + + this.touchParams = {}; // stores properties while dragging + this.groupTouchParams = {}; + // create the HTML DOM this._create(); - this.setData(data); + this.setOptions(options); } + ItemSet.prototype = new Component(); + + // available item types will be registered here + ItemSet.types = { + background: BackgroundItem, + box: BoxItem, + range: RangeItem, + point: PointItem + }; + /** - * Create DOM elements for the group - * @private + * Create the HTML DOM for the ItemSet */ - Group.prototype._create = function () { - var label = document.createElement('div'); - if (this.itemSet.options.groupEditable.order) { - label.className = 'vis-label draggable'; - } else { - label.className = 'vis-label'; - } - this.dom.label = label; + ItemSet.prototype._create = function () { + var frame = document.createElement('div'); + frame.className = 'vis-itemset'; + frame['timeline-itemset'] = this; + this.dom.frame = frame; - var inner = document.createElement('div'); - inner.className = 'vis-inner'; - label.appendChild(inner); - this.dom.inner = inner; + // create background panel + var background = document.createElement('div'); + background.className = 'vis-background'; + frame.appendChild(background); + this.dom.background = background; + // create foreground panel var foreground = document.createElement('div'); - foreground.className = 'vis-group'; - foreground['timeline-group'] = this; + foreground.className = 'vis-foreground'; + frame.appendChild(foreground); this.dom.foreground = foreground; - this.dom.background = document.createElement('div'); - this.dom.background.className = 'vis-group'; + // create axis panel + var axis = document.createElement('div'); + axis.className = 'vis-axis'; + this.dom.axis = axis; - this.dom.axis = document.createElement('div'); - this.dom.axis.className = 'vis-group'; + // create labelset + var labelSet = document.createElement('div'); + labelSet.className = 'vis-labelset'; + this.dom.labelSet = labelSet; - // create a hidden marker to detect when the Timelines container is attached - // to the DOM, or the style of a parent of the Timeline is changed from - // display:none is changed to visible. - this.dom.marker = document.createElement('div'); - this.dom.marker.style.visibility = 'hidden'; - this.dom.marker.innerHTML = '?'; - this.dom.background.appendChild(this.dom.marker); - }; + // create ungrouped Group + this._updateUngrouped(); - /** - * Set the group data for this group - * @param {Object} data Group data, can contain properties content and className - */ - Group.prototype.setData = function (data) { - // update contents - var content; - if (this.itemSet.options && this.itemSet.options.groupTemplate) { - content = this.itemSet.options.groupTemplate(data); - } else { - content = data && data.content; - } + // create background Group + var backgroundGroup = new BackgroundGroup(BACKGROUND, null, this); + backgroundGroup.show(); + this.groups[BACKGROUND] = backgroundGroup; - if (content instanceof Element) { - this.dom.inner.appendChild(content); - while (this.dom.inner.firstChild) { - this.dom.inner.removeChild(this.dom.inner.firstChild); + // attach event listeners + // Note: we bind to the centerContainer for the case where the height + // of the center container is larger than of the ItemSet, so we + // can click in the empty area to create a new item or deselect an item. + this.hammer = new Hammer(this.body.dom.centerContainer); + + // drag items when selected + this.hammer.on('hammer.input', function (event) { + if (event.isFirst) { + this._onTouch(event); } - this.dom.inner.appendChild(content); - } else if (content !== undefined && content !== null) { - this.dom.inner.innerHTML = content; - } else { - this.dom.inner.innerHTML = this.groupId || ''; // groupId can be null - } + }.bind(this)); + this.hammer.on('panstart', this._onDragStart.bind(this)); + this.hammer.on('panmove', this._onDrag.bind(this)); + this.hammer.on('panend', this._onDragEnd.bind(this)); + this.hammer.get('pan').set({ threshold: 5, direction: Hammer.DIRECTION_HORIZONTAL }); - // update title - this.dom.label.title = data && data.title || ''; + // single select (or unselect) when tapping an item + this.hammer.on('tap', this._onSelectItem.bind(this)); - if (!this.dom.inner.firstChild) { - util.addClassName(this.dom.inner, 'vis-hidden'); - } else { - util.removeClassName(this.dom.inner, 'vis-hidden'); - } + // multi select when holding mouse/touch, or on ctrl+click + this.hammer.on('press', this._onMultiSelectItem.bind(this)); - // update className - var className = data && data.className || null; - if (className != this.className) { - if (this.className) { - util.removeClassName(this.dom.label, this.className); - util.removeClassName(this.dom.foreground, this.className); - util.removeClassName(this.dom.background, this.className); - util.removeClassName(this.dom.axis, this.className); - } - util.addClassName(this.dom.label, className); - util.addClassName(this.dom.foreground, className); - util.addClassName(this.dom.background, className); - util.addClassName(this.dom.axis, className); - this.className = className; - } + // add item on doubletap + this.hammer.on('doubletap', this._onAddItem.bind(this)); - // update style - if (this.style) { - util.removeCssText(this.dom.label, this.style); - this.style = null; - } - if (data && data.style) { - util.addCssText(this.dom.label, data.style); - this.style = data.style; - } - }; + this.groupHammer = new Hammer(this.body.dom.leftContainer); + this.groupHammer.on('panstart', this._onGroupDragStart.bind(this)); + this.groupHammer.on('panmove', this._onGroupDrag.bind(this)); + this.groupHammer.on('panend', this._onGroupDragEnd.bind(this)); + this.groupHammer.get('pan').set({ threshold: 5, direction: Hammer.DIRECTION_HORIZONTAL }); - /** - * Get the width of the group label - * @return {number} width - */ - Group.prototype.getLabelWidth = function () { - return this.props.label.width; + // attach to the DOM + this.show(); }; /** - * Repaint this group - * @param {{start: number, end: number}} range - * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin - * @param {boolean} [restack=false] Force restacking of all items - * @return {boolean} Returns true if the group is resized + * Set options for the ItemSet. Existing options will be extended/overwritten. + * @param {Object} [options] The following options are available: + * {String} type + * Default type for the items. Choose from 'box' + * (default), 'point', 'range', or 'background'. + * The default style can be overwritten by + * individual items. + * {String} align + * Alignment for the items, only applicable for + * BoxItem. Choose 'center' (default), 'left', or + * 'right'. + * {String} orientation.item + * Orientation of the item set. Choose 'top' or + * 'bottom' (default). + * {Function} groupOrder + * A sorting function for ordering groups + * {Boolean} stack + * If true (default), items will be stacked on + * top of each other. + * {Number} margin.axis + * Margin between the axis and the items in pixels. + * Default is 20. + * {Number} margin.item.horizontal + * Horizontal margin between items in pixels. + * Default is 10. + * {Number} margin.item.vertical + * Vertical Margin between items in pixels. + * Default is 10. + * {Number} margin.item + * Margin between items in pixels in both horizontal + * and vertical direction. Default is 10. + * {Number} margin + * Set margin for both axis and items in pixels. + * {Boolean} selectable + * If true (default), items can be selected. + * {Boolean} multiselect + * If true, multiple items can be selected. + * False by default. + * {Boolean} editable + * Set all editable options to true or false + * {Boolean} editable.updateTime + * Allow dragging an item to an other moment in time + * {Boolean} editable.updateGroup + * Allow dragging an item to an other group + * {Boolean} editable.add + * Allow creating new items on double tap + * {Boolean} editable.remove + * Allow removing items by clicking the delete button + * top right of a selected item. + * {Function(item: Item, callback: Function)} onAdd + * Callback function triggered when an item is about to be added: + * when the user double taps an empty space in the Timeline. + * {Function(item: Item, callback: Function)} onUpdate + * Callback function fired when an item is about to be updated. + * This function typically has to show a dialog where the user + * change the item. If not implemented, nothing happens. + * {Function(item: Item, callback: Function)} onMove + * Fired when an item has been moved. If not implemented, + * the move action will be accepted. + * {Function(item: Item, callback: Function)} onRemove + * Fired when an item is about to be deleted. + * If not implemented, the item will be always removed. */ - Group.prototype.redraw = function (range, margin, restack) { - var resized = false; - - // force recalculation of the height of the items when the marker height changed - // (due to the Timeline being attached to the DOM or changed from display:none to visible) - var markerHeight = this.dom.marker.clientHeight; - if (markerHeight != this.lastMarkerHeight) { - this.lastMarkerHeight = markerHeight; - - util.forEach(this.items, function (item) { - item.dirty = true; - if (item.displayed) item.redraw(); - }); - - restack = true; - } - - // recalculate the height of the subgroups - this._calculateSubGroupHeights(); - - // reposition visible items vertically - if (typeof this.itemSet.options.order === 'function') { - // a custom order function + ItemSet.prototype.setOptions = function (options) { + if (options) { + // copy all options that we know + var fields = ['type', 'align', 'order', 'stack', 'selectable', 'multiselect', 'itemsAlwaysDraggable', 'multiselectPerGroup', 'groupOrder', 'dataAttributes', 'template', 'groupTemplate', 'hide', 'snap', 'groupOrderSwap']; + util.selectiveExtend(fields, this.options, options); - if (restack) { - // brute force restack of all items + if ('orientation' in options) { + if (typeof options.orientation === 'string') { + this.options.orientation.item = options.orientation === 'top' ? 'top' : 'bottom'; + } else if (_typeof(options.orientation) === 'object' && 'item' in options.orientation) { + this.options.orientation.item = options.orientation.item; + } + } - // show all items - var me = this; - var limitSize = false; - util.forEach(this.items, function (item) { - if (!item.displayed) { - item.redraw(); - me.visibleItems.push(item); + if ('margin' in options) { + if (typeof options.margin === 'number') { + this.options.margin.axis = options.margin; + this.options.margin.item.horizontal = options.margin; + this.options.margin.item.vertical = options.margin; + } else if (_typeof(options.margin) === 'object') { + util.selectiveExtend(['axis'], this.options.margin, options.margin); + if ('item' in options.margin) { + if (typeof options.margin.item === 'number') { + this.options.margin.item.horizontal = options.margin.item; + this.options.margin.item.vertical = options.margin.item; + } else if (_typeof(options.margin.item) === 'object') { + util.selectiveExtend(['horizontal', 'vertical'], this.options.margin.item, options.margin.item); + } } - item.repositionX(limitSize); - }); - - // order all items and force a restacking - var customOrderedItems = this.orderedItems.byStart.slice().sort(function (a, b) { - return me.itemSet.options.order(a.data, b.data); - }); - stack.stack(customOrderedItems, margin, true /* restack=true */); + } } - this.visibleItems = this._updateVisibleItems(this.orderedItems, this.visibleItems, range); - } else { - // no custom order function, lazy stacking - this.visibleItems = this._updateVisibleItems(this.orderedItems, this.visibleItems, range); - - if (this.itemSet.options.stack) { - // TODO: ugly way to access options... - stack.stack(this.visibleItems, margin, restack); - } else { - // no stacking - stack.nostack(this.visibleItems, margin, this.subgroups); + if ('editable' in options) { + if (typeof options.editable === 'boolean') { + this.options.editable.updateTime = options.editable; + this.options.editable.updateGroup = options.editable; + this.options.editable.add = options.editable; + this.options.editable.remove = options.editable; + } else if (_typeof(options.editable) === 'object') { + util.selectiveExtend(['updateTime', 'updateGroup', 'add', 'remove'], this.options.editable, options.editable); + } } - } - // recalculate the height of the group - var height = this._calculateHeight(margin); + if ('groupEditable' in options) { + if (typeof options.groupEditable === 'boolean') { + this.options.groupEditable.order = options.groupEditable; + this.options.groupEditable.add = options.groupEditable; + this.options.groupEditable.remove = options.groupEditable; + } else if (_typeof(options.groupEditable) === 'object') { + util.selectiveExtend(['order', 'add', 'remove'], this.options.groupEditable, options.groupEditable); + } + } - // calculate actual size and position - var foreground = this.dom.foreground; - this.top = foreground.offsetTop; - this.left = foreground.offsetLeft; - this.width = foreground.offsetWidth; - resized = util.updateProperty(this, 'height', height) || resized; + // callback functions + var addCallback = function (name) { + var fn = options[name]; + if (fn) { + if (!(fn instanceof Function)) { + throw new Error('option ' + name + ' must be a function ' + name + '(item, callback)'); + } + this.options[name] = fn; + } + }.bind(this); + ['onAdd', 'onUpdate', 'onRemove', 'onMove', 'onMoving', 'onAddGroup', 'onMoveGroup', 'onRemoveGroup'].forEach(addCallback); - // recalculate size of label - resized = util.updateProperty(this.props.label, 'width', this.dom.inner.clientWidth) || resized; - resized = util.updateProperty(this.props.label, 'height', this.dom.inner.clientHeight) || resized; + // force the itemSet to refresh: options like orientation and margins may be changed + this.markDirty(); + } + }; - // apply new height - this.dom.background.style.height = height + 'px'; - this.dom.foreground.style.height = height + 'px'; - this.dom.label.style.height = height + 'px'; + /** + * Mark the ItemSet dirty so it will refresh everything with next redraw. + * Optionally, all items can be marked as dirty and be refreshed. + * @param {{refreshItems: boolean}} [options] + */ + ItemSet.prototype.markDirty = function (options) { + this.groupIds = []; + this.stackDirty = true; - // update vertical position of items after they are re-stacked and the height of the group is calculated - for (var i = 0, ii = this.visibleItems.length; i < ii; i++) { - var item = this.visibleItems[i]; - item.repositionY(margin); + if (options && options.refreshItems) { + util.forEach(this.items, function (item) { + item.dirty = true; + if (item.displayed) item.redraw(); + }); } - - return resized; }; /** - * recalculate the height of the subgroups - * @private + * Destroy the ItemSet */ - Group.prototype._calculateSubGroupHeights = function () { - if (Object.keys(this.subgroups).length > 0) { - var me = this; + ItemSet.prototype.destroy = function () { + this.hide(); + this.setItems(null); + this.setGroups(null); - this.resetSubgroups(); + this.hammer = null; - util.forEach(this.visibleItems, function (item) { - if (item.data.subgroup !== undefined) { - me.subgroups[item.data.subgroup].height = Math.max(me.subgroups[item.data.subgroup].height, item.height); - me.subgroups[item.data.subgroup].visible = true; - } - }); - } + this.body = null; + this.conversion = null; }; /** - * recalculate the height of the group - * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin - * @returns {number} Returns the height - * @private + * Hide the component from the DOM */ - Group.prototype._calculateHeight = function (margin) { - // recalculate the height of the group - var height; - var visibleItems = this.visibleItems; - if (visibleItems.length > 0) { - var min = visibleItems[0].top; - var max = visibleItems[0].top + visibleItems[0].height; - util.forEach(visibleItems, function (item) { - min = Math.min(min, item.top); - max = Math.max(max, item.top + item.height); - }); - if (min > margin.axis) { - // there is an empty gap between the lowest item and the axis - var offset = min - margin.axis; - max -= offset; - util.forEach(visibleItems, function (item) { - item.top -= offset; - }); - } - height = max + margin.item.vertical / 2; - } else { - height = 0; - } - height = Math.max(height, this.props.label.height); - - return height; - }; - - /** - * Show this group: attach to the DOM - */ - Group.prototype.show = function () { - if (!this.dom.label.parentNode) { - this.itemSet.dom.labelSet.appendChild(this.dom.label); - } - - if (!this.dom.foreground.parentNode) { - this.itemSet.dom.foreground.appendChild(this.dom.foreground); + ItemSet.prototype.hide = function () { + // remove the frame containing the items + if (this.dom.frame.parentNode) { + this.dom.frame.parentNode.removeChild(this.dom.frame); } - if (!this.dom.background.parentNode) { - this.itemSet.dom.background.appendChild(this.dom.background); + // remove the axis with dots + if (this.dom.axis.parentNode) { + this.dom.axis.parentNode.removeChild(this.dom.axis); } - if (!this.dom.axis.parentNode) { - this.itemSet.dom.axis.appendChild(this.dom.axis); + // remove the labelset containing all group labels + if (this.dom.labelSet.parentNode) { + this.dom.labelSet.parentNode.removeChild(this.dom.labelSet); } }; /** - * Hide this group: remove from the DOM + * Show the component in the DOM (when not already visible). + * @return {Boolean} changed */ - Group.prototype.hide = function () { - var label = this.dom.label; - if (label.parentNode) { - label.parentNode.removeChild(label); - } - - var foreground = this.dom.foreground; - if (foreground.parentNode) { - foreground.parentNode.removeChild(foreground); + ItemSet.prototype.show = function () { + // show frame containing the items + if (!this.dom.frame.parentNode) { + this.body.dom.center.appendChild(this.dom.frame); } - var background = this.dom.background; - if (background.parentNode) { - background.parentNode.removeChild(background); + // show axis with dots + if (!this.dom.axis.parentNode) { + this.body.dom.backgroundVertical.appendChild(this.dom.axis); } - var axis = this.dom.axis; - if (axis.parentNode) { - axis.parentNode.removeChild(axis); + // show labelset containing labels + if (!this.dom.labelSet.parentNode) { + this.body.dom.left.appendChild(this.dom.labelSet); } }; /** - * Add an item to the group - * @param {Item} item + * Set selected items by their id. Replaces the current selection + * Unknown id's are silently ignored. + * @param {string[] | string} [ids] An array with zero or more id's of the items to be + * selected, or a single item id. If ids is undefined + * or an empty array, all items will be unselected. */ - Group.prototype.add = function (item) { - this.items[item.id] = item; - item.setParent(this); + ItemSet.prototype.setSelection = function (ids) { + var i, ii, id, item; - // add to - if (item.data.subgroup !== undefined) { - if (this.subgroups[item.data.subgroup] === undefined) { - this.subgroups[item.data.subgroup] = { height: 0, visible: false, index: this.subgroupIndex, items: [] }; - this.subgroupIndex++; - } - this.subgroups[item.data.subgroup].items.push(item); - } - this.orderSubgroups(); + if (ids == undefined) ids = []; + if (!Array.isArray(ids)) ids = [ids]; - if (this.visibleItems.indexOf(item) == -1) { - var range = this.itemSet.body.range; // TODO: not nice accessing the range like this - this._checkIfVisible(item, this.visibleItems, range); + // unselect currently selected items + for (i = 0, ii = this.selection.length; i < ii; i++) { + id = this.selection[i]; + item = this.items[id]; + if (item) item.unselect(); } - }; - - Group.prototype.orderSubgroups = function () { - if (this.subgroupOrderer !== undefined) { - var sortArray = []; - if (typeof this.subgroupOrderer == 'string') { - for (var subgroup in this.subgroups) { - sortArray.push({ subgroup: subgroup, sortField: this.subgroups[subgroup].items[0].data[this.subgroupOrderer] }); - } - sortArray.sort(function (a, b) { - return a.sortField - b.sortField; - }); - } else if (typeof this.subgroupOrderer == 'function') { - for (var subgroup in this.subgroups) { - sortArray.push(this.subgroups[subgroup].items[0].data); - } - sortArray.sort(this.subgroupOrderer); - } - if (sortArray.length > 0) { - for (var i = 0; i < sortArray.length; i++) { - this.subgroups[sortArray[i].subgroup].index = i; - } + // select items + this.selection = []; + for (i = 0, ii = ids.length; i < ii; i++) { + id = ids[i]; + item = this.items[id]; + if (item) { + this.selection.push(id); + item.select(); } } }; - Group.prototype.resetSubgroups = function () { - for (var subgroup in this.subgroups) { - if (this.subgroups.hasOwnProperty(subgroup)) { - this.subgroups[subgroup].visible = false; - } - } + /** + * Get the selected items by their id + * @return {Array} ids The ids of the selected items + */ + ItemSet.prototype.getSelection = function () { + return this.selection.concat([]); }; /** - * Remove an item from the group - * @param {Item} item + * Get the id's of the currently visible items. + * @returns {Array} The ids of the visible items */ - Group.prototype.remove = function (item) { - delete this.items[item.id]; - item.setParent(null); + ItemSet.prototype.getVisibleItems = function () { + var range = this.body.range.getRange(); + var left = this.body.util.toScreen(range.start); + var right = this.body.util.toScreen(range.end); - // remove from visible items - var index = this.visibleItems.indexOf(item); - if (index != -1) this.visibleItems.splice(index, 1); + var ids = []; + for (var groupId in this.groups) { + if (this.groups.hasOwnProperty(groupId)) { + var group = this.groups[groupId]; + var rawVisibleItems = group.visibleItems; - if (item.data.subgroup !== undefined) { - var subgroup = this.subgroups[item.data.subgroup]; - if (subgroup) { - var itemIndex = subgroup.items.indexOf(item); - subgroup.items.splice(itemIndex, 1); - if (!subgroup.items.length) { - delete this.subgroups[item.data.subgroup]; - this.subgroupIndex--; + // filter the "raw" set with visibleItems into a set which is really + // visible by pixels + for (var i = 0; i < rawVisibleItems.length; i++) { + var item = rawVisibleItems[i]; + // TODO: also check whether visible vertically + if (item.left < right && item.left + item.width > left) { + ids.push(item.id); + } } - this.orderSubgroups(); } } - }; - /** - * Remove an item from the corresponding DataSet - * @param {Item} item - */ - Group.prototype.removeFromDataSet = function (item) { - this.itemSet.removeItem(item.id); + return ids; }; /** - * Reorder the items + * Deselect a selected item + * @param {String | Number} id + * @private */ - Group.prototype.order = function () { - var array = util.toArray(this.items); - var startArray = []; - var endArray = []; - - for (var i = 0; i < array.length; i++) { - if (array[i].data.end !== undefined) { - endArray.push(array[i]); + ItemSet.prototype._deselect = function (id) { + var selection = this.selection; + for (var i = 0, ii = selection.length; i < ii; i++) { + if (selection[i] == id) { + // non-strict comparison! + selection.splice(i, 1); + break; } - startArray.push(array[i]); } - this.orderedItems = { - byStart: startArray, - byEnd: endArray - }; - - stack.orderByStart(this.orderedItems.byStart); - stack.orderByEnd(this.orderedItems.byEnd); }; /** - * Update the visible items - * @param {{byStart: Item[], byEnd: Item[]}} orderedItems All items ordered by start date and by end date - * @param {Item[]} visibleItems The previously visible items. - * @param {{start: number, end: number}} range Visible range - * @return {Item[]} visibleItems The new visible items. - * @private + * Repaint the component + * @return {boolean} Returns true if the component is resized */ - Group.prototype._updateVisibleItems = function (orderedItems, oldVisibleItems, range) { - var visibleItems = []; - var visibleItemsLookup = {}; // we keep this to quickly look up if an item already exists in the list without using indexOf on visibleItems - var interval = (range.end - range.start) / 4; - var lowerBound = range.start - interval; - var upperBound = range.end + interval; - var item, i; + ItemSet.prototype.redraw = function () { + var margin = this.options.margin, + range = this.body.range, + asSize = util.option.asSize, + options = this.options, + orientation = options.orientation.item, + resized = false, + frame = this.dom.frame; - // this function is used to do the binary search. - var searchFunction = function searchFunction(value) { - if (value < lowerBound) { - return -1; - } else if (value <= upperBound) { - return 0; - } else { - return 1; - } - }; + // recalculate absolute position (before redrawing groups) + this.props.top = this.body.domProps.top.height + this.body.domProps.border.top; + this.props.left = this.body.domProps.left.width + this.body.domProps.border.left; - // first check if the items that were in view previously are still in view. - // IMPORTANT: this handles the case for the items with startdate before the window and enddate after the window! - // also cleans up invisible items. - if (oldVisibleItems.length > 0) { - for (i = 0; i < oldVisibleItems.length; i++) { - this._checkIfVisibleWithReference(oldVisibleItems[i], visibleItems, visibleItemsLookup, range); - } - } + // update class name + frame.className = 'vis-itemset'; - // we do a binary search for the items that have only start values. - var initialPosByStart = util.binarySearchCustom(orderedItems.byStart, searchFunction, 'data', 'start'); + // reorder the groups (if needed) + resized = this._orderGroups() || resized; - // trace the visible items from the inital start pos both ways until an invisible item is found, we only look at the start values. - this._traceVisible(initialPosByStart, orderedItems.byStart, visibleItems, visibleItemsLookup, function (item) { - return item.data.start < lowerBound || item.data.start > upperBound; + // check whether zoomed (in that case we need to re-stack everything) + // TODO: would be nicer to get this as a trigger from Range + var visibleInterval = range.end - range.start; + var zoomed = visibleInterval != this.lastVisibleInterval || this.props.width != this.props.lastWidth; + if (zoomed) this.stackDirty = true; + this.lastVisibleInterval = visibleInterval; + this.props.lastWidth = this.props.width; + + var restack = this.stackDirty; + var firstGroup = this._firstGroup(); + var firstMargin = { + item: margin.item, + axis: margin.axis + }; + var nonFirstMargin = { + item: margin.item, + axis: margin.item.vertical / 2 + }; + var height = 0; + var minHeight = margin.axis + margin.item.vertical; + + // redraw the background group + this.groups[BACKGROUND].redraw(range, nonFirstMargin, restack); + + // redraw all regular groups + util.forEach(this.groups, function (group) { + var groupMargin = group == firstGroup ? firstMargin : nonFirstMargin; + var groupResized = group.redraw(range, groupMargin, restack); + resized = groupResized || resized; + height += group.height; }); + height = Math.max(height, minHeight); + this.stackDirty = false; - // if the window has changed programmatically without overlapping the old window, the ranged items with start < lowerBound and end > upperbound are not shown. - // We therefore have to brute force check all items in the byEnd list - if (this.checkRangedItems == true) { - this.checkRangedItems = false; - for (i = 0; i < orderedItems.byEnd.length; i++) { - this._checkIfVisibleWithReference(orderedItems.byEnd[i], visibleItems, visibleItemsLookup, range); - } - } else { - // we do a binary search for the items that have defined end times. - var initialPosByEnd = util.binarySearchCustom(orderedItems.byEnd, searchFunction, 'data', 'end'); + // update frame height + frame.style.height = asSize(height); - // trace the visible items from the inital start pos both ways until an invisible item is found, we only look at the end values. - this._traceVisible(initialPosByEnd, orderedItems.byEnd, visibleItems, visibleItemsLookup, function (item) { - return item.data.end < lowerBound || item.data.end > upperBound; - }); - } + // calculate actual size + this.props.width = frame.offsetWidth; + this.props.height = height; - // finally, we reposition all the visible items. - for (i = 0; i < visibleItems.length; i++) { - item = visibleItems[i]; - if (!item.displayed) item.show(); - // reposition item horizontally - item.repositionX(); - } + // reposition axis + this.dom.axis.style.top = asSize(orientation == 'top' ? this.body.domProps.top.height + this.body.domProps.border.top : this.body.domProps.top.height + this.body.domProps.centerContainer.height); + this.dom.axis.style.left = '0'; - // debug - //console.log("new line") - //if (this.groupId == null) { - // for (i = 0; i < orderedItems.byStart.length; i++) { - // item = orderedItems.byStart[i].data; - // console.log('start',i,initialPosByStart, item.start.valueOf(), item.content, item.start >= lowerBound && item.start <= upperBound,i == initialPosByStart ? "<------------------- HEREEEE" : "") - // } - // for (i = 0; i < orderedItems.byEnd.length; i++) { - // item = orderedItems.byEnd[i].data; - // console.log('rangeEnd',i,initialPosByEnd, item.end.valueOf(), item.content, item.end >= range.start && item.end <= range.end,i == initialPosByEnd ? "<------------------- HEREEEE" : "") - // } - //} + // check if this component is resized + resized = this._isResized() || resized; - return visibleItems; + return resized; }; - Group.prototype._traceVisible = function (initialPos, items, visibleItems, visibleItemsLookup, breakCondition) { - var item; - var i; + /** + * Get the first group, aligned with the axis + * @return {Group | null} firstGroup + * @private + */ + ItemSet.prototype._firstGroup = function () { + var firstGroupIndex = this.options.orientation.item == 'top' ? 0 : this.groupIds.length - 1; + var firstGroupId = this.groupIds[firstGroupIndex]; + var firstGroup = this.groups[firstGroupId] || this.groups[UNGROUPED]; - if (initialPos != -1) { - for (i = initialPos; i >= 0; i--) { - item = items[i]; - if (breakCondition(item)) { - break; - } else { - if (visibleItemsLookup[item.id] === undefined) { - visibleItemsLookup[item.id] = true; - visibleItems.push(item); + return firstGroup || null; + }; + + /** + * Create or delete the group holding all ungrouped items. This group is used when + * there are no groups specified. + * @protected + */ + ItemSet.prototype._updateUngrouped = function () { + var ungrouped = this.groups[UNGROUPED]; + var background = this.groups[BACKGROUND]; + var item, itemId; + + if (this.groupsData) { + // remove the group holding all ungrouped items + if (ungrouped) { + ungrouped.hide(); + delete this.groups[UNGROUPED]; + + for (itemId in this.items) { + if (this.items.hasOwnProperty(itemId)) { + item = this.items[itemId]; + item.parent && item.parent.remove(item); + var groupId = this._getGroupId(item.data); + var group = this.groups[groupId]; + group && group.add(item) || item.hide(); } } } + } else { + // create a group holding all (unfiltered) items + if (!ungrouped) { + var id = null; + var data = null; + ungrouped = new Group(id, data, this); + this.groups[UNGROUPED] = ungrouped; - for (i = initialPos + 1; i < items.length; i++) { - item = items[i]; - if (breakCondition(item)) { - break; - } else { - if (visibleItemsLookup[item.id] === undefined) { - visibleItemsLookup[item.id] = true; - visibleItems.push(item); + for (itemId in this.items) { + if (this.items.hasOwnProperty(itemId)) { + item = this.items[itemId]; + ungrouped.add(item); } } + + ungrouped.show(); } } }; /** - * this function is very similar to the _checkIfInvisible() but it does not - * return booleans, hides the item if it should not be seen and always adds to - * the visibleItems. - * this one is for brute forcing and hiding. - * - * @param {Item} item - * @param {Array} visibleItems - * @param {{start:number, end:number}} range - * @private + * Get the element for the labelset + * @return {HTMLElement} labelSet */ - Group.prototype._checkIfVisible = function (item, visibleItems, range) { - if (item.isVisible(range)) { - if (!item.displayed) item.show(); - // reposition item horizontally - item.repositionX(); - visibleItems.push(item); - } else { - if (item.displayed) item.hide(); - } + ItemSet.prototype.getLabelSet = function () { + return this.dom.labelSet; }; /** - * this function is very similar to the _checkIfInvisible() but it does not - * return booleans, hides the item if it should not be seen and always adds to - * the visibleItems. - * this one is for brute forcing and hiding. - * - * @param {Item} item - * @param {Array} visibleItems - * @param {{start:number, end:number}} range - * @private + * Set items + * @param {vis.DataSet | null} items */ - Group.prototype._checkIfVisibleWithReference = function (item, visibleItems, visibleItemsLookup, range) { - if (item.isVisible(range)) { - if (visibleItemsLookup[item.id] === undefined) { - visibleItemsLookup[item.id] = true; - visibleItems.push(item); - } + ItemSet.prototype.setItems = function (items) { + var me = this, + ids, + oldItemsData = this.itemsData; + + // replace the dataset + if (!items) { + this.itemsData = null; + } else if (items instanceof DataSet || items instanceof DataView) { + this.itemsData = items; } else { - if (item.displayed) item.hide(); + throw new TypeError('Data must be an instance of DataSet or DataView'); } - }; - module.exports = Group; + if (oldItemsData) { + // unsubscribe from old dataset + util.forEach(this.itemListeners, function (callback, event) { + oldItemsData.off(event, callback); + }); -/***/ }, -/* 31 */ -/***/ function(module, exports) { + // remove all drawn items + ids = oldItemsData.getIds(); + this._onRemove(ids); + } - // Utility functions for ordering and stacking of items - 'use strict'; + if (this.itemsData) { + // subscribe to new dataset + var id = this.id; + util.forEach(this.itemListeners, function (callback, event) { + me.itemsData.on(event, callback, id); + }); - var EPSILON = 0.001; // used when checking collisions, to prevent round-off errors + // add all new items + ids = this.itemsData.getIds(); + this._onAdd(ids); + + // update the group holding all ungrouped items + this._updateUngrouped(); + } + + this.body.emitter.emit('_change', { queue: true }); + }; /** - * Order items by their start data - * @param {Item[]} items + * Get the current items + * @returns {vis.DataSet | null} */ - exports.orderByStart = function (items) { - items.sort(function (a, b) { - return a.data.start - b.data.start; - }); + ItemSet.prototype.getItems = function () { + return this.itemsData; }; /** - * Order items by their end date. If they have no end date, their start date - * is used. - * @param {Item[]} items + * Set groups + * @param {vis.DataSet} groups */ - exports.orderByEnd = function (items) { - items.sort(function (a, b) { - var aTime = 'end' in a.data ? a.data.end : a.data.start, - bTime = 'end' in b.data ? b.data.end : b.data.start; - - return aTime - bTime; - }); - }; + ItemSet.prototype.setGroups = function (groups) { + var me = this, + ids; - /** - * Adjust vertical positions of the items such that they don't overlap each - * other. - * @param {Item[]} items - * All visible items - * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin - * Margins between items and between items and the axis. - * @param {boolean} [force=false] - * If true, all items will be repositioned. If false (default), only - * items having a top===null will be re-stacked - */ - exports.stack = function (items, margin, force) { - var i, iMax; + // unsubscribe from current dataset + if (this.groupsData) { + util.forEach(this.groupListeners, function (callback, event) { + me.groupsData.off(event, callback); + }); - if (force) { - // reset top position of all items - for (i = 0, iMax = items.length; i < iMax; i++) { - items[i].top = null; - } + // remove all drawn groups + ids = this.groupsData.getIds(); + this.groupsData = null; + this._onRemoveGroups(ids); // note: this will cause a redraw } - // calculate new, non-overlapping positions - for (i = 0, iMax = items.length; i < iMax; i++) { - var item = items[i]; - if (item.stack && item.top === null) { - // initialize top position - item.top = margin.axis; + // replace the dataset + if (!groups) { + this.groupsData = null; + } else if (groups instanceof DataSet || groups instanceof DataView) { + this.groupsData = groups; + } else { + throw new TypeError('Data must be an instance of DataSet or DataView'); + } - do { - // TODO: optimize checking for overlap. when there is a gap without items, - // you only need to check for items from the next item on, not from zero - var collidingItem = null; - for (var j = 0, jj = items.length; j < jj; j++) { - var other = items[j]; - if (other.top !== null && other !== item && other.stack && exports.collision(item, other, margin.item)) { - collidingItem = other; - break; - } - } + if (this.groupsData) { + // subscribe to new dataset + var id = this.id; + util.forEach(this.groupListeners, function (callback, event) { + me.groupsData.on(event, callback, id); + }); - if (collidingItem != null) { - // There is a collision. Reposition the items above the colliding element - item.top = collidingItem.top + collidingItem.height + margin.item.vertical; - } - } while (collidingItem); - } + // draw all ms + ids = this.groupsData.getIds(); + this._onAddGroups(ids); } + + // update the group holding all ungrouped items + this._updateUngrouped(); + + // update the order of all items in each group + this._order(); + + this.body.emitter.emit('_change', { queue: true }); }; /** - * Adjust vertical positions of the items without stacking them - * @param {Item[]} items - * All visible items - * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin - * Margins between items and between items and the axis. + * Get the current groups + * @returns {vis.DataSet | null} groups */ - exports.nostack = function (items, margin, subgroups) { - var i, iMax, newTop; + ItemSet.prototype.getGroups = function () { + return this.groupsData; + }; - // reset top position of all items - for (i = 0, iMax = items.length; i < iMax; i++) { - if (items[i].data.subgroup !== undefined) { - newTop = margin.axis; - for (var subgroup in subgroups) { - if (subgroups.hasOwnProperty(subgroup)) { - if (subgroups[subgroup].visible == true && subgroups[subgroup].index < subgroups[items[i].data.subgroup].index) { - newTop += subgroups[subgroup].height + margin.item.vertical; - } - } + /** + * Remove an item by its id + * @param {String | Number} id + */ + ItemSet.prototype.removeItem = function (id) { + var item = this.itemsData.get(id), + dataset = this.itemsData.getDataSet(); + + if (item) { + // confirm deletion + this.options.onRemove(item, function (item) { + if (item) { + // remove by id here, it is possible that an item has no id defined + // itself, so better not delete by the item itself + dataset.remove(id); } - items[i].top = newTop; - } else { - items[i].top = margin.axis; - } + }); } }; /** - * Test if the two provided items collide - * The items must have parameters left, width, top, and height. - * @param {Item} a The first item - * @param {Item} b The second item - * @param {{horizontal: number, vertical: number}} margin - * An object containing a horizontal and vertical - * minimum required margin. - * @return {boolean} true if a and b collide, else false + * Get the time of an item based on it's data and options.type + * @param {Object} itemData + * @returns {string} Returns the type + * @private */ - exports.collision = function (a, b, margin) { - return a.left - margin.horizontal + EPSILON < b.left + b.width && a.left + a.width + margin.horizontal - EPSILON > b.left && a.top - margin.vertical + EPSILON < b.top + b.height && a.top + a.height + margin.vertical - EPSILON > b.top; + ItemSet.prototype._getType = function (itemData) { + return itemData.type || this.options.type || (itemData.end ? 'range' : 'box'); }; -/***/ }, -/* 32 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var Hammer = __webpack_require__(20); - var Item = __webpack_require__(33); + /** + * Get the group id for an item + * @param {Object} itemData + * @returns {string} Returns the groupId + * @private + */ + ItemSet.prototype._getGroupId = function (itemData) { + var type = this._getType(itemData); + if (type == 'background' && itemData.group == undefined) { + return BACKGROUND; + } else { + return this.groupsData ? itemData.group : UNGROUPED; + } + }; /** - * @constructor RangeItem - * @extends Item - * @param {Object} data Object containing parameters start, end - * content, className. - * @param {{toScreen: function, toTime: function}} conversion - * Conversion functions from time to screen and vice versa - * @param {Object} [options] Configuration options - * // TODO: describe options + * Handle updated items + * @param {Number[]} ids + * @protected */ - function RangeItem(data, conversion, options) { - this.props = { - content: { - width: 0 - } - }; - this.overflow = false; // if contents can overflow (css styling), this flag is set to true + ItemSet.prototype._onUpdate = function (ids) { + var me = this; - // validate data - if (data) { - if (data.start == undefined) { - throw new Error('Property "start" missing in item ' + data.id); + ids.forEach(function (id) { + var itemData = me.itemsData.get(id, me.itemOptions); + var item = me.items[id]; + var type = me._getType(itemData); + + var constructor = ItemSet.types[type]; + var selected; + + if (item) { + // update item + if (!constructor || !(item instanceof constructor)) { + // item type has changed, delete the item and recreate it + selected = item.selected; // preserve selection of this item + me._removeItem(item); + item = null; + } else { + me._updateItem(item, itemData); + } } - if (data.end == undefined) { - throw new Error('Property "end" missing in item ' + data.id); + + if (!item) { + // create item + if (constructor) { + item = new constructor(itemData, me.conversion, me.options); + item.id = id; // TODO: not so nice setting id afterwards + me._addItem(item); + if (selected) { + this.selection.push(id); + item.select(); + } + } else if (type == 'rangeoverflow') { + // TODO: deprecated since version 2.1.0 (or 3.0.0?). cleanup some day + throw new TypeError('Item type "rangeoverflow" is deprecated. Use css styling instead: ' + '.vis-item.vis-range .vis-item-content {overflow: visible;}'); + } else { + throw new TypeError('Unknown item type "' + type + '"'); + } } - } + }.bind(this)); - Item.call(this, data, conversion, options); - } + this._order(); + this.stackDirty = true; // force re-stacking of all items next redraw + this.body.emitter.emit('_change', { queue: true }); + }; - RangeItem.prototype = new Item(null, null, null); + /** + * Handle added items + * @param {Number[]} ids + * @protected + */ + ItemSet.prototype._onAdd = ItemSet.prototype._onUpdate; - RangeItem.prototype.baseClassName = 'vis-item vis-range'; + /** + * Handle removed items + * @param {Number[]} ids + * @protected + */ + ItemSet.prototype._onRemove = function (ids) { + var count = 0; + var me = this; + ids.forEach(function (id) { + var item = me.items[id]; + if (item) { + count++; + me._removeItem(item); + } + }); + + if (count) { + // update order + this._order(); + this.stackDirty = true; // force re-stacking of all items next redraw + this.body.emitter.emit('_change', { queue: true }); + } + }; /** - * Check whether this item is visible inside given range - * @returns {{start: Number, end: Number}} range with a timestamp for start and end - * @returns {boolean} True if visible + * Update the order of item in all groups + * @private */ - RangeItem.prototype.isVisible = function (range) { - // determine visibility - return this.data.start < range.end && this.data.end > range.start; + ItemSet.prototype._order = function () { + // reorder the items in all groups + // TODO: optimization: only reorder groups affected by the changed items + util.forEach(this.groups, function (group) { + group.order(); + }); }; /** - * Repaint the item + * Handle updated groups + * @param {Number[]} ids + * @private */ - RangeItem.prototype.redraw = function () { - var dom = this.dom; - if (!dom) { - // create DOM - this.dom = {}; - dom = this.dom; + ItemSet.prototype._onUpdateGroups = function (ids) { + this._onAddGroups(ids); + }; - // background box - dom.box = document.createElement('div'); - // className is updated in redraw() + /** + * Handle changed groups (added or updated) + * @param {Number[]} ids + * @private + */ + ItemSet.prototype._onAddGroups = function (ids) { + var me = this; - // frame box (to prevent the item contents from overflowing - dom.frame = document.createElement('div'); - dom.frame.className = 'vis-item-overflow'; - dom.box.appendChild(dom.frame); + ids.forEach(function (id) { + var groupData = me.groupsData.get(id); + var group = me.groups[id]; - // contents box - dom.content = document.createElement('div'); - dom.content.className = 'vis-item-content'; - dom.frame.appendChild(dom.content); + if (!group) { + // check for reserved ids + if (id == UNGROUPED || id == BACKGROUND) { + throw new Error('Illegal group id. ' + id + ' is a reserved id.'); + } - // attach this item as attribute - dom.box['timeline-item'] = this; + var groupOptions = Object.create(me.options); + util.extend(groupOptions, { + height: null + }); - this.dirty = true; - } + group = new Group(id, groupData, me); + me.groups[id] = group; - // append DOM to parent DOM - if (!this.parent) { - throw new Error('Cannot redraw item: no parent attached'); - } - if (!dom.box.parentNode) { - var foreground = this.parent.dom.foreground; - if (!foreground) { - throw new Error('Cannot redraw item: parent has no foreground container element'); + // add items with this groupId to the new group + for (var itemId in me.items) { + if (me.items.hasOwnProperty(itemId)) { + var item = me.items[itemId]; + if (item.data.group == id) { + group.add(item); + } + } + } + + group.order(); + group.show(); + } else { + // update group + group.setData(groupData); } - foreground.appendChild(dom.box); - } - this.displayed = true; + }); - // Update DOM when item is marked dirty. An item is marked dirty when: - // - the item is not yet rendered - // - the item's data is changed - // - the item is selected/deselected - if (this.dirty) { - this._updateContents(this.dom.content); - this._updateTitle(this.dom.box); - this._updateDataAttributes(this.dom.box); - this._updateStyle(this.dom.box); + this.body.emitter.emit('_change', { queue: true }); + }; - var editable = (this.options.editable.updateTime || this.options.editable.updateGroup || this.editable === true) && this.editable !== false; + /** + * Handle removed groups + * @param {Number[]} ids + * @private + */ + ItemSet.prototype._onRemoveGroups = function (ids) { + var groups = this.groups; + ids.forEach(function (id) { + var group = groups[id]; - // update class - var className = (this.data.className ? ' ' + this.data.className : '') + (this.selected ? ' vis-selected' : '') + (editable ? ' vis-editable' : ' vis-readonly'); - dom.box.className = this.baseClassName + className; + if (group) { + group.hide(); + delete groups[id]; + } + }); - // determine from css whether this box has overflow - this.overflow = window.getComputedStyle(dom.frame).overflow !== 'hidden'; + this.markDirty(); - // recalculate size - // turn off max-width to be able to calculate the real width - // this causes an extra browser repaint/reflow, but so be it - this.dom.content.style.maxWidth = 'none'; - this.props.content.width = this.dom.content.offsetWidth; - this.height = this.dom.box.offsetHeight; - this.dom.content.style.maxWidth = ''; + this.body.emitter.emit('_change', { queue: true }); + }; - this.dirty = false; - } + /** + * Reorder the groups if needed + * @return {boolean} changed + * @private + */ + ItemSet.prototype._orderGroups = function () { + if (this.groupsData) { + // reorder the groups + var groupIds = this.groupsData.getIds({ + order: this.options.groupOrder + }); - this._repaintDeleteButton(dom.box); - this._repaintDragLeft(); - this._repaintDragRight(); + var changed = !util.equalArray(groupIds, this.groupIds); + if (changed) { + // hide all groups, removes them from the DOM + var groups = this.groups; + groupIds.forEach(function (groupId) { + groups[groupId].hide(); + }); + + // show the groups again, attach them to the DOM in correct order + groupIds.forEach(function (groupId) { + groups[groupId].show(); + }); + + this.groupIds = groupIds; + } + + return changed; + } else { + return false; + } }; /** - * Show the item in the DOM (when not already visible). The items DOM will - * be created when needed. + * Add a new item + * @param {Item} item + * @private */ - RangeItem.prototype.show = function () { - if (!this.displayed) { - this.redraw(); - } + ItemSet.prototype._addItem = function (item) { + this.items[item.id] = item; + + // add to group + var groupId = this._getGroupId(item.data); + var group = this.groups[groupId]; + if (group) group.add(item); }; /** - * Hide the item from the DOM (when visible) - * @return {Boolean} changed + * Update an existing item + * @param {Item} item + * @param {Object} itemData + * @private */ - RangeItem.prototype.hide = function () { - if (this.displayed) { - var box = this.dom.box; + ItemSet.prototype._updateItem = function (item, itemData) { + var oldGroupId = item.data.group; + var oldSubGroupId = item.data.subgroup; - if (box.parentNode) { - box.parentNode.removeChild(box); - } + // update the items data (will redraw the item when displayed) + item.setData(itemData); - this.displayed = false; + // update group + if (oldGroupId != item.data.group || oldSubGroupId != item.data.subgroup) { + var oldGroup = this.groups[oldGroupId]; + if (oldGroup) oldGroup.remove(item); + + var groupId = this._getGroupId(item.data); + var group = this.groups[groupId]; + if (group) group.add(item); } }; /** - * Reposition the item horizontally - * @param {boolean} [limitSize=true] If true (default), the width of the range - * item will be limited, as the browser cannot - * display very wide divs. This means though - * that the applied left and width may - * not correspond to the ranges start and end - * @Override + * Delete an item from the ItemSet: remove it from the DOM, from the map + * with items, and from the map with visible items, and from the selection + * @param {Item} item + * @private */ - RangeItem.prototype.repositionX = function (limitSize) { - var parentWidth = this.parent.width; - var start = this.conversion.toScreen(this.data.start); - var end = this.conversion.toScreen(this.data.end); - var contentLeft; - var contentWidth; + ItemSet.prototype._removeItem = function (item) { + // remove from DOM + item.hide(); - // limit the width of the range, as browsers cannot draw very wide divs - if (limitSize === undefined || limitSize === true) { - if (start < -parentWidth) { - start = -parentWidth; - } - if (end > 2 * parentWidth) { - end = 2 * parentWidth; - } - } - var boxWidth = Math.max(end - start, 1); - - if (this.overflow) { - this.left = start; - this.width = boxWidth + this.props.content.width; - contentWidth = this.props.content.width; - - // Note: The calculation of width is an optimistic calculation, giving - // a width which will not change when moving the Timeline - // So no re-stacking needed, which is nicer for the eye; - } else { - this.left = start; - this.width = boxWidth; - contentWidth = Math.min(end - start, this.props.content.width); - } - - this.dom.box.style.left = this.left + 'px'; - this.dom.box.style.width = boxWidth + 'px'; - - switch (this.options.align) { - case 'left': - this.dom.content.style.left = '0'; - break; - - case 'right': - this.dom.content.style.left = Math.max(boxWidth - contentWidth, 0) + 'px'; - break; + // remove from items + delete this.items[item.id]; - case 'center': - this.dom.content.style.left = Math.max((boxWidth - contentWidth) / 2, 0) + 'px'; - break; + // remove from selection + var index = this.selection.indexOf(item.id); + if (index != -1) this.selection.splice(index, 1); - default: - // 'auto' - // when range exceeds left of the window, position the contents at the left of the visible area - if (this.overflow) { - if (end > 0) { - contentLeft = Math.max(-start, 0); - } else { - contentLeft = -contentWidth; // ensure it's not visible anymore - } - } else { - if (start < 0) { - contentLeft = -start; - } else { - contentLeft = 0; - } - } - this.dom.content.style.left = contentLeft + 'px'; - } + // remove from group + item.parent && item.parent.remove(item); }; /** - * Reposition the item vertically - * @Override + * Create an array containing all items being a range (having an end date) + * @param array + * @returns {Array} + * @private */ - RangeItem.prototype.repositionY = function () { - var orientation = this.options.orientation.item; - var box = this.dom.box; + ItemSet.prototype._constructByEndArray = function (array) { + var endArray = []; - if (orientation == 'top') { - box.style.top = this.top + 'px'; - } else { - box.style.top = this.parent.height - this.top - this.height + 'px'; + for (var i = 0; i < array.length; i++) { + if (array[i] instanceof RangeItem) { + endArray.push(array[i]); + } } + return endArray; }; /** - * Repaint a drag area on the left side of the range when the range is selected - * @protected + * Register the clicked item on touch, before dragStart is initiated. + * + * dragStart is initiated from a mousemove event, AFTER the mouse/touch is + * already moving. Therefore, the mouse/touch can sometimes be above an other + * DOM element than the item itself. + * + * @param {Event} event + * @private */ - RangeItem.prototype._repaintDragLeft = function () { - if (this.selected && this.options.editable.updateTime && !this.dom.dragLeft) { - // create and show drag area - var dragLeft = document.createElement('div'); - dragLeft.className = 'vis-drag-left'; - dragLeft.dragLeftItem = this; + ItemSet.prototype._onTouch = function (event) { + // store the touched item, used in _onDragStart + this.touchParams.item = this.itemFromTarget(event); + this.touchParams.dragLeftItem = event.target.dragLeftItem || false; + this.touchParams.dragRightItem = event.target.dragRightItem || false; + this.touchParams.itemProps = null; + }; - this.dom.box.appendChild(dragLeft); - this.dom.dragLeft = dragLeft; - } else if (!this.selected && this.dom.dragLeft) { - // delete drag area - if (this.dom.dragLeft.parentNode) { - this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft); - } - this.dom.dragLeft = null; + /** + * Given an group id, returns the index it has. + * + * @param {Number} groupID + * @private + */ + ItemSet.prototype._getGroupIndex = function (groupId) { + for (var i = 0; i < this.groupIds.length; i++) { + if (groupId == this.groupIds[i]) return i; } }; /** - * Repaint a drag area on the right side of the range when the range is selected - * @protected + * Start dragging the selected events + * @param {Event} event + * @private */ - RangeItem.prototype._repaintDragRight = function () { - if (this.selected && this.options.editable.updateTime && !this.dom.dragRight) { - // create and show drag area - var dragRight = document.createElement('div'); - dragRight.className = 'vis-drag-right'; - dragRight.dragRightItem = this; + ItemSet.prototype._onDragStart = function (event) { + var item = this.touchParams.item || null; + var me = this; + var props; - this.dom.box.appendChild(dragRight); - this.dom.dragRight = dragRight; - } else if (!this.selected && this.dom.dragRight) { - // delete drag area - if (this.dom.dragRight.parentNode) { - this.dom.dragRight.parentNode.removeChild(this.dom.dragRight); - } - this.dom.dragRight = null; - } - }; + if (item && (item.selected || this.options.itemsAlwaysDraggable)) { - module.exports = RangeItem; + if (!this.options.editable.updateTime && !this.options.editable.updateGroup && !item.editable) { + return; + } -/***/ }, -/* 33 */ -/***/ function(module, exports, __webpack_require__) { + // override options.editable + if (item.editable === false) { + return; + } - 'use strict'; + var dragLeftItem = this.touchParams.dragLeftItem; + var dragRightItem = this.touchParams.dragRightItem; - var Hammer = __webpack_require__(20); - var util = __webpack_require__(1); + if (dragLeftItem) { + props = { + item: dragLeftItem, + initialX: event.center.x, + dragLeft: true, + data: this._cloneItemData(item.data) + }; - /** - * @constructor Item - * @param {Object} data Object containing (optional) parameters type, - * start, end, content, group, className. - * @param {{toScreen: function, toTime: function}} conversion - * Conversion functions from time to screen and vice versa - * @param {Object} options Configuration options - * // TODO: describe available options - */ - function Item(data, conversion, options) { - this.id = null; - this.parent = null; - this.data = data; - this.dom = null; - this.conversion = conversion || {}; - this.options = options || {}; + this.touchParams.itemProps = [props]; + } else if (dragRightItem) { + props = { + item: dragRightItem, + initialX: event.center.x, + dragRight: true, + data: this._cloneItemData(item.data) + }; - this.selected = false; - this.displayed = false; - this.dirty = true; + this.touchParams.itemProps = [props]; + } else { + this.touchParams.selectedItem = item; - this.top = null; - this.left = null; - this.width = null; - this.height = null; + var baseGroupIndex = this._getGroupIndex(item.data.group); - this.editable = null; - if (this.data && this.data.hasOwnProperty('editable') && typeof this.data.editable === 'boolean') { - this.editable = data.editable; - } - } + var itemsToDrag = this.options.itemsAlwaysDraggable && !item.selected ? [item.id] : this.getSelection(); - Item.prototype.stack = true; + this.touchParams.itemProps = itemsToDrag.map(function (id) { + var item = me.items[id]; + var groupIndex = me._getGroupIndex(item.data.group); + return { + item: item, + initialX: event.center.x, + groupOffset: baseGroupIndex - groupIndex, + data: this._cloneItemData(item.data) + }; + }.bind(this)); + } - /** - * Select current item - */ - Item.prototype.select = function () { - this.selected = true; - this.dirty = true; - if (this.displayed) this.redraw(); + event.stopPropagation(); + } else if (this.options.editable.add && (event.srcEvent.ctrlKey || event.srcEvent.metaKey)) { + // create a new range item when dragging with ctrl key down + this._onDragStartAddItem(event); + } }; /** - * Unselect current item + * Start creating a new range item by dragging. + * @param {Event} event + * @private */ - Item.prototype.unselect = function () { - this.selected = false; - this.dirty = true; - if (this.displayed) this.redraw(); - }; + ItemSet.prototype._onDragStartAddItem = function (event) { + var snap = this.options.snap || null; + var xAbs = util.getAbsoluteLeft(this.dom.frame); + var x = event.center.x - xAbs - 10; // minus 10 to compensate for the drag starting as soon as you've moved 10px + var time = this.body.util.toTime(x); + var scale = this.body.util.getScale(); + var step = this.body.util.getStep(); + var start = snap ? snap(time, scale, step) : time; + var end = start; - /** - * Set data for the item. Existing data will be updated. The id should not - * be changed. When the item is displayed, it will be redrawn immediately. - * @param {Object} data - */ - Item.prototype.setData = function (data) { - var groupChanged = data.group != undefined && this.data.group != data.group; - if (groupChanged) { - this.parent.itemSet._moveToGroup(this, data.group); - } + var itemData = { + type: 'range', + start: start, + end: end, + content: 'new item' + }; - if (data.hasOwnProperty('editable') && typeof data.editable === 'boolean') { - this.editable = data.editable; + var id = util.randomUUID(); + itemData[this.itemsData._fieldId] = id; + + var group = this.groupFromTarget(event); + if (group) { + itemData.group = group.groupId; } - this.data = data; - this.dirty = true; - if (this.displayed) this.redraw(); - }; + var newItem = new RangeItem(itemData, this.conversion, this.options); + newItem.id = id; // TODO: not so nice setting id afterwards + newItem.data = this._cloneItemData(itemData); + this._addItem(newItem); - /** - * Set a parent for the item - * @param {ItemSet | Group} parent - */ - Item.prototype.setParent = function (parent) { - if (this.displayed) { - this.hide(); - this.parent = parent; - if (this.parent) { - this.show(); - } - } else { - this.parent = parent; - } - }; + var props = { + item: newItem, + dragRight: true, + initialX: event.center.x, + data: newItem.data + }; + this.touchParams.itemProps = [props]; - /** - * Check whether this item is visible inside given range - * @returns {{start: Number, end: Number}} range with a timestamp for start and end - * @returns {boolean} True if visible - */ - Item.prototype.isVisible = function (range) { - // Should be implemented by Item implementations - return false; + event.stopPropagation(); }; /** - * Show the Item in the DOM (when not already visible) - * @return {Boolean} changed + * Drag selected items + * @param {Event} event + * @private */ - Item.prototype.show = function () { - return false; - }; + ItemSet.prototype._onDrag = function (event) { + if (this.touchParams.itemProps) { + event.stopPropagation(); - /** - * Hide the Item from the DOM (when visible) - * @return {Boolean} changed - */ - Item.prototype.hide = function () { - return false; - }; + var me = this; + var snap = this.options.snap || null; + var xOffset = this.body.dom.root.offsetLeft + this.body.domProps.left.width; + var scale = this.body.util.getScale(); + var step = this.body.util.getStep(); - /** - * Repaint the item - */ - Item.prototype.redraw = function () { - // should be implemented by the item - }; + //only calculate the new group for the item that's actually dragged + var selectedItem = this.touchParams.selectedItem; + var updateGroupAllowed = me.options.editable.updateGroup; + var newGroupBase = null; + if (updateGroupAllowed && selectedItem) { + if (selectedItem.data.group != undefined) { + // drag from one group to another + var group = me.groupFromTarget(event); + if (group) { + //we know the offset for all items, so the new group for all items + //will be relative to this one. + newGroupBase = this._getGroupIndex(group.groupId); + } + } + } - /** - * Reposition the Item horizontally - */ - Item.prototype.repositionX = function () { - // should be implemented by the item - }; + // move + this.touchParams.itemProps.forEach(function (props) { + var current = me.body.util.toTime(event.center.x - xOffset); + var initial = me.body.util.toTime(props.initialX - xOffset); + var offset = current - initial; // ms - /** - * Reposition the Item vertically - */ - Item.prototype.repositionY = function () { - // should be implemented by the item - }; + var itemData = this._cloneItemData(props.item.data); // clone the data + if (props.item.editable === false) { + return; + } - /** - * Repaint a delete button on the top right of the item when the item is selected - * @param {HTMLElement} anchor - * @protected - */ - Item.prototype._repaintDeleteButton = function (anchor) { - var editable = (this.options.editable.remove || this.data.editable === true) && this.data.editable !== false; + var updateTimeAllowed = me.options.editable.updateTime || props.item.editable === true; - if (this.selected && editable && !this.dom.deleteButton) { - // create and show button - var me = this; + if (updateTimeAllowed) { + if (props.dragLeft) { + // drag left side of a range item + if (itemData.start != undefined) { + var initialStart = util.convert(props.data.start, 'Date'); + var start = new Date(initialStart.valueOf() + offset); + // TODO: pass a Moment instead of a Date to snap(). (Breaking change) + itemData.start = snap ? snap(start, scale, step) : start; + } + } else if (props.dragRight) { + // drag right side of a range item + if (itemData.end != undefined) { + var initialEnd = util.convert(props.data.end, 'Date'); + var end = new Date(initialEnd.valueOf() + offset); + // TODO: pass a Moment instead of a Date to snap(). (Breaking change) + itemData.end = snap ? snap(end, scale, step) : end; + } + } else { + // drag both start and end + if (itemData.start != undefined) { + var initialStart = util.convert(props.data.start, 'Date').valueOf(); + var start = new Date(initialStart + offset); - var deleteButton = document.createElement('div'); - deleteButton.className = 'vis-delete'; - deleteButton.title = 'Delete this item'; + if (itemData.end != undefined) { + var initialEnd = util.convert(props.data.end, 'Date'); + var duration = initialEnd.valueOf() - initialStart.valueOf(); - // TODO: be able to destroy the delete button - new Hammer(deleteButton).on('tap', function (event) { - event.stopPropagation(); - me.parent.removeFromDataSet(me); - }); + // TODO: pass a Moment instead of a Date to snap(). (Breaking change) + itemData.start = snap ? snap(start, scale, step) : start; + itemData.end = new Date(itemData.start.valueOf() + duration); + } else { + // TODO: pass a Moment instead of a Date to snap(). (Breaking change) + itemData.start = snap ? snap(start, scale, step) : start; + } + } + } + } - anchor.appendChild(deleteButton); - this.dom.deleteButton = deleteButton; - } else if (!this.selected && this.dom.deleteButton) { - // remove button - if (this.dom.deleteButton.parentNode) { - this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton); - } - this.dom.deleteButton = null; - } - }; + var updateGroupAllowed = me.options.editable.updateGroup || props.item.editable === true; - /** - * Set HTML contents for the item - * @param {Element} element HTML element to fill with the contents - * @private - */ - Item.prototype._updateContents = function (element) { - var content; - if (this.options.template) { - var itemData = this.parent.itemSet.itemsData.get(this.id); // get a clone of the data from the dataset - content = this.options.template(itemData); - } else { - content = this.data.content; - } + if (updateGroupAllowed && !props.dragLeft && !props.dragRight && newGroupBase != null) { + if (itemData.group != undefined) { + var newOffset = newGroupBase - props.groupOffset; - var changed = this._contentToString(this.content) !== this._contentToString(content); - if (changed) { - // only replace the content when changed - if (content instanceof Element) { - element.innerHTML = ''; - element.appendChild(content); - } else if (content != undefined) { - element.innerHTML = content; - } else { - if (!(this.data.type == 'background' && this.data.content === undefined)) { - throw new Error('Property "content" missing in item ' + this.id); + //make sure we stay in bounds + newOffset = Math.max(0, newOffset); + newOffset = Math.min(me.groupIds.length - 1, newOffset); + + itemData.group = me.groupIds[newOffset]; + } } - } - this.content = content; + // confirm moving the item + itemData = this._cloneItemData(itemData); // convert start and end to the correct type + me.options.onMoving(itemData, function (itemData) { + if (itemData) { + props.item.setData(this._cloneItemData(itemData, 'Date')); + } + }.bind(this)); + }.bind(this)); + + this.stackDirty = true; // force re-stacking of all items next redraw + this.body.emitter.emit('_change'); } }; /** - * Set HTML contents for the item - * @param {Element} element HTML element to fill with the contents + * Move an item to another group + * @param {Item} item + * @param {String | Number} groupId * @private */ - Item.prototype._updateTitle = function (element) { - if (this.data.title != null) { - element.title = this.data.title || ''; - } else { - element.removeAttribute('vis-title'); + ItemSet.prototype._moveToGroup = function (item, groupId) { + var group = this.groups[groupId]; + if (group && group.groupId != item.data.group) { + var oldGroup = item.parent; + oldGroup.remove(item); + oldGroup.order(); + group.add(item); + group.order(); + + item.data.group = group.groupId; } }; /** - * Process dataAttributes timeline option and set as data- attributes on dom.content - * @param {Element} element HTML element to which the attributes will be attached + * End of dragging selected items + * @param {Event} event * @private */ - Item.prototype._updateDataAttributes = function (element) { - if (this.options.dataAttributes && this.options.dataAttributes.length > 0) { - var attributes = []; + ItemSet.prototype._onDragEnd = function (event) { + if (this.touchParams.itemProps) { + event.stopPropagation(); - if (Array.isArray(this.options.dataAttributes)) { - attributes = this.options.dataAttributes; - } else if (this.options.dataAttributes == 'all') { - attributes = Object.keys(this.data); - } else { - return; - } + var me = this; + var dataset = this.itemsData.getDataSet(); + var itemProps = this.touchParams.itemProps; + this.touchParams.itemProps = null; - for (var i = 0; i < attributes.length; i++) { - var name = attributes[i]; - var value = this.data[name]; + itemProps.forEach(function (props) { + var id = props.item.id; + var exists = me.itemsData.get(id, me.itemOptions) != null; - if (value != null) { - element.setAttribute('data-' + name, value); - } else { - element.removeAttribute('data-' + name); - } - } - } - }; + if (!exists) { + // add a new item + me.options.onAdd(props.item.data, function (itemData) { + me._removeItem(props.item); // remove temporary item + if (itemData) { + me.itemsData.getDataSet().add(itemData); + } - /** - * Update custom styles of the element - * @param element - * @private - */ - Item.prototype._updateStyle = function (element) { - // remove old styles - if (this.style) { - util.removeCssText(element, this.style); - this.style = null; - } + // force re-stacking of all items next redraw + me.stackDirty = true; + me.body.emitter.emit('_change'); + }); + } else { + // update existing item + var itemData = this._cloneItemData(props.item.data); // convert start and end to the correct type + me.options.onMove(itemData, function (itemData) { + if (itemData) { + // apply changes + itemData[dataset._fieldId] = id; // ensure the item contains its id (can be undefined) + dataset.update(itemData); + } else { + // restore original values + props.item.setData(props.data); - // append new styles - if (this.data.style) { - util.addCssText(element, this.data.style); - this.style = this.data.style; + me.stackDirty = true; // force re-stacking of all items next redraw + me.body.emitter.emit('_change'); + } + }); + } + }.bind(this)); } }; - /** - * Stringify the items contents - * @param {string | Element | undefined} content - * @returns {string | undefined} - * @private - */ - Item.prototype._contentToString = function (content) { - if (typeof content === 'string') return content; - if (content && 'outerHTML' in content) return content.outerHTML; - return content; - }; + ItemSet.prototype._onGroupDragStart = function (event) { + if (this.options.groupEditable.order) { + this.groupTouchParams.group = this.groupFromTarget(event); - /** - * Return the width of the item left from its start date - * @return {number} - */ - Item.prototype.getWidthLeft = function () { - return 0; - }; + if (this.groupTouchParams.group) { + event.stopPropagation(); - /** - * Return the width of the item right from the max of its start and end date - * @return {number} - */ - Item.prototype.getWidthRight = function () { - return 0; + this.groupTouchParams.originalOrder = this.groupsData.getIds({ + order: this.options.groupOrder + }); + } + } }; - module.exports = Item; - -/***/ }, -/* 34 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var util = __webpack_require__(1); - var Group = __webpack_require__(30); + ItemSet.prototype._onGroupDrag = function (event) { + if (this.options.groupEditable.order && this.groupTouchParams.group) { + event.stopPropagation(); - /** - * @constructor BackgroundGroup - * @param {Number | String} groupId - * @param {Object} data - * @param {ItemSet} itemSet - */ - function BackgroundGroup(groupId, data, itemSet) { - Group.call(this, groupId, data, itemSet); + // drag from one group to another + var group = this.groupFromTarget(event); - this.width = 0; - this.height = 0; - this.top = 0; - this.left = 0; - } + // try to avoid toggling when groups differ in height + if (group && group.height != this.groupTouchParams.group.height) { + var movingUp = group.top < this.groupTouchParams.group.top; + var clientY = event.center ? event.center.y : event.clientY; + var targetGroupTop = util.getAbsoluteTop(group.dom.foreground); + var draggedGroupHeight = this.groupTouchParams.group.height; + if (movingUp) { + // skip swapping the groups when the dragged group is not below clientY afterwards + if (targetGroupTop + draggedGroupHeight < clientY) { + return; + } + } else { + var targetGroupHeight = group.height; + // skip swapping the groups when the dragged group is not below clientY afterwards + if (targetGroupTop + targetGroupHeight - draggedGroupHeight > clientY) { + return; + } + } + } - BackgroundGroup.prototype = Object.create(Group.prototype); + if (group && group != this.groupTouchParams.group) { + var groupsData = this.groupsData; + var targetGroup = groupsData.get(group.groupId); + var draggedGroup = groupsData.get(this.groupTouchParams.group.groupId); - /** - * Repaint this group - * @param {{start: number, end: number}} range - * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin - * @param {boolean} [restack=false] Force restacking of all items - * @return {boolean} Returns true if the group is resized - */ - BackgroundGroup.prototype.redraw = function (range, margin, restack) { - var resized = false; + // switch groups + if (draggedGroup && targetGroup) { + this.options.groupOrderSwap(draggedGroup, targetGroup, this.groupsData); + this.groupsData.update(draggedGroup); + this.groupsData.update(targetGroup); + } - this.visibleItems = this._updateVisibleItems(this.orderedItems, this.visibleItems, range); + // fetch current order of groups + var newOrder = this.groupsData.getIds({ + order: this.options.groupOrder + }); - // calculate actual size - this.width = this.dom.background.offsetWidth; + // in case of changes since _onGroupDragStart + if (!util.equalArray(newOrder, this.groupTouchParams.originalOrder)) { + var groupsData = this.groupsData; + var origOrder = this.groupTouchParams.originalOrder; + var draggedId = this.groupTouchParams.group.groupId; + var numGroups = Math.min(origOrder.length, newOrder.length); + var curPos = 0; + var newOffset = 0; + var orgOffset = 0; + while (curPos < numGroups) { + // as long as the groups are where they should be step down along the groups order + while (curPos + newOffset < numGroups && curPos + orgOffset < numGroups && newOrder[curPos + newOffset] == origOrder[curPos + orgOffset]) { + curPos++; + } - // apply new height (just always zero for BackgroundGroup - this.dom.background.style.height = '0'; + // all ok + if (curPos + newOffset >= numGroups) { + break; + } - // update vertical position of items after they are re-stacked and the height of the group is calculated - for (var i = 0, ii = this.visibleItems.length; i < ii; i++) { - var item = this.visibleItems[i]; - item.repositionY(margin); - } + // not all ok + // if dragged group was move upwards everything below should have an offset + if (newOrder[curPos + newOffset] == draggedId) { + newOffset = 1; + continue; + } + // if dragged group was move downwards everything above should have an offset + else if (origOrder[curPos + orgOffset] == draggedId) { + orgOffset = 1; + continue; + } + // found a group (apart from dragged group) that has the wrong position -> switch with the + // group at the position where other one should be, fix index arrays and continue + else { + var slippedPosition = newOrder.indexOf(origOrder[curPos + orgOffset]); + var switchGroup = groupsData.get(newOrder[curPos + newOffset]); + var shouldBeGroup = groupsData.get(origOrder[curPos + orgOffset]); + this.options.groupOrderSwap(switchGroup, shouldBeGroup, groupsData); + groupsData.update(switchGroup); + groupsData.update(shouldBeGroup); - return resized; - }; + var switchGroupId = newOrder[curPos + newOffset]; + newOrder[curPos + newOffset] = origOrder[curPos + orgOffset]; + newOrder[slippedPosition] = switchGroupId; - /** - * Show this group: attach to the DOM - */ - BackgroundGroup.prototype.show = function () { - if (!this.dom.background.parentNode) { - this.itemSet.dom.background.appendChild(this.dom.background); + curPos++; + } + } + } + } } }; - module.exports = BackgroundGroup; + ItemSet.prototype._onGroupDragEnd = function (event) { + if (this.options.groupEditable.order && this.groupTouchParams.group) { + event.stopPropagation(); -/***/ }, -/* 35 */ -/***/ function(module, exports, __webpack_require__) { + // update existing group + var me = this; + var id = me.groupTouchParams.group.groupId; + var dataset = me.groupsData.getDataSet(); + var groupData = util.extend({}, dataset.get(id)); // clone the data + me.options.onMoveGroup(groupData, function (groupData) { + if (groupData) { + // apply changes + groupData[dataset._fieldId] = id; // ensure the group contains its id (can be undefined) + dataset.update(groupData); + } else { - 'use strict'; + // fetch current order of groups + var newOrder = dataset.getIds({ + order: me.options.groupOrder + }); - var Item = __webpack_require__(33); - var util = __webpack_require__(1); + // restore original order + if (!util.equalArray(newOrder, me.groupTouchParams.originalOrder)) { + var origOrder = me.groupTouchParams.originalOrder; + var numGroups = Math.min(origOrder.length, newOrder.length); + var curPos = 0; + while (curPos < numGroups) { + // as long as the groups are where they should be step down along the groups order + while (curPos < numGroups && newOrder[curPos] == origOrder[curPos]) { + curPos++; + } - /** - * @constructor BoxItem - * @extends Item - * @param {Object} data Object containing parameters start - * content, className. - * @param {{toScreen: function, toTime: function}} conversion - * Conversion functions from time to screen and vice versa - * @param {Object} [options] Configuration options - * // TODO: describe available options - */ - function BoxItem(data, conversion, options) { - this.props = { - dot: { - width: 0, - height: 0 - }, - line: { - width: 0, - height: 0 - } - }; + // all ok + if (curPos >= numGroups) { + break; + } - // validate data - if (data) { - if (data.start == undefined) { - throw new Error('Property "start" missing in item ' + data); - } - } + // found a group that has the wrong position -> switch with the + // group at the position where other one should be, fix index arrays and continue + var slippedPosition = newOrder.indexOf(origOrder[curPos]); + var switchGroup = dataset.get(newOrder[curPos]); + var shouldBeGroup = dataset.get(origOrder[curPos]); + me.options.groupOrderSwap(switchGroup, shouldBeGroup, dataset); + groupsData.update(switchGroup); + groupsData.update(shouldBeGroup); - Item.call(this, data, conversion, options); - } + var switchGroupId = newOrder[curPos]; + newOrder[curPos] = origOrder[curPos]; + newOrder[slippedPosition] = switchGroupId; - BoxItem.prototype = new Item(null, null, null); + curPos++; + } + } + } + }); - /** - * Check whether this item is visible inside given range - * @returns {{start: Number, end: Number}} range with a timestamp for start and end - * @returns {boolean} True if visible - */ - BoxItem.prototype.isVisible = function (range) { - // determine visibility - // TODO: account for the real width of the item. Right now we just add 1/4 to the window - var interval = (range.end - range.start) / 4; - return this.data.start > range.start - interval && this.data.start < range.end + interval; + me.body.emitter.emit('groupDragged', { groupId: id }); + } }; /** - * Repaint the item + * Handle selecting/deselecting an item when tapping it + * @param {Event} event + * @private */ - BoxItem.prototype.redraw = function () { - var dom = this.dom; - if (!dom) { - // create DOM - this.dom = {}; - dom = this.dom; - - // create main box - dom.box = document.createElement('DIV'); + ItemSet.prototype._onSelectItem = function (event) { + if (!this.options.selectable) return; - // contents box (inside the background box). used for making margins - dom.content = document.createElement('DIV'); - dom.content.className = 'vis-item-content'; - dom.box.appendChild(dom.content); + var ctrlKey = event.srcEvent && (event.srcEvent.ctrlKey || event.srcEvent.metaKey); + var shiftKey = event.srcEvent && event.srcEvent.shiftKey; + if (ctrlKey || shiftKey) { + this._onMultiSelectItem(event); + return; + } - // line to axis - dom.line = document.createElement('DIV'); - dom.line.className = 'vis-line'; + var oldSelection = this.getSelection(); - // dot on axis - dom.dot = document.createElement('DIV'); - dom.dot.className = 'vis-dot'; + var item = this.itemFromTarget(event); + var selection = item ? [item.id] : []; + this.setSelection(selection); - // attach this item as attribute - dom.box['timeline-item'] = this; + var newSelection = this.getSelection(); - this.dirty = true; + // emit a select event, + // except when old selection is empty and new selection is still empty + if (newSelection.length > 0 || oldSelection.length > 0) { + this.body.emitter.emit('select', { + items: newSelection, + event: event + }); } + }; - // append DOM to parent DOM - if (!this.parent) { - throw new Error('Cannot redraw item: no parent attached'); - } - if (!dom.box.parentNode) { - var foreground = this.parent.dom.foreground; - if (!foreground) throw new Error('Cannot redraw item: parent has no foreground container element'); - foreground.appendChild(dom.box); - } - if (!dom.line.parentNode) { - var background = this.parent.dom.background; - if (!background) throw new Error('Cannot redraw item: parent has no background container element'); - background.appendChild(dom.line); - } - if (!dom.dot.parentNode) { - var axis = this.parent.dom.axis; - if (!background) throw new Error('Cannot redraw item: parent has no axis container element'); - axis.appendChild(dom.dot); - } - this.displayed = true; + /** + * Handle creation and updates of an item on double tap + * @param event + * @private + */ + ItemSet.prototype._onAddItem = function (event) { + if (!this.options.selectable) return; + if (!this.options.editable.add) return; - // Update DOM when item is marked dirty. An item is marked dirty when: - // - the item is not yet rendered - // - the item's data is changed - // - the item is selected/deselected - if (this.dirty) { - this._updateContents(this.dom.content); - this._updateTitle(this.dom.box); - this._updateDataAttributes(this.dom.box); - this._updateStyle(this.dom.box); + var me = this; + var snap = this.options.snap || null; + var item = this.itemFromTarget(event); - var editable = (this.options.editable.updateTime || this.options.editable.updateGroup || this.editable === true) && this.editable !== false; + if (item) { + // update item - // update class - var className = (this.data.className ? ' ' + this.data.className : '') + (this.selected ? ' vis-selected' : '') + (editable ? ' vis-editable' : ' vis-readonly'); - dom.box.className = 'vis-item vis-box' + className; - dom.line.className = 'vis-item vis-line' + className; - dom.dot.className = 'vis-item vis-dot' + className; + // execute async handler to update the item (or cancel it) + var itemData = me.itemsData.get(item.id); // get a clone of the data from the dataset + this.options.onUpdate(itemData, function (itemData) { + if (itemData) { + me.itemsData.getDataSet().update(itemData); + } + }); + } else { + // add item + var xAbs = util.getAbsoluteLeft(this.dom.frame); + var x = event.center.x - xAbs; + var start = this.body.util.toTime(x); + var scale = this.body.util.getScale(); + var step = this.body.util.getStep(); - // recalculate size - this.props.dot.height = dom.dot.offsetHeight; - this.props.dot.width = dom.dot.offsetWidth; - this.props.line.width = dom.line.offsetWidth; - this.width = dom.box.offsetWidth; - this.height = dom.box.offsetHeight; + var newItemData = { + start: snap ? snap(start, scale, step) : start, + content: 'new item' + }; - this.dirty = false; - } + // when default type is a range, add a default end date to the new item + if (this.options.type === 'range') { + var end = this.body.util.toTime(x + this.props.width / 5); + newItemData.end = snap ? snap(end, scale, step) : end; + } - this._repaintDeleteButton(dom.box); - }; + newItemData[this.itemsData._fieldId] = util.randomUUID(); - /** - * Show the item in the DOM (when not already displayed). The items DOM will - * be created when needed. - */ - BoxItem.prototype.show = function () { - if (!this.displayed) { - this.redraw(); + var group = this.groupFromTarget(event); + if (group) { + newItemData.group = group.groupId; + } + + // execute async handler to customize (or cancel) adding an item + newItemData = this._cloneItemData(newItemData); // convert start and end to the correct type + this.options.onAdd(newItemData, function (item) { + if (item) { + me.itemsData.getDataSet().add(item); + // TODO: need to trigger a redraw? + } + }); } }; /** - * Hide the item from the DOM (when visible) + * Handle selecting/deselecting multiple items when holding an item + * @param {Event} event + * @private */ - BoxItem.prototype.hide = function () { - if (this.displayed) { - var dom = this.dom; + ItemSet.prototype._onMultiSelectItem = function (event) { + if (!this.options.selectable) return; - if (dom.box.parentNode) dom.box.parentNode.removeChild(dom.box); - if (dom.line.parentNode) dom.line.parentNode.removeChild(dom.line); - if (dom.dot.parentNode) dom.dot.parentNode.removeChild(dom.dot); + var item = this.itemFromTarget(event); - this.displayed = false; - } - }; + if (item) { + // multi select items (if allowed) - /** - * Reposition the item horizontally - * @Override - */ - BoxItem.prototype.repositionX = function () { - var start = this.conversion.toScreen(this.data.start); - var align = this.options.align; - var left; + var selection = this.options.multiselect ? this.getSelection() // take current selection + : []; // deselect current selection - // calculate left position of the box - if (align == 'right') { - this.left = start - this.width; - } else if (align == 'left') { - this.left = start; - } else { - // default or 'center' - this.left = start - this.width / 2; - } + var shiftKey = event.srcEvent && event.srcEvent.shiftKey || false; - // reposition box - this.dom.box.style.left = this.left + 'px'; + if (shiftKey && this.options.multiselect) { + // select all items between the old selection and the tapped item + var itemGroup = this.itemsData.get(item.id).group; - // reposition line - this.dom.line.style.left = start - this.props.line.width / 2 + 'px'; + // when filtering get the group of the last selected item + var lastSelectedGroup = undefined; + if (this.options.multiselectPerGroup) { + if (selection.length > 0) { + lastSelectedGroup = this.itemsData.get(selection[0]).group; + } + } - // reposition dot - this.dom.dot.style.left = start - this.props.dot.width / 2 + 'px'; - }; + // determine the selection range + if (!this.options.multiselectPerGroup || lastSelectedGroup == undefined || lastSelectedGroup == itemGroup) { + selection.push(item.id); + } + var range = ItemSet._getItemRange(this.itemsData.get(selection, this.itemOptions)); - /** - * Reposition the item vertically - * @Override - */ - BoxItem.prototype.repositionY = function () { - var orientation = this.options.orientation.item; - var box = this.dom.box; - var line = this.dom.line; - var dot = this.dom.dot; + if (!this.options.multiselectPerGroup || lastSelectedGroup == itemGroup) { + // select all items within the selection range + selection = []; + for (var id in this.items) { + if (this.items.hasOwnProperty(id)) { + var _item = this.items[id]; + var start = _item.data.start; + var end = _item.data.end !== undefined ? _item.data.end : start; - if (orientation == 'top') { - box.style.top = (this.top || 0) + 'px'; + if (start >= range.min && end <= range.max && (!this.options.multiselectPerGroup || lastSelectedGroup == this.itemsData.get(_item.id).group) && !(_item instanceof BackgroundItem)) { + selection.push(_item.id); // do not use id but item.id, id itself is stringified + } + } + } + } + } else { + // add/remove this item from the current selection + var index = selection.indexOf(item.id); + if (index == -1) { + // item is not yet selected -> select it + selection.push(item.id); + } else { + // item is already selected -> deselect it + selection.splice(index, 1); + } + } - line.style.top = '0'; - line.style.height = this.parent.top + this.top + 1 + 'px'; - line.style.bottom = ''; - } else { - // orientation 'bottom' - var itemSetHeight = this.parent.itemSet.props.height; // TODO: this is nasty - var lineHeight = itemSetHeight - this.parent.top - this.parent.height + this.top; + this.setSelection(selection); - box.style.top = (this.parent.height - this.top - this.height || 0) + 'px'; - line.style.top = itemSetHeight - lineHeight + 'px'; - line.style.bottom = '0'; + this.body.emitter.emit('select', { + items: this.getSelection(), + event: event + }); } - - dot.style.top = -this.props.dot.height / 2 + 'px'; }; /** - * Return the width of the item left from its start date - * @return {number} + * Calculate the time range of a list of items + * @param {Array.} itemsData + * @return {{min: Date, max: Date}} Returns the range of the provided items + * @private */ - BoxItem.prototype.getWidthLeft = function () { - return this.width / 2; - }; + ItemSet._getItemRange = function (itemsData) { + var max = null; + var min = null; - /** - * Return the width of the item right from its start date - * @return {number} - */ - BoxItem.prototype.getWidthRight = function () { - return this.width / 2; - }; + itemsData.forEach(function (data) { + if (min == null || data.start < min) { + min = data.start; + } - module.exports = BoxItem; + if (data.end != undefined) { + if (max == null || data.end > max) { + max = data.end; + } + } else { + if (max == null || data.start > max) { + max = data.start; + } + } + }); -/***/ }, -/* 36 */ -/***/ function(module, exports, __webpack_require__) { + return { + min: min, + max: max + }; + }; - 'use strict'; + /** + * Find an item from an event target: + * searches for the attribute 'timeline-item' in the event target's element tree + * @param {Event} event + * @return {Item | null} item + */ + ItemSet.prototype.itemFromTarget = function (event) { + var target = event.target; + while (target) { + if (target.hasOwnProperty('timeline-item')) { + return target['timeline-item']; + } + target = target.parentNode; + } - var Item = __webpack_require__(33); + return null; + }; /** - * @constructor PointItem - * @extends Item - * @param {Object} data Object containing parameters start - * content, className. - * @param {{toScreen: function, toTime: function}} conversion - * Conversion functions from time to screen and vice versa - * @param {Object} [options] Configuration options - * // TODO: describe available options + * Find the Group from an event target: + * searches for the attribute 'timeline-group' in the event target's element tree + * @param {Event} event + * @return {Group | null} group */ - function PointItem(data, conversion, options) { - this.props = { - dot: { - top: 0, - width: 0, - height: 0 - }, - content: { - height: 0, - marginLeft: 0 + ItemSet.prototype.groupFromTarget = function (event) { + var clientY = event.center ? event.center.y : event.clientY; + for (var i = 0; i < this.groupIds.length; i++) { + var groupId = this.groupIds[i]; + var group = this.groups[groupId]; + var foreground = group.dom.foreground; + var top = util.getAbsoluteTop(foreground); + if (clientY > top && clientY < top + foreground.offsetHeight) { + return group; } - }; - // validate data - if (data) { - if (data.start == undefined) { - throw new Error('Property "start" missing in item ' + data); + if (this.options.orientation.item === 'top') { + if (i === this.groupIds.length - 1 && clientY > top) { + return group; + } + } else { + if (i === 0 && clientY < top + foreground.offset) { + return group; + } } } - Item.call(this, data, conversion, options); - } - - PointItem.prototype = new Item(null, null, null); + return null; + }; /** - * Check whether this item is visible inside given range - * @returns {{start: Number, end: Number}} range with a timestamp for start and end - * @returns {boolean} True if visible + * Find the ItemSet from an event target: + * searches for the attribute 'timeline-itemset' in the event target's element tree + * @param {Event} event + * @return {ItemSet | null} item */ - PointItem.prototype.isVisible = function (range) { - // determine visibility - // TODO: account for the real width of the item. Right now we just add 1/4 to the window - var interval = (range.end - range.start) / 4; - return this.data.start > range.start - interval && this.data.start < range.end + interval; + ItemSet.itemSetFromTarget = function (event) { + var target = event.target; + while (target) { + if (target.hasOwnProperty('timeline-itemset')) { + return target['timeline-itemset']; + } + target = target.parentNode; + } + + return null; }; /** - * Repaint the item + * Clone the data of an item, and "normalize" it: convert the start and end date + * to the type (Date, Moment, ...) configured in the DataSet. If not configured, + * start and end are converted to Date. + * @param {Object} itemData, typically `item.data` + * @param {string} [type] Optional Date type. If not provided, the type from the DataSet is taken + * @return {Object} The cloned object + * @private */ - PointItem.prototype.redraw = function () { - var dom = this.dom; - if (!dom) { - // create DOM - this.dom = {}; - dom = this.dom; - - // background box - dom.point = document.createElement('div'); - // className is updated in redraw() - - // contents box, right from the dot - dom.content = document.createElement('div'); - dom.content.className = 'vis-item-content'; - dom.point.appendChild(dom.content); - - // dot at start - dom.dot = document.createElement('div'); - dom.point.appendChild(dom.dot); - - // attach this item as attribute - dom.point['timeline-item'] = this; + ItemSet.prototype._cloneItemData = function (itemData, type) { + var clone = util.extend({}, itemData); - this.dirty = true; + if (!type) { + // convert start and end date to the type (Date, Moment, ...) configured in the DataSet + type = this.itemsData.getDataSet()._options.type; } - // append DOM to parent DOM - if (!this.parent) { - throw new Error('Cannot redraw item: no parent attached'); + if (clone.start != undefined) { + clone.start = util.convert(clone.start, type && type.start || 'Date'); } - if (!dom.point.parentNode) { - var foreground = this.parent.dom.foreground; - if (!foreground) { - throw new Error('Cannot redraw item: parent has no foreground container element'); - } - foreground.appendChild(dom.point); + if (clone.end != undefined) { + clone.end = util.convert(clone.end, type && type.end || 'Date'); } - this.displayed = true; - // Update DOM when item is marked dirty. An item is marked dirty when: - // - the item is not yet rendered - // - the item's data is changed - // - the item is selected/deselected - if (this.dirty) { - this._updateContents(this.dom.content); - this._updateTitle(this.dom.point); - this._updateDataAttributes(this.dom.point); - this._updateStyle(this.dom.point); + return clone; + }; - var editable = (this.options.editable.updateTime || this.options.editable.updateGroup || this.editable === true) && this.editable !== false; + module.exports = ItemSet; - // update class - var className = (this.data.className ? ' ' + this.data.className : '') + (this.selected ? ' vis-selected' : '') + (editable ? ' vis-editable' : ' vis-readonly'); - dom.point.className = 'vis-item vis-point' + className; - dom.dot.className = 'vis-item vis-dot' + className; +/***/ }, +/* 32 */ +/***/ function(module, exports, __webpack_require__) { - // recalculate size of dot and contents - this.props.dot.width = dom.dot.offsetWidth; - this.props.dot.height = dom.dot.offsetHeight; - this.props.content.height = dom.content.offsetHeight; + 'use strict'; - // resize contents - dom.content.style.marginLeft = 2 * this.props.dot.width + 'px'; - //dom.content.style.marginRight = ... + 'px'; // TODO: margin right + var moment = __webpack_require__(2); + var DateUtil = __webpack_require__(29); + var util = __webpack_require__(1); - // recalculate size - this.width = dom.point.offsetWidth; - this.height = dom.point.offsetHeight; + /** + * @constructor TimeStep + * The class TimeStep is an iterator for dates. You provide a start date and an + * end date. The class itself determines the best scale (step size) based on the + * provided start Date, end Date, and minimumStep. + * + * If minimumStep is provided, the step size is chosen as close as possible + * to the minimumStep but larger than minimumStep. If minimumStep is not + * provided, the scale is set to 1 DAY. + * The minimumStep should correspond with the onscreen size of about 6 characters + * + * Alternatively, you can set a scale by hand. + * After creation, you can initialize the class by executing first(). Then you + * can iterate from the start date to the end date via next(). You can check if + * the end date is reached with the function hasNext(). After each step, you can + * retrieve the current date via getCurrent(). + * The TimeStep has scales ranging from milliseconds, seconds, minutes, hours, + * days, to years. + * + * Version: 1.2 + * + * @param {Date} [start] The start date, for example new Date(2010, 9, 21) + * or new Date(2010, 9, 21, 23, 45, 00) + * @param {Date} [end] The end date + * @param {Number} [minimumStep] Optional. Minimum step size in milliseconds + */ + function TimeStep(start, end, minimumStep, hiddenDates) { + this.moment = moment; - // reposition the dot - dom.dot.style.top = (this.height - this.props.dot.height) / 2 + 'px'; - dom.dot.style.left = this.props.dot.width / 2 + 'px'; + // variables + this.current = this.moment(); + this._start = this.moment(); + this._end = this.moment(); - this.dirty = false; + this.autoScale = true; + this.scale = 'day'; + this.step = 1; + + // initialize the range + this.setRange(start, end, minimumStep); + + // hidden Dates options + this.switchedDay = false; + this.switchedMonth = false; + this.switchedYear = false; + if (Array.isArray(hiddenDates)) { + this.hiddenDates = hiddenDates; + } else if (hiddenDates != undefined) { + this.hiddenDates = [hiddenDates]; + } else { + this.hiddenDates = []; } - this._repaintDeleteButton(dom.point); - }; + this.format = TimeStep.FORMAT; // default formatting + } - /** - * Show the item in the DOM (when not already visible). The items DOM will - * be created when needed. - */ - PointItem.prototype.show = function () { - if (!this.displayed) { - this.redraw(); + // Time formatting + TimeStep.FORMAT = { + minorLabels: { + millisecond: 'SSS', + second: 's', + minute: 'HH:mm', + hour: 'HH:mm', + weekday: 'ddd D', + day: 'D', + month: 'MMM', + year: 'YYYY' + }, + majorLabels: { + millisecond: 'HH:mm:ss', + second: 'D MMMM HH:mm', + minute: 'ddd D MMMM', + hour: 'ddd D MMMM', + weekday: 'MMMM YYYY', + day: 'MMMM YYYY', + month: 'YYYY', + year: '' } }; /** - * Hide the item from the DOM (when visible) + * Set custom constructor function for moment. Can be used to set dates + * to UTC or to set a utcOffset. + * @param {function} moment */ - PointItem.prototype.hide = function () { - if (this.displayed) { - if (this.dom.point.parentNode) { - this.dom.point.parentNode.removeChild(this.dom.point); - } + TimeStep.prototype.setMoment = function (moment) { + this.moment = moment; - this.displayed = false; - } + // update the date properties, can have a new utcOffset + this.current = this.moment(this.current); + this._start = this.moment(this._start); + this._end = this.moment(this._end); }; /** - * Reposition the item horizontally - * @Override + * Set custom formatting for the minor an major labels of the TimeStep. + * Both `minorLabels` and `majorLabels` are an Object with properties: + * 'millisecond', 'second', 'minute', 'hour', 'weekday', 'day', 'month', 'year'. + * @param {{minorLabels: Object, majorLabels: Object}} format */ - PointItem.prototype.repositionX = function () { - var start = this.conversion.toScreen(this.data.start); - - this.left = start - this.props.dot.width; - - // reposition point - this.dom.point.style.left = this.left + 'px'; + TimeStep.prototype.setFormat = function (format) { + var defaultFormat = util.deepExtend({}, TimeStep.FORMAT); + this.format = util.deepExtend(defaultFormat, format); }; /** - * Reposition the item vertically - * @Override + * Set a new range + * If minimumStep is provided, the step size is chosen as close as possible + * to the minimumStep but larger than minimumStep. If minimumStep is not + * provided, the scale is set to 1 DAY. + * The minimumStep should correspond with the onscreen size of about 6 characters + * @param {Date} [start] The start date and time. + * @param {Date} [end] The end date and time. + * @param {int} [minimumStep] Optional. Minimum step size in milliseconds */ - PointItem.prototype.repositionY = function () { - var orientation = this.options.orientation.item; - var point = this.dom.point; + TimeStep.prototype.setRange = function (start, end, minimumStep) { + if (!(start instanceof Date) || !(end instanceof Date)) { + throw "No legal start or end date in method setRange"; + } - if (orientation == 'top') { - point.style.top = this.top + 'px'; - } else { - point.style.top = this.parent.height - this.top - this.height + 'px'; + this._start = start != undefined ? this.moment(start.valueOf()) : new Date(); + this._end = end != undefined ? this.moment(end.valueOf()) : new Date(); + + if (this.autoScale) { + this.setMinimumStep(minimumStep); } }; /** - * Return the width of the item left from its start date - * @return {number} + * Set the range iterator to the start date. */ - PointItem.prototype.getWidthLeft = function () { - return this.props.dot.width; + TimeStep.prototype.start = function () { + this.current = this._start.clone(); + this.roundToMinor(); }; /** - * Return the width of the item right from its start date - * @return {number} + * Round the current date to the first minor date value + * This must be executed once when the current date is set to start Date */ - PointItem.prototype.getWidthRight = function () { - return this.width - this.props.dot.width; - }; - - module.exports = PointItem; - -/***/ }, -/* 37 */ -/***/ function(module, exports, __webpack_require__) { + TimeStep.prototype.roundToMinor = function () { + // round to floor + // IMPORTANT: we have no breaks in this switch! (this is no bug) + // noinspection FallThroughInSwitchStatementJS + switch (this.scale) { + case 'year': + this.current.year(this.step * Math.floor(this.current.year() / this.step)); + this.current.month(0); + case 'month': + this.current.date(1); + case 'day': // intentional fall through + case 'weekday': + this.current.hours(0); + case 'hour': + this.current.minutes(0); + case 'minute': + this.current.seconds(0); + case 'second': + this.current.milliseconds(0); + //case 'millisecond': // nothing to do for milliseconds + } - 'use strict'; + if (this.step != 1) { + // round down to the first minor value that is a multiple of the current step size + switch (this.scale) { + case 'millisecond': + this.current.subtract(this.current.milliseconds() % this.step, 'milliseconds');break; + case 'second': + this.current.subtract(this.current.seconds() % this.step, 'seconds');break; + case 'minute': + this.current.subtract(this.current.minutes() % this.step, 'minutes');break; + case 'hour': + this.current.subtract(this.current.hours() % this.step, 'hours');break; + case 'weekday': // intentional fall through + case 'day': + this.current.subtract((this.current.date() - 1) % this.step, 'day');break; + case 'month': + this.current.subtract(this.current.month() % this.step, 'month');break; + case 'year': + this.current.subtract(this.current.year() % this.step, 'year');break; + default: + break; + } + } + }; - var Hammer = __webpack_require__(20); - var Item = __webpack_require__(33); - var BackgroundGroup = __webpack_require__(34); - var RangeItem = __webpack_require__(32); + /** + * Check if the there is a next step + * @return {boolean} true if the current date has not passed the end date + */ + TimeStep.prototype.hasNext = function () { + return this.current.valueOf() <= this._end.valueOf(); + }; /** - * @constructor BackgroundItem - * @extends Item - * @param {Object} data Object containing parameters start, end - * content, className. - * @param {{toScreen: function, toTime: function}} conversion - * Conversion functions from time to screen and vice versa - * @param {Object} [options] Configuration options - * // TODO: describe options + * Do the next step */ - // TODO: implement support for the BackgroundItem just having a start, then being displayed as a sort of an annotation - function BackgroundItem(data, conversion, options) { - this.props = { - content: { - width: 0 - } - }; - this.overflow = false; // if contents can overflow (css styling), this flag is set to true + TimeStep.prototype.next = function () { + var prev = this.current.valueOf(); - // validate data - if (data) { - if (data.start == undefined) { - throw new Error('Property "start" missing in item ' + data.id); + // Two cases, needed to prevent issues with switching daylight savings + // (end of March and end of October) + if (this.current.month() < 6) { + switch (this.scale) { + case 'millisecond': + this.current.add(this.step, 'millisecond');break; + case 'second': + this.current.add(this.step, 'second');break; + case 'minute': + this.current.add(this.step, 'minute');break; + case 'hour': + this.current.add(this.step, 'hour'); + // in case of skipping an hour for daylight savings, adjust the hour again (else you get: 0h 5h 9h ... instead of 0h 4h 8h ...) + // TODO: is this still needed now we use the function of moment.js? + this.current.subtract(this.current.hours() % this.step, 'hour'); + break; + case 'weekday': // intentional fall through + case 'day': + this.current.add(this.step, 'day');break; + case 'month': + this.current.add(this.step, 'month');break; + case 'year': + this.current.add(this.step, 'year');break; + default: + break; } - if (data.end == undefined) { - throw new Error('Property "end" missing in item ' + data.id); + } else { + switch (this.scale) { + case 'millisecond': + this.current.add(this.step, 'millisecond');break; + case 'second': + this.current.add(this.step, 'second');break; + case 'minute': + this.current.add(this.step, 'minute');break; + case 'hour': + this.current.add(this.step, 'hour');break; + case 'weekday': // intentional fall through + case 'day': + this.current.add(this.step, 'day');break; + case 'month': + this.current.add(this.step, 'month');break; + case 'year': + this.current.add(this.step, 'year');break; + default: + break; } } - Item.call(this, data, conversion, options); - } + if (this.step != 1) { + // round down to the correct major value + switch (this.scale) { + case 'millisecond': + if (this.current.milliseconds() < this.step) this.current.milliseconds(0);break; + case 'second': + if (this.current.seconds() < this.step) this.current.seconds(0);break; + case 'minute': + if (this.current.minutes() < this.step) this.current.minutes(0);break; + case 'hour': + if (this.current.hours() < this.step) this.current.hours(0);break; + case 'weekday': // intentional fall through + case 'day': + if (this.current.date() < this.step + 1) this.current.date(1);break; + case 'month': + if (this.current.month() < this.step) this.current.month(0);break; + case 'year': + break; // nothing to do for year + default: + break; + } + } - BackgroundItem.prototype = new Item(null, null, null); + // safety mechanism: if current time is still unchanged, move to the end + if (this.current.valueOf() == prev) { + this.current = this._end.clone(); + } - BackgroundItem.prototype.baseClassName = 'vis-item vis-background'; - BackgroundItem.prototype.stack = false; + DateUtil.stepOverHiddenDates(this.moment, this, prev); + }; /** - * Check whether this item is visible inside given range - * @returns {{start: Number, end: Number}} range with a timestamp for start and end - * @returns {boolean} True if visible + * Get the current datetime + * @return {Moment} current The current date */ - BackgroundItem.prototype.isVisible = function (range) { - // determine visibility - return this.data.start < range.end && this.data.end > range.start; + TimeStep.prototype.getCurrent = function () { + return this.current; }; /** - * Repaint the item + * Set a custom scale. Autoscaling will be disabled. + * For example setScale('minute', 5) will result + * in minor steps of 5 minutes, and major steps of an hour. + * + * @param {{scale: string, step: number}} params + * An object containing two properties: + * - A string 'scale'. Choose from 'millisecond', 'second', + * 'minute', 'hour', 'weekday', 'day', 'month', 'year'. + * - A number 'step'. A step size, by default 1. + * Choose for example 1, 2, 5, or 10. */ - BackgroundItem.prototype.redraw = function () { - var dom = this.dom; - if (!dom) { - // create DOM - this.dom = {}; - dom = this.dom; + TimeStep.prototype.setScale = function (params) { + if (params && typeof params.scale == 'string') { + this.scale = params.scale; + this.step = params.step > 0 ? params.step : 1; + this.autoScale = false; + } + }; - // background box - dom.box = document.createElement('div'); - // className is updated in redraw() + /** + * Enable or disable autoscaling + * @param {boolean} enable If true, autoascaling is set true + */ + TimeStep.prototype.setAutoScale = function (enable) { + this.autoScale = enable; + }; - // frame box (to prevent the item contents from overflowing - dom.frame = document.createElement('div'); - dom.frame.className = 'vis-item-overflow'; - dom.box.appendChild(dom.frame); + /** + * Automatically determine the scale that bests fits the provided minimum step + * @param {Number} [minimumStep] The minimum step size in milliseconds + */ + TimeStep.prototype.setMinimumStep = function (minimumStep) { + if (minimumStep == undefined) { + return; + } - // contents box - dom.content = document.createElement('div'); - dom.content.className = 'vis-item-content'; - dom.frame.appendChild(dom.content); + //var b = asc + ds; - // Note: we do NOT attach this item as attribute to the DOM, - // such that background items cannot be selected - //dom.box['timeline-item'] = this; + var stepYear = 1000 * 60 * 60 * 24 * 30 * 12; + var stepMonth = 1000 * 60 * 60 * 24 * 30; + var stepDay = 1000 * 60 * 60 * 24; + var stepHour = 1000 * 60 * 60; + var stepMinute = 1000 * 60; + var stepSecond = 1000; + var stepMillisecond = 1; - this.dirty = true; + // find the smallest step that is larger than the provided minimumStep + if (stepYear * 1000 > minimumStep) { + this.scale = 'year';this.step = 1000; } - - // append DOM to parent DOM - if (!this.parent) { - throw new Error('Cannot redraw item: no parent attached'); + if (stepYear * 500 > minimumStep) { + this.scale = 'year';this.step = 500; } - if (!dom.box.parentNode) { - var background = this.parent.dom.background; - if (!background) { - throw new Error('Cannot redraw item: parent has no background container element'); - } - background.appendChild(dom.box); + if (stepYear * 100 > minimumStep) { + this.scale = 'year';this.step = 100; } - this.displayed = true; - - // Update DOM when item is marked dirty. An item is marked dirty when: - // - the item is not yet rendered - // - the item's data is changed - // - the item is selected/deselected - if (this.dirty) { - this._updateContents(this.dom.content); - this._updateTitle(this.dom.content); - this._updateDataAttributes(this.dom.content); - this._updateStyle(this.dom.box); - - // update class - var className = (this.data.className ? ' ' + this.data.className : '') + (this.selected ? ' vis-selected' : ''); - dom.box.className = this.baseClassName + className; + if (stepYear * 50 > minimumStep) { + this.scale = 'year';this.step = 50; + } + if (stepYear * 10 > minimumStep) { + this.scale = 'year';this.step = 10; + } + if (stepYear * 5 > minimumStep) { + this.scale = 'year';this.step = 5; + } + if (stepYear > minimumStep) { + this.scale = 'year';this.step = 1; + } + if (stepMonth * 3 > minimumStep) { + this.scale = 'month';this.step = 3; + } + if (stepMonth > minimumStep) { + this.scale = 'month';this.step = 1; + } + if (stepDay * 5 > minimumStep) { + this.scale = 'day';this.step = 5; + } + if (stepDay * 2 > minimumStep) { + this.scale = 'day';this.step = 2; + } + if (stepDay > minimumStep) { + this.scale = 'day';this.step = 1; + } + if (stepDay / 2 > minimumStep) { + this.scale = 'weekday';this.step = 1; + } + if (stepHour * 4 > minimumStep) { + this.scale = 'hour';this.step = 4; + } + if (stepHour > minimumStep) { + this.scale = 'hour';this.step = 1; + } + if (stepMinute * 15 > minimumStep) { + this.scale = 'minute';this.step = 15; + } + if (stepMinute * 10 > minimumStep) { + this.scale = 'minute';this.step = 10; + } + if (stepMinute * 5 > minimumStep) { + this.scale = 'minute';this.step = 5; + } + if (stepMinute > minimumStep) { + this.scale = 'minute';this.step = 1; + } + if (stepSecond * 15 > minimumStep) { + this.scale = 'second';this.step = 15; + } + if (stepSecond * 10 > minimumStep) { + this.scale = 'second';this.step = 10; + } + if (stepSecond * 5 > minimumStep) { + this.scale = 'second';this.step = 5; + } + if (stepSecond > minimumStep) { + this.scale = 'second';this.step = 1; + } + if (stepMillisecond * 200 > minimumStep) { + this.scale = 'millisecond';this.step = 200; + } + if (stepMillisecond * 100 > minimumStep) { + this.scale = 'millisecond';this.step = 100; + } + if (stepMillisecond * 50 > minimumStep) { + this.scale = 'millisecond';this.step = 50; + } + if (stepMillisecond * 10 > minimumStep) { + this.scale = 'millisecond';this.step = 10; + } + if (stepMillisecond * 5 > minimumStep) { + this.scale = 'millisecond';this.step = 5; + } + if (stepMillisecond > minimumStep) { + this.scale = 'millisecond';this.step = 1; + } + }; - // determine from css whether this box has overflow - this.overflow = window.getComputedStyle(dom.content).overflow !== 'hidden'; + /** + * Snap a date to a rounded value. + * The snap intervals are dependent on the current scale and step. + * Static function + * @param {Date} date the date to be snapped. + * @param {string} scale Current scale, can be 'millisecond', 'second', + * 'minute', 'hour', 'weekday, 'day', 'month', 'year'. + * @param {number} step Current step (1, 2, 4, 5, ... + * @return {Date} snappedDate + */ + TimeStep.snap = function (date, scale, step) { + var clone = moment(date); - // recalculate size - this.props.content.width = this.dom.content.offsetWidth; - this.height = 0; // set height zero, so this item will be ignored when stacking items + if (scale == 'year') { + var year = clone.year() + Math.round(clone.month() / 12); + clone.year(Math.round(year / step) * step); + clone.month(0); + clone.date(0); + clone.hours(0); + clone.minutes(0); + clone.seconds(0); + clone.milliseconds(0); + } else if (scale == 'month') { + if (clone.date() > 15) { + clone.date(1); + clone.add(1, 'month'); + // important: first set Date to 1, after that change the month. + } else { + clone.date(1); + } - this.dirty = false; + clone.hours(0); + clone.minutes(0); + clone.seconds(0); + clone.milliseconds(0); + } else if (scale == 'day') { + //noinspection FallthroughInSwitchStatementJS + switch (step) { + case 5: + case 2: + clone.hours(Math.round(clone.hours() / 24) * 24);break; + default: + clone.hours(Math.round(clone.hours() / 12) * 12);break; + } + clone.minutes(0); + clone.seconds(0); + clone.milliseconds(0); + } else if (scale == 'weekday') { + //noinspection FallthroughInSwitchStatementJS + switch (step) { + case 5: + case 2: + clone.hours(Math.round(clone.hours() / 12) * 12);break; + default: + clone.hours(Math.round(clone.hours() / 6) * 6);break; + } + clone.minutes(0); + clone.seconds(0); + clone.milliseconds(0); + } else if (scale == 'hour') { + switch (step) { + case 4: + clone.minutes(Math.round(clone.minutes() / 60) * 60);break; + default: + clone.minutes(Math.round(clone.minutes() / 30) * 30);break; + } + clone.seconds(0); + clone.milliseconds(0); + } else if (scale == 'minute') { + //noinspection FallthroughInSwitchStatementJS + switch (step) { + case 15: + case 10: + clone.minutes(Math.round(clone.minutes() / 5) * 5); + clone.seconds(0); + break; + case 5: + clone.seconds(Math.round(clone.seconds() / 60) * 60);break; + default: + clone.seconds(Math.round(clone.seconds() / 30) * 30);break; + } + clone.milliseconds(0); + } else if (scale == 'second') { + //noinspection FallthroughInSwitchStatementJS + switch (step) { + case 15: + case 10: + clone.seconds(Math.round(clone.seconds() / 5) * 5); + clone.milliseconds(0); + break; + case 5: + clone.milliseconds(Math.round(clone.milliseconds() / 1000) * 1000);break; + default: + clone.milliseconds(Math.round(clone.milliseconds() / 500) * 500);break; + } + } else if (scale == 'millisecond') { + var _step = step > 5 ? step / 2 : 1; + clone.milliseconds(Math.round(clone.milliseconds() / _step) * _step); } + + return clone; }; /** - * Show the item in the DOM (when not already visible). The items DOM will - * be created when needed. + * Check if the current value is a major value (for example when the step + * is DAY, a major value is each first day of the MONTH) + * @return {boolean} true if current date is major, else false. */ - BackgroundItem.prototype.show = RangeItem.prototype.show; + TimeStep.prototype.isMajor = function () { + if (this.switchedYear == true) { + this.switchedYear = false; + switch (this.scale) { + case 'year': + case 'month': + case 'weekday': + case 'day': + case 'hour': + case 'minute': + case 'second': + case 'millisecond': + return true; + default: + return false; + } + } else if (this.switchedMonth == true) { + this.switchedMonth = false; + switch (this.scale) { + case 'weekday': + case 'day': + case 'hour': + case 'minute': + case 'second': + case 'millisecond': + return true; + default: + return false; + } + } else if (this.switchedDay == true) { + this.switchedDay = false; + switch (this.scale) { + case 'millisecond': + case 'second': + case 'minute': + case 'hour': + return true; + default: + return false; + } + } - /** - * Hide the item from the DOM (when visible) - * @return {Boolean} changed - */ - BackgroundItem.prototype.hide = RangeItem.prototype.hide; + var date = this.moment(this.current); + switch (this.scale) { + case 'millisecond': + return date.milliseconds() == 0; + case 'second': + return date.seconds() == 0; + case 'minute': + return date.hours() == 0 && date.minutes() == 0; + case 'hour': + return date.hours() == 0; + case 'weekday': // intentional fall through + case 'day': + return date.date() == 1; + case 'month': + return date.month() == 0; + case 'year': + return false; + default: + return false; + } + }; /** - * Reposition the item horizontally - * @Override + * Returns formatted text for the minor axislabel, depending on the current + * date and the scale. For example when scale is MINUTE, the current time is + * formatted as "hh:mm". + * @param {Date} [date] custom date. if not provided, current date is taken */ - BackgroundItem.prototype.repositionX = RangeItem.prototype.repositionX; + TimeStep.prototype.getLabelMinor = function (date) { + if (date == undefined) { + date = this.current; + } + + var format = this.format.minorLabels[this.scale]; + return format && format.length > 0 ? this.moment(date).format(format) : ''; + }; /** - * Reposition the item vertically - * @Override + * Returns formatted text for the major axis label, depending on the current + * date and the scale. For example when scale is MINUTE, the major scale is + * hours, and the hour will be formatted as "hh". + * @param {Date} [date] custom date. if not provided, current date is taken */ - BackgroundItem.prototype.repositionY = function (margin) { - var onTop = this.options.orientation.item === 'top'; - this.dom.content.style.top = onTop ? '' : '0'; - this.dom.content.style.bottom = onTop ? '0' : ''; - var height; + TimeStep.prototype.getLabelMajor = function (date) { + if (date == undefined) { + date = this.current; + } - // special positioning for subgroups - if (this.data.subgroup !== undefined) { - // TODO: instead of calculating the top position of the subgroups here for every BackgroundItem, calculate the top of the subgroup once in Itemset + var format = this.format.majorLabels[this.scale]; + return format && format.length > 0 ? this.moment(date).format(format) : ''; + }; - var itemSubgroup = this.data.subgroup; - var subgroups = this.parent.subgroups; - var subgroupIndex = subgroups[itemSubgroup].index; - // if the orientation is top, we need to take the difference in height into account. - if (onTop == true) { - // the first subgroup will have to account for the distance from the top to the first item. - height = this.parent.subgroups[itemSubgroup].height + margin.item.vertical; - height += subgroupIndex == 0 ? margin.axis - 0.5 * margin.item.vertical : 0; - var newTop = this.parent.top; - for (var subgroup in subgroups) { - if (subgroups.hasOwnProperty(subgroup)) { - if (subgroups[subgroup].visible == true && subgroups[subgroup].index < subgroupIndex) { - newTop += subgroups[subgroup].height + margin.item.vertical; - } - } - } + TimeStep.prototype.getClassName = function () { + var _moment = this.moment; + var m = this.moment(this.current); + var current = m.locale ? m.locale('en') : m.lang('en'); // old versions of moment have .lang() function + var step = this.step; - // the others will have to be offset downwards with this same distance. - newTop += subgroupIndex != 0 ? margin.axis - 0.5 * margin.item.vertical : 0; - this.dom.box.style.top = newTop + 'px'; - this.dom.box.style.bottom = ''; + function even(value) { + return value / step % 2 == 0 ? ' vis-even' : ' vis-odd'; + } + + function today(date) { + if (date.isSame(new Date(), 'day')) { + return ' vis-today'; } - // and when the orientation is bottom: - else { - var newTop = this.parent.top; - var totalHeight = 0; - for (var subgroup in subgroups) { - if (subgroups.hasOwnProperty(subgroup)) { - if (subgroups[subgroup].visible == true) { - var newHeight = subgroups[subgroup].height + margin.item.vertical; - totalHeight += newHeight; - if (subgroups[subgroup].index > subgroupIndex) { - newTop += newHeight; - } - } - } - } - height = this.parent.subgroups[itemSubgroup].height + margin.item.vertical; - this.dom.box.style.top = this.parent.height - totalHeight + newTop + 'px'; - this.dom.box.style.bottom = ''; - } + if (date.isSame(_moment().add(1, 'day'), 'day')) { + return ' vis-tomorrow'; + } + if (date.isSame(_moment().add(-1, 'day'), 'day')) { + return ' vis-yesterday'; + } + return ''; } - // and in the case of no subgroups: - else { - // we want backgrounds with groups to only show in groups. - if (this.parent instanceof BackgroundGroup) { - // if the item is not in a group: - height = Math.max(this.parent.height, this.parent.itemSet.body.domProps.center.height, this.parent.itemSet.body.domProps.centerContainer.height); - this.dom.box.style.top = onTop ? '0' : ''; - this.dom.box.style.bottom = onTop ? '' : '0'; - } else { - height = this.parent.height; - // same alignment for items when orientation is top or bottom - this.dom.box.style.top = this.parent.top + 'px'; - this.dom.box.style.bottom = ''; + + function currentWeek(date) { + return date.isSame(new Date(), 'week') ? ' vis-current-week' : ''; + } + + function currentMonth(date) { + return date.isSame(new Date(), 'month') ? ' vis-current-month' : ''; + } + + function currentYear(date) { + return date.isSame(new Date(), 'year') ? ' vis-current-year' : ''; + } + + switch (this.scale) { + case 'millisecond': + return even(current.milliseconds()).trim(); + + case 'second': + return even(current.seconds()).trim(); + + case 'minute': + return even(current.minutes()).trim(); + + case 'hour': + var hours = current.hours(); + if (this.step == 4) { + hours = hours + '-h' + (hours + 4); } - } - this.dom.box.style.height = height + 'px'; + return 'vis-h' + hours + today(current) + even(current.hours()); + + case 'weekday': + return 'vis-' + current.format('dddd').toLowerCase() + today(current) + currentWeek(current) + even(current.date()); + + case 'day': + var day = current.date(); + var month = current.format('MMMM').toLowerCase(); + return 'vis-day' + day + ' vis-' + month + currentMonth(current) + even(day - 1); + + case 'month': + return 'vis-' + current.format('MMMM').toLowerCase() + currentMonth(current) + even(current.month()); + + case 'year': + var year = current.year(); + return 'vis-year' + year + currentYear(current) + even(year); + + default: + return ''; + } }; - module.exports = BackgroundItem; + module.exports = TimeStep; /***/ }, -/* 38 */ +/* 33 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var util = __webpack_require__(1); - var Component = __webpack_require__(25); - var TimeStep = __webpack_require__(29); - var DateUtil = __webpack_require__(26); - var moment = __webpack_require__(2); + var stack = __webpack_require__(34); + var RangeItem = __webpack_require__(35); /** - * A horizontal time axis - * @param {{dom: Object, domProps: Object, emitter: Emitter, range: Range}} body - * @param {Object} [options] See TimeAxis.setOptions for the available - * options. - * @constructor TimeAxis - * @extends Component + * @constructor Group + * @param {Number | String} groupId + * @param {Object} data + * @param {ItemSet} itemSet */ - function TimeAxis(body, options) { - this.dom = { - foreground: null, - lines: [], - majorTexts: [], - minorTexts: [], - redundant: { - lines: [], - majorTexts: [], - minorTexts: [] - } - }; + function Group(groupId, data, itemSet) { + this.groupId = groupId; + this.subgroups = {}; + this.subgroupIndex = 0; + this.subgroupOrderer = data && data.subgroupOrder; + this.itemSet = itemSet; + + this.dom = {}; this.props = { - range: { - start: 0, - end: 0, - minimumStep: 0 - }, - lineTop: 0 + label: { + width: 0, + height: 0 + } }; + this.className = null; - this.defaultOptions = { - orientation: { - axis: 'bottom' - }, // axis orientation: 'top' or 'bottom' - showMinorLabels: true, - showMajorLabels: true, - maxMinorChars: 7, - format: TimeStep.FORMAT, - moment: moment, - timeAxis: null + this.items = {}; // items filtered by groupId of this group + this.visibleItems = []; // items currently visible in window + this.orderedItems = { + byStart: [], + byEnd: [] }; - this.options = util.extend({}, this.defaultOptions); - - this.body = body; + this.checkRangedItems = false; // needed to refresh the ranged items if the window is programatically changed with NO overlap. + var me = this; + this.itemSet.body.emitter.on("checkRangedItems", function () { + me.checkRangedItems = true; + }); - // create the HTML DOM this._create(); - this.setOptions(options); + this.setData(data); } - TimeAxis.prototype = new Component(); - /** - * Set options for the TimeAxis. - * Parameters will be merged in current options. - * @param {Object} options Available options: - * {string} [orientation.axis] - * {boolean} [showMinorLabels] - * {boolean} [showMajorLabels] + * Create DOM elements for the group + * @private */ - TimeAxis.prototype.setOptions = function (options) { - if (options) { - // copy all options that we know - util.selectiveExtend(['showMinorLabels', 'showMajorLabels', 'maxMinorChars', 'hiddenDates', 'timeAxis', 'moment'], this.options, options); - - // deep copy the format options - util.selectiveDeepExtend(['format'], this.options, options); + Group.prototype._create = function () { + var label = document.createElement('div'); + if (this.itemSet.options.groupEditable.order) { + label.className = 'vis-label draggable'; + } else { + label.className = 'vis-label'; + } + this.dom.label = label; - if ('orientation' in options) { - if (typeof options.orientation === 'string') { - this.options.orientation.axis = options.orientation; - } else if (typeof options.orientation === 'object' && 'axis' in options.orientation) { - this.options.orientation.axis = options.orientation.axis; - } - } + var inner = document.createElement('div'); + inner.className = 'vis-inner'; + label.appendChild(inner); + this.dom.inner = inner; - // apply locale to moment.js - // TODO: not so nice, this is applied globally to moment.js - if ('locale' in options) { - if (typeof moment.locale === 'function') { - // moment.js 2.8.1+ - moment.locale(options.locale); - } else { - moment.lang(options.locale); - } - } - } - }; + var foreground = document.createElement('div'); + foreground.className = 'vis-group'; + foreground['timeline-group'] = this; + this.dom.foreground = foreground; - /** - * Create the HTML DOM for the TimeAxis - */ - TimeAxis.prototype._create = function () { - this.dom.foreground = document.createElement('div'); this.dom.background = document.createElement('div'); + this.dom.background.className = 'vis-group'; - this.dom.foreground.className = 'vis-time-axis vis-foreground'; - this.dom.background.className = 'vis-time-axis vis-background'; + this.dom.axis = document.createElement('div'); + this.dom.axis.className = 'vis-group'; + + // create a hidden marker to detect when the Timelines container is attached + // to the DOM, or the style of a parent of the Timeline is changed from + // display:none is changed to visible. + this.dom.marker = document.createElement('div'); + this.dom.marker.style.visibility = 'hidden'; + this.dom.marker.innerHTML = '?'; + this.dom.background.appendChild(this.dom.marker); }; /** - * Destroy the TimeAxis + * Set the group data for this group + * @param {Object} data Group data, can contain properties content and className */ - TimeAxis.prototype.destroy = function () { - // remove from DOM - if (this.dom.foreground.parentNode) { - this.dom.foreground.parentNode.removeChild(this.dom.foreground); + Group.prototype.setData = function (data) { + // update contents + var content; + if (this.itemSet.options && this.itemSet.options.groupTemplate) { + content = this.itemSet.options.groupTemplate(data); + } else { + content = data && data.content; } - if (this.dom.background.parentNode) { - this.dom.background.parentNode.removeChild(this.dom.background); + + if (content instanceof Element) { + this.dom.inner.appendChild(content); + while (this.dom.inner.firstChild) { + this.dom.inner.removeChild(this.dom.inner.firstChild); + } + this.dom.inner.appendChild(content); + } else if (content !== undefined && content !== null) { + this.dom.inner.innerHTML = content; + } else { + this.dom.inner.innerHTML = this.groupId || ''; // groupId can be null } - this.body = null; + // update title + this.dom.label.title = data && data.title || ''; + + if (!this.dom.inner.firstChild) { + util.addClassName(this.dom.inner, 'vis-hidden'); + } else { + util.removeClassName(this.dom.inner, 'vis-hidden'); + } + + // update className + var className = data && data.className || null; + if (className != this.className) { + if (this.className) { + util.removeClassName(this.dom.label, this.className); + util.removeClassName(this.dom.foreground, this.className); + util.removeClassName(this.dom.background, this.className); + util.removeClassName(this.dom.axis, this.className); + } + util.addClassName(this.dom.label, className); + util.addClassName(this.dom.foreground, className); + util.addClassName(this.dom.background, className); + util.addClassName(this.dom.axis, className); + this.className = className; + } + + // update style + if (this.style) { + util.removeCssText(this.dom.label, this.style); + this.style = null; + } + if (data && data.style) { + util.addCssText(this.dom.label, data.style); + this.style = data.style; + } }; /** - * Repaint the component - * @return {boolean} Returns true if the component is resized + * Get the width of the group label + * @return {number} width */ - TimeAxis.prototype.redraw = function () { - var props = this.props; - var foreground = this.dom.foreground; - var background = this.dom.background; + Group.prototype.getLabelWidth = function () { + return this.props.label.width; + }; - // determine the correct parent DOM element (depending on option orientation) - var parent = this.options.orientation.axis == 'top' ? this.body.dom.top : this.body.dom.bottom; - var parentChanged = foreground.parentNode !== parent; + /** + * Repaint this group + * @param {{start: number, end: number}} range + * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin + * @param {boolean} [restack=false] Force restacking of all items + * @return {boolean} Returns true if the group is resized + */ + Group.prototype.redraw = function (range, margin, restack) { + var resized = false; - // calculate character width and height - this._calculateCharSize(); + // force recalculation of the height of the items when the marker height changed + // (due to the Timeline being attached to the DOM or changed from display:none to visible) + var markerHeight = this.dom.marker.clientHeight; + if (markerHeight != this.lastMarkerHeight) { + this.lastMarkerHeight = markerHeight; - // TODO: recalculate sizes only needed when parent is resized or options is changed - var showMinorLabels = this.options.showMinorLabels && this.options.orientation.axis !== 'none'; - var showMajorLabels = this.options.showMajorLabels && this.options.orientation.axis !== 'none'; + util.forEach(this.items, function (item) { + item.dirty = true; + if (item.displayed) item.redraw(); + }); - // determine the width and height of the elemens for the axis - props.minorLabelHeight = showMinorLabels ? props.minorCharHeight : 0; - props.majorLabelHeight = showMajorLabels ? props.majorCharHeight : 0; - props.height = props.minorLabelHeight + props.majorLabelHeight; - props.width = foreground.offsetWidth; + restack = true; + } - props.minorLineHeight = this.body.domProps.root.height - props.majorLabelHeight - (this.options.orientation.axis == 'top' ? this.body.domProps.bottom.height : this.body.domProps.top.height); - props.minorLineWidth = 1; // TODO: really calculate width - props.majorLineHeight = props.minorLineHeight + props.majorLabelHeight; - props.majorLineWidth = 1; // TODO: really calculate width + // recalculate the height of the subgroups + this._calculateSubGroupHeights(); - // take foreground and background offline while updating (is almost twice as fast) - var foregroundNextSibling = foreground.nextSibling; - var backgroundNextSibling = background.nextSibling; - foreground.parentNode && foreground.parentNode.removeChild(foreground); - background.parentNode && background.parentNode.removeChild(background); + // reposition visible items vertically + if (typeof this.itemSet.options.order === 'function') { + // a custom order function - foreground.style.height = this.props.height + 'px'; + if (restack) { + // brute force restack of all items - this._repaintLabels(); + // show all items + var me = this; + var limitSize = false; + util.forEach(this.items, function (item) { + if (!item.displayed) { + item.redraw(); + me.visibleItems.push(item); + } + item.repositionX(limitSize); + }); - // put DOM online again (at the same place) - if (foregroundNextSibling) { - parent.insertBefore(foreground, foregroundNextSibling); + // order all items and force a restacking + var customOrderedItems = this.orderedItems.byStart.slice().sort(function (a, b) { + return me.itemSet.options.order(a.data, b.data); + }); + stack.stack(customOrderedItems, margin, true /* restack=true */); + } + + this.visibleItems = this._updateVisibleItems(this.orderedItems, this.visibleItems, range); } else { - parent.appendChild(foreground); + // no custom order function, lazy stacking + this.visibleItems = this._updateVisibleItems(this.orderedItems, this.visibleItems, range); + + if (this.itemSet.options.stack) { + // TODO: ugly way to access options... + stack.stack(this.visibleItems, margin, restack); + } else { + // no stacking + stack.nostack(this.visibleItems, margin, this.subgroups); + } } - if (backgroundNextSibling) { - this.body.dom.backgroundVertical.insertBefore(background, backgroundNextSibling); - } else { - this.body.dom.backgroundVertical.appendChild(background); + + // recalculate the height of the group + var height = this._calculateHeight(margin); + + // calculate actual size and position + var foreground = this.dom.foreground; + this.top = foreground.offsetTop; + this.left = foreground.offsetLeft; + this.width = foreground.offsetWidth; + resized = util.updateProperty(this, 'height', height) || resized; + + // recalculate size of label + resized = util.updateProperty(this.props.label, 'width', this.dom.inner.clientWidth) || resized; + resized = util.updateProperty(this.props.label, 'height', this.dom.inner.clientHeight) || resized; + + // apply new height + this.dom.background.style.height = height + 'px'; + this.dom.foreground.style.height = height + 'px'; + this.dom.label.style.height = height + 'px'; + + // update vertical position of items after they are re-stacked and the height of the group is calculated + for (var i = 0, ii = this.visibleItems.length; i < ii; i++) { + var item = this.visibleItems[i]; + item.repositionY(margin); } - return this._isResized() || parentChanged; + return resized; }; /** - * Repaint major and minor text labels and vertical grid lines + * recalculate the height of the subgroups * @private */ - TimeAxis.prototype._repaintLabels = function () { - var orientation = this.options.orientation.axis; + Group.prototype._calculateSubGroupHeights = function () { + if (Object.keys(this.subgroups).length > 0) { + var me = this; - // calculate range and step (step such that we have space for 7 characters per label) - var start = util.convert(this.body.range.start, 'Number'); - var end = util.convert(this.body.range.end, 'Number'); - var timeLabelsize = this.body.util.toTime((this.props.minorCharWidth || 10) * this.options.maxMinorChars).valueOf(); - var minimumStep = timeLabelsize - DateUtil.getHiddenDurationBefore(this.options.moment, this.body.hiddenDates, this.body.range, timeLabelsize); - minimumStep -= this.body.util.toTime(0).valueOf(); + this.resetSubgroups(); - var step = new TimeStep(new Date(start), new Date(end), minimumStep, this.body.hiddenDates); - step.setMoment(this.options.moment); - if (this.options.format) { - step.setFormat(this.options.format); + util.forEach(this.visibleItems, function (item) { + if (item.data.subgroup !== undefined) { + me.subgroups[item.data.subgroup].height = Math.max(me.subgroups[item.data.subgroup].height, item.height); + me.subgroups[item.data.subgroup].visible = true; + } + }); } - if (this.options.timeAxis) { - step.setScale(this.options.timeAxis); + }; + + /** + * recalculate the height of the group + * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin + * @returns {number} Returns the height + * @private + */ + Group.prototype._calculateHeight = function (margin) { + // recalculate the height of the group + var height; + var visibleItems = this.visibleItems; + if (visibleItems.length > 0) { + var min = visibleItems[0].top; + var max = visibleItems[0].top + visibleItems[0].height; + util.forEach(visibleItems, function (item) { + min = Math.min(min, item.top); + max = Math.max(max, item.top + item.height); + }); + if (min > margin.axis) { + // there is an empty gap between the lowest item and the axis + var offset = min - margin.axis; + max -= offset; + util.forEach(visibleItems, function (item) { + item.top -= offset; + }); + } + height = max + margin.item.vertical / 2; + } else { + height = 0; } - this.step = step; + height = Math.max(height, this.props.label.height); - // Move all DOM elements to a "redundant" list, where they - // can be picked for re-use, and clear the lists with lines and texts. - // At the end of the function _repaintLabels, left over elements will be cleaned up - var dom = this.dom; - dom.redundant.lines = dom.lines; - dom.redundant.majorTexts = dom.majorTexts; - dom.redundant.minorTexts = dom.minorTexts; - dom.lines = []; - dom.majorTexts = []; - dom.minorTexts = []; + return height; + }; - var current; - var next; - var x; - var xNext; - var isMajor, nextIsMajor; - var width = 0, - prevWidth; - var line; - var labelMinor; - var xFirstMajorLabel = undefined; - var count = 0; - var MAX = 1000; - var className; + /** + * Show this group: attach to the DOM + */ + Group.prototype.show = function () { + if (!this.dom.label.parentNode) { + this.itemSet.dom.labelSet.appendChild(this.dom.label); + } - step.start(); - next = step.getCurrent(); - xNext = this.body.util.toScreen(next); - while (step.hasNext() && count < MAX) { - count++; + if (!this.dom.foreground.parentNode) { + this.itemSet.dom.foreground.appendChild(this.dom.foreground); + } - isMajor = step.isMajor(); - className = step.getClassName(); - labelMinor = step.getLabelMinor(); + if (!this.dom.background.parentNode) { + this.itemSet.dom.background.appendChild(this.dom.background); + } - current = next; - x = xNext; + if (!this.dom.axis.parentNode) { + this.itemSet.dom.axis.appendChild(this.dom.axis); + } + }; - step.next(); - next = step.getCurrent(); - nextIsMajor = step.isMajor(); - xNext = this.body.util.toScreen(next); + /** + * Hide this group: remove from the DOM + */ + Group.prototype.hide = function () { + var label = this.dom.label; + if (label.parentNode) { + label.parentNode.removeChild(label); + } - prevWidth = width; - width = xNext - x; - var showMinorGrid = width >= prevWidth * 0.4; // prevent displaying of the 31th of the month on a scale of 5 days + var foreground = this.dom.foreground; + if (foreground.parentNode) { + foreground.parentNode.removeChild(foreground); + } - if (this.options.showMinorLabels && showMinorGrid) { - var label = this._repaintMinorText(x, labelMinor, orientation, className); - label.style.width = width + 'px'; // set width to prevent overflow - } + var background = this.dom.background; + if (background.parentNode) { + background.parentNode.removeChild(background); + } - if (isMajor && this.options.showMajorLabels) { - if (x > 0) { - if (xFirstMajorLabel == undefined) { - xFirstMajorLabel = x; - } - label = this._repaintMajorText(x, step.getLabelMajor(), orientation, className); - } - line = this._repaintMajorLine(x, width, orientation, className); - } else { - // minor line - if (showMinorGrid) { - line = this._repaintMinorLine(x, width, orientation, className); - } else { - if (line) { - // adjust the width of the previous grid - line.style.width = parseInt(line.style.width) + width + 'px'; - } - } + var axis = this.dom.axis; + if (axis.parentNode) { + axis.parentNode.removeChild(axis); + } + }; + + /** + * Add an item to the group + * @param {Item} item + */ + Group.prototype.add = function (item) { + this.items[item.id] = item; + item.setParent(this); + + // add to + if (item.data.subgroup !== undefined) { + if (this.subgroups[item.data.subgroup] === undefined) { + this.subgroups[item.data.subgroup] = { height: 0, visible: false, index: this.subgroupIndex, items: [] }; + this.subgroupIndex++; } + this.subgroups[item.data.subgroup].items.push(item); } + this.orderSubgroups(); - if (count === MAX && !warnedForOverflow) { - console.warn('Something is wrong with the Timeline scale. Limited drawing of grid lines to ' + MAX + ' lines.'); - warnedForOverflow = true; + if (this.visibleItems.indexOf(item) == -1) { + var range = this.itemSet.body.range; // TODO: not nice accessing the range like this + this._checkIfVisible(item, this.visibleItems, range); } + }; - // create a major label on the left when needed - if (this.options.showMajorLabels) { - var leftTime = this.body.util.toTime(0), - leftText = step.getLabelMajor(leftTime), - widthText = leftText.length * (this.props.majorCharWidth || 10) + 10; // upper bound estimation + Group.prototype.orderSubgroups = function () { + if (this.subgroupOrderer !== undefined) { + var sortArray = []; + if (typeof this.subgroupOrderer == 'string') { + for (var subgroup in this.subgroups) { + sortArray.push({ subgroup: subgroup, sortField: this.subgroups[subgroup].items[0].data[this.subgroupOrderer] }); + } + sortArray.sort(function (a, b) { + return a.sortField - b.sortField; + }); + } else if (typeof this.subgroupOrderer == 'function') { + for (var subgroup in this.subgroups) { + sortArray.push(this.subgroups[subgroup].items[0].data); + } + sortArray.sort(this.subgroupOrderer); + } - if (xFirstMajorLabel == undefined || widthText < xFirstMajorLabel) { - this._repaintMajorText(0, leftText, orientation, className); + if (sortArray.length > 0) { + for (var i = 0; i < sortArray.length; i++) { + this.subgroups[sortArray[i].subgroup].index = i; + } } } + }; - // Cleanup leftover DOM elements from the redundant list - util.forEach(this.dom.redundant, function (arr) { - while (arr.length) { - var elem = arr.pop(); - if (elem && elem.parentNode) { - elem.parentNode.removeChild(elem); - } + Group.prototype.resetSubgroups = function () { + for (var subgroup in this.subgroups) { + if (this.subgroups.hasOwnProperty(subgroup)) { + this.subgroups[subgroup].visible = false; } - }); + } }; /** - * Create a minor label for the axis at position x - * @param {Number} x - * @param {String} text - * @param {String} orientation "top" or "bottom" (default) - * @param {String} className - * @return {Element} Returns the HTML element of the created label - * @private + * Remove an item from the group + * @param {Item} item */ - TimeAxis.prototype._repaintMinorText = function (x, text, orientation, className) { - // reuse redundant label - var label = this.dom.redundant.minorTexts.shift(); - - if (!label) { - // create new label - var content = document.createTextNode(''); - label = document.createElement('div'); - label.appendChild(content); - this.dom.foreground.appendChild(label); - } - this.dom.minorTexts.push(label); + Group.prototype.remove = function (item) { + delete this.items[item.id]; + item.setParent(null); - label.childNodes[0].nodeValue = text; + // remove from visible items + var index = this.visibleItems.indexOf(item); + if (index != -1) this.visibleItems.splice(index, 1); - label.style.top = orientation == 'top' ? this.props.majorLabelHeight + 'px' : '0'; - label.style.left = x + 'px'; - label.className = 'vis-text vis-minor ' + className; - //label.title = title; // TODO: this is a heavy operation + if (item.data.subgroup !== undefined) { + var subgroup = this.subgroups[item.data.subgroup]; + if (subgroup) { + var itemIndex = subgroup.items.indexOf(item); + subgroup.items.splice(itemIndex, 1); + if (!subgroup.items.length) { + delete this.subgroups[item.data.subgroup]; + this.subgroupIndex--; + } + this.orderSubgroups(); + } + } + }; - return label; + /** + * Remove an item from the corresponding DataSet + * @param {Item} item + */ + Group.prototype.removeFromDataSet = function (item) { + this.itemSet.removeItem(item.id); }; /** - * Create a Major label for the axis at position x - * @param {Number} x - * @param {String} text - * @param {String} orientation "top" or "bottom" (default) - * @param {String} className - * @return {Element} Returns the HTML element of the created label - * @private + * Reorder the items */ - TimeAxis.prototype._repaintMajorText = function (x, text, orientation, className) { - // reuse redundant label - var label = this.dom.redundant.majorTexts.shift(); + Group.prototype.order = function () { + var array = util.toArray(this.items); + var startArray = []; + var endArray = []; - if (!label) { - // create label - var content = document.createTextNode(text); - label = document.createElement('div'); - label.appendChild(content); - this.dom.foreground.appendChild(label); + for (var i = 0; i < array.length; i++) { + if (array[i].data.end !== undefined) { + endArray.push(array[i]); + } + startArray.push(array[i]); } - this.dom.majorTexts.push(label); - - label.childNodes[0].nodeValue = text; - label.className = 'vis-text vis-major ' + className; - //label.title = title; // TODO: this is a heavy operation - - label.style.top = orientation == 'top' ? '0' : this.props.minorLabelHeight + 'px'; - label.style.left = x + 'px'; + this.orderedItems = { + byStart: startArray, + byEnd: endArray + }; - return label; + stack.orderByStart(this.orderedItems.byStart); + stack.orderByEnd(this.orderedItems.byEnd); }; /** - * Create a minor line for the axis at position x - * @param {Number} x - * @param {Number} width - * @param {String} orientation "top" or "bottom" (default) - * @param {String} className - * @return {Element} Returns the created line + * Update the visible items + * @param {{byStart: Item[], byEnd: Item[]}} orderedItems All items ordered by start date and by end date + * @param {Item[]} visibleItems The previously visible items. + * @param {{start: number, end: number}} range Visible range + * @return {Item[]} visibleItems The new visible items. * @private */ - TimeAxis.prototype._repaintMinorLine = function (x, width, orientation, className) { - // reuse redundant line - var line = this.dom.redundant.lines.shift(); - if (!line) { - // create vertical line - line = document.createElement('div'); - this.dom.background.appendChild(line); + Group.prototype._updateVisibleItems = function (orderedItems, oldVisibleItems, range) { + var visibleItems = []; + var visibleItemsLookup = {}; // we keep this to quickly look up if an item already exists in the list without using indexOf on visibleItems + var interval = (range.end - range.start) / 4; + var lowerBound = range.start - interval; + var upperBound = range.end + interval; + var item, i; + + // this function is used to do the binary search. + var searchFunction = function searchFunction(value) { + if (value < lowerBound) { + return -1; + } else if (value <= upperBound) { + return 0; + } else { + return 1; + } + }; + + // first check if the items that were in view previously are still in view. + // IMPORTANT: this handles the case for the items with startdate before the window and enddate after the window! + // also cleans up invisible items. + if (oldVisibleItems.length > 0) { + for (i = 0; i < oldVisibleItems.length; i++) { + this._checkIfVisibleWithReference(oldVisibleItems[i], visibleItems, visibleItemsLookup, range); + } } - this.dom.lines.push(line); - var props = this.props; - if (orientation == 'top') { - line.style.top = props.majorLabelHeight + 'px'; + // we do a binary search for the items that have only start values. + var initialPosByStart = util.binarySearchCustom(orderedItems.byStart, searchFunction, 'data', 'start'); + + // trace the visible items from the inital start pos both ways until an invisible item is found, we only look at the start values. + this._traceVisible(initialPosByStart, orderedItems.byStart, visibleItems, visibleItemsLookup, function (item) { + return item.data.start < lowerBound || item.data.start > upperBound; + }); + + // if the window has changed programmatically without overlapping the old window, the ranged items with start < lowerBound and end > upperbound are not shown. + // We therefore have to brute force check all items in the byEnd list + if (this.checkRangedItems == true) { + this.checkRangedItems = false; + for (i = 0; i < orderedItems.byEnd.length; i++) { + this._checkIfVisibleWithReference(orderedItems.byEnd[i], visibleItems, visibleItemsLookup, range); + } } else { - line.style.top = this.body.domProps.top.height + 'px'; + // we do a binary search for the items that have defined end times. + var initialPosByEnd = util.binarySearchCustom(orderedItems.byEnd, searchFunction, 'data', 'end'); + + // trace the visible items from the inital start pos both ways until an invisible item is found, we only look at the end values. + this._traceVisible(initialPosByEnd, orderedItems.byEnd, visibleItems, visibleItemsLookup, function (item) { + return item.data.end < lowerBound || item.data.end > upperBound; + }); } - line.style.height = props.minorLineHeight + 'px'; - line.style.left = x - props.minorLineWidth / 2 + 'px'; - line.style.width = width + 'px'; - line.className = 'vis-grid vis-vertical vis-minor ' + className; + // finally, we reposition all the visible items. + for (i = 0; i < visibleItems.length; i++) { + item = visibleItems[i]; + if (!item.displayed) item.show(); + // reposition item horizontally + item.repositionX(); + } - return line; + // debug + //console.log("new line") + //if (this.groupId == null) { + // for (i = 0; i < orderedItems.byStart.length; i++) { + // item = orderedItems.byStart[i].data; + // console.log('start',i,initialPosByStart, item.start.valueOf(), item.content, item.start >= lowerBound && item.start <= upperBound,i == initialPosByStart ? "<------------------- HEREEEE" : "") + // } + // for (i = 0; i < orderedItems.byEnd.length; i++) { + // item = orderedItems.byEnd[i].data; + // console.log('rangeEnd',i,initialPosByEnd, item.end.valueOf(), item.content, item.end >= range.start && item.end <= range.end,i == initialPosByEnd ? "<------------------- HEREEEE" : "") + // } + //} + + return visibleItems; + }; + + Group.prototype._traceVisible = function (initialPos, items, visibleItems, visibleItemsLookup, breakCondition) { + var item; + var i; + + if (initialPos != -1) { + for (i = initialPos; i >= 0; i--) { + item = items[i]; + if (breakCondition(item)) { + break; + } else { + if (visibleItemsLookup[item.id] === undefined) { + visibleItemsLookup[item.id] = true; + visibleItems.push(item); + } + } + } + + for (i = initialPos + 1; i < items.length; i++) { + item = items[i]; + if (breakCondition(item)) { + break; + } else { + if (visibleItemsLookup[item.id] === undefined) { + visibleItemsLookup[item.id] = true; + visibleItems.push(item); + } + } + } + } }; /** - * Create a Major line for the axis at position x - * @param {Number} x - * @param {Number} width - * @param {String} orientation "top" or "bottom" (default) - * @param {String} className - * @return {Element} Returns the created line + * this function is very similar to the _checkIfInvisible() but it does not + * return booleans, hides the item if it should not be seen and always adds to + * the visibleItems. + * this one is for brute forcing and hiding. + * + * @param {Item} item + * @param {Array} visibleItems + * @param {{start:number, end:number}} range * @private */ - TimeAxis.prototype._repaintMajorLine = function (x, width, orientation, className) { - // reuse redundant line - var line = this.dom.redundant.lines.shift(); - if (!line) { - // create vertical line - line = document.createElement('div'); - this.dom.background.appendChild(line); - } - this.dom.lines.push(line); - - var props = this.props; - if (orientation == 'top') { - line.style.top = '0'; + Group.prototype._checkIfVisible = function (item, visibleItems, range) { + if (item.isVisible(range)) { + if (!item.displayed) item.show(); + // reposition item horizontally + item.repositionX(); + visibleItems.push(item); } else { - line.style.top = this.body.domProps.top.height + 'px'; + if (item.displayed) item.hide(); } - line.style.left = x - props.majorLineWidth / 2 + 'px'; - line.style.height = props.majorLineHeight + 'px'; - line.style.width = width + 'px'; - - line.className = 'vis-grid vis-vertical vis-major ' + className; - - return line; }; /** - * Determine the size of text on the axis (both major and minor axis). - * The size is calculated only once and then cached in this.props. + * this function is very similar to the _checkIfInvisible() but it does not + * return booleans, hides the item if it should not be seen and always adds to + * the visibleItems. + * this one is for brute forcing and hiding. + * + * @param {Item} item + * @param {Array} visibleItems + * @param {{start:number, end:number}} range * @private */ - TimeAxis.prototype._calculateCharSize = function () { - // Note: We calculate char size with every redraw. Size may change, for - // example when any of the timelines parents had display:none for example. - - // determine the char width and height on the minor axis - if (!this.dom.measureCharMinor) { - this.dom.measureCharMinor = document.createElement('DIV'); - this.dom.measureCharMinor.className = 'vis-text vis-minor vis-measure'; - this.dom.measureCharMinor.style.position = 'absolute'; - - this.dom.measureCharMinor.appendChild(document.createTextNode('0')); - this.dom.foreground.appendChild(this.dom.measureCharMinor); - } - this.props.minorCharHeight = this.dom.measureCharMinor.clientHeight; - this.props.minorCharWidth = this.dom.measureCharMinor.clientWidth; - - // determine the char width and height on the major axis - if (!this.dom.measureCharMajor) { - this.dom.measureCharMajor = document.createElement('DIV'); - this.dom.measureCharMajor.className = 'vis-text vis-major vis-measure'; - this.dom.measureCharMajor.style.position = 'absolute'; - - this.dom.measureCharMajor.appendChild(document.createTextNode('0')); - this.dom.foreground.appendChild(this.dom.measureCharMajor); + Group.prototype._checkIfVisibleWithReference = function (item, visibleItems, visibleItemsLookup, range) { + if (item.isVisible(range)) { + if (visibleItemsLookup[item.id] === undefined) { + visibleItemsLookup[item.id] = true; + visibleItems.push(item); + } + } else { + if (item.displayed) item.hide(); } - this.props.majorCharHeight = this.dom.measureCharMajor.clientHeight; - this.props.majorCharWidth = this.dom.measureCharMajor.clientWidth; }; - var warnedForOverflow = false; - - module.exports = TimeAxis; + module.exports = Group; /***/ }, -/* 39 */ -/***/ function(module, exports, __webpack_require__) { +/* 34 */ +/***/ function(module, exports) { 'use strict'; - var keycharm = __webpack_require__(40); - var Emitter = __webpack_require__(12); - var Hammer = __webpack_require__(20); - var util = __webpack_require__(1); + // Utility functions for ordering and stacking of items + var EPSILON = 0.001; // used when checking collisions, to prevent round-off errors /** - * Turn an element into an clickToUse element. - * When not active, the element has a transparent overlay. When the overlay is - * clicked, the mode is changed to active. - * When active, the element is displayed with a blue border around it, and - * the interactive contents of the element can be used. When clicked outside - * the element, the elements mode is changed to inactive. - * @param {Element} container - * @constructor + * Order items by their start data + * @param {Item[]} items */ - function Activator(container) { - this.active = false; + exports.orderByStart = function (items) { + items.sort(function (a, b) { + return a.data.start - b.data.start; + }); + }; - this.dom = { - container: container - }; + /** + * Order items by their end date. If they have no end date, their start date + * is used. + * @param {Item[]} items + */ + exports.orderByEnd = function (items) { + items.sort(function (a, b) { + var aTime = 'end' in a.data ? a.data.end : a.data.start, + bTime = 'end' in b.data ? b.data.end : b.data.start; - this.dom.overlay = document.createElement('div'); - this.dom.overlay.className = 'vis-overlay'; + return aTime - bTime; + }); + }; - this.dom.container.appendChild(this.dom.overlay); + /** + * Adjust vertical positions of the items such that they don't overlap each + * other. + * @param {Item[]} items + * All visible items + * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin + * Margins between items and between items and the axis. + * @param {boolean} [force=false] + * If true, all items will be repositioned. If false (default), only + * items having a top===null will be re-stacked + */ + exports.stack = function (items, margin, force) { + var i, iMax; - this.hammer = Hammer(this.dom.overlay); - this.hammer.on('tap', this._onTapOverlay.bind(this)); + if (force) { + // reset top position of all items + for (i = 0, iMax = items.length; i < iMax; i++) { + items[i].top = null; + } + } - // block all touch events (except tap) - var me = this; - var events = ['tap', 'doubletap', 'press', 'pinch', 'pan', 'panstart', 'panmove', 'panend']; - events.forEach(function (event) { - me.hammer.on(event, function (event) { - event.stopPropagation(); - }); - }); + // calculate new, non-overlapping positions + for (i = 0, iMax = items.length; i < iMax; i++) { + var item = items[i]; + if (item.stack && item.top === null) { + // initialize top position + item.top = margin.axis; - // attach a click event to the window, in order to deactivate when clicking outside the timeline - if (document && document.body) { - this.onClick = function (event) { - if (!_hasParent(event.target, container)) { - me.deactivate(); - } - }; - document.body.addEventListener('click', this.onClick); - } + do { + // TODO: optimize checking for overlap. when there is a gap without items, + // you only need to check for items from the next item on, not from zero + var collidingItem = null; + for (var j = 0, jj = items.length; j < jj; j++) { + var other = items[j]; + if (other.top !== null && other !== item && other.stack && exports.collision(item, other, margin.item)) { + collidingItem = other; + break; + } + } - if (this.keycharm !== undefined) { - this.keycharm.destroy(); + if (collidingItem != null) { + // There is a collision. Reposition the items above the colliding element + item.top = collidingItem.top + collidingItem.height + margin.item.vertical; + } + } while (collidingItem); + } } - this.keycharm = keycharm(); - - // keycharm listener only bounded when active) - this.escListener = this.deactivate.bind(this); - } - - // turn into an event emitter - Emitter(Activator.prototype); - - // The currently active activator - Activator.current = null; + }; /** - * Destroy the activator. Cleans up all created DOM and event listeners + * Adjust vertical positions of the items without stacking them + * @param {Item[]} items + * All visible items + * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin + * Margins between items and between items and the axis. */ - Activator.prototype.destroy = function () { - this.deactivate(); - - // remove dom - this.dom.overlay.parentNode.removeChild(this.dom.overlay); + exports.nostack = function (items, margin, subgroups) { + var i, iMax, newTop; - // remove global event listener - if (this.onClick) { - document.body.removeEventListener('click', this.onClick); + // reset top position of all items + for (i = 0, iMax = items.length; i < iMax; i++) { + if (items[i].data.subgroup !== undefined) { + newTop = margin.axis; + for (var subgroup in subgroups) { + if (subgroups.hasOwnProperty(subgroup)) { + if (subgroups[subgroup].visible == true && subgroups[subgroup].index < subgroups[items[i].data.subgroup].index) { + newTop += subgroups[subgroup].height + margin.item.vertical; + } + } + } + items[i].top = newTop; + } else { + items[i].top = margin.axis; + } } - - // cleanup hammer instances - this.hammer.destroy(); - this.hammer = null; - // FIXME: cleaning up hammer instances doesn't work (Timeline not removed from memory) }; /** - * Activate the element - * Overlay is hidden, element is decorated with a blue shadow border + * Test if the two provided items collide + * The items must have parameters left, width, top, and height. + * @param {Item} a The first item + * @param {Item} b The second item + * @param {{horizontal: number, vertical: number}} margin + * An object containing a horizontal and vertical + * minimum required margin. + * @return {boolean} true if a and b collide, else false */ - Activator.prototype.activate = function () { - // we allow only one active activator at a time - if (Activator.current) { - Activator.current.deactivate(); - } - Activator.current = this; - - this.active = true; - this.dom.overlay.style.display = 'none'; - util.addClassName(this.dom.container, 'vis-active'); - - this.emit('change'); - this.emit('activate'); - - // ugly hack: bind ESC after emitting the events, as the Network rebinds all - // keyboard events on a 'change' event - this.keycharm.bind('esc', this.escListener); + exports.collision = function (a, b, margin) { + return a.left - margin.horizontal + EPSILON < b.left + b.width && a.left + a.width + margin.horizontal - EPSILON > b.left && a.top - margin.vertical + EPSILON < b.top + b.height && a.top + a.height + margin.vertical - EPSILON > b.top; }; - /** - * Deactivate the element - * Overlay is displayed on top of the element - */ - Activator.prototype.deactivate = function () { - this.active = false; - this.dom.overlay.style.display = ''; - util.removeClassName(this.dom.container, 'vis-active'); - this.keycharm.unbind('esc', this.escListener); +/***/ }, +/* 35 */ +/***/ function(module, exports, __webpack_require__) { - this.emit('change'); - this.emit('deactivate'); - }; + 'use strict'; - /** - * Handle a tap event: activate the container - * @param event - * @private - */ - Activator.prototype._onTapOverlay = function (event) { - // activate the container - this.activate(); - event.stopPropagation(); - }; + var Hammer = __webpack_require__(22); + var Item = __webpack_require__(36); /** - * Test whether the element has the requested parent element somewhere in - * its chain of parent nodes. - * @param {HTMLElement} element - * @param {HTMLElement} parent - * @returns {boolean} Returns true when the parent is found somewhere in the - * chain of parent nodes. - * @private + * @constructor RangeItem + * @extends Item + * @param {Object} data Object containing parameters start, end + * content, className. + * @param {{toScreen: function, toTime: function}} conversion + * Conversion functions from time to screen and vice versa + * @param {Object} [options] Configuration options + * // TODO: describe options */ - function _hasParent(element, parent) { - while (element) { - if (element === parent) { - return true; + function RangeItem(data, conversion, options) { + this.props = { + content: { + width: 0 + } + }; + this.overflow = false; // if contents can overflow (css styling), this flag is set to true + + // validate data + if (data) { + if (data.start == undefined) { + throw new Error('Property "start" missing in item ' + data.id); + } + if (data.end == undefined) { + throw new Error('Property "end" missing in item ' + data.id); } - element = element.parentNode; } - return false; + + Item.call(this, data, conversion, options); } - module.exports = Activator; + RangeItem.prototype = new Item(null, null, null); -/***/ }, -/* 40 */ -/***/ function(module, exports, __webpack_require__) { + RangeItem.prototype.baseClassName = 'vis-item vis-range'; - var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;"use strict"; /** - * Created by Alex on 11/6/2014. + * Check whether this item is visible inside given range + * @returns {{start: Number, end: Number}} range with a timestamp for start and end + * @returns {boolean} True if visible */ + RangeItem.prototype.isVisible = function (range) { + // determine visibility + return this.data.start < range.end && this.data.end > range.start; + }; - // https://github.com/umdjs/umd/blob/master/returnExports.js#L40-L60 - // if the module has no dependencies, the above pattern can be simplified to - (function (root, factory) { - if (true) { - // AMD. Register as an anonymous module. - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else if (typeof exports === 'object') { - // Node. Does not work with strict CommonJS, but - // only CommonJS-like environments that support module.exports, - // like Node. - module.exports = factory(); - } else { - // Browser globals (root is window) - root.keycharm = factory(); - } - }(this, function () { - - function keycharm(options) { - var preventDefault = options && options.preventDefault || false; - - var container = options && options.container || window; + /** + * Repaint the item + */ + RangeItem.prototype.redraw = function () { + var dom = this.dom; + if (!dom) { + // create DOM + this.dom = {}; + dom = this.dom; - var _exportFunctions = {}; - var _bound = {keydown:{}, keyup:{}}; - var _keys = {}; - var i; + // background box + dom.box = document.createElement('div'); + // className is updated in redraw() - // a - z - for (i = 97; i <= 122; i++) {_keys[String.fromCharCode(i)] = {code:65 + (i - 97), shift: false};} - // A - Z - for (i = 65; i <= 90; i++) {_keys[String.fromCharCode(i)] = {code:i, shift: true};} - // 0 - 9 - for (i = 0; i <= 9; i++) {_keys['' + i] = {code:48 + i, shift: false};} - // F1 - F12 - for (i = 1; i <= 12; i++) {_keys['F' + i] = {code:111 + i, shift: false};} - // num0 - num9 - for (i = 0; i <= 9; i++) {_keys['num' + i] = {code:96 + i, shift: false};} + // frame box (to prevent the item contents from overflowing + dom.frame = document.createElement('div'); + dom.frame.className = 'vis-item-overflow'; + dom.box.appendChild(dom.frame); - // numpad misc - _keys['num*'] = {code:106, shift: false}; - _keys['num+'] = {code:107, shift: false}; - _keys['num-'] = {code:109, shift: false}; - _keys['num/'] = {code:111, shift: false}; - _keys['num.'] = {code:110, shift: false}; - // arrows - _keys['left'] = {code:37, shift: false}; - _keys['up'] = {code:38, shift: false}; - _keys['right'] = {code:39, shift: false}; - _keys['down'] = {code:40, shift: false}; - // extra keys - _keys['space'] = {code:32, shift: false}; - _keys['enter'] = {code:13, shift: false}; - _keys['shift'] = {code:16, shift: undefined}; - _keys['esc'] = {code:27, shift: false}; - _keys['backspace'] = {code:8, shift: false}; - _keys['tab'] = {code:9, shift: false}; - _keys['ctrl'] = {code:17, shift: false}; - _keys['alt'] = {code:18, shift: false}; - _keys['delete'] = {code:46, shift: false}; - _keys['pageup'] = {code:33, shift: false}; - _keys['pagedown'] = {code:34, shift: false}; - // symbols - _keys['='] = {code:187, shift: false}; - _keys['-'] = {code:189, shift: false}; - _keys[']'] = {code:221, shift: false}; - _keys['['] = {code:219, shift: false}; + // contents box + dom.content = document.createElement('div'); + dom.content.className = 'vis-item-content'; + dom.frame.appendChild(dom.content); + // attach this item as attribute + dom.box['timeline-item'] = this; + this.dirty = true; + } - var down = function(event) {handleEvent(event,'keydown');}; - var up = function(event) {handleEvent(event,'keyup');}; + // append DOM to parent DOM + if (!this.parent) { + throw new Error('Cannot redraw item: no parent attached'); + } + if (!dom.box.parentNode) { + var foreground = this.parent.dom.foreground; + if (!foreground) { + throw new Error('Cannot redraw item: parent has no foreground container element'); + } + foreground.appendChild(dom.box); + } + this.displayed = true; - // handle the actualy bound key with the event - var handleEvent = function(event,type) { - if (_bound[type][event.keyCode] !== undefined) { - var bound = _bound[type][event.keyCode]; - for (var i = 0; i < bound.length; i++) { - if (bound[i].shift === undefined) { - bound[i].fn(event); - } - else if (bound[i].shift == true && event.shiftKey == true) { - bound[i].fn(event); - } - else if (bound[i].shift == false && event.shiftKey == false) { - bound[i].fn(event); - } - } + // Update DOM when item is marked dirty. An item is marked dirty when: + // - the item is not yet rendered + // - the item's data is changed + // - the item is selected/deselected + if (this.dirty) { + this._updateContents(this.dom.content); + this._updateTitle(this.dom.box); + this._updateDataAttributes(this.dom.box); + this._updateStyle(this.dom.box); - if (preventDefault == true) { - event.preventDefault(); - } - } - }; + var editable = (this.options.editable.updateTime || this.options.editable.updateGroup || this.editable === true) && this.editable !== false; - // bind a key to a callback - _exportFunctions.bind = function(key, callback, type) { - if (type === undefined) { - type = 'keydown'; - } - if (_keys[key] === undefined) { - throw new Error("unsupported key: " + key); - } - if (_bound[type][_keys[key].code] === undefined) { - _bound[type][_keys[key].code] = []; - } - _bound[type][_keys[key].code].push({fn:callback, shift:_keys[key].shift}); - }; + // update class + var className = (this.data.className ? ' ' + this.data.className : '') + (this.selected ? ' vis-selected' : '') + (editable ? ' vis-editable' : ' vis-readonly'); + dom.box.className = this.baseClassName + className; + // determine from css whether this box has overflow + this.overflow = window.getComputedStyle(dom.frame).overflow !== 'hidden'; - // bind all keys to a call back (demo purposes) - _exportFunctions.bindAll = function(callback, type) { - if (type === undefined) { - type = 'keydown'; - } - for (var key in _keys) { - if (_keys.hasOwnProperty(key)) { - _exportFunctions.bind(key,callback,type); - } - } - }; + // recalculate size + // turn off max-width to be able to calculate the real width + // this causes an extra browser repaint/reflow, but so be it + this.dom.content.style.maxWidth = 'none'; + this.props.content.width = this.dom.content.offsetWidth; + this.height = this.dom.box.offsetHeight; + this.dom.content.style.maxWidth = ''; - // get the key label from an event - _exportFunctions.getKey = function(event) { - for (var key in _keys) { - if (_keys.hasOwnProperty(key)) { - if (event.shiftKey == true && _keys[key].shift == true && event.keyCode == _keys[key].code) { - return key; - } - else if (event.shiftKey == false && _keys[key].shift == false && event.keyCode == _keys[key].code) { - return key; - } - else if (event.keyCode == _keys[key].code && key == 'shift') { - return key; - } - } - } - return "unknown key, currently not supported"; - }; + this.dirty = false; + } - // unbind either a specific callback from a key or all of them (by leaving callback undefined) - _exportFunctions.unbind = function(key, callback, type) { - if (type === undefined) { - type = 'keydown'; - } - if (_keys[key] === undefined) { - throw new Error("unsupported key: " + key); - } - if (callback !== undefined) { - var newBindings = []; - var bound = _bound[type][_keys[key].code]; - if (bound !== undefined) { - for (var i = 0; i < bound.length; i++) { - if (!(bound[i].fn == callback && bound[i].shift == _keys[key].shift)) { - newBindings.push(_bound[type][_keys[key].code][i]); - } - } - } - _bound[type][_keys[key].code] = newBindings; - } - else { - _bound[type][_keys[key].code] = []; - } - }; + this._repaintDeleteButton(dom.box); + this._repaintDragLeft(); + this._repaintDragRight(); + }; - // reset all bound variables. - _exportFunctions.reset = function() { - _bound = {keydown:{}, keyup:{}}; - }; + /** + * Show the item in the DOM (when not already visible). The items DOM will + * be created when needed. + */ + RangeItem.prototype.show = function () { + if (!this.displayed) { + this.redraw(); + } + }; - // unbind all listeners and reset all variables. - _exportFunctions.destroy = function() { - _bound = {keydown:{}, keyup:{}}; - container.removeEventListener('keydown', down, true); - container.removeEventListener('keyup', up, true); - }; + /** + * Hide the item from the DOM (when visible) + * @return {Boolean} changed + */ + RangeItem.prototype.hide = function () { + if (this.displayed) { + var box = this.dom.box; - // create listeners. - container.addEventListener('keydown',down,true); - container.addEventListener('keyup',up,true); + if (box.parentNode) { + box.parentNode.removeChild(box); + } - // return the public functions. - return _exportFunctions; + this.displayed = false; } + }; - return keycharm; - })); + /** + * Reposition the item horizontally + * @param {boolean} [limitSize=true] If true (default), the width of the range + * item will be limited, as the browser cannot + * display very wide divs. This means though + * that the applied left and width may + * not correspond to the ranges start and end + * @Override + */ + RangeItem.prototype.repositionX = function (limitSize) { + var parentWidth = this.parent.width; + var start = this.conversion.toScreen(this.data.start); + var end = this.conversion.toScreen(this.data.end); + var contentLeft; + var contentWidth; + // limit the width of the range, as browsers cannot draw very wide divs + if (limitSize === undefined || limitSize === true) { + if (start < -parentWidth) { + start = -parentWidth; + } + if (end > 2 * parentWidth) { + end = 2 * parentWidth; + } + } + var boxWidth = Math.max(end - start, 1); + if (this.overflow) { + this.left = start; + this.width = boxWidth + this.props.content.width; + contentWidth = this.props.content.width; + // Note: The calculation of width is an optimistic calculation, giving + // a width which will not change when moving the Timeline + // So no re-stacking needed, which is nicer for the eye; + } else { + this.left = start; + this.width = boxWidth; + contentWidth = Math.min(end - start, this.props.content.width); + } -/***/ }, -/* 41 */ -/***/ function(module, exports, __webpack_require__) { + this.dom.box.style.left = this.left + 'px'; + this.dom.box.style.width = boxWidth + 'px'; - 'use strict'; + switch (this.options.align) { + case 'left': + this.dom.content.style.left = '0'; + break; - var Hammer = __webpack_require__(20); - var util = __webpack_require__(1); - var Component = __webpack_require__(25); - var moment = __webpack_require__(2); - var locales = __webpack_require__(42); + case 'right': + this.dom.content.style.left = Math.max(boxWidth - contentWidth, 0) + 'px'; + break; - /** - * A custom time bar - * @param {{range: Range, dom: Object}} body - * @param {Object} [options] Available parameters: - * {number | string} id - * {string} locales - * {string} locale - * @constructor CustomTime - * @extends Component - */ + case 'center': + this.dom.content.style.left = Math.max((boxWidth - contentWidth) / 2, 0) + 'px'; + break; - function CustomTime(body, options) { - this.body = body; + default: + // 'auto' + // when range exceeds left of the window, position the contents at the left of the visible area + if (this.overflow) { + if (end > 0) { + contentLeft = Math.max(-start, 0); + } else { + contentLeft = -contentWidth; // ensure it's not visible anymore + } + } else { + if (start < 0) { + contentLeft = -start; + } else { + contentLeft = 0; + } + } + this.dom.content.style.left = contentLeft + 'px'; + } + }; - // default options - this.defaultOptions = { - moment: moment, - locales: locales, - locale: 'en', - id: undefined, - title: undefined - }; - this.options = util.extend({}, this.defaultOptions); + /** + * Reposition the item vertically + * @Override + */ + RangeItem.prototype.repositionY = function () { + var orientation = this.options.orientation.item; + var box = this.dom.box; - if (options && options.time) { - this.customTime = options.time; + if (orientation == 'top') { + box.style.top = this.top + 'px'; } else { - this.customTime = new Date(); + box.style.top = this.parent.height - this.top - this.height + 'px'; } + }; - this.eventParams = {}; // stores state parameters while dragging the bar - - this.setOptions(options); - - // create the DOM - this._create(); - } + /** + * Repaint a drag area on the left side of the range when the range is selected + * @protected + */ + RangeItem.prototype._repaintDragLeft = function () { + if (this.selected && this.options.editable.updateTime && !this.dom.dragLeft) { + // create and show drag area + var dragLeft = document.createElement('div'); + dragLeft.className = 'vis-drag-left'; + dragLeft.dragLeftItem = this; - CustomTime.prototype = new Component(); + this.dom.box.appendChild(dragLeft); + this.dom.dragLeft = dragLeft; + } else if (!this.selected && this.dom.dragLeft) { + // delete drag area + if (this.dom.dragLeft.parentNode) { + this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft); + } + this.dom.dragLeft = null; + } + }; /** - * Set options for the component. Options will be merged in current options. - * @param {Object} options Available parameters: - * {number | string} id - * {string} locales - * {string} locale + * Repaint a drag area on the right side of the range when the range is selected + * @protected */ - CustomTime.prototype.setOptions = function (options) { - if (options) { - // copy all options that we know - util.selectiveExtend(['moment', 'locale', 'locales', 'id'], this.options, options); + RangeItem.prototype._repaintDragRight = function () { + if (this.selected && this.options.editable.updateTime && !this.dom.dragRight) { + // create and show drag area + var dragRight = document.createElement('div'); + dragRight.className = 'vis-drag-right'; + dragRight.dragRightItem = this; + + this.dom.box.appendChild(dragRight); + this.dom.dragRight = dragRight; + } else if (!this.selected && this.dom.dragRight) { + // delete drag area + if (this.dom.dragRight.parentNode) { + this.dom.dragRight.parentNode.removeChild(this.dom.dragRight); + } + this.dom.dragRight = null; } }; + module.exports = RangeItem; + +/***/ }, +/* 36 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var Hammer = __webpack_require__(22); + var util = __webpack_require__(1); + /** - * Create the DOM for the custom time - * @private + * @constructor Item + * @param {Object} data Object containing (optional) parameters type, + * start, end, content, group, className. + * @param {{toScreen: function, toTime: function}} conversion + * Conversion functions from time to screen and vice versa + * @param {Object} options Configuration options + * // TODO: describe available options */ - CustomTime.prototype._create = function () { - var bar = document.createElement('div'); - bar['custom-time'] = this; - bar.className = 'vis-custom-time ' + (this.options.id || ''); - bar.style.position = 'absolute'; - bar.style.top = '0px'; - bar.style.height = '100%'; - this.bar = bar; + function Item(data, conversion, options) { + this.id = null; + this.parent = null; + this.data = data; + this.dom = null; + this.conversion = conversion || {}; + this.options = options || {}; - var drag = document.createElement('div'); - drag.style.position = 'relative'; - drag.style.top = '0px'; - drag.style.left = '-10px'; - drag.style.height = '100%'; - drag.style.width = '20px'; - bar.appendChild(drag); + this.selected = false; + this.displayed = false; + this.dirty = true; - // attach event listeners - this.hammer = new Hammer(drag); - this.hammer.on('panstart', this._onDragStart.bind(this)); - this.hammer.on('panmove', this._onDrag.bind(this)); - this.hammer.on('panend', this._onDragEnd.bind(this)); - this.hammer.get('pan').set({ threshold: 5, direction: 30 }); // 30 is ALL_DIRECTIONS in hammer. - }; + this.top = null; + this.left = null; + this.width = null; + this.height = null; + + this.editable = null; + if (this.data && this.data.hasOwnProperty('editable') && typeof this.data.editable === 'boolean') { + this.editable = data.editable; + } + } + + Item.prototype.stack = true; /** - * Destroy the CustomTime bar + * Select current item */ - CustomTime.prototype.destroy = function () { - this.hide(); - - this.hammer.destroy(); - this.hammer = null; + Item.prototype.select = function () { + this.selected = true; + this.dirty = true; + if (this.displayed) this.redraw(); + }; - this.body = null; + /** + * Unselect current item + */ + Item.prototype.unselect = function () { + this.selected = false; + this.dirty = true; + if (this.displayed) this.redraw(); }; /** - * Repaint the component - * @return {boolean} Returns true if the component is resized + * Set data for the item. Existing data will be updated. The id should not + * be changed. When the item is displayed, it will be redrawn immediately. + * @param {Object} data */ - CustomTime.prototype.redraw = function () { - var parent = this.body.dom.backgroundVertical; - if (this.bar.parentNode != parent) { - // attach to the dom - if (this.bar.parentNode) { - this.bar.parentNode.removeChild(this.bar); - } - parent.appendChild(this.bar); + Item.prototype.setData = function (data) { + var groupChanged = data.group != undefined && this.data.group != data.group; + if (groupChanged) { + this.parent.itemSet._moveToGroup(this, data.group); } - var x = this.body.util.toScreen(this.customTime); - - var locale = this.options.locales[this.options.locale]; - if (!locale) { - if (!this.warned) { - console.log('WARNING: options.locales[\'' + this.options.locale + '\'] not found. See http://visjs.org/docs/timeline.html#Localization'); - this.warned = true; - } - locale = this.options.locales['en']; // fall back on english when not available + if (data.hasOwnProperty('editable') && typeof data.editable === 'boolean') { + this.editable = data.editable; } - var title = this.options.title; - // To hide the title completely use empty string ''. - if (title === undefined) { - title = locale.time + ': ' + this.options.moment(this.customTime).format('dddd, MMMM Do YYYY, H:mm:ss'); - title = title.charAt(0).toUpperCase() + title.substring(1); - } + this.data = data; + this.dirty = true; + if (this.displayed) this.redraw(); + }; - this.bar.style.left = x + 'px'; - this.bar.title = title; + /** + * Set a parent for the item + * @param {ItemSet | Group} parent + */ + Item.prototype.setParent = function (parent) { + if (this.displayed) { + this.hide(); + this.parent = parent; + if (this.parent) { + this.show(); + } + } else { + this.parent = parent; + } + }; + /** + * Check whether this item is visible inside given range + * @returns {{start: Number, end: Number}} range with a timestamp for start and end + * @returns {boolean} True if visible + */ + Item.prototype.isVisible = function (range) { + // Should be implemented by Item implementations return false; }; /** - * Remove the CustomTime from the DOM + * Show the Item in the DOM (when not already visible) + * @return {Boolean} changed */ - CustomTime.prototype.hide = function () { - // remove the line from the DOM - if (this.bar.parentNode) { - this.bar.parentNode.removeChild(this.bar); - } + Item.prototype.show = function () { + return false; }; /** - * Set custom time. - * @param {Date | number | string} time + * Hide the Item from the DOM (when visible) + * @return {Boolean} changed */ - CustomTime.prototype.setCustomTime = function (time) { - this.customTime = util.convert(time, 'Date'); - this.redraw(); + Item.prototype.hide = function () { + return false; }; /** - * Retrieve the current custom time. - * @return {Date} customTime + * Repaint the item */ - CustomTime.prototype.getCustomTime = function () { - return new Date(this.customTime.valueOf()); + Item.prototype.redraw = function () { + // should be implemented by the item }; /** - * Set custom title. - * @param {Date | number | string} title - */ - CustomTime.prototype.setCustomTitle = function (title) { - this.options.title = title; + * Reposition the Item horizontally + */ + Item.prototype.repositionX = function () { + // should be implemented by the item }; /** - * Start moving horizontally - * @param {Event} event - * @private + * Reposition the Item vertically */ - CustomTime.prototype._onDragStart = function (event) { - this.eventParams.dragging = true; - this.eventParams.customTime = this.customTime; - - event.stopPropagation(); + Item.prototype.repositionY = function () { + // should be implemented by the item }; /** - * Perform moving operating. - * @param {Event} event - * @private + * Repaint a delete button on the top right of the item when the item is selected + * @param {HTMLElement} anchor + * @protected */ - CustomTime.prototype._onDrag = function (event) { - if (!this.eventParams.dragging) return; + Item.prototype._repaintDeleteButton = function (anchor) { + var editable = (this.options.editable.remove || this.data.editable === true) && this.data.editable !== false; - var x = this.body.util.toScreen(this.eventParams.customTime) + event.deltaX; - var time = this.body.util.toTime(x); + if (this.selected && editable && !this.dom.deleteButton) { + // create and show button + var me = this; - this.setCustomTime(time); + var deleteButton = document.createElement('div'); + deleteButton.className = 'vis-delete'; + deleteButton.title = 'Delete this item'; - // fire a timechange event - this.body.emitter.emit('timechange', { - id: this.options.id, - time: new Date(this.customTime.valueOf()) - }); + // TODO: be able to destroy the delete button + new Hammer(deleteButton).on('tap', function (event) { + event.stopPropagation(); + me.parent.removeFromDataSet(me); + }); - event.stopPropagation(); + anchor.appendChild(deleteButton); + this.dom.deleteButton = deleteButton; + } else if (!this.selected && this.dom.deleteButton) { + // remove button + if (this.dom.deleteButton.parentNode) { + this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton); + } + this.dom.deleteButton = null; + } }; /** - * Stop moving operating. - * @param {Event} event + * Set HTML contents for the item + * @param {Element} element HTML element to fill with the contents * @private */ - CustomTime.prototype._onDragEnd = function (event) { - if (!this.eventParams.dragging) return; + Item.prototype._updateContents = function (element) { + var content; + if (this.options.template) { + var itemData = this.parent.itemSet.itemsData.get(this.id); // get a clone of the data from the dataset + content = this.options.template(itemData); + } else { + content = this.data.content; + } - // fire a timechanged event - this.body.emitter.emit('timechanged', { - id: this.options.id, - time: new Date(this.customTime.valueOf()) - }); + var changed = this._contentToString(this.content) !== this._contentToString(content); + if (changed) { + // only replace the content when changed + if (content instanceof Element) { + element.innerHTML = ''; + element.appendChild(content); + } else if (content != undefined) { + element.innerHTML = content; + } else { + if (!(this.data.type == 'background' && this.data.content === undefined)) { + throw new Error('Property "content" missing in item ' + this.id); + } + } - event.stopPropagation(); + this.content = content; + } }; /** - * Find a custom time from an event target: - * searches for the attribute 'custom-time' in the event target's element tree - * @param {Event} event - * @return {CustomTime | null} customTime + * Set HTML contents for the item + * @param {Element} element HTML element to fill with the contents + * @private */ - CustomTime.customTimeFromTarget = function (event) { - var target = event.target; - while (target) { - if (target.hasOwnProperty('custom-time')) { - return target['custom-time']; - } - target = target.parentNode; + Item.prototype._updateTitle = function (element) { + if (this.data.title != null) { + element.title = this.data.title || ''; + } else { + element.removeAttribute('vis-title'); } + }; - return null; + /** + * Process dataAttributes timeline option and set as data- attributes on dom.content + * @param {Element} element HTML element to which the attributes will be attached + * @private + */ + Item.prototype._updateDataAttributes = function (element) { + if (this.options.dataAttributes && this.options.dataAttributes.length > 0) { + var attributes = []; + + if (Array.isArray(this.options.dataAttributes)) { + attributes = this.options.dataAttributes; + } else if (this.options.dataAttributes == 'all') { + attributes = Object.keys(this.data); + } else { + return; + } + + for (var i = 0; i < attributes.length; i++) { + var name = attributes[i]; + var value = this.data[name]; + + if (value != null) { + element.setAttribute('data-' + name, value); + } else { + element.removeAttribute('data-' + name); + } + } + } }; - module.exports = CustomTime; + /** + * Update custom styles of the element + * @param element + * @private + */ + Item.prototype._updateStyle = function (element) { + // remove old styles + if (this.style) { + util.removeCssText(element, this.style); + this.style = null; + } -/***/ }, -/* 42 */ -/***/ function(module, exports) { + // append new styles + if (this.data.style) { + util.addCssText(element, this.data.style); + this.style = this.data.style; + } + }; - // English - 'use strict'; + /** + * Stringify the items contents + * @param {string | Element | undefined} content + * @returns {string | undefined} + * @private + */ + Item.prototype._contentToString = function (content) { + if (typeof content === 'string') return content; + if (content && 'outerHTML' in content) return content.outerHTML; + return content; + }; - exports['en'] = { - current: 'current', - time: 'time' + /** + * Return the width of the item left from its start date + * @return {number} + */ + Item.prototype.getWidthLeft = function () { + return 0; }; - exports['en_EN'] = exports['en']; - exports['en_US'] = exports['en']; - // Dutch - exports['nl'] = { - current: 'huidige', - time: 'tijd' + /** + * Return the width of the item right from the max of its start and end date + * @return {number} + */ + Item.prototype.getWidthRight = function () { + return 0; }; - exports['nl_NL'] = exports['nl']; - exports['nl_BE'] = exports['nl']; + + module.exports = Item; /***/ }, -/* 43 */ +/* 37 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var util = __webpack_require__(1); - var Component = __webpack_require__(25); - var moment = __webpack_require__(2); - var locales = __webpack_require__(42); + var Group = __webpack_require__(33); /** - * A current time bar - * @param {{range: Range, dom: Object, domProps: Object}} body - * @param {Object} [options] Available parameters: - * {Boolean} [showCurrentTime] - * @constructor CurrentTime - * @extends Component + * @constructor BackgroundGroup + * @param {Number | String} groupId + * @param {Object} data + * @param {ItemSet} itemSet */ - function CurrentTime(body, options) { - this.body = body; - - // default options - this.defaultOptions = { - showCurrentTime: true, - - moment: moment, - locales: locales, - locale: 'en' - }; - this.options = util.extend({}, this.defaultOptions); - this.offset = 0; - - this._create(); + function BackgroundGroup(groupId, data, itemSet) { + Group.call(this, groupId, data, itemSet); - this.setOptions(options); + this.width = 0; + this.height = 0; + this.top = 0; + this.left = 0; } - CurrentTime.prototype = new Component(); + BackgroundGroup.prototype = Object.create(Group.prototype); /** - * Create the HTML DOM for the current time bar - * @private - */ - CurrentTime.prototype._create = function () { - var bar = document.createElement('div'); - bar.className = 'vis-current-time'; - bar.style.position = 'absolute'; - bar.style.top = '0px'; - bar.style.height = '100%'; + * Repaint this group + * @param {{start: number, end: number}} range + * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin + * @param {boolean} [restack=false] Force restacking of all items + * @return {boolean} Returns true if the group is resized + */ + BackgroundGroup.prototype.redraw = function (range, margin, restack) { + var resized = false; - this.bar = bar; + this.visibleItems = this._updateVisibleItems(this.orderedItems, this.visibleItems, range); + + // calculate actual size + this.width = this.dom.background.offsetWidth; + + // apply new height (just always zero for BackgroundGroup + this.dom.background.style.height = '0'; + + // update vertical position of items after they are re-stacked and the height of the group is calculated + for (var i = 0, ii = this.visibleItems.length; i < ii; i++) { + var item = this.visibleItems[i]; + item.repositionY(margin); + } + + return resized; }; /** - * Destroy the CurrentTime bar + * Show this group: attach to the DOM */ - CurrentTime.prototype.destroy = function () { - this.options.showCurrentTime = false; - this.redraw(); // will remove the bar from the DOM and stop refreshing - - this.body = null; + BackgroundGroup.prototype.show = function () { + if (!this.dom.background.parentNode) { + this.itemSet.dom.background.appendChild(this.dom.background); + } }; + module.exports = BackgroundGroup; + +/***/ }, +/* 38 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var Item = __webpack_require__(36); + var util = __webpack_require__(1); + /** - * Set options for the component. Options will be merged in current options. - * @param {Object} options Available parameters: - * {boolean} [showCurrentTime] + * @constructor BoxItem + * @extends Item + * @param {Object} data Object containing parameters start + * content, className. + * @param {{toScreen: function, toTime: function}} conversion + * Conversion functions from time to screen and vice versa + * @param {Object} [options] Configuration options + * // TODO: describe available options */ - CurrentTime.prototype.setOptions = function (options) { - if (options) { - // copy all options that we know - util.selectiveExtend(['showCurrentTime', 'moment', 'locale', 'locales'], this.options, options); + function BoxItem(data, conversion, options) { + this.props = { + dot: { + width: 0, + height: 0 + }, + line: { + width: 0, + height: 0 + } + }; + + // validate data + if (data) { + if (data.start == undefined) { + throw new Error('Property "start" missing in item ' + data); + } } + + Item.call(this, data, conversion, options); + } + + BoxItem.prototype = new Item(null, null, null); + + /** + * Check whether this item is visible inside given range + * @returns {{start: Number, end: Number}} range with a timestamp for start and end + * @returns {boolean} True if visible + */ + BoxItem.prototype.isVisible = function (range) { + // determine visibility + // TODO: account for the real width of the item. Right now we just add 1/4 to the window + var interval = (range.end - range.start) / 4; + return this.data.start > range.start - interval && this.data.start < range.end + interval; }; /** - * Repaint the component - * @return {boolean} Returns true if the component is resized + * Repaint the item */ - CurrentTime.prototype.redraw = function () { - if (this.options.showCurrentTime) { - var parent = this.body.dom.backgroundVertical; - if (this.bar.parentNode != parent) { - // attach to the dom - if (this.bar.parentNode) { - this.bar.parentNode.removeChild(this.bar); - } - parent.appendChild(this.bar); + BoxItem.prototype.redraw = function () { + var dom = this.dom; + if (!dom) { + // create DOM + this.dom = {}; + dom = this.dom; - this.start(); - } + // create main box + dom.box = document.createElement('DIV'); - var now = this.options.moment(new Date().valueOf() + this.offset); - var x = this.body.util.toScreen(now); + // contents box (inside the background box). used for making margins + dom.content = document.createElement('DIV'); + dom.content.className = 'vis-item-content'; + dom.box.appendChild(dom.content); - var locale = this.options.locales[this.options.locale]; - if (!locale) { - if (!this.warned) { - console.log('WARNING: options.locales[\'' + this.options.locale + '\'] not found. See http://visjs.org/docs/timeline/#Localization'); - this.warned = true; - } - locale = this.options.locales['en']; // fall back on english when not available - } - var title = locale.current + ' ' + locale.time + ': ' + now.format('dddd, MMMM Do YYYY, H:mm:ss'); - title = title.charAt(0).toUpperCase() + title.substring(1); + // line to axis + dom.line = document.createElement('DIV'); + dom.line.className = 'vis-line'; - this.bar.style.left = x + 'px'; - this.bar.title = title; - } else { - // remove the line from the DOM - if (this.bar.parentNode) { - this.bar.parentNode.removeChild(this.bar); - } - this.stop(); + // dot on axis + dom.dot = document.createElement('DIV'); + dom.dot.className = 'vis-dot'; + + // attach this item as attribute + dom.box['timeline-item'] = this; + + this.dirty = true; } - return false; + // append DOM to parent DOM + if (!this.parent) { + throw new Error('Cannot redraw item: no parent attached'); + } + if (!dom.box.parentNode) { + var foreground = this.parent.dom.foreground; + if (!foreground) throw new Error('Cannot redraw item: parent has no foreground container element'); + foreground.appendChild(dom.box); + } + if (!dom.line.parentNode) { + var background = this.parent.dom.background; + if (!background) throw new Error('Cannot redraw item: parent has no background container element'); + background.appendChild(dom.line); + } + if (!dom.dot.parentNode) { + var axis = this.parent.dom.axis; + if (!background) throw new Error('Cannot redraw item: parent has no axis container element'); + axis.appendChild(dom.dot); + } + this.displayed = true; + + // Update DOM when item is marked dirty. An item is marked dirty when: + // - the item is not yet rendered + // - the item's data is changed + // - the item is selected/deselected + if (this.dirty) { + this._updateContents(this.dom.content); + this._updateTitle(this.dom.box); + this._updateDataAttributes(this.dom.box); + this._updateStyle(this.dom.box); + + var editable = (this.options.editable.updateTime || this.options.editable.updateGroup || this.editable === true) && this.editable !== false; + + // update class + var className = (this.data.className ? ' ' + this.data.className : '') + (this.selected ? ' vis-selected' : '') + (editable ? ' vis-editable' : ' vis-readonly'); + dom.box.className = 'vis-item vis-box' + className; + dom.line.className = 'vis-item vis-line' + className; + dom.dot.className = 'vis-item vis-dot' + className; + + // recalculate size + this.props.dot.height = dom.dot.offsetHeight; + this.props.dot.width = dom.dot.offsetWidth; + this.props.line.width = dom.line.offsetWidth; + this.width = dom.box.offsetWidth; + this.height = dom.box.offsetHeight; + + this.dirty = false; + } + + this._repaintDeleteButton(dom.box); }; /** - * Start auto refreshing the current time bar + * Show the item in the DOM (when not already displayed). The items DOM will + * be created when needed. */ - CurrentTime.prototype.start = function () { - var me = this; - - function update() { - me.stop(); + BoxItem.prototype.show = function () { + if (!this.displayed) { + this.redraw(); + } + }; - // determine interval to refresh - var scale = me.body.range.conversion(me.body.domProps.center.width).scale; - var interval = 1 / scale / 10; - if (interval < 30) interval = 30; - if (interval > 1000) interval = 1000; + /** + * Hide the item from the DOM (when visible) + */ + BoxItem.prototype.hide = function () { + if (this.displayed) { + var dom = this.dom; - me.redraw(); - me.body.emitter.emit('currentTimeTick'); + if (dom.box.parentNode) dom.box.parentNode.removeChild(dom.box); + if (dom.line.parentNode) dom.line.parentNode.removeChild(dom.line); + if (dom.dot.parentNode) dom.dot.parentNode.removeChild(dom.dot); - // start a renderTimer to adjust for the new time - me.currentTimeTimer = setTimeout(update, interval); + this.displayed = false; } + }; - update(); + /** + * Reposition the item horizontally + * @Override + */ + BoxItem.prototype.repositionX = function () { + var start = this.conversion.toScreen(this.data.start); + var align = this.options.align; + + // calculate left position of the box + if (align == 'right') { + this.left = start - this.width; + + // reposition box, line, and dot + this.dom.box.style.left = this.left + 'px'; + this.dom.line.style.left = start - this.props.line.width + 'px'; + this.dom.dot.style.left = start - this.props.line.width / 2 - this.props.dot.width / 2 + 'px'; + } else if (align == 'left') { + this.left = start; + + // reposition box, line, and dot + this.dom.box.style.left = this.left + 'px'; + this.dom.line.style.left = start + 'px'; + this.dom.dot.style.left = start + this.props.line.width / 2 - this.props.dot.width / 2 + 'px'; + } else { + // default or 'center' + this.left = start - this.width / 2; + + // reposition box, line, and dot + this.dom.box.style.left = this.left + 'px'; + this.dom.line.style.left = start - this.props.line.width / 2 + 'px'; + this.dom.dot.style.left = start - this.props.dot.width / 2 + 'px'; + } }; /** - * Stop auto refreshing the current time bar + * Reposition the item vertically + * @Override */ - CurrentTime.prototype.stop = function () { - if (this.currentTimeTimer !== undefined) { - clearTimeout(this.currentTimeTimer); - delete this.currentTimeTimer; + BoxItem.prototype.repositionY = function () { + var orientation = this.options.orientation.item; + var box = this.dom.box; + var line = this.dom.line; + var dot = this.dom.dot; + + if (orientation == 'top') { + box.style.top = (this.top || 0) + 'px'; + + line.style.top = '0'; + line.style.height = this.parent.top + this.top + 1 + 'px'; + line.style.bottom = ''; + } else { + // orientation 'bottom' + var itemSetHeight = this.parent.itemSet.props.height; // TODO: this is nasty + var lineHeight = itemSetHeight - this.parent.top - this.parent.height + this.top; + + box.style.top = (this.parent.height - this.top - this.height || 0) + 'px'; + line.style.top = itemSetHeight - lineHeight + 'px'; + line.style.bottom = '0'; } + + dot.style.top = -this.props.dot.height / 2 + 'px'; }; /** - * Set a current time. This can be used for example to ensure that a client's - * time is synchronized with a shared server time. - * @param {Date | String | Number} time A Date, unix timestamp, or - * ISO date string. + * Return the width of the item left from its start date + * @return {number} */ - CurrentTime.prototype.setCurrentTime = function (time) { - var t = util.convert(time, 'Date').valueOf(); - var now = new Date().valueOf(); - this.offset = t - now; - this.redraw(); + BoxItem.prototype.getWidthLeft = function () { + return this.width / 2; }; /** - * Get the current time. - * @return {Date} Returns the current time. + * Return the width of the item right from its start date + * @return {number} */ - CurrentTime.prototype.getCurrentTime = function () { - return new Date(new Date().valueOf() + this.offset); + BoxItem.prototype.getWidthRight = function () { + return this.width / 2; }; - module.exports = CurrentTime; + module.exports = BoxItem; /***/ }, -/* 44 */ +/* 39 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { - value: true - }); + var Item = __webpack_require__(36); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + /** + * @constructor PointItem + * @extends Item + * @param {Object} data Object containing parameters start + * content, className. + * @param {{toScreen: function, toTime: function}} conversion + * Conversion functions from time to screen and vice versa + * @param {Object} [options] Configuration options + * // TODO: describe available options + */ + function PointItem(data, conversion, options) { + this.props = { + dot: { + top: 0, + width: 0, + height: 0 + }, + content: { + height: 0, + marginLeft: 0 + } + }; - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + // validate data + if (data) { + if (data.start == undefined) { + throw new Error('Property "start" missing in item ' + data); + } + } - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + Item.call(this, data, conversion, options); + } - var _ColorPicker = __webpack_require__(45); + PointItem.prototype = new Item(null, null, null); - var _ColorPicker2 = _interopRequireDefault(_ColorPicker); + /** + * Check whether this item is visible inside given range + * @returns {{start: Number, end: Number}} range with a timestamp for start and end + * @returns {boolean} True if visible + */ + PointItem.prototype.isVisible = function (range) { + // determine visibility + // TODO: account for the real width of the item. Right now we just add 1/4 to the window + var interval = (range.end - range.start) / 4; + return this.data.start > range.start - interval && this.data.start < range.end + interval; + }; /** - * The way this works is for all properties of this.possible options, you can supply the property name in any form to list the options. - * Boolean options are recognised as Boolean - * Number options should be written as array: [default value, min value, max value, stepsize] - * Colors should be written as array: ['color', '#ffffff'] - * Strings with should be written as array: [option1, option2, option3, ..] - * - * The options are matched with their counterparts in each of the modules and the values used in the configuration are - * - * @param parentModule | the location where parentModule.setOptions() can be called - * @param defaultContainer | the default container of the module - * @param configureOptions | the fully configured and predefined options set found in allOptions.js - * @param pixelRatio | canvas pixel ratio + * Repaint the item */ - var util = __webpack_require__(1); + PointItem.prototype.redraw = function () { + var dom = this.dom; + if (!dom) { + // create DOM + this.dom = {}; + dom = this.dom; - var Configurator = (function () { - function Configurator(parentModule, defaultContainer, configureOptions) { - var pixelRatio = arguments.length <= 3 || arguments[3] === undefined ? 1 : arguments[3]; + // background box + dom.point = document.createElement('div'); + // className is updated in redraw() - _classCallCheck(this, Configurator); + // contents box, right from the dot + dom.content = document.createElement('div'); + dom.content.className = 'vis-item-content'; + dom.point.appendChild(dom.content); - this.parent = parentModule; - this.changedOptions = []; - this.container = defaultContainer; - this.allowCreation = false; + // dot at start + dom.dot = document.createElement('div'); + dom.point.appendChild(dom.dot); - this.options = {}; - this.initialized = false; - this.popupCounter = 0; - this.defaultOptions = { - enabled: false, - filter: true, - container: undefined, - showButton: true - }; - util.extend(this.options, this.defaultOptions); + // attach this item as attribute + dom.point['timeline-item'] = this; - this.configureOptions = configureOptions; - this.moduleOptions = {}; - this.domElements = []; - this.popupDiv = {}; - this.popupLimit = 5; - this.popupHistory = {}; - this.colorPicker = new _ColorPicker2['default'](pixelRatio); - this.wrapper = undefined; + this.dirty = true; } - /** - * refresh all options. - * Because all modules parse their options by themselves, we just use their options. We copy them here. - * - * @param options - */ - - _createClass(Configurator, [{ - key: 'setOptions', - value: function setOptions(options) { - if (options !== undefined) { - // reset the popup history because the indices may have been changed. - this.popupHistory = {}; - this._removePopup(); + // append DOM to parent DOM + if (!this.parent) { + throw new Error('Cannot redraw item: no parent attached'); + } + if (!dom.point.parentNode) { + var foreground = this.parent.dom.foreground; + if (!foreground) { + throw new Error('Cannot redraw item: parent has no foreground container element'); + } + foreground.appendChild(dom.point); + } + this.displayed = true; - var enabled = true; - if (typeof options === 'string') { - this.options.filter = options; - } else if (options instanceof Array) { - this.options.filter = options.join(); - } else if (typeof options === 'object') { - if (options.container !== undefined) { - this.options.container = options.container; - } - if (options.filter !== undefined) { - this.options.filter = options.filter; - } - if (options.showButton !== undefined) { - this.options.showButton = options.showButton; - } - if (options.enabled !== undefined) { - enabled = options.enabled; - } - } else if (typeof options === 'boolean') { - this.options.filter = true; - enabled = options; - } else if (typeof options === 'function') { - this.options.filter = options; - enabled = true; - } - if (this.options.filter === false) { - enabled = false; - } + // Update DOM when item is marked dirty. An item is marked dirty when: + // - the item is not yet rendered + // - the item's data is changed + // - the item is selected/deselected + if (this.dirty) { + this._updateContents(this.dom.content); + this._updateTitle(this.dom.point); + this._updateDataAttributes(this.dom.point); + this._updateStyle(this.dom.point); - this.options.enabled = enabled; - } - this._clean(); - } - }, { - key: 'setModuleOptions', - value: function setModuleOptions(moduleOptions) { - this.moduleOptions = moduleOptions; - if (this.options.enabled === true) { - this._clean(); - if (this.options.container !== undefined) { - this.container = this.options.container; - } - this._create(); - } - } + var editable = (this.options.editable.updateTime || this.options.editable.updateGroup || this.editable === true) && this.editable !== false; - /** - * Create all DOM elements - * @private - */ - }, { - key: '_create', - value: function _create() { - var _this = this; + // update class + var className = (this.data.className ? ' ' + this.data.className : '') + (this.selected ? ' vis-selected' : '') + (editable ? ' vis-editable' : ' vis-readonly'); + dom.point.className = 'vis-item vis-point' + className; + dom.dot.className = 'vis-item vis-dot' + className; - this._clean(); - this.changedOptions = []; + // recalculate size of dot and contents + this.props.dot.width = dom.dot.offsetWidth; + this.props.dot.height = dom.dot.offsetHeight; + this.props.content.height = dom.content.offsetHeight; - var filter = this.options.filter; - var counter = 0; - var show = false; - for (var option in this.configureOptions) { - if (this.configureOptions.hasOwnProperty(option)) { - this.allowCreation = false; - show = false; - if (typeof filter === 'function') { - show = filter(option, []); - show = show || this._handleObject(this.configureOptions[option], [option], true); - } else if (filter === true || filter.indexOf(option) !== -1) { - show = true; - } - - if (show !== false) { - this.allowCreation = true; + // resize contents + dom.content.style.marginLeft = 2 * this.props.dot.width + 'px'; + //dom.content.style.marginRight = ... + 'px'; // TODO: margin right - // linebreak between categories - if (counter > 0) { - this._makeItem([]); - } - // a header for the category - this._makeHeader(option); + // recalculate size + this.width = dom.point.offsetWidth; + this.height = dom.point.offsetHeight; - // get the sub options - this._handleObject(this.configureOptions[option], [option]); - } - counter++; - } - } + // reposition the dot + dom.dot.style.top = (this.height - this.props.dot.height) / 2 + 'px'; + dom.dot.style.left = this.props.dot.width / 2 + 'px'; - if (this.options.showButton === true) { - (function () { - var generateButton = document.createElement('div'); - generateButton.className = 'vis-configuration vis-config-button'; - generateButton.innerHTML = 'generate options'; - generateButton.onclick = function () { - _this._printOptions(); - }; - generateButton.onmouseover = function () { - generateButton.className = 'vis-configuration vis-config-button hover'; - }; - generateButton.onmouseout = function () { - generateButton.className = 'vis-configuration vis-config-button'; - }; + this.dirty = false; + } - _this.optionsContainer = document.createElement('div'); - _this.optionsContainer.className = 'vis-configuration vis-config-option-container'; + this._repaintDeleteButton(dom.point); + }; - _this.domElements.push(_this.optionsContainer); - _this.domElements.push(generateButton); - })(); - } + /** + * Show the item in the DOM (when not already visible). The items DOM will + * be created when needed. + */ + PointItem.prototype.show = function () { + if (!this.displayed) { + this.redraw(); + } + }; - this._push(); - //~ this.colorPicker.insertTo(this.container); + /** + * Hide the item from the DOM (when visible) + */ + PointItem.prototype.hide = function () { + if (this.displayed) { + if (this.dom.point.parentNode) { + this.dom.point.parentNode.removeChild(this.dom.point); } - /** - * draw all DOM elements on the screen - * @private - */ - }, { - key: '_push', - value: function _push() { - this.wrapper = document.createElement('div'); - this.wrapper.className = 'vis-configuration-wrapper'; - this.container.appendChild(this.wrapper); - for (var i = 0; i < this.domElements.length; i++) { - this.wrapper.appendChild(this.domElements[i]); - } + this.displayed = false; + } + }; - this._showPopupIfNeeded(); - } + /** + * Reposition the item horizontally + * @Override + */ + PointItem.prototype.repositionX = function () { + var start = this.conversion.toScreen(this.data.start); - /** - * delete all DOM elements - * @private - */ - }, { - key: '_clean', - value: function _clean() { - for (var i = 0; i < this.domElements.length; i++) { - this.wrapper.removeChild(this.domElements[i]); - } + this.left = start - this.props.dot.width; - if (this.wrapper !== undefined) { - this.container.removeChild(this.wrapper); - this.wrapper = undefined; - } - this.domElements = []; + // reposition point + this.dom.point.style.left = this.left + 'px'; + }; - this._removePopup(); - } + /** + * Reposition the item vertically + * @Override + */ + PointItem.prototype.repositionY = function () { + var orientation = this.options.orientation.item; + var point = this.dom.point; - /** - * get the value from the actualOptions if it exists - * @param {array} path | where to look for the actual option - * @returns {*} - * @private - */ - }, { - key: '_getValue', - value: function _getValue(path) { - var base = this.moduleOptions; - for (var i = 0; i < path.length; i++) { - if (base[path[i]] !== undefined) { - base = base[path[i]]; - } else { - base = undefined; - break; - } - } - return base; - } + if (orientation == 'top') { + point.style.top = this.top + 'px'; + } else { + point.style.top = this.parent.height - this.top - this.height + 'px'; + } + }; - /** - * all option elements are wrapped in an item - * @param path - * @param domElements - * @private - */ - }, { - key: '_makeItem', - value: function _makeItem(path) { - var _arguments = arguments, - _this2 = this; + /** + * Return the width of the item left from its start date + * @return {number} + */ + PointItem.prototype.getWidthLeft = function () { + return this.props.dot.width; + }; - if (this.allowCreation === true) { - var _len, domElements, _key; + /** + * Return the width of the item right from its start date + * @return {number} + */ + PointItem.prototype.getWidthRight = function () { + return this.width - this.props.dot.width; + }; - var _ret2 = (function () { - var item = document.createElement('div'); - item.className = 'vis-configuration vis-config-item vis-config-s' + path.length; + module.exports = PointItem; - for (_len = _arguments.length, domElements = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - domElements[_key - 1] = _arguments[_key]; - } +/***/ }, +/* 40 */ +/***/ function(module, exports, __webpack_require__) { - domElements.forEach(function (element) { - item.appendChild(element); - }); - _this2.domElements.push(item); - return { - v: _this2.domElements.length - }; - })(); + 'use strict'; - if (typeof _ret2 === 'object') return _ret2.v; - } - return 0; - } + var Hammer = __webpack_require__(22); + var Item = __webpack_require__(36); + var BackgroundGroup = __webpack_require__(37); + var RangeItem = __webpack_require__(35); - /** - * header for major subjects - * @param name - * @private - */ - }, { - key: '_makeHeader', - value: function _makeHeader(name) { - var div = document.createElement('div'); - div.className = 'vis-configuration vis-config-header'; - div.innerHTML = name; - this._makeItem([], div); + /** + * @constructor BackgroundItem + * @extends Item + * @param {Object} data Object containing parameters start, end + * content, className. + * @param {{toScreen: function, toTime: function}} conversion + * Conversion functions from time to screen and vice versa + * @param {Object} [options] Configuration options + * // TODO: describe options + */ + // TODO: implement support for the BackgroundItem just having a start, then being displayed as a sort of an annotation + function BackgroundItem(data, conversion, options) { + this.props = { + content: { + width: 0 } + }; + this.overflow = false; // if contents can overflow (css styling), this flag is set to true - /** - * make a label, if it is an object label, it gets different styling. - * @param name - * @param path - * @param objectLabel - * @returns {HTMLElement} - * @private - */ - }, { - key: '_makeLabel', - value: function _makeLabel(name, path) { - var objectLabel = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; - - var div = document.createElement('div'); - div.className = 'vis-configuration vis-config-label vis-config-s' + path.length; - if (objectLabel === true) { - div.innerHTML = '' + name + ':'; - } else { - div.innerHTML = name + ':'; - } - return div; + // validate data + if (data) { + if (data.start == undefined) { + throw new Error('Property "start" missing in item ' + data.id); + } + if (data.end == undefined) { + throw new Error('Property "end" missing in item ' + data.id); } + } - /** - * make a dropdown list for multiple possible string optoins - * @param arr - * @param value - * @param path - * @private - */ - }, { - key: '_makeDropdown', - value: function _makeDropdown(arr, value, path) { - var select = document.createElement('select'); - select.className = 'vis-configuration vis-config-select'; - var selectedValue = 0; - if (value !== undefined) { - if (arr.indexOf(value) !== -1) { - selectedValue = arr.indexOf(value); - } - } + Item.call(this, data, conversion, options); + } - for (var i = 0; i < arr.length; i++) { - var option = document.createElement('option'); - option.value = arr[i]; - if (i === selectedValue) { - option.selected = 'selected'; - } - option.innerHTML = arr[i]; - select.appendChild(option); - } + BackgroundItem.prototype = new Item(null, null, null); - var me = this; - select.onchange = function () { - me._update(this.value, path); - }; + BackgroundItem.prototype.baseClassName = 'vis-item vis-background'; + BackgroundItem.prototype.stack = false; - var label = this._makeLabel(path[path.length - 1], path); - this._makeItem(path, label, select); - } + /** + * Check whether this item is visible inside given range + * @returns {{start: Number, end: Number}} range with a timestamp for start and end + * @returns {boolean} True if visible + */ + BackgroundItem.prototype.isVisible = function (range) { + // determine visibility + return this.data.start < range.end && this.data.end > range.start; + }; - /** - * make a range object for numeric options - * @param arr - * @param value - * @param path - * @private - */ - }, { - key: '_makeRange', - value: function _makeRange(arr, value, path) { - var defaultValue = arr[0]; - var min = arr[1]; - var max = arr[2]; - var step = arr[3]; - var range = document.createElement('input'); - range.className = 'vis-configuration vis-config-range'; - try { - range.type = 'range'; // not supported on IE9 - range.min = min; - range.max = max; - } catch (err) {} - range.step = step; + /** + * Repaint the item + */ + BackgroundItem.prototype.redraw = function () { + var dom = this.dom; + if (!dom) { + // create DOM + this.dom = {}; + dom = this.dom; - // set up the popup settings in case they are needed. - var popupString = ''; - var popupValue = 0; + // background box + dom.box = document.createElement('div'); + // className is updated in redraw() - if (value !== undefined) { - var factor = 1.20; - if (value < 0 && value * factor < min) { - range.min = Math.ceil(value * factor); - popupValue = range.min; - popupString = 'range increased'; - } else if (value / factor < min) { - range.min = Math.ceil(value / factor); - popupValue = range.min; - popupString = 'range increased'; - } - if (value * factor > max && max !== 1) { - range.max = Math.ceil(value * factor); - popupValue = range.max; - popupString = 'range increased'; - } - range.value = value; - } else { - range.value = defaultValue; - } + // frame box (to prevent the item contents from overflowing + dom.frame = document.createElement('div'); + dom.frame.className = 'vis-item-overflow'; + dom.box.appendChild(dom.frame); - var input = document.createElement('input'); - input.className = 'vis-configuration vis-config-rangeinput'; - input.value = range.value; + // contents box + dom.content = document.createElement('div'); + dom.content.className = 'vis-item-content'; + dom.frame.appendChild(dom.content); - var me = this; - range.onchange = function () { - input.value = this.value;me._update(Number(this.value), path); - }; - range.oninput = function () { - input.value = this.value; - }; + // Note: we do NOT attach this item as attribute to the DOM, + // such that background items cannot be selected + //dom.box['timeline-item'] = this; - var label = this._makeLabel(path[path.length - 1], path); - var itemIndex = this._makeItem(path, label, range, input); + this.dirty = true; + } - // if a popup is needed AND it has not been shown for this value, show it. - if (popupString !== '' && this.popupHistory[itemIndex] !== popupValue) { - this.popupHistory[itemIndex] = popupValue; - this._setupPopup(popupString, itemIndex); - } + // append DOM to parent DOM + if (!this.parent) { + throw new Error('Cannot redraw item: no parent attached'); + } + if (!dom.box.parentNode) { + var background = this.parent.dom.background; + if (!background) { + throw new Error('Cannot redraw item: parent has no background container element'); } + background.appendChild(dom.box); + } + this.displayed = true; - /** - * prepare the popup - * @param string - * @param index - * @private - */ - }, { - key: '_setupPopup', - value: function _setupPopup(string, index) { - var _this3 = this; + // Update DOM when item is marked dirty. An item is marked dirty when: + // - the item is not yet rendered + // - the item's data is changed + // - the item is selected/deselected + if (this.dirty) { + this._updateContents(this.dom.content); + this._updateTitle(this.dom.content); + this._updateDataAttributes(this.dom.content); + this._updateStyle(this.dom.box); - if (this.initialized === true && this.allowCreation === true && this.popupCounter < this.popupLimit) { - var div = document.createElement("div"); - div.id = "vis-configuration-popup"; - div.className = "vis-configuration-popup"; - div.innerHTML = string; - div.onclick = function () { - _this3._removePopup(); - }; - this.popupCounter += 1; - this.popupDiv = { html: div, index: index }; - } - } + // update class + var className = (this.data.className ? ' ' + this.data.className : '') + (this.selected ? ' vis-selected' : ''); + dom.box.className = this.baseClassName + className; - /** - * remove the popup from the dom - * @private - */ - }, { - key: '_removePopup', - value: function _removePopup() { - if (this.popupDiv.html !== undefined) { - this.popupDiv.html.parentNode.removeChild(this.popupDiv.html); - clearTimeout(this.popupDiv.hideTimeout); - clearTimeout(this.popupDiv.deleteTimeout); - this.popupDiv = {}; - } - } + // determine from css whether this box has overflow + this.overflow = window.getComputedStyle(dom.content).overflow !== 'hidden'; - /** - * Show the popup if it is needed. - * @private - */ - }, { - key: '_showPopupIfNeeded', - value: function _showPopupIfNeeded() { - var _this4 = this; + // recalculate size + this.props.content.width = this.dom.content.offsetWidth; + this.height = 0; // set height zero, so this item will be ignored when stacking items - if (this.popupDiv.html !== undefined) { - var correspondingElement = this.domElements[this.popupDiv.index]; - var rect = correspondingElement.getBoundingClientRect(); - this.popupDiv.html.style.left = rect.left + "px"; - this.popupDiv.html.style.top = rect.top - 30 + "px"; // 30 is the height; - document.body.appendChild(this.popupDiv.html); - this.popupDiv.hideTimeout = setTimeout(function () { - _this4.popupDiv.html.style.opacity = 0; - }, 1500); - this.popupDiv.deleteTimeout = setTimeout(function () { - _this4._removePopup(); - }, 1800); - } - } + this.dirty = false; + } + }; - /** - * make a checkbox for boolean options. - * @param defaultValue - * @param value - * @param path - * @private - */ - }, { - key: '_makeCheckbox', - value: function _makeCheckbox(defaultValue, value, path) { - var checkbox = document.createElement('input'); - checkbox.type = 'checkbox'; - checkbox.className = 'vis-configuration vis-config-checkbox'; - checkbox.checked = defaultValue; - if (value !== undefined) { - checkbox.checked = value; - if (value !== defaultValue) { - if (typeof defaultValue === 'object') { - if (value !== defaultValue.enabled) { - this.changedOptions.push({ path: path, value: value }); - } - } else { - this.changedOptions.push({ path: path, value: value }); - } - } - } + /** + * Show the item in the DOM (when not already visible). The items DOM will + * be created when needed. + */ + BackgroundItem.prototype.show = RangeItem.prototype.show; - var me = this; - checkbox.onchange = function () { - me._update(this.checked, path); - }; + /** + * Hide the item from the DOM (when visible) + * @return {Boolean} changed + */ + BackgroundItem.prototype.hide = RangeItem.prototype.hide; - var label = this._makeLabel(path[path.length - 1], path); - this._makeItem(path, label, checkbox); - } + /** + * Reposition the item horizontally + * @Override + */ + BackgroundItem.prototype.repositionX = RangeItem.prototype.repositionX; - /** - * make a text input field for string options. - * @param defaultValue - * @param value - * @param path - * @private - */ - }, { - key: '_makeTextInput', - value: function _makeTextInput(defaultValue, value, path) { - var checkbox = document.createElement('input'); - checkbox.type = 'text'; - checkbox.className = 'vis-configuration vis-config-text'; - checkbox.value = value; - if (value !== defaultValue) { - this.changedOptions.push({ path: path, value: value }); + /** + * Reposition the item vertically + * @Override + */ + BackgroundItem.prototype.repositionY = function (margin) { + var onTop = this.options.orientation.item === 'top'; + this.dom.content.style.top = onTop ? '' : '0'; + this.dom.content.style.bottom = onTop ? '0' : ''; + var height; + + // special positioning for subgroups + if (this.data.subgroup !== undefined) { + // TODO: instead of calculating the top position of the subgroups here for every BackgroundItem, calculate the top of the subgroup once in Itemset + + var itemSubgroup = this.data.subgroup; + var subgroups = this.parent.subgroups; + var subgroupIndex = subgroups[itemSubgroup].index; + // if the orientation is top, we need to take the difference in height into account. + if (onTop == true) { + // the first subgroup will have to account for the distance from the top to the first item. + height = this.parent.subgroups[itemSubgroup].height + margin.item.vertical; + height += subgroupIndex == 0 ? margin.axis - 0.5 * margin.item.vertical : 0; + var newTop = this.parent.top; + for (var subgroup in subgroups) { + if (subgroups.hasOwnProperty(subgroup)) { + if (subgroups[subgroup].visible == true && subgroups[subgroup].index < subgroupIndex) { + newTop += subgroups[subgroup].height + margin.item.vertical; + } + } } - var me = this; - checkbox.onchange = function () { - me._update(this.value, path); - }; + // the others will have to be offset downwards with this same distance. + newTop += subgroupIndex != 0 ? margin.axis - 0.5 * margin.item.vertical : 0; + this.dom.box.style.top = newTop + 'px'; + this.dom.box.style.bottom = ''; + } + // and when the orientation is bottom: + else { + var newTop = this.parent.top; + var totalHeight = 0; + for (var subgroup in subgroups) { + if (subgroups.hasOwnProperty(subgroup)) { + if (subgroups[subgroup].visible == true) { + var newHeight = subgroups[subgroup].height + margin.item.vertical; + totalHeight += newHeight; + if (subgroups[subgroup].index > subgroupIndex) { + newTop += newHeight; + } + } + } + } + height = this.parent.subgroups[itemSubgroup].height + margin.item.vertical; + this.dom.box.style.top = this.parent.height - totalHeight + newTop + 'px'; + this.dom.box.style.bottom = ''; + } + } + // and in the case of no subgroups: + else { + // we want backgrounds with groups to only show in groups. + if (this.parent instanceof BackgroundGroup) { + // if the item is not in a group: + height = Math.max(this.parent.height, this.parent.itemSet.body.domProps.center.height, this.parent.itemSet.body.domProps.centerContainer.height); + this.dom.box.style.top = onTop ? '0' : ''; + this.dom.box.style.bottom = onTop ? '' : '0'; + } else { + height = this.parent.height; + // same alignment for items when orientation is top or bottom + this.dom.box.style.top = this.parent.top + 'px'; + this.dom.box.style.bottom = ''; + } + } + this.dom.box.style.height = height + 'px'; + }; - var label = this._makeLabel(path[path.length - 1], path); - this._makeItem(path, label, checkbox); + module.exports = BackgroundItem; + +/***/ }, +/* 41 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + + var util = __webpack_require__(1); + var Component = __webpack_require__(28); + var TimeStep = __webpack_require__(32); + var DateUtil = __webpack_require__(29); + var moment = __webpack_require__(2); + + /** + * A horizontal time axis + * @param {{dom: Object, domProps: Object, emitter: Emitter, range: Range}} body + * @param {Object} [options] See TimeAxis.setOptions for the available + * options. + * @constructor TimeAxis + * @extends Component + */ + function TimeAxis(body, options) { + this.dom = { + foreground: null, + lines: [], + majorTexts: [], + minorTexts: [], + redundant: { + lines: [], + majorTexts: [], + minorTexts: [] } + }; + this.props = { + range: { + start: 0, + end: 0, + minimumStep: 0 + }, + lineTop: 0 + }; - /** - * make a color field with a color picker for color fields - * @param arr - * @param value - * @param path - * @private - */ - }, { - key: '_makeColorField', - value: function _makeColorField(arr, value, path) { - var _this5 = this; + this.defaultOptions = { + orientation: { + axis: 'bottom' + }, // axis orientation: 'top' or 'bottom' + showMinorLabels: true, + showMajorLabels: true, + maxMinorChars: 7, + format: TimeStep.FORMAT, + moment: moment, + timeAxis: null + }; + this.options = util.extend({}, this.defaultOptions); - var defaultColor = arr[1]; - var div = document.createElement('div'); - value = value === undefined ? defaultColor : value; + this.body = body; - if (value !== 'none') { - div.className = 'vis-configuration vis-config-colorBlock'; - div.style.backgroundColor = value; + // create the HTML DOM + this._create(); + + this.setOptions(options); + } + + TimeAxis.prototype = new Component(); + + /** + * Set options for the TimeAxis. + * Parameters will be merged in current options. + * @param {Object} options Available options: + * {string} [orientation.axis] + * {boolean} [showMinorLabels] + * {boolean} [showMajorLabels] + */ + TimeAxis.prototype.setOptions = function (options) { + if (options) { + // copy all options that we know + util.selectiveExtend(['showMinorLabels', 'showMajorLabels', 'maxMinorChars', 'hiddenDates', 'timeAxis', 'moment'], this.options, options); + + // deep copy the format options + util.selectiveDeepExtend(['format'], this.options, options); + + if ('orientation' in options) { + if (typeof options.orientation === 'string') { + this.options.orientation.axis = options.orientation; + } else if (_typeof(options.orientation) === 'object' && 'axis' in options.orientation) { + this.options.orientation.axis = options.orientation.axis; + } + } + + // apply locale to moment.js + // TODO: not so nice, this is applied globally to moment.js + if ('locale' in options) { + if (typeof moment.locale === 'function') { + // moment.js 2.8.1+ + moment.locale(options.locale); } else { - div.className = 'vis-configuration vis-config-colorBlock none'; + moment.lang(options.locale); } + } + } + }; - value = value === undefined ? defaultColor : value; - div.onclick = function () { - _this5._showColorPicker(value, div, path); - }; + /** + * Create the HTML DOM for the TimeAxis + */ + TimeAxis.prototype._create = function () { + this.dom.foreground = document.createElement('div'); + this.dom.background = document.createElement('div'); - var label = this._makeLabel(path[path.length - 1], path); - this._makeItem(path, label, div); - } + this.dom.foreground.className = 'vis-time-axis vis-foreground'; + this.dom.background.className = 'vis-time-axis vis-background'; + }; - /** - * used by the color buttons to call the color picker. - * @param event - * @param value - * @param div - * @param path - * @private - */ - }, { - key: '_showColorPicker', - value: function _showColorPicker(value, div, path) { - var _this6 = this; + /** + * Destroy the TimeAxis + */ + TimeAxis.prototype.destroy = function () { + // remove from DOM + if (this.dom.foreground.parentNode) { + this.dom.foreground.parentNode.removeChild(this.dom.foreground); + } + if (this.dom.background.parentNode) { + this.dom.background.parentNode.removeChild(this.dom.background); + } - // clear the callback from this div - div.onclick = function () {}; + this.body = null; + }; - this.colorPicker.insertTo(div); - this.colorPicker.show(); + /** + * Repaint the component + * @return {boolean} Returns true if the component is resized + */ + TimeAxis.prototype.redraw = function () { + var props = this.props; + var foreground = this.dom.foreground; + var background = this.dom.background; - this.colorPicker.setColor(value); - this.colorPicker.setUpdateCallback(function (color) { - var colorString = 'rgba(' + color.r + ',' + color.g + ',' + color.b + ',' + color.a + ')'; - div.style.backgroundColor = colorString; - _this6._update(colorString, path); - }); + // determine the correct parent DOM element (depending on option orientation) + var parent = this.options.orientation.axis == 'top' ? this.body.dom.top : this.body.dom.bottom; + var parentChanged = foreground.parentNode !== parent; - // on close of the colorpicker, restore the callback. - this.colorPicker.setCloseCallback(function () { - div.onclick = function () { - _this6._showColorPicker(value, div, path); - }; - }); - } + // calculate character width and height + this._calculateCharSize(); - /** - * parse an object and draw the correct items - * @param obj - * @param path - * @private - */ - }, { - key: '_handleObject', - value: function _handleObject(obj) { - var path = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1]; - var checkOnly = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; + // TODO: recalculate sizes only needed when parent is resized or options is changed + var showMinorLabels = this.options.showMinorLabels && this.options.orientation.axis !== 'none'; + var showMajorLabels = this.options.showMajorLabels && this.options.orientation.axis !== 'none'; - var show = false; - var filter = this.options.filter; - var visibleInSet = false; - for (var subObj in obj) { - if (obj.hasOwnProperty(subObj)) { - show = true; - var item = obj[subObj]; - var newPath = util.copyAndExtendArray(path, subObj); - if (typeof filter === 'function') { - show = filter(subObj, path); + // determine the width and height of the elemens for the axis + props.minorLabelHeight = showMinorLabels ? props.minorCharHeight : 0; + props.majorLabelHeight = showMajorLabels ? props.majorCharHeight : 0; + props.height = props.minorLabelHeight + props.majorLabelHeight; + props.width = foreground.offsetWidth; - // if needed we must go deeper into the object. - if (show === false) { - if (!(item instanceof Array) && typeof item !== 'string' && typeof item !== 'boolean' && item instanceof Object) { - this.allowCreation = false; - show = this._handleObject(item, newPath, true); - this.allowCreation = checkOnly === false; - } - } - } + props.minorLineHeight = this.body.domProps.root.height - props.majorLabelHeight - (this.options.orientation.axis == 'top' ? this.body.domProps.bottom.height : this.body.domProps.top.height); + props.minorLineWidth = 1; // TODO: really calculate width + props.majorLineHeight = props.minorLineHeight + props.majorLabelHeight; + props.majorLineWidth = 1; // TODO: really calculate width - if (show !== false) { - visibleInSet = true; - var value = this._getValue(newPath); + // take foreground and background offline while updating (is almost twice as fast) + var foregroundNextSibling = foreground.nextSibling; + var backgroundNextSibling = background.nextSibling; + foreground.parentNode && foreground.parentNode.removeChild(foreground); + background.parentNode && background.parentNode.removeChild(background); - if (item instanceof Array) { - this._handleArray(item, value, newPath); - } else if (typeof item === 'string') { - this._makeTextInput(item, value, newPath); - } else if (typeof item === 'boolean') { - this._makeCheckbox(item, value, newPath); - } else if (item instanceof Object) { - // collapse the physics options that are not enabled - var draw = true; - if (path.indexOf('physics') !== -1) { - if (this.moduleOptions.physics.solver !== subObj) { - draw = false; - } - } + foreground.style.height = this.props.height + 'px'; - if (draw === true) { - // initially collapse options with an disabled enabled option. - if (item.enabled !== undefined) { - var enabledPath = util.copyAndExtendArray(newPath, 'enabled'); - var enabledValue = this._getValue(enabledPath); - if (enabledValue === true) { - var label = this._makeLabel(subObj, newPath, true); - this._makeItem(newPath, label); - visibleInSet = this._handleObject(item, newPath) || visibleInSet; - } else { - this._makeCheckbox(item, enabledValue, newPath); - } - } else { - var label = this._makeLabel(subObj, newPath, true); - this._makeItem(newPath, label); - visibleInSet = this._handleObject(item, newPath) || visibleInSet; - } - } - } else { - console.error('dont know how to handle', item, subObj, newPath); - } - } - } - } - return visibleInSet; + this._repaintLabels(); + + // put DOM online again (at the same place) + if (foregroundNextSibling) { + parent.insertBefore(foreground, foregroundNextSibling); + } else { + parent.appendChild(foreground); + } + if (backgroundNextSibling) { + this.body.dom.backgroundVertical.insertBefore(background, backgroundNextSibling); + } else { + this.body.dom.backgroundVertical.appendChild(background); + } + + return this._isResized() || parentChanged; + }; + + /** + * Repaint major and minor text labels and vertical grid lines + * @private + */ + TimeAxis.prototype._repaintLabels = function () { + var orientation = this.options.orientation.axis; + + // calculate range and step (step such that we have space for 7 characters per label) + var start = util.convert(this.body.range.start, 'Number'); + var end = util.convert(this.body.range.end, 'Number'); + var timeLabelsize = this.body.util.toTime((this.props.minorCharWidth || 10) * this.options.maxMinorChars).valueOf(); + var minimumStep = timeLabelsize - DateUtil.getHiddenDurationBefore(this.options.moment, this.body.hiddenDates, this.body.range, timeLabelsize); + minimumStep -= this.body.util.toTime(0).valueOf(); + + var step = new TimeStep(new Date(start), new Date(end), minimumStep, this.body.hiddenDates); + step.setMoment(this.options.moment); + if (this.options.format) { + step.setFormat(this.options.format); + } + if (this.options.timeAxis) { + step.setScale(this.options.timeAxis); + } + this.step = step; + + // Move all DOM elements to a "redundant" list, where they + // can be picked for re-use, and clear the lists with lines and texts. + // At the end of the function _repaintLabels, left over elements will be cleaned up + var dom = this.dom; + dom.redundant.lines = dom.lines; + dom.redundant.majorTexts = dom.majorTexts; + dom.redundant.minorTexts = dom.minorTexts; + dom.lines = []; + dom.majorTexts = []; + dom.minorTexts = []; + + var current; + var next; + var x; + var xNext; + var isMajor, nextIsMajor; + var width = 0, + prevWidth; + var line; + var labelMinor; + var xFirstMajorLabel = undefined; + var count = 0; + var MAX = 1000; + var className; + + step.start(); + next = step.getCurrent(); + xNext = this.body.util.toScreen(next); + while (step.hasNext() && count < MAX) { + count++; + + isMajor = step.isMajor(); + className = step.getClassName(); + labelMinor = step.getLabelMinor(); + + current = next; + x = xNext; + + step.next(); + next = step.getCurrent(); + nextIsMajor = step.isMajor(); + xNext = this.body.util.toScreen(next); + + prevWidth = width; + width = xNext - x; + var showMinorGrid = width >= prevWidth * 0.4; // prevent displaying of the 31th of the month on a scale of 5 days + + if (this.options.showMinorLabels && showMinorGrid) { + var label = this._repaintMinorText(x, labelMinor, orientation, className); + label.style.width = width + 'px'; // set width to prevent overflow } - /** - * handle the array type of option - * @param optionName - * @param arr - * @param value - * @param path - * @private - */ - }, { - key: '_handleArray', - value: function _handleArray(arr, value, path) { - if (typeof arr[0] === 'string' && arr[0] === 'color') { - this._makeColorField(arr, value, path); - if (arr[1] !== value) { - this.changedOptions.push({ path: path, value: value }); - } - } else if (typeof arr[0] === 'string') { - this._makeDropdown(arr, value, path); - if (arr[0] !== value) { - this.changedOptions.push({ path: path, value: value }); + if (isMajor && this.options.showMajorLabels) { + if (x > 0) { + if (xFirstMajorLabel == undefined) { + xFirstMajorLabel = x; } - } else if (typeof arr[0] === 'number') { - this._makeRange(arr, value, path); - if (arr[0] !== value) { - this.changedOptions.push({ path: path, value: Number(value) }); + label = this._repaintMajorText(x, step.getLabelMajor(), orientation, className); + } + line = this._repaintMajorLine(x, width, orientation, className); + } else { + // minor line + if (showMinorGrid) { + line = this._repaintMinorLine(x, width, orientation, className); + } else { + if (line) { + // adjust the width of the previous grid + line.style.width = parseInt(line.style.width) + width + 'px'; } } } + } - /** - * called to update the network with the new settings. - * @param value - * @param path - * @private - */ - }, { - key: '_update', - value: function _update(value, path) { - var options = this._constructOptions(value, path); + if (count === MAX && !warnedForOverflow) { + console.warn('Something is wrong with the Timeline scale. Limited drawing of grid lines to ' + MAX + ' lines.'); + warnedForOverflow = true; + } - if (this.parent.body && this.parent.body.emitter && this.parent.body.emitter.emit) { - this.parent.body.emitter.emit("configChange", options); + // create a major label on the left when needed + if (this.options.showMajorLabels) { + var leftTime = this.body.util.toTime(0), + leftText = step.getLabelMajor(leftTime), + widthText = leftText.length * (this.props.majorCharWidth || 10) + 10; // upper bound estimation + + if (xFirstMajorLabel == undefined || widthText < xFirstMajorLabel) { + this._repaintMajorText(0, leftText, orientation, className); + } + } + + // Cleanup leftover DOM elements from the redundant list + util.forEach(this.dom.redundant, function (arr) { + while (arr.length) { + var elem = arr.pop(); + if (elem && elem.parentNode) { + elem.parentNode.removeChild(elem); } - this.initialized = true; - this.parent.setOptions(options); } - }, { - key: '_constructOptions', - value: function _constructOptions(value, path) { - var optionsObj = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; + }); + }; - var pointer = optionsObj; + /** + * Create a minor label for the axis at position x + * @param {Number} x + * @param {String} text + * @param {String} orientation "top" or "bottom" (default) + * @param {String} className + * @return {Element} Returns the HTML element of the created label + * @private + */ + TimeAxis.prototype._repaintMinorText = function (x, text, orientation, className) { + // reuse redundant label + var label = this.dom.redundant.minorTexts.shift(); - // when dropdown boxes can be string or boolean, we typecast it into correct types - value = value === 'true' ? true : value; - value = value === 'false' ? false : value; + if (!label) { + // create new label + var content = document.createTextNode(''); + label = document.createElement('div'); + label.appendChild(content); + this.dom.foreground.appendChild(label); + } + this.dom.minorTexts.push(label); - for (var i = 0; i < path.length; i++) { - if (path[i] !== 'global') { - if (pointer[path[i]] === undefined) { - pointer[path[i]] = {}; - } - if (i !== path.length - 1) { - pointer = pointer[path[i]]; - } else { - pointer[path[i]] = value; - } - } - } - return optionsObj; - } - }, { - key: '_printOptions', - value: function _printOptions() { - var options = this.getOptions(); - this.optionsContainer.innerHTML = '
var options = ' + JSON.stringify(options, null, 2) + '
'; - } - }, { - key: 'getOptions', - value: function getOptions() { - var options = {}; - for (var i = 0; i < this.changedOptions.length; i++) { - this._constructOptions(this.changedOptions[i].value, this.changedOptions[i].path, options); + label.childNodes[0].nodeValue = text; + + label.style.top = orientation == 'top' ? this.props.majorLabelHeight + 'px' : '0'; + label.style.left = x + 'px'; + label.className = 'vis-text vis-minor ' + className; + //label.title = title; // TODO: this is a heavy operation + + return label; + }; + + /** + * Create a Major label for the axis at position x + * @param {Number} x + * @param {String} text + * @param {String} orientation "top" or "bottom" (default) + * @param {String} className + * @return {Element} Returns the HTML element of the created label + * @private + */ + TimeAxis.prototype._repaintMajorText = function (x, text, orientation, className) { + // reuse redundant label + var label = this.dom.redundant.majorTexts.shift(); + + if (!label) { + // create label + var content = document.createTextNode(text); + label = document.createElement('div'); + label.appendChild(content); + this.dom.foreground.appendChild(label); + } + this.dom.majorTexts.push(label); + + label.childNodes[0].nodeValue = text; + label.className = 'vis-text vis-major ' + className; + //label.title = title; // TODO: this is a heavy operation + + label.style.top = orientation == 'top' ? '0' : this.props.minorLabelHeight + 'px'; + label.style.left = x + 'px'; + + return label; + }; + + /** + * Create a minor line for the axis at position x + * @param {Number} x + * @param {Number} width + * @param {String} orientation "top" or "bottom" (default) + * @param {String} className + * @return {Element} Returns the created line + * @private + */ + TimeAxis.prototype._repaintMinorLine = function (x, width, orientation, className) { + // reuse redundant line + var line = this.dom.redundant.lines.shift(); + if (!line) { + // create vertical line + line = document.createElement('div'); + this.dom.background.appendChild(line); + } + this.dom.lines.push(line); + + var props = this.props; + if (orientation == 'top') { + line.style.top = props.majorLabelHeight + 'px'; + } else { + line.style.top = this.body.domProps.top.height + 'px'; + } + line.style.height = props.minorLineHeight + 'px'; + line.style.left = x - props.minorLineWidth / 2 + 'px'; + line.style.width = width + 'px'; + + line.className = 'vis-grid vis-vertical vis-minor ' + className; + + return line; + }; + + /** + * Create a Major line for the axis at position x + * @param {Number} x + * @param {Number} width + * @param {String} orientation "top" or "bottom" (default) + * @param {String} className + * @return {Element} Returns the created line + * @private + */ + TimeAxis.prototype._repaintMajorLine = function (x, width, orientation, className) { + // reuse redundant line + var line = this.dom.redundant.lines.shift(); + if (!line) { + // create vertical line + line = document.createElement('div'); + this.dom.background.appendChild(line); + } + this.dom.lines.push(line); + + var props = this.props; + if (orientation == 'top') { + line.style.top = '0'; + } else { + line.style.top = this.body.domProps.top.height + 'px'; + } + line.style.left = x - props.majorLineWidth / 2 + 'px'; + line.style.height = props.majorLineHeight + 'px'; + line.style.width = width + 'px'; + + line.className = 'vis-grid vis-vertical vis-major ' + className; + + return line; + }; + + /** + * Determine the size of text on the axis (both major and minor axis). + * The size is calculated only once and then cached in this.props. + * @private + */ + TimeAxis.prototype._calculateCharSize = function () { + // Note: We calculate char size with every redraw. Size may change, for + // example when any of the timelines parents had display:none for example. + + // determine the char width and height on the minor axis + if (!this.dom.measureCharMinor) { + this.dom.measureCharMinor = document.createElement('DIV'); + this.dom.measureCharMinor.className = 'vis-text vis-minor vis-measure'; + this.dom.measureCharMinor.style.position = 'absolute'; + + this.dom.measureCharMinor.appendChild(document.createTextNode('0')); + this.dom.foreground.appendChild(this.dom.measureCharMinor); + } + this.props.minorCharHeight = this.dom.measureCharMinor.clientHeight; + this.props.minorCharWidth = this.dom.measureCharMinor.clientWidth; + + // determine the char width and height on the major axis + if (!this.dom.measureCharMajor) { + this.dom.measureCharMajor = document.createElement('DIV'); + this.dom.measureCharMajor.className = 'vis-text vis-major vis-measure'; + this.dom.measureCharMajor.style.position = 'absolute'; + + this.dom.measureCharMajor.appendChild(document.createTextNode('0')); + this.dom.foreground.appendChild(this.dom.measureCharMajor); + } + this.props.majorCharHeight = this.dom.measureCharMajor.clientHeight; + this.props.majorCharWidth = this.dom.measureCharMajor.clientWidth; + }; + + var warnedForOverflow = false; + + module.exports = TimeAxis; + +/***/ }, +/* 42 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var keycharm = __webpack_require__(43); + var Emitter = __webpack_require__(12); + var Hammer = __webpack_require__(22); + var util = __webpack_require__(1); + + /** + * Turn an element into an clickToUse element. + * When not active, the element has a transparent overlay. When the overlay is + * clicked, the mode is changed to active. + * When active, the element is displayed with a blue border around it, and + * the interactive contents of the element can be used. When clicked outside + * the element, the elements mode is changed to inactive. + * @param {Element} container + * @constructor + */ + function Activator(container) { + this.active = false; + + this.dom = { + container: container + }; + + this.dom.overlay = document.createElement('div'); + this.dom.overlay.className = 'vis-overlay'; + + this.dom.container.appendChild(this.dom.overlay); + + this.hammer = Hammer(this.dom.overlay); + this.hammer.on('tap', this._onTapOverlay.bind(this)); + + // block all touch events (except tap) + var me = this; + var events = ['tap', 'doubletap', 'press', 'pinch', 'pan', 'panstart', 'panmove', 'panend']; + events.forEach(function (event) { + me.hammer.on(event, function (event) { + event.stopPropagation(); + }); + }); + + // attach a click event to the window, in order to deactivate when clicking outside the timeline + if (document && document.body) { + this.onClick = function (event) { + if (!_hasParent(event.target, container)) { + me.deactivate(); } - return options; - } - }]); + }; + document.body.addEventListener('click', this.onClick); + } - return Configurator; - })(); + if (this.keycharm !== undefined) { + this.keycharm.destroy(); + } + this.keycharm = keycharm(); - exports['default'] = Configurator; - module.exports = exports['default']; + // keycharm listener only bounded when active) + this.escListener = this.deactivate.bind(this); + } + + // turn into an event emitter + Emitter(Activator.prototype); + + // The currently active activator + Activator.current = null; + + /** + * Destroy the activator. Cleans up all created DOM and event listeners + */ + Activator.prototype.destroy = function () { + this.deactivate(); + + // remove dom + this.dom.overlay.parentNode.removeChild(this.dom.overlay); + + // remove global event listener + if (this.onClick) { + document.body.removeEventListener('click', this.onClick); + } + + // cleanup hammer instances + this.hammer.destroy(); + this.hammer = null; + // FIXME: cleaning up hammer instances doesn't work (Timeline not removed from memory) + }; + + /** + * Activate the element + * Overlay is hidden, element is decorated with a blue shadow border + */ + Activator.prototype.activate = function () { + // we allow only one active activator at a time + if (Activator.current) { + Activator.current.deactivate(); + } + Activator.current = this; -/***/ }, -/* 45 */ -/***/ function(module, exports, __webpack_require__) { + this.active = true; + this.dom.overlay.style.display = 'none'; + util.addClassName(this.dom.container, 'vis-active'); - 'use strict'; + this.emit('change'); + this.emit('activate'); - Object.defineProperty(exports, '__esModule', { - value: true - }); + // ugly hack: bind ESC after emitting the events, as the Network rebinds all + // keyboard events on a 'change' event + this.keycharm.bind('esc', this.escListener); + }; - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + /** + * Deactivate the element + * Overlay is displayed on top of the element + */ + Activator.prototype.deactivate = function () { + this.active = false; + this.dom.overlay.style.display = ''; + util.removeClassName(this.dom.container, 'vis-active'); + this.keycharm.unbind('esc', this.escListener); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + this.emit('change'); + this.emit('deactivate'); + }; - var Hammer = __webpack_require__(20); - var hammerUtil = __webpack_require__(24); - var util = __webpack_require__(1); + /** + * Handle a tap event: activate the container + * @param event + * @private + */ + Activator.prototype._onTapOverlay = function (event) { + // activate the container + this.activate(); + event.stopPropagation(); + }; - var ColorPicker = (function () { - function ColorPicker() { - var pixelRatio = arguments.length <= 0 || arguments[0] === undefined ? 1 : arguments[0]; + /** + * Test whether the element has the requested parent element somewhere in + * its chain of parent nodes. + * @param {HTMLElement} element + * @param {HTMLElement} parent + * @returns {boolean} Returns true when the parent is found somewhere in the + * chain of parent nodes. + * @private + */ + function _hasParent(element, parent) { + while (element) { + if (element === parent) { + return true; + } + element = element.parentNode; + } + return false; + } - _classCallCheck(this, ColorPicker); + module.exports = Activator; - this.pixelRatio = pixelRatio; - this.generated = false; - this.centerCoordinates = { x: 289 / 2, y: 289 / 2 }; - this.r = 289 * 0.49; - this.color = { r: 255, g: 255, b: 255, a: 1.0 }; - this.hueCircle = undefined; - this.initialColor = { r: 255, g: 255, b: 255, a: 1.0 }; - this.previousColor = undefined; - this.applied = false; +/***/ }, +/* 43 */ +/***/ function(module, exports, __webpack_require__) { - // bound by - this.updateCallback = function () {}; - this.closeCallback = function () {}; + var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;"use strict"; + /** + * Created by Alex on 11/6/2014. + */ - // create all DOM elements - this._create(); + // https://github.com/umdjs/umd/blob/master/returnExports.js#L40-L60 + // if the module has no dependencies, the above pattern can be simplified to + (function (root, factory) { + if (true) { + // AMD. Register as an anonymous module. + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals (root is window) + root.keycharm = factory(); } + }(this, function () { - /** - * this inserts the colorPicker into a div from the DOM - * @param container - */ - - _createClass(ColorPicker, [{ - key: 'insertTo', - value: function insertTo(container) { - if (this.hammer !== undefined) { - this.hammer.destroy(); - this.hammer = undefined; - } - this.container = container; - this.container.appendChild(this.frame); - this._bindHammer(); + function keycharm(options) { + var preventDefault = options && options.preventDefault || false; - this._setSize(); - } + var container = options && options.container || window; - /** - * the callback is executed on apply and save. Bind it to the application - * @param callback - */ - }, { - key: 'setUpdateCallback', - value: function setUpdateCallback(callback) { - if (typeof callback === 'function') { - this.updateCallback = callback; - } else { - throw new Error("Function attempted to set as colorPicker update callback is not a function."); - } - } + var _exportFunctions = {}; + var _bound = {keydown:{}, keyup:{}}; + var _keys = {}; + var i; - /** - * the callback is executed on apply and save. Bind it to the application - * @param callback - */ - }, { - key: 'setCloseCallback', - value: function setCloseCallback(callback) { - if (typeof callback === 'function') { - this.closeCallback = callback; - } else { - throw new Error("Function attempted to set as colorPicker closing callback is not a function."); - } - } - }, { - key: '_isColorString', - value: function _isColorString(color) { - var htmlColors = { 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' }; - if (typeof color === 'string') { - return htmlColors[color]; - } - } + // a - z + for (i = 97; i <= 122; i++) {_keys[String.fromCharCode(i)] = {code:65 + (i - 97), shift: false};} + // A - Z + for (i = 65; i <= 90; i++) {_keys[String.fromCharCode(i)] = {code:i, shift: true};} + // 0 - 9 + for (i = 0; i <= 9; i++) {_keys['' + i] = {code:48 + i, shift: false};} + // F1 - F12 + for (i = 1; i <= 12; i++) {_keys['F' + i] = {code:111 + i, shift: false};} + // num0 - num9 + for (i = 0; i <= 9; i++) {_keys['num' + i] = {code:96 + i, shift: false};} - /** - * Set the color of the colorPicker - * Supported formats: - * 'red' --> HTML color string - * '#ffffff' --> hex string - * 'rbg(255,255,255)' --> rgb string - * 'rgba(255,255,255,1.0)' --> rgba string - * {r:255,g:255,b:255} --> rgb object - * {r:255,g:255,b:255,a:1.0} --> rgba object - * @param color - * @param setInitial - */ - }, { - key: 'setColor', - value: function setColor(color) { - var setInitial = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; + // numpad misc + _keys['num*'] = {code:106, shift: false}; + _keys['num+'] = {code:107, shift: false}; + _keys['num-'] = {code:109, shift: false}; + _keys['num/'] = {code:111, shift: false}; + _keys['num.'] = {code:110, shift: false}; + // arrows + _keys['left'] = {code:37, shift: false}; + _keys['up'] = {code:38, shift: false}; + _keys['right'] = {code:39, shift: false}; + _keys['down'] = {code:40, shift: false}; + // extra keys + _keys['space'] = {code:32, shift: false}; + _keys['enter'] = {code:13, shift: false}; + _keys['shift'] = {code:16, shift: undefined}; + _keys['esc'] = {code:27, shift: false}; + _keys['backspace'] = {code:8, shift: false}; + _keys['tab'] = {code:9, shift: false}; + _keys['ctrl'] = {code:17, shift: false}; + _keys['alt'] = {code:18, shift: false}; + _keys['delete'] = {code:46, shift: false}; + _keys['pageup'] = {code:33, shift: false}; + _keys['pagedown'] = {code:34, shift: false}; + // symbols + _keys['='] = {code:187, shift: false}; + _keys['-'] = {code:189, shift: false}; + _keys[']'] = {code:221, shift: false}; + _keys['['] = {code:219, shift: false}; - if (color === 'none') { - return; - } - var rgba = undefined; - // if a html color shorthand is used, convert to hex - var htmlColor = this._isColorString(color); - if (htmlColor !== undefined) { - color = htmlColor; - } + var down = function(event) {handleEvent(event,'keydown');}; + var up = function(event) {handleEvent(event,'keyup');}; - // check format - if (util.isString(color) === true) { - if (util.isValidRGB(color) === true) { - var rgbaArray = color.substr(4).substr(0, color.length - 5).split(','); - rgba = { r: rgbaArray[0], g: rgbaArray[1], b: rgbaArray[2], a: 1.0 }; - } else if (util.isValidRGBA(color) === true) { - var rgbaArray = color.substr(5).substr(0, color.length - 6).split(','); - rgba = { r: rgbaArray[0], g: rgbaArray[1], b: rgbaArray[2], a: rgbaArray[3] }; - } else if (util.isValidHex(color) === true) { - var rgbObj = util.hexToRGB(color); - rgba = { r: rgbObj.r, g: rgbObj.g, b: rgbObj.b, a: 1.0 }; - } - } else { - if (color instanceof Object) { - if (color.r !== undefined && color.g !== undefined && color.b !== undefined) { - var alpha = color.a !== undefined ? color.a : '1.0'; - rgba = { r: color.r, g: color.g, b: color.b, a: alpha }; + // handle the actualy bound key with the event + var handleEvent = function(event,type) { + if (_bound[type][event.keyCode] !== undefined) { + var bound = _bound[type][event.keyCode]; + for (var i = 0; i < bound.length; i++) { + if (bound[i].shift === undefined) { + bound[i].fn(event); + } + else if (bound[i].shift == true && event.shiftKey == true) { + bound[i].fn(event); + } + else if (bound[i].shift == false && event.shiftKey == false) { + bound[i].fn(event); } } - } - // set color - if (rgba === undefined) { - 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: " + JSON.stringify(color)); - } else { - this._setColor(rgba, setInitial); + if (preventDefault == true) { + event.preventDefault(); + } } - } + }; - /** - * this shows the color picker. - * The hue circle is constructed once and stored. - */ - }, { - key: 'show', - value: function show() { - if (this.closeCallback !== undefined) { - this.closeCallback(); - this.closeCallback = undefined; + // bind a key to a callback + _exportFunctions.bind = function(key, callback, type) { + if (type === undefined) { + type = 'keydown'; } - - this.applied = false; - this.frame.style.display = 'block'; - this._generateHueCircle(); - } - - // ------------------------------------------ PRIVATE ----------------------------- // - - /** - * Hide the picker. Is called by the cancel button. - * Optional boolean to store the previous color for easy access later on. - * @param storePrevious - * @private - */ - }, { - key: '_hide', - value: function _hide() { - var _this = this; - - var storePrevious = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0]; - - // store the previous color for next time; - if (storePrevious === true) { - this.previousColor = util.extend({}, this.color); + if (_keys[key] === undefined) { + throw new Error("unsupported key: " + key); } - - if (this.applied === true) { - this.updateCallback(this.initialColor); + if (_bound[type][_keys[key].code] === undefined) { + _bound[type][_keys[key].code] = []; } + _bound[type][_keys[key].code].push({fn:callback, shift:_keys[key].shift}); + }; - this.frame.style.display = 'none'; - // call the closing callback, restoring the onclick method. - // this is in a setTimeout because it will trigger the show again before the click is done. - setTimeout(function () { - if (_this.closeCallback !== undefined) { - _this.closeCallback(); - _this.closeCallback = undefined; + // bind all keys to a call back (demo purposes) + _exportFunctions.bindAll = function(callback, type) { + if (type === undefined) { + type = 'keydown'; + } + for (var key in _keys) { + if (_keys.hasOwnProperty(key)) { + _exportFunctions.bind(key,callback,type); } - }, 0); - } - - /** - * bound to the save button. Saves and hides. - * @private - */ - }, { - key: '_save', - value: function _save() { - this.updateCallback(this.color); - this.applied = false; - this._hide(); - } - - /** - * Bound to apply button. Saves but does not close. Is undone by the cancel button. - * @private - */ - }, { - key: '_apply', - value: function _apply() { - this.applied = true; - this.updateCallback(this.color); - this._updatePicker(this.color); - } - - /** - * load the color from the previous session. - * @private - */ - }, { - key: '_loadLast', - value: function _loadLast() { - if (this.previousColor !== undefined) { - this.setColor(this.previousColor, false); - } else { - alert("There is no last color to load..."); } - } - - /** - * set the color, place the picker - * @param rgba - * @param setInitial - * @private - */ - }, { - key: '_setColor', - value: function _setColor(rgba) { - var setInitial = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; + }; - // store the initial color - if (setInitial === true) { - this.initialColor = util.extend({}, rgba); + // get the key label from an event + _exportFunctions.getKey = function(event) { + for (var key in _keys) { + if (_keys.hasOwnProperty(key)) { + if (event.shiftKey == true && _keys[key].shift == true && event.keyCode == _keys[key].code) { + return key; + } + else if (event.shiftKey == false && _keys[key].shift == false && event.keyCode == _keys[key].code) { + return key; + } + else if (event.keyCode == _keys[key].code && key == 'shift') { + return key; + } + } } + return "unknown key, currently not supported"; + }; - this.color = rgba; - var hsv = util.RGBToHSV(rgba.r, rgba.g, rgba.b); - - var angleConvert = 2 * Math.PI; - var radius = this.r * hsv.s; - var x = this.centerCoordinates.x + radius * Math.sin(angleConvert * hsv.h); - var y = this.centerCoordinates.y + radius * Math.cos(angleConvert * hsv.h); - - this.colorPickerSelector.style.left = x - 0.5 * this.colorPickerSelector.clientWidth + 'px'; - this.colorPickerSelector.style.top = y - 0.5 * this.colorPickerSelector.clientHeight + 'px'; - - this._updatePicker(rgba); - } - - /** - * bound to opacity control - * @param value - * @private - */ - }, { - key: '_setOpacity', - value: function _setOpacity(value) { - this.color.a = value / 100; - this._updatePicker(this.color); - } - - /** - * bound to brightness control - * @param value - * @private - */ - }, { - key: '_setBrightness', - value: function _setBrightness(value) { - var hsv = util.RGBToHSV(this.color.r, this.color.g, this.color.b); - hsv.v = value / 100; - var rgba = util.HSVToRGB(hsv.h, hsv.s, hsv.v); - rgba['a'] = this.color.a; - this.color = rgba; - this._updatePicker(); - } - - /** - * update the color picker. A black circle overlays the hue circle to mimic the brightness decreasing. - * @param rgba - * @private - */ - }, { - key: '_updatePicker', - value: function _updatePicker() { - var rgba = arguments.length <= 0 || arguments[0] === undefined ? this.color : arguments[0]; - - var hsv = util.RGBToHSV(rgba.r, rgba.g, rgba.b); - var ctx = this.colorPickerCanvas.getContext('2d'); - if (this.pixelRation === undefined) { - this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1); + // unbind either a specific callback from a key or all of them (by leaving callback undefined) + _exportFunctions.unbind = function(key, callback, type) { + if (type === undefined) { + type = 'keydown'; } - ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); + if (_keys[key] === undefined) { + throw new Error("unsupported key: " + key); + } + if (callback !== undefined) { + var newBindings = []; + var bound = _bound[type][_keys[key].code]; + if (bound !== undefined) { + for (var i = 0; i < bound.length; i++) { + if (!(bound[i].fn == callback && bound[i].shift == _keys[key].shift)) { + newBindings.push(_bound[type][_keys[key].code][i]); + } + } + } + _bound[type][_keys[key].code] = newBindings; + } + else { + _bound[type][_keys[key].code] = []; + } + }; - // clear the canvas - var w = this.colorPickerCanvas.clientWidth; - var h = this.colorPickerCanvas.clientHeight; - ctx.clearRect(0, 0, w, h); + // reset all bound variables. + _exportFunctions.reset = function() { + _bound = {keydown:{}, keyup:{}}; + }; - ctx.putImageData(this.hueCircle, 0, 0); - ctx.fillStyle = 'rgba(0,0,0,' + (1 - hsv.v) + ')'; - ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r); - ctx.fill(); + // unbind all listeners and reset all variables. + _exportFunctions.destroy = function() { + _bound = {keydown:{}, keyup:{}}; + container.removeEventListener('keydown', down, true); + container.removeEventListener('keyup', up, true); + }; - this.brightnessRange.value = 100 * hsv.v; - this.opacityRange.value = 100 * rgba.a; + // create listeners. + container.addEventListener('keydown',down,true); + container.addEventListener('keyup',up,true); - 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 + ')'; - } + // return the public functions. + return _exportFunctions; + } - /** - * used by create to set the size of the canvas. - * @private - */ - }, { - key: '_setSize', - value: function _setSize() { - this.colorPickerCanvas.style.width = '100%'; - this.colorPickerCanvas.style.height = '100%'; + return keycharm; + })); - this.colorPickerCanvas.width = 289 * this.pixelRatio; - this.colorPickerCanvas.height = 289 * this.pixelRatio; - } - /** - * create all dom elements - * TODO: cleanup, lots of similar dom elements - * @private - */ - }, { - key: '_create', - value: function _create() { - 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); +/***/ }, +/* 44 */ +/***/ function(module, exports, __webpack_require__) { - if (!this.colorPickerCanvas.getContext) { - var noCanvas = document.createElement('DIV'); - noCanvas.style.color = 'red'; - noCanvas.style.fontWeight = 'bold'; - noCanvas.style.padding = '10px'; - noCanvas.innerHTML = 'Error: your browser does not support HTML canvas'; - this.colorPickerCanvas.appendChild(noCanvas); - } else { - var ctx = this.colorPickerCanvas.getContext("2d"); - this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1); + 'use strict'; - this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); - } + var Hammer = __webpack_require__(22); + var util = __webpack_require__(1); + var Component = __webpack_require__(28); + var moment = __webpack_require__(2); + var locales = __webpack_require__(45); - this.colorPickerDiv.className = 'vis-color'; + /** + * A custom time bar + * @param {{range: Range, dom: Object}} body + * @param {Object} [options] Available parameters: + * {number | string} id + * {string} locales + * {string} locale + * @constructor CustomTime + * @extends Component + */ - this.opacityDiv = document.createElement('div'); - this.opacityDiv.className = 'vis-opacity'; + function CustomTime(body, options) { + this.body = body; - this.brightnessDiv = document.createElement('div'); - this.brightnessDiv.className = 'vis-brightness'; + // default options + this.defaultOptions = { + moment: moment, + locales: locales, + locale: 'en', + id: undefined, + title: undefined + }; + this.options = util.extend({}, this.defaultOptions); - this.arrowDiv = document.createElement('div'); - this.arrowDiv.className = 'vis-arrow'; + if (options && options.time) { + this.customTime = options.time; + } else { + this.customTime = new Date(); + } - this.opacityRange = document.createElement('input'); - try { - this.opacityRange.type = 'range'; // Not supported on IE9 - this.opacityRange.min = '0'; - this.opacityRange.max = '100'; - } catch (err) {} - this.opacityRange.value = '100'; - this.opacityRange.className = 'vis-range'; + this.eventParams = {}; // stores state parameters while dragging the bar - this.brightnessRange = document.createElement('input'); - try { - this.brightnessRange.type = 'range'; // Not supported on IE9 - this.brightnessRange.min = '0'; - this.brightnessRange.max = '100'; - } catch (err) {} - this.brightnessRange.value = '100'; - this.brightnessRange.className = 'vis-range'; + this.setOptions(options); - this.opacityDiv.appendChild(this.opacityRange); - this.brightnessDiv.appendChild(this.brightnessRange); + // create the DOM + this._create(); + } - var me = this; - this.opacityRange.onchange = function () { - me._setOpacity(this.value); - }; - this.opacityRange.oninput = function () { - me._setOpacity(this.value); - }; - this.brightnessRange.onchange = function () { - me._setBrightness(this.value); - }; - this.brightnessRange.oninput = function () { - me._setBrightness(this.value); - }; + CustomTime.prototype = new Component(); - this.brightnessLabel = document.createElement("div"); - this.brightnessLabel.className = "vis-label vis-brightness"; - this.brightnessLabel.innerHTML = 'brightness:'; + /** + * Set options for the component. Options will be merged in current options. + * @param {Object} options Available parameters: + * {number | string} id + * {string} locales + * {string} locale + */ + CustomTime.prototype.setOptions = function (options) { + if (options) { + // copy all options that we know + util.selectiveExtend(['moment', 'locale', 'locales', 'id'], this.options, options); + } + }; - this.opacityLabel = document.createElement("div"); - this.opacityLabel.className = "vis-label vis-opacity"; - this.opacityLabel.innerHTML = 'opacity:'; + /** + * Create the DOM for the custom time + * @private + */ + CustomTime.prototype._create = function () { + var bar = document.createElement('div'); + bar['custom-time'] = this; + bar.className = 'vis-custom-time ' + (this.options.id || ''); + bar.style.position = 'absolute'; + bar.style.top = '0px'; + bar.style.height = '100%'; + this.bar = bar; - this.newColorDiv = document.createElement("div"); - this.newColorDiv.className = "vis-new-color"; - this.newColorDiv.innerHTML = 'new'; + var drag = document.createElement('div'); + drag.style.position = 'relative'; + drag.style.top = '0px'; + drag.style.left = '-10px'; + drag.style.height = '100%'; + drag.style.width = '20px'; + bar.appendChild(drag); - this.initialColorDiv = document.createElement("div"); - this.initialColorDiv.className = "vis-initial-color"; - this.initialColorDiv.innerHTML = 'initial'; + // attach event listeners + this.hammer = new Hammer(drag); + this.hammer.on('panstart', this._onDragStart.bind(this)); + this.hammer.on('panmove', this._onDrag.bind(this)); + this.hammer.on('panend', this._onDragEnd.bind(this)); + this.hammer.get('pan').set({ threshold: 5, direction: Hammer.DIRECTION_HORIZONTAL }); + }; - this.cancelButton = document.createElement("div"); - this.cancelButton.className = "vis-button vis-cancel"; - this.cancelButton.innerHTML = 'cancel'; - this.cancelButton.onclick = this._hide.bind(this, false); + /** + * Destroy the CustomTime bar + */ + CustomTime.prototype.destroy = function () { + this.hide(); - this.applyButton = document.createElement("div"); - this.applyButton.className = "vis-button vis-apply"; - this.applyButton.innerHTML = 'apply'; - this.applyButton.onclick = this._apply.bind(this); + this.hammer.destroy(); + this.hammer = null; - this.saveButton = document.createElement("div"); - this.saveButton.className = "vis-button vis-save"; - this.saveButton.innerHTML = 'save'; - this.saveButton.onclick = this._save.bind(this); + this.body = null; + }; - this.loadButton = document.createElement("div"); - this.loadButton.className = "vis-button vis-load"; - this.loadButton.innerHTML = 'load last'; - this.loadButton.onclick = this._loadLast.bind(this); + /** + * Repaint the component + * @return {boolean} Returns true if the component is resized + */ + CustomTime.prototype.redraw = function () { + var parent = this.body.dom.backgroundVertical; + if (this.bar.parentNode != parent) { + // attach to the dom + if (this.bar.parentNode) { + this.bar.parentNode.removeChild(this.bar); + } + parent.appendChild(this.bar); + } - 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); + var x = this.body.util.toScreen(this.customTime); - this.frame.appendChild(this.cancelButton); - this.frame.appendChild(this.applyButton); - this.frame.appendChild(this.saveButton); - this.frame.appendChild(this.loadButton); + var locale = this.options.locales[this.options.locale]; + if (!locale) { + if (!this.warned) { + console.log('WARNING: options.locales[\'' + this.options.locale + '\'] not found. See http://visjs.org/docs/timeline.html#Localization'); + this.warned = true; } + locale = this.options.locales['en']; // fall back on english when not available + } - /** - * bind hammer to the color picker - * @private - */ - }, { - key: '_bindHammer', - value: function _bindHammer() { - var _this2 = this; + var title = this.options.title; + // To hide the title completely use empty string ''. + if (title === undefined) { + title = locale.time + ': ' + this.options.moment(this.customTime).format('dddd, MMMM Do YYYY, H:mm:ss'); + title = title.charAt(0).toUpperCase() + title.substring(1); + } - this.drag = {}; - this.pinch = {}; - this.hammer = new Hammer(this.colorPickerCanvas); - this.hammer.get('pinch').set({ enable: true }); + this.bar.style.left = x + 'px'; + this.bar.title = title; - hammerUtil.onTouch(this.hammer, function (event) { - _this2._moveSelector(event); - }); - this.hammer.on('tap', function (event) { - _this2._moveSelector(event); - }); - this.hammer.on('panstart', function (event) { - _this2._moveSelector(event); - }); - this.hammer.on('panmove', function (event) { - _this2._moveSelector(event); - }); - this.hammer.on('panend', function (event) { - _this2._moveSelector(event); - }); - } + return false; + }; - /** - * generate the hue circle. This is relatively heavy (200ms) and is done only once on the first time it is shown. - * @private - */ - }, { - key: '_generateHueCircle', - value: function _generateHueCircle() { - if (this.generated === false) { - var ctx = this.colorPickerCanvas.getContext('2d'); - if (this.pixelRation === undefined) { - this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1); - } - ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); + /** + * Remove the CustomTime from the DOM + */ + CustomTime.prototype.hide = function () { + // remove the line from the DOM + if (this.bar.parentNode) { + this.bar.parentNode.removeChild(this.bar); + } + }; - // clear the canvas - var w = this.colorPickerCanvas.clientWidth; - var h = this.colorPickerCanvas.clientHeight; - ctx.clearRect(0, 0, w, h); + /** + * Set custom time. + * @param {Date | number | string} time + */ + CustomTime.prototype.setCustomTime = function (time) { + this.customTime = util.convert(time, 'Date'); + this.redraw(); + }; - // draw hue circle - var x = undefined, - y = undefined, - hue = undefined, - sat = undefined; - this.centerCoordinates = { x: w * 0.5, y: h * 0.5 }; - this.r = 0.49 * w; - var angleConvert = 2 * Math.PI / 360; - var hfac = 1 / 360; - var sfac = 1 / this.r; - var rgb = undefined; - for (hue = 0; hue < 360; hue++) { - for (sat = 0; sat < this.r; sat++) { - x = this.centerCoordinates.x + sat * Math.sin(angleConvert * hue); - y = this.centerCoordinates.y + sat * Math.cos(angleConvert * hue); - rgb = util.HSVToRGB(hue * hfac, sat * sfac, 1); - ctx.fillStyle = 'rgb(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ')'; - ctx.fillRect(x - 0.5, y - 0.5, 2, 2); - } - } - ctx.strokeStyle = 'rgba(0,0,0,1)'; - ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r); - ctx.stroke(); + /** + * Retrieve the current custom time. + * @return {Date} customTime + */ + CustomTime.prototype.getCustomTime = function () { + return new Date(this.customTime.valueOf()); + }; - this.hueCircle = ctx.getImageData(0, 0, w, h); - } - this.generated = true; - } + /** + * Set custom title. + * @param {Date | number | string} title + */ + CustomTime.prototype.setCustomTitle = function (title) { + this.options.title = title; + }; - /** - * move the selector. This is called by hammer functions. - * - * @param event - * @private - */ - }, { - key: '_moveSelector', - value: function _moveSelector(event) { - var rect = this.colorPickerDiv.getBoundingClientRect(); - var left = event.center.x - rect.left; - var top = event.center.y - rect.top; + /** + * Start moving horizontally + * @param {Event} event + * @private + */ + CustomTime.prototype._onDragStart = function (event) { + this.eventParams.dragging = true; + this.eventParams.customTime = this.customTime; - var centerY = 0.5 * this.colorPickerDiv.clientHeight; - var centerX = 0.5 * this.colorPickerDiv.clientWidth; + event.stopPropagation(); + }; - var x = left - centerX; - var y = top - centerY; + /** + * Perform moving operating. + * @param {Event} event + * @private + */ + CustomTime.prototype._onDrag = function (event) { + if (!this.eventParams.dragging) return; - var angle = Math.atan2(x, y); - var radius = 0.98 * Math.min(Math.sqrt(x * x + y * y), centerX); + var x = this.body.util.toScreen(this.eventParams.customTime) + event.deltaX; + var time = this.body.util.toTime(x); - var newTop = Math.cos(angle) * radius + centerY; - var newLeft = Math.sin(angle) * radius + centerX; + this.setCustomTime(time); - this.colorPickerSelector.style.top = newTop - 0.5 * this.colorPickerSelector.clientHeight + 'px'; - this.colorPickerSelector.style.left = newLeft - 0.5 * this.colorPickerSelector.clientWidth + 'px'; + // fire a timechange event + this.body.emitter.emit('timechange', { + id: this.options.id, + time: new Date(this.customTime.valueOf()) + }); - // set color - var h = angle / (2 * Math.PI); - h = h < 0 ? h + 1 : h; - var s = radius / this.r; - var hsv = util.RGBToHSV(this.color.r, this.color.g, this.color.b); - hsv.h = h; - hsv.s = s; - var rgba = util.HSVToRGB(hsv.h, hsv.s, hsv.v); - rgba['a'] = this.color.a; - this.color = rgba; + event.stopPropagation(); + }; - // update previews - 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 + ')'; + /** + * Stop moving operating. + * @param {Event} event + * @private + */ + CustomTime.prototype._onDragEnd = function (event) { + if (!this.eventParams.dragging) return; + + // fire a timechanged event + this.body.emitter.emit('timechanged', { + id: this.options.id, + time: new Date(this.customTime.valueOf()) + }); + + event.stopPropagation(); + }; + + /** + * Find a custom time from an event target: + * searches for the attribute 'custom-time' in the event target's element tree + * @param {Event} event + * @return {CustomTime | null} customTime + */ + CustomTime.customTimeFromTarget = function (event) { + var target = event.target; + while (target) { + if (target.hasOwnProperty('custom-time')) { + return target['custom-time']; } - }]); + target = target.parentNode; + } - return ColorPicker; - })(); + return null; + }; - exports['default'] = ColorPicker; - module.exports = exports['default']; + module.exports = CustomTime; /***/ }, -/* 46 */ -/***/ function(module, exports, __webpack_require__) { +/* 45 */ +/***/ function(module, exports) { 'use strict'; - Object.defineProperty(exports, '__esModule', { - value: true - }); + // English + exports['en'] = { + current: 'current', + time: 'time' + }; + exports['en_EN'] = exports['en']; + exports['en_US'] = exports['en']; + + // Dutch + exports['nl'] = { + current: 'huidige', + time: 'tijd' + }; + exports['nl_NL'] = exports['nl']; + exports['nl_BE'] = exports['nl']; - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); +/***/ }, +/* 46 */ +/***/ function(module, exports, __webpack_require__) { - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + 'use strict'; var util = __webpack_require__(1); + var Component = __webpack_require__(28); + var moment = __webpack_require__(2); + var locales = __webpack_require__(45); - var errorFound = false; - var allOptions = undefined; - var printStyle = 'background: #FFeeee; color: #dd0000'; /** - * Used to validate options. + * A current time bar + * @param {{range: Range, dom: Object, domProps: Object}} body + * @param {Object} [options] Available parameters: + * {Boolean} [showCurrentTime] + * @constructor CurrentTime + * @extends Component */ + function CurrentTime(body, options) { + this.body = body; - var Validator = (function () { - function Validator() { - _classCallCheck(this, Validator); - } + // default options + this.defaultOptions = { + showCurrentTime: true, - /** - * Main function to be called - * @param options - * @param subObject - * @returns {boolean} - */ + moment: moment, + locales: locales, + locale: 'en' + }; + this.options = util.extend({}, this.defaultOptions); + this.offset = 0; - _createClass(Validator, null, [{ - key: 'validate', - value: function validate(options, referenceOptions, subObject) { - errorFound = false; - allOptions = referenceOptions; - var usedOptions = referenceOptions; - if (subObject !== undefined) { - usedOptions = referenceOptions[subObject]; - } - Validator.parse(options, usedOptions, []); - return errorFound; - } + this._create(); - /** - * Will traverse an object recursively and check every value - * @param options - * @param referenceOptions - * @param path - */ - }, { - key: 'parse', - value: function parse(options, referenceOptions, path) { - for (var option in options) { - if (options.hasOwnProperty(option)) { - Validator.check(option, options, referenceOptions, path); - } - } - } + this.setOptions(options); + } + + CurrentTime.prototype = new Component(); + + /** + * Create the HTML DOM for the current time bar + * @private + */ + CurrentTime.prototype._create = function () { + var bar = document.createElement('div'); + bar.className = 'vis-current-time'; + bar.style.position = 'absolute'; + bar.style.top = '0px'; + bar.style.height = '100%'; - /** - * Check every value. If the value is an object, call the parse function on that object. - * @param option - * @param options - * @param referenceOptions - * @param path - */ - }, { - key: 'check', - value: function check(option, options, referenceOptions, path) { - if (referenceOptions[option] === undefined && referenceOptions.__any__ === undefined) { - Validator.getSuggestion(option, referenceOptions, path); - } else if (referenceOptions[option] === undefined && referenceOptions.__any__ !== undefined) { - // __any__ is a wildcard. Any value is accepted and will be further analysed by reference. - if (Validator.getType(options[option]) === 'object' && referenceOptions['__any__'].__type__ !== undefined) { - // if the any subgroup is not a predefined object int he configurator we do not look deeper into the object. - Validator.checkFields(option, options, referenceOptions, '__any__', referenceOptions['__any__'].__type__, path); - } else { - Validator.checkFields(option, options, referenceOptions, '__any__', referenceOptions['__any__'], path); - } - } else { - // Since all options in the reference are objects, we can check whether they are supposed to be object to look for the __type__ field. - if (referenceOptions[option].__type__ !== undefined) { - // if this should be an object, we check if the correct type has been supplied to account for shorthand options. - Validator.checkFields(option, options, referenceOptions, option, referenceOptions[option].__type__, path); - } else { - Validator.checkFields(option, options, referenceOptions, option, referenceOptions[option], path); - } - } - } + this.bar = bar; + }; - /** - * - * @param {String} option | the option property - * @param {Object} options | The supplied options object - * @param {Object} referenceOptions | The reference options containing all options and their allowed formats - * @param {String} referenceOption | Usually this is the same as option, except when handling an __any__ tag. - * @param {String} refOptionType | This is the type object from the reference options - * @param {Array} path | where in the object is the option - */ - }, { - key: 'checkFields', - value: function checkFields(option, options, referenceOptions, referenceOption, refOptionObj, path) { - var optionType = Validator.getType(options[option]); - var refOptionType = refOptionObj[optionType]; - if (refOptionType !== undefined) { - // if the type is correct, we check if it is supposed to be one of a few select values - if (Validator.getType(refOptionType) === 'array') { - if (refOptionType.indexOf(options[option]) === -1) { - console.log('%cInvalid option detected in "' + option + '".' + ' Allowed values are:' + Validator.print(refOptionType) + ' not "' + options[option] + '". ' + Validator.printLocation(path, option), printStyle); - errorFound = true; - } else if (optionType === 'object' && referenceOption !== "__any__") { - path = util.copyAndExtendArray(path, option); - Validator.parse(options[option], referenceOptions[referenceOption], path); - } - } else if (optionType === 'object' && referenceOption !== "__any__") { - path = util.copyAndExtendArray(path, option); - Validator.parse(options[option], referenceOptions[referenceOption], path); - } - } else if (refOptionObj['any'] === undefined) { - // type of the field is incorrect and the field cannot be any - console.log('%cInvalid type received for "' + option + '". Expected: ' + Validator.print(Object.keys(refOptionObj)) + '. Received [' + optionType + '] "' + options[option] + '"' + Validator.printLocation(path, option), printStyle); - errorFound = true; - } - } - }, { - key: 'getType', - value: function getType(object) { - var type = typeof object; + /** + * Destroy the CurrentTime bar + */ + CurrentTime.prototype.destroy = function () { + this.options.showCurrentTime = false; + this.redraw(); // will remove the bar from the DOM and stop refreshing - if (type === 'object') { - if (object === null) { - return 'null'; - } - if (object instanceof Boolean) { - return 'boolean'; - } - if (object instanceof Number) { - return 'number'; - } - if (object instanceof String) { - return 'string'; - } - if (Array.isArray(object)) { - return 'array'; - } - if (object instanceof Date) { - return 'date'; - } - if (object.nodeType !== undefined) { - return 'dom'; - } - if (object._isAMomentObject === true) { - return 'moment'; - } - return 'object'; - } else if (type === 'number') { - return 'number'; - } else if (type === 'boolean') { - return 'boolean'; - } else if (type === 'string') { - return 'string'; - } else if (type === undefined) { - return 'undefined'; - } - return type; - } - }, { - key: 'getSuggestion', - value: function getSuggestion(option, options, path) { - var localSearch = Validator.findInOptions(option, options, path, false); - var globalSearch = Validator.findInOptions(option, allOptions, [], true); + this.body = null; + }; - var localSearchThreshold = 8; - var globalSearchThreshold = 4; + /** + * Set options for the component. Options will be merged in current options. + * @param {Object} options Available parameters: + * {boolean} [showCurrentTime] + */ + CurrentTime.prototype.setOptions = function (options) { + if (options) { + // copy all options that we know + util.selectiveExtend(['showCurrentTime', 'moment', 'locale', 'locales'], this.options, options); + } + }; - if (localSearch.indexMatch !== undefined) { - console.log('%cUnknown option detected: "' + option + '" in ' + Validator.printLocation(localSearch.path, option, '') + 'Perhaps it was incomplete? Did you mean: "' + localSearch.indexMatch + '"?\n\n', printStyle); - } else if (globalSearch.distance <= globalSearchThreshold && localSearch.distance > globalSearch.distance) { - console.log('%cUnknown option detected: "' + option + '" in ' + Validator.printLocation(localSearch.path, option, '') + 'Perhaps it was misplaced? Matching option found at: ' + Validator.printLocation(globalSearch.path, globalSearch.closestMatch, ''), printStyle); - } else if (localSearch.distance <= localSearchThreshold) { - console.log('%cUnknown option detected: "' + option + '". Did you mean "' + localSearch.closestMatch + '"?' + Validator.printLocation(localSearch.path, option), printStyle); - } else { - console.log('%cUnknown option detected: "' + option + '". Did you mean one of these: ' + Validator.print(Object.keys(options)) + Validator.printLocation(path, option), printStyle); + /** + * Repaint the component + * @return {boolean} Returns true if the component is resized + */ + CurrentTime.prototype.redraw = function () { + if (this.options.showCurrentTime) { + var parent = this.body.dom.backgroundVertical; + if (this.bar.parentNode != parent) { + // attach to the dom + if (this.bar.parentNode) { + this.bar.parentNode.removeChild(this.bar); } + parent.appendChild(this.bar); - errorFound = true; + this.start(); } - /** - * traverse the options in search for a match. - * @param option - * @param options - * @param path - * @param recursive - * @returns {{closestMatch: string, path: Array, distance: number}} - */ - }, { - key: 'findInOptions', - value: function findInOptions(option, options, path) { - var recursive = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3]; + var now = this.options.moment(new Date().valueOf() + this.offset); + var x = this.body.util.toScreen(now); - var min = 1e9; - var closestMatch = ''; - var closestMatchPath = []; - var lowerCaseOption = option.toLowerCase(); - var indexMatch = undefined; - for (var op in options) { - var distance = undefined; - if (options[op].__type__ !== undefined && recursive === true) { - var result = Validator.findInOptions(option, options[op], util.copyAndExtendArray(path, op)); - if (min > result.distance) { - closestMatch = result.closestMatch; - closestMatchPath = result.path; - min = result.distance; - indexMatch = result.indexMatch; - } - } else { - if (op.toLowerCase().indexOf(lowerCaseOption) !== -1) { - indexMatch = op; - } - distance = Validator.levenshteinDistance(option, op); - if (min > distance) { - closestMatch = op; - closestMatchPath = util.copyArray(path); - min = distance; - } - } + var locale = this.options.locales[this.options.locale]; + if (!locale) { + if (!this.warned) { + console.log('WARNING: options.locales[\'' + this.options.locale + '\'] not found. See http://visjs.org/docs/timeline/#Localization'); + this.warned = true; } - return { closestMatch: closestMatch, path: closestMatchPath, distance: min, indexMatch: indexMatch }; + locale = this.options.locales['en']; // fall back on english when not available } - }, { - key: 'printLocation', - value: function printLocation(path, option) { - var prefix = arguments.length <= 2 || arguments[2] === undefined ? 'Problem value found at: \n' : arguments[2]; + var title = locale.current + ' ' + locale.time + ': ' + now.format('dddd, MMMM Do YYYY, H:mm:ss'); + title = title.charAt(0).toUpperCase() + title.substring(1); - var str = '\n\n' + prefix + 'options = {\n'; - for (var i = 0; i < path.length; i++) { - for (var j = 0; j < i + 1; j++) { - str += ' '; - } - str += path[i] + ': {\n'; - } - for (var j = 0; j < path.length + 1; j++) { - str += ' '; - } - str += option + '\n'; - for (var i = 0; i < path.length + 1; i++) { - for (var j = 0; j < path.length - i; j++) { - str += ' '; - } - str += '}\n'; - } - return str + '\n\n'; - } - }, { - key: 'print', - value: function print(options) { - return JSON.stringify(options).replace(/(\")|(\[)|(\])|(,"__type__")/g, "").replace(/(\,)/g, ', '); + this.bar.style.left = x + 'px'; + this.bar.title = title; + } else { + // remove the line from the DOM + if (this.bar.parentNode) { + this.bar.parentNode.removeChild(this.bar); } + this.stop(); + } - // Compute the edit distance between the two given strings - // http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#JavaScript - /* - Copyright (c) 2011 Andrei Mackenzie - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - }, { - key: 'levenshteinDistance', - value: function levenshteinDistance(a, b) { - if (a.length === 0) return b.length; - if (b.length === 0) return a.length; + return false; + }; - var matrix = []; + /** + * Start auto refreshing the current time bar + */ + CurrentTime.prototype.start = function () { + var me = this; - // increment along the first column of each row - var i; - for (i = 0; i <= b.length; i++) { - matrix[i] = [i]; - } + function update() { + me.stop(); - // increment each column in the first row - var j; - for (j = 0; j <= a.length; j++) { - matrix[0][j] = j; - } + // determine interval to refresh + var scale = me.body.range.conversion(me.body.domProps.center.width).scale; + var interval = 1 / scale / 10; + if (interval < 30) interval = 30; + if (interval > 1000) interval = 1000; - // Fill in the rest of the matrix - for (i = 1; i <= b.length; i++) { - for (j = 1; j <= a.length; j++) { - if (b.charAt(i - 1) == a.charAt(j - 1)) { - matrix[i][j] = matrix[i - 1][j - 1]; - } else { - matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution - Math.min(matrix[i][j - 1] + 1, // insertion - matrix[i - 1][j] + 1)); // deletion - } - } - } + me.redraw(); + me.body.emitter.emit('currentTimeTick'); - return matrix[b.length][a.length]; - } - }]); + // start a renderTimer to adjust for the new time + me.currentTimeTimer = setTimeout(update, interval); + } - return Validator; - })(); + update(); + }; - exports['default'] = Validator; - exports.printStyle = printStyle; + /** + * Stop auto refreshing the current time bar + */ + CurrentTime.prototype.stop = function () { + if (this.currentTimeTimer !== undefined) { + clearTimeout(this.currentTimeTimer); + delete this.currentTimeTimer; + } + }; + + /** + * Set a current time. This can be used for example to ensure that a client's + * time is synchronized with a shared server time. + * @param {Date | String | Number} time A Date, unix timestamp, or + * ISO date string. + */ + CurrentTime.prototype.setCurrentTime = function (time) { + var t = util.convert(time, 'Date').valueOf(); + var now = new Date().valueOf(); + this.offset = t - now; + this.redraw(); + }; + + /** + * Get the current time. + * @return {Date} Returns the current time. + */ + CurrentTime.prototype.getCurrentTime = function () { + return new Date(new Date().valueOf() + this.offset); + }; + + module.exports = CurrentTime; /***/ }, /* 47 */ /***/ function(module, exports) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); /** * This object contains all possible options. It will check if the types are correct, if required if the option is one * of the allowed values. @@ -23955,11 +24142,6 @@ return /******/ (function(modules) { // webpackBootstrap * __any__ means that the name of the property does not matter. * __type__ is a required field for all objects and contains the allowed types of all objects */ - 'use strict'; - - Object.defineProperty(exports, '__esModule', { - value: true - }); var string = 'string'; var boolean = 'boolean'; var number = 'number'; @@ -24191,22 +24373,30 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; + var _Configurator = __webpack_require__(20); + + var _Configurator2 = _interopRequireDefault(_Configurator); + + var _Validator = __webpack_require__(26); + + var _Validator2 = _interopRequireDefault(_Validator); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + var Emitter = __webpack_require__(12); - var Hammer = __webpack_require__(20); + var Hammer = __webpack_require__(22); var moment = __webpack_require__(2); var util = __webpack_require__(1); var DataSet = __webpack_require__(8); var DataView = __webpack_require__(10); - var Range = __webpack_require__(23); - var Core = __webpack_require__(27); - var TimeAxis = __webpack_require__(38); - var CurrentTime = __webpack_require__(43); - var CustomTime = __webpack_require__(41); + var Range = __webpack_require__(27); + var Core = __webpack_require__(30); + var TimeAxis = __webpack_require__(41); + var CurrentTime = __webpack_require__(46); + var CustomTime = __webpack_require__(44); var LineGraph = __webpack_require__(49); - var Configurator = __webpack_require__(44); - var Validator = __webpack_require__(46)['default']; - var printStyle = __webpack_require__(46).printStyle; + var printStyle = __webpack_require__(26).printStyle; var allOptions = __webpack_require__(57).allOptions; var configureOptions = __webpack_require__(57).configureOptions; @@ -24326,7 +24516,7 @@ return /******/ (function(modules) { // webpackBootstrap Graph2d.prototype.setOptions = function (options) { // validate options - var errorFound = Validator.validate(options, allOptions); + var errorFound = _Validator2.default.validate(options, allOptions); if (errorFound === true) { console.log('%cErrors have been found in the supplied options object.', printStyle); } @@ -24520,7 +24710,7 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ Graph2d.prototype._createConfigurator = function () { - return new Configurator(this, this.dom.container, configureOptions); + return new _Configurator2.default(this, this.dom.container, configureOptions); }; module.exports = Graph2d; @@ -24531,11 +24721,13 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + var util = __webpack_require__(1); var DOMutil = __webpack_require__(7); var DataSet = __webpack_require__(8); var DataView = __webpack_require__(10); - var Component = __webpack_require__(25); + var Component = __webpack_require__(28); var DataAxis = __webpack_require__(50); var GraphGroup = __webpack_require__(52); var Legend = __webpack_require__(56); @@ -24707,7 +24899,7 @@ return /******/ (function(modules) { // webpackBootstrap util.mergeOptions(this.options, options, 'legend'); if (options.interpolation) { - if (typeof options.interpolation == 'object') { + if (_typeof(options.interpolation) == 'object') { if (options.interpolation.parametrization) { if (options.interpolation.parametrization == 'uniform') { this.options.interpolation.alpha = 0; @@ -25563,7 +25755,7 @@ return /******/ (function(modules) { // webpackBootstrap var util = __webpack_require__(1); var DOMutil = __webpack_require__(7); - var Component = __webpack_require__(25); + var Component = __webpack_require__(28); var DataScale = __webpack_require__(51); /** * A horizontal time axis @@ -26119,12 +26311,12 @@ return /******/ (function(modules) { // webpackBootstrap /* 51 */ /***/ function(module, exports) { + 'use strict'; + /** * Created by ludo on 25-1-16. */ - 'use strict'; - function DataScale(start, end, autoScaleStart, autoScaleEnd, containerHeight, majorCharHeight) { var zeroAlign = arguments.length <= 6 || arguments[6] === undefined ? false : arguments[6]; var formattingFunction = arguments.length <= 7 || arguments[7] === undefined ? false : arguments[7]; @@ -26184,7 +26376,7 @@ return /******/ (function(modules) { // webpackBootstrap var range = this._end - this._start; this.scale = this.containerHeight / range; var minimumStepValue = this.majorCharHeight / this.scale; - var orderOfMagnitude = Math.round(Math.log(range) / Math.LN10); + var orderOfMagnitude = range > 0 ? Math.round(Math.log(range) / Math.LN10) : 0; this.minorStepIdx = -1; this.magnitudefactor = Math.pow(10, orderOfMagnitude); @@ -26363,6 +26555,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + var util = __webpack_require__(1); var DOMutil = __webpack_require__(7); var Bars = __webpack_require__(53); @@ -26444,7 +26638,7 @@ return /******/ (function(modules) { // webpackBootstrap util.mergeOptions(this.options, options, 'shaded'); if (options.interpolation) { - if (typeof options.interpolation == 'object') { + if (_typeof(options.interpolation) == 'object') { if (options.interpolation.parametrization) { if (options.interpolation.parametrization == 'uniform') { this.options.interpolation.alpha = 0; @@ -26785,6 +26979,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + var DOMutil = __webpack_require__(7); function Points(groupId, options) {} @@ -26808,7 +27004,7 @@ return /******/ (function(modules) { // webpackBootstrap DOMutil.drawPoint(dataset[i].screen_x + offset, dataset[i].screen_y, getGroupTemplate(group), framework.svgElements, framework.svg, dataset[i].label); } else { var callbackResult = callback(dataset[i], group); // result might be true, false or an object - if (callbackResult === true || typeof callbackResult === 'object') { + if (callbackResult === true || (typeof callbackResult === 'undefined' ? 'undefined' : _typeof(callbackResult)) === 'object') { DOMutil.drawPoint(dataset[i].screen_x + offset, dataset[i].screen_y, getGroupTemplate(group, callbackResult), framework.svgElements, framework.svg, dataset[i].label); } } @@ -27153,7 +27349,7 @@ return /******/ (function(modules) { // webpackBootstrap var util = __webpack_require__(1); var DOMutil = __webpack_require__(7); - var Component = __webpack_require__(25); + var Component = __webpack_require__(28); /** * Legend for Graph2d @@ -27368,6 +27564,11 @@ return /******/ (function(modules) { // webpackBootstrap /* 57 */ /***/ function(module, exports) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); /** * This object contains all possible options. It will check if the types are correct, if required if the option is one * of the allowed values. @@ -27375,11 +27576,6 @@ return /******/ (function(modules) { // webpackBootstrap * __any__ means that the name of the property does not matter. * __type__ is a required field for all objects and contains the allowed types of all objects */ - 'use strict'; - - Object.defineProperty(exports, '__esModule', { - value: true - }); var string = 'string'; var boolean = 'boolean'; var number = 'number'; @@ -27654,72 +27850,87 @@ return /******/ (function(modules) { // webpackBootstrap /* 58 */ /***/ function(module, exports, __webpack_require__) { - // Load custom shapes into CanvasRenderingContext2D 'use strict'; - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _Images = __webpack_require__(59); + + var _Images2 = _interopRequireDefault(_Images); + + var _Groups = __webpack_require__(60); - var _modulesGroups = __webpack_require__(59); + var _Groups2 = _interopRequireDefault(_Groups); - var _modulesGroups2 = _interopRequireDefault(_modulesGroups); + var _NodesHandler = __webpack_require__(61); - var _modulesNodesHandler = __webpack_require__(60); + var _NodesHandler2 = _interopRequireDefault(_NodesHandler); - var _modulesNodesHandler2 = _interopRequireDefault(_modulesNodesHandler); + var _EdgesHandler = __webpack_require__(81); - var _modulesEdgesHandler = __webpack_require__(80); + var _EdgesHandler2 = _interopRequireDefault(_EdgesHandler); - var _modulesEdgesHandler2 = _interopRequireDefault(_modulesEdgesHandler); + var _PhysicsEngine = __webpack_require__(90); - var _modulesPhysicsEngine = __webpack_require__(89); + var _PhysicsEngine2 = _interopRequireDefault(_PhysicsEngine); - var _modulesPhysicsEngine2 = _interopRequireDefault(_modulesPhysicsEngine); + var _Clustering = __webpack_require__(99); - var _modulesClustering = __webpack_require__(98); + var _Clustering2 = _interopRequireDefault(_Clustering); - var _modulesClustering2 = _interopRequireDefault(_modulesClustering); + var _CanvasRenderer = __webpack_require__(102); - var _modulesCanvasRenderer = __webpack_require__(101); + var _CanvasRenderer2 = _interopRequireDefault(_CanvasRenderer); - var _modulesCanvasRenderer2 = _interopRequireDefault(_modulesCanvasRenderer); + var _Canvas = __webpack_require__(103); - var _modulesCanvas = __webpack_require__(102); + var _Canvas2 = _interopRequireDefault(_Canvas); - var _modulesCanvas2 = _interopRequireDefault(_modulesCanvas); + var _View = __webpack_require__(104); - var _modulesView = __webpack_require__(103); + var _View2 = _interopRequireDefault(_View); - var _modulesView2 = _interopRequireDefault(_modulesView); + var _InteractionHandler = __webpack_require__(105); - var _modulesInteractionHandler = __webpack_require__(104); + var _InteractionHandler2 = _interopRequireDefault(_InteractionHandler); - var _modulesInteractionHandler2 = _interopRequireDefault(_modulesInteractionHandler); + var _SelectionHandler = __webpack_require__(108); - var _modulesSelectionHandler = __webpack_require__(107); + var _SelectionHandler2 = _interopRequireDefault(_SelectionHandler); - var _modulesSelectionHandler2 = _interopRequireDefault(_modulesSelectionHandler); + var _LayoutEngine = __webpack_require__(109); - var _modulesLayoutEngine = __webpack_require__(108); + var _LayoutEngine2 = _interopRequireDefault(_LayoutEngine); - var _modulesLayoutEngine2 = _interopRequireDefault(_modulesLayoutEngine); + var _ManipulationSystem = __webpack_require__(110); - var _modulesManipulationSystem = __webpack_require__(109); + var _ManipulationSystem2 = _interopRequireDefault(_ManipulationSystem); - var _modulesManipulationSystem2 = _interopRequireDefault(_modulesManipulationSystem); + var _Configurator = __webpack_require__(20); - var _sharedConfigurator = __webpack_require__(44); + var _Configurator2 = _interopRequireDefault(_Configurator); - var _sharedConfigurator2 = _interopRequireDefault(_sharedConfigurator); + var _Validator = __webpack_require__(26); - var _sharedValidator = __webpack_require__(46); + var _Validator2 = _interopRequireDefault(_Validator); - var _sharedValidator2 = _interopRequireDefault(_sharedValidator); + var _options = __webpack_require__(111); - var _optionsJs = __webpack_require__(110); + var _KamadaKawai = __webpack_require__(112); - var _modulesKamadaKawaiJs = __webpack_require__(111); + var _KamadaKawai2 = _interopRequireDefault(_KamadaKawai); - var _modulesKamadaKawaiJs2 = _interopRequireDefault(_modulesKamadaKawaiJs); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + // Load custom shapes into CanvasRenderingContext2D + __webpack_require__(114); + + var Emitter = __webpack_require__(12); + var util = __webpack_require__(1); + var DataSet = __webpack_require__(8); + var DataView = __webpack_require__(10); + var dotparser = __webpack_require__(115); + var gephiParser = __webpack_require__(116); + var Activator = __webpack_require__(42); + var locales = __webpack_require__(117); /** * @constructor Network @@ -27732,19 +27943,6 @@ return /******/ (function(modules) { // webpackBootstrap * {Array} edges * @param {Object} options Options */ - __webpack_require__(113); - - var Emitter = __webpack_require__(12); - var Hammer = __webpack_require__(20); - var util = __webpack_require__(1); - var DataSet = __webpack_require__(8); - var DataView = __webpack_require__(10); - var dotparser = __webpack_require__(114); - var gephiParser = __webpack_require__(115); - var Images = __webpack_require__(116); - var Activator = __webpack_require__(39); - var locales = __webpack_require__(117); - function Network(container, data, options) { var _this = this; @@ -27808,24 +28006,24 @@ return /******/ (function(modules) { // webpackBootstrap this.bindEventListeners(); // setting up all modules - this.images = new Images(function () { + this.images = new _Images2.default(function () { return _this.body.emitter.emit("_requestRedraw"); }); // object with images - this.groups = new _modulesGroups2['default'](); // object with groups - this.canvas = new _modulesCanvas2['default'](this.body); // DOM handler - this.selectionHandler = new _modulesSelectionHandler2['default'](this.body, this.canvas); // Selection handler - this.interactionHandler = new _modulesInteractionHandler2['default'](this.body, this.canvas, this.selectionHandler); // Interaction handler handles all the hammer bindings (that are bound by canvas), key - this.view = new _modulesView2['default'](this.body, this.canvas); // camera handler, does animations and zooms - this.renderer = new _modulesCanvasRenderer2['default'](this.body, this.canvas); // renderer, starts renderloop, has events that modules can hook into - this.physics = new _modulesPhysicsEngine2['default'](this.body); // physics engine, does all the simulations - this.layoutEngine = new _modulesLayoutEngine2['default'](this.body); // layout engine for inital layout and hierarchical layout - this.clustering = new _modulesClustering2['default'](this.body); // clustering api - this.manipulation = new _modulesManipulationSystem2['default'](this.body, this.canvas, this.selectionHandler); // data manipulation system - - this.nodesHandler = new _modulesNodesHandler2['default'](this.body, this.images, this.groups, this.layoutEngine); // Handle adding, deleting and updating of nodes as well as global options - this.edgesHandler = new _modulesEdgesHandler2['default'](this.body, this.images, this.groups); // Handle adding, deleting and updating of edges as well as global options - - this.body.modules["kamadaKawai"] = new _modulesKamadaKawaiJs2['default'](this.body, 150, 0.05); // Layouting algorithm. + this.groups = new _Groups2.default(); // object with groups + this.canvas = new _Canvas2.default(this.body); // DOM handler + this.selectionHandler = new _SelectionHandler2.default(this.body, this.canvas); // Selection handler + this.interactionHandler = new _InteractionHandler2.default(this.body, this.canvas, this.selectionHandler); // Interaction handler handles all the hammer bindings (that are bound by canvas), key + this.view = new _View2.default(this.body, this.canvas); // camera handler, does animations and zooms + this.renderer = new _CanvasRenderer2.default(this.body, this.canvas); // renderer, starts renderloop, has events that modules can hook into + this.physics = new _PhysicsEngine2.default(this.body); // physics engine, does all the simulations + this.layoutEngine = new _LayoutEngine2.default(this.body); // layout engine for inital layout and hierarchical layout + this.clustering = new _Clustering2.default(this.body); // clustering api + this.manipulation = new _ManipulationSystem2.default(this.body, this.canvas, this.selectionHandler); // data manipulation system + + this.nodesHandler = new _NodesHandler2.default(this.body, this.images, this.groups, this.layoutEngine); // Handle adding, deleting and updating of nodes as well as global options + this.edgesHandler = new _EdgesHandler2.default(this.body, this.images, this.groups); // Handle adding, deleting and updating of edges as well as global options + + this.body.modules["kamadaKawai"] = new _KamadaKawai2.default(this.body, 150, 0.05); // Layouting algorithm. this.body.modules["clustering"] = this.clustering; // create the DOM elements @@ -27849,9 +28047,9 @@ return /******/ (function(modules) { // webpackBootstrap var _this2 = this; if (options !== undefined) { - var errorFound = _sharedValidator2['default'].validate(options, _optionsJs.allOptions); + var errorFound = _Validator2.default.validate(options, _options.allOptions); if (errorFound === true) { - console.log('%cErrors have been found in the supplied options object.', _sharedValidator.printStyle); + console.log('%cErrors have been found in the supplied options object.', _Validator.printStyle); } // copy the global fields over @@ -27884,7 +28082,7 @@ return /******/ (function(modules) { // webpackBootstrap if ('configure' in options) { if (!this.configurator) { - this.configurator = new _sharedConfigurator2['default'](this, this.body.container, _optionsJs.configureOptions, this.canvas.pixelRatio); + this.configurator = new _Configurator2.default(this, this.body.container, _options.configureOptions, this.canvas.pixelRatio); } this.configurator.setOptions(options.configure); @@ -28285,6 +28483,136 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, /* 59 */ +/***/ function(module, exports) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + /** + * @class Images + * This class loads images and keeps them stored. + */ + + var Images = function () { + function Images(callback) { + _classCallCheck(this, Images); + + this.images = {}; + this.imageBroken = {}; + this.callback = callback; + } + + /** + * @param {string} url The Url to cache the image as + * @return {Image} imageToLoadBrokenUrlOn The image object + */ + + + _createClass(Images, [{ + key: "_addImageToCache", + value: function _addImageToCache(url, imageToCache) { + // IE11 fix -- thanks dponch! + if (imageToCache.width === 0) { + document.body.appendChild(imageToCache); + imageToCache.width = imageToCache.offsetWidth; + imageToCache.height = imageToCache.offsetHeight; + document.body.removeChild(imageToCache); + } + + this.images[url] = imageToCache; + } + + /** + * @param {string} url The original Url that failed to load, if the broken image is successfully loaded it will be added to the cache using this Url as the key so that subsequent requests for this Url will return the broken image + * @param {string} brokenUrl Url the broken image to try and load + * @return {Image} imageToLoadBrokenUrlOn The image object + */ + + }, { + key: "_tryloadBrokenUrl", + value: function _tryloadBrokenUrl(url, brokenUrl, imageToLoadBrokenUrlOn) { + var _this = this; + + //If any of the parameters aren't specified then exit the function because nothing constructive can be done + if (url === undefined || brokenUrl === undefined || imageToLoadBrokenUrlOn === undefined) return; + + //Clear the old subscription to the error event and put a new in place that only handle errors in loading the brokenImageUrl + imageToLoadBrokenUrlOn.onerror = function () { + console.error("Could not load brokenImage:", brokenUrl); + //Add an empty image to the cache so that when subsequent load calls are made for the url we don't try load the image and broken image again + _this._addImageToCache(url, new Image()); + }; + + //Set the source of the image to the brokenUrl, this is actually what kicks off the loading of the broken image + imageToLoadBrokenUrlOn.src = brokenUrl; + } + + /** + * @return {Image} imageToRedrawWith The images that will be passed to the callback when it is invoked + */ + + }, { + key: "_redrawWithImage", + value: function _redrawWithImage(imageToRedrawWith) { + if (this.callback) { + this.callback(imageToRedrawWith); + } + } + + /** + * @param {string} url Url of the image + * @param {string} brokenUrl Url of an image to use if the url image is not found + * @return {Image} img The image object + */ + + }, { + key: "load", + value: function load(url, brokenUrl, id) { + var _this2 = this; + + //Try and get the image from the cache, if successful then return the cached image + var cachedImage = this.images[url]; + if (cachedImage) return cachedImage; + + //Create a new image + var img = new Image(); + + //Subscribe to the event that is raised if the image loads successfully + img.onload = function () { + //Add the image to the cache and then request a redraw + _this2._addImageToCache(url, img); + _this2._redrawWithImage(img); + }; + + //Subscribe to the event that is raised if the image fails to load + img.onerror = function () { + console.error("Could not load image:", url); + //Try and load the image specified by the brokenUrl using + _this2._tryloadBrokenUrl(url, brokenUrl, img); + }; + + //Set the source of the image to the url, this is actuall what kicks off the loading of the image + img.src = url; + + //Return the new image + return img; + } + }]); + + return Images; + }(); + + exports.default = Images; + +/***/ }, +/* 60 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -28293,7 +28621,7 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -28304,7 +28632,7 @@ return /******/ (function(modules) { // webpackBootstrap * This class can store groups and options specific for groups. */ - var Groups = (function () { + var Groups = function () { function Groups() { _classCallCheck(this, Groups); @@ -28365,6 +28693,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Clear all groups */ + }, { key: "clear", value: function clear() { @@ -28378,6 +28707,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {*} groupname Can be a number, string, Date, etc. * @return {Object} group The created group, containing all group options */ + }, { key: "get", value: function get(groupname) { @@ -28392,10 +28722,10 @@ return /******/ (function(modules) { // webpackBootstrap this.groups[groupname] = group; } else { // create new group - var index = this.defaultIndex % this.defaultGroups.length; + var _index = this.defaultIndex % this.defaultGroups.length; this.defaultIndex++; group = {}; - group.color = this.defaultGroups[index]; + group.color = this.defaultGroups[_index]; this.groups[groupname] = group; } } @@ -28410,6 +28740,7 @@ return /******/ (function(modules) { // webpackBootstrap * backgroundColor, etc. * @return {Object} group The created group object */ + }, { key: "add", value: function add(groupName, style) { @@ -28420,40 +28751,39 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Groups; - })(); + }(); - exports["default"] = Groups; - module.exports = exports["default"]; + exports.default = Groups; /***/ }, -/* 60 */ +/* 61 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _Node = __webpack_require__(62); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var _Node2 = _interopRequireDefault(_Node); - var _componentsNode = __webpack_require__(61); + var _Label = __webpack_require__(63); - var _componentsNode2 = _interopRequireDefault(_componentsNode); + var _Label2 = _interopRequireDefault(_Label); - var _componentsSharedLabel = __webpack_require__(62); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var _componentsSharedLabel2 = _interopRequireDefault(_componentsSharedLabel); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var util = __webpack_require__(1); var DataSet = __webpack_require__(8); var DataView = __webpack_require__(10); - var NodesHandler = (function () { + var NodesHandler = function () { function NodesHandler(body, images, groups, layoutEngine) { var _this = this; @@ -28507,7 +28837,7 @@ return /******/ (function(modules) { // webpackBootstrap background: 'none', strokeWidth: 0, // px strokeColor: '#ffffff', - align: 'horizontal' + align: 'center' }, group: undefined, hidden: false, @@ -28591,7 +28921,7 @@ return /******/ (function(modules) { // webpackBootstrap key: 'setOptions', value: function setOptions(options) { if (options !== undefined) { - _componentsNode2['default'].parseOptions(this.options, options); + _Node2.default.parseOptions(this.options, options); // update the shape in all nodes if (options.shape !== undefined) { @@ -28604,20 +28934,20 @@ return /******/ (function(modules) { // webpackBootstrap // update the font in all nodes if (options.font !== undefined) { - _componentsSharedLabel2['default'].parseOptions(this.options.font, options); - for (var nodeId in this.body.nodes) { - if (this.body.nodes.hasOwnProperty(nodeId)) { - this.body.nodes[nodeId].updateLabelModule(); - this.body.nodes[nodeId]._reset(); + _Label2.default.parseOptions(this.options.font, options); + for (var _nodeId in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(_nodeId)) { + this.body.nodes[_nodeId].updateLabelModule(); + this.body.nodes[_nodeId]._reset(); } } } // update the shape size in all nodes if (options.size !== undefined) { - for (var nodeId in this.body.nodes) { - if (this.body.nodes.hasOwnProperty(nodeId)) { - this.body.nodes[nodeId]._reset(); + for (var _nodeId2 in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(_nodeId2)) { + this.body.nodes[_nodeId2]._reset(); } } } @@ -28634,6 +28964,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Array | DataSet | DataView} nodes The data containing the nodes. * @private */ + }, { key: 'setData', value: function setData(nodes) { @@ -28688,12 +29019,13 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Number[] | String[]} ids * @private */ + }, { key: 'add', value: function add(ids) { var doNotEmit = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; - var id = undefined; + var id = void 0; var newNodes = []; for (var i = 0; i < ids.length; i++) { id = ids[i]; @@ -28715,6 +29047,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Number[] | String[]} ids * @private */ + }, { key: 'update', value: function update(ids, changedData) { @@ -28746,6 +29079,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Number[] | String[]} ids * @private */ + }, { key: 'remove', value: function remove(ids) { @@ -28764,10 +29098,11 @@ return /******/ (function(modules) { // webpackBootstrap * @param properties * @param constructorClass */ + }, { key: 'create', value: function create(properties) { - var constructorClass = arguments.length <= 1 || arguments[1] === undefined ? _componentsNode2['default'] : arguments[1]; + var constructorClass = arguments.length <= 1 || arguments[1] === undefined ? _Node2.default : arguments[1]; return new constructorClass(properties, this.body, this.images, this.groups, this.options); } @@ -28798,6 +29133,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param ids --> optional, can be array of nodeIds, can be string * @returns {{}} */ + }, { key: 'getPositions', value: function getPositions(ids) { @@ -28812,14 +29148,14 @@ return /******/ (function(modules) { // webpackBootstrap } } else { if (this.body.nodes[ids] !== undefined) { - var node = this.body.nodes[ids]; - dataArray[ids] = { x: Math.round(node.x), y: Math.round(node.y) }; + var _node = this.body.nodes[ids]; + dataArray[ids] = { x: Math.round(_node.x), y: Math.round(_node.y) }; } } } else { - for (var i = 0; i < this.body.nodeIndices.length; i++) { - var node = this.body.nodes[this.body.nodeIndices[i]]; - dataArray[this.body.nodeIndices[i]] = { x: Math.round(node.x), y: Math.round(node.y) }; + for (var _i = 0; _i < this.body.nodeIndices.length; _i++) { + var _node2 = this.body.nodes[this.body.nodeIndices[_i]]; + dataArray[this.body.nodeIndices[_i]] = { x: Math.round(_node2.x), y: Math.round(_node2.y) }; } } return dataArray; @@ -28828,6 +29164,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Load the XY positions of the nodes into the dataset. */ + }, { key: 'storePositions', value: function storePositions() { @@ -28851,6 +29188,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param nodeId * @returns {j|*} */ + }, { key: 'getBoundingBox', value: function getBoundingBox(nodeId) { @@ -28864,6 +29202,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param nodeId * @returns {Array} */ + }, { key: 'getConnectedNodes', value: function getConnectedNodes(nodeId) { @@ -28896,6 +29235,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param nodeId * @returns {*} */ + }, { key: 'getConnectedEdges', value: function getConnectedEdges(nodeId) { @@ -28917,6 +29257,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param Number x * @param Number y */ + }, { key: 'moveNode', value: function moveNode(nodeId, x, y) { @@ -28935,90 +29276,89 @@ return /******/ (function(modules) { // webpackBootstrap }]); return NodesHandler; - })(); + }(); - exports['default'] = NodesHandler; - module.exports = exports['default']; + exports.default = NodesHandler; /***/ }, -/* 61 */ +/* 62 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _Label = __webpack_require__(63); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var _Label2 = _interopRequireDefault(_Label); - var _sharedLabel = __webpack_require__(62); + var _Box = __webpack_require__(64); - var _sharedLabel2 = _interopRequireDefault(_sharedLabel); + var _Box2 = _interopRequireDefault(_Box); - var _nodesShapesBox = __webpack_require__(63); + var _Circle = __webpack_require__(66); - var _nodesShapesBox2 = _interopRequireDefault(_nodesShapesBox); + var _Circle2 = _interopRequireDefault(_Circle); - var _nodesShapesCircle = __webpack_require__(65); + var _CircularImage = __webpack_require__(68); - var _nodesShapesCircle2 = _interopRequireDefault(_nodesShapesCircle); + var _CircularImage2 = _interopRequireDefault(_CircularImage); - var _nodesShapesCircularImage = __webpack_require__(67); + var _Database = __webpack_require__(69); - var _nodesShapesCircularImage2 = _interopRequireDefault(_nodesShapesCircularImage); + var _Database2 = _interopRequireDefault(_Database); - var _nodesShapesDatabase = __webpack_require__(68); + var _Diamond = __webpack_require__(70); - var _nodesShapesDatabase2 = _interopRequireDefault(_nodesShapesDatabase); + var _Diamond2 = _interopRequireDefault(_Diamond); - var _nodesShapesDiamond = __webpack_require__(69); + var _Dot = __webpack_require__(72); - var _nodesShapesDiamond2 = _interopRequireDefault(_nodesShapesDiamond); + var _Dot2 = _interopRequireDefault(_Dot); - var _nodesShapesDot = __webpack_require__(71); + var _Ellipse = __webpack_require__(73); - var _nodesShapesDot2 = _interopRequireDefault(_nodesShapesDot); + var _Ellipse2 = _interopRequireDefault(_Ellipse); - var _nodesShapesEllipse = __webpack_require__(72); + var _Icon = __webpack_require__(74); - var _nodesShapesEllipse2 = _interopRequireDefault(_nodesShapesEllipse); + var _Icon2 = _interopRequireDefault(_Icon); - var _nodesShapesIcon = __webpack_require__(73); + var _Image = __webpack_require__(75); - var _nodesShapesIcon2 = _interopRequireDefault(_nodesShapesIcon); + var _Image2 = _interopRequireDefault(_Image); - var _nodesShapesImage = __webpack_require__(74); + var _Square = __webpack_require__(76); - var _nodesShapesImage2 = _interopRequireDefault(_nodesShapesImage); + var _Square2 = _interopRequireDefault(_Square); - var _nodesShapesSquare = __webpack_require__(75); + var _Star = __webpack_require__(77); - var _nodesShapesSquare2 = _interopRequireDefault(_nodesShapesSquare); + var _Star2 = _interopRequireDefault(_Star); - var _nodesShapesStar = __webpack_require__(76); + var _Text = __webpack_require__(78); - var _nodesShapesStar2 = _interopRequireDefault(_nodesShapesStar); + var _Text2 = _interopRequireDefault(_Text); - var _nodesShapesText = __webpack_require__(77); + var _Triangle = __webpack_require__(79); - var _nodesShapesText2 = _interopRequireDefault(_nodesShapesText); + var _Triangle2 = _interopRequireDefault(_Triangle); - var _nodesShapesTriangle = __webpack_require__(78); + var _TriangleDown = __webpack_require__(80); - var _nodesShapesTriangle2 = _interopRequireDefault(_nodesShapesTriangle); + var _TriangleDown2 = _interopRequireDefault(_TriangleDown); - var _nodesShapesTriangleDown = __webpack_require__(79); + var _Validator = __webpack_require__(26); - var _nodesShapesTriangleDown2 = _interopRequireDefault(_nodesShapesTriangleDown); + var _Validator2 = _interopRequireDefault(_Validator); - var _sharedValidator = __webpack_require__(46); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var _sharedValidator2 = _interopRequireDefault(_sharedValidator); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var util = __webpack_require__(1); @@ -29048,7 +29388,7 @@ return /******/ (function(modules) { // webpackBootstrap * */ - var Node = (function () { + var Node = function () { function Node(options, body, imagelist, grouplist, globalOptions) { _classCallCheck(this, Node); @@ -29072,7 +29412,7 @@ return /******/ (function(modules) { // webpackBootstrap this.selected = false; this.hover = false; - this.labelModule = new _sharedLabel2['default'](this.body, this.options); + this.labelModule = new _Label2.default(this.body, this.options, false /* Not edge label */); this.setOptions(options); } @@ -29081,6 +29421,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Edge} edge */ + _createClass(Node, [{ key: 'attachEdge', value: function attachEdge(edge) { @@ -29093,6 +29434,7 @@ return /******/ (function(modules) { // webpackBootstrap * Detach a edge from the node * @param {Edge} edge */ + }, { key: 'detachEdge', value: function detachEdge(edge) { @@ -29107,6 +29449,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Object} options an object with options * @param {Object} constants and object with default, global options */ + }, { key: 'setOptions', value: function setOptions(options) { @@ -29183,6 +29526,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param allowDeletion * @param globalOptions */ + }, { key: 'updateLabelModule', value: function updateLabelModule() { @@ -29203,49 +29547,49 @@ return /******/ (function(modules) { // webpackBootstrap // choose draw method depending on the shape switch (this.options.shape) { case 'box': - this.shape = new _nodesShapesBox2['default'](this.options, this.body, this.labelModule); + this.shape = new _Box2.default(this.options, this.body, this.labelModule); break; case 'circle': - this.shape = new _nodesShapesCircle2['default'](this.options, this.body, this.labelModule); + this.shape = new _Circle2.default(this.options, this.body, this.labelModule); break; case 'circularImage': - this.shape = new _nodesShapesCircularImage2['default'](this.options, this.body, this.labelModule, this.imageObj); + this.shape = new _CircularImage2.default(this.options, this.body, this.labelModule, this.imageObj); break; case 'database': - this.shape = new _nodesShapesDatabase2['default'](this.options, this.body, this.labelModule); + this.shape = new _Database2.default(this.options, this.body, this.labelModule); break; case 'diamond': - this.shape = new _nodesShapesDiamond2['default'](this.options, this.body, this.labelModule); + this.shape = new _Diamond2.default(this.options, this.body, this.labelModule); break; case 'dot': - this.shape = new _nodesShapesDot2['default'](this.options, this.body, this.labelModule); + this.shape = new _Dot2.default(this.options, this.body, this.labelModule); break; case 'ellipse': - this.shape = new _nodesShapesEllipse2['default'](this.options, this.body, this.labelModule); + this.shape = new _Ellipse2.default(this.options, this.body, this.labelModule); break; case 'icon': - this.shape = new _nodesShapesIcon2['default'](this.options, this.body, this.labelModule); + this.shape = new _Icon2.default(this.options, this.body, this.labelModule); break; case 'image': - this.shape = new _nodesShapesImage2['default'](this.options, this.body, this.labelModule, this.imageObj); + this.shape = new _Image2.default(this.options, this.body, this.labelModule, this.imageObj); break; case 'square': - this.shape = new _nodesShapesSquare2['default'](this.options, this.body, this.labelModule); + this.shape = new _Square2.default(this.options, this.body, this.labelModule); break; case 'star': - this.shape = new _nodesShapesStar2['default'](this.options, this.body, this.labelModule); + this.shape = new _Star2.default(this.options, this.body, this.labelModule); break; case 'text': - this.shape = new _nodesShapesText2['default'](this.options, this.body, this.labelModule); + this.shape = new _Text2.default(this.options, this.body, this.labelModule); break; case 'triangle': - this.shape = new _nodesShapesTriangle2['default'](this.options, this.body, this.labelModule); + this.shape = new _Triangle2.default(this.options, this.body, this.labelModule); break; case 'triangleDown': - this.shape = new _nodesShapesTriangleDown2['default'](this.options, this.body, this.labelModule); + this.shape = new _TriangleDown2.default(this.options, this.body, this.labelModule); break; default: - this.shape = new _nodesShapesEllipse2['default'](this.options, this.body, this.labelModule); + this.shape = new _Ellipse2.default(this.options, this.body, this.labelModule); break; } } @@ -29255,6 +29599,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * select this node */ + }, { key: 'select', value: function select() { @@ -29265,6 +29610,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * unselect this node */ + }, { key: 'unselect', value: function unselect() { @@ -29276,6 +29622,7 @@ return /******/ (function(modules) { // webpackBootstrap * Reset the calculated size of the node, forces it to recalculate its size * @private */ + }, { key: '_reset', value: function _reset() { @@ -29288,6 +29635,7 @@ return /******/ (function(modules) { // webpackBootstrap * @return {string} title The title of the node, or undefined when no title * has been set. */ + }, { key: 'getTitle', value: function getTitle() { @@ -29300,6 +29648,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Number} angle Angle in radians * @returns {number} distance Distance to the border in pixels */ + }, { key: 'distanceToBorder', value: function distanceToBorder(ctx, angle) { @@ -29310,6 +29659,7 @@ return /******/ (function(modules) { // webpackBootstrap * Check if this node has a fixed x and y position * @return {boolean} true if fixed, false if not */ + }, { key: 'isFixed', value: function isFixed() { @@ -29320,6 +29670,7 @@ return /******/ (function(modules) { // webpackBootstrap * check if this node is selecte * @return {boolean} selected True if node is selected, else false */ + }, { key: 'isSelected', value: function isSelected() { @@ -29330,6 +29681,7 @@ return /******/ (function(modules) { // webpackBootstrap * Retrieve the value of the node. Can be undefined * @return {Number} value */ + }, { key: 'getValue', value: function getValue() { @@ -29342,6 +29694,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Number} min * @param {Number} max */ + }, { key: 'setValueRange', value: function setValueRange(min, max, total) { @@ -29366,6 +29719,7 @@ return /******/ (function(modules) { // webpackBootstrap * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); * @param {CanvasRenderingContext2D} ctx */ + }, { key: 'draw', value: function draw(ctx) { @@ -29375,6 +29729,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Update the bounding box of the shape */ + }, { key: 'updateBoundingBox', value: function updateBoundingBox(ctx) { @@ -29386,6 +29741,7 @@ return /******/ (function(modules) { // webpackBootstrap * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); * @param {CanvasRenderingContext2D} ctx */ + }, { key: 'resize', value: function resize(ctx) { @@ -29397,6 +29753,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Object} obj an object with parameters left, top, right, bottom * @return {boolean} True if location is located on node */ + }, { key: 'isOverlappingWith', value: function isOverlappingWith(obj) { @@ -29408,6 +29765,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Object} obj an object with parameters left, top, right, bottom * @return {boolean} True if location is located on node */ + }, { key: 'isBoundingBoxOverlappingWith', value: function isBoundingBoxOverlappingWith(obj) { @@ -29450,7 +29808,7 @@ return /******/ (function(modules) { // webpackBootstrap // handle the font options if (newOptions.font !== undefined && newOptions.font !== null) { - _sharedLabel2['default'].parseOptions(parentOptions.font, newOptions); + _Label2.default.parseOptions(parentOptions.font, newOptions); } else if (allowDeletion === true && newOptions.font === null) { parentOptions.font = util.bridgeObject(globalOptions.font); // set the object back to the global options } @@ -29463,31 +29821,34 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Node; - })(); + }(); - exports['default'] = Node; - module.exports = exports['default']; + exports.default = Node; /***/ }, -/* 62 */ +/* 63 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })(); + var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var util = __webpack_require__(1); - var Label = (function () { + var Label = function () { function Label(body, options) { + var edgelabel = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; + _classCallCheck(this, Label); this.body = body; @@ -29497,6 +29858,7 @@ return /******/ (function(modules) { // webpackBootstrap this.fontOptions = {}; this.setOptions(options); this.size = { top: 0, left: 0, width: 0, height: 0, yLine: 0 }; // could be cached + this.isEdgeLabel = edgelabel; } _createClass(Label, [{ @@ -29518,7 +29880,7 @@ return /******/ (function(modules) { // webpackBootstrap Label.parseOptions(this.fontOptions, options, allowDeletion); if (typeof options.font === 'string') { this.baseSize = this.fontOptions.size; - } else if (typeof options.font === 'object') { + } else if (_typeof(options.font) === 'object') { if (options.font.size !== undefined) { this.baseSize = options.font.size; } @@ -29528,6 +29890,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'draw', + /** * Main function. This is called from anything that wants to draw a label. * @param ctx @@ -29560,6 +29923,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {CanvasRenderingContext2D} ctx * @private */ + }, { key: '_drawBackground', value: function _drawBackground(ctx) { @@ -29568,19 +29932,23 @@ return /******/ (function(modules) { // webpackBootstrap var lineMargin = 2; - switch (this.fontOptions.align) { - case 'middle': - ctx.fillRect(-this.size.width * 0.5, -this.size.height * 0.5, this.size.width, this.size.height); - break; - case 'top': - ctx.fillRect(-this.size.width * 0.5, -(this.size.height + lineMargin), this.size.width, this.size.height); - break; - case 'bottom': - ctx.fillRect(-this.size.width * 0.5, lineMargin, this.size.width, this.size.height); - break; - default: - ctx.fillRect(this.size.left, this.size.top - 0.5 * lineMargin, this.size.width, this.size.height); - break; + if (this.isEdgeLabel) { + switch (this.fontOptions.align) { + case 'middle': + ctx.fillRect(-this.size.width * 0.5, -this.size.height * 0.5, this.size.width, this.size.height); + break; + case 'top': + ctx.fillRect(-this.size.width * 0.5, -(this.size.height + lineMargin), this.size.width, this.size.height); + break; + case 'bottom': + ctx.fillRect(-this.size.width * 0.5, lineMargin, this.size.width, this.size.height); + break; + default: + ctx.fillRect(this.size.left, this.size.top - 0.5 * lineMargin, this.size.width, this.size.height); + break; + } + } else { + ctx.fillRect(this.size.left, this.size.top - 0.5 * lineMargin, this.size.width, this.size.height); } } } @@ -29592,6 +29960,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param baseline * @private */ + }, { key: '_drawText', value: function _drawText(ctx, selected, x, y) { @@ -29608,22 +29977,29 @@ return /******/ (function(modules) { // webpackBootstrap var _getColor2 = this._getColor(viewFontSize); - var _getColor22 = _slicedToArray(_getColor2, 2); + var _getColor3 = _slicedToArray(_getColor2, 2); + + var fontColor = _getColor3[0]; + var strokeColor = _getColor3[1]; - var fontColor = _getColor22[0]; - var strokeColor = _getColor22[1]; // configure context for drawing the text var _setAlignment2 = this._setAlignment(ctx, x, yLine, baseline); - var _setAlignment22 = _slicedToArray(_setAlignment2, 2); + var _setAlignment3 = _slicedToArray(_setAlignment2, 2); - x = _setAlignment22[0]; - yLine = _setAlignment22[1]; + x = _setAlignment3[0]; + yLine = _setAlignment3[1]; ctx.font = (selected && this.nodeOptions.labelHighlightBold ? 'bold ' : '') + fontSize + "px " + this.fontOptions.face; ctx.fillStyle = fontColor; - ctx.textAlign = 'center'; + // When the textAlign property is 'left', make label left-justified + if (!this.isEdgeLabel && this.fontOptions.align === 'left') { + ctx.textAlign = this.fontOptions.align; + x = x - 0.5 * this.size.width; // Shift label 1/2-distance to the left + } else { + ctx.textAlign = 'center'; + } // set the strokeWidth if (this.fontOptions.strokeWidth > 0) { @@ -29646,7 +30022,7 @@ return /******/ (function(modules) { // webpackBootstrap value: function _setAlignment(ctx, x, yLine, baseline) { // check for label alignment (for edges) // TODO: make alignment for nodes - if (this.fontOptions.align !== 'horizontal' && this.pointToSelf === false) { + if (this.isEdgeLabel && this.fontOptions.align !== 'horizontal' && this.pointToSelf === false) { x = 0; yLine = 0; @@ -29675,6 +30051,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {*[]} * @private */ + }, { key: '_getColor', value: function _getColor(viewFontSize) { @@ -29694,6 +30071,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param selected * @returns {{width: number, height: number}} */ + }, { key: 'getTextSize', value: function getTextSize(ctx) { @@ -29715,6 +30093,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param y * @param baseline */ + }, { key: 'calculateLabelSize', value: function calculateLabelSize(ctx, selected) { @@ -29745,6 +30124,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} * @private */ + }, { key: '_processLabel', value: function _processLabel(ctx, selected) { @@ -29776,7 +30156,7 @@ return /******/ (function(modules) { // webpackBootstrap parentOptions.size = newOptionsArray[0].replace("px", ''); parentOptions.face = newOptionsArray[1]; parentOptions.color = newOptionsArray[2]; - } else if (typeof newOptions.font === 'object') { + } else if (_typeof(newOptions.font) === 'object') { util.fillIfDefined(parentOptions, newOptions.font, allowDeletion); } parentOptions.size = Number(parentOptions.size); @@ -29784,42 +30164,41 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Label; - })(); + }(); - exports['default'] = Label; - module.exports = exports['default']; + exports.default = Label; /***/ }, -/* 63 */ +/* 64 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _NodeBase2 = __webpack_require__(65); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _NodeBase3 = _interopRequireDefault(_NodeBase2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _utilNodeBase = __webpack_require__(64); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _utilNodeBase2 = _interopRequireDefault(_utilNodeBase); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var Box = (function (_NodeBase) { + var Box = function (_NodeBase) { _inherits(Box, _NodeBase); function Box(options, body, labelModule) { _classCallCheck(this, Box); - _get(Object.getPrototypeOf(Box.prototype), 'constructor', this).call(this, options, body, labelModule); + return _possibleConstructorReturn(this, Object.getPrototypeOf(Box).call(this, options, body, labelModule)); } _createClass(Box, [{ @@ -29899,13 +30278,12 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Box; - })(_utilNodeBase2['default']); + }(_NodeBase3.default); - exports['default'] = Box; - module.exports = exports['default']; + exports.default = Box; /***/ }, -/* 64 */ +/* 65 */ /***/ function(module, exports) { "use strict"; @@ -29914,11 +30292,11 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var NodeBase = (function () { + var NodeBase = function () { function NodeBase(options, body, labelModule) { _classCallCheck(this, NodeBase); @@ -29996,42 +30374,41 @@ return /******/ (function(modules) { // webpackBootstrap }]); return NodeBase; - })(); + }(); - exports["default"] = NodeBase; - module.exports = exports["default"]; + exports.default = NodeBase; /***/ }, -/* 65 */ +/* 66 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _CircleImageBase2 = __webpack_require__(67); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _CircleImageBase3 = _interopRequireDefault(_CircleImageBase2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _utilCircleImageBase = __webpack_require__(66); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _utilCircleImageBase2 = _interopRequireDefault(_utilCircleImageBase); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var Circle = (function (_CircleImageBase) { + var Circle = function (_CircleImageBase) { _inherits(Circle, _CircleImageBase); function Circle(options, body, labelModule) { _classCallCheck(this, Circle); - _get(Object.getPrototypeOf(Circle.prototype), 'constructor', this).call(this, options, body, labelModule); + return _possibleConstructorReturn(this, Object.getPrototypeOf(Circle).call(this, options, body, labelModule)); } _createClass(Circle, [{ @@ -30082,44 +30459,45 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Circle; - })(_utilCircleImageBase2['default']); + }(_CircleImageBase3.default); - exports['default'] = Circle; - module.exports = exports['default']; + exports.default = Circle; /***/ }, -/* 66 */ +/* 67 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _NodeBase2 = __webpack_require__(65); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _NodeBase3 = _interopRequireDefault(_NodeBase2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _utilNodeBase = __webpack_require__(64); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _utilNodeBase2 = _interopRequireDefault(_utilNodeBase); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var CircleImageBase = (function (_NodeBase) { + var CircleImageBase = function (_NodeBase) { _inherits(CircleImageBase, _NodeBase); function CircleImageBase(options, body, labelModule) { _classCallCheck(this, CircleImageBase); - _get(Object.getPrototypeOf(CircleImageBase.prototype), 'constructor', this).call(this, options, body, labelModule); - this.labelOffset = 0; - this.imageLoaded = false; + var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(CircleImageBase).call(this, options, body, labelModule)); + + _this.labelOffset = 0; + _this.imageLoaded = false; + return _this; } _createClass(CircleImageBase, [{ @@ -30137,6 +30515,7 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { key: '_resizeImage', value: function _resizeImage() { @@ -30281,44 +30660,45 @@ return /******/ (function(modules) { // webpackBootstrap }]); return CircleImageBase; - })(_utilNodeBase2['default']); + }(_NodeBase3.default); - exports['default'] = CircleImageBase; - module.exports = exports['default']; + exports.default = CircleImageBase; /***/ }, -/* 67 */ +/* 68 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _CircleImageBase2 = __webpack_require__(67); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _CircleImageBase3 = _interopRequireDefault(_CircleImageBase2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _utilCircleImageBase = __webpack_require__(66); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _utilCircleImageBase2 = _interopRequireDefault(_utilCircleImageBase); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var CircularImage = (function (_CircleImageBase) { + var CircularImage = function (_CircleImageBase) { _inherits(CircularImage, _CircleImageBase); function CircularImage(options, body, labelModule, imageObj) { _classCallCheck(this, CircularImage); - _get(Object.getPrototypeOf(CircularImage.prototype), 'constructor', this).call(this, options, body, labelModule); - this.imageObj = imageObj; - this._swapToImageResizeWhenImageLoaded = true; + var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(CircularImage).call(this, options, body, labelModule)); + + _this.imageObj = imageObj; + _this._swapToImageResizeWhenImageLoaded = true; + return _this; } _createClass(CircularImage, [{ @@ -30387,42 +30767,41 @@ return /******/ (function(modules) { // webpackBootstrap }]); return CircularImage; - })(_utilCircleImageBase2['default']); + }(_CircleImageBase3.default); - exports['default'] = CircularImage; - module.exports = exports['default']; + exports.default = CircularImage; /***/ }, -/* 68 */ +/* 69 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _NodeBase2 = __webpack_require__(65); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _NodeBase3 = _interopRequireDefault(_NodeBase2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _utilNodeBase = __webpack_require__(64); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _utilNodeBase2 = _interopRequireDefault(_utilNodeBase); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var Database = (function (_NodeBase) { + var Database = function (_NodeBase) { _inherits(Database, _NodeBase); function Database(options, body, labelModule) { _classCallCheck(this, Database); - _get(Object.getPrototypeOf(Database.prototype), 'constructor', this).call(this, options, body, labelModule); + return _possibleConstructorReturn(this, Object.getPrototypeOf(Database).call(this, options, body, labelModule)); } _createClass(Database, [{ @@ -30497,42 +30876,41 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Database; - })(_utilNodeBase2['default']); + }(_NodeBase3.default); - exports['default'] = Database; - module.exports = exports['default']; + exports.default = Database; /***/ }, -/* 69 */ +/* 70 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _ShapeBase2 = __webpack_require__(71); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _ShapeBase3 = _interopRequireDefault(_ShapeBase2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _utilShapeBase = __webpack_require__(70); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _utilShapeBase2 = _interopRequireDefault(_utilShapeBase); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var Diamond = (function (_ShapeBase) { + var Diamond = function (_ShapeBase) { _inherits(Diamond, _ShapeBase); function Diamond(options, body, labelModule) { _classCallCheck(this, Diamond); - _get(Object.getPrototypeOf(Diamond.prototype), 'constructor', this).call(this, options, body, labelModule); + return _possibleConstructorReturn(this, Object.getPrototypeOf(Diamond).call(this, options, body, labelModule)); } _createClass(Diamond, [{ @@ -30553,42 +30931,41 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Diamond; - })(_utilShapeBase2['default']); + }(_ShapeBase3.default); - exports['default'] = Diamond; - module.exports = exports['default']; + exports.default = Diamond; /***/ }, -/* 70 */ +/* 71 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _NodeBase2 = __webpack_require__(65); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _NodeBase3 = _interopRequireDefault(_NodeBase2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _utilNodeBase = __webpack_require__(64); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _utilNodeBase2 = _interopRequireDefault(_utilNodeBase); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var ShapeBase = (function (_NodeBase) { + var ShapeBase = function (_NodeBase) { _inherits(ShapeBase, _NodeBase); function ShapeBase(options, body, labelModule) { _classCallCheck(this, ShapeBase); - _get(Object.getPrototypeOf(ShapeBase.prototype), 'constructor', this).call(this, options, body, labelModule); + return _possibleConstructorReturn(this, Object.getPrototypeOf(ShapeBase).call(this, options, body, labelModule)); } _createClass(ShapeBase, [{ @@ -30661,42 +31038,41 @@ return /******/ (function(modules) { // webpackBootstrap }]); return ShapeBase; - })(_utilNodeBase2['default']); + }(_NodeBase3.default); - exports['default'] = ShapeBase; - module.exports = exports['default']; + exports.default = ShapeBase; /***/ }, -/* 71 */ +/* 72 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _ShapeBase2 = __webpack_require__(71); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _ShapeBase3 = _interopRequireDefault(_ShapeBase2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _utilShapeBase = __webpack_require__(70); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _utilShapeBase2 = _interopRequireDefault(_utilShapeBase); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var Dot = (function (_ShapeBase) { + var Dot = function (_ShapeBase) { _inherits(Dot, _ShapeBase); function Dot(options, body, labelModule) { _classCallCheck(this, Dot); - _get(Object.getPrototypeOf(Dot.prototype), 'constructor', this).call(this, options, body, labelModule); + return _possibleConstructorReturn(this, Object.getPrototypeOf(Dot).call(this, options, body, labelModule)); } _createClass(Dot, [{ @@ -30718,42 +31094,41 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Dot; - })(_utilShapeBase2['default']); + }(_ShapeBase3.default); - exports['default'] = Dot; - module.exports = exports['default']; + exports.default = Dot; /***/ }, -/* 72 */ +/* 73 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _NodeBase2 = __webpack_require__(65); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _NodeBase3 = _interopRequireDefault(_NodeBase2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _utilNodeBase = __webpack_require__(64); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _utilNodeBase2 = _interopRequireDefault(_utilNodeBase); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var Ellipse = (function (_NodeBase) { + var Ellipse = function (_NodeBase) { _inherits(Ellipse, _NodeBase); function Ellipse(options, body, labelModule) { _classCallCheck(this, Ellipse); - _get(Object.getPrototypeOf(Ellipse.prototype), 'constructor', this).call(this, options, body, labelModule); + return _possibleConstructorReturn(this, Object.getPrototypeOf(Ellipse).call(this, options, body, labelModule)); } _createClass(Ellipse, [{ @@ -30837,42 +31212,41 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Ellipse; - })(_utilNodeBase2['default']); + }(_NodeBase3.default); - exports['default'] = Ellipse; - module.exports = exports['default']; + exports.default = Ellipse; /***/ }, -/* 73 */ +/* 74 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _NodeBase2 = __webpack_require__(65); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _NodeBase3 = _interopRequireDefault(_NodeBase2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _utilNodeBase = __webpack_require__(64); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _utilNodeBase2 = _interopRequireDefault(_utilNodeBase); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var Icon = (function (_NodeBase) { + var Icon = function (_NodeBase) { _inherits(Icon, _NodeBase); function Icon(options, body, labelModule) { _classCallCheck(this, Icon); - _get(Object.getPrototypeOf(Icon.prototype), 'constructor', this).call(this, options, body, labelModule); + return _possibleConstructorReturn(this, Object.getPrototypeOf(Icon).call(this, options, body, labelModule)); } _createClass(Icon, [{ @@ -30952,43 +31326,44 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Icon; - })(_utilNodeBase2['default']); + }(_NodeBase3.default); - exports['default'] = Icon; - module.exports = exports['default']; + exports.default = Icon; /***/ }, -/* 74 */ +/* 75 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _CircleImageBase2 = __webpack_require__(67); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _CircleImageBase3 = _interopRequireDefault(_CircleImageBase2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _utilCircleImageBase = __webpack_require__(66); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _utilCircleImageBase2 = _interopRequireDefault(_utilCircleImageBase); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var Image = (function (_CircleImageBase) { + var Image = function (_CircleImageBase) { _inherits(Image, _CircleImageBase); function Image(options, body, labelModule, imageObj) { _classCallCheck(this, Image); - _get(Object.getPrototypeOf(Image.prototype), 'constructor', this).call(this, options, body, labelModule); - this.imageObj = imageObj; + var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Image).call(this, options, body, labelModule)); + + _this.imageObj = imageObj; + return _this; } _createClass(Image, [{ @@ -31068,42 +31443,41 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Image; - })(_utilCircleImageBase2['default']); + }(_CircleImageBase3.default); - exports['default'] = Image; - module.exports = exports['default']; + exports.default = Image; /***/ }, -/* 75 */ +/* 76 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _ShapeBase2 = __webpack_require__(71); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _ShapeBase3 = _interopRequireDefault(_ShapeBase2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _utilShapeBase = __webpack_require__(70); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _utilShapeBase2 = _interopRequireDefault(_utilShapeBase); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var Square = (function (_ShapeBase) { + var Square = function (_ShapeBase) { _inherits(Square, _ShapeBase); function Square(options, body, labelModule) { _classCallCheck(this, Square); - _get(Object.getPrototypeOf(Square.prototype), 'constructor', this).call(this, options, body, labelModule); + return _possibleConstructorReturn(this, Object.getPrototypeOf(Square).call(this, options, body, labelModule)); } _createClass(Square, [{ @@ -31124,42 +31498,41 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Square; - })(_utilShapeBase2['default']); + }(_ShapeBase3.default); - exports['default'] = Square; - module.exports = exports['default']; + exports.default = Square; /***/ }, -/* 76 */ +/* 77 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _ShapeBase2 = __webpack_require__(71); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _ShapeBase3 = _interopRequireDefault(_ShapeBase2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _utilShapeBase = __webpack_require__(70); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _utilShapeBase2 = _interopRequireDefault(_utilShapeBase); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var Star = (function (_ShapeBase) { + var Star = function (_ShapeBase) { _inherits(Star, _ShapeBase); function Star(options, body, labelModule) { _classCallCheck(this, Star); - _get(Object.getPrototypeOf(Star.prototype), 'constructor', this).call(this, options, body, labelModule); + return _possibleConstructorReturn(this, Object.getPrototypeOf(Star).call(this, options, body, labelModule)); } _createClass(Star, [{ @@ -31180,42 +31553,41 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Star; - })(_utilShapeBase2['default']); + }(_ShapeBase3.default); - exports['default'] = Star; - module.exports = exports['default']; + exports.default = Star; /***/ }, -/* 77 */ +/* 78 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _NodeBase2 = __webpack_require__(65); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _NodeBase3 = _interopRequireDefault(_NodeBase2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _utilNodeBase = __webpack_require__(64); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _utilNodeBase2 = _interopRequireDefault(_utilNodeBase); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var Text = (function (_NodeBase) { + var Text = function (_NodeBase) { _inherits(Text, _NodeBase); function Text(options, body, labelModule) { _classCallCheck(this, Text); - _get(Object.getPrototypeOf(Text.prototype), 'constructor', this).call(this, options, body, labelModule); + return _possibleConstructorReturn(this, Object.getPrototypeOf(Text).call(this, options, body, labelModule)); } _createClass(Text, [{ @@ -31266,42 +31638,41 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Text; - })(_utilNodeBase2['default']); + }(_NodeBase3.default); - exports['default'] = Text; - module.exports = exports['default']; + exports.default = Text; /***/ }, -/* 78 */ +/* 79 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _ShapeBase2 = __webpack_require__(71); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _ShapeBase3 = _interopRequireDefault(_ShapeBase2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _utilShapeBase = __webpack_require__(70); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _utilShapeBase2 = _interopRequireDefault(_utilShapeBase); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var Triangle = (function (_ShapeBase) { + var Triangle = function (_ShapeBase) { _inherits(Triangle, _ShapeBase); function Triangle(options, body, labelModule) { _classCallCheck(this, Triangle); - _get(Object.getPrototypeOf(Triangle.prototype), 'constructor', this).call(this, options, body, labelModule); + return _possibleConstructorReturn(this, Object.getPrototypeOf(Triangle).call(this, options, body, labelModule)); } _createClass(Triangle, [{ @@ -31322,42 +31693,41 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Triangle; - })(_utilShapeBase2['default']); + }(_ShapeBase3.default); - exports['default'] = Triangle; - module.exports = exports['default']; + exports.default = Triangle; /***/ }, -/* 79 */ +/* 80 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _ShapeBase2 = __webpack_require__(71); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _ShapeBase3 = _interopRequireDefault(_ShapeBase2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _utilShapeBase = __webpack_require__(70); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _utilShapeBase2 = _interopRequireDefault(_utilShapeBase); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var TriangleDown = (function (_ShapeBase) { + var TriangleDown = function (_ShapeBase) { _inherits(TriangleDown, _ShapeBase); function TriangleDown(options, body, labelModule) { _classCallCheck(this, TriangleDown); - _get(Object.getPrototypeOf(TriangleDown.prototype), 'constructor', this).call(this, options, body, labelModule); + return _possibleConstructorReturn(this, Object.getPrototypeOf(TriangleDown).call(this, options, body, labelModule)); } _createClass(TriangleDown, [{ @@ -31378,40 +31748,39 @@ return /******/ (function(modules) { // webpackBootstrap }]); return TriangleDown; - })(_utilShapeBase2['default']); + }(_ShapeBase3.default); - exports['default'] = TriangleDown; - module.exports = exports['default']; + exports.default = TriangleDown; /***/ }, -/* 80 */ +/* 81 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _Edge = __webpack_require__(82); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var _Edge2 = _interopRequireDefault(_Edge); - var _componentsEdge = __webpack_require__(81); + var _Label = __webpack_require__(63); - var _componentsEdge2 = _interopRequireDefault(_componentsEdge); + var _Label2 = _interopRequireDefault(_Label); - var _componentsSharedLabel = __webpack_require__(62); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var _componentsSharedLabel2 = _interopRequireDefault(_componentsSharedLabel); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var util = __webpack_require__(1); var DataSet = __webpack_require__(8); var DataView = __webpack_require__(10); - var EdgesHandler = (function () { + var EdgesHandler = function () { function EdgesHandler(body, images, groups) { var _this = this; @@ -31574,7 +31943,7 @@ return /******/ (function(modules) { // webpackBootstrap value: function setOptions(options) { if (options !== undefined) { // use the parser from the Edge class to fill in all shorthand notations - _componentsEdge2['default'].parseOptions(this.options, options); + _Edge2.default.parseOptions(this.options, options); // handle multiple input cases for color if (options.color !== undefined) { @@ -31594,10 +31963,10 @@ return /******/ (function(modules) { // webpackBootstrap // update fonts in all edges if (options.font !== undefined) { // use the parser from the Label class to fill in all shorthand notations - _componentsSharedLabel2['default'].parseOptions(this.options.font, options); - for (var edgeId in this.body.edges) { - if (this.body.edges.hasOwnProperty(edgeId)) { - this.body.edges[edgeId].updateLabelModule(); + _Label2.default.parseOptions(this.options.font, options); + for (var _edgeId in this.body.edges) { + if (this.body.edges.hasOwnProperty(_edgeId)) { + this.body.edges[_edgeId].updateLabelModule(); } } } @@ -31615,6 +31984,7 @@ return /******/ (function(modules) { // webpackBootstrap * @private * @private */ + }, { key: 'setData', value: function setData(edges) { @@ -31668,6 +32038,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Number[] | String[]} ids * @private */ + }, { key: 'add', value: function add(ids) { @@ -31698,6 +32069,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Number[] | String[]} ids * @private */ + }, { key: 'update', value: function update(ids) { @@ -31732,6 +32104,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Number[] | String[]} ids * @private */ + }, { key: 'remove', value: function remove(ids) { @@ -31766,7 +32139,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'create', value: function create(properties) { - return new _componentsEdge2['default'](properties, this.body, this.options); + return new _Edge2.default(properties, this.body, this.options); } }, { key: 'markAllEdgesAsDirty', @@ -31780,6 +32153,7 @@ return /******/ (function(modules) { // webpackBootstrap * Reconnect all edges * @private */ + }, { key: 'reconnectEdges', value: function reconnectEdges() { @@ -31820,46 +32194,49 @@ return /******/ (function(modules) { // webpackBootstrap }]); return EdgesHandler; - })(); + }(); - exports['default'] = EdgesHandler; - module.exports = exports['default']; + exports.default = EdgesHandler; /***/ }, -/* 81 */ +/* 82 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + var _Label = __webpack_require__(63); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _Label2 = _interopRequireDefault(_Label); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var _CubicBezierEdge = __webpack_require__(83); - var _sharedLabel = __webpack_require__(62); + var _CubicBezierEdge2 = _interopRequireDefault(_CubicBezierEdge); - var _sharedLabel2 = _interopRequireDefault(_sharedLabel); + var _BezierEdgeDynamic = __webpack_require__(87); - var _edgesCubicBezierEdge = __webpack_require__(82); + var _BezierEdgeDynamic2 = _interopRequireDefault(_BezierEdgeDynamic); - var _edgesCubicBezierEdge2 = _interopRequireDefault(_edgesCubicBezierEdge); + var _BezierEdgeStatic = __webpack_require__(88); - var _edgesBezierEdgeDynamic = __webpack_require__(86); + var _BezierEdgeStatic2 = _interopRequireDefault(_BezierEdgeStatic); - var _edgesBezierEdgeDynamic2 = _interopRequireDefault(_edgesBezierEdgeDynamic); + var _StraightEdge = __webpack_require__(89); - var _edgesBezierEdgeStatic = __webpack_require__(87); + var _StraightEdge2 = _interopRequireDefault(_StraightEdge); - var _edgesBezierEdgeStatic2 = _interopRequireDefault(_edgesBezierEdgeStatic); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var _edgesStraightEdge = __webpack_require__(88); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _edgesStraightEdge2 = _interopRequireDefault(_edgesStraightEdge); + var util = __webpack_require__(1); /** * @class Edge @@ -31876,9 +32253,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Object} constants An object with default values for * example for the color */ - var util = __webpack_require__(1); - var Edge = (function () { + var Edge = function () { function Edge(options, body, globalOptions) { _classCallCheck(this, Edge); @@ -31908,7 +32284,7 @@ return /******/ (function(modules) { // webpackBootstrap this.connected = false; - this.labelModule = new _sharedLabel2['default'](this.body, this.options); + this.labelModule = new _Label2.default(this.body, this.options, true /* It's an edge label */); this.setOptions(options); } @@ -31919,6 +32295,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param doNotEmit */ + _createClass(Edge, [{ key: 'setOptions', value: function setOptions(options) { @@ -31966,6 +32343,7 @@ return /******/ (function(modules) { // webpackBootstrap key: 'updateLabelModule', // set the object back to the global options + /** * update the options in the label module */ @@ -31980,6 +32358,7 @@ return /******/ (function(modules) { // webpackBootstrap * update the edge type, set the options * @returns {boolean} */ + }, { key: 'updateEdgeType', value: function updateEdgeType() { @@ -31987,16 +32366,16 @@ return /******/ (function(modules) { // webpackBootstrap var changeInType = true; var smooth = this.options.smooth; if (this.edgeType !== undefined) { - if (this.edgeType instanceof _edgesBezierEdgeDynamic2['default'] && smooth.enabled === true && smooth.type === 'dynamic') { + if (this.edgeType instanceof _BezierEdgeDynamic2.default && smooth.enabled === true && smooth.type === 'dynamic') { changeInType = false; } - if (this.edgeType instanceof _edgesCubicBezierEdge2['default'] && smooth.enabled === true && smooth.type === 'cubicBezier') { + if (this.edgeType instanceof _CubicBezierEdge2.default && smooth.enabled === true && smooth.type === 'cubicBezier') { changeInType = false; } - if (this.edgeType instanceof _edgesBezierEdgeStatic2['default'] && smooth.enabled === true && smooth.type !== 'dynamic' && smooth.type !== 'cubicBezier') { + if (this.edgeType instanceof _BezierEdgeStatic2.default && smooth.enabled === true && smooth.type !== 'dynamic' && smooth.type !== 'cubicBezier') { changeInType = false; } - if (this.edgeType instanceof _edgesStraightEdge2['default'] && smooth.enabled === false) { + if (this.edgeType instanceof _StraightEdge2.default && smooth.enabled === false) { changeInType = false; } @@ -32009,14 +32388,14 @@ return /******/ (function(modules) { // webpackBootstrap if (this.options.smooth.enabled === true) { if (this.options.smooth.type === 'dynamic') { dataChanged = true; - this.edgeType = new _edgesBezierEdgeDynamic2['default'](this.options, this.body, this.labelModule); + this.edgeType = new _BezierEdgeDynamic2.default(this.options, this.body, this.labelModule); } else if (this.options.smooth.type === 'cubicBezier') { - this.edgeType = new _edgesCubicBezierEdge2['default'](this.options, this.body, this.labelModule); + this.edgeType = new _CubicBezierEdge2.default(this.options, this.body, this.labelModule); } else { - this.edgeType = new _edgesBezierEdgeStatic2['default'](this.options, this.body, this.labelModule); + this.edgeType = new _BezierEdgeStatic2.default(this.options, this.body, this.labelModule); } } else { - this.edgeType = new _edgesStraightEdge2['default'](this.options, this.body, this.labelModule); + this.edgeType = new _StraightEdge2.default(this.options, this.body, this.labelModule); } } else { // if nothing changes, we just set the options. @@ -32029,6 +32408,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Connect an edge to its nodes */ + }, { key: 'connect', value: function connect() { @@ -32056,6 +32436,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Disconnect an edge from its nodes */ + }, { key: 'disconnect', value: function disconnect() { @@ -32076,6 +32457,7 @@ return /******/ (function(modules) { // webpackBootstrap * @return {string} title The title of the edge, or undefined when no title * has been set. */ + }, { key: 'getTitle', value: function getTitle() { @@ -32086,6 +32468,7 @@ return /******/ (function(modules) { // webpackBootstrap * check if this node is selecte * @return {boolean} selected True if node is selected, else false */ + }, { key: 'isSelected', value: function isSelected() { @@ -32096,6 +32479,7 @@ return /******/ (function(modules) { // webpackBootstrap * Retrieve the value of the edge. Can be undefined * @return {Number} value */ + }, { key: 'getValue', value: function getValue() { @@ -32109,6 +32493,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Number} max * @param total */ + }, { key: 'setValueRange', value: function setValueRange(min, max, total) { @@ -32150,6 +32535,7 @@ return /******/ (function(modules) { // webpackBootstrap * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); * @param {CanvasRenderingContext2D} ctx */ + }, { key: 'draw', value: function draw(ctx) { @@ -32240,6 +32626,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Object} obj an object with parameters left, top * @return {boolean} True if location is located on the edge */ + }, { key: 'isOverlappingWith', value: function isOverlappingWith(obj) { @@ -32265,6 +32652,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {CanvasRenderingContext2D} ctx * @private */ + }, { key: '_rotateForLabelAlignment', value: function _rotateForLabelAlignment(ctx) { @@ -32289,6 +32677,7 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Object} point * @private */ + }, { key: '_pointOnCircle', value: function _pointOnCircle(x, y, radius, percentage) { @@ -32313,6 +32702,7 @@ return /******/ (function(modules) { // webpackBootstrap * cleans all required things on delete * @returns {*} */ + }, { key: 'cleanup', value: function cleanup() { @@ -32364,7 +32754,7 @@ return /******/ (function(modules) { // webpackBootstrap if (arrows.indexOf("from") != -1) { parentOptions.arrows.from.enabled = true; } - } else if (typeof newOptions.arrows === 'object') { + } else if (_typeof(newOptions.arrows) === 'object') { util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'to', allowDeletion, globalOptions.arrows); util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'middle', allowDeletion, globalOptions.arrows); util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'from', allowDeletion, globalOptions.arrows); @@ -32412,7 +32802,7 @@ return /******/ (function(modules) { // webpackBootstrap // handle the font settings if (newOptions.font !== undefined && newOptions.font !== null) { - _sharedLabel2['default'].parseOptions(parentOptions.font, newOptions); + _Label2.default.parseOptions(parentOptions.font, newOptions); } else if (allowDeletion === true && newOptions.font === null) { parentOptions.font = util.bridgeObject(globalOptions.font); } @@ -32420,44 +32810,43 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Edge; - })(); + }(); - exports['default'] = Edge; - module.exports = exports['default']; + exports.default = Edge; /***/ }, -/* 82 */ +/* 83 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })(); + var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x3, _x4, _x5) { var _again = true; _function: while (_again) { var object = _x3, property = _x4, receiver = _x5; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x3 = parent; _x4 = property; _x5 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _CubicBezierEdgeBase2 = __webpack_require__(84); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _CubicBezierEdgeBase3 = _interopRequireDefault(_CubicBezierEdgeBase2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _utilCubicBezierEdgeBase = __webpack_require__(83); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _utilCubicBezierEdgeBase2 = _interopRequireDefault(_utilCubicBezierEdgeBase); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var CubicBezierEdge = (function (_CubicBezierEdgeBase) { + var CubicBezierEdge = function (_CubicBezierEdgeBase) { _inherits(CubicBezierEdge, _CubicBezierEdgeBase); function CubicBezierEdge(options, body, labelModule) { _classCallCheck(this, CubicBezierEdge); - _get(Object.getPrototypeOf(CubicBezierEdge.prototype), 'constructor', this).call(this, options, body, labelModule); + return _possibleConstructorReturn(this, Object.getPrototypeOf(CubicBezierEdge).call(this, options, body, labelModule)); } /** @@ -32466,6 +32855,7 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ + _createClass(CubicBezierEdge, [{ key: '_line', value: function _line(ctx, viaNodes) { @@ -32494,10 +32884,10 @@ return /******/ (function(modules) { // webpackBootstrap var dx = this.from.x - this.to.x; var dy = this.from.y - this.to.y; - var x1 = undefined, - y1 = undefined, - x2 = undefined, - y2 = undefined; + var x1 = void 0, + y1 = void 0, + x2 = void 0, + y2 = void 0; var roundness = this.options.smooth.roundness; // horizontal if x > y or if direction is forced or if direction is horizontal @@ -32545,15 +32935,16 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {{x: number, y: number}} * @private */ + }, { key: 'getPoint', value: function getPoint(percentage) { var _ref3 = arguments.length <= 1 || arguments[1] === undefined ? this._getViaCoordinates() : arguments[1]; - var _ref32 = _slicedToArray(_ref3, 2); + var _ref4 = _slicedToArray(_ref3, 2); - var via1 = _ref32[0]; - var via2 = _ref32[1]; + var via1 = _ref4[0]; + var via2 = _ref4[1]; var t = percentage; var vec = []; @@ -32569,42 +32960,41 @@ return /******/ (function(modules) { // webpackBootstrap }]); return CubicBezierEdge; - })(_utilCubicBezierEdgeBase2['default']); + }(_CubicBezierEdgeBase3.default); - exports['default'] = CubicBezierEdge; - module.exports = exports['default']; + exports.default = CubicBezierEdge; /***/ }, -/* 83 */ +/* 84 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _BezierEdgeBase2 = __webpack_require__(85); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _BezierEdgeBase3 = _interopRequireDefault(_BezierEdgeBase2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _BezierEdgeBase2 = __webpack_require__(84); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _BezierEdgeBase3 = _interopRequireDefault(_BezierEdgeBase2); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var CubicBezierEdgeBase = (function (_BezierEdgeBase) { + var CubicBezierEdgeBase = function (_BezierEdgeBase) { _inherits(CubicBezierEdgeBase, _BezierEdgeBase); function CubicBezierEdgeBase(options, body, labelModule) { _classCallCheck(this, CubicBezierEdgeBase); - _get(Object.getPrototypeOf(CubicBezierEdgeBase.prototype), 'constructor', this).call(this, options, body, labelModule); + return _possibleConstructorReturn(this, Object.getPrototypeOf(CubicBezierEdgeBase).call(this, options, body, labelModule)); } /** @@ -32621,16 +33011,17 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ + _createClass(CubicBezierEdgeBase, [{ key: '_getDistanceToBezierEdge', value: function _getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via1, via2) { // x3,y3 is the point var minDistance = 1e9; - var distance = undefined; - var i = undefined, - t = undefined, - x = undefined, - y = undefined; + var distance = void 0; + var i = void 0, + t = void 0, + x = void 0, + y = void 0; var lastX = x1; var lastY = y1; var vec = [0, 0, 0, 0]; @@ -32655,42 +33046,41 @@ return /******/ (function(modules) { // webpackBootstrap }]); return CubicBezierEdgeBase; - })(_BezierEdgeBase3['default']); + }(_BezierEdgeBase3.default); - exports['default'] = CubicBezierEdgeBase; - module.exports = exports['default']; + exports.default = CubicBezierEdgeBase; /***/ }, -/* 84 */ +/* 85 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x2, _x3, _x4) { var _again = true; _function: while (_again) { var object = _x2, property = _x3, receiver = _x4; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x2 = parent; _x3 = property; _x4 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _EdgeBase2 = __webpack_require__(86); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _EdgeBase3 = _interopRequireDefault(_EdgeBase2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _EdgeBase2 = __webpack_require__(85); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _EdgeBase3 = _interopRequireDefault(_EdgeBase2); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var BezierEdgeBase = (function (_EdgeBase) { + var BezierEdgeBase = function (_EdgeBase) { _inherits(BezierEdgeBase, _EdgeBase); function BezierEdgeBase(options, body, labelModule) { _classCallCheck(this, BezierEdgeBase); - _get(Object.getPrototypeOf(BezierEdgeBase.prototype), 'constructor', this).call(this, options, body, labelModule); + return _possibleConstructorReturn(this, Object.getPrototypeOf(BezierEdgeBase).call(this, options, body, labelModule)); } /** @@ -32707,6 +33097,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param viaNode */ + _createClass(BezierEdgeBase, [{ key: '_findBorderPositionBezier', value: function _findBorderPositionBezier(nearNode, ctx) { @@ -32769,16 +33160,17 @@ return /******/ (function(modules) { // webpackBootstrap * @param {number} y3 point to check y * @private */ + }, { key: '_getDistanceToBezierEdge', value: function _getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via) { // x3,y3 is the point var minDistance = 1e9; - var distance = undefined; - var i = undefined, - t = undefined, - x = undefined, - y = undefined; + var distance = void 0; + var i = void 0, + t = void 0, + x = void 0, + y = void 0; var lastX = x1; var lastY = y1; for (i = 1; i < 10; i++) { @@ -32798,30 +33190,29 @@ return /******/ (function(modules) { // webpackBootstrap }]); return BezierEdgeBase; - })(_EdgeBase3['default']); + }(_EdgeBase3.default); - exports['default'] = BezierEdgeBase; - module.exports = exports['default']; + exports.default = BezierEdgeBase; /***/ }, -/* 85 */ +/* 86 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })(); + var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var util = __webpack_require__(1); - var EdgeBase = (function () { + var EdgeBase = function () { function EdgeBase(options, body, labelModule) { _classCallCheck(this, EdgeBase); @@ -32864,6 +33255,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {CanvasRenderingContext2D} ctx * @private */ + }, { key: 'drawLine', value: function drawLine(ctx, selected, hover, viaNode) { @@ -32886,11 +33278,11 @@ return /******/ (function(modules) { // webpackBootstrap } else { var _getCircleData2 = this._getCircleData(ctx); - var _getCircleData22 = _slicedToArray(_getCircleData2, 3); + var _getCircleData3 = _slicedToArray(_getCircleData2, 3); - var x = _getCircleData22[0]; - var y = _getCircleData22[1]; - var radius = _getCircleData22[2]; + var x = _getCircleData3[0]; + var y = _getCircleData3[1]; + var radius = _getCircleData3[2]; this._circle(ctx, x, y, radius); } @@ -32917,13 +33309,13 @@ return /******/ (function(modules) { // webpackBootstrap // draw line this._line(ctx, viaNode); } else { - var _getCircleData3 = this._getCircleData(ctx); + var _getCircleData4 = this._getCircleData(ctx); - var _getCircleData32 = _slicedToArray(_getCircleData3, 3); + var _getCircleData5 = _slicedToArray(_getCircleData4, 3); - var x = _getCircleData32[0]; - var y = _getCircleData32[1]; - var radius = _getCircleData32[2]; + var x = _getCircleData5[0]; + var y = _getCircleData5[1]; + var radius = _getCircleData5[2]; this._circle(ctx, x, y, radius); } @@ -32938,15 +33330,15 @@ return /******/ (function(modules) { // webpackBootstrap // draw line ctx.dashedLine(this.from.x, this.from.y, this.to.x, this.to.y, pattern); } else { - var _getCircleData4 = this._getCircleData(ctx); + var _getCircleData6 = this._getCircleData(ctx); - var _getCircleData42 = _slicedToArray(_getCircleData4, 3); + var _getCircleData7 = _slicedToArray(_getCircleData6, 3); - var x = _getCircleData42[0]; - var y = _getCircleData42[1]; - var radius = _getCircleData42[2]; + var _x = _getCircleData7[0]; + var _y = _getCircleData7[1]; + var _radius = _getCircleData7[2]; - this._circle(ctx, x, y, radius); + this._circle(ctx, _x, _y, _radius); } // draw shadow if enabled this.enableShadow(ctx); @@ -32975,13 +33367,14 @@ return /******/ (function(modules) { // webpackBootstrap from = this._findBorderPosition(this.from, ctx); to = this._findBorderPosition(this.to, ctx); } else { - var _getCircleData5 = this._getCircleData(ctx); + var _getCircleData8 = this._getCircleData(ctx); + + var _getCircleData9 = _slicedToArray(_getCircleData8, 3); - var _getCircleData52 = _slicedToArray(_getCircleData5, 3); + var x = _getCircleData9[0]; + var y = _getCircleData9[1]; + var radius = _getCircleData9[2]; - var x = _getCircleData52[0]; - var y = _getCircleData52[1]; - var radius = _getCircleData52[2]; from = this._findBorderPositionCircle(this.from, ctx, { x: x, y: y, low: 0.25, high: 0.6, direction: -1 }); to = this._findBorderPositionCircle(this.from, ctx, { x: x, y: y, low: 0.6, high: 0.8, direction: 1 }); @@ -32991,8 +33384,8 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_getCircleData', value: function _getCircleData(ctx) { - var x = undefined, - y = undefined; + var x = void 0, + y = void 0; var node = this.from; var radius = this.options.selfReferenceSize; @@ -33022,6 +33415,7 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Object} point * @private */ + }, { key: '_pointOnCircle', value: function _pointOnCircle(x, y, radius, percentage) { @@ -33040,6 +33434,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {*} * @private */ + }, { key: '_findBorderPositionCircle', value: function _findBorderPositionCircle(node, ctx, options) { @@ -33052,11 +33447,11 @@ return /******/ (function(modules) { // webpackBootstrap var maxIterations = 10; var iteration = 0; var radius = this.options.selfReferenceSize; - var pos = undefined, - angle = undefined, - distanceToBorder = undefined, - distanceToPoint = undefined, - difference = undefined; + var pos = void 0, + angle = void 0, + distanceToBorder = void 0, + distanceToPoint = void 0, + difference = void 0; var threshold = 0.05; var middle = (low + high) * 0.5; @@ -33097,6 +33492,7 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Number} width * @private */ + }, { key: 'getLineWidth', value: function getLineWidth(selected, hover) { @@ -33118,8 +33514,8 @@ return /******/ (function(modules) { // webpackBootstrap // when this is a loop edge, just use the 'from' method if (colorOptions.inherit === 'both' && this.from.id !== this.to.id) { var grd = ctx.createLinearGradient(this.from.x, this.from.y, this.to.x, this.to.y); - var fromColor = undefined, - toColor = undefined; + var fromColor = void 0, + toColor = void 0; fromColor = this.from.options.color.highlight.border; toColor = this.to.options.color.highlight.border; @@ -33176,6 +33572,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Number} radius * @private */ + }, { key: '_circle', value: function _circle(ctx, x, y, radius) { @@ -33203,6 +33600,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {number} y3 * @private */ + }, { key: 'getDistanceToEdge', value: function getDistanceToEdge(x1, y1, x2, y2, x3, y3, via) { @@ -33211,13 +33609,13 @@ return /******/ (function(modules) { // webpackBootstrap if (this.from != this.to) { returnValue = this._getDistanceToEdge(x1, y1, x2, y2, x3, y3, via); } else { - var _getCircleData6 = this._getCircleData(); + var _getCircleData10 = this._getCircleData(); - var _getCircleData62 = _slicedToArray(_getCircleData6, 3); + var _getCircleData11 = _slicedToArray(_getCircleData10, 3); - var x = _getCircleData62[0]; - var y = _getCircleData62[1]; - var radius = _getCircleData62[2]; + var x = _getCircleData11[0]; + var y = _getCircleData11[1]; + var radius = _getCircleData11[2]; var dx = x - x3; var dy = y - y3; @@ -33264,16 +33662,17 @@ return /******/ (function(modules) { // webpackBootstrap * @param position * @param viaNode */ + }, { key: 'getArrowData', value: function getArrowData(ctx, position, viaNode, selected, hover) { // set lets - var angle = undefined; - var arrowPoint = undefined; - var node1 = undefined; - var node2 = undefined; - var guideOffset = undefined; - var scaleFactor = undefined; + var angle = void 0; + var arrowPoint = void 0; + var node1 = void 0; + var node2 = void 0; + var guideOffset = void 0; + var scaleFactor = void 0; var lineWidth = this.getLineWidth(selected, hover); if (position === 'from') { @@ -33309,13 +33708,16 @@ return /******/ (function(modules) { // webpackBootstrap arrowPoint = this.getPoint(0.5, viaNode); // this is 0.6 to account for the size of the arrow. } } else { - var _getCircleData7 = this._getCircleData(ctx); + // draw circle - var _getCircleData72 = _slicedToArray(_getCircleData7, 3); + var _getCircleData12 = this._getCircleData(ctx); + + var _getCircleData13 = _slicedToArray(_getCircleData12, 3); + + var x = _getCircleData13[0]; + var y = _getCircleData13[1]; + var radius = _getCircleData13[2]; - var x = _getCircleData72[0]; - var y = _getCircleData72[1]; - var radius = _getCircleData72[2]; if (position === 'from') { arrowPoint = this.findBorderPosition(this.from, ctx, { x: x, y: y, low: 0.25, high: 0.6, direction: -1 }); @@ -33345,6 +33747,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param hover * @param arrowData */ + }, { key: 'drawArrowHead', value: function drawArrowHead(ctx, selected, hover, arrowData) { @@ -33385,15 +33788,12 @@ return /******/ (function(modules) { // webpackBootstrap }]); return EdgeBase; - })(); - - exports['default'] = EdgeBase; - module.exports = exports['default']; + }(); - // draw circle + exports.default = EdgeBase; /***/ }, -/* 86 */ +/* 87 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -33402,34 +33802,37 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x2, _x3, _x4) { var _again = true; _function: while (_again) { var object = _x2, property = _x3, receiver = _x4; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x2 = parent; _x3 = property; _x4 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _BezierEdgeBase2 = __webpack_require__(85); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + var _BezierEdgeBase3 = _interopRequireDefault(_BezierEdgeBase2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _utilBezierEdgeBase = __webpack_require__(84); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _utilBezierEdgeBase2 = _interopRequireDefault(_utilBezierEdgeBase); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var BezierEdgeDynamic = (function (_BezierEdgeBase) { + var BezierEdgeDynamic = function (_BezierEdgeBase) { _inherits(BezierEdgeDynamic, _BezierEdgeBase); function BezierEdgeDynamic(options, body, labelModule) { - var _this = this; - _classCallCheck(this, BezierEdgeDynamic); + // --> this calls the setOptions below + + var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(BezierEdgeDynamic).call(this, options, body, labelModule)); //this.via = undefined; // Here for completeness but not allowed to defined before super() is invoked. - _get(Object.getPrototypeOf(BezierEdgeDynamic.prototype), "constructor", this).call(this, options, body, labelModule); // --> this calls the setOptions below - this._boundFunction = function () { + + + _this._boundFunction = function () { _this.positionBezierNode(); }; - this.body.emitter.on("_repositionBezierNodes", this._boundFunction); + _this.body.emitter.on("_repositionBezierNodes", _this._boundFunction); + return _this; } _createClass(BezierEdgeDynamic, [{ @@ -33478,6 +33881,7 @@ return /******/ (function(modules) { // webpackBootstrap * remove the support nodes * @returns {boolean} */ + }, { key: "cleanup", value: function cleanup() { @@ -33497,6 +33901,7 @@ return /******/ (function(modules) { // webpackBootstrap * The changed data is not called, if needed, it is returned by the main edge constructor. * @private */ + }, { key: "setupSupportNode", value: function setupSupportNode() { @@ -33531,6 +33936,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {CanvasRenderingContext2D} ctx * @private */ + }, { key: "_line", value: function _line(ctx, viaNode) { @@ -33561,6 +33967,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {{x: number, y: number}} * @private */ + }, { key: "getPoint", value: function getPoint(percentage) { @@ -33586,42 +33993,41 @@ return /******/ (function(modules) { // webpackBootstrap }]); return BezierEdgeDynamic; - })(_utilBezierEdgeBase2["default"]); + }(_BezierEdgeBase3.default); - exports["default"] = BezierEdgeDynamic; - module.exports = exports["default"]; + exports.default = BezierEdgeDynamic; /***/ }, -/* 87 */ +/* 88 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x4, _x5, _x6) { var _again = true; _function: while (_again) { var object = _x4, property = _x5, receiver = _x6; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x4 = parent; _x5 = property; _x6 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _BezierEdgeBase2 = __webpack_require__(85); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _BezierEdgeBase3 = _interopRequireDefault(_BezierEdgeBase2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _utilBezierEdgeBase = __webpack_require__(84); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _utilBezierEdgeBase2 = _interopRequireDefault(_utilBezierEdgeBase); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var BezierEdgeStatic = (function (_BezierEdgeBase) { + var BezierEdgeStatic = function (_BezierEdgeBase) { _inherits(BezierEdgeStatic, _BezierEdgeBase); function BezierEdgeStatic(options, body, labelModule) { _classCallCheck(this, BezierEdgeStatic); - _get(Object.getPrototypeOf(BezierEdgeStatic.prototype), 'constructor', this).call(this, options, body, labelModule); + return _possibleConstructorReturn(this, Object.getPrototypeOf(BezierEdgeStatic).call(this, options, body, labelModule)); } /** @@ -33630,6 +34036,7 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ + _createClass(BezierEdgeStatic, [{ key: '_line', value: function _line(ctx, viaNode) { @@ -33659,6 +34066,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {{x: undefined, y: undefined}} * @private */ + }, { key: '_getViaCoordinates', value: function _getViaCoordinates() { @@ -33758,14 +34166,14 @@ return /******/ (function(modules) { // webpackBootstrap } else if (type === 'curvedCCW') { dx = this.to.x - this.from.x; dy = this.from.y - this.to.y; - var radius = Math.sqrt(dx * dx + dy * dy); - var pi = Math.PI; + var _radius = Math.sqrt(dx * dx + dy * dy); + var _pi = Math.PI; - var originalAngle = Math.atan2(dy, dx); - var myAngle = (originalAngle + (-factor * 0.5 + 0.5) * pi) % (2 * pi); + var _originalAngle = Math.atan2(dy, dx); + var _myAngle = (_originalAngle + (-factor * 0.5 + 0.5) * _pi) % (2 * _pi); - xVia = this.from.x + (factor * 0.5 + 0.5) * radius * Math.sin(myAngle); - yVia = this.from.y + (factor * 0.5 + 0.5) * radius * Math.cos(myAngle); + xVia = this.from.x + (factor * 0.5 + 0.5) * _radius * Math.sin(_myAngle); + yVia = this.from.y + (factor * 0.5 + 0.5) * _radius * Math.cos(_myAngle); } else { // continuous if (Math.abs(this.from.x - this.to.x) <= Math.abs(this.from.y - this.to.y)) { @@ -33838,6 +34246,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {{x: number, y: number}} * @private */ + }, { key: 'getPoint', value: function getPoint(percentage) { @@ -33852,42 +34261,41 @@ return /******/ (function(modules) { // webpackBootstrap }]); return BezierEdgeStatic; - })(_utilBezierEdgeBase2['default']); + }(_BezierEdgeBase3.default); - exports['default'] = BezierEdgeStatic; - module.exports = exports['default']; + exports.default = BezierEdgeStatic; /***/ }, -/* 88 */ +/* 89 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _EdgeBase2 = __webpack_require__(86); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _EdgeBase3 = _interopRequireDefault(_EdgeBase2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _utilEdgeBase = __webpack_require__(85); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _utilEdgeBase2 = _interopRequireDefault(_utilEdgeBase); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var StraightEdge = (function (_EdgeBase) { + var StraightEdge = function (_EdgeBase) { _inherits(StraightEdge, _EdgeBase); function StraightEdge(options, body, labelModule) { _classCallCheck(this, StraightEdge); - _get(Object.getPrototypeOf(StraightEdge.prototype), 'constructor', this).call(this, options, body, labelModule); + return _possibleConstructorReturn(this, Object.getPrototypeOf(StraightEdge).call(this, options, body, labelModule)); } /** @@ -33896,6 +34304,7 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ + _createClass(StraightEdge, [{ key: '_line', value: function _line(ctx) { @@ -33921,6 +34330,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {{x: number, y: number}} * @private */ + }, { key: 'getPoint', value: function getPoint(percentage) { @@ -33961,62 +34371,61 @@ return /******/ (function(modules) { // webpackBootstrap }]); return StraightEdge; - })(_utilEdgeBase2['default']); + }(_EdgeBase3.default); - exports['default'] = StraightEdge; - module.exports = exports['default']; + exports.default = StraightEdge; /***/ }, -/* 89 */ +/* 90 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _BarnesHutSolver = __webpack_require__(91); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var _BarnesHutSolver2 = _interopRequireDefault(_BarnesHutSolver); - var _componentsPhysicsBarnesHutSolver = __webpack_require__(90); + var _RepulsionSolver = __webpack_require__(92); - var _componentsPhysicsBarnesHutSolver2 = _interopRequireDefault(_componentsPhysicsBarnesHutSolver); + var _RepulsionSolver2 = _interopRequireDefault(_RepulsionSolver); - var _componentsPhysicsRepulsionSolver = __webpack_require__(91); + var _HierarchicalRepulsionSolver = __webpack_require__(93); - var _componentsPhysicsRepulsionSolver2 = _interopRequireDefault(_componentsPhysicsRepulsionSolver); + var _HierarchicalRepulsionSolver2 = _interopRequireDefault(_HierarchicalRepulsionSolver); - var _componentsPhysicsHierarchicalRepulsionSolver = __webpack_require__(92); + var _SpringSolver = __webpack_require__(94); - var _componentsPhysicsHierarchicalRepulsionSolver2 = _interopRequireDefault(_componentsPhysicsHierarchicalRepulsionSolver); + var _SpringSolver2 = _interopRequireDefault(_SpringSolver); - var _componentsPhysicsSpringSolver = __webpack_require__(93); + var _HierarchicalSpringSolver = __webpack_require__(95); - var _componentsPhysicsSpringSolver2 = _interopRequireDefault(_componentsPhysicsSpringSolver); + var _HierarchicalSpringSolver2 = _interopRequireDefault(_HierarchicalSpringSolver); - var _componentsPhysicsHierarchicalSpringSolver = __webpack_require__(94); + var _CentralGravitySolver = __webpack_require__(96); - var _componentsPhysicsHierarchicalSpringSolver2 = _interopRequireDefault(_componentsPhysicsHierarchicalSpringSolver); + var _CentralGravitySolver2 = _interopRequireDefault(_CentralGravitySolver); - var _componentsPhysicsCentralGravitySolver = __webpack_require__(95); + var _FA2BasedRepulsionSolver = __webpack_require__(97); - var _componentsPhysicsCentralGravitySolver2 = _interopRequireDefault(_componentsPhysicsCentralGravitySolver); + var _FA2BasedRepulsionSolver2 = _interopRequireDefault(_FA2BasedRepulsionSolver); - var _componentsPhysicsFA2BasedRepulsionSolver = __webpack_require__(96); + var _FA2BasedCentralGravitySolver = __webpack_require__(98); - var _componentsPhysicsFA2BasedRepulsionSolver2 = _interopRequireDefault(_componentsPhysicsFA2BasedRepulsionSolver); + var _FA2BasedCentralGravitySolver2 = _interopRequireDefault(_FA2BasedCentralGravitySolver); - var _componentsPhysicsFA2BasedCentralGravitySolver = __webpack_require__(97); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var _componentsPhysicsFA2BasedCentralGravitySolver2 = _interopRequireDefault(_componentsPhysicsFA2BasedCentralGravitySolver); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var util = __webpack_require__(1); - var PhysicsEngine = (function () { + var PhysicsEngine = function () { function PhysicsEngine(body) { _classCallCheck(this, PhysicsEngine); @@ -34148,6 +34557,7 @@ return /******/ (function(modules) { // webpackBootstrap * set the physics options * @param options */ + }, { key: 'setOptions', value: function setOptions(options) { @@ -34180,31 +34590,32 @@ return /******/ (function(modules) { // webpackBootstrap /** * configure the engine. */ + }, { key: 'init', value: function init() { var options; if (this.options.solver === 'forceAtlas2Based') { options = this.options.forceAtlas2Based; - this.nodesSolver = new _componentsPhysicsFA2BasedRepulsionSolver2['default'](this.body, this.physicsBody, options); - this.edgesSolver = new _componentsPhysicsSpringSolver2['default'](this.body, this.physicsBody, options); - this.gravitySolver = new _componentsPhysicsFA2BasedCentralGravitySolver2['default'](this.body, this.physicsBody, options); + this.nodesSolver = new _FA2BasedRepulsionSolver2.default(this.body, this.physicsBody, options); + this.edgesSolver = new _SpringSolver2.default(this.body, this.physicsBody, options); + this.gravitySolver = new _FA2BasedCentralGravitySolver2.default(this.body, this.physicsBody, options); } else if (this.options.solver === 'repulsion') { options = this.options.repulsion; - this.nodesSolver = new _componentsPhysicsRepulsionSolver2['default'](this.body, this.physicsBody, options); - this.edgesSolver = new _componentsPhysicsSpringSolver2['default'](this.body, this.physicsBody, options); - this.gravitySolver = new _componentsPhysicsCentralGravitySolver2['default'](this.body, this.physicsBody, options); + this.nodesSolver = new _RepulsionSolver2.default(this.body, this.physicsBody, options); + this.edgesSolver = new _SpringSolver2.default(this.body, this.physicsBody, options); + this.gravitySolver = new _CentralGravitySolver2.default(this.body, this.physicsBody, options); } else if (this.options.solver === 'hierarchicalRepulsion') { options = this.options.hierarchicalRepulsion; - this.nodesSolver = new _componentsPhysicsHierarchicalRepulsionSolver2['default'](this.body, this.physicsBody, options); - this.edgesSolver = new _componentsPhysicsHierarchicalSpringSolver2['default'](this.body, this.physicsBody, options); - this.gravitySolver = new _componentsPhysicsCentralGravitySolver2['default'](this.body, this.physicsBody, options); + this.nodesSolver = new _HierarchicalRepulsionSolver2.default(this.body, this.physicsBody, options); + this.edgesSolver = new _HierarchicalSpringSolver2.default(this.body, this.physicsBody, options); + this.gravitySolver = new _CentralGravitySolver2.default(this.body, this.physicsBody, options); } else { // barnesHut options = this.options.barnesHut; - this.nodesSolver = new _componentsPhysicsBarnesHutSolver2['default'](this.body, this.physicsBody, options); - this.edgesSolver = new _componentsPhysicsSpringSolver2['default'](this.body, this.physicsBody, options); - this.gravitySolver = new _componentsPhysicsCentralGravitySolver2['default'](this.body, this.physicsBody, options); + this.nodesSolver = new _BarnesHutSolver2.default(this.body, this.physicsBody, options); + this.edgesSolver = new _SpringSolver2.default(this.body, this.physicsBody, options); + this.gravitySolver = new _CentralGravitySolver2.default(this.body, this.physicsBody, options); } this.modelOptions = options; @@ -34213,6 +34624,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * initialize the engine */ + }, { key: 'initPhysics', value: function initPhysics() { @@ -34234,6 +34646,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Start the simulation */ + }, { key: 'startSimulation', value: function startSimulation() { @@ -34258,6 +34671,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Stop the simulation, force stabilization. */ + }, { key: 'stopSimulation', value: function stopSimulation() { @@ -34280,6 +34694,7 @@ return /******/ (function(modules) { // webpackBootstrap * The viewFunction inserts this step into each render loop. It calls the physics tick and handles the cleanup at stabilized. * */ + }, { key: 'simulationStep', value: function simulationStep() { @@ -34305,6 +34720,7 @@ return /******/ (function(modules) { // webpackBootstrap * trigger the stabilized event. * @private */ + }, { key: '_emitStabilized', value: function _emitStabilized() { @@ -34326,6 +34742,7 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { key: 'physicsTick', value: function physicsTick() { @@ -34404,6 +34821,7 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { key: 'updatePhysicsData', value: function updatePhysicsData() { @@ -34433,19 +34851,19 @@ return /******/ (function(modules) { // webpackBootstrap // get the velocity and the forces vector for (var i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) { - var nodeId = this.physicsBody.physicsNodeIndices[i]; - this.physicsBody.forces[nodeId] = { x: 0, y: 0 }; + var _nodeId = this.physicsBody.physicsNodeIndices[i]; + this.physicsBody.forces[_nodeId] = { x: 0, y: 0 }; // forces can be reset because they are recalculated. Velocities have to persist. - if (this.physicsBody.velocities[nodeId] === undefined) { - this.physicsBody.velocities[nodeId] = { x: 0, y: 0 }; + if (this.physicsBody.velocities[_nodeId] === undefined) { + this.physicsBody.velocities[_nodeId] = { x: 0, y: 0 }; } } // clean deleted nodes from the velocity vector - for (var nodeId in this.physicsBody.velocities) { - if (nodes[nodeId] === undefined) { - delete this.physicsBody.velocities[nodeId]; + for (var _nodeId2 in this.physicsBody.velocities) { + if (nodes[_nodeId2] === undefined) { + delete this.physicsBody.velocities[_nodeId2]; } } } @@ -34453,6 +34871,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Revert the simulation one step. This is done so after stabilization, every new start of the simulation will also say stabilized. */ + }, { key: 'revert', value: function revert() { @@ -34482,12 +34901,13 @@ return /******/ (function(modules) { // webpackBootstrap /** * This compares the reference state to the current state */ + }, { key: '_evaluateStepQuality', value: function _evaluateStepQuality() { - var dx = undefined, - dy = undefined, - dpos = undefined; + var dx = void 0, + dy = void 0, + dpos = void 0; var nodes = this.body.nodes; var reference = this.referenceState; var posThreshold = 0.3; @@ -34511,6 +34931,7 @@ return /******/ (function(modules) { // webpackBootstrap * move the nodes one timestep and check if they are stabilized * @returns {boolean} */ + }, { key: 'moveNodes', value: function moveNodes() { @@ -34543,6 +34964,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} * @private */ + }, { key: '_performStep', value: function _performStep(nodeId, maxVelocity) { @@ -34583,6 +35005,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * calculate the forces for one physics iteration. */ + }, { key: 'calculateForces', value: function calculateForces() { @@ -34597,6 +35020,7 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { key: '_freezeNodes', value: function _freezeNodes() { @@ -34617,6 +35041,7 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { key: '_restoreFrozenNodes', value: function _restoreFrozenNodes() { @@ -34635,6 +35060,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Find a stable position for all nodes */ + }, { key: 'stabilize', value: function stabilize() { @@ -34683,6 +35109,7 @@ return /******/ (function(modules) { // webpackBootstrap * One batch of stabilization * @private */ + }, { key: '_stabilizationBatch', value: function _stabilizationBatch() { @@ -34710,6 +35137,7 @@ return /******/ (function(modules) { // webpackBootstrap * Wrap up the stabilization, fit and emit the events. * @private */ + }, { key: '_finalizeStabilization', value: function _finalizeStabilization() { @@ -34764,13 +35192,12 @@ return /******/ (function(modules) { // webpackBootstrap }]); return PhysicsEngine; - })(); + }(); - exports['default'] = PhysicsEngine; - module.exports = exports['default']; + exports.default = PhysicsEngine; /***/ }, -/* 90 */ +/* 91 */ /***/ function(module, exports) { "use strict"; @@ -34779,11 +35206,11 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var BarnesHutSolver = (function () { + var BarnesHutSolver = function () { function BarnesHutSolver(body, physicsBody, options) { _classCallCheck(this, BarnesHutSolver); @@ -34817,11 +35244,12 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { key: "solve", value: function solve() { if (this.options.gravitationalConstant !== 0 && this.physicsBody.physicsNodeIndices.length > 0) { - var node = undefined; + var node = void 0; var nodes = this.body.nodes; var nodeIndices = this.physicsBody.physicsNodeIndices; var nodeCount = nodeIndices.length; @@ -34854,14 +35282,15 @@ return /******/ (function(modules) { // webpackBootstrap * @param node * @private */ + }, { key: "_getForceContribution", value: function _getForceContribution(parentBranch, node) { // we get no force contribution from an empty region if (parentBranch.childrenCount > 0) { - var dx = undefined, - dy = undefined, - distance = undefined; + var dx = void 0, + dy = void 0, + distance = void 0; // get the distance from the center of mass to the node. dx = parentBranch.centerOfMass.x - node.x; @@ -34901,6 +35330,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param parentBranch * @private */ + }, { key: "_calculateForces", value: function _calculateForces(distance, dx, dy, node, parentBranch) { @@ -34930,10 +35360,11 @@ return /******/ (function(modules) { // webpackBootstrap * @param nodeIndices * @private */ + }, { key: "_formBarnesHutTree", value: function _formBarnesHutTree(nodes, nodeIndices) { - var node = undefined; + var node = void 0; var nodeCount = nodeIndices.length; var minX = nodes[nodeIndices[0]].x; @@ -34997,8 +35428,8 @@ return /******/ (function(modules) { // webpackBootstrap this._splitBranch(barnesHutTree.root); // place the nodes one by one recursively - for (var i = 0; i < nodeCount; i++) { - node = nodes[nodeIndices[i]]; + for (var _i = 0; _i < nodeCount; _i++) { + node = nodes[nodeIndices[_i]]; if (node.options.mass > 0) { this._placeInTree(barnesHutTree.root, node); } @@ -35015,6 +35446,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param node * @private */ + }, { key: "_updateBranchMass", value: function _updateBranchMass(parentBranch, node) { @@ -35040,6 +35472,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param skipMassUpdate * @private */ + }, { key: "_placeInTree", value: function _placeInTree(parentBranch, node, skipMassUpdate) { @@ -35077,6 +35510,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param region * @private */ + }, { key: "_placeInRegion", value: function _placeInRegion(parentBranch, node, region) { @@ -35113,6 +35547,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param parentBranch * @private */ + }, { key: "_splitBranch", value: function _splitBranch(parentBranch) { @@ -35146,13 +35581,14 @@ return /******/ (function(modules) { // webpackBootstrap * @param parentRange * @private */ + }, { key: "_insertRegion", value: function _insertRegion(parentBranch, region) { - var minX = undefined, - maxX = undefined, - minY = undefined, - maxY = undefined; + var minX = void 0, + maxX = void 0, + minY = void 0, + maxY = void 0; var childSize = 0.5 * parentBranch.size; switch (region) { case "NW": @@ -35203,6 +35639,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param color * @private */ + }, { key: "_debug", value: function _debug(ctx, color) { @@ -35222,6 +35659,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param color * @private */ + }, { key: "_drawBranch", value: function _drawBranch(branch, ctx, color) { @@ -35266,13 +35704,12 @@ return /******/ (function(modules) { // webpackBootstrap }]); return BarnesHutSolver; - })(); + }(); - exports["default"] = BarnesHutSolver; - module.exports = exports["default"]; + exports.default = BarnesHutSolver; /***/ }, -/* 91 */ +/* 92 */ /***/ function(module, exports) { "use strict"; @@ -35281,11 +35718,11 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var RepulsionSolver = (function () { + var RepulsionSolver = function () { function RepulsionSolver(body, physicsBody, options) { _classCallCheck(this, RepulsionSolver); @@ -35299,13 +35736,13 @@ return /******/ (function(modules) { // webpackBootstrap value: function setOptions(options) { this.options = options; } - /** * Calculate the forces the nodes apply on each other based on a repulsion field. * This field is linearly approximated. * * @private */ + }, { key: "solve", value: function solve() { @@ -35361,13 +35798,12 @@ return /******/ (function(modules) { // webpackBootstrap }]); return RepulsionSolver; - })(); + }(); - exports["default"] = RepulsionSolver; - module.exports = exports["default"]; + exports.default = RepulsionSolver; /***/ }, -/* 92 */ +/* 93 */ /***/ function(module, exports) { "use strict"; @@ -35376,11 +35812,11 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var HierarchicalRepulsionSolver = (function () { + var HierarchicalRepulsionSolver = function () { function HierarchicalRepulsionSolver(body, physicsBody, options) { _classCallCheck(this, HierarchicalRepulsionSolver); @@ -35401,6 +35837,7 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { key: "solve", value: function solve() { @@ -35452,13 +35889,12 @@ return /******/ (function(modules) { // webpackBootstrap }]); return HierarchicalRepulsionSolver; - })(); + }(); - exports["default"] = HierarchicalRepulsionSolver; - module.exports = exports["default"]; + exports.default = HierarchicalRepulsionSolver; /***/ }, -/* 93 */ +/* 94 */ /***/ function(module, exports) { "use strict"; @@ -35467,11 +35903,11 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var SpringSolver = (function () { + var SpringSolver = function () { function SpringSolver(body, physicsBody, options) { _classCallCheck(this, SpringSolver); @@ -35491,16 +35927,17 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { key: "solve", value: function solve() { - var edgeLength = undefined, - edge = undefined; + var edgeLength = void 0, + edge = void 0; var edgeIndices = this.physicsBody.physicsEdgeIndices; var edges = this.body.edges; - var node1 = undefined, - node2 = undefined, - node3 = undefined; + var node1 = void 0, + node2 = void 0, + node3 = void 0; // forces caused by the edges, modelled as springs for (var i = 0; i < edgeIndices.length; i++) { @@ -35535,6 +35972,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param edgeLength * @private */ + }, { key: "_calculateSpringForce", value: function _calculateSpringForce(node1, node2, edgeLength) { @@ -35562,13 +36000,12 @@ return /******/ (function(modules) { // webpackBootstrap }]); return SpringSolver; - })(); + }(); - exports["default"] = SpringSolver; - module.exports = exports["default"]; + exports.default = SpringSolver; /***/ }, -/* 94 */ +/* 95 */ /***/ function(module, exports) { "use strict"; @@ -35577,11 +36014,11 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var HierarchicalSpringSolver = (function () { + var HierarchicalSpringSolver = function () { function HierarchicalSpringSolver(body, physicsBody, options) { _classCallCheck(this, HierarchicalSpringSolver); @@ -35601,6 +36038,7 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { key: "solve", value: function solve() { @@ -35621,8 +36059,8 @@ return /******/ (function(modules) { // webpackBootstrap } // forces caused by the edges, modelled as springs - for (var i = 0; i < edgeIndices.length; i++) { - edge = edges[edgeIndices[i]]; + for (var _i = 0; _i < edgeIndices.length; _i++) { + edge = edges[edgeIndices[_i]]; if (edge.connected === true) { edgeLength = edge.options.length === undefined ? this.options.springLength : edge.options.length; @@ -35662,42 +36100,41 @@ return /******/ (function(modules) { // webpackBootstrap // normalize spring forces var springForce = 1; var springFx, springFy; - for (var i = 0; i < nodeIndices.length; i++) { - var nodeId = nodeIndices[i]; - springFx = Math.min(springForce, Math.max(-springForce, forces[nodeId].springFx)); - springFy = Math.min(springForce, Math.max(-springForce, forces[nodeId].springFy)); + for (var _i2 = 0; _i2 < nodeIndices.length; _i2++) { + var _nodeId = nodeIndices[_i2]; + springFx = Math.min(springForce, Math.max(-springForce, forces[_nodeId].springFx)); + springFy = Math.min(springForce, Math.max(-springForce, forces[_nodeId].springFy)); - forces[nodeId].x += springFx; - forces[nodeId].y += springFy; + forces[_nodeId].x += springFx; + forces[_nodeId].y += springFy; } // retain energy balance var totalFx = 0; var totalFy = 0; - for (var i = 0; i < nodeIndices.length; i++) { - var nodeId = nodeIndices[i]; - totalFx += forces[nodeId].x; - totalFy += forces[nodeId].y; + for (var _i3 = 0; _i3 < nodeIndices.length; _i3++) { + var _nodeId2 = nodeIndices[_i3]; + totalFx += forces[_nodeId2].x; + totalFy += forces[_nodeId2].y; } var correctionFx = totalFx / nodeIndices.length; var correctionFy = totalFy / nodeIndices.length; - for (var i = 0; i < nodeIndices.length; i++) { - var nodeId = nodeIndices[i]; - forces[nodeId].x -= correctionFx; - forces[nodeId].y -= correctionFy; + for (var _i4 = 0; _i4 < nodeIndices.length; _i4++) { + var _nodeId3 = nodeIndices[_i4]; + forces[_nodeId3].x -= correctionFx; + forces[_nodeId3].y -= correctionFy; } } }]); return HierarchicalSpringSolver; - })(); + }(); - exports["default"] = HierarchicalSpringSolver; - module.exports = exports["default"]; + exports.default = HierarchicalSpringSolver; /***/ }, -/* 95 */ +/* 96 */ /***/ function(module, exports) { "use strict"; @@ -35706,11 +36143,11 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var CentralGravitySolver = (function () { + var CentralGravitySolver = function () { function CentralGravitySolver(body, physicsBody, options) { _classCallCheck(this, CentralGravitySolver); @@ -35727,10 +36164,10 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: "solve", value: function solve() { - var dx = undefined, - dy = undefined, - distance = undefined, - node = undefined; + var dx = void 0, + dy = void 0, + distance = void 0, + node = void 0; var nodes = this.body.nodes; var nodeIndices = this.physicsBody.physicsNodeIndices; var forces = this.physicsBody.forces; @@ -35750,6 +36187,7 @@ return /******/ (function(modules) { // webpackBootstrap * Calculate the forces based on the distance. * @private */ + }, { key: "_calculateForces", value: function _calculateForces(distance, dx, dy, forces, node) { @@ -35760,13 +36198,12 @@ return /******/ (function(modules) { // webpackBootstrap }]); return CentralGravitySolver; - })(); + }(); - exports["default"] = CentralGravitySolver; - module.exports = exports["default"]; + exports.default = CentralGravitySolver; /***/ }, -/* 96 */ +/* 97 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -35775,27 +36212,27 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + var _BarnesHutSolver2 = __webpack_require__(91); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _BarnesHutSolver3 = _interopRequireDefault(_BarnesHutSolver2); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - var _BarnesHutSolver2 = __webpack_require__(90); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _BarnesHutSolver3 = _interopRequireDefault(_BarnesHutSolver2); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var ForceAtlas2BasedRepulsionSolver = (function (_BarnesHutSolver) { + var ForceAtlas2BasedRepulsionSolver = function (_BarnesHutSolver) { _inherits(ForceAtlas2BasedRepulsionSolver, _BarnesHutSolver); function ForceAtlas2BasedRepulsionSolver(body, physicsBody, options) { _classCallCheck(this, ForceAtlas2BasedRepulsionSolver); - _get(Object.getPrototypeOf(ForceAtlas2BasedRepulsionSolver.prototype), "constructor", this).call(this, body, physicsBody, options); + return _possibleConstructorReturn(this, Object.getPrototypeOf(ForceAtlas2BasedRepulsionSolver).call(this, body, physicsBody, options)); } /** @@ -35809,6 +36246,7 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ + _createClass(ForceAtlas2BasedRepulsionSolver, [{ key: "_calculateForces", value: function _calculateForces(distance, dx, dy, node, parentBranch) { @@ -35834,13 +36272,12 @@ return /******/ (function(modules) { // webpackBootstrap }]); return ForceAtlas2BasedRepulsionSolver; - })(_BarnesHutSolver3["default"]); + }(_BarnesHutSolver3.default); - exports["default"] = ForceAtlas2BasedRepulsionSolver; - module.exports = exports["default"]; + exports.default = ForceAtlas2BasedRepulsionSolver; /***/ }, -/* 97 */ +/* 98 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -35849,27 +36286,27 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _CentralGravitySolver2 = __webpack_require__(96); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + var _CentralGravitySolver3 = _interopRequireDefault(_CentralGravitySolver2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _CentralGravitySolver2 = __webpack_require__(95); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _CentralGravitySolver3 = _interopRequireDefault(_CentralGravitySolver2); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var ForceAtlas2BasedCentralGravitySolver = (function (_CentralGravitySolver) { + var ForceAtlas2BasedCentralGravitySolver = function (_CentralGravitySolver) { _inherits(ForceAtlas2BasedCentralGravitySolver, _CentralGravitySolver); function ForceAtlas2BasedCentralGravitySolver(body, physicsBody, options) { _classCallCheck(this, ForceAtlas2BasedCentralGravitySolver); - _get(Object.getPrototypeOf(ForceAtlas2BasedCentralGravitySolver.prototype), "constructor", this).call(this, body, physicsBody, options); + return _possibleConstructorReturn(this, Object.getPrototypeOf(ForceAtlas2BasedCentralGravitySolver).call(this, body, physicsBody, options)); } /** @@ -35877,6 +36314,7 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ + _createClass(ForceAtlas2BasedCentralGravitySolver, [{ key: "_calculateForces", value: function _calculateForces(distance, dx, dy, forces, node) { @@ -35890,38 +36328,39 @@ return /******/ (function(modules) { // webpackBootstrap }]); return ForceAtlas2BasedCentralGravitySolver; - })(_CentralGravitySolver3["default"]); + }(_CentralGravitySolver3.default); - exports["default"] = ForceAtlas2BasedCentralGravitySolver; - module.exports = exports["default"]; + exports.default = ForceAtlas2BasedCentralGravitySolver; /***/ }, -/* 98 */ +/* 99 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - - var _NetworkUtil = __webpack_require__(99); + var _NetworkUtil = __webpack_require__(100); var _NetworkUtil2 = _interopRequireDefault(_NetworkUtil); - var _componentsNodesCluster = __webpack_require__(100); + var _Cluster = __webpack_require__(101); + + var _Cluster2 = _interopRequireDefault(_Cluster); - var _componentsNodesCluster2 = _interopRequireDefault(_componentsNodesCluster); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var util = __webpack_require__(1); - var ClusterEngine = (function () { + var ClusterEngine = function () { function ClusterEngine(body) { var _this = this; @@ -35951,12 +36390,13 @@ return /******/ (function(modules) { // webpackBootstrap * @param hubsize * @param options */ + }, { key: 'clusterByHubsize', value: function clusterByHubsize(hubsize, options) { if (hubsize === undefined) { hubsize = this._getHubSize(); - } else if (typeof hubsize === "object") { + } else if ((typeof hubsize === 'undefined' ? 'undefined' : _typeof(hubsize)) === "object") { options = this._checkOptions(hubsize); hubsize = this._getHubSize(); } @@ -35969,8 +36409,8 @@ return /******/ (function(modules) { // webpackBootstrap } } - for (var i = 0; i < nodesToCluster.length; i++) { - this.clusterByConnection(nodesToCluster[i], options, true); + for (var _i = 0; _i < nodesToCluster.length; _i++) { + this.clusterByConnection(nodesToCluster[_i], options, true); } this.body.emitter.emit('_dataChanged'); @@ -35981,6 +36421,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param options * @param refreshData */ + }, { key: 'cluster', value: function cluster() { @@ -36001,13 +36442,13 @@ return /******/ (function(modules) { // webpackBootstrap for (var i = 0; i < this.body.nodeIndices.length; i++) { var nodeId = this.body.nodeIndices[i]; var node = this.body.nodes[nodeId]; - var clonedOptions = _NetworkUtil2['default'].cloneOptions(node); + var clonedOptions = _NetworkUtil2.default.cloneOptions(node); if (options.joinCondition(clonedOptions) === true) { childNodesObj[nodeId] = this.body.nodes[nodeId]; // collect the nodes that will be in the cluster - for (var _i = 0; _i < node.edges.length; _i++) { - var edge = node.edges[_i]; + for (var _i2 = 0; _i2 < node.edges.length; _i2++) { + var edge = node.edges[_i2]; if (this.clusteredEdges[edge.id] === undefined) { childEdgesObj[edge.id] = edge; } @@ -36024,6 +36465,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param options * @param refreshData */ + }, { key: 'clusterByEdgeCount', value: function clusterByEdgeCount(edgeCount, options) { @@ -36032,11 +36474,11 @@ return /******/ (function(modules) { // webpackBootstrap options = this._checkOptions(options); var clusters = []; var usedNodes = {}; - var edge = undefined, - edges = undefined, - node = undefined, - nodeId = undefined, - relevantEdgeCount = undefined; + var edge = void 0, + edges = void 0, + node = void 0, + nodeId = void 0, + relevantEdgeCount = void 0; // collect the nodes that will be in the cluster for (var i = 0; i < this.body.nodeIndices.length; i++) { var childNodesObj = {}; @@ -36061,8 +36503,8 @@ return /******/ (function(modules) { // webpackBootstrap // this node qualifies, we collect its neighbours to start the clustering process. if (relevantEdgeCount === edgeCount) { var gatheringSuccessful = true; - for (var j = 0; j < edges.length; j++) { - edge = edges[j]; + for (var _j = 0; _j < edges.length; _j++) { + edge = edges[_j]; var childNodeId = this._getConnectedId(edge, nodeId); // add the nodes to the list by the join condition. if (options.joinCondition === undefined) { @@ -36071,7 +36513,7 @@ return /******/ (function(modules) { // webpackBootstrap childNodesObj[childNodeId] = this.body.nodes[childNodeId]; usedNodes[nodeId] = true; } else { - var clonedOptions = _NetworkUtil2['default'].cloneOptions(this.body.nodes[nodeId]); + var clonedOptions = _NetworkUtil2.default.cloneOptions(this.body.nodes[nodeId]); if (options.joinCondition(clonedOptions) === true) { childEdgesObj[edge.id] = edge; childNodesObj[nodeId] = this.body.nodes[nodeId]; @@ -36092,8 +36534,8 @@ return /******/ (function(modules) { // webpackBootstrap } } - for (var i = 0; i < clusters.length; i++) { - this._cluster(clusters[i].nodes, clusters[i].edges, options, false); + for (var _i3 = 0; _i3 < clusters.length; _i3++) { + this._cluster(clusters[_i3].nodes, clusters[_i3].edges, options, false); } if (refreshData === true) { @@ -36106,6 +36548,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param options * @param refreshData */ + }, { key: 'clusterOutliers', value: function clusterOutliers(options) { @@ -36119,6 +36562,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param options * @param refreshData */ + }, { key: 'clusterBridges', value: function clusterBridges(options) { @@ -36133,6 +36577,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param options * @param refreshData */ + }, { key: 'clusterByConnection', value: function clusterByConnection(nodeId, options) { @@ -36163,7 +36608,7 @@ return /******/ (function(modules) { // webpackBootstrap var childNodesObj = {}; var childEdgesObj = {}; var parentNodeId = node.id; - var parentClonedOptions = _NetworkUtil2['default'].cloneOptions(node); + var parentClonedOptions = _NetworkUtil2.default.cloneOptions(node); childNodesObj[parentNodeId] = node; // collect the nodes that will be in the cluster @@ -36180,7 +36625,7 @@ return /******/ (function(modules) { // webpackBootstrap childNodesObj[childNodeId] = this.body.nodes[childNodeId]; } else { // clone the options and insert some additional parameters that could be interesting. - var childClonedOptions = _NetworkUtil2['default'].cloneOptions(this.body.nodes[childNodeId]); + var childClonedOptions = _NetworkUtil2.default.cloneOptions(this.body.nodes[childNodeId]); if (options.joinCondition(parentClonedOptions, childClonedOptions) === true) { childEdgesObj[edge.id] = edge; childNodesObj[childNodeId] = this.body.nodes[childNodeId]; @@ -36207,15 +36652,16 @@ return /******/ (function(modules) { // webpackBootstrap * @param clusterEdgeProperties * @private */ + }, { key: '_createClusterEdges', value: function _createClusterEdges(childNodesObj, childEdgesObj, clusterNodeProperties, clusterEdgeProperties) { - var edge = undefined, - childNodeId = undefined, - childNode = undefined, - toId = undefined, - fromId = undefined, - otherNodeId = undefined; + var edge = void 0, + childNodeId = void 0, + childNode = void 0, + toId = void 0, + fromId = void 0, + otherNodeId = void 0; // loop over all child nodes and their edges to find edges going out of the cluster // these edges will be replaced by clusterEdges. @@ -36257,16 +36703,16 @@ return /******/ (function(modules) { // webpackBootstrap // here we actually create the replacement edges. We could not do this in the loop above as the creation process // would add an edge to the edges array we are iterating over. - for (var j = 0; j < createEdges.length; j++) { - var _edge = createEdges[j].edge; + for (var _j2 = 0; _j2 < createEdges.length; _j2++) { + var _edge = createEdges[_j2].edge; // copy the options of the edge we will replace - var clonedOptions = _NetworkUtil2['default'].cloneOptions(_edge, 'edge'); + var clonedOptions = _NetworkUtil2.default.cloneOptions(_edge, 'edge'); // make sure the properties of clusterEdges are superimposed on it util.deepExtend(clonedOptions, clusterEdgeProperties); // set up the edge - clonedOptions.from = createEdges[j].fromId; - clonedOptions.to = createEdges[j].toId; + clonedOptions.from = createEdges[_j2].fromId; + clonedOptions.to = createEdges[_j2].toId; clonedOptions.id = 'clusterEdge:' + util.randomUUID(); //clonedOptions.id = '(cf: ' + createEdges[j].fromId + " to: " + createEdges[j].toId + ")" + Math.random(); @@ -36291,6 +36737,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {*} * @private */ + }, { key: '_checkOptions', value: function _checkOptions() { @@ -36314,6 +36761,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Boolean} refreshData | when true, do not wrap up * @private */ + }, { key: '_cluster', value: function _cluster(childNodesObj, childEdgesObj, options) { @@ -36339,9 +36787,9 @@ return /******/ (function(modules) { // webpackBootstrap if (options.processProperties !== undefined) { // get the childNode options var childNodesOptions = []; - for (var nodeId in childNodesObj) { - if (childNodesObj.hasOwnProperty(nodeId)) { - var clonedOptions = _NetworkUtil2['default'].cloneOptions(childNodesObj[nodeId]); + for (var _nodeId in childNodesObj) { + if (childNodesObj.hasOwnProperty(_nodeId)) { + var clonedOptions = _NetworkUtil2.default.cloneOptions(childNodesObj[_nodeId]); childNodesOptions.push(clonedOptions); } } @@ -36352,8 +36800,8 @@ return /******/ (function(modules) { // webpackBootstrap if (childEdgesObj.hasOwnProperty(edgeId)) { // these cluster edges will be removed on creation of the cluster. if (edgeId.substr(0, 12) !== "clusterEdge:") { - var clonedOptions = _NetworkUtil2['default'].cloneOptions(childEdgesObj[edgeId], 'edge'); - childEdgesOptions.push(clonedOptions); + var _clonedOptions = _NetworkUtil2.default.cloneOptions(childEdgesObj[edgeId], 'edge'); + childEdgesOptions.push(_clonedOptions); } } } @@ -36391,7 +36839,7 @@ return /******/ (function(modules) { // webpackBootstrap clusterNodeProperties.id = clusterId; // create the clusterNode - var clusterNode = this.body.functions.createNode(clusterNodeProperties, _componentsNodesCluster2['default']); + var clusterNode = this.body.functions.createNode(clusterNodeProperties, _Cluster2.default); clusterNode.isCluster = true; clusterNode.containedNodes = childNodesObj; clusterNode.containedEdges = childEdgesObj; @@ -36405,10 +36853,10 @@ return /******/ (function(modules) { // webpackBootstrap this._createClusterEdges(childNodesObj, childEdgesObj, clusterNodeProperties, options.clusterEdgeProperties); // disable the childEdges - for (var edgeId in childEdgesObj) { - if (childEdgesObj.hasOwnProperty(edgeId)) { - if (this.body.edges[edgeId] !== undefined) { - var edge = this.body.edges[edgeId]; + for (var _edgeId in childEdgesObj) { + if (childEdgesObj.hasOwnProperty(_edgeId)) { + if (this.body.edges[_edgeId] !== undefined) { + var edge = this.body.edges[_edgeId]; // cache the options before changing this._backupEdgeOptions(edge); // disable physics and hide the edge @@ -36418,10 +36866,10 @@ return /******/ (function(modules) { // webpackBootstrap } // disable the childNodes - for (var nodeId in childNodesObj) { - if (childNodesObj.hasOwnProperty(nodeId)) { - this.clusteredNodes[nodeId] = { clusterId: clusterNodeProperties.id, node: this.body.nodes[nodeId] }; - this.body.nodes[nodeId].setOptions({ hidden: true, physics: false }); + for (var _nodeId2 in childNodesObj) { + if (childNodesObj.hasOwnProperty(_nodeId2)) { + this.clusteredNodes[_nodeId2] = { clusterId: clusterNodeProperties.id, node: this.body.nodes[_nodeId2] }; + this.body.nodes[_nodeId2].setOptions({ hidden: true, physics: false }); } } @@ -36455,6 +36903,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param nodeId * @returns {*} */ + }, { key: 'isCluster', value: function isCluster(nodeId) { @@ -36472,6 +36921,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {{x: number, y: number}} * @private */ + }, { key: '_getClusterPosition', value: function _getClusterPosition(childNodesObj) { @@ -36480,7 +36930,7 @@ return /******/ (function(modules) { // webpackBootstrap var maxX = childNodesObj[childKeys[0]].x; var minY = childNodesObj[childKeys[0]].y; var maxY = childNodesObj[childKeys[0]].y; - var node = undefined; + var node = void 0; for (var i = 1; i < childKeys.length; i++) { node = childNodesObj[childKeys[i]]; minX = node.x < minX ? node.x : minX; @@ -36497,6 +36947,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {String} clusterNodeId | the ID of the cluster node * @param {Boolean} refreshData | wrap up afterwards if not true */ + }, { key: 'openCluster', value: function openCluster(clusterNodeId, options) { @@ -36529,45 +36980,45 @@ return /******/ (function(modules) { // webpackBootstrap } var newPositions = options.releaseFunction(clusterPosition, positions); - for (var nodeId in containedNodes) { - if (containedNodes.hasOwnProperty(nodeId)) { - var containedNode = this.body.nodes[nodeId]; - if (newPositions[nodeId] !== undefined) { - containedNode.x = newPositions[nodeId].x === undefined ? clusterNode.x : newPositions[nodeId].x; - containedNode.y = newPositions[nodeId].y === undefined ? clusterNode.y : newPositions[nodeId].y; + for (var _nodeId3 in containedNodes) { + if (containedNodes.hasOwnProperty(_nodeId3)) { + var _containedNode = this.body.nodes[_nodeId3]; + if (newPositions[_nodeId3] !== undefined) { + _containedNode.x = newPositions[_nodeId3].x === undefined ? clusterNode.x : newPositions[_nodeId3].x; + _containedNode.y = newPositions[_nodeId3].y === undefined ? clusterNode.y : newPositions[_nodeId3].y; } } } } else { // copy the position from the cluster - for (var nodeId in containedNodes) { - if (containedNodes.hasOwnProperty(nodeId)) { - var containedNode = this.body.nodes[nodeId]; - containedNode = containedNodes[nodeId]; + for (var _nodeId4 in containedNodes) { + if (containedNodes.hasOwnProperty(_nodeId4)) { + var _containedNode2 = this.body.nodes[_nodeId4]; + _containedNode2 = containedNodes[_nodeId4]; // inherit position - if (containedNode.options.fixed.x === false) { - containedNode.x = clusterNode.x; + if (_containedNode2.options.fixed.x === false) { + _containedNode2.x = clusterNode.x; } - if (containedNode.options.fixed.y === false) { - containedNode.y = clusterNode.y; + if (_containedNode2.options.fixed.y === false) { + _containedNode2.y = clusterNode.y; } } } } // release nodes - for (var nodeId in containedNodes) { - if (containedNodes.hasOwnProperty(nodeId)) { - var containedNode = this.body.nodes[nodeId]; + for (var _nodeId5 in containedNodes) { + if (containedNodes.hasOwnProperty(_nodeId5)) { + var _containedNode3 = this.body.nodes[_nodeId5]; // inherit speed - containedNode.vx = clusterNode.vx; - containedNode.vy = clusterNode.vy; + _containedNode3.vx = clusterNode.vx; + _containedNode3.vy = clusterNode.vy; // we use these methods to avoid re-instantiating the shape, which happens with setOptions. - containedNode.setOptions({ hidden: false, physics: true }); + _containedNode3.setOptions({ hidden: false, physics: true }); - delete this.clusteredNodes[nodeId]; + delete this.clusteredNodes[_nodeId5]; } } @@ -36578,8 +37029,8 @@ return /******/ (function(modules) { // webpackBootstrap } // actually handling the deleting. - for (var i = 0; i < edgesToBeDeleted.length; i++) { - var edge = edgesToBeDeleted[i]; + for (var _i4 = 0; _i4 < edgesToBeDeleted.length; _i4++) { + var edge = edgesToBeDeleted[_i4]; var otherNodeId = this._getConnectedId(edge, clusterNodeId); // if the other node is in another cluster, we transfer ownership of this edge to the other cluster @@ -36604,7 +37055,7 @@ return /******/ (function(modules) { // webpackBootstrap } // clone the options and apply the cluster options to them - var clonedOptions = _NetworkUtil2['default'].cloneOptions(transferEdge, 'edge'); + var clonedOptions = _NetworkUtil2.default.cloneOptions(transferEdge, 'edge'); util.deepExtend(clonedOptions, otherCluster.clusterEdgeProperties); // apply the edge specific options to it. @@ -36664,6 +37115,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param nodeId * @returns {Array} */ + }, { key: 'findNode', value: function findNode(nodeId) { @@ -36689,6 +37141,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {*} * @private */ + }, { key: '_getConnectedId', value: function _getConnectedId(edge, nodeId) { @@ -36707,6 +37160,7 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { key: '_getHubSize', value: function _getHubSize() { @@ -36742,13 +37196,12 @@ return /******/ (function(modules) { // webpackBootstrap }]); return ClusterEngine; - })(); + }(); - exports['default'] = ClusterEngine; - module.exports = exports['default']; + exports.default = ClusterEngine; /***/ }, -/* 99 */ +/* 100 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -36757,13 +37210,13 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var util = __webpack_require__(1); - var NetworkUtil = (function () { + var NetworkUtil = function () { function NetworkUtil() { _classCallCheck(this, NetworkUtil); } @@ -36772,6 +37225,7 @@ return /******/ (function(modules) { // webpackBootstrap * Find the center position of the network considering the bounding boxes */ + _createClass(NetworkUtil, null, [{ key: "getRange", value: function getRange(allNodes) { @@ -36809,6 +37263,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Find the center position of the network */ + }, { key: "getRangeCore", value: function getRangeCore(allNodes) { @@ -36847,6 +37302,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {object} range = {minX: minX, maxX: maxX, minY: minY, maxY: maxY}; * @returns {{x: number, y: number}} */ + }, { key: "findCenter", value: function findCenter(range) { @@ -36860,6 +37316,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param type * @returns {{}} */ + }, { key: "cloneOptions", value: function cloneOptions(item, type) { @@ -36877,69 +37334,68 @@ return /******/ (function(modules) { // webpackBootstrap }]); return NetworkUtil; - })(); + }(); - exports["default"] = NetworkUtil; - module.exports = exports["default"]; + exports.default = NetworkUtil; /***/ }, -/* 100 */ +/* 101 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _Node2 = __webpack_require__(62); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _Node3 = _interopRequireDefault(_Node2); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _Node2 = __webpack_require__(61); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _Node3 = _interopRequireDefault(_Node2); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * */ - var Cluster = (function (_Node) { + var Cluster = function (_Node) { _inherits(Cluster, _Node); function Cluster(options, body, imagelist, grouplist, globalOptions) { _classCallCheck(this, Cluster); - _get(Object.getPrototypeOf(Cluster.prototype), 'constructor', this).call(this, options, body, imagelist, grouplist, globalOptions); + var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Cluster).call(this, options, body, imagelist, grouplist, globalOptions)); - this.isCluster = true; - this.containedNodes = {}; - this.containedEdges = {}; + _this.isCluster = true; + _this.containedNodes = {}; + _this.containedEdges = {}; + return _this; } return Cluster; - })(_Node3['default']); + }(_Node3.default); - exports['default'] = Cluster; - module.exports = exports['default']; + exports.default = Cluster; /***/ }, -/* 101 */ +/* 102 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } if (typeof window !== 'undefined') { window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame; @@ -36947,7 +37403,7 @@ return /******/ (function(modules) { // webpackBootstrap var util = __webpack_require__(1); - var CanvasRenderer = (function () { + var CanvasRenderer = function () { function CanvasRenderer(body, canvas) { _classCallCheck(this, CanvasRenderer); @@ -37068,6 +37524,7 @@ return /******/ (function(modules) { // webpackBootstrap * Redraw the network with the current data * chart will be resized too. */ + }, { key: 'redraw', value: function redraw() { @@ -37080,6 +37537,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param hidden | used to get the first estimate of the node sizes. only the nodes are drawn after which they are quickly drawn over. * @private */ + }, { key: '_requestRedraw', value: function _requestRedraw() { @@ -37166,6 +37624,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Boolean} [alwaysShow] * @private */ + }, { key: '_resizeNodes', value: function _resizeNodes() { @@ -37179,7 +37638,7 @@ return /******/ (function(modules) { // webpackBootstrap ctx.scale(this.body.view.scale, this.body.view.scale); var nodes = this.body.nodes; - var node = undefined; + var node = void 0; // resize all nodes for (var nodeId in nodes) { @@ -37201,6 +37660,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Boolean} [alwaysShow] * @private */ + }, { key: '_drawNodes', value: function _drawNodes(ctx) { @@ -37208,7 +37668,7 @@ return /******/ (function(modules) { // webpackBootstrap var nodes = this.body.nodes; var nodeIndices = this.body.nodeIndices; - var node = undefined; + var node = void 0; var selected = []; var margin = 20; var topLeft = this.canvas.DOMtoCanvas({ x: -margin, y: -margin }); @@ -37236,8 +37696,8 @@ return /******/ (function(modules) { // webpackBootstrap } // draw the selected nodes on top - for (var i = 0; i < selected.length; i++) { - node = nodes[selected[i]]; + for (var _i = 0; _i < selected.length; _i++) { + node = nodes[selected[_i]]; node.draw(ctx); } } @@ -37248,12 +37708,13 @@ return /******/ (function(modules) { // webpackBootstrap * @param {CanvasRenderingContext2D} ctx * @private */ + }, { key: '_drawEdges', value: function _drawEdges(ctx) { var edges = this.body.edges; var edgeIndices = this.body.edgeIndices; - var edge = undefined; + var edge = void 0; for (var i = 0; i < edgeIndices.length; i++) { edge = edges[edgeIndices[i]]; @@ -37268,6 +37729,7 @@ return /******/ (function(modules) { // webpackBootstrap * some implementations (safari and IE9) did not support requestAnimationFrame * @private */ + }, { key: '_determineBrowserMethod', value: function _determineBrowserMethod() { @@ -37290,27 +37752,26 @@ return /******/ (function(modules) { // webpackBootstrap }]); return CanvasRenderer; - })(); + }(); - exports['default'] = CanvasRenderer; - module.exports = exports['default']; + exports.default = CanvasRenderer; /***/ }, -/* 102 */ +/* 103 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var Hammer = __webpack_require__(20); - var hammerUtil = __webpack_require__(24); + var Hammer = __webpack_require__(22); + var hammerUtil = __webpack_require__(25); var util = __webpack_require__(1); @@ -37322,7 +37783,7 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ - var Canvas = (function () { + var Canvas = function () { function Canvas(body) { _classCallCheck(this, Canvas); @@ -37331,6 +37792,7 @@ return /******/ (function(modules) { // webpackBootstrap this.resizeTimer = undefined; this.resizeFunction = this._onResize.bind(this); this.cameraState = {}; + this.initialized = false; this.options = {}; this.defaultOptions = { @@ -37408,21 +37870,28 @@ return /******/ (function(modules) { // webpackBootstrap * Get and store the cameraState * @private */ + }, { key: '_getCameraState', value: function _getCameraState() { var pixelRatio = arguments.length <= 0 || arguments[0] === undefined ? this.pixelRatio : arguments[0]; - this.cameraState.previousWidth = this.frame.canvas.width / pixelRatio; - this.cameraState.previousHeight = this.frame.canvas.height / pixelRatio; - this.cameraState.scale = this.body.view.scale; - this.cameraState.position = this.DOMtoCanvas({ x: 0.5 * this.frame.canvas.width / pixelRatio, y: 0.5 * this.frame.canvas.height / pixelRatio }); + if (this.initialized === true) { + this.cameraState.previousWidth = this.frame.canvas.width / pixelRatio; + this.cameraState.previousHeight = this.frame.canvas.height / pixelRatio; + this.cameraState.scale = this.body.view.scale; + this.cameraState.position = this.DOMtoCanvas({ + x: 0.5 * this.frame.canvas.width / pixelRatio, + y: 0.5 * this.frame.canvas.height / pixelRatio + }); + } } /** * Set the cameraState * @private */ + }, { key: '_setCameraState', value: function _setCameraState() { @@ -37473,6 +37942,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Create the HTML */ + }, { key: '_create', value: function _create() { @@ -37520,6 +37990,7 @@ return /******/ (function(modules) { // webpackBootstrap * This function binds hammer, it can be repeated over and over due to the uniqueness check. * @private */ + }, { key: '_bindHammer', value: function _bindHammer() { @@ -37535,7 +38006,7 @@ return /******/ (function(modules) { // webpackBootstrap this.hammer = new Hammer(this.frame.canvas); this.hammer.get('pinch').set({ enable: true }); // enable to get better response, todo: test on mobile. - this.hammer.get('pan').set({ threshold: 5, direction: 30 }); // 30 is ALL_DIRECTIONS in hammer. + this.hammer.get('pan').set({ threshold: 5, direction: Hammer.DIRECTION_ALL }); hammerUtil.onTouch(this.hammer, function (event) { _this3.body.eventListeners.onTouch(event); @@ -37590,6 +38061,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {string} height Height in pixels or percentage (for example '400px' * or '30%') */ + }, { key: 'setSize', value: function setSize() { @@ -37655,11 +38127,14 @@ return /******/ (function(modules) { // webpackBootstrap this._setCameraState(); } + // set initialized so the get and set camera will work from now on. + this.initialized = true; return emitEvent; } }, { key: '_XconvertDOMtoCanvas', + /** * Convert the X coordinate in DOM-space (coordinate point in browser relative to the container div) to * the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon) @@ -37678,6 +38153,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} * @private */ + }, { key: '_XconvertCanvasToDOM', value: function _XconvertCanvasToDOM(x) { @@ -37691,6 +38167,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} * @private */ + }, { key: '_YconvertDOMtoCanvas', value: function _YconvertDOMtoCanvas(y) { @@ -37704,6 +38181,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} * @private */ + }, { key: '_YconvertCanvasToDOM', value: function _YconvertCanvasToDOM(y) { @@ -37716,6 +38194,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {{x: number, y: number}} * @constructor */ + }, { key: 'canvasToDOM', value: function canvasToDOM(pos) { @@ -37728,6 +38207,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {{x: number, y: number}} * @constructor */ + }, { key: 'DOMtoCanvas', value: function DOMtoCanvas(pos) { @@ -37736,34 +38216,33 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Canvas; - })(); + }(); - exports['default'] = Canvas; - module.exports = exports['default']; + exports.default = Canvas; /***/ }, -/* 103 */ +/* 104 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _NetworkUtil = __webpack_require__(100); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var _NetworkUtil2 = _interopRequireDefault(_NetworkUtil); - var _NetworkUtil = __webpack_require__(99); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var _NetworkUtil2 = _interopRequireDefault(_NetworkUtil); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var util = __webpack_require__(1); - var View = (function () { + var View = function () { function View(body, canvas) { var _this = this; @@ -37805,14 +38284,15 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Object} Options * @param {Boolean} [initialZoom] | zoom based on fitted formula or range, true = fitted, default = false; */ + }, { key: 'fit', value: function fit() { var options = arguments.length <= 0 || arguments[0] === undefined ? { nodes: [] } : arguments[0]; var initialZoom = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; - var range = undefined; - var zoomLevel = undefined; + var range = void 0; + var zoomLevel = void 0; if (options.nodes === undefined || options.nodes.length === 0) { options.nodes = this.body.nodeIndices; } @@ -37833,7 +38313,7 @@ return /******/ (function(modules) { // webpackBootstrap return; } - range = _NetworkUtil2['default'].getRange(this.body.nodes, options.nodes); + range = _NetworkUtil2.default.getRange(this.body.nodes, options.nodes); var numberOfNodes = this.body.nodeIndices.length; zoomLevel = 12.662 / (numberOfNodes + 7.4147) + 0.0964822; // this is obtained from fitting a dataset from 5 points with scale levels that looked good. @@ -37843,7 +38323,7 @@ return /******/ (function(modules) { // webpackBootstrap zoomLevel *= factor; } else { this.body.emitter.emit("_resizeNodes"); - range = _NetworkUtil2['default'].getRange(this.body.nodes, options.nodes); + range = _NetworkUtil2.default.getRange(this.body.nodes, options.nodes); var xDistance = Math.abs(range.maxX - range.minX) * 1.1; var yDistance = Math.abs(range.maxY - range.minY) * 1.1; @@ -37860,7 +38340,7 @@ return /******/ (function(modules) { // webpackBootstrap zoomLevel = 1.0; } - var center = _NetworkUtil2['default'].findCenter(range); + var center = _NetworkUtil2.default.findCenter(range); var animationOptions = { position: center, scale: zoomLevel, animation: options.animation }; this.moveTo(animationOptions); } @@ -37873,6 +38353,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Number} nodeId * @param {Number} [options] */ + }, { key: 'focus', value: function focus(nodeId) { @@ -37896,6 +38377,7 @@ return /******/ (function(modules) { // webpackBootstrap * | options.position = {x:Number, y:Number} // position to move to * | options.animation = {duration:Number, easingFunction:String} || Boolean // position to move to */ + }, { key: 'moveTo', value: function moveTo(options) { @@ -37948,6 +38430,7 @@ return /******/ (function(modules) { // webpackBootstrap * // easeInQuart, easeOutQuart, easeInOutQuart, * // easeInQuint, easeOutQuint, easeInOutQuint */ + }, { key: 'animateView', value: function animateView(options) { @@ -38009,6 +38492,7 @@ return /******/ (function(modules) { // webpackBootstrap * used to animate smoothly by hijacking the redraw function. * @private */ + }, { key: '_lockedRedraw', value: function _lockedRedraw() { @@ -38041,6 +38525,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param easingTime * @private */ + }, { key: '_transitionRedraw', value: function _transitionRedraw() { @@ -38081,45 +38566,44 @@ return /******/ (function(modules) { // webpackBootstrap }]); return View; - })(); + }(); - exports['default'] = View; - module.exports = exports['default']; + exports.default = View; /***/ }, -/* 104 */ +/* 105 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _NavigationHandler = __webpack_require__(106); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var _NavigationHandler2 = _interopRequireDefault(_NavigationHandler); - var _componentsNavigationHandler = __webpack_require__(105); + var _Popup = __webpack_require__(107); - var _componentsNavigationHandler2 = _interopRequireDefault(_componentsNavigationHandler); + var _Popup2 = _interopRequireDefault(_Popup); - var _componentsPopup = __webpack_require__(106); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var _componentsPopup2 = _interopRequireDefault(_componentsPopup); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var util = __webpack_require__(1); - var InteractionHandler = (function () { + var InteractionHandler = function () { function InteractionHandler(body, canvas, selectionHandler) { _classCallCheck(this, InteractionHandler); this.body = body; this.canvas = canvas; this.selectionHandler = selectionHandler; - this.navigationHandler = new _componentsNavigationHandler2['default'](body, canvas); + this.navigationHandler = new _NavigationHandler2.default(body, canvas); // bind the events from hammer to functions in this object this.body.eventListeners.onTap = this.onTap.bind(this); @@ -38201,6 +38685,7 @@ return /******/ (function(modules) { // webpackBootstrap * @return {{x: Number, y: Number}} pointer * @private */ + }, { key: 'getPointer', value: function getPointer(touch) { @@ -38215,6 +38700,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param event * @private */ + }, { key: 'onTouch', value: function onTouch(event) { @@ -38231,6 +38717,7 @@ return /******/ (function(modules) { // webpackBootstrap * handle tap/click event: select/unselect a node * @private */ + }, { key: 'onTap', value: function onTap(event) { @@ -38245,6 +38732,7 @@ return /******/ (function(modules) { // webpackBootstrap * handle doubletap event * @private */ + }, { key: 'onDoubleTap', value: function onDoubleTap(event) { @@ -38256,6 +38744,7 @@ return /******/ (function(modules) { // webpackBootstrap * handle long tap event: multi select nodes * @private */ + }, { key: 'onHold', value: function onHold(event) { @@ -38273,6 +38762,7 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { key: 'onRelease', value: function onRelease(event) { @@ -38295,6 +38785,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param pointer * @param add */ + }, { key: 'checkSelectionChanges', value: function checkSelectionChanges(pointer, event) { @@ -38303,7 +38794,7 @@ return /******/ (function(modules) { // webpackBootstrap var previouslySelectedEdgeCount = this.selectionHandler._getSelectedEdgeCount(); var previouslySelectedNodeCount = this.selectionHandler._getSelectedNodeCount(); var previousSelection = this.selectionHandler.getSelection(); - var selected = undefined; + var selected = void 0; if (add === true) { selected = this.selectionHandler.selectAdditionalOnPoint(pointer); } else { @@ -38365,6 +38856,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {{nodesChanged: boolean, edgesChanged: boolean}} * @private */ + }, { key: '_determineIfDifferent', value: function _determineIfDifferent(previousSelection, currentSelection) { @@ -38376,18 +38868,18 @@ return /******/ (function(modules) { // webpackBootstrap nodesChanged = true; } } - for (var i = 0; i < currentSelection.nodes.length; i++) { - if (previousSelection.nodes.indexOf(previousSelection.nodes[i]) === -1) { + for (var _i = 0; _i < currentSelection.nodes.length; _i++) { + if (previousSelection.nodes.indexOf(previousSelection.nodes[_i]) === -1) { nodesChanged = true; } } - for (var i = 0; i < previousSelection.edges.length; i++) { - if (currentSelection.edges.indexOf(previousSelection.edges[i]) === -1) { + for (var _i2 = 0; _i2 < previousSelection.edges.length; _i2++) { + if (currentSelection.edges.indexOf(previousSelection.edges[_i2]) === -1) { edgesChanged = true; } } - for (var i = 0; i < currentSelection.edges.length; i++) { - if (previousSelection.edges.indexOf(previousSelection.edges[i]) === -1) { + for (var _i3 = 0; _i3 < currentSelection.edges.length; _i3++) { + if (previousSelection.edges.indexOf(previousSelection.edges[_i3]) === -1) { edgesChanged = true; } } @@ -38401,6 +38893,7 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { key: 'onDragStart', value: function onDragStart(event) { @@ -38460,6 +38953,7 @@ return /******/ (function(modules) { // webpackBootstrap * handle drag event * @private */ + }, { key: 'onDrag', value: function onDrag(event) { @@ -38522,6 +39016,7 @@ return /******/ (function(modules) { // webpackBootstrap * handle drag start event * @private */ + }, { key: 'onDragEnd', value: function onDragEnd(event) { @@ -38546,6 +39041,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param event * @private */ + }, { key: 'onPinch', value: function onPinch(event) { @@ -38568,6 +39064,7 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Number} appliedScale scale is limited within the boundaries * @private */ + }, { key: 'zoom', value: function zoom(scale, pointer) { @@ -38619,6 +39116,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {MouseEvent} event * @private */ + }, { key: 'onMouseWheel', value: function onMouseWheel(event) { @@ -38665,6 +39163,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Event} event * @private */ + }, { key: 'onMouseMove', value: function onMouseMove(event) { @@ -38726,6 +39225,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {{x:Number, y:Number}} pointer * @private */ + }, { key: '_checkShowPopup', value: function _checkShowPopup(pointer) { @@ -38747,7 +39247,7 @@ return /******/ (function(modules) { // webpackBootstrap // search the nodes for overlap, select the top one in case of multiple nodes var nodeIndices = this.body.nodeIndices; var nodes = this.body.nodes; - var node = undefined; + var node = void 0; var overlappingNodes = []; for (var i = 0; i < nodeIndices.length; i++) { node = nodes[nodeIndices[i]]; @@ -38770,13 +39270,13 @@ return /******/ (function(modules) { // webpackBootstrap // search the edges for overlap var edgeIndices = this.body.edgeIndices; var edges = this.body.edges; - var edge = undefined; + var edge = void 0; var overlappingEdges = []; - for (var i = 0; i < edgeIndices.length; i++) { - edge = edges[edgeIndices[i]]; + for (var _i4 = 0; _i4 < edgeIndices.length; _i4++) { + edge = edges[edgeIndices[_i4]]; if (edge.isOverlappingWith(pointerObj) === true) { if (edge.connected === true && edge.getTitle() !== undefined) { - overlappingEdges.push(edgeIndices[i]); + overlappingEdges.push(edgeIndices[_i4]); } } } @@ -38791,7 +39291,7 @@ return /******/ (function(modules) { // webpackBootstrap // show popup message window if (this.popupObj.id !== previousPopupObjId) { if (this.popup === undefined) { - this.popup = new _componentsPopup2['default'](this.canvas.frame); + this.popup = new _Popup2.default(this.canvas.frame); } this.popup.popupTargetType = popupType; @@ -38819,6 +39319,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {{x:Number, y:Number}} pointer * @private */ + }, { key: '_checkHidePopup', value: function _checkHidePopup(pointer) { @@ -38853,31 +39354,30 @@ return /******/ (function(modules) { // webpackBootstrap }]); return InteractionHandler; - })(); + }(); - exports['default'] = InteractionHandler; - module.exports = exports['default']; + exports.default = InteractionHandler; /***/ }, -/* 105 */ +/* 106 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var util = __webpack_require__(1); - var Hammer = __webpack_require__(20); - var hammerUtil = __webpack_require__(24); - var keycharm = __webpack_require__(40); + var Hammer = __webpack_require__(22); + var hammerUtil = __webpack_require__(25); + var keycharm = __webpack_require__(43); - var NavigationHandler = (function () { + var NavigationHandler = function () { function NavigationHandler(body, canvas) { var _this = this; @@ -38955,6 +39455,7 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { key: 'loadNavigationElements', value: function loadNavigationElements() { @@ -39019,6 +39520,7 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { key: '_fit', value: function _fit() { @@ -39034,6 +39536,7 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { key: '_stopMovement', value: function _stopMovement() { @@ -39081,6 +39584,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * bind all keys using keycharm. */ + }, { key: 'configureKeyboardBindings', value: function configureKeyboardBindings() { @@ -39179,15 +39683,24 @@ return /******/ (function(modules) { // webpackBootstrap }]); return NavigationHandler; - })(); + }(); - exports['default'] = NavigationHandler; - module.exports = exports['default']; + exports.default = NavigationHandler; /***/ }, -/* 106 */ +/* 107 */ /***/ function(module, exports) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + /** * Popup is a class to create a popup window with some text * @param {Element} container The container object. @@ -39197,17 +39710,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Object} [style] An object containing borderColor, * backgroundColor, etc. */ - 'use strict'; - - Object.defineProperty(exports, '__esModule', { - value: true - }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - - var Popup = (function () { + var Popup = function () { function Popup(container) { _classCallCheck(this, Popup); @@ -39229,6 +39733,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {number} y Vertical position of the popup window */ + _createClass(Popup, [{ key: 'setPosition', value: function setPosition(x, y) { @@ -39240,6 +39745,7 @@ return /******/ (function(modules) { // webpackBootstrap * Set the content for the popup window. This can be HTML code or text. * @param {string | Element} content */ + }, { key: 'setText', value: function setText(content) { @@ -39255,6 +39761,7 @@ return /******/ (function(modules) { // webpackBootstrap * Show the popup window * @param {boolean} [doShow] Show or hide the window */ + }, { key: 'show', value: function show(doShow) { @@ -39296,6 +39803,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Hide the popup window */ + }, { key: 'hide', value: function hide() { @@ -39305,30 +39813,37 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Popup; - })(); + }(); - exports['default'] = Popup; - module.exports = exports['default']; + exports.default = Popup; /***/ }, -/* 107 */ +/* 108 */ /***/ function(module, exports, __webpack_require__) { - "use strict"; + 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + var _Node = __webpack_require__(62); + + var _Node2 = _interopRequireDefault(_Node); + + var _Edge = __webpack_require__(82); + + var _Edge2 = _interopRequireDefault(_Edge); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var Node = __webpack_require__(61); - var Edge = __webpack_require__(81); var util = __webpack_require__(1); - var SelectionHandler = (function () { + var SelectionHandler = function () { function SelectionHandler(body, canvas) { var _this = this; @@ -39354,7 +39869,7 @@ return /******/ (function(modules) { // webpackBootstrap } _createClass(SelectionHandler, [{ - key: "setOptions", + key: 'setOptions', value: function setOptions(options) { if (options !== undefined) { var fields = ['multiselect', 'hoverConnectedEdges', 'selectable', 'selectConnectedEdges']; @@ -39368,8 +39883,9 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Object} pointer * @private */ + }, { - key: "selectOnPoint", + key: 'selectOnPoint', value: function selectOnPoint(pointer) { var selected = false; if (this.options.selectable === true) { @@ -39386,7 +39902,7 @@ return /******/ (function(modules) { // webpackBootstrap return selected; } }, { - key: "selectAdditionalOnPoint", + key: 'selectAdditionalOnPoint', value: function selectAdditionalOnPoint(pointer) { var selectionChanged = false; if (this.options.selectable === true) { @@ -39406,11 +39922,11 @@ return /******/ (function(modules) { // webpackBootstrap return selectionChanged; } }, { - key: "_generateClickEvent", + key: '_generateClickEvent', value: function _generateClickEvent(eventType, event, pointer, oldSelection) { var emptySelection = arguments.length <= 4 || arguments[4] === undefined ? false : arguments[4]; - var properties = undefined; + var properties = void 0; if (emptySelection === true) { properties = { nodes: [], edges: [] }; } else { @@ -39428,12 +39944,12 @@ return /******/ (function(modules) { // webpackBootstrap this.body.emitter.emit(eventType, properties); } }, { - key: "selectObject", + key: 'selectObject', value: function selectObject(obj) { var highlightEdges = arguments.length <= 1 || arguments[1] === undefined ? this.options.selectConnectedEdges : arguments[1]; if (obj !== undefined) { - if (obj instanceof Node) { + if (obj instanceof _Node2.default) { if (highlightEdges === true) { this._selectConnectedEdges(obj); } @@ -39445,7 +39961,7 @@ return /******/ (function(modules) { // webpackBootstrap return false; } }, { - key: "deselectObject", + key: 'deselectObject', value: function deselectObject(obj) { if (obj.isSelected() === true) { obj.selected = false; @@ -39459,8 +39975,9 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Number[]} An array with id's of the overlapping nodes * @private */ + }, { - key: "_getAllNodesOverlappingWith", + key: '_getAllNodesOverlappingWith', value: function _getAllNodesOverlappingWith(object) { var overlappingNodes = []; var nodes = this.body.nodes; @@ -39480,8 +39997,9 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {{left: number, top: number, right: number, bottom: number}} * @private */ + }, { - key: "_pointerToPositionObject", + key: '_pointerToPositionObject', value: function _pointerToPositionObject(pointer) { var canvasPos = this.canvas.DOMtoCanvas(pointer); return { @@ -39498,8 +40016,9 @@ return /******/ (function(modules) { // webpackBootstrap * @param {{x: Number, y: Number}} pointer * @return {Node | undefined} node */ + }, { - key: "getNodeAt", + key: 'getNodeAt', value: function getNodeAt(pointer) { var returnNode = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; @@ -39525,8 +40044,9 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Number[]} An array with id's of the overlapping nodes * @private */ + }, { - key: "_getEdgesOverlappingWith", + key: '_getEdgesOverlappingWith', value: function _getEdgesOverlappingWith(object, overlappingEdges) { var edges = this.body.edges; for (var i = 0; i < this.body.edgeIndices.length; i++) { @@ -39543,8 +40063,9 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Number[]} An array with id's of the overlapping nodes * @private */ + }, { - key: "_getAllEdgesOverlappingWith", + key: '_getAllEdgesOverlappingWith', value: function _getAllEdgesOverlappingWith(object) { var overlappingEdges = []; this._getEdgesOverlappingWith(object, overlappingEdges); @@ -39558,8 +40079,9 @@ return /******/ (function(modules) { // webpackBootstrap * @param pointer * @returns {undefined} */ + }, { - key: "getEdgeAt", + key: 'getEdgeAt', value: function getEdgeAt(pointer) { var returnEdge = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; @@ -39583,10 +40105,11 @@ return /******/ (function(modules) { // webpackBootstrap * @param obj * @private */ + }, { - key: "_addToSelection", + key: '_addToSelection', value: function _addToSelection(obj) { - if (obj instanceof Node) { + if (obj instanceof _Node2.default) { this.selectionObj.nodes[obj.id] = obj; } else { this.selectionObj.edges[obj.id] = obj; @@ -39599,10 +40122,11 @@ return /******/ (function(modules) { // webpackBootstrap * @param obj * @private */ + }, { - key: "_addToHover", + key: '_addToHover', value: function _addToHover(obj) { - if (obj instanceof Node) { + if (obj instanceof _Node2.default) { this.hoverObj.nodes[obj.id] = obj; } else { this.hoverObj.edges[obj.id] = obj; @@ -39615,10 +40139,11 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Object} obj * @private */ + }, { - key: "_removeFromSelection", + key: '_removeFromSelection', value: function _removeFromSelection(obj) { - if (obj instanceof Node) { + if (obj instanceof _Node2.default) { delete this.selectionObj.nodes[obj.id]; this._unselectConnectedEdges(obj); } else { @@ -39629,8 +40154,9 @@ return /******/ (function(modules) { // webpackBootstrap /** * Unselect all. The selectionObj is useful for this. */ + }, { - key: "unselectAll", + key: 'unselectAll', value: function unselectAll() { for (var nodeId in this.selectionObj.nodes) { if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { @@ -39652,8 +40178,9 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} * @private */ + }, { - key: "_getSelectedNodeCount", + key: '_getSelectedNodeCount', value: function _getSelectedNodeCount() { var count = 0; for (var nodeId in this.selectionObj.nodes) { @@ -39670,8 +40197,9 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} * @private */ + }, { - key: "_getSelectedNode", + key: '_getSelectedNode', value: function _getSelectedNode() { for (var nodeId in this.selectionObj.nodes) { if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { @@ -39687,8 +40215,9 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} * @private */ + }, { - key: "_getSelectedEdge", + key: '_getSelectedEdge', value: function _getSelectedEdge() { for (var edgeId in this.selectionObj.edges) { if (this.selectionObj.edges.hasOwnProperty(edgeId)) { @@ -39704,8 +40233,9 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} * @private */ + }, { - key: "_getSelectedEdgeCount", + key: '_getSelectedEdgeCount', value: function _getSelectedEdgeCount() { var count = 0; for (var edgeId in this.selectionObj.edges) { @@ -39722,8 +40252,9 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} * @private */ + }, { - key: "_getSelectedObjectCount", + key: '_getSelectedObjectCount', value: function _getSelectedObjectCount() { var count = 0; for (var nodeId in this.selectionObj.nodes) { @@ -39745,8 +40276,9 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {boolean} * @private */ + }, { - key: "_selectionIsEmpty", + key: '_selectionIsEmpty', value: function _selectionIsEmpty() { for (var nodeId in this.selectionObj.nodes) { if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { @@ -39767,8 +40299,9 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {boolean} * @private */ + }, { - key: "_clusterInSelection", + key: '_clusterInSelection', value: function _clusterInSelection() { for (var nodeId in this.selectionObj.nodes) { if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { @@ -39786,8 +40319,9 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Node} node * @private */ + }, { - key: "_selectConnectedEdges", + key: '_selectConnectedEdges', value: function _selectConnectedEdges(node) { for (var i = 0; i < node.edges.length; i++) { var edge = node.edges[i]; @@ -39802,8 +40336,9 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Node} node * @private */ + }, { - key: "_hoverConnectedEdges", + key: '_hoverConnectedEdges', value: function _hoverConnectedEdges(node) { for (var i = 0; i < node.edges.length; i++) { var edge = node.edges[i]; @@ -39818,8 +40353,9 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Node} node * @private */ + }, { - key: "_unselectConnectedEdges", + key: '_unselectConnectedEdges', value: function _unselectConnectedEdges(node) { for (var i = 0; i < node.edges.length; i++) { var edge = node.edges[i]; @@ -39835,12 +40371,13 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Node || Edge} object * @private */ + }, { - key: "blurObject", + key: 'blurObject', value: function blurObject(object) { if (object.hover === true) { object.hover = false; - if (object instanceof Node) { + if (object instanceof _Node2.default) { this.body.emitter.emit("blurNode", { node: object.id }); } else { this.body.emitter.emit("blurEdge", { edge: object.id }); @@ -39855,14 +40392,15 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Node || Edge} object * @private */ + }, { - key: "hoverObject", + key: 'hoverObject', value: function hoverObject(object) { var hoverChanged = false; // remove all node hover highlights for (var nodeId in this.hoverObj.nodes) { if (this.hoverObj.nodes.hasOwnProperty(nodeId)) { - if (object === undefined || object instanceof Node && object.id != nodeId || object instanceof Edge) { + if (object === undefined || object instanceof _Node2.default && object.id != nodeId || object instanceof _Edge2.default) { this.blurObject(this.hoverObj.nodes[nodeId]); delete this.hoverObj.nodes[nodeId]; hoverChanged = true; @@ -39893,13 +40431,13 @@ return /******/ (function(modules) { // webpackBootstrap object.hover = true; this._addToHover(object); hoverChanged = true; - if (object instanceof Node) { + if (object instanceof _Node2.default) { this.body.emitter.emit("hoverNode", { node: object.id }); } else { this.body.emitter.emit("hoverEdge", { edge: object.id }); } } - if (object instanceof Node && this.options.hoverConnectedEdges === true) { + if (object instanceof _Node2.default && this.options.hoverConnectedEdges === true) { this._hoverConnectedEdges(object); } } @@ -39914,8 +40452,9 @@ return /******/ (function(modules) { // webpackBootstrap * retrieve the currently selected objects * @return {{nodes: Array., edges: Array.}} selection */ + }, { - key: "getSelection", + key: 'getSelection', value: function getSelection() { var nodeIds = this.getSelectedNodes(); var edgeIds = this.getSelectedEdges(); @@ -39928,8 +40467,9 @@ return /******/ (function(modules) { // webpackBootstrap * @return {String[]} selection An array with the ids of the * selected nodes. */ + }, { - key: "getSelectedNodes", + key: 'getSelectedNodes', value: function getSelectedNodes() { var idArray = []; if (this.options.selectable === true) { @@ -39948,8 +40488,9 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Array} selection An array with the ids of the * selected nodes. */ + }, { - key: "getSelectedEdges", + key: 'getSelectedEdges', value: function getSelectedEdges() { var idArray = []; if (this.options.selectable === true) { @@ -39967,13 +40508,14 @@ return /******/ (function(modules) { // webpackBootstrap * @param {{nodes: Array., edges: Array.}} Selection * @param {Object} options Options */ + }, { - key: "setSelection", + key: 'setSelection', value: function setSelection(selection) { var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - var i = undefined, - id = undefined; + var i = void 0, + id = void 0; if (!selection || !selection.nodes && !selection.edges) throw 'Selection must be an object with nodes and/or edges properties'; // first unselect any selected node, if option is true or undefined @@ -40013,8 +40555,9 @@ return /******/ (function(modules) { // webpackBootstrap * selected nodes. * @param {boolean} [highlightEdges] */ + }, { - key: "selectNodes", + key: 'selectNodes', value: function selectNodes(selection) { var highlightEdges = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; @@ -40028,8 +40571,9 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Number[] | String[]} selection An array with the ids of the * selected nodes. */ + }, { - key: "selectEdges", + key: 'selectEdges', value: function selectEdges(selection) { if (!selection || selection.length === undefined) throw 'Selection must be an array with ids'; @@ -40040,8 +40584,9 @@ return /******/ (function(modules) { // webpackBootstrap * Validate the selection: remove ids of nodes which no longer exist * @private */ + }, { - key: "updateSelection", + key: 'updateSelection', value: function updateSelection() { for (var nodeId in this.selectionObj.nodes) { if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { @@ -40061,36 +40606,37 @@ return /******/ (function(modules) { // webpackBootstrap }]); return SelectionHandler; - })(); + }(); - exports["default"] = SelectionHandler; - module.exports = exports["default"]; + exports.default = SelectionHandler; /***/ }, -/* 108 */ +/* 109 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })(); - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _NetworkUtil = __webpack_require__(99); + var _NetworkUtil = __webpack_require__(100); var _NetworkUtil2 = _interopRequireDefault(_NetworkUtil); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + var util = __webpack_require__(1); - var LayoutEngine = (function () { + var LayoutEngine = function () { function LayoutEngine(body) { _classCallCheck(this, LayoutEngine); @@ -40189,7 +40735,7 @@ return /******/ (function(modules) { // webpackBootstrap }; this.optionsBackup.physics.enabled = this.optionsBackup.physics.enabled === undefined ? true : this.optionsBackup.physics.enabled; this.optionsBackup.physics.solver = this.optionsBackup.physics.solver || 'barnesHut'; - } else if (typeof allOptions.physics === 'object') { + } else if (_typeof(allOptions.physics) === 'object') { this.optionsBackup.physics.enabled = allOptions.physics.enabled === undefined ? true : allOptions.physics.enabled; this.optionsBackup.physics.solver = allOptions.physics.solver || 'barnesHut'; allOptions.physics.solver = 'hierarchicalRepulsion'; @@ -40271,6 +40817,7 @@ return /******/ (function(modules) { // webpackBootstrap * Use Kamada Kawai to position nodes. This is quite a heavy algorithm so if there are a lot of nodes we * cluster them first to reduce the amount. */ + }, { key: 'layoutNetwork', value: function layoutNetwork() { @@ -40325,9 +40872,9 @@ return /******/ (function(modules) { // webpackBootstrap // perturb the nodes a little bit to force the physics to kick in var offset = 70; - for (var i = 0; i < this.body.nodeIndices.length; i++) { - this.body.nodes[this.body.nodeIndices[i]].x += (0.5 - this.seededRandom()) * offset; - this.body.nodes[this.body.nodeIndices[i]].y += (0.5 - this.seededRandom()) * offset; + for (var _i = 0; _i < this.body.nodeIndices.length; _i++) { + this.body.nodes[this.body.nodeIndices[_i]].x += (0.5 - this.seededRandom()) * offset; + this.body.nodes[this.body.nodeIndices[_i]].y += (0.5 - this.seededRandom()) * offset; } // uncluster all clusters @@ -40343,11 +40890,12 @@ return /******/ (function(modules) { // webpackBootstrap * Move all the nodes towards to the center so gravitational pull wil not move the nodes away from view * @private */ + }, { key: '_shiftToCenter', value: function _shiftToCenter() { - var range = _NetworkUtil2['default'].getRangeCore(this.body.nodes, this.body.nodeIndices); - var center = _NetworkUtil2['default'].findCenter(range); + var range = _NetworkUtil2.default.getRangeCore(this.body.nodes, this.body.nodeIndices); + var center = _NetworkUtil2.default.findCenter(range); for (var i = 0; i < this.body.nodeIndices.length; i++) { this.body.nodes[this.body.nodeIndices[i]].x -= center.x; this.body.nodes[this.body.nodeIndices[i]].y -= center.y; @@ -40382,13 +40930,14 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { key: 'setupHierarchicalLayout', value: function setupHierarchicalLayout() { if (this.options.hierarchical.enabled === true && this.body.nodeIndices.length > 0) { // get the size of the largest hubs and check if the user has defined a level for a node. - var node = undefined, - nodeId = undefined; + var node = void 0, + nodeId = void 0; var definedLevel = false; var definedPositions = true; var undefinedLevel = false; @@ -40463,6 +41012,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * @private */ + }, { key: '_condenseHierarchy', value: function _condenseHierarchy() { @@ -40551,10 +41101,10 @@ return /******/ (function(modules) { // webpackBootstrap var _getSpaceAroundNode2 = _this2._getSpaceAroundNode(node, branchMap); - var _getSpaceAroundNode22 = _slicedToArray(_getSpaceAroundNode2, 2); + var _getSpaceAroundNode3 = _slicedToArray(_getSpaceAroundNode2, 2); - var minSpaceNode = _getSpaceAroundNode22[0]; - var maxSpaceNode = _getSpaceAroundNode22[1]; + var minSpaceNode = _getSpaceAroundNode3[0]; + var maxSpaceNode = _getSpaceAroundNode3[1]; minSpace = Math.min(minSpaceNode, minSpace); maxSpace = Math.min(maxSpaceNode, maxSpace); @@ -40656,14 +41206,15 @@ return /******/ (function(modules) { // webpackBootstrap var _getBranchBoundary3 = getBranchBoundary(branchNodes2, maxLevel); - var _getBranchBoundary32 = _slicedToArray(_getBranchBoundary3, 4); + var _getBranchBoundary4 = _slicedToArray(_getBranchBoundary3, 4); - var min2 = _getBranchBoundary32[0]; - var max2 = _getBranchBoundary32[1]; - var minSpace2 = _getBranchBoundary32[2]; - var maxSpace2 = _getBranchBoundary32[3]; + var min2 = _getBranchBoundary4[0]; + var max2 = _getBranchBoundary4[1]; + var minSpace2 = _getBranchBoundary4[2]; + var maxSpace2 = _getBranchBoundary4[3]; //console.log(node1.id, getBranchBoundary(branchNodes1, maxLevel), node2.id, getBranchBoundary(branchNodes2, maxLevel), maxLevel); + var diffBranch = Math.abs(max1 - min2); if (diffBranch > _this2.options.hierarchical.nodeSpacing) { var offset = max1 - min2 + _this2.options.hierarchical.nodeSpacing; @@ -40708,9 +41259,9 @@ return /******/ (function(modules) { // webpackBootstrap // differentiated sum of lengths based on only moving one node over one axis var getFx = function getFx(point, edges) { var sum = 0; - for (var i = 0; i < edges.length; i++) { - if (referenceNodes[edges[i].id] !== undefined) { - var a = _this2._getPositionForHierarchy(referenceNodes[edges[i].id]) - point; + for (var _i2 = 0; _i2 < edges.length; _i2++) { + if (referenceNodes[edges[_i2].id] !== undefined) { + var a = _this2._getPositionForHierarchy(referenceNodes[edges[_i2].id]) - point; sum += a / Math.sqrt(a * a + C2); } } @@ -40720,9 +41271,9 @@ return /******/ (function(modules) { // webpackBootstrap // doubly differentiated sum of lengths based on only moving one node over one axis var getDFx = function getDFx(point, edges) { var sum = 0; - for (var i = 0; i < edges.length; i++) { - if (referenceNodes[edges[i].id] !== undefined) { - var a = _this2._getPositionForHierarchy(referenceNodes[edges[i].id]) - point; + for (var _i3 = 0; _i3 < edges.length; _i3++) { + if (referenceNodes[edges[_i3].id] !== undefined) { + var a = _this2._getPositionForHierarchy(referenceNodes[edges[_i3].id]) - point; sum -= C2 * Math.pow(a * a + C2, -1.5); } } @@ -40733,7 +41284,7 @@ return /******/ (function(modules) { // webpackBootstrap var guess = _this2._getPositionForHierarchy(node); // Newton's method for optimization var guessMap = {}; - for (var i = 0; i < iterations; i++) { + for (var _i4 = 0; _i4 < iterations; _i4++) { var fx = getFx(guess, edges); var dfx = getDFx(guess, edges); @@ -40745,7 +41296,7 @@ return /******/ (function(modules) { // webpackBootstrap if (guessMap[guess] !== undefined) { break; } - guessMap[guess] = i; + guessMap[guess] = _i4; } return guess; }; @@ -40762,14 +41313,15 @@ return /******/ (function(modules) { // webpackBootstrap branches[node.id] = branchNodes; } - var _getBranchBoundary4 = getBranchBoundary(branches[node.id]); + var _getBranchBoundary5 = getBranchBoundary(branches[node.id]); - var _getBranchBoundary42 = _slicedToArray(_getBranchBoundary4, 4); + var _getBranchBoundary6 = _slicedToArray(_getBranchBoundary5, 4); + + var minBranch = _getBranchBoundary6[0]; + var maxBranch = _getBranchBoundary6[1]; + var minSpaceBranch = _getBranchBoundary6[2]; + var maxSpaceBranch = _getBranchBoundary6[3]; - var minBranch = _getBranchBoundary42[0]; - var maxBranch = _getBranchBoundary42[1]; - var minSpaceBranch = _getBranchBoundary42[2]; - var maxSpaceBranch = _getBranchBoundary42[3]; var diff = guess - nodePosition; @@ -40794,12 +41346,12 @@ return /******/ (function(modules) { // webpackBootstrap // position node if there is space - var _getSpaceAroundNode3 = _this2._getSpaceAroundNode(node); + var _getSpaceAroundNode4 = _this2._getSpaceAroundNode(node); - var _getSpaceAroundNode32 = _slicedToArray(_getSpaceAroundNode3, 2); + var _getSpaceAroundNode5 = _slicedToArray(_getSpaceAroundNode4, 2); - var minSpace = _getSpaceAroundNode32[0]; - var maxSpace = _getSpaceAroundNode32[1]; + var minSpace = _getSpaceAroundNode5[0]; + var maxSpace = _getSpaceAroundNode5[1]; var diff = guess - nodePosition; // check if we are allowed to move the node: @@ -40905,6 +41457,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {*[]} * @private */ + }, { key: '_getSpaceAroundNode', value: function _getSpaceAroundNode(node, map) { @@ -40945,6 +41498,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param node * @private */ + }, { key: '_centerParent', value: function _centerParent(node) { @@ -40959,8 +41513,8 @@ return /******/ (function(modules) { // webpackBootstrap var maxPos = -1e9; var children = this.hierarchicalChildrenReference[parentId]; if (children.length > 0) { - for (var _i = 0; _i < children.length; _i++) { - var childNode = this.body.nodes[children[_i]]; + for (var _i5 = 0; _i5 < children.length; _i5++) { + var childNode = this.body.nodes[children[_i5]]; minPos = Math.min(minPos, this._getPositionForHierarchy(childNode)); maxPos = Math.max(maxPos, this._getPositionForHierarchy(childNode)); } @@ -40968,12 +41522,12 @@ return /******/ (function(modules) { // webpackBootstrap var position = this._getPositionForHierarchy(parentNode); - var _getSpaceAroundNode4 = this._getSpaceAroundNode(parentNode); + var _getSpaceAroundNode6 = this._getSpaceAroundNode(parentNode); - var _getSpaceAroundNode42 = _slicedToArray(_getSpaceAroundNode4, 2); + var _getSpaceAroundNode7 = _slicedToArray(_getSpaceAroundNode6, 2); - var minSpace = _getSpaceAroundNode42[0]; - var maxSpace = _getSpaceAroundNode42[1]; + var minSpace = _getSpaceAroundNode7[0]; + var maxSpace = _getSpaceAroundNode7[1]; var newPosition = 0.5 * (minPos + maxPos); var diff = position - newPosition; @@ -40991,6 +41545,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Object} distribution | obtained by the function this._getDistribution() * @private */ + }, { key: '_placeNodesByHierarchy', value: function _placeNodesByHierarchy(distribution) { @@ -41030,6 +41585,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param parentLevel * @private */ + }, { key: '_placeBranchNodes', value: function _placeBranchNodes(parentId, parentLevel) { @@ -41048,19 +41604,19 @@ return /******/ (function(modules) { // webpackBootstrap this._sortNodeArray(childNodes); // position the childNodes - for (var i = 0; i < childNodes.length; i++) { - var childNode = childNodes[i]; + for (var _i6 = 0; _i6 < childNodes.length; _i6++) { + var childNode = childNodes[_i6]; var childNodeLevel = this.hierarchicalLevels[childNode.id]; // check if the child node is below the parent node and if it has already been positioned. if (childNodeLevel > parentLevel && this.positionedNodes[childNode.id] === undefined) { // get the amount of space required for this node. If parent the width is based on the amount of children. - var pos = undefined; + var pos = void 0; // we get the X or Y values we need and store them in pos and previousPos. The get and set make sure we get X or Y - if (i === 0) { + if (_i6 === 0) { pos = this._getPositionForHierarchy(this.body.nodes[parentId]); } else { - pos = this._getPositionForHierarchy(childNodes[i - 1]) + this.options.hierarchical.nodeSpacing; + pos = this._getPositionForHierarchy(childNodes[_i6 - 1]) + this.options.hierarchical.nodeSpacing; } this._setPositionForHierarchy(childNode, pos, childNodeLevel); this._validataPositionAndContinue(childNode, childNodeLevel, pos); @@ -41072,8 +41628,8 @@ return /******/ (function(modules) { // webpackBootstrap // center the parent nodes. var minPos = 1e9; var maxPos = -1e9; - for (var i = 0; i < childNodes.length; i++) { - var childNodeId = childNodes[i].id; + for (var _i7 = 0; _i7 < childNodes.length; _i7++) { + var childNodeId = childNodes[_i7].id; minPos = Math.min(minPos, this._getPositionForHierarchy(this.body.nodes[childNodeId])); maxPos = Math.max(maxPos, this._getPositionForHierarchy(this.body.nodes[childNodeId])); } @@ -41088,6 +41644,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param pos * @private */ + }, { key: '_validataPositionAndContinue', value: function _validataPositionAndContinue(node, level, pos) { @@ -41114,6 +41671,7 @@ return /******/ (function(modules) { // webpackBootstrap * node properties. * @param idArray */ + }, { key: '_indexArrayToNodes', value: function _indexArrayToNodes(idArray) { @@ -41130,12 +41688,13 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {Object} * @private */ + }, { key: '_getDistribution', value: function _getDistribution() { var distribution = {}; - var nodeId = undefined, - node = undefined; + var nodeId = void 0, + node = void 0; // we fix Y because the hierarchy is vertical, we fix X so we do not give a node an x position for a second time. // the fix of X is removed after the x value has been set. @@ -41165,6 +41724,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} * @private */ + }, { key: '_getHubSize', value: function _getHubSize() { @@ -41186,6 +41746,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param hubsize * @private */ + }, { key: '_determineLevelsByHubsize', value: function _determineLevelsByHubsize() { @@ -41224,6 +41785,7 @@ return /******/ (function(modules) { // webpackBootstrap * TODO: release feature * @private */ + }, { key: '_determineLevelsCustomCallback', value: function _determineLevelsCustomCallback() { @@ -41241,7 +41803,7 @@ return /******/ (function(modules) { // webpackBootstrap _this4.hierarchicalLevels[nodeA.id] = minLevel; } - var diff = customCallback(_NetworkUtil2['default'].cloneOptions(nodeA, 'node'), _NetworkUtil2['default'].cloneOptions(nodeB, 'node'), _NetworkUtil2['default'].cloneOptions(edge, 'edge')); + var diff = customCallback(_NetworkUtil2.default.cloneOptions(nodeA, 'node'), _NetworkUtil2.default.cloneOptions(nodeB, 'node'), _NetworkUtil2.default.cloneOptions(edge, 'edge')); _this4.hierarchicalLevels[nodeB.id] = _this4.hierarchicalLevels[nodeA.id] + diff; }; @@ -41256,6 +41818,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param hubsize * @private */ + }, { key: '_determineLevelsDirected', value: function _determineLevelsDirected() { @@ -41282,6 +41845,7 @@ return /******/ (function(modules) { // webpackBootstrap * Small util method to set the minimum levels of the nodes to zero. * @private */ + }, { key: '_setMinLevelToZero', value: function _setMinLevelToZero() { @@ -41296,10 +41860,10 @@ return /******/ (function(modules) { // webpackBootstrap } // subtract the minimum from the set so we have a range starting from 0 - for (var nodeId in this.body.nodes) { - if (this.body.nodes.hasOwnProperty(nodeId)) { - if (this.hierarchicalLevels[nodeId] !== undefined) { - this.hierarchicalLevels[nodeId] -= minLevel; + for (var _nodeId2 in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(_nodeId2)) { + if (this.hierarchicalLevels[_nodeId2] !== undefined) { + this.hierarchicalLevels[_nodeId2] -= minLevel; } } } @@ -41309,6 +41873,7 @@ return /******/ (function(modules) { // webpackBootstrap * Update the bookkeeping of parent and child. * @private */ + }, { key: '_generateMap', value: function _generateMap() { @@ -41338,12 +41903,14 @@ return /******/ (function(modules) { // webpackBootstrap * @param startingNodeId * @private */ + }, { key: '_crawlNetwork', - value: function _crawlNetwork(callback, startingNodeId) { + value: function _crawlNetwork() { var _this7 = this; - if (callback === undefined) callback = function () {}; + var callback = arguments.length <= 0 || arguments[0] === undefined ? function () {} : arguments[0]; + var startingNodeId = arguments[1]; var progress = {}; var treeIndex = 0; @@ -41357,7 +41924,7 @@ return /******/ (function(modules) { // webpackBootstrap } progress[node.id] = true; - var childNode = undefined; + var childNode = void 0; for (var i = 0; i < node.edges.length; i++) { if (node.edges[i].connected === true) { if (node.edges[i].toId === node.id) { @@ -41385,12 +41952,12 @@ return /******/ (function(modules) { // webpackBootstrap } } } else { - var node = this.body.nodes[startingNodeId]; - if (node === undefined) { + var _node = this.body.nodes[startingNodeId]; + if (_node === undefined) { console.error("Node not found:", startingNodeId); return; } - crawler(node); + crawler(_node); } } @@ -41400,6 +41967,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param diff * @private */ + }, { key: '_shiftBlock', value: function _shiftBlock(parentId, diff) { @@ -41422,6 +41990,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {{foundParent, withChild}} * @private */ + }, { key: '_findCommonParent', value: function _findCommonParent(childA, childB) { @@ -41431,20 +42000,20 @@ return /******/ (function(modules) { // webpackBootstrap var iterateParents = function iterateParents(parents, child) { if (_this8.hierarchicalParentReference[child] !== undefined) { for (var i = 0; i < _this8.hierarchicalParentReference[child].length; i++) { - var _parent = _this8.hierarchicalParentReference[child][i]; - parents[_parent] = true; - iterateParents(parents, _parent); + var parent = _this8.hierarchicalParentReference[child][i]; + parents[parent] = true; + iterateParents(parents, parent); } } }; var findParent = function findParent(parents, child) { if (_this8.hierarchicalParentReference[child] !== undefined) { for (var i = 0; i < _this8.hierarchicalParentReference[child].length; i++) { - var _parent2 = _this8.hierarchicalParentReference[child][i]; - if (parents[_parent2] !== undefined) { - return { foundParent: _parent2, withChild: child }; + var parent = _this8.hierarchicalParentReference[child][i]; + if (parents[parent] !== undefined) { + return { foundParent: parent, withChild: child }; } - var branch = findParent(parents, _parent2); + var branch = findParent(parents, parent); if (branch.foundParent !== null) { return branch; } @@ -41464,6 +42033,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param level * @private */ + }, { key: '_setPositionForHierarchy', value: function _setPositionForHierarchy(node, position, level) { @@ -41496,6 +42066,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number|*} * @private */ + }, { key: '_getPositionForHierarchy', value: function _getPositionForHierarchy(node) { @@ -41511,6 +42082,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param nodeArray * @private */ + }, { key: '_sortNodeArray', value: function _sortNodeArray(nodeArray) { @@ -41529,28 +42101,27 @@ return /******/ (function(modules) { // webpackBootstrap }]); return LayoutEngine; - })(); + }(); - exports['default'] = LayoutEngine; - module.exports = exports['default']; + exports.default = LayoutEngine; /***/ }, -/* 109 */ +/* 110 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var util = __webpack_require__(1); - var Hammer = __webpack_require__(20); - var hammerUtil = __webpack_require__(24); + var Hammer = __webpack_require__(22); + var hammerUtil = __webpack_require__(25); /** * clears the toolbar div element of children @@ -41558,7 +42129,7 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ - var ManipulationSystem = (function () { + var ManipulationSystem = function () { function ManipulationSystem(body, canvas, selectionHandler) { var _this = this; @@ -41615,6 +42186,7 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ + _createClass(ManipulationSystem, [{ key: '_restore', value: function _restore() { @@ -41631,6 +42203,7 @@ return /******/ (function(modules) { // webpackBootstrap * Set the Options * @param options */ + }, { key: 'setOptions', value: function setOptions(options, allOptions, globalOptions) { @@ -41666,6 +42239,7 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { key: 'toggleEditMode', value: function toggleEditMode() { @@ -41707,6 +42281,7 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { key: 'showManipulatorToolbar', value: function showManipulatorToolbar() { @@ -41787,6 +42362,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Create the toolbar for adding Nodes */ + }, { key: 'addNodeMode', value: function addNodeMode() { @@ -41816,6 +42392,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * call the bound function to handle the editing of the node. The node has to be selected. */ + }, { key: 'editNode', value: function editNode() { @@ -41862,6 +42439,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * create the toolbar to connect nodes */ + }, { key: 'addEdgeMode', value: function addEdgeMode() { @@ -41898,6 +42476,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * create the toolbar to edit edges */ + }, { key: 'editEdgeMode', value: function editEdgeMode() { @@ -41973,6 +42552,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * delete everything in the selection */ + }, { key: 'deleteSelected', value: function deleteSelected() { @@ -42039,6 +42619,7 @@ return /******/ (function(modules) { // webpackBootstrap * draw or remove the DOM * @private */ + }, { key: '_setup', value: function _setup() { @@ -42064,6 +42645,7 @@ return /******/ (function(modules) { // webpackBootstrap * create the div overlays that contain the DOM * @private */ + }, { key: '_createWrappers', value: function _createWrappers() { @@ -42107,6 +42689,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {*} * @private */ + }, { key: '_getNewTargetNode', value: function _getNewTargetNode(x, y) { @@ -42128,6 +42711,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Create the edit button */ + }, { key: '_createEditButton', value: function _createEditButton() { @@ -42153,6 +42737,7 @@ return /******/ (function(modules) { // webpackBootstrap * this function cleans up after everything this module does. Temporary elements, functions and events are removed, physics restored, hammers removed. * @private */ + }, { key: '_clean', value: function _clean() { @@ -42185,6 +42770,7 @@ return /******/ (function(modules) { // webpackBootstrap * Each dom element has it's own hammer. They are stored in this.manipulationHammers. This cleans them up. * @private */ + }, { key: '_cleanManipulatorHammers', value: function _cleanManipulatorHammers() { @@ -42201,6 +42787,7 @@ return /******/ (function(modules) { // webpackBootstrap * Remove all DOM elements created by this module. * @private */ + }, { key: '_removeManipulationDOM', value: function _removeManipulationDOM() { @@ -42234,6 +42821,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param index * @private */ + }, { key: '_createSeperator', value: function _createSeperator() { @@ -42293,6 +42881,7 @@ return /******/ (function(modules) { // webpackBootstrap value: function _createButton(id, className, label) { var labelClassName = arguments.length <= 3 || arguments[3] === undefined ? 'vis-label' : arguments[3]; + this.manipulationDOM[id + 'Div'] = document.createElement('div'); this.manipulationDOM[id + 'Div'].className = className; this.manipulationDOM[id + 'Label'] = document.createElement('div'); @@ -42315,6 +42904,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param newFunction * @private */ + }, { key: '_temporaryBindEvent', value: function _temporaryBindEvent(event, newFunction) { @@ -42328,6 +42918,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param newFunction * @private */ + }, { key: '_temporaryBindUI', value: function _temporaryBindUI(UIfunctionName, newFunction) { @@ -42344,6 +42935,7 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { key: '_unbindTemporaryUIs', value: function _unbindTemporaryUIs() { @@ -42360,6 +42952,7 @@ return /******/ (function(modules) { // webpackBootstrap * Unbind the events created by _temporaryBindEvent * @private */ + }, { key: '_unbindTemporaryEvents', value: function _unbindTemporaryEvents() { @@ -42376,6 +42969,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param domElement * @param funct */ + }, { key: '_bindHammerToDiv', value: function _bindHammerToDiv(domElement, boundFunction) { @@ -42388,6 +42982,7 @@ return /******/ (function(modules) { // webpackBootstrap * Neatly clean up temporary edges and nodes * @private */ + }, { key: '_cleanupTemporaryNodesAndEdges', value: function _cleanupTemporaryNodesAndEdges() { @@ -42402,9 +42997,9 @@ return /******/ (function(modules) { // webpackBootstrap } // _clean temporary nodes - for (var i = 0; i < this.temporaryIds.nodes.length; i++) { - delete this.body.nodes[this.temporaryIds.nodes[i]]; - var indexTempNode = this.body.nodeIndices.indexOf(this.temporaryIds.nodes[i]); + for (var _i = 0; _i < this.temporaryIds.nodes.length; _i++) { + delete this.body.nodes[this.temporaryIds.nodes[_i]]; + var indexTempNode = this.body.nodeIndices.indexOf(this.temporaryIds.nodes[_i]); if (indexTempNode !== -1) { this.body.nodeIndices.splice(indexTempNode, 1); } @@ -42420,6 +43015,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param event * @private */ + }, { key: '_controlNodeTouch', value: function _controlNodeTouch(event) { @@ -42433,6 +43029,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param event * @private */ + }, { key: '_controlNodeDragStart', value: function _controlNodeDragStart(event) { @@ -42467,6 +43064,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param event * @private */ + }, { key: '_controlNodeDrag', value: function _controlNodeDrag(event) { @@ -42490,6 +43088,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param event * @private */ + }, { key: '_controlNodeDragEnd', value: function _controlNodeDragEnd(event) { @@ -42539,6 +43138,7 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { key: '_handleConnect', value: function _handleConnect(event) { @@ -42602,6 +43202,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param event * @private */ + }, { key: '_finishConnect', value: function _finishConnect(event) { @@ -42648,6 +43249,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Adds a node on the specified location */ + }, { key: '_performAddNode', value: function _performAddNode(clickData) { @@ -42684,6 +43286,7 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { key: '_performAddEdge', value: function _performAddEdge(sourceNodeId, targetNodeId) { @@ -42715,6 +43318,7 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { key: '_performEditEdge', value: function _performEditEdge(sourceNodeId, targetNodeId) { @@ -42746,15 +43350,19 @@ return /******/ (function(modules) { // webpackBootstrap }]); return ManipulationSystem; - })(); + }(); - exports['default'] = ManipulationSystem; - module.exports = exports['default']; + exports.default = ManipulationSystem; /***/ }, -/* 110 */ +/* 111 */ /***/ function(module, exports) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); /** * This object contains all possible options. It will check if the types are correct, if required if the option is one * of the allowed values. @@ -42762,11 +43370,6 @@ return /******/ (function(modules) { // webpackBootstrap * __any__ means that the name of the property does not matter. * __type__ is a required field for all objects and contains the allowed types of all objects */ - 'use strict'; - - Object.defineProperty(exports, '__esModule', { - value: true - }); var string = 'string'; var boolean = 'boolean'; var number = 'number'; @@ -43271,27 +43874,27 @@ return /******/ (function(modules) { // webpackBootstrap exports.configureOptions = configureOptions; /***/ }, -/* 111 */ +/* 112 */ /***/ function(module, exports, __webpack_require__) { - // distance finding algorithm "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; })(); + var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); // distance finding algorithm - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + var _FloydWarshall = __webpack_require__(113); - var _componentsAlgorithmsFloydWarshallJs = __webpack_require__(112); + var _FloydWarshall2 = _interopRequireDefault(_FloydWarshall); - var _componentsAlgorithmsFloydWarshallJs2 = _interopRequireDefault(_componentsAlgorithmsFloydWarshallJs); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /** * KamadaKawai positions the nodes initially based on @@ -43302,14 +43905,14 @@ return /******/ (function(modules) { // webpackBootstrap * Possible optimizations in the distance calculation can be implemented. */ - var KamadaKawai = (function () { + var KamadaKawai = function () { function KamadaKawai(body, edgeLength, edgeStrength) { _classCallCheck(this, KamadaKawai); this.body = body; this.springLength = edgeLength; this.springConstant = edgeStrength; - this.distanceSolver = new _componentsAlgorithmsFloydWarshallJs2["default"](); + this.distanceSolver = new _FloydWarshall2.default(); } /** @@ -43317,6 +43920,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param options */ + _createClass(KamadaKawai, [{ key: "setOptions", value: function setOptions(options) { @@ -43335,6 +43939,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param nodesArray * @param edgesArray */ + }, { key: "solve", value: function solve(nodesArray, edgesArray) { @@ -43368,12 +43973,12 @@ return /******/ (function(modules) { // webpackBootstrap var _getHighestEnergyNode2 = this._getHighestEnergyNode(ignoreClusters); - var _getHighestEnergyNode22 = _slicedToArray(_getHighestEnergyNode2, 4); + var _getHighestEnergyNode3 = _slicedToArray(_getHighestEnergyNode2, 4); - highE_nodeId = _getHighestEnergyNode22[0]; - maxEnergy = _getHighestEnergyNode22[1]; - dE_dx = _getHighestEnergyNode22[2]; - dE_dy = _getHighestEnergyNode22[3]; + highE_nodeId = _getHighestEnergyNode3[0]; + maxEnergy = _getHighestEnergyNode3[1]; + dE_dx = _getHighestEnergyNode3[2]; + dE_dy = _getHighestEnergyNode3[3]; delta_m = maxEnergy; subIterations = 0; @@ -43383,11 +43988,11 @@ return /******/ (function(modules) { // webpackBootstrap var _getEnergy2 = this._getEnergy(highE_nodeId); - var _getEnergy22 = _slicedToArray(_getEnergy2, 3); + var _getEnergy3 = _slicedToArray(_getEnergy2, 3); - delta_m = _getEnergy22[0]; - dE_dx = _getEnergy22[1]; - dE_dy = _getEnergy22[2]; + delta_m = _getEnergy3[0]; + dE_dx = _getEnergy3[1]; + dE_dy = _getEnergy3[2]; } } } @@ -43397,6 +44002,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {*[]} * @private */ + }, { key: "_getHighestEnergyNode", value: function _getHighestEnergyNode(ignoreClusters) { @@ -43411,13 +44017,13 @@ return /******/ (function(modules) { // webpackBootstrap var m = nodesArray[nodeIdx]; // by not evaluating nodes with predefined positions we should only move nodes that have no positions. if (nodes[m].predefinedPosition === false || nodes[m].isCluster === true && ignoreClusters === true || nodes[m].options.fixed.x === true || nodes[m].options.fixed.y === true) { - var _getEnergy3 = this._getEnergy(m); + var _getEnergy4 = this._getEnergy(m); - var _getEnergy32 = _slicedToArray(_getEnergy3, 3); + var _getEnergy5 = _slicedToArray(_getEnergy4, 3); - var delta_m = _getEnergy32[0]; - var dE_dx = _getEnergy32[1]; - var dE_dy = _getEnergy32[2]; + var delta_m = _getEnergy5[0]; + var dE_dx = _getEnergy5[1]; + var dE_dy = _getEnergy5[2]; if (maxEnergy < delta_m) { maxEnergy = delta_m; @@ -43437,6 +44043,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {*[]} * @private */ + }, { key: "_getEnergy", value: function _getEnergy(m) { @@ -43470,6 +44077,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param dE_dy * @private */ + }, { key: "_moveNode", value: function _moveNode(m, dE_dx, dE_dy) { @@ -43513,6 +44121,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param D_matrix * @private */ + }, { key: "_createL_matrix", value: function _createL_matrix(D_matrix) { @@ -43533,6 +44142,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param D_matrix * @private */ + }, { key: "_createK_matrix", value: function _createK_matrix(D_matrix) { @@ -43550,30 +44160,29 @@ return /******/ (function(modules) { // webpackBootstrap }]); return KamadaKawai; - })(); + }(); - exports["default"] = KamadaKawai; - module.exports = exports["default"]; + exports.default = KamadaKawai; /***/ }, -/* 112 */ +/* 113 */ /***/ function(module, exports) { - /** - * Created by Alex on 10-Aug-15. - */ - "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var FloydWarshall = (function () { + /** + * Created by Alex on 10-Aug-15. + */ + + var FloydWarshall = function () { function FloydWarshall() { _classCallCheck(this, FloydWarshall); } @@ -43595,8 +44204,8 @@ return /******/ (function(modules) { // webpackBootstrap } // put the weights for the edges in. This assumes unidirectionality. - for (var i = 0; i < edgesArray.length; i++) { - var edge = edges[edgesArray[i]]; + for (var _i = 0; _i < edgesArray.length; _i++) { + var edge = edges[edgesArray[_i]]; // edge has to be connected if it counts to the distances. If it is connected to inner clusters it will crash so we also check if it is in the D_matrix if (edge.connected === true && D_matrix[edge.fromId] !== undefined && D_matrix[edge.toId] !== undefined) { D_matrix[edge.fromId][edge.toId] = 1; @@ -43608,10 +44217,10 @@ return /******/ (function(modules) { // webpackBootstrap // Adapted FloydWarshall based on unidirectionality to greatly reduce complexity. for (var k = 0; k < nodeCount; k++) { - for (var i = 0; i < nodeCount - 1; i++) { - for (var j = i + 1; j < nodeCount; j++) { - D_matrix[nodesArray[i]][nodesArray[j]] = Math.min(D_matrix[nodesArray[i]][nodesArray[j]], D_matrix[nodesArray[i]][nodesArray[k]] + D_matrix[nodesArray[k]][nodesArray[j]]); - D_matrix[nodesArray[j]][nodesArray[i]] = D_matrix[nodesArray[i]][nodesArray[j]]; + for (var _i2 = 0; _i2 < nodeCount - 1; _i2++) { + for (var _j = _i2 + 1; _j < nodeCount; _j++) { + D_matrix[nodesArray[_i2]][nodesArray[_j]] = Math.min(D_matrix[nodesArray[_i2]][nodesArray[_j]], D_matrix[nodesArray[_i2]][nodesArray[k]] + D_matrix[nodesArray[k]][nodesArray[_j]]); + D_matrix[nodesArray[_j]][nodesArray[_i2]] = D_matrix[nodesArray[_i2]][nodesArray[_j]]; } } } @@ -43621,20 +44230,19 @@ return /******/ (function(modules) { // webpackBootstrap }]); return FloydWarshall; - })(); + }(); - exports["default"] = FloydWarshall; - module.exports = exports["default"]; + exports.default = FloydWarshall; /***/ }, -/* 113 */ +/* 114 */ /***/ function(module, exports) { + 'use strict'; + /** * Canvas shapes used by Network */ - 'use strict'; - if (typeof CanvasRenderingContext2D !== 'undefined') { /** @@ -43914,9 +44522,11 @@ return /******/ (function(modules) { // webpackBootstrap } /***/ }, -/* 114 */ +/* 115 */ /***/ function(module, exports) { + 'use strict'; + /** * Parse a text source containing data in DOT language into a JSON object. * The object contains two lists: one with nodes and one with edges. @@ -43930,8 +44540,6 @@ return /******/ (function(modules) { // webpackBootstrap * {Object[]} nodes * {Object[]} edges */ - 'use strict'; - function parseDOT(data) { dot = data; return parseGraph(); @@ -44812,7 +45420,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.DOTToGraph = DOTToGraph; /***/ }, -/* 115 */ +/* 116 */ /***/ function(module, exports) { 'use strict'; @@ -44889,139 +45497,13 @@ return /******/ (function(modules) { // webpackBootstrap exports.parseGephi = parseGephi; -/***/ }, -/* 116 */ -/***/ function(module, exports) { - - /** - * @class Images - * This class loads images and keeps them stored. - */ - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var Images = (function () { - function Images(callback) { - _classCallCheck(this, Images); - - this.images = {}; - this.imageBroken = {}; - this.callback = callback; - } - - /** - * @param {string} url The Url to cache the image as - * @return {Image} imageToLoadBrokenUrlOn The image object - */ - - _createClass(Images, [{ - key: "_addImageToCache", - value: function _addImageToCache(url, imageToCache) { - // IE11 fix -- thanks dponch! - if (imageToCache.width === 0) { - document.body.appendChild(imageToCache); - imageToCache.width = imageToCache.offsetWidth; - imageToCache.height = imageToCache.offsetHeight; - document.body.removeChild(imageToCache); - } - - this.images[url] = imageToCache; - } - - /** - * @param {string} url The original Url that failed to load, if the broken image is successfully loaded it will be added to the cache using this Url as the key so that subsequent requests for this Url will return the broken image - * @param {string} brokenUrl Url the broken image to try and load - * @return {Image} imageToLoadBrokenUrlOn The image object - */ - }, { - key: "_tryloadBrokenUrl", - value: function _tryloadBrokenUrl(url, brokenUrl, imageToLoadBrokenUrlOn) { - var _this = this; - - //If any of the parameters aren't specified then exit the function because nothing constructive can be done - if (url === undefined || brokenUrl === undefined || imageToLoadBrokenUrlOn === undefined) return; - - //Clear the old subscription to the error event and put a new in place that only handle errors in loading the brokenImageUrl - imageToLoadBrokenUrlOn.onerror = function () { - console.error("Could not load brokenImage:", brokenUrl); - //Add an empty image to the cache so that when subsequent load calls are made for the url we don't try load the image and broken image again - _this._addImageToCache(url, new Image()); - }; - - //Set the source of the image to the brokenUrl, this is actually what kicks off the loading of the broken image - imageToLoadBrokenUrlOn.src = brokenUrl; - } - - /** - * @return {Image} imageToRedrawWith The images that will be passed to the callback when it is invoked - */ - }, { - key: "_redrawWithImage", - value: function _redrawWithImage(imageToRedrawWith) { - if (this.callback) { - this.callback(imageToRedrawWith); - } - } - - /** - * @param {string} url Url of the image - * @param {string} brokenUrl Url of an image to use if the url image is not found - * @return {Image} img The image object - */ - }, { - key: "load", - value: function load(url, brokenUrl, id) { - var _this2 = this; - - //Try and get the image from the cache, if successful then return the cached image - var cachedImage = this.images[url]; - if (cachedImage) return cachedImage; - - //Create a new image - var img = new Image(); - - //Subscribe to the event that is raised if the image loads successfully - img.onload = function () { - //Add the image to the cache and then request a redraw - _this2._addImageToCache(url, img); - _this2._redrawWithImage(img); - }; - - //Subscribe to the event that is raised if the image fails to load - img.onerror = function () { - console.error("Could not load image:", url); - //Try and load the image specified by the brokenUrl using - _this2._tryloadBrokenUrl(url, brokenUrl, img); - }; - - //Set the source of the image to the url, this is actuall what kicks off the loading of the image - img.src = url; - - //Return the new image - return img; - } - }]); - - return Images; - })(); - - exports["default"] = Images; - module.exports = exports["default"]; - /***/ }, /* 117 */ /***/ function(module, exports) { - // English 'use strict'; + // English exports['en'] = { edit: 'Edit', del: 'Delete selected', diff --git a/dist/vis.map b/dist/vis.map index 21d08c5d..2398f8f1 100644 --- a/dist/vis.map +++ b/dist/vis.map @@ -1 +1 @@ -{"version":3,"sources":["vis.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","util","DOMutil","DataSet","DataView","Queue","Graph3d","graph3d","Camera","Filter","Point2d","Point3d","Slider","StepNumber","Timeline","Graph2d","timeline","Core","DateUtil","Range","stack","TimeStep","components","items","Item","BackgroundItem","BoxItem","PointItem","RangeItem","BackgroundGroup","Component","CurrentTime","CustomTime","DataAxis","DataScale","GraphGroup","Group","ItemSet","Legend","LineGraph","TimeAxis","Network","network","Images","dotparser","gephiParser","allOptions","convertDot","input","DOTToGraph","convertGephi","options","parseGephi","moment","Hammer","keycharm","uuid","isNumber","object","Number","recursiveDOMDelete","DOMobject","hasChildNodes","firstChild","removeChild","giveRange","min","max","total","value","scale","Math","isString","String","isDate","Date","match","ASPDateRegex","exec","isNaN","parse","randomUUID","v4","assignAllKeys","obj","prop","hasOwnProperty","fillIfDefined","a","b","allowDeletion","arguments","length","undefined","protoExtend","i","other","extend","selectiveExtend","props","Array","isArray","Error","selectiveDeepExtend","TypeError","constructor","Object","deepExtend","selectiveNotDeepExtend","indexOf","push","equalArray","len","convert","type","Boolean","valueOf","isMoment","toDate","getType","toISOString","copyAndExtendArray","arr","newValue","newArr","copyArray","getAbsoluteLeft","elem","getBoundingClientRect","left","getAbsoluteTop","top","addClassName","className","classes","split","join","removeClassName","index","splice","forEach","callback","toArray","array","updateProperty","key","throttle","fn","wait","timeout","needExecution","throttled","setTimeout","addEventListener","element","action","listener","useCapture","navigator","userAgent","attachEvent","removeEventListener","detachEvent","preventDefault","event","window","returnValue","getTarget","target","srcElement","nodeType","parentNode","hasParent","parent","e","option","asBoolean","defaultValue","asNumber","asString","asSize","asElement","hexToRGB","hex","shorthandRegex","replace","r","g","result","parseInt","overrideOpacity","color","opacity","rgb","substr","RGBToHex","red","green","blue","toString","slice","parseColor","isValidRGB","map","isValidHex","hsv","hexToHSV","lighterColorHSV","h","s","v","darkerColorHSV","darkerColorHex","HSVToHex","lighterColorHex","background","border","highlight","hover","RGBToHSV","minRGB","maxRGB","d","hue","saturation","cssUtil","cssText","styles","style","trim","parts","keys","addCssText","currentStyles","newStyles","removeCssText","removeStyles","HSVToRGB","floor","f","q","t","isOk","test","isValidRGBA","rgba","selectiveBridgeObject","fields","referenceObject","objectTo","create","bridgeObject","insertSort","compare","k","j","mergeOptions","mergeTarget","globalOptions","enabled","binarySearchCustom","orderedItems","comparator","field","field2","maxIterations","iteration","low","high","middle","item","searchResult","binarySearchValue","sidePreference","prevValue","nextValue","easingFunctions","linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","global","utils_hooks__hooks","hookCallback","apply","setHookCallback","prototype","res","hasOwnProp","create_utc__createUTC","format","locale","strict","createLocalOrUTC","utc","defaultParsingFlags","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidMonth","invalidFormat","userInvalidated","iso","getParsingFlags","_pf","valid__isValid","_isValid","flags","_d","getTime","invalidWeekday","_strict","bigHour","valid__createInvalid","NaN","isUndefined","copyConfig","to","from","val","_isAMomentObject","_i","_f","_l","_tzm","_isUTC","_offset","_locale","momentProperties","Moment","config","updateInProgress","updateOffset","absFloor","number","ceil","toInt","argumentForCoercion","coercedNumber","isFinite","compareArrays","array1","array2","dontConvert","lengthDiff","abs","diffs","Locale","normalizeLocale","toLowerCase","chooseLocale","names","next","loadLocale","name","oldLocale","locales","globalLocale","_abbr","code","locale_locales__getSetGlobalLocale","values","data","locale_locales__getLocale","defineLocale","abbr","set","addUnitAlias","unit","shorthand","lowerCase","aliases","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","isFunction","Function","makeGetSet","keepTime","get_set__set","get_set__get","mom","isValid","getSet","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","pow","addFormatToken","token","padded","ordinal","func","formatTokenFunctions","localeData","removeFormattingTokens","makeFormatFunction","formattingTokens","output","formatMoment","expandFormat","formatFunctions","invalidDate","replaceLongDateFormatTokens","longDateFormat","localFormattingTokens","lastIndex","addRegexToken","regex","strictRegex","regexes","isStrict","getParseRegexForToken","RegExp","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","addParseToken","tokens","addWeekParseToken","_w","addTimeToArrayFromToken","_a","daysInMonth","year","month","UTC","getUTCDate","localeMonths","_months","MONTHS_IN_FORMAT","localeMonthsShort","_monthsShort","localeMonthsParse","monthName","_monthsParse","_longMonthsParse","_shortMonthsParse","months","monthsShort","setMonth","dayOfMonth","monthsParse","date","getSetMonth","getDaysInMonth","monthsShortRegex","_monthsParseExact","computeMonthsParse","_monthsShortStrictRegex","_monthsShortRegex","monthsRegex","_monthsStrictRegex","_monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","sort","checkOverflow","MONTH","DATE","YEAR","HOUR","MINUTE","SECOND","MILLISECOND","_overflowDayOfYear","_overflowWeeks","WEEK","_overflowWeekday","WEEKDAY","warn","msg","suppressDeprecationWarnings","console","deprecate","firstTime","deprecateSimple","deprecations","configFromISO","l","allowTime","dateFormat","timeFormat","tzFormat","string","extendedIsoRegex","basicIsoRegex","isoDates","isoTimes","tzRegex","configFromStringAndFormat","configFromString","aspNetJsonRegex","createFromInputFallback","createDate","y","M","ms","getFullYear","setFullYear","createUTCDate","getUTCFullYear","setUTCFullYear","daysInYear","isLeapYear","getIsLeapYear","firstWeekOffset","dow","doy","fwd","fwdlw","getUTCDay","dayOfYearFromWeeks","week","weekday","resYear","resDayOfYear","localWeekday","weekOffset","dayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","defaults","currentDateArray","nowValue","now","_useUTC","getUTCMonth","getMonth","getDate","configFromArray","currentDate","yearToUse","dayOfYearFromWeekInfo","_dayOfYear","_nextDay","setUTCMinutes","getUTCMinutes","w","weekYear","temp","weekdayOverflow","GG","W","E","local__createLocal","_week","gg","ISO_8601","parsedInput","skipped","stringLength","totalParsedInputLength","meridiemFixWrap","_meridiem","hour","meridiem","isPm","meridiemHour","isPM","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","score","configFromObject","day","minute","second","millisecond","createFromConfig","prepareConfig","add","preparse","configFromInput","isUTC","pickBy","moments","args","Duration","duration","years","quarters","quarter","weeks","days","hours","minutes","seconds","milliseconds","_milliseconds","_days","_data","_bubble","isDuration","offset","separator","utcOffset","offsetFromString","matcher","matches","chunk","chunkOffset","cloneWithOffset","model","diff","clone","setTime","local","getDateOffset","round","getTimezoneOffset","getSetOffset","keepLocalTime","localAdjust","matchShortOffset","_changeInProgress","add_subtract__addSubtract","create__createDuration","getSetZone","setOffsetToUTC","setOffsetToLocal","subtract","setOffsetToParsedOffset","matchOffset","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","_isDSTShifted","isLocal","isUtcOffset","isUtc","ret","diffRes","aspNetRegex","isoRegex","parseIso","momentsDifference","inp","parseFloat","positiveMomentsDifference","base","isAfter","isBefore","createAdder","direction","period","dur","tmp","isAdding","moment_calendar__calendar","time","formats","sod","startOf","calendar","localInput","endOf","isBetween","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","that","zoneDelta","delta","monthDiff","anchor2","adjust","wholeMonthDiff","anchor","moment_format__toISOString","inputString","defaultFormat","postformat","withoutSuffix","humanize","fromNow","toNow","newLocaleData","isoWeekday","to_type__valueOf","unix","toObject","toJSON","moment_valid__isValid","parsingFlags","invalidAt","creationData","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","isoWeek","getISOWeeksInYear","getWeeksInYear","weekInfo","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","localeWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","weekdaysParse","localeWeekdays","_weekdays","isFormat","localeWeekdaysShort","_weekdaysShort","localeWeekdaysMin","_weekdaysMin","localeWeekdaysParse","weekdayName","_weekdaysParse","_minWeekdaysParse","_shortWeekdaysParse","_fullWeekdaysParse","weekdays","weekdaysShort","weekdaysMin","getSetDayOfWeek","getDay","getSetLocaleDayOfWeek","getSetISODayOfWeek","getSetDayOfYear","hFormat","lowercase","matchMeridiem","_meridiemParse","localeIsPM","charAt","localeMeridiem","isLower","parseMs","getZoneAbbr","getZoneName","moment__createUnix","moment__createInZone","parseZone","locale_calendar__calendar","_calendar","_longDateFormat","formatUpper","toUpperCase","_invalidDate","_ordinal","preParsePostFormat","relative__relativeTime","isFuture","_relativeTime","pastFuture","locale_set__set","_ordinalParseLenient","_ordinalParse","source","lists__get","setter","list","count","out","lists__listMonths","lists__listMonthsShort","lists__listWeekdays","lists__listWeekdaysShort","lists__listWeekdaysMin","duration_abs__abs","mathAbs","duration_add_subtract__addSubtract","duration_add_subtract__add","duration_add_subtract__subtract","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","duration_as__valueOf","makeAs","alias","duration_get__get","makeGetter","substituteTimeAgo","relativeTime","duration_humanize__relativeTime","posNegDuration","thresholds","duration_humanize__getSetRelativeTimeThreshold","threshold","limit","withSuffix","iso_string__toISOString","iso_string__abs","Y","D","asSeconds","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchTimestamp","matchWord","defaultLocaleMonths","defaultLocaleMonthsShort","defaultMonthsShortRegex","defaultMonthsRegex","parseTwoDigitYear","getSetYear","prototypeMin","prototypeMax","add_subtract__add","add_subtract__subtract","lang","isoWeekYear","defaultLocaleWeek","getSetDayOfMonth","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","_isPm","pos","pos1","pos2","defaultLocaleMeridiemParse","getSetHour","getSetMinute","getSetSecond","getSetMillisecond","momentPrototype__proto","get","isoWeeks","isoWeeksInYear","isDST","isDSTShifted","zoneAbbr","zoneName","dates","zone","momentPrototype","defaultCalendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","defaultLongDateFormat","LTS","LT","L","LL","LLL","LLLL","defaultInvalidDate","defaultOrdinal","defaultOrdinalParse","defaultRelativeTime","future","past","mm","hh","dd","MM","yy","prototype__proto","firstDayOfYear","firstDayOfWeek","ordinalParse","langData","asMilliseconds","asMinutes","asHours","asDays","asWeeks","asMonths","asYears","duration_prototype__proto","toIsoString","version","invalid","relativeTimeThreshold","_moment","webpackPolyfill","paths","children","webpackContext","req","resolve","buf","ii","oct","_hexToByte","unparse","bth","_byteToHex","v1","clockseq","_clockseq","msecs","nsecs","_lastNSecs","dt","_lastMSecs","tl","tmh","node","_nodeId","n","rnds","random","rng","_rng","globalVar","crypto","getRandomValues","_rnds8","Uint8Array","_rnds","_seedBytes","prepareElements","JSONcontainer","elementType","redundant","used","cleanupElements","resetElements","getSVGElement","svgContainer","shift","document","createElementNS","appendChild","getDOMElement","DOMContainer","insertBefore","createElement","drawPoint","x","groupTemplate","labelObj","point","setAttributeNS","size","label","xOffset","yOffset","content","textContent","drawBar","width","height","rect","_options","_fieldId","fieldId","_type","_subscribers","setOptions","queue","_queue","destroy","on","subscribers","subscribe","off","filter","unsubscribe","_trigger","params","senderId","concat","subscriber","addedIds","me","_addItem","update","updatedIds","oldData","updatedData","addOrUpdate","oldItem","_updateItem","ids","firstType","returnType","allowedValues","itemIds","itemId","_getItem","order","_sort","_filterFields","resultant","getIds","getDataSet","mappedItems","filteredItem","itemFields","av","bv","remove","removedId","removedIds","_remove","clear","maxField","itemField","minField","distinct","fieldType","exists","types","raw","converted","JSON","stringify","delay","Infinity","_timeout","_extended","_flushIfNeeded","flush","methods","original","method","context","entry","clearTimeout","_ids","_onEvent","setData","refresh","oldIds","newIds","added","removed","viewOptions","getArguments","defaultFilter","dataSet","updated","container","SyntaxError","containerElement","margin","defaultXCenter","defaultYCenter","xLabel","yLabel","zLabel","passValueFn","xValueLabel","yValueLabel","zValueLabel","filterLabel","legendLabel","STYLE","DOT","showPerspective","showGrid","keepAspectRatio","showShadow","showGrayBottom","showTooltip","verticalRatio","animationInterval","animationPreload","camera","setArmRotation","setArmLength","eye","dataTable","dataPoints","colX","colY","colZ","colValue","colFilter","xMin","xStep","xMax","yMin","yStep","yMax","zMin","zStep","zMax","valueMin","valueMax","xBarWidth","yBarWidth","axisColor","gridColor","dataColor","fill","stroke","strokeWidth","dotSizeRatio","getMouseX","clientX","targetTouches","getMouseY","clientY","Emitter","_setScale","z","xCenter","yCenter","zCenter","setArmLocation","_convert3Dto2D","point3d","translation","_convertPointToTranslation","_convertTranslationToScreen","ax","ay","az","cx","getCameraLocation","cy","cz","sinTx","sin","getCameraRotation","cosTx","cos","sinTy","cosTy","sinTz","cosTz","dx","dy","dz","bx","by","ex","ey","ez","getArmLength","xcenter","frame","canvas","clientWidth","ycenter","_setBackgroundColor","backgroundColor","borderColor","borderWidth","borderStyle","BAR","BARCOLOR","BARSIZE","DOTLINE","DOTCOLOR","DOTSIZE","GRID","LINE","SURFACE","_getStyleNumber","styleName","_determineColumnIndexes","getNumberOfColumns","getNumberOfRows","counter","column","getDistinctValues","distinctValues","getColumnRange","minMax","_dataInitialize","rawData","_onChange","dataFilter","setOnLoadCallback","redraw","withBars","defaultXBarWidth","dataX","defaultYBarWidth","dataY","xRange","defaultXMin","defaultXMax","defaultXStep","yRange","defaultYMin","defaultYMax","defaultYStep","zRange","defaultZMin","defaultZMax","defaultZStep","valueRange","defaultValueMin","defaultValueMax","_getDataPoints","sortNumber","dataMatrix","xIndex","yIndex","trans","screen","bottom","pointRight","pointTop","pointCross","position","noCanvas","fontWeight","padding","innerHTML","onmousedown","_onMouseDown","ontouchstart","_onTouchStart","onmousewheel","_onWheel","ontooltip","_onTooltip","onkeydown","setSize","_resizeCanvas","clientHeight","animationStart","slider","play","animationStop","stop","_resizeCenter","setCameraPosition","horizontal","vertical","distance","getCameraPosition","getArmRotation","_readData","_redrawFilter","animationAutoStart","cameraPosition","styleNumber","tooltip","showAnimationControls","_redrawSlider","_redrawClear","_redrawAxis","_redrawDataGrid","_redrawDataLine","_redrawDataBar","_redrawDataDot","_redrawInfo","_redrawLegend","ctx","getContext","clearRect","widthMin","widthMax","dotSize","right","lineWidth","font","ymin","ymax","_hsv2rgb","strokeStyle","beginPath","moveTo","lineTo","strokeRect","fillStyle","closePath","gridLineLen","step","start","getCurrent","end","textAlign","textBaseline","fillText","visible","setValues","setPlayInterval","onchange","getIndex","selectValue","setOnChangeCallback","lineStyle","getLabel","getSelectedValue","prettyStep","text","xText","yText","zText","xMin2d","xMax2d","gridLenX","gridLenY","textMargin","armAngle","H","S","V","R","G","B","C","Hi","X","cross","topSideVisible","zAvg","lineJoin","lineCap","transBottom","dist","sortDepth","aDiff","bDiff","crossproduct","crossProduct","_getStrokeWidth","radius","arc","PI","surface","corners","xWidth","yWidth","surfaces","center","avg","transCenter","leftButtonDown","_onMouseUp","which","button","touchDown","startMouseX","startMouseY","startStart","startEnd","startArmRotation","cursor","onmousemove","_onMouseMove","onmouseup","diffX","diffY","horizontalNew","verticalNew","snapAngle","snapValue","parameters","emit","boundingRect","mouseX","mouseY","tooltipTimeout","_hideTooltip","dataPoint","_dataPointFromXY","_showTooltip","ontouchmove","_onTouchMove","ontouchend","_onTouchEnd","wheelDelta","detail","oldLength","newLength","_insideTriangle","triangle","bs","cs","distMax","closestDataPoint","closestDist","triangle1","triangle2","distX","distY","sqrt","line","dot","dom","borderRadius","boxShadow","borderLeft","contentWidth","offsetWidth","contentHeight","offsetHeight","lineHeight","dotWidth","dotHeight","mixin","_callbacks","once","self","removeListener","removeAllListeners","callbacks","cb","listeners","hasListeners","sub","sum","armLocation","armRotation","armLength","cameraLocation","cameraRotation","calculateCameraOrientation","rot","graph","onLoadCallback","loadInBackground","isLoaded","getLoadedProgress","getColumn","getValues","getValue","dataView","progress","prev","bar","MozBorderRadius","slide","onclick","togglePlay","onChangeCallback","playTimeout","playInterval","playLoop","setIndex","playNext","interval","clearInterval","getPlayInterval","setPlayLoop","doLoop","onChange","indexToLeft","startClientX","startSlideX","leftToIndex","_start","_end","_step","precision","_current","setRange","setStep","calculatePrettyStep","log10","log","LN10","step1","step2","step5","toPrecision","getStep","groups","forthArgument","defaultOptions","autoResize","throttleRedraw","orientation","axis","maxHeight","minHeight","_create","body","domProps","emitter","bind","hiddenDates","getScale","timeAxis","toScreen","_toScreen","toGlobalScreen","_toGlobalScreen","toTime","_toTime","toGlobalTime","_toGlobalTime","range","timeAxis2","currentTime","itemSet","itemsData","groupsData","getEventProperties","oncontextmenu","fitDone","getItemRange","setWindow","animation","fit","setGroups","setItems","_redraw","Configurator","Validator","printStyle","configureOptions","_createConfigurator","markDirty","refreshItems","errorFound","validate","selection","getSelection","setSelection","newDataSet","focus","itemData","_this","getDataRange","minItem","maxItem","factor","lhs","rhs","getStart","getEnd","show","repositionX","getWidthLeft","getWidthRight","dataset","centerContainer","itemFromTarget","group","groupFromTarget","customTime","customTimeFromTarget","snap","snappedTime","what","foreground","labelSet","groupId","pageX","srcEvent","pageY","propagating","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","_firstTarget","hammer","events","propagatedHandler","_handled","stopped","stopPropagation","srcStop","firstTarget","elemHammer","_handlers","Manager","PropagatingHammer","o","assign","wrapper","pointerType","isFirst","handler","eventType","hammers","idx","exportName","setTimeoutContext","bindFn","invokeArrayArg","arg","each","iterator","message","deprecationMessage","inherit","child","properties","childP","baseP","_super","boolOrFn","TYPE_FUNCTION","ifUndefined","val1","val2","addEventListeners","splitStr","removeEventListeners","inStr","str","find","inArray","src","findByKey","uniqueArray","results","prefixed","property","prefix","camelProp","VENDOR_PREFIXES","uniqueId","_uniqueId","getWindowForElement","doc","ownerDocument","defaultView","parentWindow","Input","manager","inputTarget","domHandler","ev","enable","init","createInputInstance","Type","inputClass","SUPPORT_POINTER_EVENTS","PointerEventInput","SUPPORT_ONLY_TOUCH","TouchInput","SUPPORT_TOUCH","TouchMouseInput","MouseInput","inputHandler","pointersLen","pointers","changedPointersLen","changedPointers","INPUT_START","isFinal","INPUT_END","INPUT_CANCEL","session","computeInputData","recognize","prevInput","pointersLength","firstInput","simpleCloneInputData","firstMultiple","offsetCenter","getCenter","timeStamp","deltaTime","angle","getAngle","getDistance","computeDeltaXY","offsetDirection","getDirection","deltaX","deltaY","overallVelocity","getVelocity","overallVelocityX","overallVelocityY","rotation","getRotation","maxPointers","computeIntervalInputData","offsetDelta","prevDelta","velocity","velocityX","velocityY","last","lastInterval","COMPUTE_INTERVAL","DIRECTION_NONE","DIRECTION_LEFT","DIRECTION_RIGHT","DIRECTION_UP","DIRECTION_DOWN","PROPS_XY","atan2","PROPS_CLIENT_XY","evEl","MOUSE_ELEMENT_EVENTS","evWin","MOUSE_WINDOW_EVENTS","allow","pressed","POINTER_ELEMENT_EVENTS","POINTER_WINDOW_EVENTS","store","pointerEvents","SingleTouchInput","evTarget","SINGLE_TOUCH_TARGET_EVENTS","SINGLE_TOUCH_WINDOW_EVENTS","started","normalizeSingleTouches","all","touches","changed","changedTouches","TOUCH_TARGET_EVENTS","targetIds","getTouches","allTouches","INPUT_MOVE","identifier","changedTargetTouches","touch","mouse","TouchAction","cleanTouchActions","actions","TOUCH_ACTION_NONE","hasPanX","TOUCH_ACTION_PAN_X","hasPanY","TOUCH_ACTION_PAN_Y","TOUCH_ACTION_MANIPULATION","TOUCH_ACTION_AUTO","Recognizer","state","STATE_POSSIBLE","simultaneous","requireFail","stateStr","STATE_CANCELLED","STATE_ENDED","STATE_CHANGED","STATE_BEGAN","directionStr","getRecognizerByNameIfManager","otherRecognizer","recognizer","AttrRecognizer","PanRecognizer","pX","pY","PinchRecognizer","PressRecognizer","_timer","_input","RotateRecognizer","SwipeRecognizer","TapRecognizer","pTime","pCenter","recognizers","preset","handlers","touchAction","toggleCssProps","recognizeWith","requireFailure","cssProps","triggerDomEvent","gestureEvent","createEvent","initEvent","gesture","dispatchEvent","TEST_ELEMENT","nextKey","dest","merge","MOBILE_REGEX","INPUT_TYPE_TOUCH","INPUT_TYPE_PEN","INPUT_TYPE_MOUSE","INPUT_TYPE_KINECT","DIRECTION_HORIZONTAL","DIRECTION_VERTICAL","DIRECTION_ALL","MOUSE_INPUT_MAP","mousedown","mousemove","mouseup","POINTER_INPUT_MAP","pointerdown","pointermove","pointerup","pointercancel","pointerout","IE10_POINTER_TYPE_ENUM",2,3,4,5,"MSPointerEvent","PointerEvent","removePointer","eventTypeNormalized","isTouch","storeIndex","pointerId","SINGLE_TOUCH_INPUT_MAP","touchstart","touchmove","touchend","touchcancel","TOUCH_INPUT_MAP","inputEvent","inputData","isMouse","PREFIXED_TOUCH_ACTION","NATIVE_TOUCH_ACTION","TOUCH_ACTION_COMPUTE","compute","getTouchAction","preventDefaults","prevented","hasNone","isTapPointer","isTapMovement","isTapTouchTime","preventSrc","STATE_RECOGNIZED","STATE_FAILED","dropRecognizeWith","dropRequireFailure","hasRequireFailures","canRecognizeWith","additionalEvent","tryEmit","canEmit","inputDataClone","process","reset","attrTest","optionPointers","isRecognized","directionTest","hasMoved","inOut","validPointers","validMovement","validTime","taps","posThreshold","validTouchTime","failTimeout","validInterval","validMultiTap","tapCount","VERSION","domEvents","userSelect","touchSelect","touchCallout","contentZooming","userDrag","tapHighlightColor","STOP","FORCED_STOP","force","curRecognizer","existing","Tap","Pan","Swipe","Pinch","Rotate","Press","freeGlobal","deltaDifference","scaleOffset","startToFront","endToFront","moveable","zoomable","zoomMin","zoomMax","animationTimer","_onDragStart","_onDrag","_onDragEnd","_onMouseWheel","_onTouch","_onPinch","validateDirection","getPointer","byUser","finalStart","finalEnd","_cancelAnimation","initStart","initEnd","easingName","easingFunction","initTime","anyChanged","dragging","ease","done","_applyRange","updateHiddenDates","newStart","newEnd","getRange","conversion","totalHidden","previousDelta","_isInsideRange","allowDragging","getHiddenDurationBetween","diffRange","safeStart","snapAwayFromHidden","safeEnd","startDate","endDate","zoomKey","pointer","pointerDate","_pointerToDate","zoom","centerDate","hiddenDuration","hiddenDurationBefore","getHiddenDurationBefore","hiddenDurationAfter","move","onTouch","onRelease","offTouch","offRelease","_isResized","resized","_previousWidth","_previousHeight","convertHiddenOptions","repeat","dateItem","totalRange","pixelTime","runUntil","dayOffset","removeDuplicates","startHidden","isHidden","endHidden","rangeStart","rangeEnd","hidden","safeDates","printDates","stepOverHiddenDates","timeStep","previousTime","stepInHidden","currentValue","current","switchedYear","switchedMonth","switchedDay","correctTimeForHidden","totalDuration","partialDuration","accumulatedHiddenDuration","getAccumulatedHiddenDuration","newTime","timeOffset","requiredDuration","previousPoint","correctionEnabled","hammerUtil","Activator","onMouseWheel","isActive","backgroundVertical","backgroundHorizontal","leftContainer","rightContainer","shadowTop","shadowBottom","shadowTopLeft","shadowBottomLeft","shadowTopRight","shadowBottomRight","initialDrawDone","_redrawTimer","scrollTop","scrollTopMin","customTimes","redrawCount","drawPoints","onRender","clickToUse","activator","_initAutoResize","component","configurator","configure","appliedOptions","setModuleOptions","_origRedraw","active","_stopAutoResize","setCustomTime","getCustomTime","setCustomTimeTitle","title","setCustomTitle","addCustomTime","timestamp","some","removeCustomTime","getVisibleItems","getWindow","borderRootHeight","borderRootWidth","autoHeight","containerHeight","centerWidth","_updateScrollTop","visibilityTop","visibilityBottom","visibility","MAX_REDRAW","repaint","setCurrentTime","getCurrentTime","_startAutoResize","_onResize","lastWidth","lastHeight","watchTimer","setInterval","initialScrollTop","oldScrollTop","_getScrollTop","newScrollTop","_setScrollTop","align","groupOrderSwap","fromGroup","toGroup","targetOrder","groupOrder","selectable","multiselect","itemsAlwaysDraggable","editable","updateTime","updateGroup","groupEditable","onAdd","onUpdate","onMove","onRemove","onMoving","onAddGroup","onMoveGroup","onRemoveGroup","itemOptions","itemListeners","_onAdd","_onUpdate","_onRemove","groupListeners","_onAddGroups","_onUpdateGroups","_onRemoveGroups","groupIds","stackDirty","touchParams","groupTouchParams","UNGROUPED","BACKGROUND","box","_updateUngrouped","backgroundGroup","_onSelectItem","_onMultiSelectItem","_onAddItem","groupHammer","_onGroupDragStart","_onGroupDrag","_onGroupDragEnd","addCallback","dirty","displayed","hide","unselect","select","rawVisibleItems","visibleItems","_deselect","_orderGroups","visibleInterval","zoomed","lastVisibleInterval","restack","firstGroup","_firstGroup","firstMargin","nonFirstMargin","groupMargin","groupResized","firstGroupIndex","firstGroupId","ungrouped","_getGroupId","getLabelSet","oldItemsData","getItems","_order","getGroups","removeItem","_getType","selected","_removeItem","groupData","groupOptions","oldGroupId","oldSubGroupId","subgroup","oldGroup","_constructByEndArray","endArray","dragLeftItem","dragRightItem","itemProps","_getGroupIndex","initialX","dragLeft","_cloneItemData","dragRight","selectedItem","baseGroupIndex","itemsToDrag","groupIndex","groupOffset","ctrlKey","metaKey","_onDragStartAddItem","xAbs","newItem","offsetLeft","updateGroupAllowed","newGroupBase","initial","updateTimeAllowed","initialStart","initialEnd","newOffset","_moveToGroup","originalOrder","movingUp","targetGroupTop","draggedGroupHeight","targetGroupHeight","targetGroup","draggedGroup","newOrder","origOrder","draggedId","numGroups","curPos","orgOffset","slippedPosition","switchGroup","shouldBeGroup","switchGroupId","shiftKey","oldSelection","newSelection","newItemData","itemGroup","lastSelectedGroup","multiselectPerGroup","_getItemRange","_item","itemSetFromTarget","minimumStep","autoScale","FORMAT","minorLabels","majorLabels","setMoment","setFormat","setMinimumStep","roundToMinor","hasNext","setScale","setAutoScale","stepYear","stepMonth","stepDay","stepHour","stepMinute","stepSecond","stepMillisecond","isMajor","getLabelMinor","getLabelMajor","getClassName","even","today","currentWeek","currentMonth","currentYear","subgroups","subgroupIndex","subgroupOrderer","subgroupOrder","byStart","byEnd","checkRangedItems","inner","marker","Element","getLabelWidth","markerHeight","lastMarkerHeight","_calculateSubGroupHeights","limitSize","customOrderedItems","_updateVisibleItems","nostack","_calculateHeight","offsetTop","repositionY","resetSubgroups","setParent","orderSubgroups","_checkIfVisible","sortArray","sortField","itemIndex","removeFromDataSet","startArray","orderByStart","orderByEnd","oldVisibleItems","visibleItemsLookup","lowerBound","upperBound","searchFunction","_checkIfVisibleWithReference","initialPosByStart","_traceVisible","initialPosByEnd","initialPos","breakCondition","isVisible","EPSILON","aTime","bTime","iMax","collidingItem","jj","collision","newTop","baseClassName","_updateContents","_updateTitle","_updateDataAttributes","_updateStyle","getComputedStyle","maxWidth","_repaintDeleteButton","_repaintDragLeft","_repaintDragRight","contentLeft","parentWidth","boxWidth","groupChanged","deleteButton","template","_contentToString","removeAttribute","dataAttributes","attributes","setAttribute","outerHTML","itemSetHeight","marginLeft","onTop","itemSubgroup","totalHeight","newHeight","lines","majorTexts","minorTexts","lineTop","showMinorLabels","showMajorLabels","maxMinorChars","parentChanged","_calculateCharSize","minorLabelHeight","minorCharHeight","majorLabelHeight","majorCharHeight","minorLineHeight","minorLineWidth","majorLineHeight","majorLineWidth","foregroundNextSibling","nextSibling","backgroundNextSibling","_repaintLabels","timeLabelsize","minorCharWidth","xNext","nextIsMajor","prevWidth","labelMinor","xFirstMajorLabel","MAX","showMinorGrid","_repaintMinorText","_repaintMajorText","_repaintMajorLine","_repaintMinorLine","warnedForOverflow","leftTime","leftText","widthText","majorCharWidth","pop","createTextNode","childNodes","nodeValue","measureCharMinor","measureCharMajor","overlay","_onTapOverlay","onClick","_hasParent","deactivate","escListener","activate","display","unbind","_exportFunctions","_bound","keydown","keyup","_keys","fromCharCode","down","handleEvent","up","keyCode","bound","bindAll","getKey","newBindings","eventParams","drag","warned","substring","showCurrentTime","currentTimeTimer","_interopRequireDefault","__esModule","default","_classCallCheck","instance","Constructor","defineProperty","_createClass","defineProperties","descriptor","enumerable","configurable","writable","protoProps","staticProps","_ColorPicker","_ColorPicker2","parentModule","defaultContainer","pixelRatio","changedOptions","allowCreation","initialized","popupCounter","showButton","moduleOptions","domElements","popupDiv","popupLimit","popupHistory","colorPicker","_removePopup","_clean","_handleObject","_makeItem","_makeHeader","generateButton","_printOptions","onmouseover","onmouseout","optionsContainer","_push","_showPopupIfNeeded","path","_arguments","_this2","_len","_key","_ret2","div","objectLabel","selectedValue","_update","_makeLabel","err","popupString","popupValue","oninput","_setupPopup","_this3","html","hideTimeout","deleteTimeout","_this4","correspondingElement","checkbox","checked","_this5","defaultColor","_showColorPicker","_this6","insertTo","setColor","setUpdateCallback","colorString","setCloseCallback","checkOnly","visibleInSet","subObj","newPath","_getValue","_handleArray","_makeTextInput","_makeCheckbox","draw","physics","solver","enabledPath","enabledValue","error","_makeColorField","_makeDropdown","_makeRange","_constructOptions","optionsObj","getOptions","ColorPicker","generated","centerCoordinates","hueCircle","initialColor","previousColor","applied","updateCallback","closeCallback","_bindHammer","_setSize","htmlColors","black","navy","darkblue","mediumblue","darkgreen","teal","darkcyan","deepskyblue","darkturquoise","mediumspringgreen","lime","springgreen","aqua","cyan","midnightblue","dodgerblue","lightseagreen","forestgreen","seagreen","darkslategray","limegreen","mediumseagreen","turquoise","royalblue","steelblue","darkslateblue","mediumturquoise","indigo","darkolivegreen","cadetblue","cornflowerblue","mediumaquamarine","dimgray","slateblue","olivedrab","slategray","lightslategray","mediumslateblue","lawngreen","chartreuse","aquamarine","maroon","purple","olive","gray","skyblue","lightskyblue","blueviolet","darkred","darkmagenta","saddlebrown","darkseagreen","lightgreen","mediumpurple","darkviolet","palegreen","darkorchid","yellowgreen","sienna","brown","darkgray","lightblue","greenyellow","paleturquoise","lightsteelblue","powderblue","firebrick","darkgoldenrod","mediumorchid","rosybrown","darkkhaki","silver","mediumvioletred","indianred","peru","chocolate","tan","lightgrey","palevioletred","thistle","orchid","goldenrod","crimson","gainsboro","plum","burlywood","lightcyan","lavender","darksalmon","violet","palegoldenrod","lightcoral","khaki","aliceblue","honeydew","azure","sandybrown","wheat","beige","whitesmoke","mintcream","ghostwhite","salmon","antiquewhite","linen","lightgoldenrodyellow","oldlace","fuchsia","magenta","deeppink","orangered","tomato","hotpink","coral","darkorange","lightsalmon","orange","lightpink","pink","gold","peachpuff","navajowhite","moccasin","bisque","mistyrose","blanchedalmond","papayawhip","lavenderblush","seashell","cornsilk","lemonchiffon","floralwhite","snow","yellow","lightyellow","ivory","white","setInitial","htmlColor","_isColorString","rgbaArray","rgbObj","alpha","_setColor","_generateHueCircle","storePrevious","_hide","_updatePicker","alert","angleConvert","colorPickerSelector","colorPickerCanvas","pixelRation","devicePixelRatio","webkitBackingStorePixelRatio","mozBackingStorePixelRatio","msBackingStorePixelRatio","oBackingStorePixelRatio","backingStorePixelRatio","setTransform","putImageData","circle","brightnessRange","opacityRange","initialColorDiv","newColorDiv","colorPickerDiv","opacityDiv","brightnessDiv","arrowDiv","_setOpacity","_setBrightness","brightnessLabel","opacityLabel","cancelButton","applyButton","_apply","saveButton","_save","loadButton","_loadLast","pinch","_moveSelector","sat","hfac","sfac","fillRect","getImageData","centerY","centerX","newLeft","referenceOptions","subObject","usedOptions","check","__any__","getSuggestion","__type__","checkFields","referenceOption","refOptionObj","optionType","refOptionType","print","printLocation","localSearch","findInOptions","globalSearch","localSearchThreshold","globalSearchThreshold","indexMatch","closestMatch","recursive","closestMatchPath","lowerCaseOption","op","levenshteinDistance","matrix","boolean","any","function","null","groupsDraggable","linegraph","initialLoad","getLegend","isGroupVisible","yAxisLeft","yAxisRight","legendLeft","legendRight","screenToValue","yAxisOrientation","defaultGroup","sampling","graphHeight","shaded","barChart","sideBySide","interpolation","parametrization","dataAxis","legend","abortedGraphUpdate","updateSVGheight","updateSVGheightOnResize","forceGraphUpdate","lastStart","svgElements","groupsUsingDefaultStyles","svg","framework","Bars","Lines","Points","_removeGroup","_updateAllGroupData","removeGroup","_updateGroup","addGroup","groupsContent","groupCounts","extended","orginalY","_updateGraph","rangePerPixelInv","_getSortedGroupIds","grouplist","zIndex","bz","groupRanges","changeCalled","minDate","maxDate","_getRelevantData","_applySampling","_convertXcoordinates","_getYRanges","_updateYAxis","below","excludeFromStacking","_stack","_convertYcoordinates","calcPath","subGroupId","drawShading","subData","subPrevPoint","subNextPoint","dateComparator","first","dataContainer","increment","amountOfPoints","xDistance","pointsPerPixel","sampledData","combinedDataLeft","combinedDataRight","getYRange","getStackedYRange","minVal","maxVal","yAxisLeftUsed","yAxisRightUsed","minLeft","minRight","maxLeft","maxRight","ignore","_toggleAxisVisiblity","drawIcons","master","masterAxis","lineOffset","tempGroups","axisUsed","datapoints","screen_x","screen_y","svgHeight","convertValue","setZeroPosition","linegraphOptions","icons","majorLinesOffset","minorLinesOffset","labelOffsetX","labelOffsetY","iconWidth","alignZeros","linegraphSVG","DOMelements","labels","conversionFactor","minWidth","stepPixels","zeroCrossing","amountOfSteps","iconsRemoved","amountOfGroups","lineContainer","graphOptions","_redrawGroupIcons","iconHeight","iconOffset","groupArray","_cleanupIcons","activeGroups","_redrawLabels","_redrawTitle","customRange","autoScaleEnd","autoScaleStart","followScale","maxLabelSize","getLines","major","_redrawLabel","_redrawLine","titleWidth","titleCharHeight","characterHeight","largestWidth","textMinor","textMajor","textTitle","measureCharTitle","titleCharWidth","zeroAlign","formattingFunction","majorSteps","minorSteps","customLines","minorStepIdx","magnitudefactor","determineScale","rounded","setCharHeight","setHeight","minimumStepValue","orderOfMagnitude","solutionFound","stepSize","is_major","getFirstMajor","majorStep","formatValue","bottomOffset","oldStepIdx","oldStart","oldEnd","increaseMagnitude","decreaseMagnitude","otherZero","otherStep","newRange","myOriginalZero","majorOffset","zeroOffset","pixels","usingDefaultStyle","zeroPosition","drawIcon","icon","Bargraph","fillHeight","outline","barWidth","originalWidth","bar1Height","bar2Height","processedGroupData","coreDistance","drawData","combinedData","intersections","barPoints","_getDataIntersections","heightOffset","_getSafeDrawData","amount","resolved","accumulatedNegative","accumulatedPositive","pointData","groupLabel","_getStackedYRange","xpos","getGroupTemplate","callbackResult","getCallback","Line","_catmullRom","_linear","fillPath","pathArray","subPathArray","dFill","zero","serializePath","inverse","_catmullRomUniform","p0","bp1","bp2","normalization","d1","d2","d3","A","N","d3powA","d2powA","d3pow2A","d2pow2A","d1pow2A","d1powA","side","iconSize","iconSpacing","excludeFromLegend","textArea","scrollableHeight","drawLegendIcons","paddingTop","nodes","nodeIndices","edges","edgeIndices","eventListeners","onTap","onDoubleTap","onHold","onDragStart","onDrag","onDragEnd","onPinch","onMouseMove","onContext","functions","createNode","createEdge","view","bindEventListeners","images","_modulesGroups2","_modulesCanvas2","selectionHandler","_modulesSelectionHandler2","interactionHandler","_modulesInteractionHandler2","_modulesView2","renderer","_modulesCanvasRenderer2","_modulesPhysicsEngine2","layoutEngine","_modulesLayoutEngine2","clustering","_modulesClustering2","manipulation","_modulesManipulationSystem2","nodesHandler","_modulesNodesHandler2","edgesHandler","_modulesEdgesHandler2","_modulesKamadaKawaiJs2","_modulesGroups","_modulesNodesHandler","_modulesEdgesHandler","_modulesPhysicsEngine","_modulesClustering","_modulesCanvasRenderer","_modulesCanvas","_modulesView","_modulesInteractionHandler","_modulesSelectionHandler","_modulesLayoutEngine","_modulesManipulationSystem","_sharedConfigurator","_sharedConfigurator2","_sharedValidator","_sharedValidator2","_optionsJs","_modulesKamadaKawaiJs","layout","interaction","networkOptions","_updateVisibleIndices","nodeId","edgeId","_updateValueRange","unselectAll","dotData","gephi","gephiData","valueTotal","setValueRange","canvasToDOM","DOMtoCanvas","findNode","isCluster","openCluster","cluster","getNodesInCluster","clusterByConnection","clusterByHubsize","clusterOutliers","getSeed","enableEditMode","disableEditMode","addNodeMode","editNode","editNodeMode","addEdgeMode","editEdgeMode","deleteSelected","getPositions","storePositions","moveNode","getBoundingBox","getConnectedNodes","objectId","getConnectedEdges","startSimulation","stopSimulation","stabilize","getSelectedNodes","getSelectedEdges","getNodeAt","getEdgeAt","edge","selectNodes","selectEdges","getViewPosition","releaseNode","getOptionsFromConfigurator","Groups","defaultIndex","groupsArray","defaultGroups","useDefaultGroups","optionFields","groupName","groupname","_componentsNode","_componentsNode2","_componentsSharedLabel","_componentsSharedLabel2","NodesHandler","nodesListeners","borderWidthSelected","brokenImage","fixed","face","strokeColor","image","labelHighlightBold","level","mass","scaling","maxVisible","drawThreshold","customScalingFunction","shadow","shape","shapeProperties","borderDashes","useImageSize","useBorderWithImage","parseOptions","updateShape","updateLabelModule","_reset","doNotEmit","oldNodesData","newNodes","positionInitially","changedData","dataChanged","constructorClass","clearPositions","dataArray","boundingBox","nodeList","nodeObj","toId","fromId","edgeList","_sharedLabel","_sharedLabel2","_nodesShapesBox","_nodesShapesBox2","_nodesShapesCircle","_nodesShapesCircle2","_nodesShapesCircularImage","_nodesShapesCircularImage2","_nodesShapesDatabase","_nodesShapesDatabase2","_nodesShapesDiamond","_nodesShapesDiamond2","_nodesShapesDot","_nodesShapesDot2","_nodesShapesEllipse","_nodesShapesEllipse2","_nodesShapesIcon","_nodesShapesIcon2","_nodesShapesImage","_nodesShapesImage2","_nodesShapesSquare","_nodesShapesSquare2","_nodesShapesStar","_nodesShapesStar2","_nodesShapesText","_nodesShapesText2","_nodesShapesTriangle","_nodesShapesTriangle2","_nodesShapesTriangleDown","_nodesShapesTriangleDown2","Node","imagelist","baseSize","baseFontSize","predefinedPosition","labelModule","currentShape","groupObj","imageObj","load","distanceToBorder","sizeDiff","fontDiff","updateBoundingBox","resize","parentOptions","newOptions","parsedColor","_slicedToArray","sliceIterator","_arr","_n","_e","_s","Symbol","Label","pointToSelf","fontOptions","yLine","nodeOptions","labelDirty","baseline","viewFontSize","calculateLabelSize","_drawBackground","_drawText","lineMargin","fontSize","_getColor2","_getColor","_getColor22","fontColor","_setAlignment2","_setAlignment","_setAlignment22","lineCount","strokeText","_processLabel","measureText","newOptionsArray","_inherits","subClass","superClass","setPrototypeOf","__proto__","_get","_x","_x2","_x3","_again","receiver","desc","getOwnPropertyDescriptor","getPrototypeOf","_utilNodeBase","_utilNodeBase2","Box","_NodeBase","textSize","getTextSize","selectionLineWidth","roundRect","enableShadow","disableShadow","save","enableBorderDashes","disableBorderDashes","restore","NodeBase","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","setLineDash","dashes","_utilCircleImageBase","_utilCircleImageBase2","Circle","_CircleImageBase","diameter","_drawRawCircle","CircleImageBase","labelOffset","imageLoaded","ratio","neutralborderWidth","globalAlpha","can2","ctx2","drawImage","iterations","labelDimensions","CircularImage","_swapToImageResizeWhenImageLoaded","_resizeImage","clip","_drawImageAtPosition","_drawImageLabel","Database","database","_distanceToBorder","_utilShapeBase","_utilShapeBase2","Diamond","_ShapeBase","_resizeShape","_drawShape","ShapeBase","sizeMultiplier","Dot","Ellipse","ellipse","Icon","_icon","iconTextSpacing","Image","Square","Star","Text","Triangle","TriangleDown","_componentsEdge","_componentsEdge2","EdgesHandler","edgesListeners","arrows","scaleFactor","arrowStrikethrough","hoverWidth","selectionWidth","selfReferenceSize","smooth","forceDirection","roundness","emitChange","edgeData","edgeOptions","reconnectEdges","markAllEdgesAsDirty","updateEdgeType","oldEdgesData","edgesData","oldEdge","disconnect","showInternalIds","connect","cleanup","edgeType","colorDirty","_edgesCubicBezierEdge","_edgesCubicBezierEdge2","_edgesBezierEdgeDynamic","_edgesBezierEdgeDynamic2","_edgesBezierEdgeStatic","_edgesBezierEdgeStatic2","_edgesStraightEdge","_edgesStraightEdge2","Edge","baseWidth","connected","_setInteractionWidths","changeInType","attachEdge","detachEdge","widthDiff","viaNode","getViaNode","arrowData","fromPoint","toPoint","getArrowData","core","drawLine","drawArrows","drawLabel","drawArrowHead","node1","node2","getPoint","translate","_rotateForLabelAlignment","_pointOnCircle","xFrom","yFrom","xTo","yTo","xObj","yObj","getDistanceToEdge","angleInDegrees","rotate","percentage","colorsDefined","_x4","_x5","_utilCubicBezierEdgeBase","_utilCubicBezierEdgeBase2","CubicBezierEdge","_CubicBezierEdgeBase","viaNodes","via1","via2","bezierCurveTo","x1","y1","x2","y2","_getViaCoordinates","nearNode","_findBorderPositionBezier","x3","y3","_ref","_ref2","_getDistanceToBezierEdge","_ref3","_ref32","vec","_BezierEdgeBase2","_BezierEdgeBase3","CubicBezierEdgeBase","_BezierEdgeBase","minDistance","lastX","lastY","_getDistanceToLine","_EdgeBase2","_EdgeBase3","BezierEdgeBase","_EdgeBase","distanceToPoint","difference","via","EdgeBase","getColor","getLineWidth","_drawDashedLine","_drawLine","_line","_getCircleData2","_getCircleData","_getCircleData22","_circle","pattern","lineDashOffset","_getCircleData3","_getCircleData32","dashedLine","_getCircleData4","_getCircleData42","_findBorderPosition","_findBorderPositionCircle","_getCircleData5","_getCircleData52","colorOptions","grd","createLinearGradient","fromColor","toColor","addColorStop","_getDistanceToEdge","_getCircleData6","_getCircleData62","px","py","something","u","arrowPoint","guideOffset","findBorderPosition","guidePos","_getCircleData7","_getCircleData72","xi","yi","arrowCore","arrow","_utilBezierEdgeBase","_utilBezierEdgeBase2","BezierEdgeDynamic","_boundFunction","positionBezierNode","physicsChange","setupSupportNode","parentEdgeId","quadraticCurveTo","_x6","BezierEdgeStatic","xVia","yVia","pi","originalAngle","myAngle","_utilEdgeBase","_utilEdgeBase2","StraightEdge","edgeSegmentLength","toBorderDist","toBorderPoint","borderPos","_componentsPhysicsBarnesHutSolver","_componentsPhysicsBarnesHutSolver2","_componentsPhysicsRepulsionSolver","_componentsPhysicsRepulsionSolver2","_componentsPhysicsHierarchicalRepulsionSolver","_componentsPhysicsHierarchicalRepulsionSolver2","_componentsPhysicsSpringSolver","_componentsPhysicsSpringSolver2","_componentsPhysicsHierarchicalSpringSolver","_componentsPhysicsHierarchicalSpringSolver2","_componentsPhysicsCentralGravitySolver","_componentsPhysicsCentralGravitySolver2","_componentsPhysicsFA2BasedRepulsionSolver","_componentsPhysicsFA2BasedRepulsionSolver2","_componentsPhysicsFA2BasedCentralGravitySolver","_componentsPhysicsFA2BasedCentralGravitySolver2","PhysicsEngine","physicsBody","physicsNodeIndices","physicsEdgeIndices","forces","velocities","physicsEnabled","simulationInterval","requiresTimeout","previousStates","referenceState","freezeCache","renderTimer","adaptiveTimestep","adaptiveTimestepEnabled","adaptiveCounter","adaptiveInterval","stabilized","startedStabilization","stabilizationIterations","ready","barnesHut","theta","gravitationalConstant","centralGravity","springLength","springConstant","damping","avoidOverlap","forceAtlas2Based","repulsion","nodeDistance","hierarchicalRepulsion","maxVelocity","minVelocity","stabilization","updateInterval","onlyDynamicEdges","timestep","layoutFailed","initPhysics","updatePhysicsData","nodesSolver","edgesSolver","gravitySolver","modelOptions","viewFunction","simulationStep","_emitStabilized","startTime","physicsTick","physicsTime","runDoubleSpeed","amountOfIterations","calculateForces","moveNodes","revert","_evaluateStepQuality","nodeIds","positions","vx","vy","dpos","reference","maxNodeVelocity","averageNodeVelocity","velocityAdaptiveThreshold","nodeVelocity","_performStep","totalVelocity","solve","targetIterations","_freezeNodes","_stabilizationBatch","_finalizeStabilization","_restoreFrozenNodes","colorFactor","forceSize","arrowSize","BarnesHutSolver","barnesHutTree","randomSeed","thetaInversed","overlapAvoidanceFactor","nodeCount","_formBarnesHutTree","_getForceContribution","NW","NE","SW","SE","parentBranch","childrenCount","centerOfMass","calcSize","_calculateForces","gravityForce","fx","fy","minX","minY","maxX","maxY","minimumTreeSize","rootSize","halfRootSize","_splitBranch","_placeInTree","totalMass","totalMassInv","biggestSize","skipMassUpdate","_updateBranchMass","_placeInRegion","region","seededRandom","containedNode","_insertRegion","childSize","_drawBranch","branch","RepulsionSolver","repulsingForce","HierarchicalRepulsionSolver","steepness","SpringSolver","edgeLength","node3","_calculateSpringForce","springForce","HierarchicalSpringSolver","springFx","springFy","totalFx","totalFy","correctionFx","correctionFy","CentralGravitySolver","_BarnesHutSolver2","_BarnesHutSolver3","ForceAtlas2BasedRepulsionSolver","_BarnesHutSolver","degree","_CentralGravitySolver2","_CentralGravitySolver3","ForceAtlas2BasedCentralGravitySolver","_CentralGravitySolver","_NetworkUtil","_NetworkUtil2","_componentsNodesCluster","_componentsNodesCluster2","ClusterEngine","clusteredNodes","clusteredEdges","hubsize","_getHubSize","_checkOptions","nodesToCluster","refreshData","joinCondition","childNodesObj","childEdgesObj","clonedOptions","cloneOptions","_cluster","edgeCount","clusters","usedNodes","relevantEdgeCount","gatheringSuccessful","childNodeId","_getConnectedId","clusterByEdgeCount","clusterNodeProperties","parentNodeId","parentClonedOptions","childClonedOptions","clusterEdgeProperties","childNode","otherNodeId","childKeys","createEdges","_edge","newEdge","clusteringEdgeReplacingId","_backupEdgeOptions","processProperties","childNodesOptions","childEdgesOptions","clusterId","_getClusterPosition","clusterNode","containedNodes","containedEdges","_createClusterEdges","originalOptions","clusterNodeId","releaseFunction","clusterPosition","newPositions","edgesToBeDeleted","otherCluster","transferEdge","replacedEdge","_restoreEdge","nodesArray","reverse","average","averageSquared","hubCounter","largestHub","variance","standardDeviation","hubThreshold","NetworkUtil","allNodes","specificNodes","amountOfConnections","_Node2","_Node3","Cluster","_Node","requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","msRequestAnimationFrame","CanvasRenderer","redrawRequested","renderingActive","renderRequests","allowRedraw","hideEdgesOnDrag","hideNodesOnDrag","_determineBrowserMethod","_resizeNodes","_requestRedraw","_startRendering","cancelAnimationFrame","_renderStep","_drawEdges","_drawNodes","alwaysShow","topLeft","bottomRight","viewableArea","isSelected","isBoundingBoxOverlappingWith","browserType","Canvas","resizeTimer","resizeFunction","cameraState","hammerFrame","_cleanUp","previousWidth","previousHeight","widthRatio","heightRatio","newScale","currentViewCenter","distanceFromCenter","tabIndex","_prepareValue","emitEvent","oldWidth","oldHeight","previousRatio","_getCameraState","_setCameraState","_XconvertCanvasToDOM","_YconvertCanvasToDOM","_XconvertDOMtoCanvas","_YconvertDOMtoCanvas","View","animationSpeed","renderRefreshRate","animationEasingFunction","easingTime","sourceScale","targetScale","sourceTranslation","targetTranslation","lockedOnNodeId","lockedOnNodeOffset","touchTime","initialZoom","zoomLevel","positionDefined","numberOfNodes","yDistance","xZoomLevel","yZoomLevel","findCenter","animationOptions","nodePosition","lockedOnNode","animateView","locked","_transitionRedraw","viewCenter","_lockedRedraw","finished","_componentsNavigationHandler","_componentsNavigationHandler2","_componentsPopup","_componentsPopup2","InteractionHandler","navigationHandler","popup","popupObj","popupTimer","dragNodes","dragView","keyboard","speed","bindToWindow","navigationButtons","tooltipDelay","zoomView","pinched","checkSelectionChanges","_generateClickEvent","previouslySelectedEdgeCount","_getSelectedEdgeCount","previouslySelectedNodeCount","_getSelectedNodeCount","previousSelection","selectAdditionalOnPoint","selectOnPoint","selectedEdgesCount","selectedNodesCount","currentSelection","_determineIfDifferent2","_determineIfDifferent","nodesChanged","edgesChanged","nodeSelected","selectObject","selectionObj","xFixed","yFixed","scaleOld","preScaleDragPointer","scaleFrac","tx","ty","postScaleDragPointer","popupVisible","_checkHidePopup","setPosition","_checkShowPopup","hoverObject","pointerObj","previousPopupObjId","nodeUnderCursor","popupType","overlappingNodes","isOverlappingWith","getTitle","overlappingEdges","popupTargetType","popupTargetId","setText","_pointerToPositionObject","stillOnObj","overNode","NavigationHandler","iconsCreated","navigationHammers","boundFunctions","activated","configureKeyboardBindings","loadNavigationElements","cleanNavigation","navigationDOM","navigationDivs","navigationDivActions","_fit","bindToRedraw","_stopMovement","boundAction","unbindFromRedraw","Popup","doShow","SelectionHandler","hoverObj","selectConnectedEdges","hoverConnectedEdges","updateSelection","selectionChanged","deselectObject","emptySelection","DOM","highlightEdges","_selectConnectedEdges","_addToSelection","_removeFromSelection","canvasPos","returnNode","positionObject","_getAllNodesOverlappingWith","_getEdgesOverlappingWith","returnEdge","_getAllEdgesOverlappingWith","_unselectConnectedEdges","clusterSize","_addToHover","hoverChanged","blurObject","_hoverConnectedEdges","edgeIds","idArray","RangeError","LayoutEngine","initialRandomSeed","setPhysics","optionsBackup","improvedLayout","hierarchical","levelSeparation","nodeSpacing","treeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","setupHierarchicalLayout","layoutNetwork","prevHierarchicalState","adaptAllOptionsForHierarchicalLayout","MAX_LEVELS","clusterThreshold","startLength","before","clusterBridges","after","_declusterAll","info","kamadaKawai","_shiftToCenter","getRangeCore","clustersPresent","definedLevel","definedPositions","undefinedLevel","hierarchicalLevels","lastNodeOnLevel","hierarchicalChildrenReference","hierarchicalParentReference","hierarchicalTrees","treeIndex","distributionOrdering","distributionIndex","distributionOrderingPresence","_determineLevelsByHubsize","_determineLevelsDirected","_determineLevelsCustomCallback","distribution","_getDistribution","_generateMap","_placeNodesByHierarchy","_condenseHierarchy","stillShifting","branches","shiftTrees","treeSizes","getTreeSizes","shiftTree","_getPositionForHierarchy","_setPositionForHierarchy","getTreeSize","treeWidths","getBranchNodes","getBranchBoundary","branchMap","maxLevel","minSpace","maxSpace","branchNode","_getSpaceAroundNode2","_getSpaceAroundNode","_getSpaceAroundNode22","minSpaceNode","maxSpaceNode","getMaxLevel","getCollisionLevel","maxLevel1","maxLevel2","hasSameParent","parents1","parents2","shiftElementsCloser","levels","centerParents","levelNodes","branchShiftCallback","centerParent","diffAbs","branchNodes1","branchNodes2","_getBranchBoundary","_getBranchBoundary2","max1","_getBranchBoundary3","_getBranchBoundary32","min2","minSpace2","diffBranch","_shiftBlock","_centerParent","minimizeEdgeLength","allEdges","nodeLevel","C2","referenceNodes","aboveEdges","otherNode","getFx","getDFx","getGuess","guess","guessMap","dfx","moveBranch","branchNodes","_getBranchBoundary4","_getBranchBoundary42","minSpaceBranch","maxSpaceBranch","branchOffset","_getSpaceAroundNode3","_getSpaceAroundNode32","newPosition","minimizeEdgeLengthBottomUp","shiftBranchesCloserBottomUp","centerAllParents","centerAllParentsBottomUp","useMap","prevNode","prevPos","nextNode","nextPos","parents","parentId","minPos","maxPos","_getSpaceAroundNode4","_getSpaceAroundNode42","positionedNodes","nodeArray","_indexArrayToNodes","_sortNodeArray","handledNodeCount","_validataPositionAndContinue","parentLevel","childNodeLevel","previousPos","sharedParent","_findCommonParent","withChild","_placeBranchNodes","hubSize","levelDownstream","nodeA","nodeB","_crawlNetwork","minLevel","customCallback","levelByDirection","levelA","_setMinLevelToZero","fillInRelations","startingNodeId","_this7","crawler","tree","childA","childB","_this8","iterateParents","_parent","findParent","_parent2","foundParent","doNotUpdate","ManipulationSystem","editMode","manipulationDiv","editModeDiv","closeDiv","manipulationHammers","temporaryUIFunctions","temporaryEventFunctions","temporaryIds","guiEnabled","inMode","selectedControlNode","initiallyActive","addNode","addEdge","editEdge","deleteNode","deleteEdge","controlNodeStyle","_restore","_setup","showManipulatorToolbar","_createEditButton","manipulationDOM","selectedNodeCount","selectedEdgeCount","selectedTotalCount","needSeperator","_createAddNodeButton","_createSeperator","_createAddEdgeButton","_createEditNodeButton","_createEditEdgeButton","_createDeleteButton","_bindHammerToDiv","toggleEditMode","_temporaryBindEvent","_createBackButton","_createDescription","_performAddNode","_getSelectedNode","finalizedData","_temporaryBindUI","_handleConnect","_finishConnect","_dragControlNode","edgeBeingEditedId","controlNodeFrom","_getNewTargetNode","controlNodeTo","_controlNodeTouch","_controlNodeDragStart","_controlNodeDrag","_controlNodeDragEnd","findBorderPositions","selectedNodes","selectedEdges","deleteFunction","_createWrappers","_removeManipulationDOM","_createButton","_cleanManipulatorHammers","_cleanupTemporaryNodesAndEdges","_unbindTemporaryUIs","_unbindTemporaryEvents","labelClassName","newFunction","boundFunction","UIfunctionName","functionName","eventName","domElement","indexTempEdge","indexTempNode","lastTouch","fromSelect","toSelect","overlappingNodeIds","_performEditEdge","targetNode","connectionEdge","connectFromId","_performAddEdge","clickData","defaultData","sourceNodeId","targetNodeId","_componentsAlgorithmsFloydWarshallJs","_componentsAlgorithmsFloydWarshallJs2","KamadaKawai","edgeStrength","distanceSolver","edgesArray","ignoreClusters","D_matrix","getDistances","_createL_matrix","_createK_matrix","innerThreshold","maxInnerIterations","maxEnergy","highE_nodeId","dE_dx","dE_dy","delta_m","subIterations","_getHighestEnergyNode2","_getHighestEnergyNode","_getHighestEnergyNode22","_moveNode","_getEnergy2","_getEnergy","_getEnergy22","maxEnergyNodeId","dE_dx_max","dE_dy_max","nodeIdx","_getEnergy3","_getEnergy32","x_m","y_m","iIdx","x_i","y_i","denominator","K_matrix","L_matrix","d2E_dx2","d2E_dxdy","d2E_dy2","FloydWarshall","CanvasRenderingContext2D","square","s2","ir","triangleDown","star","diamond","r2d","kappa","ox","oy","xe","ye","xm","ym","wEllipse","hEllipse","ymb","yeb","xt","yt","xl","yl","xr","yr","patternLength","slope","distRemaining","patternIndex","dashLength","parseDOT","parseGraph","nextPreview","isAlphaNumeric","regexAlphaNumeric","setValue","graphs","attr","getToken","tokenType","TOKENTYPE","NULL","isComment","DELIMITER","c2","DELIMITERS","IDENTIFIER","newSyntaxError","UNKNOWN","chop","parseStatements","parseStatement","subgraph","parseSubgraph","parseEdge","parseAttributeStatement","parseNodeStatement","subgraphs","parseAttributeList","maxLength","forEach2","elem1","elem2","setProp","convertAttr","mapping","visProp","visPropI","graphData","dotNode","graphNode","NODE_ATTR_MAPPING","convertEdge","dotEdge","graphEdge","EDGE_ATTR_MAPPING","subEdge","fontsize","fontcolor","labelfontcolor","fontname","fillcolor","labeltooltip","{","}","[","]",";","=",",","->","--","gephiJSON","inheritColor","gEdges","gNodes","gEdge","gNode","imageBroken","url","imageToCache","brokenUrl","imageToLoadBrokenUrlOn","onerror","_addImageToCache","imageToRedrawWith","cachedImage","img","onload","_redrawWithImage","_tryloadBrokenUrl","edit","del","back","addDescription","edgeDescription","editEdgeDescription","createEdgeError","deleteClusterError","editClusterError"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyBA,cAEA,SAA2CA,EAAMC,GAC1B,gBAAZC,UAA0C,gBAAXC,QACxCA,OAAOD,QAAUD,IACQ,kBAAXG,SAAyBA,OAAOC,IAC9CD,UAAWH,GACe,gBAAZC,SACdA,QAAa,IAAID,IAEjBD,EAAU,IAAIC,KACbK,KAAM,WACT,MAAgB,UAAUC,GAKhB,QAASC,GAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUP,OAGnC,IAAIC,GAASO,EAAiBD,IAC7BP,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BC,oBAAqB,kFACrBC,gBAAiB,wCACjBC,mBAAoB,0CACpBC,iBAAkB,0CAEpBzvI,EAAe,MAAIA,EAAY,GAC/BA,EAAe,MAAIA,EAAY","file":"vis.map"} \ No newline at end of file +{"version":3,"sources":["vis.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","util","DOMutil","DataSet","DataView","Queue","Graph3d","graph3d","Camera","Filter","Point2d","Point3d","Slider","StepNumber","Timeline","Graph2d","timeline","Core","DateUtil","Range","stack","TimeStep","components","items","Item","BackgroundItem","BoxItem","PointItem","RangeItem","BackgroundGroup","Component","CurrentTime","CustomTime","DataAxis","DataScale","GraphGroup","Group","ItemSet","Legend","LineGraph","TimeAxis","Network","network","Images","dotparser","gephiParser","allOptions","convertDot","input","DOTToGraph","convertGephi","options","parseGephi","moment","Hammer","keycharm","_typeof","Symbol","iterator","obj","constructor","uuid","isNumber","object","Number","recursiveDOMDelete","DOMobject","hasChildNodes","firstChild","removeChild","giveRange","min","max","total","value","scale","Math","isString","String","isDate","Date","match","ASPDateRegex","exec","isNaN","parse","randomUUID","v4","assignAllKeys","prop","hasOwnProperty","fillIfDefined","a","b","allowDeletion","arguments","length","undefined","protoExtend","i","other","extend","selectiveExtend","props","Array","isArray","Error","selectiveDeepExtend","TypeError","Object","deepExtend","selectiveNotDeepExtend","indexOf","push","equalArray","len","convert","type","Boolean","valueOf","isMoment","toDate","getType","toISOString","copyAndExtendArray","arr","newValue","newArr","copyArray","getAbsoluteLeft","elem","getBoundingClientRect","left","getAbsoluteTop","top","addClassName","className","classes","split","join","removeClassName","index","splice","forEach","callback","toArray","array","updateProperty","key","throttle","fn","wait","timeout","needExecution","throttled","setTimeout","addEventListener","element","action","listener","useCapture","navigator","userAgent","attachEvent","removeEventListener","detachEvent","preventDefault","event","window","returnValue","getTarget","target","srcElement","nodeType","parentNode","hasParent","parent","e","option","asBoolean","defaultValue","asNumber","asString","asSize","asElement","hexToRGB","hex","shorthandRegex","replace","r","g","result","parseInt","overrideOpacity","color","opacity","rgb","substr","RGBToHex","red","green","blue","toString","slice","parseColor","isValidRGB","map","isValidHex","hsv","hexToHSV","lighterColorHSV","h","s","v","darkerColorHSV","darkerColorHex","HSVToHex","lighterColorHex","background","border","highlight","hover","RGBToHSV","minRGB","maxRGB","d","hue","saturation","cssUtil","cssText","styles","style","trim","parts","keys","addCssText","currentStyles","newStyles","removeCssText","removeStyles","HSVToRGB","floor","f","q","t","isOk","test","isValidRGBA","rgba","selectiveBridgeObject","fields","referenceObject","objectTo","create","bridgeObject","insertSort","compare","k","j","mergeOptions","mergeTarget","globalOptions","enabled","binarySearchCustom","orderedItems","comparator","field","field2","maxIterations","iteration","low","high","middle","item","searchResult","binarySearchValue","sidePreference","prevValue","nextValue","easingFunctions","linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","global","utils_hooks__hooks","hookCallback","apply","setHookCallback","prototype","res","hasOwnProp","create_utc__createUTC","format","locale","strict","createLocalOrUTC","utc","defaultParsingFlags","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidMonth","invalidFormat","userInvalidated","iso","getParsingFlags","_pf","valid__isValid","_isValid","flags","_d","getTime","invalidWeekday","_strict","bigHour","valid__createInvalid","NaN","isUndefined","copyConfig","to","from","val","_isAMomentObject","_i","_f","_l","_tzm","_isUTC","_offset","_locale","momentProperties","Moment","config","updateInProgress","updateOffset","absFloor","number","ceil","toInt","argumentForCoercion","coercedNumber","isFinite","compareArrays","array1","array2","dontConvert","lengthDiff","abs","diffs","warn","msg","suppressDeprecationWarnings","console","deprecate","firstTime","deprecateSimple","name","deprecations","isFunction","Function","isObject","locale_set__set","_config","_ordinalParseLenient","RegExp","_ordinalParse","source","mergeConfigs","parentConfig","childConfig","Locale","set","normalizeLocale","toLowerCase","chooseLocale","names","next","loadLocale","oldLocale","locales","globalLocale","_abbr","code","locale_locales__getSetGlobalLocale","values","data","locale_locales__getLocale","defineLocale","abbr","parentLocale","updateLocale","locale_locales__listLocales","addUnitAlias","unit","shorthand","lowerCase","aliases","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","makeGetSet","keepTime","get_set__set","get_set__get","mom","isValid","getSet","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","pow","addFormatToken","token","padded","ordinal","func","formatTokenFunctions","localeData","removeFormattingTokens","makeFormatFunction","formattingTokens","output","formatMoment","expandFormat","formatFunctions","invalidDate","replaceLongDateFormatTokens","longDateFormat","localFormattingTokens","lastIndex","addRegexToken","regex","strictRegex","regexes","isStrict","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","addParseToken","tokens","addWeekParseToken","_w","addTimeToArrayFromToken","_a","daysInMonth","year","month","UTC","getUTCDate","localeMonths","_months","MONTHS_IN_FORMAT","localeMonthsShort","_monthsShort","localeMonthsParse","monthName","_monthsParse","_longMonthsParse","_shortMonthsParse","months","monthsShort","setMonth","dayOfMonth","monthsParse","date","getSetMonth","getDaysInMonth","monthsShortRegex","_monthsParseExact","computeMonthsParse","_monthsShortStrictRegex","_monthsShortRegex","monthsRegex","_monthsStrictRegex","_monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","sort","checkOverflow","MONTH","DATE","YEAR","HOUR","MINUTE","SECOND","MILLISECOND","_overflowDayOfYear","_overflowWeeks","WEEK","_overflowWeekday","WEEKDAY","configFromISO","l","allowTime","dateFormat","timeFormat","tzFormat","string","extendedIsoRegex","basicIsoRegex","isoDates","isoTimes","tzRegex","configFromStringAndFormat","configFromString","aspNetJsonRegex","createFromInputFallback","createDate","y","M","ms","getFullYear","setFullYear","createUTCDate","getUTCFullYear","setUTCFullYear","daysInYear","isLeapYear","getIsLeapYear","firstWeekOffset","dow","doy","fwd","fwdlw","getUTCDay","dayOfYearFromWeeks","week","weekday","resYear","resDayOfYear","localWeekday","weekOffset","dayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","defaults","currentDateArray","nowValue","now","_useUTC","getUTCMonth","getMonth","getDate","configFromArray","currentDate","yearToUse","dayOfYearFromWeekInfo","_dayOfYear","_nextDay","setUTCMinutes","getUTCMinutes","w","weekYear","temp","weekdayOverflow","GG","W","E","local__createLocal","_week","gg","ISO_8601","parsedInput","skipped","stringLength","totalParsedInputLength","meridiemFixWrap","_meridiem","hour","meridiem","isPm","meridiemHour","isPM","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","score","configFromObject","day","minute","second","millisecond","createFromConfig","prepareConfig","add","preparse","configFromInput","isUTC","pickBy","moments","args","Duration","duration","years","quarters","quarter","weeks","days","hours","minutes","seconds","milliseconds","_milliseconds","_days","_data","_bubble","isDuration","offset","separator","utcOffset","offsetFromString","matcher","matches","chunk","chunkOffset","cloneWithOffset","model","diff","clone","setTime","local","getDateOffset","round","getTimezoneOffset","getSetOffset","keepLocalTime","localAdjust","matchShortOffset","_changeInProgress","add_subtract__addSubtract","create__createDuration","getSetZone","setOffsetToUTC","setOffsetToLocal","subtract","setOffsetToParsedOffset","matchOffset","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","_isDSTShifted","isLocal","isUtcOffset","isUtc","ret","diffRes","aspNetRegex","isoRegex","parseIso","momentsDifference","inp","parseFloat","positiveMomentsDifference","base","isAfter","isBefore","absRound","createAdder","direction","period","dur","tmp","isAdding","moment_calendar__calendar","time","formats","sod","startOf","calendar","localInput","endOf","isBetween","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","that","zoneDelta","delta","monthDiff","anchor2","adjust","wholeMonthDiff","anchor","moment_format__toISOString","inputString","defaultFormat","postformat","withoutSuffix","humanize","fromNow","toNow","newLocaleData","isoWeekday","to_type__valueOf","unix","toObject","toJSON","moment_valid__isValid","parsingFlags","invalidAt","creationData","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","isoWeek","getISOWeeksInYear","getWeeksInYear","weekInfo","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","localeWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","weekdaysParse","localeWeekdays","_weekdays","isFormat","localeWeekdaysShort","_weekdaysShort","localeWeekdaysMin","_weekdaysMin","localeWeekdaysParse","weekdayName","_weekdaysParse","_minWeekdaysParse","_shortWeekdaysParse","_fullWeekdaysParse","weekdays","weekdaysShort","weekdaysMin","getSetDayOfWeek","getDay","getSetLocaleDayOfWeek","getSetISODayOfWeek","getSetDayOfYear","hFormat","lowercase","matchMeridiem","_meridiemParse","localeIsPM","charAt","localeMeridiem","isLower","parseMs","getZoneAbbr","getZoneName","moment__createUnix","moment__createInZone","parseZone","locale_calendar__calendar","_calendar","_longDateFormat","formatUpper","toUpperCase","_invalidDate","_ordinal","preParsePostFormat","relative__relativeTime","isFuture","_relativeTime","pastFuture","lists__get","setter","list","count","out","lists__listMonths","lists__listMonthsShort","lists__listWeekdays","lists__listWeekdaysShort","lists__listWeekdaysMin","duration_abs__abs","mathAbs","duration_add_subtract__addSubtract","duration_add_subtract__add","duration_add_subtract__subtract","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","duration_as__valueOf","makeAs","alias","duration_get__get","makeGetter","substituteTimeAgo","relativeTime","duration_humanize__relativeTime","posNegDuration","thresholds","duration_humanize__getSetRelativeTimeThreshold","threshold","limit","withSuffix","iso_string__toISOString","iso_string__abs","Y","D","asSeconds","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchTimestamp","matchWord","defaultLocaleMonths","defaultLocaleMonthsShort","defaultMonthsShortRegex","defaultMonthsRegex","parseTwoDigitYear","getSetYear","prototypeMin","prototypeMax","add_subtract__add","add_subtract__subtract","lang","isoWeekYear","defaultLocaleWeek","getSetDayOfMonth","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","_isPm","pos","pos1","pos2","defaultLocaleMeridiemParse","getSetHour","getSetMinute","getSetSecond","getSetMillisecond","momentPrototype__proto","get","isoWeeks","isoWeeksInYear","isDST","isDSTShifted","zoneAbbr","zoneName","dates","zone","momentPrototype","defaultCalendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","defaultLongDateFormat","LTS","LT","L","LL","LLL","LLLL","defaultInvalidDate","defaultOrdinal","defaultOrdinalParse","defaultRelativeTime","future","past","mm","hh","dd","MM","yy","prototype__proto","firstDayOfYear","firstDayOfWeek","ordinalParse","langData","asMilliseconds","asMinutes","asHours","asDays","asWeeks","asMonths","asYears","duration_prototype__proto","toIsoString","version","invalid","relativeTimeThreshold","_moment","webpackPolyfill","paths","children","webpackContext","req","resolve","buf","ii","oct","_hexToByte","unparse","bth","_byteToHex","v1","clockseq","_clockseq","msecs","nsecs","_lastNSecs","dt","_lastMSecs","tl","tmh","node","_nodeId","n","rnds","random","rng","_rng","globalVar","crypto","getRandomValues","_rnds8","Uint8Array","_rnds","_seedBytes","prepareElements","JSONcontainer","elementType","redundant","used","cleanupElements","resetElements","getSVGElement","svgContainer","shift","document","createElementNS","appendChild","getDOMElement","DOMContainer","insertBefore","createElement","drawPoint","x","groupTemplate","labelObj","point","setAttributeNS","size","label","xOffset","yOffset","content","textContent","drawBar","width","height","rect","_options","_fieldId","fieldId","_type","_subscribers","setOptions","queue","_queue","destroy","on","subscribers","subscribe","off","filter","unsubscribe","_trigger","params","senderId","concat","subscriber","addedIds","me","_addItem","update","updatedIds","oldData","updatedData","addOrUpdate","oldItem","_updateItem","ids","firstType","returnType","allowedValues","itemIds","itemId","_getItem","order","_sort","_filterFields","resultant","getIds","getDataSet","mappedItems","filteredItem","itemFields","av","bv","remove","removedId","removedIds","_remove","clear","maxField","itemField","minField","distinct","fieldType","exists","types","raw","converted","JSON","stringify","delay","Infinity","_timeout","_extended","_flushIfNeeded","flush","methods","original","method","context","entry","clearTimeout","_ids","_onEvent","setData","refresh","oldIds","newIds","added","removed","viewOptions","getArguments","defaultFilter","dataSet","updated","container","SyntaxError","containerElement","margin","defaultXCenter","defaultYCenter","xLabel","yLabel","zLabel","passValueFn","xValueLabel","yValueLabel","zValueLabel","filterLabel","legendLabel","STYLE","DOT","showPerspective","showGrid","keepAspectRatio","showShadow","showGrayBottom","showTooltip","verticalRatio","animationInterval","animationPreload","camera","setArmRotation","setArmLength","eye","dataTable","dataPoints","colX","colY","colZ","colValue","colFilter","xMin","xStep","xMax","yMin","yStep","yMax","zMin","zStep","zMax","valueMin","valueMax","xBarWidth","yBarWidth","axisColor","gridColor","dataColor","fill","stroke","strokeWidth","dotSizeRatio","getMouseX","clientX","targetTouches","getMouseY","clientY","Emitter","_setScale","z","xCenter","yCenter","zCenter","setArmLocation","_convert3Dto2D","point3d","translation","_convertPointToTranslation","_convertTranslationToScreen","ax","ay","az","cx","getCameraLocation","cy","cz","sinTx","sin","getCameraRotation","cosTx","cos","sinTy","cosTy","sinTz","cosTz","dx","dy","dz","bx","by","ex","ey","ez","getArmLength","xcenter","frame","canvas","clientWidth","ycenter","_setBackgroundColor","backgroundColor","borderColor","borderWidth","borderStyle","BAR","BARCOLOR","BARSIZE","DOTLINE","DOTCOLOR","DOTSIZE","GRID","LINE","SURFACE","_getStyleNumber","styleName","_determineColumnIndexes","getNumberOfColumns","getNumberOfRows","counter","column","getDistinctValues","distinctValues","getColumnRange","minMax","_dataInitialize","rawData","_onChange","dataFilter","setOnLoadCallback","redraw","withBars","defaultXBarWidth","dataX","defaultYBarWidth","dataY","xRange","defaultXMin","defaultXMax","defaultXStep","yRange","defaultYMin","defaultYMax","defaultYStep","zRange","defaultZMin","defaultZMax","defaultZStep","valueRange","defaultValueMin","defaultValueMax","_getDataPoints","sortNumber","dataMatrix","xIndex","yIndex","trans","screen","bottom","pointRight","pointTop","pointCross","position","noCanvas","fontWeight","padding","innerHTML","onmousedown","_onMouseDown","ontouchstart","_onTouchStart","onmousewheel","_onWheel","ontooltip","_onTooltip","onkeydown","setSize","_resizeCanvas","clientHeight","animationStart","slider","play","animationStop","stop","_resizeCenter","setCameraPosition","horizontal","vertical","distance","getCameraPosition","getArmRotation","_readData","_redrawFilter","animationAutoStart","cameraPosition","styleNumber","tooltip","showAnimationControls","_redrawSlider","_redrawClear","_redrawAxis","_redrawDataGrid","_redrawDataLine","_redrawDataBar","_redrawDataDot","_redrawInfo","_redrawLegend","ctx","getContext","clearRect","widthMin","widthMax","dotSize","right","lineWidth","font","ymin","ymax","_hsv2rgb","strokeStyle","beginPath","moveTo","lineTo","strokeRect","fillStyle","closePath","gridLineLen","step","start","getCurrent","end","textAlign","textBaseline","fillText","visible","setValues","setPlayInterval","onchange","getIndex","selectValue","setOnChangeCallback","lineStyle","getLabel","getSelectedValue","prettyStep","text","xText","yText","zText","xMin2d","xMax2d","gridLenX","gridLenY","textMargin","armAngle","H","S","V","R","G","B","C","Hi","X","cross","topSideVisible","zAvg","lineJoin","lineCap","transBottom","dist","sortDepth","aDiff","bDiff","crossproduct","crossProduct","_getStrokeWidth","radius","arc","PI","surface","corners","xWidth","yWidth","surfaces","center","avg","transCenter","leftButtonDown","_onMouseUp","which","button","touchDown","startMouseX","startMouseY","startStart","startEnd","startArmRotation","cursor","onmousemove","_onMouseMove","onmouseup","diffX","diffY","horizontalNew","verticalNew","snapAngle","snapValue","parameters","emit","boundingRect","mouseX","mouseY","tooltipTimeout","_hideTooltip","dataPoint","_dataPointFromXY","_showTooltip","ontouchmove","_onTouchMove","ontouchend","_onTouchEnd","wheelDelta","detail","oldLength","newLength","_insideTriangle","triangle","bs","cs","distMax","closestDataPoint","closestDist","triangle1","triangle2","distX","distY","sqrt","line","dot","dom","borderRadius","boxShadow","borderLeft","contentWidth","offsetWidth","contentHeight","offsetHeight","lineHeight","dotWidth","dotHeight","mixin","_callbacks","once","self","removeListener","removeAllListeners","callbacks","cb","listeners","hasListeners","sub","sum","armLocation","armRotation","armLength","cameraLocation","cameraRotation","calculateCameraOrientation","rot","graph","onLoadCallback","loadInBackground","isLoaded","getLoadedProgress","getColumn","getValues","getValue","dataView","progress","prev","bar","MozBorderRadius","slide","onclick","togglePlay","onChangeCallback","playTimeout","playInterval","playLoop","setIndex","playNext","interval","clearInterval","getPlayInterval","setPlayLoop","doLoop","onChange","indexToLeft","startClientX","startSlideX","leftToIndex","_start","_end","_step","precision","_current","setRange","setStep","calculatePrettyStep","log10","log","LN10","step1","step2","step5","toPrecision","getStep","_interopRequireDefault","__esModule","default","groups","forthArgument","defaultOptions","autoResize","throttleRedraw","orientation","axis","maxHeight","minHeight","_create","body","domProps","emitter","bind","hiddenDates","getScale","timeAxis","toScreen","_toScreen","toGlobalScreen","_toGlobalScreen","toTime","_toTime","toGlobalTime","_toGlobalTime","range","timeAxis2","currentTime","itemSet","itemsData","groupsData","getEventProperties","oncontextmenu","fitDone","getItemRange","setWindow","animation","fit","setGroups","setItems","_redraw","_Configurator","_Configurator2","_Validator","_Validator2","printStyle","configureOptions","_createConfigurator","markDirty","refreshItems","errorFound","validate","selection","getSelection","setSelection","newDataSet","focus","itemData","_this","getDataRange","minItem","maxItem","factor","lhs","rhs","getStart","getEnd","show","repositionX","getWidthLeft","getWidthRight","dataset","centerContainer","itemFromTarget","group","groupFromTarget","customTime","customTimeFromTarget","snap","snappedTime","what","foreground","labelSet","groupId","pageX","srcEvent","pageY","_classCallCheck","instance","Constructor","defineProperty","_createClass","defineProperties","descriptor","enumerable","configurable","writable","protoProps","staticProps","_ColorPicker","_ColorPicker2","Configurator","parentModule","defaultContainer","pixelRatio","changedOptions","allowCreation","initialized","popupCounter","showButton","moduleOptions","domElements","popupDiv","popupLimit","popupHistory","colorPicker","wrapper","_removePopup","_clean","_handleObject","_makeItem","_makeHeader","generateButton","_printOptions","onmouseover","onmouseout","optionsContainer","_push","_showPopupIfNeeded","path","_arguments","_this2","_len","_key","_ret2","div","objectLabel","select","selectedValue","selected","_update","_makeLabel","err","popupString","popupValue","oninput","itemIndex","_setupPopup","_this3","html","hideTimeout","deleteTimeout","_this4","correspondingElement","checkbox","checked","_this5","defaultColor","_showColorPicker","_this6","insertTo","setColor","setUpdateCallback","colorString","setCloseCallback","checkOnly","visibleInSet","subObj","newPath","_getValue","_handleArray","_makeTextInput","_makeCheckbox","draw","physics","solver","enabledPath","enabledValue","_label","error","_makeColorField","_makeDropdown","_makeRange","_constructOptions","optionsObj","pointer","getOptions","hammerUtil","ColorPicker","generated","centerCoordinates","hueCircle","initialColor","previousColor","applied","updateCallback","closeCallback","hammer","_bindHammer","_setSize","htmlColors","black","navy","darkblue","mediumblue","darkgreen","teal","darkcyan","deepskyblue","darkturquoise","mediumspringgreen","lime","springgreen","aqua","cyan","midnightblue","dodgerblue","lightseagreen","forestgreen","seagreen","darkslategray","limegreen","mediumseagreen","turquoise","royalblue","steelblue","darkslateblue","mediumturquoise","indigo","darkolivegreen","cadetblue","cornflowerblue","mediumaquamarine","dimgray","slateblue","olivedrab","slategray","lightslategray","mediumslateblue","lawngreen","chartreuse","aquamarine","maroon","purple","olive","gray","skyblue","lightskyblue","blueviolet","darkred","darkmagenta","saddlebrown","darkseagreen","lightgreen","mediumpurple","darkviolet","palegreen","darkorchid","yellowgreen","sienna","brown","darkgray","lightblue","greenyellow","paleturquoise","lightsteelblue","powderblue","firebrick","darkgoldenrod","mediumorchid","rosybrown","darkkhaki","silver","mediumvioletred","indianred","peru","chocolate","tan","lightgrey","palevioletred","thistle","orchid","goldenrod","crimson","gainsboro","plum","burlywood","lightcyan","lavender","darksalmon","violet","palegoldenrod","lightcoral","khaki","aliceblue","honeydew","azure","sandybrown","wheat","beige","whitesmoke","mintcream","ghostwhite","salmon","antiquewhite","linen","lightgoldenrodyellow","oldlace","fuchsia","magenta","deeppink","orangered","tomato","hotpink","coral","darkorange","lightsalmon","orange","lightpink","pink","gold","peachpuff","navajowhite","moccasin","bisque","mistyrose","blanchedalmond","papayawhip","lavenderblush","seashell","cornsilk","lemonchiffon","floralwhite","snow","yellow","lightyellow","ivory","white","setInitial","htmlColor","_isColorString","rgbaArray","_rgbaArray","rgbObj","alpha","_setColor","display","_generateHueCircle","storePrevious","_hide","_updatePicker","alert","angleConvert","colorPickerSelector","colorPickerCanvas","pixelRation","devicePixelRatio","webkitBackingStorePixelRatio","mozBackingStorePixelRatio","msBackingStorePixelRatio","oBackingStorePixelRatio","backingStorePixelRatio","setTransform","putImageData","circle","brightnessRange","opacityRange","initialColorDiv","newColorDiv","colorPickerDiv","opacityDiv","brightnessDiv","arrowDiv","_setOpacity","_setBrightness","brightnessLabel","opacityLabel","cancelButton","applyButton","_apply","saveButton","_save","loadButton","_loadLast","drag","pinch","enable","onTouch","_moveSelector","sat","hfac","sfac","fillRect","getImageData","centerY","centerX","angle","atan2","newTop","newLeft","propagating","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","_firstTarget","events","propagatedHandler","_handled","stopped","stopPropagation","srcStop","firstTarget","elemHammer","_handlers","Manager","PropagatingHammer","o","assign","pointerType","isFirst","handler","eventType","hammers","idx","exportName","setTimeoutContext","bindFn","invokeArrayArg","arg","each","message","deprecationMessage","inherit","child","properties","childP","baseP","_super","boolOrFn","TYPE_FUNCTION","ifUndefined","val1","val2","addEventListeners","splitStr","removeEventListeners","inStr","str","find","inArray","src","findByKey","uniqueArray","results","prefixed","property","prefix","camelProp","VENDOR_PREFIXES","uniqueId","_uniqueId","getWindowForElement","doc","ownerDocument","defaultView","parentWindow","Input","manager","inputTarget","domHandler","ev","init","createInputInstance","Type","inputClass","SUPPORT_POINTER_EVENTS","PointerEventInput","SUPPORT_ONLY_TOUCH","TouchInput","SUPPORT_TOUCH","TouchMouseInput","MouseInput","inputHandler","pointersLen","pointers","changedPointersLen","changedPointers","INPUT_START","isFinal","INPUT_END","INPUT_CANCEL","session","computeInputData","recognize","prevInput","pointersLength","firstInput","simpleCloneInputData","firstMultiple","offsetCenter","getCenter","timeStamp","deltaTime","getAngle","getDistance","computeDeltaXY","offsetDirection","getDirection","deltaX","deltaY","overallVelocity","getVelocity","overallVelocityX","overallVelocityY","rotation","getRotation","maxPointers","computeIntervalInputData","offsetDelta","prevDelta","velocity","velocityX","velocityY","last","lastInterval","COMPUTE_INTERVAL","DIRECTION_NONE","DIRECTION_LEFT","DIRECTION_RIGHT","DIRECTION_UP","DIRECTION_DOWN","PROPS_XY","PROPS_CLIENT_XY","evEl","MOUSE_ELEMENT_EVENTS","evWin","MOUSE_WINDOW_EVENTS","allow","pressed","POINTER_ELEMENT_EVENTS","POINTER_WINDOW_EVENTS","store","pointerEvents","SingleTouchInput","evTarget","SINGLE_TOUCH_TARGET_EVENTS","SINGLE_TOUCH_WINDOW_EVENTS","started","normalizeSingleTouches","all","touches","changed","changedTouches","TOUCH_TARGET_EVENTS","targetIds","getTouches","allTouches","INPUT_MOVE","identifier","changedTargetTouches","touch","mouse","TouchAction","cleanTouchActions","actions","TOUCH_ACTION_NONE","hasPanX","TOUCH_ACTION_PAN_X","hasPanY","TOUCH_ACTION_PAN_Y","TOUCH_ACTION_MANIPULATION","TOUCH_ACTION_AUTO","Recognizer","state","STATE_POSSIBLE","simultaneous","requireFail","stateStr","STATE_CANCELLED","STATE_ENDED","STATE_CHANGED","STATE_BEGAN","directionStr","getRecognizerByNameIfManager","otherRecognizer","recognizer","AttrRecognizer","PanRecognizer","pX","pY","PinchRecognizer","PressRecognizer","_timer","_input","RotateRecognizer","SwipeRecognizer","TapRecognizer","pTime","pCenter","recognizers","preset","handlers","touchAction","toggleCssProps","recognizeWith","requireFailure","cssProps","triggerDomEvent","gestureEvent","createEvent","initEvent","gesture","dispatchEvent","TEST_ELEMENT","nextKey","dest","merge","MOBILE_REGEX","INPUT_TYPE_TOUCH","INPUT_TYPE_PEN","INPUT_TYPE_MOUSE","INPUT_TYPE_KINECT","DIRECTION_HORIZONTAL","DIRECTION_VERTICAL","DIRECTION_ALL","MOUSE_INPUT_MAP","mousedown","mousemove","mouseup","POINTER_INPUT_MAP","pointerdown","pointermove","pointerup","pointercancel","pointerout","IE10_POINTER_TYPE_ENUM",2,3,4,5,"MSPointerEvent","PointerEvent","removePointer","eventTypeNormalized","isTouch","storeIndex","pointerId","SINGLE_TOUCH_INPUT_MAP","touchstart","touchmove","touchend","touchcancel","TOUCH_INPUT_MAP","inputEvent","inputData","isMouse","PREFIXED_TOUCH_ACTION","NATIVE_TOUCH_ACTION","TOUCH_ACTION_COMPUTE","compute","getTouchAction","preventDefaults","prevented","hasNone","isTapPointer","isTapMovement","isTapTouchTime","preventSrc","STATE_RECOGNIZED","STATE_FAILED","dropRecognizeWith","dropRequireFailure","hasRequireFailures","canRecognizeWith","additionalEvent","tryEmit","canEmit","inputDataClone","process","reset","attrTest","optionPointers","isRecognized","directionTest","hasMoved","inOut","validPointers","validMovement","validTime","taps","posThreshold","validTouchTime","failTimeout","validInterval","validMultiTap","tapCount","VERSION","domEvents","userSelect","touchSelect","touchCallout","contentZooming","userDrag","tapHighlightColor","STOP","FORCED_STOP","force","curRecognizer","existing","Tap","Pan","Swipe","Pinch","Rotate","Press","freeGlobal","onRelease","offTouch","offRelease","disablePreventDefaultVertically","pinchRecognizer","Validator","referenceOptions","subObject","usedOptions","check","__any__","getSuggestion","__type__","checkFields","referenceOption","refOptionObj","optionType","refOptionType","print","printLocation","localSearch","findInOptions","globalSearch","localSearchThreshold","globalSearchThreshold","indexMatch","closestMatch","recursive","closestMatchPath","lowerCaseOption","op","levenshteinDistance","_j","_j2","matrix","deltaDifference","scaleOffset","startToFront","endToFront","moveable","zoomable","zoomMin","zoomMax","animationTimer","_onDragStart","_onDrag","_onDragEnd","_onMouseWheel","_onTouch","_onPinch","validateDirection","getPointer","byUser","finalStart","finalEnd","_cancelAnimation","initStart","initEnd","easingName","easingFunction","initTime","anyChanged","dragging","ease","done","_applyRange","updateHiddenDates","newStart","newEnd","getRange","conversion","totalHidden","previousDelta","_isInsideRange","allowDragging","getHiddenDurationBetween","diffRange","safeStart","snapAwayFromHidden","safeEnd","startDate","endDate","zoomKey","pointerDate","_pointerToDate","zoom","centerDate","hiddenDuration","hiddenDurationBefore","getHiddenDurationBefore","hiddenDurationAfter","move","_isResized","resized","_previousWidth","_previousHeight","convertHiddenOptions","repeat","dateItem","totalRange","pixelTime","runUntil","dayOffset","removeDuplicates","startHidden","isHidden","endHidden","rangeStart","rangeEnd","hidden","safeDates","printDates","stepOverHiddenDates","timeStep","previousTime","stepInHidden","currentValue","current","switchedYear","switchedMonth","switchedDay","correctTimeForHidden","totalDuration","partialDuration","accumulatedHiddenDuration","getAccumulatedHiddenDuration","newTime","timeOffset","requiredDuration","previousPoint","correctionEnabled","Activator","onMouseWheel","isActive","backgroundVertical","backgroundHorizontal","leftContainer","rightContainer","shadowTop","shadowBottom","shadowTopLeft","shadowBottomLeft","shadowTopRight","shadowBottomRight","initialDrawDone","_redrawTimer","scrollTop","scrollTopMin","customTimes","redrawCount","drawPoints","onRender","clickToUse","activator","_initAutoResize","component","configurator","configure","appliedOptions","setModuleOptions","_origRedraw","active","_stopAutoResize","setCustomTime","getCustomTime","setCustomTimeTitle","title","setCustomTitle","addCustomTime","timestamp","some","removeCustomTime","getVisibleItems","getWindow","borderRootHeight","borderRootWidth","autoHeight","containerHeight","centerWidth","_updateScrollTop","visibilityTop","visibilityBottom","visibility","contentsOverflow","MAX_REDRAW","repaint","setCurrentTime","getCurrentTime","_startAutoResize","_onResize","lastWidth","lastHeight","watchTimer","setInterval","initialScrollTop","oldScrollTop","_getScrollTop","newScrollTop","_setScrollTop","align","groupOrderSwap","fromGroup","toGroup","targetOrder","groupOrder","selectable","multiselect","itemsAlwaysDraggable","editable","updateTime","updateGroup","groupEditable","onAdd","onUpdate","onMove","onRemove","onMoving","onAddGroup","onMoveGroup","onRemoveGroup","itemOptions","itemListeners","_onAdd","_onUpdate","_onRemove","groupListeners","_onAddGroups","_onUpdateGroups","_onRemoveGroups","groupIds","stackDirty","touchParams","groupTouchParams","UNGROUPED","BACKGROUND","box","_updateUngrouped","backgroundGroup","_onSelectItem","_onMultiSelectItem","_onAddItem","groupHammer","_onGroupDragStart","_onGroupDrag","_onGroupDragEnd","addCallback","dirty","displayed","hide","unselect","rawVisibleItems","visibleItems","_deselect","_orderGroups","visibleInterval","zoomed","lastVisibleInterval","restack","firstGroup","_firstGroup","firstMargin","nonFirstMargin","groupMargin","groupResized","firstGroupIndex","firstGroupId","ungrouped","_getGroupId","getLabelSet","oldItemsData","getItems","_order","getGroups","removeItem","_getType","_removeItem","groupData","groupOptions","oldGroupId","oldSubGroupId","subgroup","oldGroup","_constructByEndArray","endArray","dragLeftItem","dragRightItem","itemProps","_getGroupIndex","initialX","dragLeft","_cloneItemData","dragRight","selectedItem","baseGroupIndex","itemsToDrag","groupIndex","groupOffset","ctrlKey","metaKey","_onDragStartAddItem","xAbs","newItem","offsetLeft","updateGroupAllowed","newGroupBase","initial","updateTimeAllowed","initialStart","initialEnd","newOffset","_moveToGroup","originalOrder","movingUp","targetGroupTop","draggedGroupHeight","targetGroupHeight","targetGroup","draggedGroup","newOrder","origOrder","draggedId","numGroups","curPos","orgOffset","slippedPosition","switchGroup","shouldBeGroup","switchGroupId","shiftKey","oldSelection","newSelection","newItemData","itemGroup","lastSelectedGroup","multiselectPerGroup","_getItemRange","_item","itemSetFromTarget","minimumStep","autoScale","FORMAT","minorLabels","majorLabels","setMoment","setFormat","setMinimumStep","roundToMinor","hasNext","setScale","setAutoScale","stepYear","stepMonth","stepDay","stepHour","stepMinute","stepSecond","stepMillisecond","isMajor","getLabelMinor","getLabelMajor","getClassName","even","today","currentWeek","currentMonth","currentYear","subgroups","subgroupIndex","subgroupOrderer","subgroupOrder","byStart","byEnd","checkRangedItems","inner","marker","Element","getLabelWidth","markerHeight","lastMarkerHeight","_calculateSubGroupHeights","limitSize","customOrderedItems","_updateVisibleItems","nostack","_calculateHeight","offsetTop","repositionY","resetSubgroups","setParent","orderSubgroups","_checkIfVisible","sortArray","sortField","removeFromDataSet","startArray","orderByStart","orderByEnd","oldVisibleItems","visibleItemsLookup","lowerBound","upperBound","searchFunction","_checkIfVisibleWithReference","initialPosByStart","_traceVisible","initialPosByEnd","initialPos","breakCondition","isVisible","EPSILON","aTime","bTime","iMax","collidingItem","jj","collision","baseClassName","_updateContents","_updateTitle","_updateDataAttributes","_updateStyle","getComputedStyle","maxWidth","_repaintDeleteButton","_repaintDragLeft","_repaintDragRight","contentLeft","parentWidth","boxWidth","groupChanged","deleteButton","template","_contentToString","removeAttribute","dataAttributes","attributes","setAttribute","outerHTML","itemSetHeight","marginLeft","onTop","itemSubgroup","totalHeight","newHeight","lines","majorTexts","minorTexts","lineTop","showMinorLabels","showMajorLabels","maxMinorChars","parentChanged","_calculateCharSize","minorLabelHeight","minorCharHeight","majorLabelHeight","majorCharHeight","minorLineHeight","minorLineWidth","majorLineHeight","majorLineWidth","foregroundNextSibling","nextSibling","backgroundNextSibling","_repaintLabels","timeLabelsize","minorCharWidth","xNext","nextIsMajor","prevWidth","labelMinor","xFirstMajorLabel","MAX","showMinorGrid","_repaintMinorText","_repaintMajorText","_repaintMajorLine","_repaintMinorLine","warnedForOverflow","leftTime","leftText","widthText","majorCharWidth","pop","createTextNode","childNodes","nodeValue","measureCharMinor","measureCharMajor","overlay","_onTapOverlay","onClick","_hasParent","deactivate","escListener","activate","unbind","_exportFunctions","_bound","keydown","keyup","_keys","fromCharCode","down","handleEvent","up","keyCode","bound","bindAll","getKey","newBindings","eventParams","warned","substring","showCurrentTime","currentTimeTimer","boolean","any","function","null","groupsDraggable","linegraph","initialLoad","getLegend","isGroupVisible","yAxisLeft","yAxisRight","legendLeft","legendRight","screenToValue","yAxisOrientation","defaultGroup","sampling","graphHeight","shaded","barChart","sideBySide","interpolation","parametrization","dataAxis","legend","abortedGraphUpdate","updateSVGheight","updateSVGheightOnResize","forceGraphUpdate","lastStart","svgElements","groupsUsingDefaultStyles","svg","framework","Bars","Lines","Points","_removeGroup","_updateAllGroupData","removeGroup","_updateGroup","addGroup","groupsContent","groupCounts","extended","orginalY","_updateGraph","rangePerPixelInv","_getSortedGroupIds","grouplist","zIndex","bz","groupRanges","changeCalled","minDate","maxDate","_getRelevantData","_applySampling","_convertXcoordinates","_getYRanges","_updateYAxis","below","excludeFromStacking","_stack","_convertYcoordinates","calcPath","subGroupId","drawShading","subData","subPrevPoint","subNextPoint","dateComparator","first","dataContainer","increment","amountOfPoints","xDistance","pointsPerPixel","sampledData","combinedDataLeft","combinedDataRight","getYRange","getStackedYRange","minVal","maxVal","yAxisLeftUsed","yAxisRightUsed","minLeft","minRight","maxLeft","maxRight","ignore","_toggleAxisVisiblity","drawIcons","master","masterAxis","lineOffset","tempGroups","axisUsed","datapoints","screen_x","screen_y","svgHeight","convertValue","setZeroPosition","linegraphOptions","icons","majorLinesOffset","minorLinesOffset","labelOffsetX","labelOffsetY","iconWidth","alignZeros","linegraphSVG","DOMelements","labels","conversionFactor","minWidth","stepPixels","zeroCrossing","amountOfSteps","iconsRemoved","amountOfGroups","lineContainer","graphOptions","_redrawGroupIcons","iconHeight","iconOffset","groupArray","_cleanupIcons","activeGroups","_redrawLabels","_redrawTitle","customRange","autoScaleEnd","autoScaleStart","followScale","maxLabelSize","getLines","major","_redrawLabel","_redrawLine","titleWidth","titleCharHeight","characterHeight","largestWidth","textMinor","textMajor","textTitle","measureCharTitle","titleCharWidth","zeroAlign","formattingFunction","majorSteps","minorSteps","customLines","minorStepIdx","magnitudefactor","determineScale","rounded","setCharHeight","setHeight","minimumStepValue","orderOfMagnitude","solutionFound","stepSize","is_major","getFirstMajor","majorStep","formatValue","bottomOffset","oldStepIdx","oldStart","oldEnd","increaseMagnitude","decreaseMagnitude","otherZero","otherStep","newRange","myOriginalZero","majorOffset","zeroOffset","pixels","usingDefaultStyle","zeroPosition","drawIcon","icon","Bargraph","fillHeight","outline","barWidth","originalWidth","bar1Height","bar2Height","processedGroupData","coreDistance","drawData","combinedData","intersections","barPoints","_getDataIntersections","heightOffset","_getSafeDrawData","amount","resolved","accumulatedNegative","accumulatedPositive","pointData","groupLabel","_getStackedYRange","xpos","getGroupTemplate","callbackResult","getCallback","Line","_catmullRom","_linear","fillPath","pathArray","subPathArray","dFill","zero","serializePath","inverse","_catmullRomUniform","p0","bp1","bp2","normalization","d1","d2","d3","A","N","d3powA","d2powA","d3pow2A","d2pow2A","d1pow2A","d1powA","side","iconSize","iconSpacing","excludeFromLegend","textArea","scrollableHeight","drawLegendIcons","paddingTop","nodes","nodeIndices","edges","edgeIndices","eventListeners","onTap","onDoubleTap","onHold","onDragStart","onDrag","onDragEnd","onPinch","onMouseMove","onContext","functions","createNode","createEdge","view","bindEventListeners","images","_Images2","_Groups2","_Canvas2","selectionHandler","_SelectionHandler2","interactionHandler","_InteractionHandler2","_View2","renderer","_CanvasRenderer2","_PhysicsEngine2","layoutEngine","_LayoutEngine2","clustering","_Clustering2","manipulation","_ManipulationSystem2","nodesHandler","_NodesHandler2","edgesHandler","_EdgesHandler2","_KamadaKawai2","_Images","_Groups","_NodesHandler","_EdgesHandler","_PhysicsEngine","_Clustering","_CanvasRenderer","_Canvas","_View","_InteractionHandler","_SelectionHandler","_LayoutEngine","_ManipulationSystem","_KamadaKawai","layout","interaction","networkOptions","_updateVisibleIndices","nodeId","edgeId","_updateValueRange","unselectAll","dotData","gephi","gephiData","valueTotal","setValueRange","canvasToDOM","DOMtoCanvas","findNode","isCluster","openCluster","cluster","getNodesInCluster","clusterByConnection","clusterByHubsize","clusterOutliers","getSeed","enableEditMode","disableEditMode","addNodeMode","editNode","editNodeMode","addEdgeMode","editEdgeMode","deleteSelected","getPositions","storePositions","moveNode","getBoundingBox","getConnectedNodes","objectId","getConnectedEdges","startSimulation","stopSimulation","stabilize","getSelectedNodes","getSelectedEdges","getNodeAt","getEdgeAt","edge","selectNodes","selectEdges","getViewPosition","releaseNode","getOptionsFromConfigurator","imageBroken","url","imageToCache","brokenUrl","imageToLoadBrokenUrlOn","onerror","_addImageToCache","Image","imageToRedrawWith","cachedImage","img","onload","_redrawWithImage","_tryloadBrokenUrl","Groups","defaultIndex","groupsArray","defaultGroups","useDefaultGroups","optionFields","groupName","groupname","_index","_Node","_Node2","_Label","_Label2","NodesHandler","nodesListeners","borderWidthSelected","brokenImage","fixed","face","strokeColor","image","labelHighlightBold","level","mass","scaling","maxVisible","drawThreshold","customScalingFunction","shadow","shape","shapeProperties","borderDashes","useImageSize","useBorderWithImage","parseOptions","updateShape","updateLabelModule","_reset","_nodeId2","doNotEmit","oldNodesData","newNodes","positionInitially","changedData","dataChanged","constructorClass","clearPositions","dataArray","_node","_node2","boundingBox","nodeList","nodeObj","toId","fromId","edgeList","_Box","_Box2","_Circle","_Circle2","_CircularImage","_CircularImage2","_Database","_Database2","_Diamond","_Diamond2","_Dot","_Dot2","_Ellipse","_Ellipse2","_Icon","_Icon2","_Image","_Image2","_Square","_Square2","_Star","_Star2","_Text","_Text2","_Triangle","_Triangle2","_TriangleDown","_TriangleDown2","Node","imagelist","baseSize","baseFontSize","predefinedPosition","labelModule","currentShape","groupObj","imageObj","load","distanceToBorder","sizeDiff","fontDiff","updateBoundingBox","resize","parentOptions","newOptions","parsedColor","_slicedToArray","sliceIterator","_arr","_n","_e","_s","Label","edgelabel","pointToSelf","fontOptions","yLine","isEdgeLabel","nodeOptions","labelDirty","baseline","viewFontSize","calculateLabelSize","_drawBackground","_drawText","lineMargin","fontSize","_getColor2","_getColor","_getColor3","fontColor","_setAlignment2","_setAlignment","_setAlignment3","lineCount","strokeText","_processLabel","measureText","newOptionsArray","_possibleConstructorReturn","ReferenceError","_inherits","subClass","superClass","setPrototypeOf","__proto__","_NodeBase2","_NodeBase3","Box","_NodeBase","getPrototypeOf","textSize","getTextSize","selectionLineWidth","roundRect","enableShadow","disableShadow","save","enableBorderDashes","disableBorderDashes","restore","NodeBase","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","setLineDash","dashes","_CircleImageBase2","_CircleImageBase3","Circle","_CircleImageBase","diameter","_drawRawCircle","CircleImageBase","labelOffset","imageLoaded","ratio","neutralborderWidth","globalAlpha","can2","ctx2","drawImage","iterations","labelDimensions","CircularImage","_swapToImageResizeWhenImageLoaded","_resizeImage","clip","_drawImageAtPosition","_drawImageLabel","Database","database","_distanceToBorder","_ShapeBase2","_ShapeBase3","Diamond","_ShapeBase","_resizeShape","_drawShape","ShapeBase","sizeMultiplier","Dot","Ellipse","ellipse","Icon","_icon","iconTextSpacing","Square","Star","Text","Triangle","TriangleDown","_Edge","_Edge2","EdgesHandler","edgesListeners","arrows","scaleFactor","arrowStrikethrough","hoverWidth","selectionWidth","selfReferenceSize","smooth","forceDirection","roundness","emitChange","edgeData","edgeOptions","reconnectEdges","markAllEdgesAsDirty","updateEdgeType","_edgeId","oldEdgesData","edgesData","oldEdge","disconnect","showInternalIds","connect","cleanup","edgeType","colorDirty","_CubicBezierEdge","_CubicBezierEdge2","_BezierEdgeDynamic","_BezierEdgeDynamic2","_BezierEdgeStatic","_BezierEdgeStatic2","_StraightEdge","_StraightEdge2","Edge","baseWidth","connected","_setInteractionWidths","changeInType","attachEdge","detachEdge","widthDiff","viaNode","getViaNode","arrowData","fromPoint","toPoint","getArrowData","core","drawLine","drawArrows","drawLabel","drawArrowHead","node1","node2","getPoint","translate","_rotateForLabelAlignment","_pointOnCircle","xFrom","yFrom","xTo","yTo","xObj","yObj","getDistanceToEdge","angleInDegrees","rotate","percentage","colorsDefined","_CubicBezierEdgeBase2","_CubicBezierEdgeBase3","CubicBezierEdge","_CubicBezierEdgeBase","viaNodes","via1","via2","bezierCurveTo","x1","y1","x2","y2","_getViaCoordinates","nearNode","_findBorderPositionBezier","x3","y3","_ref","_ref2","_getDistanceToBezierEdge","_ref3","_ref4","vec","_BezierEdgeBase2","_BezierEdgeBase3","CubicBezierEdgeBase","_BezierEdgeBase","minDistance","lastX","lastY","_getDistanceToLine","_EdgeBase2","_EdgeBase3","BezierEdgeBase","_EdgeBase","distanceToPoint","difference","via","EdgeBase","getColor","getLineWidth","_drawDashedLine","_drawLine","_line","_getCircleData2","_getCircleData","_getCircleData3","_circle","pattern","lineDashOffset","_getCircleData4","_getCircleData5","dashedLine","_getCircleData6","_getCircleData7","_x","_y","_radius","_findBorderPosition","_findBorderPositionCircle","_getCircleData8","_getCircleData9","colorOptions","grd","createLinearGradient","fromColor","toColor","addColorStop","_getDistanceToEdge","_getCircleData10","_getCircleData11","px","py","something","u","arrowPoint","guideOffset","findBorderPosition","guidePos","_getCircleData12","_getCircleData13","xi","yi","arrowCore","arrow","BezierEdgeDynamic","_boundFunction","positionBezierNode","physicsChange","setupSupportNode","parentEdgeId","quadraticCurveTo","BezierEdgeStatic","xVia","yVia","pi","originalAngle","myAngle","_pi","_originalAngle","_myAngle","StraightEdge","edgeSegmentLength","toBorderDist","toBorderPoint","borderPos","_BarnesHutSolver","_BarnesHutSolver2","_RepulsionSolver","_RepulsionSolver2","_HierarchicalRepulsionSolver","_HierarchicalRepulsionSolver2","_SpringSolver","_SpringSolver2","_HierarchicalSpringSolver","_HierarchicalSpringSolver2","_CentralGravitySolver","_CentralGravitySolver2","_FA2BasedRepulsionSolver","_FA2BasedRepulsionSolver2","_FA2BasedCentralGravitySolver","_FA2BasedCentralGravitySolver2","PhysicsEngine","physicsBody","physicsNodeIndices","physicsEdgeIndices","forces","velocities","physicsEnabled","simulationInterval","requiresTimeout","previousStates","referenceState","freezeCache","renderTimer","adaptiveTimestep","adaptiveTimestepEnabled","adaptiveCounter","adaptiveInterval","stabilized","startedStabilization","stabilizationIterations","ready","barnesHut","theta","gravitationalConstant","centralGravity","springLength","springConstant","damping","avoidOverlap","forceAtlas2Based","repulsion","nodeDistance","hierarchicalRepulsion","maxVelocity","minVelocity","stabilization","updateInterval","onlyDynamicEdges","timestep","layoutFailed","initPhysics","updatePhysicsData","nodesSolver","edgesSolver","gravitySolver","modelOptions","viewFunction","simulationStep","_emitStabilized","startTime","physicsTick","physicsTime","runDoubleSpeed","amountOfIterations","calculateForces","moveNodes","revert","_evaluateStepQuality","nodeIds","positions","vx","vy","dpos","reference","maxNodeVelocity","averageNodeVelocity","velocityAdaptiveThreshold","nodeVelocity","_performStep","totalVelocity","solve","targetIterations","_freezeNodes","_stabilizationBatch","_finalizeStabilization","_restoreFrozenNodes","colorFactor","forceSize","arrowSize","BarnesHutSolver","barnesHutTree","randomSeed","thetaInversed","overlapAvoidanceFactor","nodeCount","_formBarnesHutTree","_getForceContribution","NW","NE","SW","SE","parentBranch","childrenCount","centerOfMass","calcSize","_calculateForces","gravityForce","fx","fy","minX","minY","maxX","maxY","minimumTreeSize","rootSize","halfRootSize","_splitBranch","_placeInTree","totalMass","totalMassInv","biggestSize","skipMassUpdate","_updateBranchMass","_placeInRegion","region","seededRandom","containedNode","_insertRegion","childSize","_drawBranch","branch","RepulsionSolver","repulsingForce","HierarchicalRepulsionSolver","steepness","SpringSolver","edgeLength","node3","_calculateSpringForce","springForce","HierarchicalSpringSolver","springFx","springFy","_i2","totalFx","totalFy","_i3","correctionFx","correctionFy","_i4","_nodeId3","CentralGravitySolver","_BarnesHutSolver3","ForceAtlas2BasedRepulsionSolver","degree","_CentralGravitySolver3","ForceAtlas2BasedCentralGravitySolver","_NetworkUtil","_NetworkUtil2","_Cluster","_Cluster2","ClusterEngine","clusteredNodes","clusteredEdges","hubsize","_getHubSize","_checkOptions","nodesToCluster","refreshData","joinCondition","childNodesObj","childEdgesObj","clonedOptions","cloneOptions","_cluster","edgeCount","clusters","usedNodes","relevantEdgeCount","gatheringSuccessful","childNodeId","_getConnectedId","clusterByEdgeCount","clusterNodeProperties","parentNodeId","parentClonedOptions","childClonedOptions","clusterEdgeProperties","childNode","otherNodeId","childKeys","createEdges","_edge","newEdge","clusteringEdgeReplacingId","_backupEdgeOptions","processProperties","childNodesOptions","childEdgesOptions","_clonedOptions","clusterId","_getClusterPosition","clusterNode","containedNodes","containedEdges","_createClusterEdges","originalOptions","clusterNodeId","releaseFunction","clusterPosition","newPositions","_containedNode","_nodeId4","_containedNode2","_nodeId5","_containedNode3","edgesToBeDeleted","otherCluster","transferEdge","replacedEdge","_restoreEdge","nodesArray","reverse","average","averageSquared","hubCounter","largestHub","variance","standardDeviation","hubThreshold","NetworkUtil","allNodes","specificNodes","amountOfConnections","_Node3","Cluster","requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","msRequestAnimationFrame","CanvasRenderer","redrawRequested","renderingActive","renderRequests","allowRedraw","hideEdgesOnDrag","hideNodesOnDrag","_determineBrowserMethod","_resizeNodes","_requestRedraw","_startRendering","cancelAnimationFrame","_renderStep","_drawEdges","_drawNodes","alwaysShow","topLeft","bottomRight","viewableArea","isSelected","isBoundingBoxOverlappingWith","browserType","Canvas","resizeTimer","resizeFunction","cameraState","hammerFrame","_cleanUp","previousWidth","previousHeight","widthRatio","heightRatio","newScale","currentViewCenter","distanceFromCenter","tabIndex","_prepareValue","emitEvent","oldWidth","oldHeight","previousRatio","_getCameraState","_setCameraState","_XconvertCanvasToDOM","_YconvertCanvasToDOM","_XconvertDOMtoCanvas","_YconvertDOMtoCanvas","View","animationSpeed","renderRefreshRate","animationEasingFunction","easingTime","sourceScale","targetScale","sourceTranslation","targetTranslation","lockedOnNodeId","lockedOnNodeOffset","touchTime","initialZoom","zoomLevel","positionDefined","numberOfNodes","yDistance","xZoomLevel","yZoomLevel","findCenter","animationOptions","nodePosition","lockedOnNode","animateView","locked","_transitionRedraw","viewCenter","_lockedRedraw","finished","_NavigationHandler","_NavigationHandler2","_Popup","_Popup2","InteractionHandler","navigationHandler","popup","popupObj","popupTimer","dragNodes","dragView","keyboard","speed","bindToWindow","navigationButtons","tooltipDelay","zoomView","pinched","checkSelectionChanges","_generateClickEvent","previouslySelectedEdgeCount","_getSelectedEdgeCount","previouslySelectedNodeCount","_getSelectedNodeCount","previousSelection","selectAdditionalOnPoint","selectOnPoint","selectedEdgesCount","selectedNodesCount","currentSelection","_determineIfDifferent2","_determineIfDifferent","nodesChanged","edgesChanged","nodeSelected","selectObject","selectionObj","xFixed","yFixed","scaleOld","preScaleDragPointer","scaleFrac","tx","ty","postScaleDragPointer","popupVisible","_checkHidePopup","setPosition","_checkShowPopup","hoverObject","pointerObj","previousPopupObjId","nodeUnderCursor","popupType","overlappingNodes","isOverlappingWith","getTitle","overlappingEdges","popupTargetType","popupTargetId","setText","_pointerToPositionObject","stillOnObj","overNode","NavigationHandler","iconsCreated","navigationHammers","boundFunctions","activated","configureKeyboardBindings","loadNavigationElements","cleanNavigation","navigationDOM","navigationDivs","navigationDivActions","_fit","bindToRedraw","_stopMovement","boundAction","unbindFromRedraw","Popup","doShow","SelectionHandler","hoverObj","selectConnectedEdges","hoverConnectedEdges","updateSelection","selectionChanged","deselectObject","emptySelection","DOM","highlightEdges","_selectConnectedEdges","_addToSelection","_removeFromSelection","canvasPos","returnNode","positionObject","_getAllNodesOverlappingWith","_getEdgesOverlappingWith","returnEdge","_getAllEdgesOverlappingWith","_unselectConnectedEdges","clusterSize","_addToHover","hoverChanged","blurObject","_hoverConnectedEdges","edgeIds","idArray","RangeError","LayoutEngine","initialRandomSeed","setPhysics","optionsBackup","improvedLayout","hierarchical","levelSeparation","nodeSpacing","treeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","setupHierarchicalLayout","layoutNetwork","prevHierarchicalState","adaptAllOptionsForHierarchicalLayout","MAX_LEVELS","clusterThreshold","startLength","before","clusterBridges","after","_declusterAll","info","kamadaKawai","_shiftToCenter","getRangeCore","clustersPresent","definedLevel","definedPositions","undefinedLevel","hierarchicalLevels","lastNodeOnLevel","hierarchicalChildrenReference","hierarchicalParentReference","hierarchicalTrees","treeIndex","distributionOrdering","distributionIndex","distributionOrderingPresence","_determineLevelsByHubsize","_determineLevelsDirected","_determineLevelsCustomCallback","distribution","_getDistribution","_generateMap","_placeNodesByHierarchy","_condenseHierarchy","stillShifting","branches","shiftTrees","treeSizes","getTreeSizes","shiftTree","_getPositionForHierarchy","_setPositionForHierarchy","getTreeSize","treeWidths","getBranchNodes","getBranchBoundary","branchMap","maxLevel","minSpace","maxSpace","branchNode","_getSpaceAroundNode2","_getSpaceAroundNode","_getSpaceAroundNode3","minSpaceNode","maxSpaceNode","getMaxLevel","getCollisionLevel","maxLevel1","maxLevel2","hasSameParent","parents1","parents2","shiftElementsCloser","levels","centerParents","levelNodes","branchShiftCallback","centerParent","diffAbs","branchNodes1","branchNodes2","_getBranchBoundary","_getBranchBoundary2","max1","_getBranchBoundary3","_getBranchBoundary4","min2","minSpace2","diffBranch","_shiftBlock","_centerParent","minimizeEdgeLength","allEdges","nodeLevel","C2","referenceNodes","aboveEdges","otherNode","getFx","getDFx","getGuess","guess","guessMap","dfx","moveBranch","branchNodes","_getBranchBoundary5","_getBranchBoundary6","minSpaceBranch","maxSpaceBranch","branchOffset","_getSpaceAroundNode4","_getSpaceAroundNode5","newPosition","minimizeEdgeLengthBottomUp","shiftBranchesCloserBottomUp","centerAllParents","centerAllParentsBottomUp","useMap","prevNode","prevPos","nextNode","nextPos","parents","parentId","minPos","maxPos","_i5","_getSpaceAroundNode6","_getSpaceAroundNode7","positionedNodes","nodeArray","_indexArrayToNodes","_sortNodeArray","handledNodeCount","_validataPositionAndContinue","parentLevel","_i6","childNodeLevel","_i7","previousPos","sharedParent","_findCommonParent","withChild","_placeBranchNodes","hubSize","levelDownstream","nodeA","nodeB","_crawlNetwork","minLevel","customCallback","levelByDirection","levelA","_setMinLevelToZero","fillInRelations","_this7","startingNodeId","crawler","tree","childA","childB","_this8","iterateParents","findParent","foundParent","doNotUpdate","ManipulationSystem","editMode","manipulationDiv","editModeDiv","closeDiv","manipulationHammers","temporaryUIFunctions","temporaryEventFunctions","temporaryIds","guiEnabled","inMode","selectedControlNode","initiallyActive","addNode","addEdge","editEdge","deleteNode","deleteEdge","controlNodeStyle","_restore","_setup","showManipulatorToolbar","_createEditButton","manipulationDOM","selectedNodeCount","selectedEdgeCount","selectedTotalCount","needSeperator","_createAddNodeButton","_createSeperator","_createAddEdgeButton","_createEditNodeButton","_createEditEdgeButton","_createDeleteButton","_bindHammerToDiv","toggleEditMode","_temporaryBindEvent","_createBackButton","_createDescription","_performAddNode","_getSelectedNode","finalizedData","_temporaryBindUI","_handleConnect","_finishConnect","_dragControlNode","edgeBeingEditedId","controlNodeFrom","_getNewTargetNode","controlNodeTo","_controlNodeTouch","_controlNodeDragStart","_controlNodeDrag","_controlNodeDragEnd","findBorderPositions","selectedNodes","selectedEdges","deleteFunction","_createWrappers","_removeManipulationDOM","_createButton","_cleanManipulatorHammers","_cleanupTemporaryNodesAndEdges","_unbindTemporaryUIs","_unbindTemporaryEvents","labelClassName","newFunction","boundFunction","UIfunctionName","functionName","eventName","domElement","indexTempEdge","indexTempNode","lastTouch","fromSelect","toSelect","overlappingNodeIds","_performEditEdge","targetNode","connectionEdge","connectFromId","_performAddEdge","clickData","defaultData","sourceNodeId","targetNodeId","_FloydWarshall","_FloydWarshall2","KamadaKawai","edgeStrength","distanceSolver","edgesArray","ignoreClusters","D_matrix","getDistances","_createL_matrix","_createK_matrix","innerThreshold","maxInnerIterations","maxEnergy","highE_nodeId","dE_dx","dE_dy","delta_m","subIterations","_getHighestEnergyNode2","_getHighestEnergyNode","_getHighestEnergyNode3","_moveNode","_getEnergy2","_getEnergy","_getEnergy3","maxEnergyNodeId","dE_dx_max","dE_dy_max","nodeIdx","_getEnergy4","_getEnergy5","x_m","y_m","iIdx","x_i","y_i","denominator","K_matrix","L_matrix","d2E_dx2","d2E_dxdy","d2E_dy2","FloydWarshall","CanvasRenderingContext2D","square","s2","ir","triangleDown","star","diamond","r2d","kappa","ox","oy","xe","ye","xm","ym","wEllipse","hEllipse","ymb","yeb","xt","yt","xl","yl","xr","yr","patternLength","slope","distRemaining","patternIndex","dashLength","parseDOT","parseGraph","nextPreview","isAlphaNumeric","regexAlphaNumeric","setValue","graphs","attr","getToken","tokenType","TOKENTYPE","NULL","isComment","DELIMITER","c2","DELIMITERS","IDENTIFIER","newSyntaxError","UNKNOWN","chop","parseStatements","parseStatement","subgraph","parseSubgraph","parseEdge","parseAttributeStatement","parseNodeStatement","subgraphs","parseAttributeList","maxLength","forEach2","elem1","elem2","setProp","convertAttr","mapping","visProp","visPropI","graphData","dotNode","graphNode","NODE_ATTR_MAPPING","convertEdge","dotEdge","graphEdge","EDGE_ATTR_MAPPING","subEdge","fontsize","fontcolor","labelfontcolor","fontname","fillcolor","labeltooltip","{","}","[","]",";","=",",","->","--","gephiJSON","inheritColor","gEdges","gNodes","gEdge","gNode","edit","del","back","addDescription","edgeDescription","editEdgeDescription","createEdgeError","deleteClusterError","editClusterError"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyBA,cAEA,SAA2CA,EAAMC,GAC1B,gBAAZC,UAA0C,gBAAXC,QACxCA,OAAOD,QAAUD,IACQ,kBAAXG,SAAyBA,OAAOC,IAC9CD,UAAWH,GACe,gBAAZC,SACdA,QAAa,IAAID,IAEjBD,EAAU,IAAIC,KACbK,KAAM,WACT,MAAgB,UAAUC,GAKhB,QAASC,GAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUP,OAGnC,IAAIC,GAASO,EAAiBD,IAC7BP,WACAS,GAAIF,EACJG,QAAQ,EAUT,OANAL,GAAQE,GAAUI,KAAKV,EAAOD,QAASC,EAAQA,EAAOD,QAASM,GAG/DL,EAAOS,QAAS,EAGTT,EAAOD,QAvBf,GAAIQ,KAqCJ,OATAF,GAAoBM,EAAIP,EAGxBC,EAAoBO,EAAIL,EAGxBF,EAAoBQ,EAAI,GAGjBR,EAAoB,KAK/B,SAASL,EAAQD,EAASM,GAK9BN,EAAQe,KAAOT,EAAoB,GACnCN,EAAQgB,QAAUV,EAAoB,GAGtCN,EAAQiB,QAAUX,EAAoB,GACtCN,EAAQkB,SAAWZ,EAAoB,IACvCN,EAAQmB,MAAQb,EAAoB,GAGpCN,EAAQoB,QAAUd,EAAoB,IACtCN,EAAQqB,SACNC,OAAQhB,EAAoB,IAC5BiB,OAAQjB,EAAoB,IAC5BkB,QAASlB,EAAoB,IAC7BmB,QAASnB,EAAoB,IAC7BoB,OAAQpB,EAAoB,IAC5BqB,WAAYrB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BC,oBAAqB,kFACrBC,gBAAiB,wCACjBC,mBAAoB,0CACpBC,iBAAkB,0CAEpB9wI,EAAe,MAAIA,EAAY,GAC/BA,EAAe,MAAIA,EAAY","file":"vis.map"} \ No newline at end of file diff --git a/dist/vis.min.js b/dist/vis.min.js index d340ccc9..80c38170 100644 --- a/dist/vis.min.js +++ b/dist/vis.min.js @@ -4,8 +4,8 @@ * * A dynamic, browser-based visualization library. * - * @version 4.15.0 - * @date 2016-02-23 + * @version 4.15.1 + * @date 2016-03-08 * * @license * Copyright (C) 2011-2016 Almende B.V, http://almende.com @@ -22,24 +22,24 @@ * * Vis.js may be distributed under either license. */ -"use strict";!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.vis=e():t.vis=e()}(this,function(){return function(t){function e(o){if(i[o])return i[o].exports;var n=i[o]={exports:{},id:o,loaded:!1};return t[o].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){e.util=i(1),e.DOMutil=i(7),e.DataSet=i(8),e.DataView=i(10),e.Queue=i(9),e.Graph3d=i(11),e.graph3d={Camera:i(15),Filter:i(16),Point2d:i(14),Point3d:i(13),Slider:i(17),StepNumber:i(18)},e.Timeline=i(19),e.Graph2d=i(48),e.timeline={Core:i(27),DateUtil:i(26),Range:i(23),stack:i(31),TimeStep:i(29),components:{items:{Item:i(33),BackgroundItem:i(37),BoxItem:i(35),PointItem:i(36),RangeItem:i(32)},BackgroundGroup:i(34),Component:i(25),CurrentTime:i(43),CustomTime:i(41),DataAxis:i(50),DataScale:i(51),GraphGroup:i(52),Group:i(30),ItemSet:i(28),Legend:i(56),LineGraph:i(49),TimeAxis:i(38)}},e.Network=i(58),e.network={Images:i(116),dotparser:i(114),gephiParser:i(115),allOptions:i(110)},e.network.convertDot=function(t){return e.network.dotparser.DOTToGraph(t)},e.network.convertGephi=function(t,i){return e.network.gephiParser.parseGephi(t,i)},e.moment=i(2),e.Hammer=i(20),e.keycharm=i(40)},function(t,e,i){var o=i(2),n=i(6);e.isNumber=function(t){return t instanceof Number||"number"==typeof t},e.recursiveDOMDelete=function(t){if(t)for(;t.hasChildNodes()===!0;)e.recursiveDOMDelete(t.firstChild),t.removeChild(t.firstChild)},e.giveRange=function(t,e,i,o){if(e==t)return.5;var n=1/(e-t);return Math.max(0,(o-t)*n)},e.isString=function(t){return t instanceof String||"string"==typeof t},e.isDate=function(t){if(t instanceof Date)return!0;if(e.isString(t)){var i=s.exec(t);if(i)return!0;if(!isNaN(Date.parse(t)))return!0}return!1},e.randomUUID=function(){return n.v4()},e.assignAllKeys=function(t,e){for(var i in t)t.hasOwnProperty(i)&&"object"!=typeof t[i]&&(t[i]=e)},e.fillIfDefined=function(t,i){var o=arguments.length<=2||void 0===arguments[2]?!1:arguments[2];for(var n in t)void 0!==i[n]&&("object"!=typeof i[n]?void 0!==i[n]&&null!==i[n]||void 0===t[n]||o!==!0?t[n]=i[n]:delete t[n]:"object"==typeof t[n]&&e.fillIfDefined(t[n],i[n],o))},e.protoExtend=function(t,e){for(var i=1;ii;i++)if(t[i]!=e[i])return!1;return!0},e.convert=function(t,i){var n;if(void 0!==t){if(null===t)return null;if(!i)return t;if("string"!=typeof i&&!(i instanceof String))throw new Error("Type must be a string");switch(i){case"boolean":case"Boolean":return Boolean(t);case"number":case"Number":return Number(t.valueOf());case"string":case"String":return String(t);case"Date":if(e.isNumber(t))return new Date(t);if(t instanceof Date)return new Date(t.valueOf());if(o.isMoment(t))return new Date(t.valueOf());if(e.isString(t))return n=s.exec(t),n?new Date(Number(n[1])):o(t).toDate();throw new Error("Cannot convert object of type "+e.getType(t)+" to type Date");case"Moment":if(e.isNumber(t))return o(t);if(t instanceof Date)return o(t.valueOf());if(o.isMoment(t))return o(t);if(e.isString(t))return n=s.exec(t),o(n?Number(n[1]):t);throw new Error("Cannot convert object of type "+e.getType(t)+" to type Date");case"ISODate":if(e.isNumber(t))return new Date(t);if(t instanceof Date)return t.toISOString();if(o.isMoment(t))return t.toDate().toISOString();if(e.isString(t))return n=s.exec(t),n?new Date(Number(n[1])).toISOString():new Date(t).toISOString();throw new Error("Cannot convert object of type "+e.getType(t)+" to type ISODate");case"ASPDate":if(e.isNumber(t))return"/Date("+t+")/";if(t instanceof Date)return"/Date("+t.valueOf()+")/";if(e.isString(t)){n=s.exec(t);var r;return r=n?new Date(Number(n[1])).valueOf():new Date(t).valueOf(),"/Date("+r+")/"}throw new Error("Cannot convert object of type "+e.getType(t)+" to type ASPDate");default:throw new Error('Unknown type "'+i+'"')}}};var s=/^\/?Date\((\-?\d+)/i;e.getType=function(t){var e=typeof t;return"object"==e?null===t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":Array.isArray(t)?"Array":t instanceof Date?"Date":"Object":"number"==e?"Number":"boolean"==e?"Boolean":"string"==e?"String":void 0===e?"undefined":e},e.copyAndExtendArray=function(t,e){for(var i=[],o=0;oi;i++)e(t[i],i,t);else for(i in t)t.hasOwnProperty(i)&&e(t[i],i,t)},e.toArray=function(t){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(t[i]);return e},e.updateProperty=function(t,e,i){return t[e]!==i?(t[e]=i,!0):!1},e.throttle=function(t,e){var i=null,o=!1;return function n(){i?o=!0:(o=!1,t(),i=setTimeout(function(){i=null,o&&n()},e))}},e.addEventListener=function(t,e,i,o){t.addEventListener?(void 0===o&&(o=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.addEventListener(e,i,o)):t.attachEvent("on"+e,i)},e.removeEventListener=function(t,e,i,o){t.removeEventListener?(void 0===o&&(o=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.removeEventListener(e,i,o)):t.detachEvent("on"+e,i)},e.preventDefault=function(t){t||(t=window.event),t.preventDefault?t.preventDefault():t.returnValue=!1},e.getTarget=function(t){t||(t=window.event);var e;return t.target?e=t.target:t.srcElement&&(e=t.srcElement),void 0!=e.nodeType&&3==e.nodeType&&(e=e.parentNode),e},e.hasParent=function(t,e){for(var i=t;i;){if(i===e)return!0;i=i.parentNode}return!1},e.option={},e.option.asBoolean=function(t,e){return"function"==typeof t&&(t=t()),null!=t?0!=t:e||null},e.option.asNumber=function(t,e){return"function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null},e.option.asString=function(t,e){return"function"==typeof t&&(t=t()),null!=t?String(t):e||null},e.option.asSize=function(t,i){return"function"==typeof t&&(t=t()),e.isString(t)?t:e.isNumber(t)?t+"px":i||null},e.option.asElement=function(t,e){return"function"==typeof t&&(t=t()),t||e||null},e.hexToRGB=function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,i,o){return e+e+i+i+o+o});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null},e.overrideOpacity=function(t,i){if(-1!=t.indexOf("rgba"))return t;if(-1!=t.indexOf("rgb")){var o=t.substr(t.indexOf("(")+1).replace(")","").split(",");return"rgba("+o[0]+","+o[1]+","+o[2]+","+i+")"}var o=e.hexToRGB(t);return null==o?t:"rgba("+o.r+","+o.g+","+o.b+","+i+")"},e.RGBToHex=function(t,e,i){return"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1)},e.parseColor=function(t){var i;if(e.isString(t)===!0){if(e.isValidRGB(t)===!0){var o=t.substr(4).substr(0,t.length-5).split(",").map(function(t){return parseInt(t)});t=e.RGBToHex(o[0],o[1],o[2])}if(e.isValidHex(t)===!0){var n=e.hexToHSV(t),s={h:n.h,s:.8*n.s,v:Math.min(1,1.02*n.v)},r={h:n.h,s:Math.min(1,1.25*n.s),v:.8*n.v},a=e.HSVToHex(r.h,r.s,r.v),h=e.HSVToHex(s.h,s.s,s.v);i={background:t,border:a,highlight:{background:h,border:a},hover:{background:h,border:a}}}else i={background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else i={},i.background=t.background||void 0,i.border=t.border||void 0,e.isString(t.highlight)?i.highlight={border:t.highlight,background:t.highlight}:(i.highlight={},i.highlight.background=t.highlight&&t.highlight.background||void 0,i.highlight.border=t.highlight&&t.highlight.border||void 0),e.isString(t.hover)?i.hover={border:t.hover,background:t.hover}:(i.hover={},i.hover.background=t.hover&&t.hover.background||void 0,i.hover.border=t.hover&&t.hover.border||void 0);return i},e.RGBToHSV=function(t,e,i){t/=255,e/=255,i/=255;var o=Math.min(t,Math.min(e,i)),n=Math.max(t,Math.max(e,i));if(o==n)return{h:0,s:0,v:o};var s=t==o?e-i:i==o?t-e:i-t,r=t==o?3:i==o?1:5,a=60*(r-s/(n-o))/360,h=(n-o)/n,d=n;return{h:a,s:h,v:d}};var r={split:function(t){var e={};return t.split(";").forEach(function(t){if(""!=t.trim()){var i=t.split(":"),o=i[0].trim(),n=i[1].trim();e[o]=n}}),e},join:function(t){return Object.keys(t).map(function(e){return e+": "+t[e]}).join("; ")}};e.addCssText=function(t,i){var o=r.split(t.style.cssText),n=r.split(i),s=e.extend(o,n);t.style.cssText=r.join(s)},e.removeCssText=function(t,e){var i=r.split(t.style.cssText),o=r.split(e);for(var n in o)o.hasOwnProperty(n)&&delete i[n];t.style.cssText=r.join(i)},e.HSVToRGB=function(t,e,i){var o,n,s,r=Math.floor(6*t),a=6*t-r,h=i*(1-e),d=i*(1-a*e),l=i*(1-(1-a)*e);switch(r%6){case 0:o=i,n=l,s=h;break;case 1:o=d,n=i,s=h;break;case 2:o=h,n=i,s=l;break;case 3:o=h,n=d,s=i;break;case 4:o=l,n=h,s=i;break;case 5:o=i,n=h,s=d}return{r:Math.floor(255*o),g:Math.floor(255*n),b:Math.floor(255*s)}},e.HSVToHex=function(t,i,o){var n=e.HSVToRGB(t,i,o);return e.RGBToHex(n.r,n.g,n.b)},e.hexToHSV=function(t){var i=e.hexToRGB(t);return e.RGBToHSV(i.r,i.g,i.b)},e.isValidHex=function(t){var e=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t);return e},e.isValidRGB=function(t){t=t.replace(" ","");var e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/i.test(t);return e},e.isValidRGBA=function(t){t=t.replace(" ","");var e=/rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(.{1,3})\)/i.test(t);return e},e.selectiveBridgeObject=function(t,i){if("object"==typeof i){for(var o=Object.create(i),n=0;n0&&e(o,t[n-1])<0;n--)t[n]=t[n-1];t[n]=o}return t},e.mergeOptions=function(t,e,i){var o=(arguments.length<=3||void 0===arguments[3]?!1:arguments[3],arguments.length<=4||void 0===arguments[4]?{}:arguments[4]);if(null===e[i])t[i]=Object.create(o[i]);else if(void 0!==e[i])if("boolean"==typeof e[i])t[i].enabled=e[i];else{void 0===e[i].enabled&&(t[i].enabled=!0);for(var n in e[i])e[i].hasOwnProperty(n)&&(t[i][n]=e[i][n])}},e.binarySearchCustom=function(t,e,i,o){for(var n=1e4,s=0,r=0,a=t.length-1;a>=r&&n>s;){var h=Math.floor((r+a)/2),d=t[h],l=void 0===o?d[i]:d[i][o],u=e(l);if(0==u)return h;-1==u?r=h+1:a=h-1,s++}return-1},e.binarySearchValue=function(t,e,i,o,n){for(var s,r,a,h,d=1e4,l=0,u=0,c=t.length-1,n=void 0!=n?n:function(t,e){return t==e?0:e>t?-1:1};c>=u&&d>l;){if(h=Math.floor(.5*(c+u)),s=t[Math.max(0,h-1)][i],r=t[h][i],a=t[Math.min(t.length-1,h+1)][i],0==n(r,e))return h;if(n(s,e)<0&&n(r,e)>0)return"before"==o?Math.max(0,h-1):h;if(n(r,e)<0&&n(a,e)>0)return"before"==o?h:Math.min(t.length-1,h+1);n(r,e)<0?u=h+1:c=h-1,l++}return-1},e.easingFunctions={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return.5>t?2*t*t:-1+(4-2*t)*t},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return.5>t?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return.5>t?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return.5>t?16*t*t*t*t*t:1+16*--t*t*t*t*t}}},function(t,e,i){t.exports="undefined"!=typeof window&&window.moment||i(3)},function(t,e,i){(function(t){!function(e,i){t.exports=i()}(this,function(){function e(){return qi.apply(null,arguments)}function i(t){qi=t}function o(t){return"[object Array]"===Object.prototype.toString.call(t)}function n(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function s(t,e){var i,o=[];for(i=0;i0)for(i in Zi)o=Zi[i],n=e[o],p(n)||(t[o]=n);return t}function v(t){f(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),Ki===!1&&(Ki=!0,e.updateOffset(this),Ki=!1)}function m(t){return t instanceof v||null!=t&&null!=t._isAMomentObject}function g(t){return 0>t?Math.ceil(t):Math.floor(t)}function y(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=g(e)),i}function b(t,e,i){var o,n=Math.min(t.length,e.length),s=Math.abs(t.length-e.length),r=0;for(o=0;n>o;o++)(i&&t[o]!==e[o]||!i&&y(t[o])!==y(e[o]))&&r++;return r+s}function _(){}function w(t){return t?t.toLowerCase().replace("_","-"):t}function x(t){for(var e,i,o,n,s=0;s0;){if(o=k(n.slice(0,e).join("-")))return o;if(i&&i.length>=e&&b(n,i,!0)>=e-1)break;e--}s++}return null}function k(e){var i=null;if(!Ji[e]&&"undefined"!=typeof t&&t&&t.exports)try{i=Xi._abbr,!function(){var t=new Error('Cannot find module "./locale"');throw t.code="MODULE_NOT_FOUND",t}(),O(i)}catch(o){}return Ji[e]}function O(t,e){var i;return t&&(i=p(e)?D(t):M(t,e),i&&(Xi=i)),Xi._abbr}function M(t,e){return null!==e?(e.abbr=t,Ji[t]=Ji[t]||new _,Ji[t].set(e),O(t),Ji[t]):(delete Ji[t],null)}function D(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Xi;if(!o(t)){if(e=k(t))return e;t=[t]}return x(t)}function C(t,e){var i=t.toLowerCase();Qi[i]=Qi[i+"s"]=Qi[e]=t}function S(t){return"string"==typeof t?Qi[t]||Qi[t.toLowerCase()]:void 0}function T(t){var e,i,o={};for(i in t)r(t,i)&&(e=S(i),e&&(o[e]=t[i]));return o}function E(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function P(t,i){return function(o){return null!=o?(N(this,t,o),e.updateOffset(this,i),this):I(this,t)}}function I(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function N(t,e,i){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](i)}function z(t,e){var i;if("object"==typeof t)for(i in t)this.set(i,t[i]);else if(t=S(t),E(this[t]))return this[t](e);return this}function L(t,e,i){var o=""+Math.abs(t),n=e-o.length,s=t>=0;return(s?i?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+o}function A(t,e,i,o){var n=o;"string"==typeof o&&(n=function(){return this[o]()}),t&&(io[t]=n),e&&(io[e[0]]=function(){return L(n.apply(this,arguments),e[1],e[2])}),i&&(io[i]=function(){return this.localeData().ordinal(n.apply(this,arguments),t)})}function R(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function F(t){var e,i,o=t.match($i);for(e=0,i=o.length;i>e;e++)io[o[e]]?o[e]=io[o[e]]:o[e]=R(o[e]);return function(n){var s="";for(e=0;i>e;e++)s+=o[e]instanceof Function?o[e].call(n,t):o[e];return s}}function B(t,e){return t.isValid()?(e=j(e,t.localeData()),eo[e]=eo[e]||F(e),eo[e](t)):t.localeData().invalidDate()}function j(t,e){function i(t){return e.longDateFormat(t)||t}var o=5;for(to.lastIndex=0;o>=0&&to.test(t);)t=t.replace(to,i),to.lastIndex=0,o-=1;return t}function H(t,e,i){wo[t]=E(e)?e:function(t,o){return t&&i?i:e}}function W(t,e){return r(wo,t)?wo[t](e._strict,e._locale):new RegExp(Y(t))}function Y(t){return G(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,o,n){return e||i||o||n}))}function G(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function V(t,e){var i,o=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(o=function(t,i){i[e]=y(t)}),i=0;io;o++){if(n=h([2e3,o]),i&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),i||this._monthsParse[o]||(s="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[o]=new RegExp(s.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[o].test(t))return o;if(i&&"MMM"===e&&this._shortMonthsParse[o].test(t))return o;if(!i&&this._monthsParse[o].test(t))return o}}function Q(t,e){var i;return t.isValid()?"string"==typeof e&&(e=t.localeData().monthsParse(e),"number"!=typeof e)?t:(i=Math.min(t.date(),X(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t):t}function $(t){return null!=t?(Q(this,t),e.updateOffset(this,!0),this):I(this,"Month")}function tt(){return X(this.year(),this.month())}function et(t){return this._monthsParseExact?(r(this,"_monthsRegex")||ot.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex}function it(t){return this._monthsParseExact?(r(this,"_monthsRegex")||ot.call(this),t?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex}function ot(){function t(t,e){return e.length-t.length}var e,i,o=[],n=[],s=[];for(e=0;12>e;e++)i=h([2e3,e]),o.push(this.monthsShort(i,"")),n.push(this.months(i,"")),s.push(this.months(i,"")),s.push(this.monthsShort(i,""));for(o.sort(t),n.sort(t),s.sort(t),e=0;12>e;e++)o[e]=G(o[e]),n[e]=G(n[e]),s[e]=G(s[e]);this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")$","i"),this._monthsShortStrictRegex=new RegExp("^("+o.join("|")+")$","i")}function nt(t){var e,i=t._a;return i&&-2===l(t).overflow&&(e=i[Oo]<0||i[Oo]>11?Oo:i[Mo]<1||i[Mo]>X(i[ko],i[Oo])?Mo:i[Do]<0||i[Do]>24||24===i[Do]&&(0!==i[Co]||0!==i[So]||0!==i[To])?Do:i[Co]<0||i[Co]>59?Co:i[So]<0||i[So]>59?So:i[To]<0||i[To]>999?To:-1,l(t)._overflowDayOfYear&&(ko>e||e>Mo)&&(e=Mo),l(t)._overflowWeeks&&-1===e&&(e=Eo),l(t)._overflowWeekday&&-1===e&&(e=Po),l(t).overflow=e),t}function st(t){e.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function rt(t,e){var i=!0;return a(function(){return i&&(st(t+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),i=!1),e.apply(this,arguments)},e)}function at(t,e){Ro[t]||(st(e),Ro[t]=!0)}function ht(t){var e,i,o,n,s,r,a=t._i,h=Fo.exec(a)||Bo.exec(a);if(h){for(l(t).iso=!0,e=0,i=Ho.length;i>e;e++)if(Ho[e][1].exec(h[1])){n=Ho[e][0],o=Ho[e][2]!==!1;break}if(null==n)return void(t._isValid=!1);if(h[3]){for(e=0,i=Wo.length;i>e;e++)if(Wo[e][1].exec(h[3])){s=(h[2]||" ")+Wo[e][0];break}if(null==s)return void(t._isValid=!1)}if(!o&&null!=s)return void(t._isValid=!1);if(h[4]){if(!jo.exec(h[4]))return void(t._isValid=!1);r="Z"}t._f=n+(s||"")+(r||""),kt(t)}else t._isValid=!1}function dt(t){var i=Yo.exec(t._i);return null!==i?void(t._d=new Date(+i[1])):(ht(t),void(t._isValid===!1&&(delete t._isValid,e.createFromInputFallback(t))))}function lt(t,e,i,o,n,s,r){var a=new Date(t,e,i,o,n,s,r);return 100>t&&t>=0&&isFinite(a.getFullYear())&&a.setFullYear(t),a}function ut(t){var e=new Date(Date.UTC.apply(null,arguments));return 100>t&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function ct(t){return pt(t)?366:365}function pt(t){return t%4===0&&t%100!==0||t%400===0}function ft(){return pt(this.year())}function vt(t,e,i){var o=7+e-i,n=(7+ut(t,0,o).getUTCDay()-e)%7;return-n+o-1}function mt(t,e,i,o,n){var s,r,a=(7+i-o)%7,h=vt(t,o,n),d=1+7*(e-1)+a+h;return 0>=d?(s=t-1,r=ct(s)+d):d>ct(t)?(s=t+1,r=d-ct(t)):(s=t,r=d),{year:s,dayOfYear:r}}function gt(t,e,i){var o,n,s=vt(t.year(),e,i),r=Math.floor((t.dayOfYear()-s-1)/7)+1;return 1>r?(n=t.year()-1,o=r+yt(n,e,i)):r>yt(t.year(),e,i)?(o=r-yt(t.year(),e,i),n=t.year()+1):(n=t.year(),o=r),{week:o,year:n}}function yt(t,e,i){var o=vt(t,e,i),n=vt(t+1,e,i);return(ct(t)-o+n)/7}function bt(t,e,i){return null!=t?t:null!=e?e:i}function _t(t){var i=new Date(e.now());return t._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()]}function wt(t){var e,i,o,n,s=[];if(!t._d){for(o=_t(t),t._w&&null==t._a[Mo]&&null==t._a[Oo]&&xt(t),t._dayOfYear&&(n=bt(t._a[ko],o[ko]),t._dayOfYear>ct(n)&&(l(t)._overflowDayOfYear=!0),i=ut(n,0,t._dayOfYear),t._a[Oo]=i.getUTCMonth(),t._a[Mo]=i.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=s[e]=o[e];for(;7>e;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Do]&&0===t._a[Co]&&0===t._a[So]&&0===t._a[To]&&(t._nextDay=!0,t._a[Do]=0),t._d=(t._useUTC?ut:lt).apply(null,s),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Do]=24)}}function xt(t){var e,i,o,n,s,r,a,h;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(s=1,r=4,i=bt(e.GG,t._a[ko],gt(Pt(),1,4).year),o=bt(e.W,1),n=bt(e.E,1),(1>n||n>7)&&(h=!0)):(s=t._locale._week.dow,r=t._locale._week.doy,i=bt(e.gg,t._a[ko],gt(Pt(),s,r).year),o=bt(e.w,1),null!=e.d?(n=e.d,(0>n||n>6)&&(h=!0)):null!=e.e?(n=e.e+s,(e.e<0||e.e>6)&&(h=!0)):n=s),1>o||o>yt(i,s,r)?l(t)._overflowWeeks=!0:null!=h?l(t)._overflowWeekday=!0:(a=mt(i,o,n,s,r),t._a[ko]=a.year,t._dayOfYear=a.dayOfYear)}function kt(t){if(t._f===e.ISO_8601)return void ht(t);t._a=[],l(t).empty=!0;var i,o,n,s,r,a=""+t._i,h=a.length,d=0;for(n=j(t._f,t._locale).match($i)||[],i=0;i0&&l(t).unusedInput.push(r),a=a.slice(a.indexOf(o)+o.length),d+=o.length),io[s]?(o?l(t).empty=!1:l(t).unusedTokens.push(s),q(s,o,t)):t._strict&&!o&&l(t).unusedTokens.push(s);l(t).charsLeftOver=h-d,a.length>0&&l(t).unusedInput.push(a),l(t).bigHour===!0&&t._a[Do]<=12&&t._a[Do]>0&&(l(t).bigHour=void 0),t._a[Do]=Ot(t._locale,t._a[Do],t._meridiem),wt(t),nt(t)}function Ot(t,e,i){var o;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?(o=t.isPM(i),o&&12>e&&(e+=12),o||12!==e||(e=0),e):e}function Mt(t){var e,i,o,n,s;if(0===t._f.length)return l(t).invalidFormat=!0,void(t._d=new Date(NaN));for(n=0;ns)&&(o=s,i=e));a(t,i||e)}function Dt(t){if(!t._d){var e=T(t._i);t._a=s([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),wt(t)}}function Ct(t){var e=new v(nt(St(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function St(t){var e=t._i,i=t._f;return t._locale=t._locale||D(t._l),null===e||void 0===i&&""===e?c({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),m(e)?new v(nt(e)):(o(i)?Mt(t):i?kt(t):n(e)?t._d=e:Tt(t),u(t)||(t._d=null),t))}function Tt(t){var i=t._i;void 0===i?t._d=new Date(e.now()):n(i)?t._d=new Date(+i):"string"==typeof i?dt(t):o(i)?(t._a=s(i.slice(0),function(t){return parseInt(t,10)}),wt(t)):"object"==typeof i?Dt(t):"number"==typeof i?t._d=new Date(i):e.createFromInputFallback(t)}function Et(t,e,i,o,n){var s={};return"boolean"==typeof i&&(o=i,i=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=n,s._l=i,s._i=t,s._f=e,s._strict=o,Ct(s)}function Pt(t,e,i,o){return Et(t,e,i,o,!1)}function It(t,e){var i,n;if(1===e.length&&o(e[0])&&(e=e[0]),!e.length)return Pt();for(i=e[0],n=1;nt&&(t=-t,i="-"),i+L(~~(t/60),2)+e+L(~~t%60,2)})}function Ft(t,e){var i=(e||"").match(t)||[],o=i[i.length-1]||[],n=(o+"").match(Xo)||["-",0,0],s=+(60*n[1])+y(n[2]);return"+"===n[0]?s:-s}function Bt(t,i){var o,s;return i._isUTC?(o=i.clone(),s=(m(t)||n(t)?+t:+Pt(t))-+o,o._d.setTime(+o._d+s),e.updateOffset(o,!1),o):Pt(t).local()}function jt(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Ht(t,i){var o,n=this._offset||0;return this.isValid()?null!=t?("string"==typeof t?t=Ft(yo,t):Math.abs(t)<16&&(t=60*t),!this._isUTC&&i&&(o=jt(this)),this._offset=t,this._isUTC=!0,null!=o&&this.add(o,"m"),n!==t&&(!i||this._changeInProgress?oe(this,Qt(t-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?n:jt(this):null!=t?this:NaN}function Wt(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Yt(t){return this.utcOffset(0,t)}function Gt(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(jt(this),"m")),this}function Vt(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Ft(go,this._i)),this}function Ut(t){return this.isValid()?(t=t?Pt(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function qt(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Xt(){if(!p(this._isDSTShifted))return this._isDSTShifted;var t={};if(f(t,this),t=St(t),t._a){var e=t._isUTC?h(t._a):Pt(t._a);this._isDSTShifted=this.isValid()&&b(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Zt(){return this.isValid()?!this._isUTC:!1}function Kt(){return this.isValid()?this._isUTC:!1}function Jt(){return this.isValid()?this._isUTC&&0===this._offset:!1}function Qt(t,e){var i,o,n,s=t,a=null;return At(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(s={},e?s[e]=t:s.milliseconds=t):(a=Zo.exec(t))?(i="-"===a[1]?-1:1,s={y:0,d:y(a[Mo])*i,h:y(a[Do])*i,m:y(a[Co])*i,s:y(a[So])*i,ms:y(a[To])*i}):(a=Ko.exec(t))?(i="-"===a[1]?-1:1,s={y:$t(a[2],i),M:$t(a[3],i),d:$t(a[4],i),h:$t(a[5],i),m:$t(a[6],i),s:$t(a[7],i),w:$t(a[8],i)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(n=ee(Pt(s.from),Pt(s.to)),s={},s.ms=n.milliseconds,s.M=n.months),o=new Lt(s),At(t)&&r(t,"_locale")&&(o._locale=t._locale),o}function $t(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function te(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function ee(t,e){var i;return t.isValid()&&e.isValid()?(e=Bt(e,t),t.isBefore(e)?i=te(t,e):(i=te(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function ie(t,e){return function(i,o){var n,s;return null===o||isNaN(+o)||(at(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),s=i,i=o,o=s),i="string"==typeof i?+i:i,n=Qt(i,o),oe(this,n,t),this}}function oe(t,i,o,n){var s=i._milliseconds,r=i._days,a=i._months;t.isValid()&&(n=null==n?!0:n,s&&t._d.setTime(+t._d+s*o),r&&N(t,"Date",I(t,"Date")+r*o),a&&Q(t,I(t,"Month")+a*o),n&&e.updateOffset(t,r||a))}function ne(t,e){var i=t||Pt(),o=Bt(i,this).startOf("day"),n=this.diff(o,"days",!0),s=-6>n?"sameElse":-1>n?"lastWeek":0>n?"lastDay":1>n?"sameDay":2>n?"nextDay":7>n?"nextWeek":"sameElse",r=e&&(E(e[s])?e[s]():e[s]);return this.format(r||this.localeData().calendar(s,this,Pt(i)))}function se(){return new v(this)}function re(t,e){var i=m(t)?t:Pt(t);return this.isValid()&&i.isValid()?(e=S(p(e)?"millisecond":e),"millisecond"===e?+this>+i:+i<+this.clone().startOf(e)):!1}function ae(t,e){var i=m(t)?t:Pt(t);return this.isValid()&&i.isValid()?(e=S(p(e)?"millisecond":e),"millisecond"===e?+i>+this:+this.clone().endOf(e)<+i):!1}function he(t,e,i){return this.isAfter(t,i)&&this.isBefore(e,i)}function de(t,e){var i,o=m(t)?t:Pt(t);return this.isValid()&&o.isValid()?(e=S(e||"millisecond"),"millisecond"===e?+this===+o:(i=+o,+this.clone().startOf(e)<=i&&i<=+this.clone().endOf(e))):!1}function le(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function ue(t,e){ -return this.isSame(t,e)||this.isBefore(t,e)}function ce(t,e,i){var o,n,s,r;return this.isValid()?(o=Bt(t,this),o.isValid()?(n=6e4*(o.utcOffset()-this.utcOffset()),e=S(e),"year"===e||"month"===e||"quarter"===e?(r=pe(this,o),"quarter"===e?r/=3:"year"===e&&(r/=12)):(s=this-o,r="second"===e?s/1e3:"minute"===e?s/6e4:"hour"===e?s/36e5:"day"===e?(s-n)/864e5:"week"===e?(s-n)/6048e5:s),i?r:g(r)):NaN):NaN}function pe(t,e){var i,o,n=12*(e.year()-t.year())+(e.month()-t.month()),s=t.clone().add(n,"months");return 0>e-s?(i=t.clone().add(n-1,"months"),o=(e-s)/(s-i)):(i=t.clone().add(n+1,"months"),o=(e-s)/(i-s)),-(n+o)}function fe(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ve(){var t=this.clone().utc();return 0s&&(e=s),He.call(this,t,e,i,o,n))}function He(t,e,i,o,n){var s=mt(t,e,i,o,n),r=ut(s.year,0,s.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}function We(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Ye(t){return gt(t,this._week.dow,this._week.doy).week}function Ge(){return this._week.dow}function Ve(){return this._week.doy}function Ue(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function qe(t){var e=gt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Xe(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function Ze(t,e){return o(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]}function Ke(t){return this._weekdaysShort[t.day()]}function Je(t){return this._weekdaysMin[t.day()]}function Qe(t,e,i){var o,n,s;for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;7>o;o++){if(n=Pt([2e3,1]).day(o),i&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(n,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(n,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(n,"").replace(".",".?")+"$","i")),this._weekdaysParse[o]||(s="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[o]=new RegExp(s.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[o].test(t))return o;if(i&&"ddd"===e&&this._shortWeekdaysParse[o].test(t))return o;if(i&&"dd"===e&&this._minWeekdaysParse[o].test(t))return o;if(!i&&this._weekdaysParse[o].test(t))return o}}function $e(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Xe(t,this.localeData()),this.add(t-e,"d")):e}function ti(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function ei(t){return this.isValid()?null==t?this.day()||7:this.day(this.day()%7?t:t-7):null!=t?this:NaN}function ii(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function oi(){return this.hours()%12||12}function ni(t,e){A(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function si(t,e){return e._meridiemParse}function ri(t){return"p"===(t+"").toLowerCase().charAt(0)}function ai(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}function hi(t,e){e[To]=y(1e3*("0."+t))}function di(){return this._isUTC?"UTC":""}function li(){return this._isUTC?"Coordinated Universal Time":""}function ui(t){return Pt(1e3*t)}function ci(){return Pt.apply(null,arguments).parseZone()}function pi(t,e,i){var o=this._calendar[t];return E(o)?o.call(e,i):o}function fi(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])}function vi(){return this._invalidDate}function mi(t){return this._ordinal.replace("%d",t)}function gi(t){return t}function yi(t,e,i,o){var n=this._relativeTime[i];return E(n)?n(t,e,i,o):n.replace(/%d/i,t)}function bi(t,e){var i=this._relativeTime[t>0?"future":"past"];return E(i)?i(e):i.replace(/%s/i,e)}function _i(t){var e,i;for(i in t)e=t[i],E(e)?this[i]=e:this["_"+i]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function wi(t,e,i,o){var n=D(),s=h().set(o,e);return n[i](s,t)}function xi(t,e,i,o,n){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return wi(t,e,i,n);var s,r=[];for(s=0;o>s;s++)r[s]=wi(t,s,i,n);return r}function ki(t,e){return xi(t,e,"months",12,"month")}function Oi(t,e){return xi(t,e,"monthsShort",12,"month")}function Mi(t,e){return xi(t,e,"weekdays",7,"day")}function Di(t,e){return xi(t,e,"weekdaysShort",7,"day")}function Ci(t,e){return xi(t,e,"weekdaysMin",7,"day")}function Si(){var t=this._data;return this._milliseconds=wn(this._milliseconds),this._days=wn(this._days),this._months=wn(this._months),t.milliseconds=wn(t.milliseconds),t.seconds=wn(t.seconds),t.minutes=wn(t.minutes),t.hours=wn(t.hours),t.months=wn(t.months),t.years=wn(t.years),this}function Ti(t,e,i,o){var n=Qt(e,i);return t._milliseconds+=o*n._milliseconds,t._days+=o*n._days,t._months+=o*n._months,t._bubble()}function Ei(t,e){return Ti(this,t,e,1)}function Pi(t,e){return Ti(this,t,e,-1)}function Ii(t){return 0>t?Math.floor(t):Math.ceil(t)}function Ni(){var t,e,i,o,n,s=this._milliseconds,r=this._days,a=this._months,h=this._data;return s>=0&&r>=0&&a>=0||0>=s&&0>=r&&0>=a||(s+=864e5*Ii(Li(a)+r),r=0,a=0),h.milliseconds=s%1e3,t=g(s/1e3),h.seconds=t%60,e=g(t/60),h.minutes=e%60,i=g(e/60),h.hours=i%24,r+=g(i/24),n=g(zi(r)),a+=n,r-=Ii(Li(n)),o=g(a/12),a%=12,h.days=r,h.months=a,h.years=o,this}function zi(t){return 4800*t/146097}function Li(t){return 146097*t/4800}function Ai(t){var e,i,o=this._milliseconds;if(t=S(t),"month"===t||"year"===t)return e=this._days+o/864e5,i=this._months+zi(e),"month"===t?i:i/12;switch(e=this._days+Math.round(Li(this._months)),t){case"week":return e/7+o/6048e5;case"day":return e+o/864e5;case"hour":return 24*e+o/36e5;case"minute":return 1440*e+o/6e4;case"second":return 86400*e+o/1e3;case"millisecond":return Math.floor(864e5*e)+o;default:throw new Error("Unknown unit "+t)}}function Ri(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*y(this._months/12)}function Fi(t){return function(){return this.as(t)}}function Bi(t){return t=S(t),this[t+"s"]()}function ji(t){return function(){return this._data[t]}}function Hi(){return g(this.days()/7)}function Wi(t,e,i,o,n){return n.relativeTime(e||1,!!i,t,o)}function Yi(t,e,i){var o=Qt(t).abs(),n=Rn(o.as("s")),s=Rn(o.as("m")),r=Rn(o.as("h")),a=Rn(o.as("d")),h=Rn(o.as("M")),d=Rn(o.as("y")),l=n=s&&["m"]||s=r&&["h"]||r=a&&["d"]||a=h&&["M"]||h=d&&["y"]||["yy",d];return l[2]=e,l[3]=+t>0,l[4]=i,Wi.apply(null,l)}function Gi(t,e){return void 0===Fn[t]?!1:void 0===e?Fn[t]:(Fn[t]=e,!0)}function Vi(t){var e=this.localeData(),i=Yi(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)}function Ui(){var t,e,i,o=Bn(this._milliseconds)/1e3,n=Bn(this._days),s=Bn(this._months);t=g(o/60),e=g(t/60),o%=60,t%=60,i=g(s/12),s%=12;var r=i,a=s,h=n,d=e,l=t,u=o,c=this.asSeconds();return c?(0>c?"-":"")+"P"+(r?r+"Y":"")+(a?a+"M":"")+(h?h+"D":"")+(d||l||u?"T":"")+(d?d+"H":"")+(l?l+"M":"")+(u?u+"S":""):"P0D"}var qi,Xi,Zi=e.momentProperties=[],Ki=!1,Ji={},Qi={},$i=/(\[[^\[]*\])|(\\)?([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?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,to=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,eo={},io={},oo=/\d/,no=/\d\d/,so=/\d{3}/,ro=/\d{4}/,ao=/[+-]?\d{6}/,ho=/\d\d?/,lo=/\d\d\d\d?/,uo=/\d\d\d\d\d\d?/,co=/\d{1,3}/,po=/\d{1,4}/,fo=/[+-]?\d{1,6}/,vo=/\d+/,mo=/[+-]?\d+/,go=/Z|[+-]\d\d:?\d\d/gi,yo=/Z|[+-]\d\d(?::?\d\d)?/gi,bo=/[+-]?\d+(\.\d{1,3})?/,_o=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,wo={},xo={},ko=0,Oo=1,Mo=2,Do=3,Co=4,So=5,To=6,Eo=7,Po=8;A("M",["MM",2],"Mo",function(){return this.month()+1}),A("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),A("MMMM",0,0,function(t){return this.localeData().months(this,t)}),C("month","M"),H("M",ho),H("MM",ho,no),H("MMM",function(t,e){return e.monthsShortRegex(t)}),H("MMMM",function(t,e){return e.monthsRegex(t)}),V(["M","MM"],function(t,e){e[Oo]=y(t)-1}),V(["MMM","MMMM"],function(t,e,i,o){var n=i._locale.monthsParse(t,o,i._strict);null!=n?e[Oo]=n:l(i).invalidMonth=t});var Io=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,No="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),zo="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Lo=_o,Ao=_o,Ro={};e.suppressDeprecationWarnings=!1;var Fo=/^\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)?)?/,Bo=/^\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)?)?/,jo=/Z|[+-]\d\d(?::?\d\d)?/,Ho=[["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}/]],Wo=[["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/]],Yo=/^\/?Date\((\-?\d+)/i;e.createFromInputFallback=rt("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),A("Y",0,0,function(){var t=this.year();return 9999>=t?""+t:"+"+t}),A(0,["YY",2],0,function(){return this.year()%100}),A(0,["YYYY",4],0,"year"),A(0,["YYYYY",5],0,"year"),A(0,["YYYYYY",6,!0],0,"year"),C("year","y"),H("Y",mo),H("YY",ho,no),H("YYYY",po,ro),H("YYYYY",fo,ao),H("YYYYYY",fo,ao),V(["YYYYY","YYYYYY"],ko),V("YYYY",function(t,i){i[ko]=2===t.length?e.parseTwoDigitYear(t):y(t)}),V("YY",function(t,i){i[ko]=e.parseTwoDigitYear(t)}),V("Y",function(t,e){e[ko]=parseInt(t,10)}),e.parseTwoDigitYear=function(t){return y(t)+(y(t)>68?1900:2e3)};var Go=P("FullYear",!1);e.ISO_8601=function(){};var Vo=rt("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=Pt.apply(null,arguments);return this.isValid()&&t.isValid()?this>t?this:t:c()}),Uo=rt("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=Pt.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:c()}),qo=function(){return Date.now?Date.now():+new Date};Rt("Z",":"),Rt("ZZ",""),H("Z",yo),H("ZZ",yo),V(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=Ft(yo,t)});var Xo=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var Zo=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,Ko=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;Qt.fn=Lt.prototype;var Jo=ie(1,"add"),Qo=ie(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var $o=rt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});A(0,["gg",2],0,function(){return this.weekYear()%100}),A(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Le("gggg","weekYear"),Le("ggggg","weekYear"),Le("GGGG","isoWeekYear"),Le("GGGGG","isoWeekYear"),C("weekYear","gg"),C("isoWeekYear","GG"),H("G",mo),H("g",mo),H("GG",ho,no),H("gg",ho,no),H("GGGG",po,ro),H("gggg",po,ro),H("GGGGG",fo,ao),H("ggggg",fo,ao),U(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,o){e[o.substr(0,2)]=y(t)}),U(["gg","GG"],function(t,i,o,n){i[n]=e.parseTwoDigitYear(t)}),A("Q",0,"Qo","quarter"),C("quarter","Q"),H("Q",oo),V("Q",function(t,e){e[Oo]=3*(y(t)-1)}),A("w",["ww",2],"wo","week"),A("W",["WW",2],"Wo","isoWeek"),C("week","w"),C("isoWeek","W"),H("w",ho),H("ww",ho,no),H("W",ho),H("WW",ho,no),U(["w","ww","W","WW"],function(t,e,i,o){e[o.substr(0,1)]=y(t)});var tn={dow:0,doy:6};A("D",["DD",2],"Do","date"),C("date","D"),H("D",ho),H("DD",ho,no),H("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),V(["D","DD"],Mo),V("Do",function(t,e){e[Mo]=y(t.match(ho)[0],10)});var en=P("Date",!0);A("d",0,"do","day"),A("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),A("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),A("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),A("e",0,0,"weekday"),A("E",0,0,"isoWeekday"),C("day","d"),C("weekday","e"),C("isoWeekday","E"),H("d",ho),H("e",ho),H("E",ho),H("dd",_o),H("ddd",_o),H("dddd",_o),U(["dd","ddd","dddd"],function(t,e,i,o){var n=i._locale.weekdaysParse(t,o,i._strict);null!=n?e.d=n:l(i).invalidWeekday=t}),U(["d","e","E"],function(t,e,i,o){e[o]=y(t)});var on="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),nn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),sn="Su_Mo_Tu_We_Th_Fr_Sa".split("_");A("DDD",["DDDD",3],"DDDo","dayOfYear"),C("dayOfYear","DDD"),H("DDD",co),H("DDDD",so),V(["DDD","DDDD"],function(t,e,i){i._dayOfYear=y(t)}),A("H",["HH",2],0,"hour"),A("h",["hh",2],0,oi),A("hmm",0,0,function(){return""+oi.apply(this)+L(this.minutes(),2)}),A("hmmss",0,0,function(){return""+oi.apply(this)+L(this.minutes(),2)+L(this.seconds(),2)}),A("Hmm",0,0,function(){return""+this.hours()+L(this.minutes(),2)}),A("Hmmss",0,0,function(){return""+this.hours()+L(this.minutes(),2)+L(this.seconds(),2)}),ni("a",!0),ni("A",!1),C("hour","h"),H("a",si),H("A",si),H("H",ho),H("h",ho),H("HH",ho,no),H("hh",ho,no),H("hmm",lo),H("hmmss",uo),H("Hmm",lo),H("Hmmss",uo),V(["H","HH"],Do),V(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),V(["h","hh"],function(t,e,i){e[Do]=y(t),l(i).bigHour=!0}),V("hmm",function(t,e,i){var o=t.length-2;e[Do]=y(t.substr(0,o)),e[Co]=y(t.substr(o)),l(i).bigHour=!0}),V("hmmss",function(t,e,i){var o=t.length-4,n=t.length-2;e[Do]=y(t.substr(0,o)),e[Co]=y(t.substr(o,2)),e[So]=y(t.substr(n)),l(i).bigHour=!0}),V("Hmm",function(t,e,i){var o=t.length-2;e[Do]=y(t.substr(0,o)),e[Co]=y(t.substr(o))}),V("Hmmss",function(t,e,i){var o=t.length-4,n=t.length-2;e[Do]=y(t.substr(0,o)),e[Co]=y(t.substr(o,2)),e[So]=y(t.substr(n))});var rn=/[ap]\.?m?\.?/i,an=P("Hours",!0);A("m",["mm",2],0,"minute"),C("minute","m"),H("m",ho),H("mm",ho,no),V(["m","mm"],Co);var hn=P("Minutes",!1);A("s",["ss",2],0,"second"),C("second","s"),H("s",ho),H("ss",ho,no),V(["s","ss"],So);var dn=P("Seconds",!1);A("S",0,0,function(){return~~(this.millisecond()/100)}),A(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),A(0,["SSS",3],0,"millisecond"),A(0,["SSSS",4],0,function(){return 10*this.millisecond()}),A(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),A(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),A(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),A(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),A(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),C("millisecond","ms"),H("S",co,oo),H("SS",co,no),H("SSS",co,so);var ln;for(ln="SSSS";ln.length<=9;ln+="S")H(ln,vo);for(ln="S";ln.length<=9;ln+="S")V(ln,hi);var un=P("Milliseconds",!1);A("z",0,0,"zoneAbbr"),A("zz",0,0,"zoneName");var cn=v.prototype;cn.add=Jo,cn.calendar=ne,cn.clone=se,cn.diff=ce,cn.endOf=Oe,cn.format=me,cn.from=ge,cn.fromNow=ye,cn.to=be,cn.toNow=_e,cn.get=z,cn.invalidAt=Ne,cn.isAfter=re,cn.isBefore=ae,cn.isBetween=he,cn.isSame=de,cn.isSameOrAfter=le,cn.isSameOrBefore=ue,cn.isValid=Pe,cn.lang=$o,cn.locale=we,cn.localeData=xe,cn.max=Uo,cn.min=Vo,cn.parsingFlags=Ie,cn.set=z,cn.startOf=ke,cn.subtract=Qo,cn.toArray=Se,cn.toObject=Te,cn.toDate=Ce,cn.toISOString=ve,cn.toJSON=Ee,cn.toString=fe,cn.unix=De,cn.valueOf=Me,cn.creationData=ze,cn.year=Go,cn.isLeapYear=ft,cn.weekYear=Ae,cn.isoWeekYear=Re,cn.quarter=cn.quarters=We,cn.month=$,cn.daysInMonth=tt,cn.week=cn.weeks=Ue,cn.isoWeek=cn.isoWeeks=qe,cn.weeksInYear=Be,cn.isoWeeksInYear=Fe,cn.date=en,cn.day=cn.days=$e,cn.weekday=ti,cn.isoWeekday=ei,cn.dayOfYear=ii,cn.hour=cn.hours=an,cn.minute=cn.minutes=hn,cn.second=cn.seconds=dn,cn.millisecond=cn.milliseconds=un,cn.utcOffset=Ht,cn.utc=Yt,cn.local=Gt,cn.parseZone=Vt,cn.hasAlignedHourOffset=Ut,cn.isDST=qt,cn.isDSTShifted=Xt,cn.isLocal=Zt,cn.isUtcOffset=Kt,cn.isUtc=Jt,cn.isUTC=Jt,cn.zoneAbbr=di,cn.zoneName=li,cn.dates=rt("dates accessor is deprecated. Use date instead.",en),cn.months=rt("months accessor is deprecated. Use month instead",$),cn.years=rt("years accessor is deprecated. Use year instead",Go),cn.zone=rt("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Wt);var pn=cn,fn={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},vn={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"},mn="Invalid date",gn="%d",yn=/\d{1,2}/,bn={future:"in %s",past:"%s ago",s:"a few 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"},_n=_.prototype;_n._calendar=fn,_n.calendar=pi,_n._longDateFormat=vn,_n.longDateFormat=fi,_n._invalidDate=mn,_n.invalidDate=vi,_n._ordinal=gn,_n.ordinal=mi,_n._ordinalParse=yn,_n.preparse=gi,_n.postformat=gi,_n._relativeTime=bn,_n.relativeTime=yi,_n.pastFuture=bi,_n.set=_i,_n.months=Z,_n._months=No,_n.monthsShort=K,_n._monthsShort=zo,_n.monthsParse=J,_n._monthsRegex=Ao,_n.monthsRegex=it,_n._monthsShortRegex=Lo,_n.monthsShortRegex=et,_n.week=Ye,_n._week=tn,_n.firstDayOfYear=Ve,_n.firstDayOfWeek=Ge,_n.weekdays=Ze,_n._weekdays=on,_n.weekdaysMin=Je,_n._weekdaysMin=sn,_n.weekdaysShort=Ke,_n._weekdaysShort=nn,_n.weekdaysParse=Qe,_n.isPM=ri,_n._meridiemParse=rn,_n.meridiem=ai,O("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,i=1===y(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+i}}),e.lang=rt("moment.lang is deprecated. Use moment.locale instead.",O),e.langData=rt("moment.langData is deprecated. Use moment.localeData instead.",D);var wn=Math.abs,xn=Fi("ms"),kn=Fi("s"),On=Fi("m"),Mn=Fi("h"),Dn=Fi("d"),Cn=Fi("w"),Sn=Fi("M"),Tn=Fi("y"),En=ji("milliseconds"),Pn=ji("seconds"),In=ji("minutes"),Nn=ji("hours"),zn=ji("days"),Ln=ji("months"),An=ji("years"),Rn=Math.round,Fn={s:45,m:45,h:22,d:26,M:11},Bn=Math.abs,jn=Lt.prototype;jn.abs=Si,jn.add=Ei,jn.subtract=Pi,jn.as=Ai,jn.asMilliseconds=xn,jn.asSeconds=kn,jn.asMinutes=On,jn.asHours=Mn,jn.asDays=Dn,jn.asWeeks=Cn,jn.asMonths=Sn,jn.asYears=Tn,jn.valueOf=Ri,jn._bubble=Ni,jn.get=Bi,jn.milliseconds=En,jn.seconds=Pn,jn.minutes=In,jn.hours=Nn,jn.days=zn,jn.weeks=Hi,jn.months=Ln,jn.years=An,jn.humanize=Vi,jn.toISOString=Ui,jn.toString=Ui,jn.toJSON=Ui,jn.locale=we,jn.localeData=xe,jn.toIsoString=rt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ui),jn.lang=$o,A("X",0,0,"unix"),A("x",0,0,"valueOf"),H("x",mo),H("X",bo),V("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),V("x",function(t,e,i){i._d=new Date(y(t))}),e.version="2.11.2",i(Pt),e.fn=pn,e.min=Nt,e.max=zt,e.now=qo,e.utc=h,e.unix=ui,e.months=ki,e.isDate=n,e.locale=O,e.invalid=c,e.duration=Qt,e.isMoment=m,e.weekdays=Mi,e.parseZone=ci,e.localeData=D,e.isDuration=At,e.monthsShort=Oi,e.weekdaysMin=Ci,e.defineLocale=M,e.weekdaysShort=Di,e.normalizeUnits=S,e.relativeTimeThreshold=Gi,e.prototype=pn;var Hn=e;return Hn})}).call(e,i(4)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){function i(t){throw new Error("Cannot find module '"+t+"'.")}i.keys=function(){return[]},i.resolve=i,t.exports=i,i.id=5},function(t,e){(function(e){function i(t,e,i){var o=e&&i||0,n=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){16>n&&(e[o+n++]=u[t])});16>n;)e[o+n++]=0;return e}function o(t,e){var i=e||0,o=l;return o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]}function n(t,e,i){var n=e&&i||0,s=e||[];t=t||{};var r=void 0!==t.clockseq?t.clockseq:v,a=void 0!==t.msecs?t.msecs:(new Date).getTime(),h=void 0!==t.nsecs?t.nsecs:g+1,d=a-m+(h-g)/1e4;if(0>d&&void 0===t.clockseq&&(r=r+1&16383),(0>d||a>m)&&void 0===t.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");m=a,g=h,v=r,a+=122192928e5;var l=(1e4*(268435455&a)+h)%4294967296;s[n++]=l>>>24&255,s[n++]=l>>>16&255,s[n++]=l>>>8&255,s[n++]=255&l;var u=a/4294967296*1e4&268435455;s[n++]=u>>>8&255,s[n++]=255&u,s[n++]=u>>>24&15|16,s[n++]=u>>>16&255,s[n++]=r>>>8|128,s[n++]=255&r;for(var c=t.node||f,p=0;6>p;p++)s[n+p]=c[p];return e?e:o(s)}function s(t,e,i){var n=e&&i||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null),t=t||{};var s=t.random||(t.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e)for(var a=0;16>a;a++)e[n+a]=s[a];return e||o(s)}var r,a="undefined"!=typeof window?window:"undefined"!=typeof e?e:null;if(a&&a.crypto&&crypto.getRandomValues){var h=new Uint8Array(16);r=function(){return crypto.getRandomValues(h),h}}if(!r){var d=new Array(16);r=function(){for(var t,e=0;16>e;e++)0===(3&e)&&(t=4294967296*Math.random()),d[e]=t>>>((3&e)<<3)&255;return d}}for(var l=[],u={},c=0;256>c;c++)l[c]=(c+256).toString(16).substr(1),u[l[c]]=c;var p=r(),f=[1|p[0],p[1],p[2],p[3],p[4],p[5]],v=16383&(p[6]<<8|p[7]),m=0,g=0,y=s;y.v1=n,y.v4=s,y.parse=i,y.unparse=o,t.exports=y}).call(e,function(){return this}())},function(t,e){e.prepareElements=function(t){for(var e in t)t.hasOwnProperty(e)&&(t[e].redundant=t[e].used,t[e].used=[])},e.cleanupElements=function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].redundant){for(var i=0;i0?(o=e[t].redundant[0],e[t].redundant.shift()):(o=document.createElementNS("http://www.w3.org/2000/svg",t),i.appendChild(o)):(o=document.createElementNS("http://www.w3.org/2000/svg",t),e[t]={used:[],redundant:[]},i.appendChild(o)),e[t].used.push(o),o},e.getDOMElement=function(t,e,i,o){var n;return e.hasOwnProperty(t)?e[t].redundant.length>0?(n=e[t].redundant[0],e[t].redundant.shift()):(n=document.createElement(t),void 0!==o?i.insertBefore(n,o):i.appendChild(n)):(n=document.createElement(t),e[t]={used:[],redundant:[]},void 0!==o?i.insertBefore(n,o):i.appendChild(n)),e[t].used.push(n),n},e.drawPoint=function(t,i,o,n,s,r){var a;if("circle"==o.style?(a=e.getSVGElement("circle",n,s),a.setAttributeNS(null,"cx",t),a.setAttributeNS(null,"cy",i),a.setAttributeNS(null,"r",.5*o.size)):(a=e.getSVGElement("rect",n,s),a.setAttributeNS(null,"x",t-.5*o.size),a.setAttributeNS(null,"y",i-.5*o.size),a.setAttributeNS(null,"width",o.size),a.setAttributeNS(null,"height",o.size)),void 0!==o.styles&&a.setAttributeNS(null,"style",o.styles),a.setAttributeNS(null,"class",o.className+" vis-point"),r){var h=e.getSVGElement("text",n,s);r.xOffset&&(t+=r.xOffset),r.yOffset&&(i+=r.yOffset),r.content&&(h.textContent=r.content),r.className&&h.setAttributeNS(null,"class",r.className+" vis-label"),h.setAttributeNS(null,"x",t),h.setAttributeNS(null,"y",i)}return a},e.drawBar=function(t,i,o,n,s,r,a,h){if(0!=n){0>n&&(n*=-1,i-=n);var d=e.getSVGElement("rect",r,a);d.setAttributeNS(null,"x",t-.5*o),d.setAttributeNS(null,"y",i),d.setAttributeNS(null,"width",o),d.setAttributeNS(null,"height",n),d.setAttributeNS(null,"class",s),h&&d.setAttributeNS(null,"style",h)}}},function(t,e,i){function o(t,e){if(t&&!Array.isArray(t)&&(e=t,t=null),this._options=e||{},this._data={},this.length=0,this._fieldId=this._options.fieldId||"id",this._type={},this._options.type)for(var i=Object.keys(this._options.type),o=0,n=i.length;n>o;o++){var s=i[o],r=this._options.type[s];"Date"==r||"ISODate"==r||"ASPDate"==r?this._type[s]="Date":this._type[s]=r}if(this._options.convert)throw new Error('Option "convert" is deprecated. Use "type" instead.');this._subscribers={},t&&this.add(t),this.setOptions(e)}var n=i(1),s=i(9);o.prototype.setOptions=function(t){t&&void 0!==t.queue&&(t.queue===!1?this._queue&&(this._queue.destroy(),delete this._queue):(this._queue||(this._queue=s.extend(this,{replace:["add","update","remove"]})),"object"==typeof t.queue&&this._queue.setOptions(t.queue)))},o.prototype.on=function(t,e){var i=this._subscribers[t];i||(i=[],this._subscribers[t]=i),i.push({callback:e})},o.prototype.subscribe=function(){throw new Error("DataSet.subscribe is deprecated. Use DataSet.on instead.")},o.prototype.off=function(t,e){var i=this._subscribers[t];i&&(this._subscribers[t]=i.filter(function(t){return t.callback!=e}))},o.prototype.unsubscribe=function(){throw new Error("DataSet.unsubscribe is deprecated. Use DataSet.off instead.")},o.prototype._trigger=function(t,e,i){if("*"==t)throw new Error("Cannot trigger event *");var o=[];t in this._subscribers&&(o=o.concat(this._subscribers[t])),"*"in this._subscribers&&(o=o.concat(this._subscribers["*"]));for(var n=0,s=o.length;s>n;n++){var r=o[n];r.callback&&r.callback(t,e,i||null)}},o.prototype.add=function(t,e){var i,o=[],n=this;if(Array.isArray(t))for(var s=0,r=t.length;r>s;s++)i=n._addItem(t[s]),o.push(i);else{if(!(t instanceof Object))throw new Error("Unknown dataType");i=n._addItem(t),o.push(i)}return o.length&&this._trigger("add",{items:o},e),o},o.prototype.update=function(t,e){var i=[],o=[],s=[],r=[],a=this,h=a._fieldId,d=function(t){var e=t[h];if(a._data[e]){var d=n.extend({},a._data[e]);e=a._updateItem(t),o.push(e),r.push(t),s.push(d)}else e=a._addItem(t),i.push(e)};if(Array.isArray(t))for(var l=0,u=t.length;u>l;l++)t[l]instanceof Object?d(t[l]):console.warn("Ignoring input item, which is not an object at index "+l);else{if(!(t instanceof Object))throw new Error("Unknown dataType");d(t)}if(i.length&&this._trigger("add",{items:i},e),o.length){var c={items:o,oldData:s,data:r};this._trigger("update",c,e)}return i.concat(o)},o.prototype.get=function(t){var e,i,o,s=this,r=n.getType(arguments[0]);"String"==r||"Number"==r?(e=arguments[0],o=arguments[1]):"Array"==r?(i=arguments[0],o=arguments[1]):o=arguments[0];var a;if(o&&o.returnType){var h=["Array","Object"];a=-1==h.indexOf(o.returnType)?"Array":o.returnType}else a="Array";var d,l,u,c,p,f=o&&o.type||this._options.type,v=o&&o.filter,m=[];if(void 0!=e)d=s._getItem(e,f),d&&v&&!v(d)&&(d=null);else if(void 0!=i)for(c=0,p=i.length;p>c;c++)d=s._getItem(i[c],f),v&&!v(d)||m.push(d);else for(l=Object.keys(this._data),c=0,p=l.length;p>c;c++)u=l[c],d=s._getItem(u,f),v&&!v(d)||m.push(d);if(o&&o.order&&void 0==e&&this._sort(m,o.order),o&&o.fields){var g=o.fields;if(void 0!=e)d=this._filterFields(d,g);else for(c=0,p=m.length;p>c;c++)m[c]=this._filterFields(m[c],g)}if("Object"==a){var y,b={};for(c=0,p=m.length;p>c;c++)y=m[c],b[y.id]=y;return b}return void 0!=e?d:m},o.prototype.getIds=function(t){var e,i,o,n,s,r=this._data,a=t&&t.filter,h=t&&t.order,d=t&&t.type||this._options.type,l=Object.keys(r),u=[];if(a)if(h){for(s=[],e=0,i=l.length;i>e;e++)o=l[e],n=this._getItem(o,d),a(n)&&s.push(n);for(this._sort(s,h),e=0,i=s.length;i>e;e++)u.push(s[e][this._fieldId])}else for(e=0,i=l.length;i>e;e++)o=l[e],n=this._getItem(o,d),a(n)&&u.push(n[this._fieldId]);else if(h){for(s=[],e=0,i=l.length;i>e;e++)o=l[e],s.push(r[o]);for(this._sort(s,h),e=0,i=s.length;i>e;e++)u.push(s[e][this._fieldId])}else for(e=0,i=l.length;i>e;e++)o=l[e],n=r[o],u.push(n[this._fieldId]);return u},o.prototype.getDataSet=function(){return this},o.prototype.forEach=function(t,e){var i,o,n,s,r=e&&e.filter,a=e&&e.type||this._options.type,h=this._data,d=Object.keys(h);if(e&&e.order){var l=this.get(e);for(i=0,o=l.length;o>i;i++)n=l[i],s=n[this._fieldId],t(n,s)}else for(i=0,o=d.length;o>i;i++)s=d[i],n=this._getItem(s,a),r&&!r(n)||t(n,s)},o.prototype.map=function(t,e){var i,o,n,s,r=e&&e.filter,a=e&&e.type||this._options.type,h=[],d=this._data,l=Object.keys(d);for(i=0,o=l.length;o>i;i++)n=l[i],s=this._getItem(n,a),r&&!r(s)||h.push(t(s,n));return e&&e.order&&this._sort(h,e.order),h},o.prototype._filterFields=function(t,e){if(!t)return t;var i,o,n={},s=Object.keys(t),r=s.length;if(Array.isArray(e))for(i=0;r>i;i++)o=s[i],-1!=e.indexOf(o)&&(n[o]=t[o]);else for(i=0;r>i;i++)o=s[i],e.hasOwnProperty(o)&&(n[e[o]]=t[o]);return n},o.prototype._sort=function(t,e){if(n.isString(e)){var i=e;t.sort(function(t,e){var o=t[i],n=e[i];return o>n?1:n>o?-1:0})}else{if("function"!=typeof e)throw new TypeError("Order must be a function or a string");t.sort(e)}},o.prototype.remove=function(t,e){var i,o,n,s=[];if(Array.isArray(t))for(i=0,o=t.length;o>i;i++)n=this._remove(t[i]),null!=n&&s.push(n);else n=this._remove(t), -null!=n&&s.push(n);return s.length&&this._trigger("remove",{items:s},e),s},o.prototype._remove=function(t){if(n.isNumber(t)||n.isString(t)){if(this._data[t])return delete this._data[t],this.length--,t}else if(t instanceof Object){var e=t[this._fieldId];if(void 0!==e&&this._data[e])return delete this._data[e],this.length--,e}return null},o.prototype.clear=function(t){var e=Object.keys(this._data);return this._data={},this.length=0,this._trigger("remove",{items:e},t),e},o.prototype.max=function(t){var e,i,o=this._data,n=Object.keys(o),s=null,r=null;for(e=0,i=n.length;i>e;e++){var a=n[e],h=o[a],d=h[t];null!=d&&(!s||d>r)&&(s=h,r=d)}return s},o.prototype.min=function(t){var e,i,o=this._data,n=Object.keys(o),s=null,r=null;for(e=0,i=n.length;i>e;e++){var a=n[e],h=o[a],d=h[t];null!=d&&(!s||r>d)&&(s=h,r=d)}return s},o.prototype.distinct=function(t){var e,i,o,s=this._data,r=Object.keys(s),a=[],h=this._options.type&&this._options.type[t]||null,d=0;for(e=0,o=r.length;o>e;e++){var l=r[e],u=s[l],c=u[t],p=!1;for(i=0;d>i;i++)if(a[i]==c){p=!0;break}p||void 0===c||(a[d]=c,d++)}if(h)for(e=0,o=a.length;o>e;e++)a[e]=n.convert(a[e],h);return a},o.prototype._addItem=function(t){var e=t[this._fieldId];if(void 0!=e){if(this._data[e])throw new Error("Cannot add item: item with id "+e+" already exists")}else e=n.randomUUID(),t[this._fieldId]=e;var i,o,s={},r=Object.keys(t);for(i=0,o=r.length;o>i;i++){var a=r[i],h=this._type[a];s[a]=n.convert(t[a],h)}return this._data[e]=s,this.length++,e},o.prototype._getItem=function(t,e){var i,o,s,r,a=this._data[t];if(!a)return null;var h={},d=Object.keys(a);if(e)for(s=0,r=d.length;r>s;s++)i=d[s],o=a[i],h[i]=n.convert(o,e[i]);else for(s=0,r=d.length;r>s;s++)i=d[s],o=a[i],h[i]=o;return h},o.prototype._updateItem=function(t){var e=t[this._fieldId];if(void 0==e)throw new Error("Cannot update item: item has no id (item: "+JSON.stringify(t)+")");var i=this._data[e];if(!i)throw new Error("Cannot update item: no item with id "+e+" found");for(var o=Object.keys(t),s=0,r=o.length;r>s;s++){var a=o[s],h=this._type[a];i[a]=n.convert(t[a],h)}return e},t.exports=o},function(t,e){function i(t){this.delay=null,this.max=1/0,this._queue=[],this._timeout=null,this._extended=null,this.setOptions(t)}i.prototype.setOptions=function(t){t&&"undefined"!=typeof t.delay&&(this.delay=t.delay),t&&"undefined"!=typeof t.max&&(this.max=t.max),this._flushIfNeeded()},i.extend=function(t,e){var o=new i(e);if(void 0!==t.flush)throw new Error("Target object already has a property flush");t.flush=function(){o.flush()};var n=[{name:"flush",original:void 0}];if(e&&e.replace)for(var s=0;sthis.max&&this.flush(),clearTimeout(this._timeout),this.queue.length>0&&"number"==typeof this.delay){var t=this;this._timeout=setTimeout(function(){t.flush()},this.delay)}},i.prototype.flush=function(){for(;this._queue.length>0;){var t=this._queue.shift();t.fn.apply(t.context||t.fn,t.args||[])}},t.exports=i},function(t,e,i){function o(t,e){this._data=null,this._ids={},this.length=0,this._options=e||{},this._fieldId="id",this._subscribers={};var i=this;this.listener=function(){i._onEvent.apply(i,arguments)},this.setData(t)}var n=i(1),s=i(8);o.prototype.setData=function(t){var e,i,o,n;if(this._data&&(this._data.off&&this._data.off("*",this.listener),e=Object.keys(this._ids),this._ids={},this.length=0,this._trigger("remove",{items:e})),this._data=t,this._data){for(this._fieldId=this._options.fieldId||this._data&&this._data.options&&this._data.options.fieldId||"id",e=this._data.getIds({filter:this._options&&this._options.filter}),o=0,n=e.length;n>o;o++)i=e[o],this._ids[i]=!0;this.length=e.length,this._trigger("add",{items:e}),this._data.on&&this._data.on("*",this.listener)}},o.prototype.refresh=function(){var t,e,i,o=this._data.getIds({filter:this._options&&this._options.filter}),n=Object.keys(this._ids),s={},r=[],a=[];for(e=0,i=o.length;i>e;e++)t=o[e],s[t]=!0,this._ids[t]||(r.push(t),this._ids[t]=!0);for(e=0,i=n.length;i>e;e++)t=n[e],s[t]||(a.push(t),delete this._ids[t]);this.length+=r.length-a.length,r.length&&this._trigger("add",{items:r}),a.length&&this._trigger("remove",{items:a})},o.prototype.get=function(t){var e,i,o,s=this,r=n.getType(arguments[0]);"String"==r||"Number"==r||"Array"==r?(e=arguments[0],i=arguments[1],o=arguments[2]):(i=arguments[0],o=arguments[1]);var a=n.extend({},this._options,i);this._options.filter&&i&&i.filter&&(a.filter=function(t){return s._options.filter(t)&&i.filter(t)});var h=[];return void 0!=e&&h.push(e),h.push(a),h.push(o),this._data&&this._data.get.apply(this._data,h)},o.prototype.getIds=function(t){var e;if(this._data){var i,o=this._options.filter;i=t&&t.filter?o?function(e){return o(e)&&t.filter(e)}:t.filter:o,e=this._data.getIds({filter:i,order:t&&t.order})}else e=[];return e},o.prototype.map=function(t,e){var i=[];if(this._data){var o,n=this._options.filter;o=e&&e.filter?n?function(t){return n(t)&&e.filter(t)}:e.filter:n,i=this._data.map(t,{filter:o,order:e&&e.order})}else i=[];return i},o.prototype.getDataSet=function(){for(var t=this;t instanceof o;)t=t._data;return t||null},o.prototype._onEvent=function(t,e,i){var o,n,s,r,a=e&&e.items,h=this._data,d=[],l=[],u=[],c=[];if(a&&h){switch(t){case"add":for(o=0,n=a.length;n>o;o++)s=a[o],r=this.get(s),r&&(this._ids[s]=!0,l.push(s));break;case"update":for(o=0,n=a.length;n>o;o++)s=a[o],r=this.get(s),r?this._ids[s]?(u.push(s),d.push(e.data[o])):(this._ids[s]=!0,l.push(s)):this._ids[s]&&(delete this._ids[s],c.push(s));break;case"remove":for(o=0,n=a.length;n>o;o++)s=a[o],this._ids[s]&&(delete this._ids[s],c.push(s))}this.length+=l.length-c.length,l.length&&this._trigger("add",{items:l},i),u.length&&this._trigger("update",{items:u,data:d},i),c.length&&this._trigger("remove",{items:c},i)}},o.prototype.on=s.prototype.on,o.prototype.off=s.prototype.off,o.prototype._trigger=s.prototype._trigger,o.prototype.subscribe=o.prototype.on,o.prototype.unsubscribe=o.prototype.off,t.exports=o},function(t,e,i){function o(t,e,i){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");this.containerElement=t,this.width="400px",this.height="400px",this.margin=10,this.defaultXCenter="55%",this.defaultYCenter="50%",this.xLabel="x",this.yLabel="y",this.zLabel="z";var n=function(t){return t};this.xValueLabel=n,this.yValueLabel=n,this.zValueLabel=n,this.filterLabel="time",this.legendLabel="value",this.style=o.STYLE.DOT,this.showPerspective=!0,this.showGrid=!0,this.keepAspectRatio=!0,this.showShadow=!1,this.showGrayBottom=!1,this.showTooltip=!1,this.verticalRatio=.5,this.animationInterval=1e3,this.animationPreload=!1,this.camera=new c,this.camera.setArmRotation(1,.5),this.camera.setArmLength(1.7),this.eye=new l(0,0,-1),this.dataTable=null,this.dataPoints=null,this.colX=void 0,this.colY=void 0,this.colZ=void 0,this.colValue=void 0,this.colFilter=void 0,this.xMin=0,this.xStep=void 0,this.xMax=1,this.yMin=0,this.yStep=void 0,this.yMax=1,this.zMin=0,this.zStep=void 0,this.zMax=1,this.valueMin=0,this.valueMax=1,this.xBarWidth=1,this.yBarWidth=1,this.axisColor="#4D4D4D",this.gridColor="#D3D3D3",this.dataColor={fill:"#7DC1FF",stroke:"#3267D2",strokeWidth:1},this.dotSizeRatio=.02,this.create(),this.setOptions(i),e&&this.setData(e)}function n(t){return"clientX"in t?t.clientX:t.targetTouches[0]&&t.targetTouches[0].clientX||0}function s(t){return"clientY"in t?t.clientY:t.targetTouches[0]&&t.targetTouches[0].clientY||0}var r=i(12),a=i(8),h=i(10),d=i(1),l=i(13),u=i(14),c=i(15),p=i(16),f=i(17),v=i(18);r(o.prototype),o.prototype._setScale=function(){this.scale=new l(1/(this.xMax-this.xMin),1/(this.yMax-this.yMin),1/(this.zMax-this.zMin)),this.keepAspectRatio&&(this.scale.x3&&(this.colFilter=3);else{if(this.style!==o.STYLE.DOTCOLOR&&this.style!==o.STYLE.DOTSIZE&&this.style!==o.STYLE.BARCOLOR&&this.style!==o.STYLE.BARSIZE)throw'Unknown style "'+this.style+'"';this.colX=0,this.colY=1,this.colZ=2,this.colValue=3,t.getNumberOfColumns()>4&&(this.colFilter=4)}},o.prototype.getNumberOfRows=function(t){return t.length},o.prototype.getNumberOfColumns=function(t){var e=0;for(var i in t[0])t[0].hasOwnProperty(i)&&e++;return e},o.prototype.getDistinctValues=function(t,e){for(var i=[],o=0;ot[o][e]&&(i.min=t[o][e]),i.maxt;t++){var f=(t-c)/(p-c),m=240*f,g=this._hsv2rgb(m,1,1);u.strokeStyle=g,u.beginPath(),u.moveTo(h,r+t),u.lineTo(a,r+t),u.stroke()}u.strokeStyle=this.axisColor,u.strokeRect(h,r,i,s)}if(this.style===o.STYLE.DOTSIZE&&(u.strokeStyle=this.axisColor,u.fillStyle=this.dataColor.fill,u.beginPath(),u.moveTo(h,r),u.lineTo(a,r),u.lineTo(a-i+e,d),u.lineTo(h,d),u.closePath(),u.fill(),u.stroke()),this.style===o.STYLE.DOTCOLOR||this.style===o.STYLE.DOTSIZE){var y=5,b=new v(this.valueMin,this.valueMax,(this.valueMax-this.valueMin)/5,!0);for(b.start(),b.getCurrent()0?this.yMin:this.yMax,n=this._convert3Dto2D(new l(w,r,this.zMin)),Math.cos(2*_)>0?(m.textAlign="center",m.textBaseline="top",n.y+=b):Math.sin(2*_)<0?(m.textAlign="right",m.textBaseline="middle"):(m.textAlign="left",m.textBaseline="middle"),m.fillStyle=this.axisColor,m.fillText(" "+this.xValueLabel(i.getCurrent())+" ",n.x,n.y),i.next()}for(m.lineWidth=1,o=void 0===this.defaultYStep,i=new v(this.yMin,this.yMax,this.yStep,o),i.start(),i.getCurrent()0?this.xMin:this.xMax,n=this._convert3Dto2D(new l(s,i.getCurrent(),this.zMin)),Math.cos(2*_)<0?(m.textAlign="center",m.textBaseline="top",n.y+=b):Math.sin(2*_)>0?(m.textAlign="right",m.textBaseline="middle"):(m.textAlign="left",m.textBaseline="middle"),m.fillStyle=this.axisColor,m.fillText(" "+this.yValueLabel(i.getCurrent())+" ",n.x,n.y),i.next();for(m.lineWidth=1,o=void 0===this.defaultZStep,i=new v(this.zMin,this.zMax,this.zStep,o),i.start(),i.getCurrent()0?this.xMin:this.xMax,r=Math.sin(_)<0?this.yMin:this.yMax;!i.end();)t=this._convert3Dto2D(new l(s,r,i.getCurrent())),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(t.x,t.y),m.lineTo(t.x-b,t.y),m.stroke(),m.textAlign="right",m.textBaseline="middle",m.fillStyle=this.axisColor,m.fillText(this.zValueLabel(i.getCurrent())+" ",t.x-5,t.y),i.next();m.lineWidth=1,t=this._convert3Dto2D(new l(s,r,this.zMin)),e=this._convert3Dto2D(new l(s,r,this.zMax)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(t.x,t.y),m.lineTo(e.x,e.y),m.stroke(),m.lineWidth=1,c=this._convert3Dto2D(new l(this.xMin,this.yMin,this.zMin)),p=this._convert3Dto2D(new l(this.xMax,this.yMin,this.zMin)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(c.x,c.y),m.lineTo(p.x,p.y),m.stroke(),c=this._convert3Dto2D(new l(this.xMin,this.yMax,this.zMin)),p=this._convert3Dto2D(new l(this.xMax,this.yMax,this.zMin)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(c.x,c.y),m.lineTo(p.x,p.y),m.stroke(),m.lineWidth=1,t=this._convert3Dto2D(new l(this.xMin,this.yMin,this.zMin)),e=this._convert3Dto2D(new l(this.xMin,this.yMax,this.zMin)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(t.x,t.y),m.lineTo(e.x,e.y),m.stroke(),t=this._convert3Dto2D(new l(this.xMax,this.yMin,this.zMin)),e=this._convert3Dto2D(new l(this.xMax,this.yMax,this.zMin)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(t.x,t.y),m.lineTo(e.x,e.y),m.stroke();var x=this.xLabel;x.length>0&&(u=.1/this.scale.y,s=(this.xMin+this.xMax)/2,r=Math.cos(_)>0?this.yMin-u:this.yMax+u,n=this._convert3Dto2D(new l(s,r,this.zMin)),Math.cos(2*_)>0?(m.textAlign="center",m.textBaseline="top"):Math.sin(2*_)<0?(m.textAlign="right",m.textBaseline="middle"):(m.textAlign="left",m.textBaseline="middle"),m.fillStyle=this.axisColor,m.fillText(x,n.x,n.y));var k=this.yLabel;k.length>0&&(d=.1/this.scale.x,s=Math.sin(_)>0?this.xMin-d:this.xMax+d,r=(this.yMin+this.yMax)/2,n=this._convert3Dto2D(new l(s,r,this.zMin)),Math.cos(2*_)<0?(m.textAlign="center",m.textBaseline="top"):Math.sin(2*_)>0?(m.textAlign="right",m.textBaseline="middle"):(m.textAlign="left",m.textBaseline="middle"),m.fillStyle=this.axisColor,m.fillText(k,n.x,n.y));var O=this.zLabel;O.length>0&&(h=30,s=Math.cos(_)>0?this.xMin:this.xMax,r=Math.sin(_)<0?this.yMin:this.yMax,a=(this.zMin+this.zMax)/2,n=this._convert3Dto2D(new l(s,r,a)),m.textAlign="right",m.textBaseline="middle",m.fillStyle=this.axisColor,m.fillText(O,n.x-h,n.y))},o.prototype._hsv2rgb=function(t,e,i){var o,n,s,r,a,h;switch(r=i*e,a=Math.floor(t/60),h=r*(1-Math.abs(t/60%2-1)),a){case 0:o=r,n=h,s=0;break;case 1:o=h,n=r,s=0;break;case 2:o=0,n=r,s=h;break;case 3:o=0,n=h,s=r;break;case 4:o=h,n=0,s=r;break;case 5:o=r,n=0,s=h;break;default:o=0,n=0,s=0}return"RGB("+parseInt(255*o)+","+parseInt(255*n)+","+parseInt(255*s)+")"},o.prototype._redrawDataGrid=function(){var t,e,i,n,s,r,a,h,d,u,c,p,f=this.frame.canvas,v=f.getContext("2d");if(v.lineJoin="round",v.lineCap="round",!(void 0===this.dataPoints||this.dataPoints.length<=0)){for(s=0;s0}else r=!0;r?(p=(t.point.z+e.point.z+i.point.z+n.point.z)/4,d=240*(1-(p-this.zMin)*this.scale.z/this.verticalRatio),u=1,this.showShadow?(c=Math.min(1+x.x/k/2,1),a=this._hsv2rgb(d,u,c),h=a):(c=1,a=this._hsv2rgb(d,u,c),h=this.axisColor)):(a="gray",h=this.axisColor),v.lineWidth=this._getStrokeWidth(t),v.fillStyle=a,v.strokeStyle=h,v.beginPath(),v.moveTo(t.screen.x,t.screen.y),v.lineTo(e.screen.x,e.screen.y),v.lineTo(n.screen.x,n.screen.y),v.lineTo(i.screen.x,i.screen.y),v.closePath(),v.fill(),v.stroke()}}else for(s=0;sc&&(c=0);var p,f,v;this.style===o.STYLE.DOTCOLOR?(p=240*(1-(d.point.value-this.valueMin)*this.scale.value),f=this._hsv2rgb(p,1,1),v=this._hsv2rgb(p,1,.8)):this.style===o.STYLE.DOTSIZE?(f=this.dataColor.fill,v=this.dataColor.stroke):(p=240*(1-(d.point.z-this.zMin)*this.scale.z/this.verticalRatio),f=this._hsv2rgb(p,1,1),v=this._hsv2rgb(p,1,.8)),i.lineWidth=this._getStrokeWidth(d),i.strokeStyle=v,i.fillStyle=f,i.beginPath(),i.arc(d.screen.x,d.screen.y,c,0,2*Math.PI,!0),i.fill(),i.stroke()}}},o.prototype._redrawDataBar=function(){var t,e,i,n,s=this.frame.canvas,r=s.getContext("2d");if(!(void 0===this.dataPoints||this.dataPoints.length<=0)){for(t=0;t0){for(t=this.dataPoints[0],o.lineWidth=this._getStrokeWidth(t),o.lineJoin="round",o.lineCap="round",o.strokeStyle=this.dataColor.stroke,o.beginPath(),o.moveTo(t.screen.x,t.screen.y),e=1;e0?1:0>t?-1:0}var o=e[0],n=e[1],s=e[2],r=i((n.x-o.x)*(t.y-o.y)-(n.y-o.y)*(t.x-o.x)),a=i((s.x-n.x)*(t.y-n.y)-(s.y-n.y)*(t.x-n.x)),h=i((o.x-s.x)*(t.y-s.y)-(o.y-s.y)*(t.x-s.x));return!(0!=r&&0!=a&&r!=a||0!=a&&0!=h&&a!=h||0!=r&&0!=h&&r!=h)},o.prototype._dataPointFromXY=function(t,e){var i,n=100,s=null,r=null,a=null,h=new u(t,e);if(this.style===o.STYLE.BAR||this.style===o.STYLE.BARCOLOR||this.style===o.STYLE.BARSIZE)for(i=this.dataPoints.length-1;i>=0;i--){s=this.dataPoints[i];var d=s.surfaces;if(d)for(var l=d.length-1;l>=0;l--){var c=d[l],p=c.corners,f=[p[0].screen,p[1].screen,p[2].screen],v=[p[2].screen,p[3].screen,p[0].screen];if(this._insideTriangle(h,f)||this._insideTriangle(h,v))return s}}else for(i=0;ib)&&n>b&&(a=b,r=s)}}return r},o.prototype._showTooltip=function(t){var e,i,o;this.tooltip?(e=this.tooltip.dom.content,i=this.tooltip.dom.line,o=this.tooltip.dom.dot):(e=document.createElement("div"),e.style.position="absolute",e.style.padding="10px",e.style.border="1px solid #4d4d4d",e.style.color="#1a1a1a",e.style.background="rgba(255,255,255,0.7)",e.style.borderRadius="2px",e.style.boxShadow="5px 5px 10px rgba(128,128,128,0.5)",i=document.createElement("div"),i.style.position="absolute",i.style.height="40px",i.style.width="0",i.style.borderLeft="1px solid #4d4d4d",o=document.createElement("div"),o.style.position="absolute",o.style.height="0",o.style.width="0",o.style.border="5px solid #4d4d4d",o.style.borderRadius="5px",this.tooltip={dataPoint:null,dom:{content:e,line:i,dot:o}}),this._hideTooltip(),this.tooltip.dataPoint=t,"function"==typeof this.showTooltip?e.innerHTML=this.showTooltip(t.point):e.innerHTML="
"+this.xLabel+":"+t.point.x+"
"+this.yLabel+":"+t.point.y+"
"+this.zLabel+":"+t.point.z+"
",e.style.left="0",e.style.top="0",this.frame.appendChild(e),this.frame.appendChild(i),this.frame.appendChild(o);var n=e.offsetWidth,s=e.offsetHeight,r=i.offsetHeight,a=o.offsetWidth,h=o.offsetHeight,d=t.screen.x-n/2;d=Math.min(Math.max(d,10),this.frame.clientWidth-10-n),i.style.left=t.screen.x+"px",i.style.top=t.screen.y-r+"px",e.style.left=d+"px",e.style.top=t.screen.y-r-s+"px",o.style.left=t.screen.x-a/2+"px",o.style.top=t.screen.y-h/2+"px"},o.prototype._hideTooltip=function(){if(this.tooltip){this.tooltip.dataPoint=null;for(var t in this.tooltip.dom)if(this.tooltip.dom.hasOwnProperty(t)){var e=this.tooltip.dom[t];e&&e.parentNode&&e.parentNode.removeChild(e)}}},t.exports=o},function(t,e){function i(t){return t?o(t):void 0}function o(t){for(var e in i.prototype)t[e]=i.prototype[e];return t}t.exports=i,i.prototype.on=i.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},i.prototype.once=function(t,e){function i(){o.off(t,i),e.apply(this,arguments)}var o=this;return this._callbacks=this._callbacks||{},i.fn=e,this.on(t,i),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks[t];if(!i)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var o,n=0;no;++o)i[o].apply(this,e)}return this},i.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks[t]||[]},i.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e){function i(t,e,i){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0,this.z=void 0!==i?i:0}i.subtract=function(t,e){var o=new i;return o.x=t.x-e.x,o.y=t.y-e.y,o.z=t.z-e.z,o},i.add=function(t,e){var o=new i;return o.x=t.x+e.x,o.y=t.y+e.y,o.z=t.z+e.z,o},i.avg=function(t,e){return new i((t.x+e.x)/2,(t.y+e.y)/2,(t.z+e.z)/2)},i.crossProduct=function(t,e){var o=new i;return o.x=t.y*e.z-t.z*e.y,o.y=t.z*e.x-t.x*e.z,o.z=t.x*e.y-t.y*e.x,o},i.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},t.exports=i},function(t,e){function i(t,e){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0}t.exports=i},function(t,e,i){function o(){this.armLocation=new n,this.armRotation={},this.armRotation.horizontal=0,this.armRotation.vertical=0,this.armLength=1.7,this.cameraLocation=new n,this.cameraRotation=new n(.5*Math.PI,0,0),this.calculateCameraOrientation()}var n=i(13);o.prototype.setArmLocation=function(t,e,i){this.armLocation.x=t,this.armLocation.y=e,this.armLocation.z=i,this.calculateCameraOrientation()},o.prototype.setArmRotation=function(t,e){void 0!==t&&(this.armRotation.horizontal=t),void 0!==e&&(this.armRotation.vertical=e,this.armRotation.vertical<0&&(this.armRotation.vertical=0),this.armRotation.vertical>.5*Math.PI&&(this.armRotation.vertical=.5*Math.PI)),void 0===t&&void 0===e||this.calculateCameraOrientation()},o.prototype.getArmRotation=function(){var t={};return t.horizontal=this.armRotation.horizontal,t.vertical=this.armRotation.vertical,t},o.prototype.setArmLength=function(t){void 0!==t&&(this.armLength=t,this.armLength<.71&&(this.armLength=.71),this.armLength>5&&(this.armLength=5),this.calculateCameraOrientation())},o.prototype.getArmLength=function(){return this.armLength},o.prototype.getCameraLocation=function(){return this.cameraLocation},o.prototype.getCameraRotation=function(){return this.cameraRotation},o.prototype.calculateCameraOrientation=function(){this.cameraLocation.x=this.armLocation.x-this.armLength*Math.sin(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.y=this.armLocation.y-this.armLength*Math.cos(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.z=this.armLocation.z+this.armLength*Math.sin(this.armRotation.vertical),this.cameraRotation.x=Math.PI/2-this.armRotation.vertical,this.cameraRotation.y=0,this.cameraRotation.z=-this.armRotation.horizontal},t.exports=o},function(t,e,i){function o(t,e,i){this.data=t,this.column=e,this.graph=i,this.index=void 0,this.value=void 0,this.values=i.getDistinctValues(t.get(),this.column),this.values.sort(function(t,e){return t>e?1:e>t?-1:0}),this.values.length>0&&this.selectValue(0),this.dataPoints=[],this.loaded=!1,this.onLoadCallback=void 0,i.animationPreload?(this.loaded=!1,this.loadInBackground()):this.loaded=!0}var n=i(10);o.prototype.isLoaded=function(){return this.loaded},o.prototype.getLoadedProgress=function(){for(var t=this.values.length,e=0;this.dataPoints[e];)e++;return Math.round(e/t*100)},o.prototype.getLabel=function(){return this.graph.filterLabel},o.prototype.getColumn=function(){return this.column},o.prototype.getSelectedValue=function(){return void 0!==this.index?this.values[this.index]:void 0},o.prototype.getValues=function(){return this.values},o.prototype.getValue=function(t){if(t>=this.values.length)throw"Error: index out of range";return this.values[t]},o.prototype._getDataPoints=function(t){if(void 0===t&&(t=this.index),void 0===t)return[];var e;if(this.dataPoints[t])e=this.dataPoints[t];else{var i={};i.column=this.column,i.value=this.values[t];var o=new n(this.data,{filter:function(t){return t[i.column]==i.value}}).get();e=this.graph._getDataPoints(o),this.dataPoints[t]=e}return e},o.prototype.setOnLoadCallback=function(t){this.onLoadCallback=t},o.prototype.selectValue=function(t){if(t>=this.values.length)throw"Error: index out of range";this.index=t,this.value=this.values[t]},o.prototype.loadInBackground=function(t){void 0===t&&(t=0);var e=this.graph.frame;if(t0&&(t--,this.setIndex(t))},o.prototype.next=function(){var t=this.getIndex();t0?this.setIndex(0):this.index=void 0},o.prototype.setIndex=function(t){if(!(to&&(o=0),o>this.values.length-1&&(o=this.values.length-1),o},o.prototype.indexToLeft=function(t){var e=parseFloat(this.frame.bar.style.width)-this.frame.slide.clientWidth-10,i=t/(this.values.length-1)*e,o=i+3;return o},o.prototype._onMouseMove=function(t){var e=t.clientX-this.startClientX,i=this.startSlideX+e,o=this.leftToIndex(i);this.setIndex(o),n.preventDefault()},o.prototype._onMouseUp=function(t){this.frame.style.cursor="auto",n.removeEventListener(document,"mousemove",this.onmousemove),n.removeEventListener(document,"mouseup",this.onmouseup),n.preventDefault()},t.exports=o},function(t,e){function i(t,e,i,o){this._start=0,this._end=0,this._step=1,this.prettyStep=!0,this.precision=5,this._current=0,this.setRange(t,e,i,o)}i.prototype.setRange=function(t,e,i,o){this._start=t?t:0,this._end=e?e:0,this.setStep(i,o)},i.prototype.setStep=function(t,e){void 0===t||0>=t||(void 0!==e&&(this.prettyStep=e),this.prettyStep===!0?this._step=i.calculatePrettyStep(t):this._step=t)},i.calculatePrettyStep=function(t){var e=function(t){return Math.log(t)/Math.LN10},i=Math.pow(10,Math.round(e(t))),o=2*Math.pow(10,Math.round(e(t/2))),n=5*Math.pow(10,Math.round(e(t/5))),s=i;return Math.abs(o-t)<=Math.abs(s-t)&&(s=o),Math.abs(n-t)<=Math.abs(s-t)&&(s=n),0>=s&&(s=1),s},i.prototype.getCurrent=function(){return parseFloat(this._current.toPrecision(this.precision))},i.prototype.getStep=function(){return this._step},i.prototype.start=function(){this._current=this._start-this._start%this._step},i.prototype.next=function(){this._current+=this._step},i.prototype.end=function(){return this._current>this._end},t.exports=i},function(t,e,i){function o(t,e,i,d){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(!(Array.isArray(i)||i instanceof r||i instanceof a)&&i instanceof Object){var c=d;d=i,i=c}var f=this;this.defaultOptions={start:null,end:null,autoResize:!0,throttleRedraw:0,orientation:{axis:"bottom",item:"bottom"},moment:n,width:null,height:null,maxHeight:null,minHeight:null},this.options=s.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this)},hiddenDates:[],util:{getScale:function(){return f.timeAxis.step.scale},getStep:function(){return f.timeAxis.step.step},toScreen:f._toScreen.bind(f),toGlobalScreen:f._toGlobalScreen.bind(f),toTime:f._toTime.bind(f),toGlobalTime:f._toGlobalTime.bind(f)}},this.range=new h(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new l(this.body),this.timeAxis2=null,this.components.push(this.timeAxis),this.currentTime=new u(this.body),this.components.push(this.currentTime),this.itemSet=new p(this.body),this.components.push(this.itemSet),this.itemsData=null,this.groupsData=null,this.on("tap",function(t){f.emit("click",f.getEventProperties(t))}),this.on("doubletap",function(t){f.emit("doubleClick",f.getEventProperties(t))}),this.dom.root.oncontextmenu=function(t){f.emit("contextmenu",f.getEventProperties(t))},this.fitDone=!1,this.on("changed",function(){if(null!=this.itemsData&&!f.fitDone)if(f.fitDone=!0,void 0!=f.options.start||void 0!=f.options.end){if(void 0==f.options.start||void 0==f.options.end)var t=f.getItemRange();var e=void 0!=f.options.start?f.options.start:t.min,i=void 0!=f.options.end?f.options.end:t.max;f.setWindow(e,i,{animation:!1})}else f.fit({animation:!1})}),d&&this.setOptions(d),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}var n=(i(12),i(20),i(2)),s=i(1),r=i(8),a=i(10),h=i(23),d=i(27),l=i(38),u=i(43),c=i(41),p=i(28),f=i(44),v=i(46)["default"],m=i(46).printStyle,g=i(47).allOptions,y=i(47).configureOptions;o.prototype=new d,o.prototype._createConfigurator=function(){return new f(this,this.dom.container,y)},o.prototype.redraw=function(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()},o.prototype.setOptions=function(t){var e=v.validate(t,g);if(e===!0&&console.log("%cErrors have been found in the supplied options object.",m),d.prototype.setOptions.call(this,t),"type"in t&&t.type!==this.options.type){this.options.type=t.type;var i=this.itemsData;if(i){var o=this.getSelection();this.setItems(null),this.setItems(i),this.setSelection(o)}}},o.prototype.setItems=function(t){var e;e=t?t instanceof r||t instanceof a?t:new r(t,{type:{start:"Date",end:"Date"}}):null,this.itemsData=e,this.itemSet&&this.itemSet.setItems(e)},o.prototype.setGroups=function(t){var e;e=t?t instanceof r||t instanceof a?t:new r(t):null,this.groupsData=e,this.itemSet.setGroups(e)},o.prototype.setData=function(t){t&&t.groups&&this.setGroups(t.groups),t&&t.items&&this.setItems(t.items)},o.prototype.setSelection=function(t,e){this.itemSet&&this.itemSet.setSelection(t),e&&e.focus&&this.focus(t,e)},o.prototype.getSelection=function(){return this.itemSet&&this.itemSet.getSelection()||[]},o.prototype.focus=function(t,e){if(this.itemsData&&void 0!=t){var i=Array.isArray(t)?t:[t],o=this.itemsData.getDataSet().get(i,{type:{start:"Date",end:"Date"}}),n=null,s=null;if(o.forEach(function(t){var e=t.start.valueOf(),i="end"in t?t.end.valueOf():t.start.valueOf();(null===n||n>e)&&(n=e),(null===s||i>s)&&(s=i)}),null!==n&&null!==s){var r=(n+s)/2,a=Math.max(this.range.end-this.range.start,1.1*(s-n)),h=e&&void 0!==e.animation?e.animation:!0;this.range.setRange(r-a/2,r+a/2,h)}}},o.prototype.fit=function(t){var e=t&&void 0!==t.animation?t.animation:!0,i=this.getItemRange();this.range.setRange(i.min,i.max,e)},o.prototype.getItemRange=function(){var t=this,e=this.getDataRange(),i=null!==e.min?e.min.valueOf():null,o=null!==e.max?e.max.valueOf():null,n=null,r=null;if(null!=i&&null!=o){var a,h,d,l,u;!function(){var e=function(t){return s.convert(t.data.start,"Date").valueOf()},c=function(t){var e=void 0!=t.data.end?t.data.end:t.data.start;return s.convert(e,"Date").valueOf()};a=o-i,0>=a&&(a=10),h=a/t.props.center.width,s.forEach(t.itemSet.items,function(t){t.show(),t.repositionX();var s=e(t),a=c(t),d=s-(t.getWidthLeft()+10)*h,l=a+(t.getWidthRight()+10)*h;i>d&&(i=d,n=t),l>o&&(o=l,r=t)}.bind(t)),n&&r&&(d=n.getWidthLeft()+10,l=r.getWidthRight()+10,u=t.props.center.width-d-l,u>0&&(i=e(n)-d*a/u,o=c(r)+l*a/u))}()}return{min:null!=i?new Date(i):null,max:null!=o?new Date(o):null}},o.prototype.getDataRange=function(){var t=null,e=null,i=this.itemsData&&this.itemsData.getDataSet();return i&&i.forEach(function(i){var o=s.convert(i.start,"Date").valueOf(),n=s.convert(void 0!=i.end?i.end:i.start,"Date").valueOf();(null===t||t>o)&&(t=o),(null===e||n>e)&&(e=n)}),{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},o.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,o=e-s.getAbsoluteLeft(this.dom.centerContainer),n=i-s.getAbsoluteTop(this.dom.centerContainer),r=this.itemSet.itemFromTarget(t),a=this.itemSet.groupFromTarget(t),h=c.customTimeFromTarget(t),d=this.itemSet.options.snap||null,l=this.body.util.getScale(),u=this.body.util.getStep(),p=this._toTime(o),f=d?d(p,l,u):p,v=s.getTarget(t),m=null;return null!=r?m="item":null!=h?m="custom-time":s.hasParent(v,this.timeAxis.dom.foreground)?m="axis":this.timeAxis2&&s.hasParent(v,this.timeAxis2.dom.foreground)?m="axis":s.hasParent(v,this.itemSet.dom.labelSet)?m="group-label":s.hasParent(v,this.currentTime.bar)?m="current-time":s.hasParent(v,this.dom.center)&&(m="background"),{event:t,item:r?r.id:null,group:a?a.groupId:null,what:m,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:n,time:p,snappedTime:f}},t.exports=o},function(t,e,i){if("undefined"!=typeof window){var o=i(21),n=window.Hammer||i(22);t.exports=o(n,{preventDefault:"mouse"})}else t.exports=function(){throw Error("hammer.js is only available in a browser, not in node.js.")}},function(t,e,i){var o,n,s;!function(i){n=[],o=i,s="function"==typeof o?o.apply(e,n):o,!(void 0!==s&&(t.exports=s))}(function(){var t=null;return function e(i,o){function n(t){return t.match(/[^ ]+/g)}function s(e){if("hammer.input"!==e.type){if(e.srcEvent._handled||(e.srcEvent._handled={}),e.srcEvent._handled[e.type])return;e.srcEvent._handled[e.type]=!0}var i=!1;e.stopPropagation=function(){i=!0};var o=e.srcEvent.stopPropagation;"function"==typeof o&&(e.srcEvent.stopPropagation=function(){o(),e.stopPropagation()}),e.firstTarget=t;for(var n=t;n&&!i;){var s=n.hammer;if(s)for(var r,a=0;a0?d._handlers[t]=o:(i.off(t,s),delete d._handlers[t]))}),d},d.emit=function(e,o){t=o.target,i.emit(e,o)},d.destroy=function(){var t=i.element.hammer,e=t.indexOf(d);-1!==e&&t.splice(e,1),t.length||delete i.element.hammer,d._handlers={},i.destroy()},d}})},function(t,e,i){var o;!function(n,s,r,a){function h(t,e,i){return setTimeout(p(t,i),e)}function d(t,e,i){return Array.isArray(t)?(l(t,i[e],i),!0):!1}function l(t,e,i){var o;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==a)for(o=0;o\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=n.console&&(n.console.warn||n.console.log);return s&&s.call(n.console,o,i),t.apply(this,arguments)}}function c(t,e,i){var o,n=e.prototype;o=t.prototype=Object.create(n),o.constructor=t,o._super=n,i&&ut(o,i)}function p(t,e){return function(){return t.apply(e,arguments)}}function f(t,e){return typeof t==ft?t.apply(e?e[0]||a:a,e):t}function v(t,e){return t===a?e:t}function m(t,e,i){l(_(e),function(e){t.addEventListener(e,i,!1)})}function g(t,e,i){l(_(e),function(e){t.removeEventListener(e,i,!1)})}function y(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function b(t,e){return t.indexOf(e)>-1}function _(t){return t.trim().split(/\s+/g)}function w(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;oi[e]}):o.sort()),o}function O(t,e){for(var i,o,n=e[0].toUpperCase()+e.slice(1),s=0;s1&&!i.firstMultiple?i.firstMultiple=N(e):1===n&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,h=e.center=z(o);e.timeStamp=gt(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=F(a,h),e.distance=R(a,h),P(i,e),e.offsetDirection=A(e.deltaX,e.deltaY);var d=L(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=d.x,e.overallVelocityY=d.y,e.overallVelocity=mt(d.x)>mt(d.y)?d.x:d.y,e.scale=r?j(r.pointers,o):1,e.rotation=r?B(r.pointers,o):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,I(i,e);var l=t.element;y(e.srcEvent.target,l)&&(l=e.srcEvent.target),e.target=l}function P(t,e){var i=e.center,o=t.offsetDelta||{},n=t.prevDelta||{},s=t.prevInput||{};e.eventType!==Et&&s.eventType!==It||(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)}function I(t,e){var i,o,n,s,r=t.lastInterval||e,h=e.timeStamp-r.timeStamp;if(e.eventType!=Nt&&(h>Tt||r.velocity===a)){var d=e.deltaX-r.deltaX,l=e.deltaY-r.deltaY,u=L(h,d,l);o=u.x,n=u.y,i=mt(u.x)>mt(u.y)?u.x:u.y,s=A(d,l),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}function N(t){for(var e=[],i=0;in;)i+=t[n].clientX,o+=t[n].clientY,n++;return{x:vt(i/e),y:vt(o/e)}}function L(t,e,i){return{x:e/t||0,y:i/t||0}}function A(t,e){return t===e?zt:mt(t)>=mt(e)?0>t?Lt:At:0>e?Rt:Ft}function R(t,e,i){i||(i=Wt);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return Math.sqrt(o*o+n*n)}function F(t,e,i){i||(i=Wt);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return 180*Math.atan2(n,o)/Math.PI}function B(t,e){return F(e[1],e[0],Yt)+F(t[1],t[0],Yt)}function j(t,e){return R(e[0],e[1],Yt)/R(t[0],t[1],Yt)}function H(){this.evEl=Vt,this.evWin=Ut,this.allow=!0,this.pressed=!1,C.apply(this,arguments)}function W(){this.evEl=Zt,this.evWin=Kt,C.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function Y(){this.evTarget=Qt,this.evWin=$t,this.started=!1,C.apply(this,arguments)}function G(t,e){var i=x(t.touches),o=x(t.changedTouches);return e&(It|Nt)&&(i=k(i.concat(o),"identifier",!0)),[i,o]}function V(){this.evTarget=ee,this.targetIds={},C.apply(this,arguments)}function U(t,e){var i=x(t.touches),o=this.targetIds;if(e&(Et|Pt)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var n,s,r=x(t.changedTouches),a=[],h=this.target;if(s=i.filter(function(t){return y(t.target,h)}),e===Et)for(n=0;na&&(e.push(t),a=e.length-1):n&(It|Nt)&&(i=!0),0>a||(e[a]=t,this.callback(this.manager,n,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),i&&e.splice(a,1))}});var Jt={touchstart:Et,touchmove:Pt,touchend:It,touchcancel:Nt},Qt="touchstart",$t="touchstart touchmove touchend touchcancel";c(Y,C,{handler:function(t){var e=Jt[t.type];if(e===Et&&(this.started=!0),this.started){var i=G.call(this,t,e);e&(It|Nt)&&i[0].length-i[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Mt,srcEvent:t})}}});var te={touchstart:Et,touchmove:Pt,touchend:It,touchcancel:Nt},ee="touchstart touchmove touchend touchcancel";c(V,C,{handler:function(t){var e=te[t.type],i=U.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Mt,srcEvent:t})}}),c(q,C,{handler:function(t,e,i){var o=i.pointerType==Mt,n=i.pointerType==Ct;if(o)this.mouse.allow=!1;else if(n&&!this.mouse.allow)return;e&(It|Nt)&&(this.mouse.allow=!0),this.callback(t,e,i)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var ie=O(pt.style,"touchAction"),oe=ie!==a,ne="compute",se="auto",re="manipulation",ae="none",he="pan-x",de="pan-y";X.prototype={set:function(t){t==ne&&(t=this.compute()),oe&&this.manager.element.style&&(this.manager.element.style[ie]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return l(this.manager.recognizers,function(e){f(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),Z(t.join(" "))},preventDefaults:function(t){if(!oe){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)return void e.preventDefault();var o=this.actions,n=b(o,ae),s=b(o,de),r=b(o,he);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&Bt||r&&i&jt?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var le=1,ue=2,ce=4,pe=8,fe=pe,ve=16,me=32;K.prototype={defaults:{},set:function(t){return ut(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(d(t,"recognizeWith",this))return this;var e=this.simultaneous;return t=$(t,this),e[t.id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return d(t,"dropRecognizeWith",this)?this:(t=$(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(d(t,"requireFailure",this))return this;var e=this.requireFail;return t=$(t,this),-1===w(e,t)&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(d(t,"dropRequireFailure",this))return this;t=$(t,this);var e=w(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){i.manager.emit(e,t)}var i=this,o=this.state;pe>o&&e(i.options.event+J(o)),e(i.options.event),t.additionalEvent&&e(t.additionalEvent),o>=pe&&e(i.options.event+J(o))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=me)},canEmit:function(){for(var t=0;ts?Lt:At,i=s!=this.pX,o=Math.abs(t.deltaX)):(n=0===r?zt:0>r?Rt:Ft,i=r!=this.pY,o=Math.abs(t.deltaY))),t.direction=n,i&&o>e.threshold&&n&e.direction},attrTest:function(t){return tt.prototype.attrTest.call(this,t)&&(this.state&ue||!(this.state&ue)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Q(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),c(it,tt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ae]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ue)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),c(ot,K,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[se]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distancee.time;if(this._input=t,!o||!i||t.eventType&(It|Nt)&&!n)this.reset();else if(t.eventType&Et)this.reset(),this._timer=h(function(){this.state=fe,this.tryEmit()},e.time,this);else if(t.eventType&It)return fe;return me},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===fe&&(t&&t.eventType&It?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=gt(),this.manager.emit(this.options.event,this._input)))}}),c(nt,tt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ae]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ue)}}),c(st,tt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Bt|jt,pointers:1},getTouchAction:function(){return et.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Bt|jt)?e=t.overallVelocity:i&Bt?e=t.overallVelocityX:i&jt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&mt(e)>this.options.velocity&&t.eventType&It},emit:function(t){var e=Q(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),c(rt,K,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[re]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distanceu,c=r||null===n?n:h+(n-h)*i,m=r||null===s?s:l+(s-l)*i;g=a._applyRange(c,m),d.updateHiddenDates(a.options.moment,a.body,a.options.hiddenDates),v=v||g,g&&a.body.emitter.emit("rangechange",{start:new Date(a.start),end:new Date(a.end),byUser:o}),r?v&&a.body.emitter.emit("rangechanged",{start:new Date(a.start),end:new Date(a.end),byUser:o}):a.animationTimer=setTimeout(b,20)}};return m()}var g=this._applyRange(n,s);if(d.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),g){var y={start:new Date(this.start),end:new Date(this.end),byUser:o};this.body.emitter.emit("rangechange",y),this.body.emitter.emit("rangechanged",y)}},o.prototype._cancelAnimation=function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)},o.prototype._applyRange=function(t,e){var i,o=null!=t?r.convert(t,"Date").valueOf():this.start,n=null!=e?r.convert(e,"Date").valueOf():this.end,s=null!=this.options.max?r.convert(this.options.max,"Date").valueOf():null,a=null!=this.options.min?r.convert(this.options.min,"Date").valueOf():null;if(isNaN(o)||null===o)throw new Error('Invalid start "'+t+'"');if(isNaN(n)||null===n)throw new Error('Invalid end "'+e+'"');if(o>n&&(n=o),null!==a&&a>o&&(i=a-o,o+=i,n+=i,null!=s&&n>s&&(n=s)),null!==s&&n>s&&(i=n-s,o-=i,n-=i,null!=a&&a>o&&(o=a)),null!==this.options.zoomMin){var h=parseFloat(this.options.zoomMin);0>h&&(h=0),h>n-o&&(this.end-this.start===h&&o>this.start&&nd&&(d=0),n-o>d&&(this.end-this.start===d&&othis.end?(o=this.start,n=this.end):(i=n-o-d,o+=i/2,n-=i/2))}var l=this.start!=o||this.end!=n;return o>=this.start&&o<=this.end||n>=this.start&&n<=this.end||this.start>=o&&this.start<=n||this.end>=o&&this.end<=n||this.body.emitter.emit("checkRangedItems"),this.start=o,this.end=n,l},o.prototype.getRange=function(){return{start:this.start,end:this.end}},o.prototype.conversion=function(t,e){return o.conversion(this.start,this.end,t,e)},o.conversion=function(t,e,i,o){return void 0===o&&(o=0),0!=i&&e-t!=0?{offset:t,scale:i/(e-t-o)}:{offset:0,scale:1}},o.prototype._onDragStart=function(t){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this._isInsideRange(t)&&this.props.touch.allowDragging&&(this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.dragging=!0,this.body.dom.root&&(this.body.dom.root.style.cursor="move"))},o.prototype._onDrag=function(t){if(this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging){var e=this.options.direction;n(e);var i="horizontal"==e?t.deltaX:t.deltaY;i-=this.deltaDifference;var o=this.props.touch.end-this.props.touch.start,s=d.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end);o-=s;var r="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height,a=-i/r*o,h=this.props.touch.start+a,l=this.props.touch.end+a,u=d.snapAwayFromHidden(this.body.hiddenDates,h,this.previousDelta-i,!0),c=d.snapAwayFromHidden(this.body.hiddenDates,l,this.previousDelta-i,!0);if(u!=h||c!=l)return this.deltaDifference+=i,this.props.touch.start=u,this.props.touch.end=c,void this._onDrag(t);this.previousDelta=i,this._applyRange(h,l);var p=new Date(this.start),f=new Date(this.end);this.body.emitter.emit("rangechange",{start:p,end:f,byUser:!0})}},o.prototype._onDragEnd=function(t){this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging&&(this.props.touch.dragging=!1,this.body.dom.root&&(this.body.dom.root.style.cursor="auto"),this.body.emitter.emit("rangechanged",{start:new Date(this.start),end:new Date(this.end),byUser:!0}))},o.prototype._onMouseWheel=function(t){if(this.options.zoomable&&this.options.moveable&&this._isInsideRange(t)&&(!this.options.zoomKey||t[this.options.zoomKey])){var e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),e){var i;i=0>e?1-e/5:1/(1+e/5);var o=s({x:t.clientX,y:t.clientY},this.body.dom.center),n=this._pointerToDate(o);this.zoom(i,n,e)}t.preventDefault()}},o.prototype._onTouch=function(t){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.scaleOffset=0,this.deltaDifference=0},o.prototype._onPinch=function(t){if(this.options.zoomable&&this.options.moveable){this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=s(t.center,this.body.dom.center));var e=1/(t.scale+this.scaleOffset),i=this._pointerToDate(this.props.touch.center),o=d.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),n=d.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,i),r=o-n,a=i-n+(this.props.touch.start-(i-n))*e,h=i+r+(this.props.touch.end-(i+r))*e;this.startToFront=0>=1-e,this.endToFront=0>=e-1;var l=d.snapAwayFromHidden(this.body.hiddenDates,a,1-e,!0),u=d.snapAwayFromHidden(this.body.hiddenDates,h,e-1,!0);l==a&&u==h||(this.props.touch.start=l,this.props.touch.end=u,this.scaleOffset=1-t.scale,a=l,h=u),this.setRange(a,h,!1,!0),this.startToFront=!1,this.endToFront=!0}},o.prototype._isInsideRange=function(t){var e=t.center?t.center.x:t.clientX,i=e-r.getAbsoluteLeft(this.body.dom.centerContainer),o=this.body.util.toTime(i);return o>=this.start&&o<=this.end},o.prototype._pointerToDate=function(t){var e,i=this.options.direction;if(n(i),"horizontal"==i)return this.body.util.toTime(t.x).valueOf();var o=this.body.domProps.center.height;return e=this.conversion(o),t.y/e.scale+e.offset},o.prototype.zoom=function(t,e,i){null==e&&(e=(this.start+this.end)/2);var o=d.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),n=d.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,e),s=o-n,r=e-n+(this.start-(e-n))*t,a=e+s+(this.end-(e+s))*t;this.startToFront=!(i>0),this.endToFront=!(-i>0);var h=d.snapAwayFromHidden(this.body.hiddenDates,r,i,!0),l=d.snapAwayFromHidden(this.body.hiddenDates,a,-i,!0);h==r&&l==a||(r=h,a=l),this.setRange(r,a,!1,!0),this.startToFront=!1,this.endToFront=!0},o.prototype.move=function(t){var e=this.end-this.start,i=this.start+e*t,o=this.end+e*t;this.start=i,this.end=o},o.prototype.moveTo=function(t){var e=(this.start+this.end)/2,i=e-t,o=this.start-i,n=this.end-i;this.setRange(o,n)},t.exports=o},function(t,e,i){i(20);e.onTouch=function(t,e){e.inputHandler=function(t){t.isFirst&&e(t)},t.on("hammer.input",e.inputHandler)},e.onRelease=function(t,e){return e.inputHandler=function(t){t.isFinal&&e(t)},t.on("hammer.input",e.inputHandler)},e.offTouch=function(t,e){t.off("hammer.input",e.inputHandler)},e.offRelease=e.offTouch},function(t,e){function i(t,e){this.options=null,this.props=null}i.prototype.setOptions=function(t){t&&util.extend(this.options,t)},i.prototype.redraw=function(){return!1},i.prototype.destroy=function(){},i.prototype._isResized=function(){var t=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;return this.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,t},t.exports=i},function(t,e){e.convertHiddenOptions=function(t,i,o){if(o&&!Array.isArray(o))return e.convertHiddenOptions(t,i,[o]);if(i.hiddenDates=[],o&&1==Array.isArray(o)){for(var n=0;n=4*a){var c=0,p=s.clone();switch(o[h].repeat){case"daily":d.day()!=l.day()&&(c=1),d.dayOfYear(n.dayOfYear()),d.year(n.year()),d.subtract(7,"days"),l.dayOfYear(n.dayOfYear()),l.year(n.year()),l.subtract(7-c,"days"),p.add(1,"weeks");break;case"weekly":var f=l.diff(d,"days"),v=d.day();d.date(n.date()),d.month(n.month()),d.year(n.year()),l=d.clone(),d.day(v),l.day(v),l.add(f,"days"),d.subtract(1,"weeks"),l.subtract(1,"weeks"),p.add(1,"weeks");break;case"monthly":d.month()!=l.month()&&(c=1),d.month(n.month()),d.year(n.year()),d.subtract(1,"months"),l.month(n.month()),l.year(n.year()),l.subtract(1,"months"),l.add(c,"months"),p.add(1,"months");break;case"yearly":d.year()!=l.year()&&(c=1),d.year(n.year()),d.subtract(1,"years"),l.year(n.year()),l.subtract(1,"years"),l.add(c,"years"),p.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",o[h].repeat)}for(;p>d;)switch(i.hiddenDates.push({start:d.valueOf(),end:l.valueOf()}),o[h].repeat){case"daily":d.add(1,"days"),l.add(1,"days");break;case"weekly":d.add(1,"weeks"),l.add(1,"weeks");break;case"monthly":d.add(1,"months"),l.add(1,"months");break;case"yearly":d.add(1,"y"),l.add(1,"y");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",o[h].repeat)}i.hiddenDates.push({start:d.valueOf(),end:l.valueOf()})}}e.removeDuplicates(i);var m=e.isHidden(i.range.start,i.hiddenDates),g=e.isHidden(i.range.end,i.hiddenDates),y=i.range.start,b=i.range.end;1==m.hidden&&(y=1==i.range.startToFront?m.startDate-1:m.endDate+1),1==g.hidden&&(b=1==i.range.endToFront?g.startDate-1:g.endDate+1),1!=m.hidden&&1!=g.hidden||i.range._applyRange(y,b)}},e.removeDuplicates=function(t){for(var e=t.hiddenDates,i=[],o=0;o=e[o].start&&e[n].end<=e[o].end?e[n].remove=!0:e[n].start>=e[o].start&&e[n].start<=e[o].end?(e[o].end=e[n].end,e[n].remove=!0):e[n].end>=e[o].start&&e[n].end<=e[o].end&&(e[o].start=e[n].start,e[n].remove=!0));for(var o=0;o=r&&a>n){o=!0;break}}if(1==o&&n=e&&i>r&&(o+=r-s)}return o},e.correctTimeForHidden=function(t,i,o,n){return n=t(n).toDate().valueOf(),n-=e.getHiddenDurationBefore(t,i,o,n)},e.getHiddenDurationBefore=function(t,e,i,o){var n=0;o=t(o).toDate().valueOf();for(var s=0;s=i.start&&a=a&&(n+=a-r)}return n},e.getAccumulatedHiddenDuration=function(t,e,i){for(var o=0,n=0,s=e.start,r=0;r=e.start&&h=i)break;o+=h-a}}return o},e.snapAwayFromHidden=function(t,i,o,n){var s=e.isHidden(i,t);return 1==s.hidden?0>o?1==n?s.startDate-(s.endDate-i)-1:s.startDate-1:1==n?s.endDate+(i-s.startDate)+1:s.endDate+1:i},e.isHidden=function(t,e){for(var i=0;i=o&&n>t)return{hidden:!0,startDate:o,endDate:n}}return{hidden:!1,startDate:o,endDate:n}}},function(t,e,i){function o(){}var n=i(12),s=i(20),r=i(24),a=i(1),h=(i(8),i(10),i(23),i(28),i(38)),d=i(39),l=i(26),u=i(41);n(o.prototype),o.prototype._create=function(t){function e(t){i.isActive()&&i.emit("mousewheel",t); -}this.dom={},this.dom.container=t,this.dom.root=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.backgroundVertical=document.createElement("div"),this.dom.backgroundHorizontal=document.createElement("div"),this.dom.centerContainer=document.createElement("div"),this.dom.leftContainer=document.createElement("div"),this.dom.rightContainer=document.createElement("div"),this.dom.center=document.createElement("div"),this.dom.left=document.createElement("div"),this.dom.right=document.createElement("div"),this.dom.top=document.createElement("div"),this.dom.bottom=document.createElement("div"),this.dom.shadowTop=document.createElement("div"),this.dom.shadowBottom=document.createElement("div"),this.dom.shadowTopLeft=document.createElement("div"),this.dom.shadowBottomLeft=document.createElement("div"),this.dom.shadowTopRight=document.createElement("div"),this.dom.shadowBottomRight=document.createElement("div"),this.dom.root.className="vis-timeline",this.dom.background.className="vis-panel vis-background",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical",this.dom.backgroundHorizontal.className="vis-panel vis-background vis-horizontal",this.dom.centerContainer.className="vis-panel vis-center",this.dom.leftContainer.className="vis-panel vis-left",this.dom.rightContainer.className="vis-panel vis-right",this.dom.top.className="vis-panel vis-top",this.dom.bottom.className="vis-panel vis-bottom",this.dom.left.className="vis-content",this.dom.center.className="vis-content",this.dom.right.className="vis-content",this.dom.shadowTop.className="vis-shadow vis-top",this.dom.shadowBottom.className="vis-shadow vis-bottom",this.dom.shadowTopLeft.className="vis-shadow vis-top",this.dom.shadowBottomLeft.className="vis-shadow vis-bottom",this.dom.shadowTopRight.className="vis-shadow vis-top",this.dom.shadowBottomRight.className="vis-shadow vis-bottom",this.dom.root.appendChild(this.dom.background),this.dom.root.appendChild(this.dom.backgroundVertical),this.dom.root.appendChild(this.dom.backgroundHorizontal),this.dom.root.appendChild(this.dom.centerContainer),this.dom.root.appendChild(this.dom.leftContainer),this.dom.root.appendChild(this.dom.rightContainer),this.dom.root.appendChild(this.dom.top),this.dom.root.appendChild(this.dom.bottom),this.dom.centerContainer.appendChild(this.dom.center),this.dom.leftContainer.appendChild(this.dom.left),this.dom.rightContainer.appendChild(this.dom.right),this.dom.centerContainer.appendChild(this.dom.shadowTop),this.dom.centerContainer.appendChild(this.dom.shadowBottom),this.dom.leftContainer.appendChild(this.dom.shadowTopLeft),this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft),this.dom.rightContainer.appendChild(this.dom.shadowTopRight),this.dom.rightContainer.appendChild(this.dom.shadowBottomRight),this.on("rangechange",function(){this.initialDrawDone===!0&&this._redraw()}.bind(this)),this.on("touch",this._onTouch.bind(this)),this.on("pan",this._onDrag.bind(this));var i=this;this.on("_change",function(t){t&&1==t.queue?i._redrawTimer||(i._redrawTimer=setTimeout(function(){i._redrawTimer=null,i._redraw()},0)):i._redraw()}),this.hammer=new s(this.dom.root),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:30}),this.listeners={};var o=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];if(o.forEach(function(t){var e=function(e){i.isActive()&&i.emit(t,e)};i.hammer.on(t,e),i.listeners[t]=e}),r.onTouch(this.hammer,function(t){i.emit("touch",t)}.bind(this)),r.onRelease(this.hammer,function(t){i.emit("release",t)}.bind(this)),this.dom.root.addEventListener("mousewheel",e),this.dom.root.addEventListener("DOMMouseScroll",e),this.props={root:{},background:{},centerContainer:{},leftContainer:{},rightContainer:{},center:{},left:{},right:{},top:{},bottom:{},border:{},scrollTop:0,scrollTopMin:0},this.customTimes=[],this.touch={},this.redrawCount=0,this.initialDrawDone=!1,!t)throw new Error("No container provided");t.appendChild(this.dom.root)},o.prototype.setOptions=function(t){if(t){var e=["width","height","minHeight","maxHeight","autoResize","start","end","clickToUse","dataAttributes","hiddenDates","locale","locales","moment","throttleRedraw"];if(a.selectiveExtend(e,this.options,t),this.options.orientation={item:void 0,axis:void 0},"orientation"in t&&("string"==typeof t.orientation?this.options.orientation={item:t.orientation,axis:t.orientation}:"object"==typeof t.orientation&&("item"in t.orientation&&(this.options.orientation.item=t.orientation.item),"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis))),"both"===this.options.orientation.axis){if(!this.timeAxis2){var i=this.timeAxis2=new h(this.body);i.setOptions=function(t){var e=t?a.extend({},t):{};e.orientation="top",h.prototype.setOptions.call(i,e)},this.components.push(i)}}else if(this.timeAxis2){var o=this.components.indexOf(this.timeAxis2);-1!==o&&this.components.splice(o,1),this.timeAxis2.destroy(),this.timeAxis2=null}if("function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),"hiddenDates"in this.options&&l.convertHiddenOptions(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new d(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),"showCustomTime"in t)throw new Error("Option `showCustomTime` is deprecated. Create a custom time bar via timeline.addCustomTime(time [, id])");this._initAutoResize()}if(this.components.forEach(function(e){return e.setOptions(t)}),"configure"in t){this.configurator||(this.configurator=this._createConfigurator()),this.configurator.setOptions(t.configure);var n=a.deepExtend({},this.options);this.components.forEach(function(t){a.deepExtend(n,t.options)}),this.configurator.setModuleOptions({global:n})}this._origRedraw?this._redraw():(this._origRedraw=this._redraw.bind(this),this._redraw=a.throttle(this._origRedraw,this.options.throttleRedraw))},o.prototype.isActive=function(){return!this.activator||this.activator.active},o.prototype.destroy=function(){this.setItems(null),this.setGroups(null),this.off(),this._stopAutoResize(),this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root),this.dom=null,this.activator&&(this.activator.destroy(),delete this.activator);for(var t in this.listeners)this.listeners.hasOwnProperty(t)&&delete this.listeners[t];this.listeners=null,this.hammer=null,this.components.forEach(function(t){return t.destroy()}),this.body=null},o.prototype.setCustomTime=function(t,e){var i=this.customTimes.filter(function(t){return e===t.options.id});if(0===i.length)throw new Error("No custom time bar found with id "+JSON.stringify(e));i.length>0&&i[0].setCustomTime(t)},o.prototype.getCustomTime=function(t){var e=this.customTimes.filter(function(e){return e.options.id===t});if(0===e.length)throw new Error("No custom time bar found with id "+JSON.stringify(t));return e[0].getCustomTime()},o.prototype.setCustomTimeTitle=function(t,e){var i=this.customTimes.filter(function(t){return t.options.id===e});if(0===i.length)throw new Error("No custom time bar found with id "+JSON.stringify(e));return i.length>0?i[0].setCustomTitle(t):void 0},o.prototype.getEventProperties=function(t){return{event:t}},o.prototype.addCustomTime=function(t,e){var i=void 0!==t?a.convert(t,"Date").valueOf():new Date,o=this.customTimes.some(function(t){return t.options.id===e});if(o)throw new Error("A custom time with id "+JSON.stringify(e)+" already exists");var n=new u(this.body,a.extend({},this.options,{time:i,id:e}));return this.customTimes.push(n),this.components.push(n),this._redraw(),e},o.prototype.removeCustomTime=function(t){var e=this.customTimes.filter(function(e){return e.options.id===t});if(0===e.length)throw new Error("No custom time bar found with id "+JSON.stringify(t));e.forEach(function(t){this.customTimes.splice(this.customTimes.indexOf(t),1),this.components.splice(this.components.indexOf(t),1),t.destroy()}.bind(this))},o.prototype.getVisibleItems=function(){return this.itemSet&&this.itemSet.getVisibleItems()||[]},o.prototype.fit=function(t){var e=this.getDataRange();if(null!==e.min||null!==e.max){var i=e.max-e.min,o=new Date(e.min.valueOf()-.01*i),n=new Date(e.max.valueOf()+.01*i),s=t&&void 0!==t.animation?t.animation:!0;this.range.setRange(o,n,s)}},o.prototype.getDataRange=function(){throw new Error("Cannot invoke abstract method getDataRange")},o.prototype.setWindow=function(t,e,i){var o;if(1==arguments.length){var n=arguments[0];o=void 0!==n.animation?n.animation:!0,this.range.setRange(n.start,n.end,o)}else o=i&&void 0!==i.animation?i.animation:!0,this.range.setRange(t,e,o)},o.prototype.moveTo=function(t,e){var i=this.range.end-this.range.start,o=a.convert(t,"Date").valueOf(),n=o-i/2,s=o+i/2,r=e&&void 0!==e.animation?e.animation:!0;this.range.setRange(n,s,r)},o.prototype.getWindow=function(){var t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}},o.prototype.redraw=function(){this._redraw()},o.prototype._redraw=function(){this.redrawCount++;var t=!1,e=this.options,i=this.props,o=this.dom;if(o&&o.container&&0!=o.container.clientWidth){l.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),"top"==e.orientation?(a.addClassName(o.root,"vis-top"),a.removeClassName(o.root,"vis-bottom")):(a.removeClassName(o.root,"vis-top"),a.addClassName(o.root,"vis-bottom")),o.root.style.maxHeight=a.option.asSize(e.maxHeight,""),o.root.style.minHeight=a.option.asSize(e.minHeight,""),o.root.style.width=a.option.asSize(e.width,""),i.border.left=(o.centerContainer.offsetWidth-o.centerContainer.clientWidth)/2,i.border.right=i.border.left,i.border.top=(o.centerContainer.offsetHeight-o.centerContainer.clientHeight)/2,i.border.bottom=i.border.top;var n=o.root.offsetHeight-o.root.clientHeight,s=o.root.offsetWidth-o.root.clientWidth;0===o.centerContainer.clientHeight&&(i.border.left=i.border.top,i.border.right=i.border.left),0===o.root.clientHeight&&(s=n),i.center.height=o.center.offsetHeight,i.left.height=o.left.offsetHeight,i.right.height=o.right.offsetHeight,i.top.height=o.top.clientHeight||-i.border.top,i.bottom.height=o.bottom.clientHeight||-i.border.bottom;var r=Math.max(i.left.height,i.center.height,i.right.height),h=i.top.height+r+i.bottom.height+n+i.border.top+i.border.bottom;o.root.style.height=a.option.asSize(e.height,h+"px"),i.root.height=o.root.offsetHeight,i.background.height=i.root.height-n;var d=i.root.height-i.top.height-i.bottom.height-n;i.centerContainer.height=d,i.leftContainer.height=d,i.rightContainer.height=i.leftContainer.height,i.root.width=o.root.offsetWidth,i.background.width=i.root.width-s,i.left.width=o.leftContainer.clientWidth||-i.border.left,i.leftContainer.width=i.left.width,i.right.width=o.rightContainer.clientWidth||-i.border.right,i.rightContainer.width=i.right.width;var u=i.root.width-i.left.width-i.right.width-s;i.center.width=u,i.centerContainer.width=u,i.top.width=u,i.bottom.width=u,o.background.style.height=i.background.height+"px",o.backgroundVertical.style.height=i.background.height+"px",o.backgroundHorizontal.style.height=i.centerContainer.height+"px",o.centerContainer.style.height=i.centerContainer.height+"px",o.leftContainer.style.height=i.leftContainer.height+"px",o.rightContainer.style.height=i.rightContainer.height+"px",o.background.style.width=i.background.width+"px",o.backgroundVertical.style.width=i.centerContainer.width+"px",o.backgroundHorizontal.style.width=i.background.width+"px",o.centerContainer.style.width=i.center.width+"px",o.top.style.width=i.top.width+"px",o.bottom.style.width=i.bottom.width+"px",o.background.style.left="0",o.background.style.top="0",o.backgroundVertical.style.left=i.left.width+i.border.left+"px",o.backgroundVertical.style.top="0",o.backgroundHorizontal.style.left="0",o.backgroundHorizontal.style.top=i.top.height+"px",o.centerContainer.style.left=i.left.width+"px",o.centerContainer.style.top=i.top.height+"px",o.leftContainer.style.left="0",o.leftContainer.style.top=i.top.height+"px",o.rightContainer.style.left=i.left.width+i.center.width+"px",o.rightContainer.style.top=i.top.height+"px",o.top.style.left=i.left.width+"px",o.top.style.top="0",o.bottom.style.left=i.left.width+"px",o.bottom.style.top=i.top.height+i.centerContainer.height+"px",this._updateScrollTop();var c=this.props.scrollTop;"top"!=e.orientation.item&&(c+=Math.max(this.props.centerContainer.height-this.props.center.height-this.props.border.top-this.props.border.bottom,0)),o.center.style.left="0",o.center.style.top=c+"px",o.left.style.left="0",o.left.style.top=c+"px",o.right.style.left="0",o.right.style.top=c+"px";var p=0==this.props.scrollTop?"hidden":"",f=this.props.scrollTop==this.props.scrollTopMin?"hidden":"";o.shadowTop.style.visibility=p,o.shadowBottom.style.visibility=f,o.shadowTopLeft.style.visibility=p,o.shadowBottomLeft.style.visibility=f,o.shadowTopRight.style.visibility=p,o.shadowBottomRight.style.visibility=f,this.components.forEach(function(e){t=e.redraw()||t});var v=5;if(t){if(this.redrawCount0&&(this.props.scrollTop=0),this.props.scrollTope;e++)o=this.selection[e],n=this.items[o],n&&n.unselect();for(this.selection=[],e=0,i=t.length;i>e;e++)o=t[e],n=this.items[o],n&&(this.selection.push(o),n.select())},o.prototype.getSelection=function(){return this.selection.concat([])},o.prototype.getVisibleItems=function(){var t=this.body.range.getRange(),e=this.body.util.toScreen(t.start),i=this.body.util.toScreen(t.end),o=[];for(var n in this.groups)if(this.groups.hasOwnProperty(n))for(var s=this.groups[n],r=s.visibleItems,a=0;ae&&o.push(h.id)}return o},o.prototype._deselect=function(t){for(var e=this.selection,i=0,o=e.length;o>i;i++)if(e[i]==t){e.splice(i,1);break}},o.prototype.redraw=function(){var t=this.options.margin,e=this.body.range,i=s.option.asSize,o=this.options,n=o.orientation.item,r=!1,a=this.dom.frame;this.props.top=this.body.domProps.top.height+this.body.domProps.border.top,this.props.left=this.body.domProps.left.width+this.body.domProps.border.left,a.className="vis-itemset",r=this._orderGroups()||r;var h=e.end-e.start,d=h!=this.lastVisibleInterval||this.props.width!=this.props.lastWidth;d&&(this.stackDirty=!0),this.lastVisibleInterval=h,this.props.lastWidth=this.props.width;var l=this.stackDirty,u=this._firstGroup(),c={item:t.item,axis:t.axis},p={item:t.item,axis:t.item.vertical/2},f=0,v=t.axis+t.item.vertical;return this.groups[g].redraw(e,p,l),s.forEach(this.groups,function(t){var i=t==u?c:p,o=t.redraw(e,i,l);r=o||r,f+=t.height}),f=Math.max(f,v),this.stackDirty=!1,a.style.height=i(f),this.props.width=a.offsetWidth,this.props.height=f,this.dom.axis.style.top=i("top"==n?this.body.domProps.top.height+this.body.domProps.border.top:this.body.domProps.top.height+this.body.domProps.centerContainer.height),this.dom.axis.style.left="0",r=this._isResized()||r},o.prototype._firstGroup=function(){var t="top"==this.options.orientation.item?0:this.groupIds.length-1,e=this.groupIds[t],i=this.groups[e]||this.groups[m];return i||null},o.prototype._updateUngrouped=function(){var t,e,i=this.groups[m];this.groups[g];if(this.groupsData){if(i){i.hide(),delete this.groups[m];for(e in this.items)if(this.items.hasOwnProperty(e)){t=this.items[e],t.parent&&t.parent.remove(t);var o=this._getGroupId(t.data),n=this.groups[o];n&&n.add(t)||t.hide()}}}else if(!i){var s=null,r=null;i=new l(s,r,this),this.groups[m]=i;for(e in this.items)this.items.hasOwnProperty(e)&&(t=this.items[e],i.add(t));i.show()}},o.prototype.getLabelSet=function(){return this.dom.labelSet},o.prototype.setItems=function(t){var e,i=this,o=this.itemsData;if(t){if(!(t instanceof r||t instanceof a))throw new TypeError("Data must be an instance of DataSet or DataView");this.itemsData=t}else this.itemsData=null;if(o&&(s.forEach(this.itemListeners,function(t,e){o.off(e,t)}),e=o.getIds(),this._onRemove(e)),this.itemsData){var n=this.id;s.forEach(this.itemListeners,function(t,e){i.itemsData.on(e,t,n)}),e=this.itemsData.getIds(),this._onAdd(e),this._updateUngrouped()}this.body.emitter.emit("_change",{queue:!0})},o.prototype.getItems=function(){return this.itemsData},o.prototype.setGroups=function(t){var e,i=this;if(this.groupsData&&(s.forEach(this.groupListeners,function(t,e){i.groupsData.off(e,t)}),e=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(e)),t){if(!(t instanceof r||t instanceof a))throw new TypeError("Data must be an instance of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var o=this.id;s.forEach(this.groupListeners,function(t,e){i.groupsData.on(e,t,o)}),e=this.groupsData.getIds(),this._onAddGroups(e)}this._updateUngrouped(),this._order(),this.body.emitter.emit("_change",{queue:!0})},o.prototype.getGroups=function(){return this.groupsData},o.prototype.removeItem=function(t){var e=this.itemsData.get(t),i=this.itemsData.getDataSet();e&&this.options.onRemove(e,function(e){e&&i.remove(t)})},o.prototype._getType=function(t){return t.type||this.options.type||(t.end?"range":"box")},o.prototype._getGroupId=function(t){var e=this._getType(t);return"background"==e&&void 0==t.group?g:this.groupsData?t.group:m},o.prototype._onUpdate=function(t){var e=this;t.forEach(function(t){var i,n=e.itemsData.get(t,e.itemOptions),s=e.items[t],r=e._getType(n),a=o.types[r];if(s&&(a&&s instanceof a?e._updateItem(s,n):(i=s.selected,e._removeItem(s),s=null)),!s){if(!a)throw"rangeoverflow"==r?new TypeError('Item type "rangeoverflow" is deprecated. Use css styling instead: .vis-item.vis-range .vis-item-content {overflow: visible;}'):new TypeError('Unknown item type "'+r+'"');s=new a(n,e.conversion,e.options),s.id=t,e._addItem(s),i&&(this.selection.push(t),s.select())}}.bind(this)),this._order(),this.stackDirty=!0,this.body.emitter.emit("_change",{queue:!0})},o.prototype._onAdd=o.prototype._onUpdate,o.prototype._onRemove=function(t){var e=0,i=this;t.forEach(function(t){var o=i.items[t];o&&(e++,i._removeItem(o))}),e&&(this._order(),this.stackDirty=!0,this.body.emitter.emit("_change",{queue:!0}))},o.prototype._order=function(){s.forEach(this.groups,function(t){t.order()})},o.prototype._onUpdateGroups=function(t){this._onAddGroups(t)},o.prototype._onAddGroups=function(t){var e=this;t.forEach(function(t){var i=e.groupsData.get(t),o=e.groups[t];if(o)o.setData(i);else{if(t==m||t==g)throw new Error("Illegal group id. "+t+" is a reserved id.");var n=Object.create(e.options);s.extend(n,{height:null}),o=new l(t,i,e),e.groups[t]=o;for(var r in e.items)if(e.items.hasOwnProperty(r)){var a=e.items[r];a.data.group==t&&o.add(a)}o.order(),o.show()}}),this.body.emitter.emit("_change",{queue:!0})},o.prototype._onRemoveGroups=function(t){var e=this.groups;t.forEach(function(t){var i=e[t];i&&(i.hide(),delete e[t])}),this.markDirty(),this.body.emitter.emit("_change",{queue:!0})},o.prototype._orderGroups=function(){if(this.groupsData){var t=this.groupsData.getIds({order:this.options.groupOrder}),e=!s.equalArray(t,this.groupIds);if(e){var i=this.groups;t.forEach(function(t){i[t].hide()}),t.forEach(function(t){i[t].show()}),this.groupIds=t}return e}return!1},o.prototype._addItem=function(t){this.items[t.id]=t;var e=this._getGroupId(t.data),i=this.groups[e];i&&i.add(t)},o.prototype._updateItem=function(t,e){var i=t.data.group,o=t.data.subgroup;if(t.setData(e),i!=t.data.group||o!=t.data.subgroup){var n=this.groups[i];n&&n.remove(t);var s=this._getGroupId(t.data),r=this.groups[s];r&&r.add(t)}},o.prototype._removeItem=function(t){t.hide(),delete this.items[t.id];var e=this.selection.indexOf(t.id);-1!=e&&this.selection.splice(e,1),t.parent&&t.parent.remove(t)},o.prototype._constructByEndArray=function(t){for(var e=[],i=0;in+r)return}else{var a=e.height;if(n+a-r>o)return}}if(e&&e!=this.groupTouchParams.group){var h=this.groupsData,d=h.get(e.groupId),l=h.get(this.groupTouchParams.group.groupId);l&&d&&(this.options.groupOrderSwap(l,d,this.groupsData),this.groupsData.update(l),this.groupsData.update(d));var u=this.groupsData.getIds({order:this.options.groupOrder});if(!s.equalArray(u,this.groupTouchParams.originalOrder))for(var h=this.groupsData,c=this.groupTouchParams.originalOrder,p=this.groupTouchParams.group.groupId,f=Math.min(c.length,u.length),v=0,m=0,g=0;f>v;){for(;f>v+m&&f>v+g&&u[v+m]==c[v+g];)v++;if(v+m>=f)break;if(u[v+m]!=p)if(c[v+g]!=p){var y=u.indexOf(c[v+g]),b=h.get(u[v+m]),_=h.get(c[v+g]);this.options.groupOrderSwap(b,_,h),h.update(b),h.update(_);var w=u[v+m];u[v+m]=c[v+g],u[y]=w,v++}else g=1;else m=1}}}},o.prototype._onGroupDragEnd=function(t){if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();var e=this,i=e.groupTouchParams.group.groupId,o=e.groupsData.getDataSet(),n=s.extend({},o.get(i));e.options.onMoveGroup(n,function(t){if(t)t[o._fieldId]=i,o.update(t);else{var n=o.getIds({order:e.options.groupOrder});if(!s.equalArray(n,e.groupTouchParams.originalOrder))for(var r=e.groupTouchParams.originalOrder,a=Math.min(r.length,n.length),h=0;a>h;){for(;a>h&&n[h]==r[h];)h++;if(h>=a)break;var d=n.indexOf(r[h]),l=o.get(n[h]),u=o.get(r[h]);e.options.groupOrderSwap(l,u,o),groupsData.update(l),groupsData.update(u);var c=n[h];n[h]=r[h],n[d]=c,h++}}}),e.body.emitter.emit("groupDragged",{groupId:i})}},o.prototype._onSelectItem=function(t){if(this.options.selectable){var e=t.srcEvent&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey),i=t.srcEvent&&t.srcEvent.shiftKey;if(e||i)return void this._onMultiSelectItem(t);var o=this.getSelection(),n=this.itemFromTarget(t),s=n?[n.id]:[];this.setSelection(s);var r=this.getSelection();(r.length>0||o.length>0)&&this.body.emitter.emit("select",{items:r,event:t})}},o.prototype._onAddItem=function(t){if(this.options.selectable&&this.options.editable.add){var e=this,i=this.options.snap||null,o=this.itemFromTarget(t);if(o){var n=e.itemsData.get(o.id);this.options.onUpdate(n,function(t){t&&e.itemsData.getDataSet().update(t)})}else{var r=s.getAbsoluteLeft(this.dom.frame),a=t.center.x-r,h=this.body.util.toTime(a),d=this.body.util.getScale(),l=this.body.util.getStep(),u={start:i?i(h,d,l):h,content:"new item"};if("range"===this.options.type){var c=this.body.util.toTime(a+this.props.width/5);u.end=i?i(c,d,l):c}u[this.itemsData._fieldId]=s.randomUUID();var p=this.groupFromTarget(t);p&&(u.group=p.groupId),u=this._cloneItemData(u),this.options.onAdd(u,function(t){t&&e.itemsData.getDataSet().add(t)})}}},o.prototype._onMultiSelectItem=function(t){if(this.options.selectable){var e=this.itemFromTarget(t);if(e){var i=this.options.multiselect?this.getSelection():[],n=t.srcEvent&&t.srcEvent.shiftKey||!1;if(n&&this.options.multiselect){var s=this.itemsData.get(e.id).group,r=void 0;this.options.multiselectPerGroup&&i.length>0&&(r=this.itemsData.get(i[0]).group),this.options.multiselectPerGroup&&void 0!=r&&r!=s||i.push(e.id);var a=o._getItemRange(this.itemsData.get(i,this.itemOptions));if(!this.options.multiselectPerGroup||r==s){i=[];for(var h in this.items)if(this.items.hasOwnProperty(h)){var d=this.items[h],l=d.data.start,u=void 0!==d.data.end?d.data.end:l;!(l>=a.min&&u<=a.max)||this.options.multiselectPerGroup&&r!=this.itemsData.get(d.id).group||d instanceof v||i.push(d.id)}}}else{var c=i.indexOf(e.id);-1==c?i.push(e.id):i.splice(c,1)}this.setSelection(i),this.body.emitter.emit("select",{items:this.getSelection(),event:t})}}},o._getItemRange=function(t){var e=null,i=null;return t.forEach(function(t){(null==i||t.starte)&&(e=t.end):(null==e||t.start>e)&&(e=t.start)}),{min:i,max:e}},o.prototype.itemFromTarget=function(t){for(var e=t.target;e;){if(e.hasOwnProperty("timeline-item"))return e["timeline-item"];e=e.parentNode}return null},o.prototype.groupFromTarget=function(t){for(var e=t.center?t.center.y:t.clientY,i=0;ia&&ea)return n}else if(0===i&&e0?t.step:1,this.autoScale=!1)},o.prototype.setAutoScale=function(t){this.autoScale=t},o.prototype.setMinimumStep=function(t){if(void 0!=t){var e=31104e6,i=2592e6,o=864e5,n=36e5,s=6e4,r=1e3,a=1;1e3*e>t&&(this.scale="year",this.step=1e3),500*e>t&&(this.scale="year",this.step=500),100*e>t&&(this.scale="year",this.step=100),50*e>t&&(this.scale="year",this.step=50),10*e>t&&(this.scale="year",this.step=10),5*e>t&&(this.scale="year",this.step=5),e>t&&(this.scale="year",this.step=1),3*i>t&&(this.scale="month",this.step=3),i>t&&(this.scale="month",this.step=1),5*o>t&&(this.scale="day",this.step=5),2*o>t&&(this.scale="day",this.step=2),o>t&&(this.scale="day",this.step=1),o/2>t&&(this.scale="weekday",this.step=1),4*n>t&&(this.scale="hour",this.step=4),n>t&&(this.scale="hour",this.step=1),15*s>t&&(this.scale="minute",this.step=15),10*s>t&&(this.scale="minute",this.step=10),5*s>t&&(this.scale="minute",this.step=5),s>t&&(this.scale="minute",this.step=1),15*r>t&&(this.scale="second",this.step=15),10*r>t&&(this.scale="second",this.step=10),5*r>t&&(this.scale="second",this.step=5),r>t&&(this.scale="second",this.step=1),200*a>t&&(this.scale="millisecond",this.step=200),100*a>t&&(this.scale="millisecond",this.step=100),50*a>t&&(this.scale="millisecond",this.step=50),10*a>t&&(this.scale="millisecond",this.step=10),5*a>t&&(this.scale="millisecond",this.step=5),a>t&&(this.scale="millisecond",this.step=1)}},o.snap=function(t,e,i){var o=n(t);if("year"==e){var s=o.year()+Math.round(o.month()/12);o.year(Math.round(s/i)*i),o.month(0),o.date(0),o.hours(0),o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("month"==e)o.date()>15?(o.date(1),o.add(1,"month")):o.date(1),o.hours(0),o.minutes(0),o.seconds(0),o.milliseconds(0);else if("day"==e){switch(i){case 5:case 2:o.hours(24*Math.round(o.hours()/24));break;default:o.hours(12*Math.round(o.hours()/12))}o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("weekday"==e){switch(i){case 5:case 2:o.hours(12*Math.round(o.hours()/12));break;default:o.hours(6*Math.round(o.hours()/6))}o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("hour"==e){switch(i){case 4:o.minutes(60*Math.round(o.minutes()/60));break;default:o.minutes(30*Math.round(o.minutes()/30))}o.seconds(0),o.milliseconds(0)}else if("minute"==e){switch(i){case 15:case 10:o.minutes(5*Math.round(o.minutes()/5)),o.seconds(0);break;case 5:o.seconds(60*Math.round(o.seconds()/60));break;default:o.seconds(30*Math.round(o.seconds()/30))}o.milliseconds(0)}else if("second"==e)switch(i){case 15:case 10:o.seconds(5*Math.round(o.seconds()/5)),o.milliseconds(0);break;case 5:o.milliseconds(1e3*Math.round(o.milliseconds()/1e3));break;default:o.milliseconds(500*Math.round(o.milliseconds()/500))}else if("millisecond"==e){var r=i>5?i/2:1;o.milliseconds(Math.round(o.milliseconds()/r)*r)}return o},o.prototype.isMajor=function(){if(1==this.switchedYear)switch(this.switchedYear=!1,this.scale){case"year":case"month":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedMonth)switch(this.switchedMonth=!1,this.scale){case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedDay)switch(this.switchedDay=!1,this.scale){case"millisecond":case"second":case"minute":case"hour":return!0;default:return!1}var t=this.moment(this.current);switch(this.scale){case"millisecond":return 0==t.milliseconds();case"second":return 0==t.seconds();case"minute":return 0==t.hours()&&0==t.minutes();case"hour":return 0==t.hours();case"weekday":case"day":return 1==t.date();case"month":return 0==t.month();case"year":return!1;default:return!1}},o.prototype.getLabelMinor=function(t){void 0==t&&(t=this.current);var e=this.format.minorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""},o.prototype.getLabelMajor=function(t){void 0==t&&(t=this.current);var e=this.format.majorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""},o.prototype.getClassName=function(){function t(t){return t/h%2==0?" vis-even":" vis-odd"}function e(t){return t.isSame(new Date,"day")?" vis-today":t.isSame(s().add(1,"day"),"day")?" vis-tomorrow":t.isSame(s().add(-1,"day"),"day")?" vis-yesterday":""}function i(t){return t.isSame(new Date,"week")?" vis-current-week":""}function o(t){return t.isSame(new Date,"month")?" vis-current-month":""}function n(t){return t.isSame(new Date,"year")?" vis-current-year":""}var s=this.moment,r=this.moment(this.current),a=r.locale?r.locale("en"):r.lang("en"),h=this.step;switch(this.scale){case"millisecond":return t(a.milliseconds()).trim();case"second":return t(a.seconds()).trim();case"minute":return t(a.minutes()).trim();case"hour":var d=a.hours();return 4==this.step&&(d=d+"-h"+(d+4)),"vis-h"+d+e(a)+t(a.hours());case"weekday":return"vis-"+a.format("dddd").toLowerCase()+e(a)+i(a)+t(a.date());case"day":var l=a.date(),u=a.format("MMMM").toLowerCase();return"vis-day"+l+" vis-"+u+o(a)+t(l-1);case"month":return"vis-"+a.format("MMMM").toLowerCase()+o(a)+t(a.month());case"year":var c=a.year();return"vis-year"+c+n(a)+t(c);default:return""}},t.exports=o},function(t,e,i){function o(t,e,i){this.groupId=t,this.subgroups={},this.subgroupIndex=0,this.subgroupOrderer=e&&e.subgroupOrder,this.itemSet=i,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;var o=this;this.itemSet.body.emitter.on("checkRangedItems",function(){o.checkRangedItems=!0}),this._create(),this.setData(e)}var n=i(1),s=i(31);i(32);o.prototype._create=function(){var t=document.createElement("div");this.itemSet.options.groupEditable.order?t.className="vis-label draggable":t.className="vis-label",this.dom.label=t;var e=document.createElement("div");e.className="vis-inner",t.appendChild(e),this.dom.inner=e;var i=document.createElement("div");i.className="vis-group",i["timeline-group"]=this,this.dom.foreground=i,this.dom.background=document.createElement("div"),this.dom.background.className="vis-group",this.dom.axis=document.createElement("div"),this.dom.axis.className="vis-group",this.dom.marker=document.createElement("div"),this.dom.marker.style.visibility="hidden",this.dom.marker.innerHTML="?",this.dom.background.appendChild(this.dom.marker)},o.prototype.setData=function(t){var e;if(e=this.itemSet.options&&this.itemSet.options.groupTemplate?this.itemSet.options.groupTemplate(t):t&&t.content,e instanceof Element){for(this.dom.inner.appendChild(e);this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(e)}else void 0!==e&&null!==e?this.dom.inner.innerHTML=e:this.dom.inner.innerHTML=this.groupId||"";this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?n.removeClassName(this.dom.inner,"vis-hidden"):n.addClassName(this.dom.inner,"vis-hidden");var i=t&&t.className||null;i!=this.className&&(this.className&&(n.removeClassName(this.dom.label,this.className),n.removeClassName(this.dom.foreground,this.className),n.removeClassName(this.dom.background,this.className),n.removeClassName(this.dom.axis,this.className)),n.addClassName(this.dom.label,i),n.addClassName(this.dom.foreground,i),n.addClassName(this.dom.background,i),n.addClassName(this.dom.axis,i),this.className=i),this.style&&(n.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(n.addCssText(this.dom.label,t.style),this.style=t.style)},o.prototype.getLabelWidth=function(){return this.props.label.width},o.prototype.redraw=function(t,e,i){var o=!1,r=this.dom.marker.clientHeight;if(r!=this.lastMarkerHeight&&(this.lastMarkerHeight=r,n.forEach(this.items,function(t){t.dirty=!0,t.displayed&&t.redraw()}),i=!0),this._calculateSubGroupHeights(),"function"==typeof this.itemSet.options.order){if(i){var a=this,h=!1;n.forEach(this.items,function(t){t.displayed||(t.redraw(),a.visibleItems.push(t)),t.repositionX(h)});var d=this.orderedItems.byStart.slice().sort(function(t,e){return a.itemSet.options.order(t.data,e.data)});s.stack(d,e,!0)}this.visibleItems=this._updateVisibleItems(this.orderedItems,this.visibleItems,t)}else this.visibleItems=this._updateVisibleItems(this.orderedItems,this.visibleItems,t),this.itemSet.options.stack?s.stack(this.visibleItems,e,i):s.nostack(this.visibleItems,e,this.subgroups);var l=this._calculateHeight(e),u=this.dom.foreground;this.top=u.offsetTop,this.left=u.offsetLeft,this.width=u.offsetWidth,o=n.updateProperty(this,"height",l)||o,o=n.updateProperty(this.props.label,"width",this.dom.inner.clientWidth)||o,o=n.updateProperty(this.props.label,"height",this.dom.inner.clientHeight)||o,this.dom.background.style.height=l+"px",this.dom.foreground.style.height=l+"px",this.dom.label.style.height=l+"px";for(var c=0,p=this.visibleItems.length;p>c;c++){var f=this.visibleItems[c];f.repositionY(e)}return o},o.prototype._calculateSubGroupHeights=function(){if(Object.keys(this.subgroups).length>0){var t=this;this.resetSubgroups(),n.forEach(this.visibleItems,function(e){void 0!==e.data.subgroup&&(t.subgroups[e.data.subgroup].height=Math.max(t.subgroups[e.data.subgroup].height,e.height),t.subgroups[e.data.subgroup].visible=!0)})}},o.prototype._calculateHeight=function(t){var e,i=this.visibleItems;if(i.length>0){var o=i[0].top,s=i[0].top+i[0].height;if(n.forEach(i,function(t){o=Math.min(o,t.top),s=Math.max(s,t.top+t.height)}),o>t.axis){var r=o-t.axis;s-=r,n.forEach(i,function(t){t.top-=r})}e=s+t.item.vertical/2}else e=0;return e=Math.max(e,this.props.label.height)},o.prototype.show=function(){this.dom.label.parentNode||this.itemSet.dom.labelSet.appendChild(this.dom.label),this.dom.foreground.parentNode||this.itemSet.dom.foreground.appendChild(this.dom.foreground),this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background),this.dom.axis.parentNode||this.itemSet.dom.axis.appendChild(this.dom.axis)},o.prototype.hide=function(){var t=this.dom.label;t.parentNode&&t.parentNode.removeChild(t);var e=this.dom.foreground;e.parentNode&&e.parentNode.removeChild(e);var i=this.dom.background;i.parentNode&&i.parentNode.removeChild(i);var o=this.dom.axis;o.parentNode&&o.parentNode.removeChild(o)},o.prototype.add=function(t){if(this.items[t.id]=t,t.setParent(this),void 0!==t.data.subgroup&&(void 0===this.subgroups[t.data.subgroup]&&(this.subgroups[t.data.subgroup]={height:0,visible:!1,index:this.subgroupIndex,items:[]},this.subgroupIndex++),this.subgroups[t.data.subgroup].items.push(t)),this.orderSubgroups(),-1==this.visibleItems.indexOf(t)){var e=this.itemSet.body.range;this._checkIfVisible(t,this.visibleItems,e)}},o.prototype.orderSubgroups=function(){if(void 0!==this.subgroupOrderer){var t=[];if("string"==typeof this.subgroupOrderer){for(var e in this.subgroups)t.push({subgroup:e,sortField:this.subgroups[e].items[0].data[this.subgroupOrderer]});t.sort(function(t,e){return t.sortField-e.sortField})}else if("function"==typeof this.subgroupOrderer){for(var e in this.subgroups)t.push(this.subgroups[e].items[0].data);t.sort(this.subgroupOrderer)}if(t.length>0)for(var i=0;it?-1:l>=t?0:1};if(e.length>0)for(s=0;sl}),1==this.checkRangedItems)for(this.checkRangedItems=!1,s=0;sl})}for(s=0;s=0&&(s=e[r],!n(s));r--)void 0===o[s.id]&&(o[s.id]=!0,i.push(s));for(r=t+1;rn;n++)t[n].top=null;for(n=0,s=t.length;s>n;n++){var r=t[n];if(r.stack&&null===r.top){r.top=i.axis;do{for(var a=null,h=0,d=t.length;d>h;h++){var l=t[h];if(null!==l.top&&l!==r&&l.stack&&e.collision(r,l,i.item)){a=l;break}}null!=a&&(r.top=a.top+a.height+i.item.vertical)}while(a)}}},e.nostack=function(t,e,i){var o,n,s;for(o=0,n=t.length;n>o;o++)if(void 0!==t[o].data.subgroup){s=e.axis;for(var r in i)i.hasOwnProperty(r)&&1==i[r].visible&&i[r].indexe.left&&t.top-o.vertical+ie.top}},function(t,e,i){function o(t,e,i){if(this.props={content:{width:0}},this.overflow=!1,t){if(void 0==t.start)throw new Error('Property "start" missing in item '+t.id);if(void 0==t.end)throw new Error('Property "end" missing in item '+t.id)}n.call(this,t,e,i)}var n=(i(20),i(33));o.prototype=new n(null,null,null),o.prototype.baseClassName="vis-item vis-range",o.prototype.isVisible=function(t){return this.data.startt.start},o.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("div"),t.frame=document.createElement("div"),t.frame.className="vis-item-overflow",t.box.appendChild(t.frame),t.content=document.createElement("div"),t.content.className="vis-item-content",t.frame.appendChild(t.content),t.box["timeline-item"]=this,this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.box.parentNode){var e=this.parent.dom.foreground;if(!e)throw new Error("Cannot redraw item: parent has no foreground container element");e.appendChild(t.box)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateTitle(this.dom.box),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var i=(this.options.editable.updateTime||this.options.editable.updateGroup||this.editable===!0)&&this.editable!==!1,o=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(i?" vis-editable":" vis-readonly");t.box.className=this.baseClassName+o,this.overflow="hidden"!==window.getComputedStyle(t.frame).overflow,this.dom.content.style.maxWidth="none",this.props.content.width=this.dom.content.offsetWidth,this.height=this.dom.box.offsetHeight,this.dom.content.style.maxWidth="",this.dirty=!1}this._repaintDeleteButton(t.box),this._repaintDragLeft(),this._repaintDragRight()},o.prototype.show=function(){this.displayed||this.redraw()},o.prototype.hide=function(){if(this.displayed){var t=this.dom.box;t.parentNode&&t.parentNode.removeChild(t),this.displayed=!1}},o.prototype.repositionX=function(t){var e,i,o=this.parent.width,n=this.conversion.toScreen(this.data.start),s=this.conversion.toScreen(this.data.end);void 0!==t&&t!==!0||(-o>n&&(n=-o),s>2*o&&(s=2*o));var r=Math.max(s-n,1);switch(this.overflow?(this.left=n,this.width=r+this.props.content.width,i=this.props.content.width):(this.left=n,this.width=r,i=Math.min(s-n,this.props.content.width)),this.dom.box.style.left=this.left+"px",this.dom.box.style.width=r+"px",this.options.align){case"left":this.dom.content.style.left="0";break;case"right":this.dom.content.style.left=Math.max(r-i,0)+"px";break;case"center":this.dom.content.style.left=Math.max((r-i)/2,0)+"px";break;default:e=this.overflow?s>0?Math.max(-n,0):-i:0>n?-n:0,this.dom.content.style.left=e+"px"}},o.prototype.repositionY=function(){var t=this.options.orientation.item,e=this.dom.box;"top"==t?e.style.top=this.top+"px":e.style.top=this.parent.height-this.top-this.height+"px"},o.prototype._repaintDragLeft=function(){if(this.selected&&this.options.editable.updateTime&&!this.dom.dragLeft){var t=document.createElement("div");t.className="vis-drag-left",t.dragLeftItem=this,this.dom.box.appendChild(t),this.dom.dragLeft=t}else!this.selected&&this.dom.dragLeft&&(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)},o.prototype._repaintDragRight=function(){if(this.selected&&this.options.editable.updateTime&&!this.dom.dragRight){var t=document.createElement("div");t.className="vis-drag-right",t.dragRightItem=this,this.dom.box.appendChild(t),this.dom.dragRight=t}else!this.selected&&this.dom.dragRight&&(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)},t.exports=o},function(t,e,i){function o(t,e,i){this.id=null,this.parent=null,this.data=t,this.dom=null,this.conversion=e||{},this.options=i||{},this.selected=!1,this.displayed=!1,this.dirty=!0,this.top=null,this.left=null,this.width=null,this.height=null,this.editable=null,this.data&&this.data.hasOwnProperty("editable")&&"boolean"==typeof this.data.editable&&(this.editable=t.editable)}var n=i(20),s=i(1);o.prototype.stack=!0,o.prototype.select=function(){this.selected=!0,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.unselect=function(){this.selected=!1,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.setData=function(t){var e=void 0!=t.group&&this.data.group!=t.group;e&&this.parent.itemSet._moveToGroup(this,t.group),t.hasOwnProperty("editable")&&"boolean"==typeof t.editable&&(this.editable=t.editable),this.data=t,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.setParent=function(t){this.displayed?(this.hide(),this.parent=t,this.parent&&this.show()):this.parent=t},o.prototype.isVisible=function(t){return!1},o.prototype.show=function(){return!1},o.prototype.hide=function(){return!1},o.prototype.redraw=function(){},o.prototype.repositionX=function(){},o.prototype.repositionY=function(){},o.prototype._repaintDeleteButton=function(t){var e=(this.options.editable.remove||this.data.editable===!0)&&this.data.editable!==!1;if(this.selected&&e&&!this.dom.deleteButton){var i=this,o=document.createElement("div");o.className="vis-delete",o.title="Delete this item",new n(o).on("tap",function(t){t.stopPropagation(),i.parent.removeFromDataSet(i)}),t.appendChild(o),this.dom.deleteButton=o}else!this.selected&&this.dom.deleteButton&&(this.dom.deleteButton.parentNode&&this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton),this.dom.deleteButton=null)},o.prototype._updateContents=function(t){var e;if(this.options.template){var i=this.parent.itemSet.itemsData.get(this.id);e=this.options.template(i)}else e=this.data.content;var o=this._contentToString(this.content)!==this._contentToString(e);if(o){if(e instanceof Element)t.innerHTML="",t.appendChild(e);else if(void 0!=e)t.innerHTML=e;else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '+this.id);this.content=e}},o.prototype._updateTitle=function(t){null!=this.data.title?t.title=this.data.title||"":t.removeAttribute("vis-title")},o.prototype._updateDataAttributes=function(t){if(this.options.dataAttributes&&this.options.dataAttributes.length>0){var e=[];if(Array.isArray(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=Object.keys(this.data)}for(var i=0;in;n++){var r=this.visibleItems[n];r.repositionY(e)}return o},o.prototype.show=function(){ -this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background)},t.exports=o},function(t,e,i){function o(t,e,i){if(this.props={dot:{width:0,height:0},line:{width:0,height:0}},t&&void 0==t.start)throw new Error('Property "start" missing in item '+t);n.call(this,t,e,i)}var n=i(33);i(1);o.prototype=new n(null,null,null),o.prototype.isVisible=function(t){var e=(t.end-t.start)/4;return this.data.start>t.start-e&&this.data.startt.start-e&&this.data.startt.start},o.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("div"),t.frame=document.createElement("div"),t.frame.className="vis-item-overflow",t.box.appendChild(t.frame),t.content=document.createElement("div"),t.content.className="vis-item-content",t.frame.appendChild(t.content),this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.box.parentNode){var e=this.parent.dom.background;if(!e)throw new Error("Cannot redraw item: parent has no background container element");e.appendChild(t.box)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateTitle(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);var i=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"");t.box.className=this.baseClassName+i,this.overflow="hidden"!==window.getComputedStyle(t.content).overflow,this.props.content.width=this.dom.content.offsetWidth,this.height=0,this.dirty=!1}},o.prototype.show=r.prototype.show,o.prototype.hide=r.prototype.hide,o.prototype.repositionX=r.prototype.repositionX,o.prototype.repositionY=function(t){var e="top"===this.options.orientation.item;this.dom.content.style.top=e?"":"0",this.dom.content.style.bottom=e?"0":"";var i;if(void 0!==this.data.subgroup){var o=this.data.subgroup,n=this.parent.subgroups,r=n[o].index;if(1==e){i=this.parent.subgroups[o].height+t.item.vertical,i+=0==r?t.axis-.5*t.item.vertical:0;var a=this.parent.top;for(var h in n)n.hasOwnProperty(h)&&1==n[h].visible&&n[h].indexr&&(a+=l)}i=this.parent.subgroups[o].height+t.item.vertical,this.dom.box.style.top=this.parent.height-d+a+"px",this.dom.box.style.bottom=""}}else this.parent instanceof s?(i=Math.max(this.parent.height,this.parent.itemSet.body.domProps.center.height,this.parent.itemSet.body.domProps.centerContainer.height),this.dom.box.style.top=e?"0":"",this.dom.box.style.bottom=e?"":"0"):(i=this.parent.height,this.dom.box.style.top=this.parent.top+"px",this.dom.box.style.bottom="");this.dom.box.style.height=i+"px"},t.exports=o},function(t,e,i){function o(t,e){this.dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},this.props={range:{start:0,end:0,minimumStep:0},lineTop:0},this.defaultOptions={orientation:{axis:"bottom"},showMinorLabels:!0,showMajorLabels:!0,maxMinorChars:7,format:r.FORMAT,moment:h,timeAxis:null},this.options=n.extend({},this.defaultOptions),this.body=t,this._create(),this.setOptions(e)}var n=i(1),s=i(25),r=i(29),a=i(26),h=i(2);o.prototype=new s,o.prototype.setOptions=function(t){t&&(n.selectiveExtend(["showMinorLabels","showMajorLabels","maxMinorChars","hiddenDates","timeAxis","moment"],this.options,t),n.selectiveDeepExtend(["format"],this.options,t),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.axis=t.orientation:"object"==typeof t.orientation&&"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis)),"locale"in t&&("function"==typeof h.locale?h.locale(t.locale):h.lang(t.locale)))},o.prototype._create=function(){this.dom.foreground=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.foreground.className="vis-time-axis vis-foreground",this.dom.background.className="vis-time-axis vis-background"},o.prototype.destroy=function(){this.dom.foreground.parentNode&&this.dom.foreground.parentNode.removeChild(this.dom.foreground),this.dom.background.parentNode&&this.dom.background.parentNode.removeChild(this.dom.background),this.body=null},o.prototype.redraw=function(){var t=this.props,e=this.dom.foreground,i=this.dom.background,o="top"==this.options.orientation.axis?this.body.dom.top:this.body.dom.bottom,n=e.parentNode!==o;this._calculateCharSize();var s=this.options.showMinorLabels&&"none"!==this.options.orientation.axis,r=this.options.showMajorLabels&&"none"!==this.options.orientation.axis;t.minorLabelHeight=s?t.minorCharHeight:0,t.majorLabelHeight=r?t.majorCharHeight:0,t.height=t.minorLabelHeight+t.majorLabelHeight,t.width=e.offsetWidth,t.minorLineHeight=this.body.domProps.root.height-t.majorLabelHeight-("top"==this.options.orientation.axis?this.body.domProps.bottom.height:this.body.domProps.top.height),t.minorLineWidth=1,t.majorLineHeight=t.minorLineHeight+t.majorLabelHeight,t.majorLineWidth=1;var a=e.nextSibling,h=i.nextSibling;return e.parentNode&&e.parentNode.removeChild(e),i.parentNode&&i.parentNode.removeChild(i),e.style.height=this.props.height+"px",this._repaintLabels(),a?o.insertBefore(e,a):o.appendChild(e),h?this.body.dom.backgroundVertical.insertBefore(i,h):this.body.dom.backgroundVertical.appendChild(i),this._isResized()||n},o.prototype._repaintLabels=function(){var t=this.options.orientation.axis,e=n.convert(this.body.range.start,"Number"),i=n.convert(this.body.range.end,"Number"),o=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf(),s=o-a.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this.body.range,o);s-=this.body.util.toTime(0).valueOf();var h=new r(new Date(e),new Date(i),s,this.body.hiddenDates);h.setMoment(this.options.moment),this.options.format&&h.setFormat(this.options.format),this.options.timeAxis&&h.setScale(this.options.timeAxis),this.step=h;var l=this.dom;l.redundant.lines=l.lines,l.redundant.majorTexts=l.majorTexts,l.redundant.minorTexts=l.minorTexts,l.lines=[],l.majorTexts=[],l.minorTexts=[];var u,c,p,f,v,m,g,y,b,_,w=0,x=void 0,k=0,O=1e3;for(h.start(),c=h.getCurrent(),f=this.body.util.toScreen(c);h.hasNext()&&O>k;){k++,v=h.isMajor(),_=h.getClassName(),b=h.getLabelMinor(),u=c,p=f,h.next(),c=h.getCurrent(),m=h.isMajor(),f=this.body.util.toScreen(c),g=w,w=f-p;var M=w>=.4*g;if(this.options.showMinorLabels&&M){var D=this._repaintMinorText(p,b,t,_);D.style.width=w+"px"}v&&this.options.showMajorLabels?(p>0&&(void 0==x&&(x=p),D=this._repaintMajorText(p,h.getLabelMajor(),t,_)),y=this._repaintMajorLine(p,w,t,_)):M?y=this._repaintMinorLine(p,w,t,_):y&&(y.style.width=parseInt(y.style.width)+w+"px")}if(k!==O||d||(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to "+O+" lines."),d=!0),this.options.showMajorLabels){var C=this.body.util.toTime(0),S=h.getLabelMajor(C),T=S.length*(this.props.majorCharWidth||10)+10;(void 0==x||x>T)&&this._repaintMajorText(0,S,t,_)}n.forEach(this.dom.redundant,function(t){for(;t.length;){var e=t.pop();e&&e.parentNode&&e.parentNode.removeChild(e)}})},o.prototype._repaintMinorText=function(t,e,i,o){var n=this.dom.redundant.minorTexts.shift();if(!n){var s=document.createTextNode("");n=document.createElement("div"),n.appendChild(s),this.dom.foreground.appendChild(n)}return this.dom.minorTexts.push(n),n.childNodes[0].nodeValue=e,n.style.top="top"==i?this.props.majorLabelHeight+"px":"0",n.style.left=t+"px",n.className="vis-text vis-minor "+o,n},o.prototype._repaintMajorText=function(t,e,i,o){var n=this.dom.redundant.majorTexts.shift();if(!n){var s=document.createTextNode(e);n=document.createElement("div"),n.appendChild(s),this.dom.foreground.appendChild(n)}return this.dom.majorTexts.push(n),n.childNodes[0].nodeValue=e,n.className="vis-text vis-major "+o,n.style.top="top"==i?"0":this.props.minorLabelHeight+"px",n.style.left=t+"px",n},o.prototype._repaintMinorLine=function(t,e,i,o){var n=this.dom.redundant.lines.shift();n||(n=document.createElement("div"),this.dom.background.appendChild(n)),this.dom.lines.push(n);var s=this.props;return"top"==i?n.style.top=s.majorLabelHeight+"px":n.style.top=this.body.domProps.top.height+"px",n.style.height=s.minorLineHeight+"px",n.style.left=t-s.minorLineWidth/2+"px",n.style.width=e+"px",n.className="vis-grid vis-vertical vis-minor "+o,n},o.prototype._repaintMajorLine=function(t,e,i,o){var n=this.dom.redundant.lines.shift();n||(n=document.createElement("div"),this.dom.background.appendChild(n)),this.dom.lines.push(n);var s=this.props;return"top"==i?n.style.top="0":n.style.top=this.body.domProps.top.height+"px",n.style.left=t-s.majorLineWidth/2+"px",n.style.height=s.majorLineHeight+"px",n.style.width=e+"px",n.className="vis-grid vis-vertical vis-major "+o,n},o.prototype._calculateCharSize=function(){this.dom.measureCharMinor||(this.dom.measureCharMinor=document.createElement("DIV"),this.dom.measureCharMinor.className="vis-text vis-minor vis-measure",this.dom.measureCharMinor.style.position="absolute",this.dom.measureCharMinor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMinor)),this.props.minorCharHeight=this.dom.measureCharMinor.clientHeight,this.props.minorCharWidth=this.dom.measureCharMinor.clientWidth,this.dom.measureCharMajor||(this.dom.measureCharMajor=document.createElement("DIV"),this.dom.measureCharMajor.className="vis-text vis-major vis-measure",this.dom.measureCharMajor.style.position="absolute",this.dom.measureCharMajor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMajor)),this.props.majorCharHeight=this.dom.measureCharMajor.clientHeight,this.props.majorCharWidth=this.dom.measureCharMajor.clientWidth};var d=!1;t.exports=o},function(t,e,i){function o(t){this.active=!1,this.dom={container:t},this.dom.overlay=document.createElement("div"),this.dom.overlay.className="vis-overlay",this.dom.container.appendChild(this.dom.overlay),this.hammer=a(this.dom.overlay),this.hammer.on("tap",this._onTapOverlay.bind(this));var e=this,i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];i.forEach(function(t){e.hammer.on(t,function(t){t.stopPropagation()})}),document&&document.body&&(this.onClick=function(i){n(i.target,t)||e.deactivate()},document.body.addEventListener("click",this.onClick)),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=s(),this.escListener=this.deactivate.bind(this)}function n(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}var s=i(40),r=i(12),a=i(20),h=i(1);r(o.prototype),o.current=null,o.prototype.destroy=function(){this.deactivate(),this.dom.overlay.parentNode.removeChild(this.dom.overlay),this.onClick&&document.body.removeEventListener("click",this.onClick),this.hammer.destroy(),this.hammer=null},o.prototype.activate=function(){o.current&&o.current.deactivate(),o.current=this,this.active=!0,this.dom.overlay.style.display="none",h.addClassName(this.dom.container,"vis-active"),this.emit("change"),this.emit("activate"),this.keycharm.bind("esc",this.escListener)},o.prototype.deactivate=function(){this.active=!1,this.dom.overlay.style.display="",h.removeClassName(this.dom.container,"vis-active"),this.keycharm.unbind("esc",this.escListener),this.emit("change"),this.emit("deactivate")},o.prototype._onTapOverlay=function(t){this.activate(),t.stopPropagation()},t.exports=o},function(t,e,i){var o,n,s;!function(i,r){n=[],o=r,s="function"==typeof o?o.apply(e,n):o,!(void 0!==s&&(t.exports=s))}(this,function(){function t(t){var e,i=t&&t.preventDefault||!1,o=t&&t.container||window,n={},s={keydown:{},keyup:{}},r={};for(e=97;122>=e;e++)r[String.fromCharCode(e)]={code:65+(e-97),shift:!1};for(e=65;90>=e;e++)r[String.fromCharCode(e)]={code:e,shift:!0};for(e=0;9>=e;e++)r[""+e]={code:48+e,shift:!1};for(e=1;12>=e;e++)r["F"+e]={code:111+e,shift:!1};for(e=0;9>=e;e++)r["num"+e]={code:96+e,shift:!1};r["num*"]={code:106,shift:!1},r["num+"]={code:107,shift:!1},r["num-"]={code:109,shift:!1},r["num/"]={code:111,shift:!1},r["num."]={code:110,shift:!1},r.left={code:37,shift:!1},r.up={code:38,shift:!1},r.right={code:39,shift:!1},r.down={code:40,shift:!1},r.space={code:32,shift:!1},r.enter={code:13,shift:!1},r.shift={code:16,shift:void 0},r.esc={code:27,shift:!1},r.backspace={code:8,shift:!1},r.tab={code:9,shift:!1},r.ctrl={code:17,shift:!1},r.alt={code:18,shift:!1},r["delete"]={code:46,shift:!1},r.pageup={code:33,shift:!1},r.pagedown={code:34,shift:!1},r["="]={code:187,shift:!1},r["-"]={code:189,shift:!1},r["]"]={code:221,shift:!1},r["["]={code:219,shift:!1};var a=function(t){d(t,"keydown")},h=function(t){d(t,"keyup")},d=function(t,e){if(void 0!==s[e][t.keyCode]){for(var o=s[e][t.keyCode],n=0;no&&(o=30),o>1e3&&(o=1e3),e.redraw(),e.body.emitter.emit("currentTimeTick"),e.currentTimeTimer=setTimeout(t,o)}var e=this;t()},o.prototype.stop=function(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)},o.prototype.setCurrentTime=function(t){var e=n.convert(t,"Date").valueOf(),i=(new Date).valueOf();this.offset=e-i,this.redraw()},o.prototype.getCurrentTime=function(){return new Date((new Date).valueOf()+this.offset)},t.exports=o},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),i++);this.options.showButton===!0&&!function(){var e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerHTML="generate options",e.onclick=function(){t._printOptions()},e.onmouseover=function(){e.className="vis-configuration vis-config-button hover"},e.onmouseout=function(){e.className="vis-configuration vis-config-button"},t.optionsContainer=document.createElement("div"),t.optionsContainer.className="vis-configuration vis-config-option-container",t.domElements.push(t.optionsContainer),t.domElements.push(e)}(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t1?o-1:0),s=1;o>s;s++)n[s-1]=e[s];return n.forEach(function(t){r.appendChild(t)}),i.domElements.push(r),{v:i.domElements.length}}();if("object"==typeof r)return r.v}return 0}},{key:"_makeHeader",value:function(t){var e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerHTML=t,this._makeItem([],e)}},{key:"_makeLabel",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=document.createElement("div");return o.className="vis-configuration vis-config-label vis-config-s"+e.length,i===!0?o.innerHTML=""+t+":":o.innerHTML=t+":",o}},{key:"_makeDropdown",value:function(t,e,i){var o=document.createElement("select");o.className="vis-configuration vis-config-select";var n=0;void 0!==e&&-1!==t.indexOf(e)&&(n=t.indexOf(e));for(var s=0;se&&n>e*u?(a.min=Math.ceil(e*u),l=a.min,d="range increased"):n>e/u&&(a.min=Math.ceil(e/u),l=a.min,d="range increased"),e*u>s&&1!==s&&(a.max=Math.ceil(e*u),l=a.max,d="range increased"),a.value=e}else a.value=o;var c=document.createElement("input");c.className="vis-configuration vis-config-rangeinput",c.value=a.value;var p=this;a.onchange=function(){c.value=this.value,p._update(Number(this.value),i)},a.oninput=function(){c.value=this.value};var f=this._makeLabel(i[i.length-1],i),v=this._makeItem(i,f,a,c);""!==d&&this.popupHistory[v]!==l&&(this.popupHistory[v]=l,this._setupPopup(d,v))}},{key:"_setupPopup",value:function(t,e){var i=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCountervar options = "+JSON.stringify(t,null,2)+""}},{key:"getOptions",value:function(){for(var t={},e=0;es;s++)for(r=0;rp?p+1:p;var f=l/this.r,v=a.RGBToHSV(this.color.r,this.color.g,this.color.b);v.h=p,v.s=f;var m=a.HSVToRGB(v.h,v.s,v.v);m.a=this.color.a,this.color=m,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+")"}}]),t}();e["default"]=h,t.exports=e["default"]},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;is.distance?console.log('%cUnknown option detected: "'+e+'" in '+t.printLocation(n.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(s.path,s.closestMatch,""),h):n.distance<=d?console.log('%cUnknown option detected: "'+e+'". Did you mean "'+n.closestMatch+'"?'+t.printLocation(n.path,e),h):console.log('%cUnknown option detected: "'+e+'". Did you mean one of these: '+t.print(Object.keys(i))+t.printLocation(o,e),h),r=!0}},{key:"findInOptions",value:function(e,i,o){var n=arguments.length<=3||void 0===arguments[3]?!1:arguments[3],r=1e9,a="",h=[],d=e.toLowerCase(),l=void 0;for(var u in i){var c=void 0;if(void 0!==i[u].__type__&&n===!0){var p=t.findInOptions(e,i[u],s.copyAndExtendArray(o,u));r>p.distance&&(a=p.closestMatch,h=p.path,r=p.distance,l=p.indexMatch)}else-1!==u.toLowerCase().indexOf(d)&&(l=u),c=t.levenshteinDistance(e,u),r>c&&(a=u,h=s.copyArray(o),r=c)}return{closestMatch:a,path:h,distance:r,indexMatch:l}}},{key:"printLocation",value:function(t,e){for(var i=arguments.length<=2||void 0===arguments[2]?"Problem value found at: \n":arguments[2],o="\n\n"+i+"options = {\n",n=0;ns;s++)o+=" ";o+=t[n]+": {\n"}for(var s=0;sr?r:t,e=null==e?r:r>e?r:e}return{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},o.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,o=e-s.getAbsoluteLeft(this.dom.centerContainer),n=i-s.getAbsoluteTop(this.dom.centerContainer),r=this._toTime(o),a=c.customTimeFromTarget(t),h=s.getTarget(t),d=null;s.hasParent(h,this.timeAxis.dom.foreground)?d="axis":this.timeAxis2&&s.hasParent(h,this.timeAxis2.dom.foreground)?d="axis":s.hasParent(h,this.linegraph.yAxisLeft.dom.frame)?d="data-axis":s.hasParent(h,this.linegraph.yAxisRight.dom.frame)?d="data-axis":s.hasParent(h,this.linegraph.legendLeft.dom.frame)?d="legend":s.hasParent(h,this.linegraph.legendRight.dom.frame)?d="legend":null!=a?d="custom-time":s.hasParent(h,this.currentTime.bar)?d="current-time":s.hasParent(h,this.dom.center)&&(d="background");var l=[],u=this.linegraph.yAxisLeft,p=this.linegraph.yAxisRight;return u.hidden||l.push(u.screenToValue(n)),p.hidden||l.push(p.screenToValue(n)),{event:t,what:d,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:n,time:r,value:l}},o.prototype._createConfigurator=function(){return new f(this,this.dom.container,y)},t.exports=o},function(t,e,i){function o(t,e){this.id=n.randomUUID(),this.body=t,this.defaultOptions={yAxisOrientation:"left",defaultGroup:"default",sort:!0,sampling:!0,stack:!1,graphHeight:"400px",shaded:{enabled:!1,orientation:"bottom"},style:"line",barChart:{width:50,sideBySide:!1,align:"center"},interpolation:{enabled:!0,parametrization:"centripetal",alpha:.5},drawPoints:{enabled:!0,size:6,style:"square"},dataAxis:{},legend:{},groups:{visibility:{}}},this.options=n.extend({},this.defaultOptions),this.dom={},this.props={},this.hammer=null,this.groups={},this.abortedGraphUpdate=!1,this.updateSVGheight=!1,this.updateSVGheightOnResize=!1,this.forceGraphUpdate=!0;var i=this;this.itemsData=null,this.groupsData=null,this.itemListeners={add:function(t,e,o){i._onAdd(e.items)},update:function(t,e,o){i._onUpdate(e.items)},remove:function(t,e,o){i._onRemove(e.items)}},this.groupListeners={add:function(t,e,o){ -i._onAddGroups(e.items)},update:function(t,e,o){i._onUpdateGroups(e.items)},remove:function(t,e,o){i._onRemoveGroups(e.items)}},this.items={},this.selection=[],this.lastStart=this.body.range.start,this.touchParams={},this.svgElements={},this.setOptions(e),this.groupsUsingDefaultStyles=[0],this.body.emitter.on("rangechanged",function(){i.lastStart=i.body.range.start,i.svg.style.left=n.option.asSize(-i.props.width),i.forceGraphUpdate=!0,i.redraw.call(i)}),this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups}}var n=i(1),s=i(7),r=i(8),a=i(10),h=i(25),d=i(50),l=i(52),u=i(56),c=i(53),p=i(55),f=i(54),v="__ungrouped__";o.prototype=new h,o.prototype._create=function(){var t=document.createElement("div");t.className="vis-line-graph",this.dom.frame=t,this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="relative",this.svg.style.height=(""+this.options.graphHeight).replace("px","")+"px",this.svg.style.display="block",t.appendChild(this.svg),this.options.dataAxis.orientation="left",this.yAxisLeft=new d(this.body,this.options.dataAxis,this.svg,this.options.groups),this.options.dataAxis.orientation="right",this.yAxisRight=new d(this.body,this.options.dataAxis,this.svg,this.options.groups),delete this.options.dataAxis.orientation,this.legendLeft=new u(this.body,this.options.legend,"left",this.options.groups),this.legendRight=new u(this.body,this.options.legend,"right",this.options.groups),this.show()},o.prototype.setOptions=function(t){if(t){var e=["sampling","defaultGroup","stack","height","graphHeight","yAxisOrientation","style","barChart","dataAxis","sort","groups"];void 0===t.graphHeight&&void 0!==t.height?(this.updateSVGheight=!0,this.updateSVGheightOnResize=!0):void 0!==this.body.domProps.centerContainer.height&&void 0!==t.graphHeight&&parseInt((t.graphHeight+"").replace("px",""))i?-1:1});for(var o=new Array(t.length),s=0;s0){var h={};for(this._getRelevantData(a,h,n,r),this._applySampling(a,h),e=0;e0)switch(t.options.style){case"line":l.hasOwnProperty(a[e])||(l[a[e]]=p.calcPath(h[a[e]],t)),p.draw(l[a[e]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||f.draw(h[a[e]],t,this.framework);break;case"bar":}}}return s.cleanupElements(this.svgElements),!1},o.prototype._stack=function(t,e){var i,o,n,s,r;i=0;for(var a=0;at[a].x){r=e[h],s=0==h?r:e[h-1],i=h;break}}void 0===r&&(s=e[e.length-1],r=e[e.length-1]),o=r.x-s.x,n=r.y-s.y,0==o?t[a].y=t[a].orginalY+r.y:t[a].y=t[a].orginalY+n/o*(t[a].x-s.x)+s.y}},o.prototype._getRelevantData=function(t,e,i,o){var s,r,a,h;if(t.length>0)for(r=0;rt?-1:1},u=Math.max(0,n.binarySearchValue(d,i,"x","before",l)),c=Math.min(d.length,n.binarySearchValue(d,o,"x","after",l)+1);0>=c&&(c=d.length);var p=new Array(c-u);for(a=u;c>a;a++)h=s.itemsData[a],p[a-u]=h;e[t[r]]=p}else e[t[r]]=s.itemsData}},o.prototype._applySampling=function(t,e){var i;if(t.length>0)for(var o=0;o0){var s=1,r=n.length,a=this.body.util.toGlobalScreen(n[n.length-1].x)-this.body.util.toGlobalScreen(n[0].x),h=r/a;s=Math.min(Math.ceil(.2*r),Math.max(1,Math.round(h)));for(var d=new Array(r),l=0;r>l;l+=s){var u=Math.round(l/s);d[u]=n[l]}e[t[o]]=d.splice(0,Math.round(r/s))}}},o.prototype._getYRanges=function(t,e,i){var o,n,s,r,a=[],h=[];if(t.length>0){for(s=0;s0&&(n=this.groups[t[s]],r.stack===!0&&"bar"===r.style?"left"===r.yAxisOrientation?a=a.concat(n.getItems()):h=h.concat(n.getItems()):i[t[s]]=n.getYRange(o,t[s]));c.getStackedYRange(a,i,t,"__barStackLeft","left"),c.getStackedYRange(h,i,t,"__barStackRight","right")}},o.prototype._updateYAxis=function(t,e){var i,o,n=!1,s=!1,r=!1,a=1e9,h=1e9,d=-1e9,l=-1e9;if(t.length>0){for(var u=0;ui?i:a,d=o>d?o:d):(r=!0,h=h>i?i:h,l=o>l?o:l));1==s&&this.yAxisLeft.setRange(a,d),1==r&&this.yAxisRight.setRange(h,l)}n=this._toggleAxisVisiblity(s,this.yAxisLeft)||n,n=this._toggleAxisVisiblity(r,this.yAxisRight)||n,1==r&&1==s?(this.yAxisLeft.drawIcons=!0,this.yAxisRight.drawIcons=!0):(this.yAxisLeft.drawIcons=!1,this.yAxisRight.drawIcons=!1),this.yAxisRight.master=!s,this.yAxisRight.masterAxis=this.yAxisLeft,0==this.yAxisRight.master?(1==r?this.yAxisLeft.lineOffset=this.yAxisRight.width:this.yAxisLeft.lineOffset=0,n=this.yAxisLeft.redraw()||n,n=this.yAxisRight.redraw()||n):n=this.yAxisRight.redraw()||n;for(var p=["__barStackLeft","__barStackRight","__lineStackLeft","__lineStackRight"],u=0;ut?-1:1});for(var a=0;a=0&&t._redrawLabel(o-2,e.val,i,"vis-y-axis vis-major",t.props.majorCharHeight),t.master===!0&&(n?t._redrawLine(o,i,"vis-grid vis-horizontal vis-major",t.options.majorLinesOffset,t.props.majorLineWidth):t._redrawLine(o,i,"vis-grid vis-horizontal vis-minor",t.options.minorLinesOffset,t.props.minorLineWidth))});var d=0;void 0!==this.options[i].title&&void 0!==this.options[i].title.text&&(d=this.props.titleCharHeight);var l=this.options.icons===!0?Math.max(this.options.iconWidth,d)+this.options.labelOffsetX+15:d+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-l&&this.options.visible===!0?(this.width=this.maxLabelSize+l,this.options.width=this.width+"px",s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),this.redraw(),e=!0):this.maxLabelSizethis.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+l),this.options.width=this.width+"px",s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),this.redraw(),e=!0):(s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),e=!1),e},o.prototype.convertValue=function(t){return this.scale.convertValue(t)},o.prototype.screenToValue=function(t){return this.scale.screenToValue(t)},o.prototype._redrawLabel=function(t,e,i,o,n){var r=s.getDOMElement("div",this.DOMelements.labels,this.dom.frame);r.className=o,r.innerHTML=e,"left"===i?(r.style.left="-"+this.options.labelOffsetX+"px",r.style.textAlign="right"):(r.style.right="-"+this.options.labelOffsetX+"px",r.style.textAlign="left"),r.style.top=t-.5*n+this.options.labelOffsetY+"px",e+="";var a=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize.5*(h.magnitudefactor*h.minorSteps[h.minorStepIdx])?e+h.magnitudefactor*h.minorSteps[h.minorStepIdx]:e};i&&(this._start-=2*this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._start=d(this._start)),o&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=d(this._end)),this.determineScale()}}i.prototype.setCharHeight=function(t){this.majorCharHeight=t},i.prototype.setHeight=function(t){this.containerHeight=t},i.prototype.determineScale=function(){var t=this._end-this._start;this.scale=this.containerHeight/t;var e=this.majorCharHeight/this.scale,i=Math.round(Math.log(t)/Math.LN10);this.minorStepIdx=-1,this.magnitudefactor=Math.pow(10,i);var o=0;0>i&&(o=i);for(var n=!1,s=o;Math.abs(s)<=Math.abs(i);s++){this.magnitudefactor=Math.pow(10,s);for(var r=0;r=e){n=!0,this.minorStepIdx=r;break}}if(n===!0)break}},i.prototype.is_major=function(t){return t%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])===0},i.prototype.getStep=function(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]},i.prototype.getFirstMajor=function(){var t=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(t-this._start%t)%t)},i.prototype.formatValue=function(t){var e=t.toPrecision(5);return"function"==typeof this.formattingFunction&&(e=this.formattingFunction(t)),"number"==typeof e?""+e:"string"==typeof e?e:t.toPrecision(5)},i.prototype.getLines=function(){for(var t=[],e=this.getStep(),i=(e-this._start%e)%e,o=this._start+i;this._end-o>1e-5;o+=e)o!=this._start&&t.push({major:this.is_major(o),y:this.convertValue(o),val:this.formatValue(o)});return t},i.prototype.followScale=function(t){var e=this.minorStepIdx,i=this._start,o=this._end,n=this,s=function(){n.magnitudefactor*=2},r=function(){n.magnitudefactor/=2};t.minorStepIdx<=1&&this.minorStepIdx<=1||t.minorStepIdx>1&&this.minorStepIdx>1||(t.minorStepIdxo+1e-5)r(),d=!1;else{if(!this.autoScaleStart&&this._start=0)){r(),d=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}this.autoScaleStart&&this.autoScaleEnd&&o-i>u?(s(),d=!1):d=!0}}},i.prototype.convertValue=function(t){return this.containerHeight-(t-this._start)*this.scale},i.prototype.screenToValue=function(t){return(this.containerHeight-t)/this.scale+this._start},t.exports=i},function(t,e,i){function o(t,e,i,o){this.id=e;var s=["sampling","style","sort","yAxisOrientation","barChart","drawPoints","shaded","interpolation","zIndex","excludeFromStacking","excludeFromLegend"];this.options=n.selectiveBridgeObject(s,i),this.usingDefaultStyle=void 0===t.className,this.groupsUsingDefaultStyles=o,this.zeroPosition=0,this.update(t),1==this.usingDefaultStyle&&(this.groupsUsingDefaultStyles[0]+=1),this.itemsData=[],this.visible=void 0===t.visible?!0:t.visible}var n=i(1),s=(i(7),i(53)),r=i(55),a=i(54);o.prototype.setItems=function(t){null!=t?(this.itemsData=t,1==this.options.sort&&n.insertSort(this.itemsData,function(t,e){return t.x>e.x?1:-1})):this.itemsData=[]},o.prototype.getItems=function(){return this.itemsData},o.prototype.setZeroPosition=function(t){this.zeroPosition=t},o.prototype.setOptions=function(t){if(void 0!==t){var e=["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"];n.selectiveDeepExtend(e,this.options,t),"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),n.mergeOptions(this.options,t,"interpolation"),n.mergeOptions(this.options,t,"drawPoints"),n.mergeOptions(this.options,t,"shaded"),t.interpolation&&"object"==typeof t.interpolation&&t.interpolation.parametrization&&("uniform"==t.interpolation.parametrization?this.options.interpolation.alpha=0:"chordal"==t.interpolation.parametrization?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization="centripetal",this.options.interpolation.alpha=.5))}},o.prototype.update=function(t){this.group=t,this.content=t.content||"graph",this.className=t.className||this.className||"vis-graph-group"+this.groupsUsingDefaultStyles[0]%10,this.visible=void 0===t.visible?!0:t.visible,this.style=t.style,this.setOptions(t.options)},o.prototype.getLegend=function(t,e,i,o,n){if(void 0==i||null==i){var h=document.createElementNS("http://www.w3.org/2000/svg","svg");i={svg:h,svgElements:{},options:this.options,groups:[this]}}switch(void 0!=o&&null!=o||(o=0),void 0!=n&&null!=n||(n=.5*e),this.options.style){case"line":r.drawIcon(this,o,n,t,e,i);break;case"points":case"point":a.drawIcon(this,o,n,t,e,i);break;case"bar":s.drawIcon(this,o,n,t,e,i)}return{icon:i.svg,label:this.content,orientation:this.options.yAxisOrientation}},o.prototype.getYRange=function(t){for(var e=t[0].y,i=t[0].y,o=0;ot[o].y?t[o].y:e,i=i0&&(i=Math.min(i,Math.abs(e[o-1].screen_x-e[o].screen_x))),0===i&&(void 0===t[e[o].screen_x]&&(t[e[o].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),t[e[o].screen_x].amount+=1)},o._getSafeDrawData=function(t,e,i){var o,n;return t0?(o=i>t?i:t,n=0,"left"===e.options.barChart.align?n-=.5*t:"right"===e.options.barChart.align&&(n+=.5*t)):(o=e.options.barChart.width,n=0,"left"===e.options.barChart.align?n-=.5*e.options.barChart.width:"right"===e.options.barChart.align&&(n+=.5*e.options.barChart.width)),{width:o,offset:n}},o.getStackedYRange=function(t,e,i,n,s){if(t.length>0){t.sort(function(t,e){return t.screen_x===e.screen_x?t.groupIde[s].screen_y?e[s].screen_y:o,n=nt[r].accumulatedNegative?t[r].accumulatedNegative:o,o=o>t[r].accumulatedPositive?t[r].accumulatedPositive:o,n=n0){var i=[];return i=1==e.options.interpolation.enabled?o._catmullRom(t,e):o._linear(t)}},o.drawIcon=function(t,e,i,o,s,r){var a,h,d=.5*s,l=n.getSVGElement("rect",r.svgElements,r.svg);if(l.setAttributeNS(null,"x",e),l.setAttributeNS(null,"y",i-d),l.setAttributeNS(null,"width",o),l.setAttributeNS(null,"height",2*d),l.setAttributeNS(null,"class","vis-outline"),a=n.getSVGElement("path",r.svgElements,r.svg),a.setAttributeNS(null,"class",t.className),void 0!==t.style&&a.setAttributeNS(null,"style",t.style),a.setAttributeNS(null,"d","M"+e+","+i+" L"+(e+o)+","+i),1==t.options.shaded.enabled&&(h=n.getSVGElement("path",r.svgElements,r.svg),"top"==t.options.shaded.orientation?h.setAttributeNS(null,"d","M"+e+", "+(i-d)+"L"+e+","+i+" L"+(e+o)+","+i+" L"+(e+o)+","+(i-d)):h.setAttributeNS(null,"d","M"+e+","+i+" L"+e+","+(i+d)+" L"+(e+o)+","+(i+d)+"L"+(e+o)+","+i),h.setAttributeNS(null,"class",t.className+" vis-icon-fill"),void 0!==t.options.shaded.style&&""!==t.options.shaded.style&&h.setAttributeNS(null,"style",t.options.shaded.style)),1==t.options.drawPoints.enabled){var u={style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size,className:t.className};n.drawPoint(e+.5*o,i,u,r.svgElements,r.svg)}},o.drawShading=function(t,e,i,o){if(1==e.options.shaded.enabled){var s=Number(o.svg.style.height.replace("px","")),r=n.getSVGElement("path",o.svgElements,o.svg),a="L";1==e.options.interpolation.enabled&&(a="C");var h,d=0;d="top"==e.options.shaded.orientation?0:"bottom"==e.options.shaded.orientation?s:Math.min(Math.max(0,e.zeroPosition),s),h="group"==e.options.shaded.orientation&&null!=i&&void 0!=i?"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" L"+i[i.length-1][0]+","+i[i.length-1][1]+" "+this.serializePath(i,a,!0)+i[0][0]+","+i[0][1]+" Z":"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" V"+d+" H"+t[0][0]+" Z",r.setAttributeNS(null,"class",e.className+" vis-fill"),void 0!==e.options.shaded.style&&r.setAttributeNS(null,"style",e.options.shaded.style),r.setAttributeNS(null,"d",h)}},o.draw=function(t,e,i){if(null!=t&&void 0!=t){var o=n.getSVGElement("path",i.svgElements,i.svg);o.setAttributeNS(null,"class",e.className),void 0!==e.style&&o.setAttributeNS(null,"style",e.style);var s="L";1==e.options.interpolation.enabled&&(s="C"),o.setAttributeNS(null,"d","M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,s,!1))}},o.serializePath=function(t,e,i){if(t.length<2)return"";var o=e;if(i)for(var n=t.length-2;n>0;n--)o+=t[n][0]+","+t[n][1]+" ";else for(var n=1;nl;l++)e=0==l?t[0]:t[l-1],i=t[l],o=t[l+1],n=d>l+2?t[l+2]:o,s={screen_x:(-e.screen_x+6*i.screen_x+o.screen_x)*h,screen_y:(-e.screen_y+6*i.screen_y+o.screen_y)*h},r={screen_x:(i.screen_x+6*o.screen_x-n.screen_x)*h,screen_y:(i.screen_y+6*o.screen_y-n.screen_y)*h},a.push([s.screen_x,s.screen_y]),a.push([r.screen_x,r.screen_y]),a.push([o.screen_x,o.screen_y]);return a},o._catmullRom=function(t,e){var i=e.options.interpolation.alpha;if(0==i||void 0===i)return this._catmullRomUniform(t);var o,n,s,r,a,h,d,l,u,c,p,f,v,m,g,y,b,_,w,x=[];x.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]);for(var k=t.length,O=0;k-1>O;O++)o=0==O?t[0]:t[O-1],n=t[O],s=t[O+1],r=k>O+2?t[O+2]:s,d=Math.sqrt(Math.pow(o.screen_x-n.screen_x,2)+Math.pow(o.screen_y-n.screen_y,2)),l=Math.sqrt(Math.pow(n.screen_x-s.screen_x,2)+Math.pow(n.screen_y-s.screen_y,2)),u=Math.sqrt(Math.pow(s.screen_x-r.screen_x,2)+Math.pow(s.screen_y-r.screen_y,2)),m=Math.pow(u,i),y=Math.pow(u,2*i),g=Math.pow(l,i),b=Math.pow(l,2*i),w=Math.pow(d,i),_=Math.pow(d,2*i),c=2*_+3*w*g+b,p=2*y+3*m*g+b,f=3*w*(w+g),f>0&&(f=1/f),v=3*m*(m+g),v>0&&(v=1/v),a={screen_x:(-b*o.screen_x+c*n.screen_x+_*s.screen_x)*f,screen_y:(-b*o.screen_y+c*n.screen_y+_*s.screen_y)*f},h={screen_x:(y*n.screen_x+p*s.screen_x-b*r.screen_x)*v,screen_y:(y*n.screen_y+p*s.screen_y-b*r.screen_y)*v},0==a.screen_x&&0==a.screen_y&&(a=n),0==h.screen_x&&0==h.screen_y&&(h=s),x.push([a.screen_x,a.screen_y]),x.push([h.screen_x,h.screen_y]),x.push([s.screen_x,s.screen_y]);return x},o._linear=function(t){for(var e=[],i=0;it?-1:1});for(var i=0;i")}this.dom.textArea.innerHTML=s,this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},o.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=Object.keys(this.groups);t.sort(function(t,e){return e>t?-1:1}),s.resetElements(this.svgElements);var e=window.getComputedStyle(this.dom.frame).paddingTop,i=Number(e.replace("px","")),o=i,n=this.options.iconSize,r=.75*this.options.iconSize,a=i+.5*r+3;this.svg.style.width=n+5+i+"px";for(var h=0;h0){var i=this.groupIndex%this.groupsArray.length;this.groupIndex++,e={},e.color=this.groups[this.groupsArray[i]],this.groups[t]=e}else{var i=this.defaultIndex%this.defaultGroups.length;this.defaultIndex++,e={},e.color=this.defaultGroups[i],this.groups[t]=e}return e}},{key:"add",value:function(t,e){return this.groups[t]=e,this.groupsArray.push(t),e}}]),t}();e["default"]=r,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;it.left&&this.shape.topt.top}},{key:"isBoundingBoxOverlappingWith",value:function(t){return this.shape.boundingBox.leftt.left&&this.shape.boundingBox.topt.top}}],[{key:"parseOptions",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],n=["color","font","fixed","shadow"];if(R.selectiveNotDeepExtend(n,t,e,i),R.mergeOptions(t,e,"shadow",i,o),void 0!==e.color&&null!==e.color){var s=R.parseColor(e.color);R.fillIfDefined(t.color,s)}else i===!0&&null===e.color&&(t.color=R.bridgeObject(o.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))),void 0!==e.font&&null!==e.font?a["default"].parseOptions(t.font,e):i===!0&&null===e.font&&(t.font=R.bridgeObject(o.font)),void 0!==e.scaling&&R.mergeOptions(t.scaling,e.scaling,"label",i,o.scaling)}}]),t}();e["default"]=F,t.exports=e["default"]},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function t(t,e){for(var i=0;i=this.nodeOptions.scaling.label.maxVisible&&(r=Number(this.nodeOptions.scaling.label.maxVisible)/this.body.view.scale);var h=this.size.yLine,d=this._getColor(a),l=n(d,2),u=l[0],c=l[1],p=this._setAlignment(t,i,h,s),f=n(p,2);i=f[0],h=f[1],t.font=(e&&this.nodeOptions.labelHighlightBold?"bold ":"")+r+"px "+this.fontOptions.face,t.fillStyle=u,t.textAlign="center",this.fontOptions.strokeWidth>0&&(t.lineWidth=this.fontOptions.strokeWidth,t.strokeStyle=c,t.lineJoin="round");for(var v=0;v0&&t.strokeText(this.lines[v],i,h),t.fillText(this.lines[v],i,h),h+=r}},{key:"_setAlignment",value:function(t,e,i,o){if("horizontal"!==this.fontOptions.align&&this.pointToSelf===!1){e=0,i=0;var n=2;"top"===this.fontOptions.align?(t.textBaseline="alphabetic",i-=2*n):"bottom"===this.fontOptions.align?(t.textBaseline="hanging",i+=2*n):t.textBaseline="middle"}else t.textBaseline=o;return[e,i]}},{key:"_getColor",value:function(t){var e=this.fontOptions.color||"#000000",i=this.fontOptions.strokeColor||"#ffffff";if(t<=this.nodeOptions.scaling.label.drawThreshold){var o=Math.max(0,Math.min(1,1-(this.nodeOptions.scaling.label.drawThreshold-t)));e=r.overrideOpacity(e,o),i=r.overrideOpacity(i,o)}return[e,i]}},{key:"getTextSize",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i={width:this._processLabel(t,e),height:this.fontOptions.size*this.lineCount,lineCount:this.lineCount};return i}},{key:"calculateLabelSize",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?0:arguments[2],o=arguments.length<=3||void 0===arguments[3]?0:arguments[3],n=arguments.length<=4||void 0===arguments[4]?"middle":arguments[4];this.labelDirty===!0&&(this.size.width=this._processLabel(t,e)),this.size.height=this.fontOptions.size*this.lineCount,this.size.left=i-.5*this.size.width,this.size.top=o-.5*this.size.height,this.size.yLine=o+.5*(1-this.lineCount)*this.fontOptions.size,"hanging"===n&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4),this.labelDirty=!1}},{key:"_processLabel",value:function(t,e){var i=0,o=[""],n=0;if(void 0!==this.nodeOptions.label){o=String(this.nodeOptions.label).split("\n"),n=o.length,t.font=(e&&this.nodeOptions.labelHighlightBold?"bold ":"")+this.fontOptions.size+"px "+this.fontOptions.face,i=t.measureText(o[0]).width;for(var s=1;n>s;s++){var r=t.measureText(o[s]).width;i=r>i?r:i}}return this.lines=o,this.lineCount=n,i}}],[{key:"parseOptions",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2];if("string"==typeof e.font){var o=e.font.split(" ");t.size=o[0].replace("px",""),t.face=o[1],t.color=o[2]}else"object"==typeof e.font&&r.fillIfDefined(t,e.font,i);t.size=Number(t.size)}}]),t}();e["default"]=a,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),this.updateBoundingBox(e,i,t,o),this.labelModule.draw(t,e,i,o)}},{key:"updateBoundingBox",value:function(t,e,i,o){this.resize(i,o),this.left=t-.5*this.width,this.top=e-.5*this.height;var n=this.options.shapeProperties.borderRadius;this.boundingBox.left=this.left-n,this.boundingBox.top=this.top-n,this.boundingBox.bottom=this.top+this.height+n,this.boundingBox.right=this.left+this.width+n}},{key:"distanceToBorder",value:function(t,e){this.resize(t);var i=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(e)),Math.abs(this.height/2/Math.sin(e)))+i}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;ithis.imageObj.height?(o=this.imageObj.width/this.imageObj.height,e=2*this.options.size*o||this.imageObj.width,i=2*this.options.size||this.imageObj.height):(o=this.imageObj.width&&this.imageObj.height?this.imageObj.height/this.imageObj.width:1,e=2*this.options.size,i=2*this.options.size*o):(e=this.imageObj.width,i=this.imageObj.height),this.width=e,this.height=i,this.radius=.5*this.width}}},{key:"_drawRawCircle",value:function(t,e,i,o,n,s){var r=this.options.borderWidth,a=this.options.borderWidthSelected||2*this.options.borderWidth,h=(o?a:r)/this.body.view.scale;t.lineWidth=Math.min(this.width,h),t.strokeStyle=o?this.options.color.highlight.border:n?this.options.color.hover.border:this.options.color.border,t.fillStyle=o?this.options.color.highlight.background:n?this.options.color.hover.background:this.options.color.background,t.circle(e,i,s),this.enableShadow(t),t.fill(),this.disableShadow(t),t.save(),h>0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore()}},{key:"_drawImageAtPosition",value:function(t){if(0!=this.imageObj.width){t.globalAlpha=1,this.enableShadow(t);var e=this.imageObj.width/this.width/this.body.view.scale;if(e>2&&this.options.shapeProperties.interpolation===!0){var i=this.imageObj.width,o=this.imageObj.height,n=document.createElement("canvas");n.width=i,n.height=i;var s=n.getContext("2d");e*=.5,i*=.5,o*=.5,s.drawImage(this.imageObj,0,0,i,o);for(var r=0,a=1;e>2&&4>a;)s.drawImage(n,r,0,i,o,r+i,0,i/2,o/2),r+=i,e*=.5,i*=.5,o*=.5,a+=1;t.drawImage(n,r,0,i,o,this.left,this.top,this.width,this.height)}else t.drawImage(this.imageObj,this.left,this.top,this.width,this.height);this.disableShadow(t)}}},{key:"_drawImageLabel",value:function(t,e,i,o){var n,s=0;if(void 0!==this.height){s=.5*this.height;var r=this.labelModule.getTextSize(t);r.lineCount>=1&&(s+=r.height/2)}n=i+s,this.options.label&&(this.labelOffset=s),this.labelModule.draw(t,e,n,o,"hanging")}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e); -}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),this.updateBoundingBox(e,i,t,o),this.labelModule.draw(t,e,i,o)}},{key:"updateBoundingBox",value:function(t,e,i,o){this.resize(i,o),this.left=t-.5*this.width,this.top=e-.5*this.height,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:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),void 0!==this.options.label){var l=n+.5*this.height+3;this.labelModule.draw(t,o,l,s,"hanging")}this.updateBoundingBox(o,n)}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+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+3))}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),this.updateBoundingBox(e,i,t,o),this.labelModule.draw(t,e,i,o)}},{key:"updateBoundingBox",value:function(t,e,i,o){this.resize(i,o),this.left=t-.5*this.width,this.top=e-.5*this.height,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:"distanceToBorder",value:function(t,e){this.resize(t);var i=.5*this.width,o=.5*this.height,n=Math.sin(e)*i,s=Math.cos(e)*o;return i*o/Math.sqrt(n*n+s*s)}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i0){var i=5;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+i)}}},{key:"_icon",value:function(t,e,i,o){var n=Number(this.options.icon.size);void 0!==this.options.icon.code?(t.font=(o?"bold ":"")+n+"px "+this.options.icon.face,t.fillStyle=this.options.icon.color||"black",t.textAlign="center",t.textBaseline="middle",this.enableShadow(t),t.fillText(this.options.icon.code,e,i),this.disableShadow(t)):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(t,e){return this._distanceToBorder(t,e)}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),t.closePath()}this._drawImageAtPosition(t),this._drawImageLabel(t,e,i,o||n),this.updateBoundingBox(e,i)}},{key:"updateBoundingBox",value:function(t,e){this.resize(),this.left=t-this.width/2,this.top=e-this.height/2,this.boundingBox.top=this.top,this.boundingBox.left=this.left,this.boundingBox.right=this.left+this.width,this.boundingBox.bottom=this.top+this.height,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(t,e){return this._distanceToBorder(t,e)}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;ii.shape.height?(r=i.x+.5*i.shape.width,a=i.y-h):(r=i.x+h,a=i.y-.5*i.shape.height),s=this._pointOnCircle(r,a,h,.125),this.labelModule.draw(t,s.x,s.y,n)}}}},{key:"isOverlappingWith",value:function(t){if(this.connected){var e=10,i=this.from.x,o=this.from.y,n=this.to.x,s=this.to.y,r=t.left,a=t.top,h=this.edgeType.getDistanceToEdge(i,o,n,s,r,a);return e>h}return!1}},{key:"_rotateForLabelAlignment",value:function(t){var e=this.from.y-this.to.y,i=this.from.x-this.to.x,o=Math.atan2(e,i);(-1>o&&0>i||o>0&&0>i)&&(o+=Math.PI),t.rotate(o)}},{key:"_pointOnCircle",value:function(t,e,i,o){var n=2*o*Math.PI;return{x:t+i*Math.cos(n),y:e-i*Math.sin(n)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}}],[{key:"parseOptions",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],n=["arrowStrikethrough","id","from","hidden","hoverWidth","label","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","to","title","value","width"];if(m.selectiveDeepExtend(n,t,e,i),m.mergeOptions(t,e,"smooth",i,o),m.mergeOptions(t,e,"shadow",i,o),void 0!==e.dashes&&null!==e.dashes?t.dashes=e.dashes:i===!0&&null===e.dashes&&(t.dashes=Object.create(o.dashes)),void 0!==e.scaling&&null!==e.scaling?(void 0!==e.scaling.min&&(t.scaling.min=e.scaling.min),void 0!==e.scaling.max&&(t.scaling.max=e.scaling.max),m.mergeOptions(t.scaling,e.scaling,"label",i,o.scaling)):i===!0&&null===e.scaling&&(t.scaling=Object.create(o.scaling)),void 0!==e.arrows&&null!==e.arrows)if("string"==typeof e.arrows){var s=e.arrows.toLowerCase();-1!=s.indexOf("to")&&(t.arrows.to.enabled=!0),-1!=s.indexOf("middle")&&(t.arrows.middle.enabled=!0),-1!=s.indexOf("from")&&(t.arrows.from.enabled=!0)}else{if("object"!=typeof e.arrows)throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+JSON.stringify(e.arrows));m.mergeOptions(t.arrows,e.arrows,"to",i,o.arrows),m.mergeOptions(t.arrows,e.arrows,"middle",i,o.arrows),m.mergeOptions(t.arrows,e.arrows,"from",i,o.arrows)}else i===!0&&null===e.arrows&&(t.arrows=Object.create(o.arrows));if(void 0!==e.color&&null!==e.color)if(t.color=m.deepExtend({},t.color,!0),m.isString(e.color))t.color.color=e.color,t.color.highlight=e.color,t.color.hover=e.color,t.color.inherit=!1;else{var r=!1;void 0!==e.color.color&&(t.color.color=e.color.color,r=!0),void 0!==e.color.highlight&&(t.color.highlight=e.color.highlight,r=!0),void 0!==e.color.hover&&(t.color.hover=e.color.hover,r=!0),void 0!==e.color.inherit&&(t.color.inherit=e.color.inherit),void 0!==e.color.opacity&&(t.color.opacity=Math.min(1,Math.max(0,e.color.opacity))),void 0===e.color.inherit&&r===!0&&(t.color.inherit=!1)}else i===!0&&null===e.color&&(t.color=m.bridgeObject(o.color));void 0!==e.font&&null!==e.font?a["default"].parseOptions(t.font,e):i===!0&&null===e.font&&(t.font=m.bridgeObject(o.font))}}]),t}();e["default"]=g,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function t(t,e){for(var i=0;iMath.abs(e)||this.options.smooth.forceDirection===!0||"horizontal"===this.options.smooth.forceDirection)&&"vertical"!==this.options.smooth.forceDirection?(o=this.from.y,s=this.to.y,i=this.from.x-r*t,n=this.to.x+r*t):(o=this.from.y-r*e,s=this.to.y+r*e,i=this.from.x,n=this.to.x),[{x:i,y:o},{x:n,y:s}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(t,e){return this._findBorderPositionBezier(t,e)}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,s){var a=arguments.length<=6||void 0===arguments[6]?this._getViaCoordinates():arguments[6],h=r(a,2),d=h[0],l=h[1];return this._getDistanceToBezierEdge(t,e,i,o,n,s,d,l)}},{key:"getPoint",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?this._getViaCoordinates():arguments[1],i=r(e,2),o=i[0],n=i[1],s=t,a=[];a[0]=Math.pow(1-s,3),a[1]=3*s*Math.pow(1-s,2),a[2]=3*Math.pow(s,2)*(1-s),a[3]=Math.pow(s,3);var h=a[0]*this.fromPoint.x+a[1]*o.x+a[2]*n.x+a[3]*this.toPoint.x,d=a[0]*this.fromPoint.y+a[1]*o.y+a[2]*n.y+a[3]*this.toPoint.y;return{x:h,y:d}}}]),e}(l["default"]);e["default"]=u,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;il;l++)u=.1*l,m[0]=Math.pow(1-u,3),m[1]=3*u*Math.pow(1-u,2),m[2]=3*Math.pow(u,2)*(1-u),m[3]=Math.pow(u,3),c=m[0]*t+m[1]*r.x+m[2]*a.x+m[3]*i,p=m[0]*e+m[1]*r.y+m[2]*a.y+m[3]*o,l>0&&(d=this._getDistanceToLine(f,v,c,p,n,s),h=h>d?d:h),f=c,v=p;return h}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i=l&&h>d;){var v=.5*(l+u);if(i=this.getPoint(v,a),o=Math.atan2(p.y-i.y,p.x-i.x),n=p.distanceToBorder(e,o),s=Math.sqrt(Math.pow(i.x-p.x,2)+Math.pow(i.y-p.y,2)),r=n-s,Math.abs(r)r?f===!1?l=v:u=v:f===!1?u=v:l=v,d++}return i.t=v,i}},{key:"_getDistanceToBezierEdge",value:function(t,e,i,o,n,s,r){var a=1e9,h=void 0,d=void 0,l=void 0,u=void 0,c=void 0,p=t,f=e;for(d=1;10>d;d++)l=.1*d,u=Math.pow(1-l,2)*t+2*l*(1-l)*r.x+Math.pow(l,2)*i,c=Math.pow(1-l,2)*e+2*l*(1-l)*r.y+Math.pow(l,2)*o,d>0&&(h=this._getDistanceToLine(p,f,u,c,n,s),a=a>h?h:a),p=u,f=c;return a}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function t(t,e){for(var i=0;io.shape.height?(e=o.x+.5*o.shape.width,i=o.y-n):(e=o.x+n,i=o.y-.5*o.shape.height),[e,i,n]}},{key:"_pointOnCircle",value:function(t,e,i,o){var n=2*o*Math.PI;return{x:t+i*Math.cos(n),y:e-i*Math.sin(n)}}},{key:"_findBorderPositionCircle",value:function(t,e,i){for(var o=i.x,n=i.y,s=i.low,r=i.high,a=i.direction,h=10,d=0,l=this.options.selfReferenceSize,u=void 0,c=void 0,p=void 0,f=void 0,v=void 0,m=.05,g=.5*(s+r);r>=s&&h>d&&(g=.5*(s+r),u=this._pointOnCircle(o,n,l,g),c=Math.atan2(t.y-u.y,t.x-u.x),p=t.distanceToBorder(e,c),f=Math.sqrt(Math.pow(u.x-t.x,2)+Math.pow(u.y-t.y,2)),v=p-f,!(Math.abs(v)0?a>0?s=g:r=g:a>0?r=g:s=g,d++;return u.t=g,u}},{key:"getLineWidth",value:function(t,e){return t===!0?Math.max(this.selectionWidth,.3/this.body.view.scale):e===!0?Math.max(this.hoverWidth,.3/this.body.view.scale):Math.max(this.options.width,.3/this.body.view.scale)}},{key:"getColor",value:function(t,e,i){var o=this.options.color;if(o.inherit!==!1){if("both"===o.inherit&&this.from.id!==this.to.id){var n=t.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),s=void 0,a=void 0;return s=this.from.options.color.highlight.border,a=this.to.options.color.highlight.border,this.from.selected===!1&&this.to.selected===!1?(s=r.overrideOpacity(this.from.options.color.border,this.options.color.opacity),a=r.overrideOpacity(this.to.options.color.border,this.options.color.opacity)):this.from.selected===!0&&this.to.selected===!1?a=this.to.options.color.border:this.from.selected===!1&&this.to.selected===!0&&(s=this.from.options.color.border),n.addColorStop(0,s),n.addColorStop(1,a),n}this.colorDirty===!0&&("to"===o.inherit?(this.color.highlight=this.to.options.color.highlight.border,this.color.hover=this.to.options.color.hover.border,this.color.color=r.overrideOpacity(this.to.options.color.border,o.opacity)):(this.color.highlight=this.from.options.color.highlight.border,this.color.hover=this.from.options.color.hover.border,this.color.color=r.overrideOpacity(this.from.options.color.border,o.opacity)))}else this.colorDirty===!0&&(this.color.highlight=o.highlight,this.color.hover=o.hover,this.color.color=r.overrideOpacity(o.color,o.opacity));return this.colorDirty=!1,e===!0?this.color.highlight:i===!0?this.color.hover:this.color.color}},{key:"_circle",value:function(t,e,i,o){this.enableShadow(t),t.beginPath(),t.arc(e,i,o,0,2*Math.PI,!1),t.stroke(),this.disableShadow(t)}},{key:"getDistanceToEdge",value:function(t,e,i,o,s,r,a){var h=0;if(this.from!=this.to)h=this._getDistanceToEdge(t,e,i,o,s,r,a);else{var d=this._getCircleData(),l=n(d,3),u=l[0],c=l[1],p=l[2],f=u-s,v=c-r;h=Math.abs(Math.sqrt(f*f+v*v)-p)}return this.labelModule.size.lefts&&this.labelModule.size.topr?0:h}},{key:"_getDistanceToLine",value:function(t,e,i,o,n,s){var r=i-t,a=o-e,h=r*r+a*a,d=((n-t)*r+(s-e)*a)/h;d>1?d=1:0>d&&(d=0);var l=t+d*r,u=e+d*a,c=l-n,p=u-s;return Math.sqrt(c*c+p*p)}},{key:"getArrowData",value:function(t,e,i,o,s){var r=void 0,a=void 0,h=void 0,d=void 0,l=void 0,u=void 0,c=this.getLineWidth(o,s);if("from"===e?(h=this.from,d=this.to,l=.1,u=this.options.arrows.from.scaleFactor):"to"===e?(h=this.to,d=this.from,l=-.1,u=this.options.arrows.to.scaleFactor):(h=this.to,d=this.from,u=this.options.arrows.middle.scaleFactor),h!=d)if("middle"!==e)if(this.options.smooth.enabled===!0){a=this.findBorderPosition(h,t,{via:i});var p=this.getPoint(Math.max(0,Math.min(1,a.t+l)),i);r=Math.atan2(a.y-p.y,a.x-p.x)}else r=Math.atan2(h.y-d.y,h.x-d.x),a=this.findBorderPosition(h,t);else r=Math.atan2(h.y-d.y,h.x-d.x),a=this.getPoint(.5,i);else{var f=this._getCircleData(t),v=n(f,3),m=v[0],g=v[1],y=v[2];"from"===e?(a=this.findBorderPosition(this.from,t,{x:m,y:g,low:.25,high:.6,direction:-1}),r=-2*a.t*Math.PI+1.5*Math.PI+.1*Math.PI):"to"===e?(a=this.findBorderPosition(this.from,t,{x:m,y:g,low:.6,high:1,direction:1}),r=-2*a.t*Math.PI+1.5*Math.PI-1.1*Math.PI):(a=this._pointOnCircle(m,g,y,.175),r=3.9269908169872414)}var b=15*u+3*c,_=a.x-.9*b*Math.cos(r),w=a.y-.9*b*Math.sin(r),x={x:_,y:w};return{point:a,core:x,angle:r,length:b}}},{key:"drawArrowHead",value:function(t,e,i,o){t.strokeStyle=this.getColor(t,e,i),t.fillStyle=t.strokeStyle,t.lineWidth=this.getLineWidth(e,i),t.arrow(o.point.x,o.point.y,o.angle,o.length),this.enableShadow(t),t.fill(),this.disableShadow(t)}},{key:"enableShadow",value:function(t){this.options.shadow.enabled===!0&&(t.shadowColor=this.options.shadow.color,t.shadowBlur=this.options.shadow.size,t.shadowOffsetX=this.options.shadow.x,t.shadowOffsetY=this.options.shadow.y)}},{key:"disableShadow",value:function(t){this.options.shadow.enabled===!0&&(t.shadowColor="rgba(0,0,0,0)",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0)}}]),t}();e["default"]=a,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*s,e=this.from.y-i*s):this.from.x>this.to.x&&(t=this.from.x-i*s,e=this.from.y-i*s):this.from.ythis.to.x&&(t=this.from.x-i*s,e=this.from.y+i*s)),"discrete"===o&&(t=i*s>n?this.from.x:t)):Math.abs(this.from.x-this.to.x)>Math.abs(this.from.y-this.to.y)&&(this.from.y>=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*n,e=this.from.y-i*n):this.from.x>this.to.x&&(t=this.from.x-i*n,e=this.from.y-i*n):this.from.ythis.to.x&&(t=this.from.x-i*n,e=this.from.y+i*n)),"discrete"===o&&(e=i*n>s?this.from.y:e));else if("straightCross"===o)Math.abs(this.from.x-this.to.x)<=Math.abs(this.from.y-this.to.y)?(t=this.from.x,e=this.from.yMath.abs(this.from.y-this.to.y)&&(t=this.from.x=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*s, -e=this.from.y-i*s,t=this.to.xthis.to.x&&(t=this.from.x-i*s,e=this.from.y-i*s,t=this.to.x>t?this.to.x:t):this.from.ythis.to.x&&(t=this.from.x-i*s,e=this.from.y+i*s,t=this.to.x>t?this.to.x:t)):Math.abs(this.from.x-this.to.x)>Math.abs(this.from.y-this.to.y)&&(this.from.y>=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*n,e=this.from.y-i*n,e=this.to.y>e?this.to.y:e):this.from.x>this.to.x&&(t=this.from.x-i*n,e=this.from.y-i*n,e=this.to.y>e?this.to.y:e):this.from.ythis.to.x&&(t=this.from.x-i*n,e=this.from.y+i*n,e=this.to.y1||this.startedStabilization===!0)&&setTimeout(function(){t.body.emitter.emit("stabilized",{iterations:e}),t.startedStabilization=!1,t.stabilizationIterations=0},0)}},{key:"physicsTick",value:function(){if(this.startedStabilization===!1&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0),this.stabilized===!1){if(this.adaptiveTimestep===!0&&this.adaptiveTimestepEnabled===!0){var t=1.2;this.adaptiveCounter%this.adaptiveInterval===0?(this.timestep=2*this.timestep,this.calculateForces(),this.moveNodes(),this.revert(),this.timestep=.5*this.timestep,this.calculateForces(),this.moveNodes(),this.calculateForces(),this.moveNodes(),this._evaluateStepQuality()===!0?this.timestep=t*this.timestep:this.timestep/ts))return!1;return!0}},{key:"moveNodes",value:function(){for(var t=this.physicsBody.physicsNodeIndices,e=this.options.maxVelocity?this.options.maxVelocity:1e9,i=0,o=0,n=5,s=0;se?s[t].x>0?e:-e:s[t].x,i.x+=s[t].x*o}else n[t].x=0,s[t].x=0;if(i.options.fixed.y===!1){var h=this.modelOptions.damping*s[t].y,d=(n[t].y-h)/i.options.mass;s[t].y+=d*o,s[t].y=Math.abs(s[t].y)>e?s[t].y>0?e:-e:s[t].y,i.y+=s[t].y*o}else n[t].y=0,s[t].y=0;var l=Math.sqrt(Math.pow(s[t].x,2)+Math.pow(s[t].y,2));return l}},{key:"calculateForces",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve()}},{key:"_freezeNodes",value:function(){var t=this.body.nodes;for(var e in t)t.hasOwnProperty(e)&&t[e].x&&t[e].y&&(this.freezeCache[e]={x:t[e].options.fixed.x,y:t[e].options.fixed.y},t[e].options.fixed.x=!0,t[e].options.fixed.y=!0)}},{key:"_restoreFrozenNodes",value:function(){var t=this.body.nodes;for(var e in t)t.hasOwnProperty(e)&&void 0!==this.freezeCache[e]&&(t[e].options.fixed.x=this.freezeCache[e].x,t[e].options.fixed.y=this.freezeCache[e].y);this.freezeCache={}}},{key:"stabilize",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?this.options.stabilization.iterations:arguments[0];return"number"!=typeof e&&(console.log("The stabilize method needs a numeric amount of iterations. Switching to default: ",this.options.stabilization.iterations),e=this.options.stabilization.iterations),0===this.physicsBody.physicsNodeIndices.length?void(this.ready=!0):(this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,void setTimeout(function(){return t._stabilizationBatch()},0))}},{key:"_stabilizationBatch",value:function(){this.startedStabilization===!1&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0);for(var t=0;this.stabilized===!1&&t0){var t=void 0,e=this.body.nodes,i=this.physicsBody.physicsNodeIndices,o=i.length,n=this._formBarnesHutTree(e,i);this.barnesHutTree=n;for(var s=0;o>s;s++)t=e[i[s]],t.options.mass>0&&(this._getForceContribution(n.root.children.NW,t),this._getForceContribution(n.root.children.NE,t),this._getForceContribution(n.root.children.SW,t),this._getForceContribution(n.root.children.SE,t))}}},{key:"_getForceContribution",value:function(t,e){if(t.childrenCount>0){var i=void 0,o=void 0,n=void 0;i=t.centerOfMass.x-e.x,o=t.centerOfMass.y-e.y,n=Math.sqrt(i*i+o*o),n*t.calcSize>this.thetaInversed?this._calculateForces(n,i,o,e,t):4===t.childrenCount?(this._getForceContribution(t.children.NW,e),this._getForceContribution(t.children.NE,e),this._getForceContribution(t.children.SW,e),this._getForceContribution(t.children.SE,e)):t.children.data.id!=e.id&&this._calculateForces(n,i,o,e,t)}}},{key:"_calculateForces",value:function(t,e,i,o,n){0===t&&(t=.1,e=t),this.overlapAvoidanceFactor<1&&(t=Math.max(.1+this.overlapAvoidanceFactor*o.shape.radius,t-o.shape.radius));var s=this.options.gravitationalConstant*n.mass*o.options.mass/Math.pow(t,3),r=e*s,a=i*s;this.physicsBody.forces[o.id].x+=r,this.physicsBody.forces[o.id].y+=a}},{key:"_formBarnesHutTree",value:function(t,e){for(var i=void 0,o=e.length,n=t[e[0]].x,s=t[e[0]].y,r=t[e[0]].x,a=t[e[0]].y,h=1;o>h;h++){var d=t[e[h]].x,l=t[e[h]].y;t[e[h]].options.mass>0&&(n>d&&(n=d),d>r&&(r=d),s>l&&(s=l),l>a&&(a=l))}var u=Math.abs(r-n)-Math.abs(a-s);u>0?(s-=.5*u,a+=.5*u):(n+=.5*u,r-=.5*u);var c=1e-5,p=Math.max(c,Math.abs(r-n)),f=.5*p,v=.5*(n+r),m=.5*(s+a),g={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:v-f,maxX:v+f,minY:m-f,maxY:m+f},size:p,calcSize:1/p,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(g.root);for(var h=0;o>h;h++)i=t[e[h]],i.options.mass>0&&this._placeInTree(g.root,i);return g}},{key:"_updateBranchMass",value:function(t,e){var i=t.mass+e.options.mass,o=1/i;t.centerOfMass.x=t.centerOfMass.x*t.mass+e.x*e.options.mass,t.centerOfMass.x*=o,t.centerOfMass.y=t.centerOfMass.y*t.mass+e.y*e.options.mass,t.centerOfMass.y*=o,t.mass=i;var n=Math.max(Math.max(e.height,e.radius),e.width);t.maxWidth=t.maxWidthe.x?t.children.NW.range.maxY>e.y?this._placeInRegion(t,e,"NW"):this._placeInRegion(t,e,"SW"):t.children.NW.range.maxY>e.y?this._placeInRegion(t,e,"NE"):this._placeInRegion(t,e,"SE")}},{key:"_placeInRegion",value:function(t,e,i){switch(t.children[i].childrenCount){case 0:t.children[i].children.data=e,t.children[i].childrenCount=1,this._updateBranchMass(t.children[i],e);break;case 1:t.children[i].children.data.x===e.x&&t.children[i].children.data.y===e.y?(e.x+=this.seededRandom(),e.y+=this.seededRandom()):(this._splitBranch(t.children[i]),this._placeInTree(t.children[i],e));break;case 4:this._placeInTree(t.children[i],e)}}},{key:"_splitBranch",value:function(t){var e=null;1===t.childrenCount&&(e=t.children.data,t.mass=0,t.centerOfMass.x=0,t.centerOfMass.y=0),t.childrenCount=4,t.children.data=null,this._insertRegion(t,"NW"),this._insertRegion(t,"NE"),this._insertRegion(t,"SW"),this._insertRegion(t,"SE"),null!=e&&this._placeInTree(t,e)}},{key:"_insertRegion",value:function(t,e){var i=void 0,o=void 0,n=void 0,s=void 0,r=.5*t.size;switch(e){case"NW":i=t.range.minX,o=t.range.minX+r,n=t.range.minY,s=t.range.minY+r;break;case"NE":i=t.range.minX+r,o=t.range.maxX,n=t.range.minY,s=t.range.minY+r;break;case"SW":i=t.range.minX,o=t.range.minX+r,n=t.range.minY+r,s=t.range.maxY;break;case"SE":i=t.range.minX+r,o=t.range.maxX,n=t.range.minY+r,s=t.range.maxY}t.children[e]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:o,minY:n,maxY:s},size:.5*t.size,calcSize:2*t.calcSize,children:{data:null},maxWidth:0,level:t.level+1,childrenCount:0}}},{key:"_debug",value:function(t,e){void 0!==this.barnesHutTree&&(t.lineWidth=1,this._drawBranch(this.barnesHutTree.root,t,e))}},{key:"_drawBranch",value:function(t,e,i){void 0===i&&(i="#FF0000"),4===t.childrenCount&&(this._drawBranch(t.children.NW,e),this._drawBranch(t.children.NE,e),this._drawBranch(t.children.SE,e),this._drawBranch(t.children.SW,e)),e.strokeStyle=i,e.beginPath(),e.moveTo(t.range.minX,t.range.minY),e.lineTo(t.range.maxX,t.range.minY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.minY),e.lineTo(t.range.maxX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.maxY),e.lineTo(t.range.minX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.minX,t.range.maxY),e.lineTo(t.range.minX,t.range.minY),e.stroke()}}]),t}();e["default"]=n,t.exports=e["default"]},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;ii&&(s=.5*u>i?1:c*i+p,s/=i,o=t*s,n=e*s,l[r.id].x-=o,l[r.id].y-=n,l[a.id].x+=o,l[a.id].y+=n)}}}]),t}();e["default"]=n,t.exports=e["default"]},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;ii?-Math.pow(f*i,2)+Math.pow(f*p,2):0,0===i?i=.01:s/=i,o=t*s,n=e*s,c[r.id].x-=o,c[r.id].y-=n,c[a.id].x+=o,c[a.id].y+=n}}}]),t}();e["default"]=n,t.exports=e["default"]},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;i0){var s=n.edges.length+1,r=this.options.centralGravity*s*n.options.mass;o[n.id].x=e*r,o[n.id].y=i*r}}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i=t&&i.push(n.id)}for(var o=0;o0&&Object.keys(p).length>0&&v===!0&&o.push({nodes:c,edges:p})}}}for(var u=0;uo?r.x:o,n=r.ys?r.y:s;return{x:.5*(i+o),y:.5*(n+s)}}},{key:"openCluster",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!0:arguments[2];if(void 0===t)throw new Error("No clusterNodeId supplied to openCluster.");if(void 0===this.body.nodes[t])throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(void 0===this.body.nodes[t].containedNodes)return void console.log("The node:"+t+" is not a cluster.");var o=this.body.nodes[t],n=o.containedNodes,s=o.containedEdges;if(void 0!==e&&void 0!==e.releaseFunction&&"function"==typeof e.releaseFunction){var r={},h={x:o.x,y:o.y};for(var d in n)if(n.hasOwnProperty(d)){var u=this.body.nodes[d];r[d]={x:u.x,y:u.y}}var c=e.releaseFunction(h,r);for(var d in n)if(n.hasOwnProperty(d)){var u=this.body.nodes[d];void 0!==c[d]&&(u.x=void 0===c[d].x?o.x:c[d].x,u.y=void 0===c[d].y?o.y:c[d].y)}}else for(var d in n)if(n.hasOwnProperty(d)){var u=this.body.nodes[d];u=n[d],u.options.fixed.x===!1&&(u.x=o.x),u.options.fixed.y===!1&&(u.y=o.y)}for(var d in n)if(n.hasOwnProperty(d)){var u=this.body.nodes[d];u.vx=o.vx,u.vy=o.vy,u.setOptions({hidden:!1,physics:!0}),delete this.clusteredNodes[d]}for(var p=[],f=0;fo;)e.push(this.body.nodes[t].id),t=this.clusteredNodes[t].clusterId,o++;return e.push(this.body.nodes[t].id),e.reverse(),e}},{key:"_getConnectedId",value:function(t,e){return t.toId!=e?t.toId:t.fromId!=e?t.fromId:t.fromId}},{key:"_getHubSize",value:function(){for(var t=0,e=0,i=0,o=0,n=0;no&&(o=s.edges.length),t+=s.edges.length,e+=Math.pow(s.edges.length,2),i+=1}t/=i,e/=i;var r=e-Math.pow(t,2),a=Math.sqrt(r),h=Math.floor(t+2*a);return h>o&&(h=o),h}}]),t}();e["default"]=u,t.exports=e["default"]},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i0)for(var a=0;ae.shape.boundingBox.left&&(s=e.shape.boundingBox.left),re.shape.boundingBox.top&&(o=e.shape.boundingBox.top),n0)for(var a=0;ae.x&&(s=e.x),re.y&&(o=e.y),n0,t.renderTimer=void 0}),this.body.emitter.on("destroy",function(){t.renderRequests=0,t.allowRedraw=!1,t.renderingActive=!1,t.requiresTimeout===!0?clearTimeout(t.renderTimer):cancelAnimationFrame(t.renderTimer),t.body.emitter.off()})}},{key:"setOptions",value:function(t){if(void 0!==t){var e=["hideEdgesOnDrag","hideNodesOnDrag"];s.selectiveDeepExtend(e,this.options,t)}}},{key:"_startRendering",value:function(){this.renderingActive===!0&&void 0===this.renderTimer&&(this.requiresTimeout===!0?this.renderTimer=window.setTimeout(this._renderStep.bind(this),this.simulationInterval):this.renderTimer=window.requestAnimationFrame(this._renderStep.bind(this)))}},{key:"_renderStep",value:function(){this.renderingActive===!0&&(this.renderTimer=void 0,this.requiresTimeout===!0&&this._startRendering(),this._redraw(),this.requiresTimeout===!1&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var t=this;this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,this.requiresTimeout===!0?window.setTimeout(function(){t._redraw(!1)},0):window.requestAnimationFrame(function(){t._redraw(!1)}))}},{key:"_redraw",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;var e=this.canvas.frame.canvas.getContext("2d");0!==this.canvas.frame.canvas.width&&0!==this.canvas.frame.canvas.height||this.canvas.setSize(),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 i=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(e.clearRect(0,0,i,o),0===this.canvas.frame.clientWidth)return;e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale),e.beginPath(),this.body.emitter.emit("beforeDrawing",e),e.closePath(),t===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&this._drawEdges(e),(this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1)&&this._drawNodes(e,t),e.beginPath(),this.body.emitter.emit("afterDrawing",e),e.closePath(),e.restore(),t===!0&&e.clearRect(0,0,i,o)}}},{key:"_resizeNodes",value:function(){var t=this.canvas.frame.canvas.getContext("2d");void 0===this.pixelRatio&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0),t.save(),t.translate(this.body.view.translation.x,this.body.view.translation.y),t.scale(this.body.view.scale,this.body.view.scale);var e=this.body.nodes,i=void 0;for(var o in e)e.hasOwnProperty(o)&&(i=e[o],i.resize(t),i.updateBoundingBox(t,i.selected));t.restore()}},{key:"_drawNodes",value:function(t){for(var e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i=this.body.nodes,o=this.body.nodeIndices,n=void 0,s=[],r=20,a=this.canvas.DOMtoCanvas({x:-r,y:-r}),h=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+r,y:this.canvas.frame.canvas.clientHeight+r}),d={top:a.y,left:a.x,bottom:h.y,right:h.x},l=0;l0){var t=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,e=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,i=this.cameraState.scale;1!=t&&1!=e?i=.5*this.cameraState.scale*(t+e):1!=t?i=this.cameraState.scale*t:1!=e&&(i=this.cameraState.scale*e),this.body.view.scale=i;var o=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),n={x:o.x-this.cameraState.position.x,y:o.y-this.cameraState.position.y};this.body.view.translation.x+=n.x*this.body.view.scale,this.body.view.translation.y+=n.y*this.body.view.scale}}},{key:"_prepareValue",value:function(t){if("number"==typeof t)return t+"px";if("string"==typeof t){if(-1!==t.indexOf("%")||-1!==t.indexOf("px"))return t;if(-1===t.indexOf("%"))return t+"px"}throw new Error("Could not use the value supplied for width or height:"+t)}},{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){var t=this.frame.canvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.frame.canvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerHTML="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(e)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var t=this;void 0!==this.hammer&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new s(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:30}),r.onTouch(this.hammer,function(e){t.body.eventListeners.onTouch(e)}),this.hammer.on("tap",function(e){t.body.eventListeners.onTap(e)}),this.hammer.on("doubletap",function(e){t.body.eventListeners.onDoubleTap(e)}),this.hammer.on("press",function(e){t.body.eventListeners.onHold(e)}),this.hammer.on("panstart",function(e){t.body.eventListeners.onDragStart(e)}),this.hammer.on("panmove",function(e){t.body.eventListeners.onDrag(e)}),this.hammer.on("panend",function(e){t.body.eventListeners.onDragEnd(e)}),this.hammer.on("pinch",function(e){t.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener("mousewheel",function(e){t.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("DOMMouseScroll",function(e){t.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("mousemove",function(e){t.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener("contextmenu",function(e){t.body.eventListeners.onContext(e)}),this.hammerFrame=new s(this.frame),r.onRelease(this.hammerFrame,function(e){t.body.eventListeners.onRelease(e)})}},{key:"setSize",value:function(){var t=arguments.length<=0||void 0===arguments[0]?this.options.width:arguments[0],e=arguments.length<=1||void 0===arguments[1]?this.options.height:arguments[1];t=this._prepareValue(t),e=this._prepareValue(e);var i=!1,o=this.frame.canvas.width,n=this.frame.canvas.height,s=this.frame.canvas.getContext("2d"),r=this.pixelRatio;return this.pixelRatio=(window.devicePixelRatio||1)/(s.webkitBackingStorePixelRatio||s.mozBackingStorePixelRatio||s.msBackingStorePixelRatio||s.oBackingStorePixelRatio||s.backingStorePixelRatio||1),t!=this.options.width||e!=this.options.height||this.frame.style.width!=t||this.frame.style.height!=e?(this._getCameraState(r),this.frame.style.width=t,this.frame.style.height=e,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=t,this.options.height=e,i=!0):(this.frame.canvas.width==Math.round(this.frame.canvas.clientWidth*this.pixelRatio)&&this.frame.canvas.height==Math.round(this.frame.canvas.clientHeight*this.pixelRatio)||this._getCameraState(r),this.frame.canvas.width!=Math.round(this.frame.canvas.clientWidth*this.pixelRatio)&&(this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),i=!0),this.frame.canvas.height!=Math.round(this.frame.canvas.clientHeight*this.pixelRatio)&&(this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),i=!0)),i===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(o/this.pixelRatio),oldHeight:Math.round(n/this.pixelRatio)}),this._setCameraState()),i}},{key:"_XconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(t){return{x:this._XconvertCanvasToDOM(t.x),y:this._YconvertCanvasToDOM(t.y)}}},{key:"DOMtoCanvas",value:function(t){return{x:this._XconvertDOMtoCanvas(t.x),y:this._YconvertDOMtoCanvas(t.y)}}}]),t}();e["default"]=h,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i.5*this.body.nodeIndices.length)return void this.fit(t,!1);i=a["default"].getRange(this.body.nodes,t.nodes);var h=this.body.nodeIndices.length;o=12.662/(h+7.4147)+.0964822;var d=Math.min(this.canvas.frame.canvas.clientWidth/600,this.canvas.frame.canvas.clientHeight/600);o*=d}else{this.body.emitter.emit("_resizeNodes"),i=a["default"].getRange(this.body.nodes,t.nodes);var l=1.1*Math.abs(i.maxX-i.minX),u=1.1*Math.abs(i.maxY-i.minY),c=this.canvas.frame.canvas.clientWidth/l,p=this.canvas.frame.canvas.clientHeight/u;o=p>=c?c:p}o>1?o=1:0===o&&(o=1);var f=a["default"].findCenter(i),v={position:f,scale:o,animation:t.animation};this.moveTo(v)}},{key:"focus",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(void 0!==this.body.nodes[t]){var i={x:this.body.nodes[t].x,y:this.body.nodes[t].y};e.position=i,e.lockedOnNode=t,this.moveTo(e)}else console.log("Node: "+t+" cannot be found.")}},{key:"moveTo",value:function(t){return void 0===t?void(t={}):(void 0===t.offset&&(t.offset={x:0,y:0}),void 0===t.offset.x&&(t.offset.x=0),void 0===t.offset.y&&(t.offset.y=0),void 0===t.scale&&(t.scale=this.body.view.scale),void 0===t.position&&(t.position=this.getViewPosition()),void 0===t.animation&&(t.animation={duration:0}),t.animation===!1&&(t.animation={duration:0}),t.animation===!0&&(t.animation={}),void 0===t.animation.duration&&(t.animation.duration=1e3),void 0===t.animation.easingFunction&&(t.animation.easingFunction="easeInOutQuad"),void this.animateView(t))}},{key:"animateView",value:function(t){if(void 0!==t){this.animationEasingFunction=t.animation.easingFunction,this.releaseNode(),t.locked===!0&&(this.lockedOnNodeId=t.lockedOnNode,this.lockedOnNodeOffset=t.offset),0!=this.easingTime&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=t.scale,this.body.view.scale=this.targetScale;var e=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:e.x-t.position.x,y:e.y-t.position.y};this.targetTranslation={x:this.sourceTranslation.x+i.x*this.targetScale+t.offset.x,y:this.sourceTranslation.y+i.y*this.targetScale+t.offset.y},0===t.animation.duration?void 0!=this.lockedOnNodeId?(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)):(this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw")):(this.animationSpeed=1/(60*t.animation.duration*.001)||1/60,this.animationEasingFunction=t.animation.easingFunction,this.viewFunction=this._transitionRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))}}},{key:"_lockedRedraw",value:function(){var t={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},e=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:e.x-t.x,y:e.y-t.y},o=this.body.view.translation,n={x:o.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:o.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=n}},{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 t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];this.easingTime+=this.animationSpeed,this.easingTime=t===!0?1:this.easingTime;var e=h.easingFunctions[this.animationEasingFunction](this.easingTime);this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*e,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*e,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*e},this.easingTime>=1&&(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,void 0!=this.lockedOnNodeId&&(this.viewFunction=this._lockedRedraw.bind(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})}}]),t}();e["default"]=d,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i50&&(this.drag.pointer=this.getPointer(t.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=(new Date).valueOf())}},{key:"onTap",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect&&(t.changedPointers[0].ctrlKey||t.changedPointers[0].metaKey);this.checkSelectionChanges(e,t,i),this.selectionHandler._generateClickEvent("click",t,e)}},{key:"onDoubleTap",value:function(t){var e=this.getPointer(t.center);this.selectionHandler._generateClickEvent("doubleClick",t,e)}},{key:"onHold",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(e,t,i),this.selectionHandler._generateClickEvent("click",t,e),this.selectionHandler._generateClickEvent("hold",t,e)}},{key:"onRelease",value:function(t){if((new Date).valueOf()-this.touchTime>10){var e=this.getPointer(t.center);this.selectionHandler._generateClickEvent("release",t,e),this.touchTime=(new Date).valueOf()}}},{key:"onContext",value:function(t){var e=this.getPointer({x:t.clientX,y:t.clientY});this.selectionHandler._generateClickEvent("oncontext",t,e)}},{key:"checkSelectionChanges",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=this.selectionHandler._getSelectedEdgeCount(),n=this.selectionHandler._getSelectedNodeCount(),s=this.selectionHandler.getSelection(),r=void 0;r=i===!0?this.selectionHandler.selectAdditionalOnPoint(t):this.selectionHandler.selectOnPoint(t);var a=this.selectionHandler._getSelectedEdgeCount(),h=this.selectionHandler._getSelectedNodeCount(),d=this.selectionHandler.getSelection(),l=this._determineIfDifferent(s,d),u=l.nodesChanged,c=l.edgesChanged,p=!1;h-n>0?(this.selectionHandler._generateClickEvent("selectNode",e,t),r=!0,p=!0):u===!0&&h>0?(this.selectionHandler._generateClickEvent("deselectNode",e,t,s),this.selectionHandler._generateClickEvent("selectNode",e,t),p=!0,r=!0):0>h-n&&(this.selectionHandler._generateClickEvent("deselectNode",e,t,s),r=!0),a-o>0&&p===!1?(this.selectionHandler._generateClickEvent("selectEdge",e,t),r=!0):a>0&&c===!0?(this.selectionHandler._generateClickEvent("deselectEdge",e,t,s),this.selectionHandler._generateClickEvent("selectEdge",e,t),r=!0):0>a-o&&(this.selectionHandler._generateClickEvent("deselectEdge",e,t,s),r=!0),r===!0&&this.selectionHandler._generateClickEvent("select",e,t)}},{key:"_determineIfDifferent",value:function(t,e){for(var i=!1,o=!1,n=0;nt&&(t=1e-5),t>10&&(t=10);var o=void 0;void 0!==this.drag&&this.drag.dragging===!0&&(o=this.canvas.DOMtoCanvas(this.drag.pointer));var n=this.body.view.translation,s=t/i,r=(1-s)*e.x+n.x*s,a=(1-s)*e.y+n.y*s;if(this.body.view.scale=t,this.body.view.translation={x:r,y:a},void 0!=o){var h=this.canvas.canvasToDOM(o);this.drag.pointer.x=h.x,this.drag.pointer.y=h.y}this.body.emitter.emit("_requestRedraw"),t>i?this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale}):this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale})}}},{key:"onMouseWheel",value:function(t){if(this.options.zoomView===!0){var e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),0!==e){var i=this.body.view.scale,o=e/10;0>e&&(o/=1-o),i*=1+o;var n=this.getPointer({x:t.clientX,y:t.clientY});this.zoom(i,n)}t.preventDefault()}}},{key:"onMouseMove",value:function(t){var e=this,i=this.getPointer({x:t.clientX,y:t.clientY}),o=!1;if(void 0!==this.popup&&(this.popup.hidden===!1&&this._checkHidePopup(i),this.popup.hidden===!1&&(o=!0,this.popup.setPosition(i.x+3,i.y-5),this.popup.show())),this.options.keyboard.bindToWindow===!1&&this.options.keyboard.enabled===!0&&this.canvas.frame.focus(),o===!1&&(void 0!==this.popupTimer&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=setTimeout(function(){return e._checkShowPopup(i)},this.options.tooltipDelay))),this.options.hover===!0){var n=this.selectionHandler.getNodeAt(i);void 0===n&&(n=this.selectionHandler.getEdgeAt(i)),this.selectionHandler.hoverObject(n)}}},{key:"_checkShowPopup",value:function(t){var e=this.canvas._XconvertDOMtoCanvas(t.x),i=this.canvas._YconvertDOMtoCanvas(t.y),o={left:e,top:i,right:e,bottom:i},n=void 0===this.popupObj?void 0:this.popupObj.id,s=!1,r="node";if(void 0===this.popupObj){for(var a=this.body.nodeIndices,h=this.body.nodes,l=void 0,u=[],c=0;c0&&(this.popupObj=h[u[u.length-1]],s=!0)}if(void 0===this.popupObj&&s===!1){for(var p=this.body.edgeIndices,f=this.body.edges,v=void 0,m=[],c=0;c0&&(this.popupObj=f[m[m.length-1]],r="edge")}void 0!==this.popupObj?this.popupObj.id!==n&&(void 0===this.popup&&(this.popup=new d["default"](this.canvas.frame)),this.popup.popupTargetType=r,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(t.x+3,t.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):void 0!==this.popup&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(t){var e=this.selectionHandler._pointerToPositionObject(t),i=!1;if("node"===this.popup.popupTargetType){if(void 0!==this.body.nodes[this.popup.popupTargetId]&&(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(e),i===!0)){var o=this.selectionHandler.getNodeAt(t);i=o.id===this.popup.popupTargetId}}else void 0===this.selectionHandler.getNodeAt(t)&&void 0!==this.body.edges[this.popup.popupTargetId]&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(e));i===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),t}();e["default"]=u,t.exports=e["default"]},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=(new Date).valueOf())}},{key:"_stopMovement",value:function(){for(var t in this.boundFunctions)this.boundFunctions.hasOwnProperty(t)&&(this.body.emitter.off("initRedraw",this.boundFunctions[t]),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(){this.body.view.scale*=1+this.options.keyboard.speed.zoom,this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale})}},{key:"_zoomOut",value:function(){this.body.view.scale/=1+this.options.keyboard.speed.zoom,this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale})}},{key:"configureKeyboardBindings",value:function(){var t=this;void 0!==this.keycharm&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=a({container:window,preventDefault:!0}):this.keycharm=a({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0&&(this.keycharm.bind("up",function(){t.bindToRedraw("_moveUp")},"keydown"),this.keycharm.bind("down",function(){t.bindToRedraw("_moveDown")},"keydown"),this.keycharm.bind("left",function(){t.bindToRedraw("_moveLeft")},"keydown"),this.keycharm.bind("right",function(){t.bindToRedraw("_moveRight")},"keydown"),this.keycharm.bind("=",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num+",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num-",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("-",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("[",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("]",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pageup",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pagedown",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("up",function(){t.unbindFromRedraw("_moveUp")},"keyup"),this.keycharm.bind("down",function(){t.unbindFromRedraw("_moveDown")},"keyup"),this.keycharm.bind("left",function(){t.unbindFromRedraw("_moveLeft")},"keyup"),this.keycharm.bind("right",function(){t.unbindFromRedraw("_moveRight")},"keyup"),this.keycharm.bind("=",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num+",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("[",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("]",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pageup",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pagedown",function(){t.unbindFromRedraw("_zoomOut")},"keyup")))}}]),t}();e["default"]=h,t.exports=e["default"]},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;io&&(s=o-e-this.padding),sn&&(r=n-i-this.padding),r0?e===!0?this.body.nodes[o[o.length-1]]:o[o.length-1]:void 0}},{key:"_getEdgesOverlappingWith",value:function(t,e){for(var i=this.body.edges,o=0;o0?e===!0?this.body.edges[o[o.length-1]]:o[o.length-1]:void 0}},{key:"_addToSelection",value:function(t){t instanceof s?this.selectionObj.nodes[t.id]=t:this.selectionObj.edges[t.id]=t}},{key:"_addToHover",value:function(t){t instanceof s?this.hoverObj.nodes[t.id]=t:this.hoverObj.edges[t.id]=t}},{key:"_removeFromSelection",value:function(t){t instanceof s?(delete this.selectionObj.nodes[t.id],this._unselectConnectedEdges(t)):delete this.selectionObj.edges[t.id]}},{key:"unselectAll",value:function(){for(var t in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(t)&&this.selectionObj.nodes[t].unselect();for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&this.selectionObj.edges[e].unselect();this.selectionObj={nodes:{},edges:{}}}},{key:"_getSelectedNodeCount",value:function(){var t=0;for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&(t+=1);return t}},{key:"_getSelectedNode",value:function(){for(var t in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(t))return this.selectionObj.nodes[t]}},{key:"_getSelectedEdge",value:function(){for(var t in this.selectionObj.edges)if(this.selectionObj.edges.hasOwnProperty(t))return this.selectionObj.edges[t]}},{key:"_getSelectedEdgeCount",value:function(){var t=0;for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&(t+=1);return t}},{key:"_getSelectedObjectCount",value:function(){var t=0;for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&(t+=1);for(var i in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(i)&&(t+=1);return t}},{key:"_selectionIsEmpty",value:function(){for(var t in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(t))return!1;for(var e in this.selectionObj.edges)if(this.selectionObj.edges.hasOwnProperty(e))return!1;return!0}},{key:"_clusterInSelection",value:function(){for(var t in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(t)&&this.selectionObj.nodes[t].clusterSize>1)return!0;return!1}},{key:"_selectConnectedEdges",value:function(t){for(var e=0;e0&&(this.options.hierarchical.levelSeparation*=-1):this.options.hierarchical.levelSeparation<0&&(this.options.hierarchical.levelSeparation*=-1),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(e);if(i===!0)return this.body.emitter.emit("refresh"),d.deepExtend(e,this.optionsBackup)}return e}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(t){if(this.options.hierarchical.enabled===!0){void 0===t.physics||t.physics===!0?(t.physics={enabled:void 0===this.optionsBackup.physics.enabled?!0:this.optionsBackup.physics.enabled,solver:"hierarchicalRepulsion"},this.optionsBackup.physics.enabled=void 0===this.optionsBackup.physics.enabled?!0:this.optionsBackup.physics.enabled,this.optionsBackup.physics.solver=this.optionsBackup.physics.solver||"barnesHut"):"object"==typeof t.physics?(this.optionsBackup.physics.enabled=void 0===t.physics.enabled?!0:t.physics.enabled,this.optionsBackup.physics.solver=t.physics.solver||"barnesHut",t.physics.solver="hierarchicalRepulsion"):t.physics!==!1&&(this.optionsBackup.physics.solver="barnesHut",t.physics={solver:"hierarchicalRepulsion"});var e="horizontal";"RL"!==this.options.hierarchical.direction&&"LR"!==this.options.hierarchical.direction||(e="vertical"),void 0===t.edges?(this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges={smooth:!1}):void 0===t.edges.smooth?(this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges.smooth=!1):"boolean"==typeof t.edges.smooth?(this.optionsBackup.edges={smooth:t.edges.smooth},t.edges.smooth={enabled:t.edges.smooth,type:e}):(void 0!==t.edges.smooth.type&&"dynamic"!==t.edges.smooth.type&&(e=t.edges.smooth.type),this.optionsBackup.edges={smooth:void 0===t.edges.smooth.enabled?!0:t.edges.smooth.enabled,type:void 0===t.edges.smooth.type?"dynamic":t.edges.smooth.type,roundness:void 0===t.edges.smooth.roundness?.5:t.edges.smooth.roundness,forceDirection:void 0===t.edges.smooth.forceDirection?!1:t.edges.smooth.forceDirection -},t.edges.smooth={enabled:void 0===t.edges.smooth.enabled?!0:t.edges.smooth.enabled,type:e,roundness:void 0===t.edges.smooth.roundness?.5:t.edges.smooth.roundness,forceDirection:void 0===t.edges.smooth.forceDirection?!1:t.edges.smooth.forceDirection}),this.body.emitter.emit("_forceDisableDynamicCurves",e)}return t}},{key:"seededRandom",value:function(){var t=1e4*Math.sin(this.randomSeed++);return t-Math.floor(t)}},{key:"positionInitially",value:function(t){if(this.options.hierarchical.enabled!==!0){this.randomSeed=this.initialRandomSeed;for(var e=0;es){for(var r=this.body.nodeIndices.length;this.body.nodeIndices.length>s;){n+=1;var a=this.body.nodeIndices.length;n%3===0?this.body.modules.clustering.clusterBridges():this.body.modules.clustering.clusterOutliers();var h=this.body.nodeIndices.length;if(a==h&&n%3!==0||n>o)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*r)})}this.body.modules.kamadaKawai.solve(this.body.nodeIndices,this.body.edgeIndices,!0),this._shiftToCenter();for(var d=70,e=0;e0){var t=void 0,e=void 0,i=!1,o=!0,n=!1;this.hierarchicalLevels={},this.lastNodeOnLevel={},this.hierarchicalChildrenReference={},this.hierarchicalParentReference={},this.hierarchicalTrees={},this.treeIndex=-1,this.distributionOrdering={},this.distributionIndex={},this.distributionOrderingPresence={};for(e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&(t=this.body.nodes[e],void 0===t.options.x&&void 0===t.options.y&&(o=!1),void 0!==t.options.level?(i=!0,this.hierarchicalLevels[e]=t.options.level):n=!0);if(n===!0&&i===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");n===!0&&("hubsize"===this.options.hierarchical.sortMethod?this._determineLevelsByHubsize():"directed"===this.options.hierarchical.sortMethod?this._determineLevelsDirected():"custom"===this.options.hierarchical.sortMethod&&this._determineLevelsCustomCallback());for(var s in this.body.nodes)this.body.nodes.hasOwnProperty(s)&&void 0===this.hierarchicalLevels[s]&&(this.hierarchicalLevels[s]=0);var r=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(r),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var t=this,e=!1,i={},o=function(){for(var e=a(),i=0;i0)for(var n=0;n=l&&(r=Math.min(u,r),a=Math.max(u,a))}return[r,a,o,n]},l=function w(e){var i=t.hierarchicalLevels[e];if(t.hierarchicalChildrenReference[e]){var o=t.hierarchicalChildrenReference[e];if(o.length>0)for(var n=0;n1)for(var a=0;at.options.hierarchical.nodeSpacing){var c={};c[i.id]=!0;var p={};p[o.id]=!0,h(i,c),h(o,p);var f=u(i,o),v=d(c,f),m=s(v,4),g=(m[0],m[1]),y=(m[2],m[3],d(p,f)),b=s(y,4),_=b[0],w=(b[1],b[2]),x=(b[3],Math.abs(g-_));if(x>t.options.hierarchical.nodeSpacing){var k=g-_+t.options.hierarchical.nodeSpacing;k<-w+t.options.hierarchical.nodeSpacing&&(k=-w+t.options.hierarchical.nodeSpacing),0>k&&(t._shiftBlock(o.id,k),e=!0,n===!0&&t._centerParent(o))}}},v=function(o,n){for(var r=n.id,a=n.edges,l=t.hierarchicalLevels[n.id],u=t.options.hierarchical.levelSeparation*t.options.hierarchical.levelSeparation,c={},p=[],f=0;fr;r++){var a=g(o,i),h=y(o,i),d=40,l=Math.max(-d,Math.min(d,Math.round(a/h)));if(o-=l,void 0!==s[o])break;s[o]=r}return o},_=function(o){var r=t._getPositionForHierarchy(n);if(void 0===i[n.id]){var a={};a[n.id]=!0,h(n,a),i[n.id]=a}var l=d(i[n.id]),u=s(l,4),c=(u[0],u[1],u[2]),p=u[3],f=o-r,v=0;f>0?v=Math.min(f,p-t.options.hierarchical.nodeSpacing):0>f&&(v=-Math.min(-f,c-t.options.hierarchical.nodeSpacing)),0!=v&&(t._shiftBlock(n.id,v),e=!0)},w=function(i){var o=t._getPositionForHierarchy(n),r=t._getSpaceAroundNode(n),a=s(r,2),h=a[0],d=a[1],l=i-o,u=o;l>0?u=Math.min(o+(d-t.options.hierarchical.nodeSpacing),i):0>l&&(u=Math.max(o-(h-t.options.hierarchical.nodeSpacing),i)),u!==o&&(t._setPositionForHierarchy(n,u,void 0,!0),e=!0)},x=b(o,p);_(x),x=b(o,a),w(x)},m=function(i){var o=Object.keys(t.distributionOrdering);o=o.reverse();for(var n=0;i>n;n++){e=!1;for(var s=0;sn&&(e=!1,p(f,o,!0),e===!0);n++);},y=function(){for(var e in t.body.nodes)t.body.nodes.hasOwnProperty(e)&&t._centerParent(t.body.nodes[e])},b=function(){var e=Object.keys(t.distributionOrdering);e=e.reverse();for(var i=0;i0)for(var d=0;dg&&Math.abs(g)0&&Math.abs(g)0&&(r=this._getPositionForHierarchy(i[n-1])+this.options.hierarchical.nodeSpacing),this._setPositionForHierarchy(s,r,e),this._validataPositionAndContinue(s,e,r),o++}}}}},{key:"_placeBranchNodes",value:function(t,e){if(void 0!==this.hierarchicalChildrenReference[t]){for(var i=[],o=0;oe&&void 0===this.positionedNodes[n.id]))return;var r=void 0;r=0===o?this._getPositionForHierarchy(this.body.nodes[t]):this._getPositionForHierarchy(i[o-1])+this.options.hierarchical.nodeSpacing,this._setPositionForHierarchy(n,r,s),this._validataPositionAndContinue(n,s,r)}for(var a=1e9,h=-1e9,o=0;o0&&(e=this._getHubSize(),0!==e);)for(var o in this.body.nodes)if(this.body.nodes.hasOwnProperty(o)){var n=this.body.nodes[o];n.edges.length===e&&this._crawlNetwork(i,o)}}},{key:"_determineLevelsCustomCallback",value:function(){var t=this,e=1e5,i=function(t,e,i){},o=function(o,n,s){var r=t.hierarchicalLevels[o.id];void 0===r&&(t.hierarchicalLevels[o.id]=e);var a=i(h["default"].cloneOptions(o,"node"),h["default"].cloneOptions(n,"node"),h["default"].cloneOptions(s,"edge"));t.hierarchicalLevels[n.id]=t.hierarchicalLevels[o.id]+a};this._crawlNetwork(o),this._setMinLevelToZero()}},{key:"_determineLevelsDirected",value:function(){var t=this,e=1e4,i=function(i,o,n){var s=t.hierarchicalLevels[i.id];void 0===s&&(t.hierarchicalLevels[i.id]=e),n.toId==o.id?t.hierarchicalLevels[o.id]=t.hierarchicalLevels[i.id]+1:t.hierarchicalLevels[o.id]=t.hierarchicalLevels[i.id]-1};this._crawlNetwork(i),this._setMinLevelToZero()}},{key:"_setMinLevelToZero",value:function(){var t=1e9;for(var e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&void 0!==this.hierarchicalLevels[e]&&(t=Math.min(this.hierarchicalLevels[e],t));for(var e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&void 0!==this.hierarchicalLevels[e]&&(this.hierarchicalLevels[e]-=t)}},{key:"_generateMap",value:function(){var t=this,e=function(e,i){if(t.hierarchicalLevels[i.id]>t.hierarchicalLevels[e.id]){var o=e.id,n=i.id;void 0===t.hierarchicalChildrenReference[o]&&(t.hierarchicalChildrenReference[o]=[]),t.hierarchicalChildrenReference[o].push(n),void 0===t.hierarchicalParentReference[n]&&(t.hierarchicalParentReference[n]=[]),t.hierarchicalParentReference[n].push(o)}};this._crawlNetwork(e)}},{key:"_crawlNetwork",value:function(t,e){var i=this;void 0===t&&(t=function(){});var o={},n=0,s=function h(e,n){if(void 0===o[e.id]){void 0===i.hierarchicalTrees[e.id]&&(i.hierarchicalTrees[e.id]=n,i.treeIndex=Math.max(n,i.treeIndex)),o[e.id]=!0;for(var s=void 0,r=0;r1&&("UD"===this.options.hierarchical.direction||"DU"===this.options.hierarchical.direction?t.sort(function(t,e){return t.x-e.x}):t.sort(function(t,e){return t.y-e.y}))}}]),t}();e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i0&&this.options.deleteNode!==!1?(n===!0&&this._createSeperator(4),this._createDeleteButton(o)):0===t&&this.options.deleteEdge!==!1&&(n===!0&&this._createSeperator(4),this._createDeleteButton(o))),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this)),this._temporaryBindEvent("select",this.showManipulatorToolbar.bind(this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.addDescription||this.options.locales.en.addDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindEvent("click",this._performAddNode.bind(this))}},{key:"editNode",value:function(){var t=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var e=this.selectionHandler._getSelectedNode();if(void 0!==e){if(this.inMode="editNode","function"!=typeof this.options.editNode)throw new Error("No function has been configured to handle the editing of nodes.");if(e.isCluster!==!0){var i=s.deepExtend({},e.options,!1);if(i.x=e.x,i.y=e.y,2!==this.options.editNode.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editNode(i,function(e){null!==e&&void 0!==e&&"editNode"===t.inMode&&t.body.data.nodes.getDataSet().update(e),t.showManipulatorToolbar()})}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError)}else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.edgeDescription||this.options.locales.en.edgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindUI("onTouch",this._handleConnect.bind(this)),this._temporaryBindUI("onDragEnd",this._finishConnect.bind(this)),this._temporaryBindUI("onDrag",this._dragControlNode.bind(this)),this._temporaryBindUI("onRelease",this._finishConnect.bind(this)),this._temporaryBindUI("onDragStart",function(){}),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){var t=this;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",this.guiEnabled===!0){var e=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],void 0!==this.edgeBeingEditedId?!function(){var e=t.body.edges[t.edgeBeingEditedId],i=t._getNewTargetNode(e.from.x,e.from.y),o=t._getNewTargetNode(e.to.x,e.to.y);t.temporaryIds.nodes.push(i.id),t.temporaryIds.nodes.push(o.id),t.body.nodes[i.id]=i,t.body.nodeIndices.push(i.id),t.body.nodes[o.id]=o,t.body.nodeIndices.push(o.id),t._temporaryBindUI("onTouch",t._controlNodeTouch.bind(t)),t._temporaryBindUI("onTap",function(){}),t._temporaryBindUI("onHold",function(){}),t._temporaryBindUI("onDragStart",t._controlNodeDragStart.bind(t)),t._temporaryBindUI("onDrag",t._controlNodeDrag.bind(t)),t._temporaryBindUI("onDragEnd",t._controlNodeDragEnd.bind(t)),t._temporaryBindUI("onMouseMove",function(){}),t._temporaryBindEvent("beforeDrawing",function(t){var n=e.edgeType.findBorderPositions(t);i.selected===!1&&(i.x=n.from.x,i.y=n.from.y),o.selected===!1&&(o.x=n.to.x,o.y=n.to.y)}),t.body.emitter.emit("_redraw")}():this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var t=this;this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";var e=this.selectionHandler.getSelectedNodes(),i=this.selectionHandler.getSelectedEdges(),o=void 0;if(e.length>0){for(var n=0;n0&&"function"==typeof this.options.deleteEdge&&(o=this.options.deleteEdge);if("function"==typeof o){var s={nodes:e,edges:i};if(2!==o.length)throw new Error("The function for delete does not support two arguments (data, callback)");o(s,function(e){null!==e&&void 0!==e&&"delete"===t.inMode?(t.body.data.edges.getDataSet().remove(e.edges),t.body.data.nodes.getDataSet().remove(e.nodes),t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar()):(t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().remove(i),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){void 0===this.manipulationDiv&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?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",this.editMode===!0?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(t,e){var i=s.deepExtend({},this.options.controlNodeStyle);i.id="targetNode"+s.randomUUID(),i.hidden=!1,i.physics=!1,i.x=t,i.y=e;var o=this.body.functions.createNode(i);return o.shape.boundingBox={left:t,right:t,top:e,bottom:e},o}},{key:"_createEditButton",value:function(){this._clean(),this.manipulationDOM={},s.recursiveDOMDelete(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,this.toggleEditMode.bind(this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(s.recursiveDOMDelete(this.editModeDiv),s.recursiveDOMDelete(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 t=0;t=0;r--)if(n[r]!==this.selectedControlNode.id){s=this.body.nodes[n[r]];break}if(void 0!==s&&void 0!==this.selectedControlNode)if(s.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(s.id,o.to.id):this._performEditEdge(o.from.id,s.id)}else o.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(t){if((new Date).valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(t.center),this.lastTouch.translation=s.extend({},this.body.view.translation);var e=this.lastTouch,i=this.selectionHandler.getNodeAt(e);if(void 0!==i)if(i.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var o=this._getNewTargetNode(i.x,i.y);this.body.nodes[o.id]=o,this.body.nodeIndices.push(o.id);var n=this.body.functions.createEdge({id:"connectionEdge"+s.randomUUID(),from:i.id,to:o.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[n.id]=n,this.body.edgeIndices.push(n.id),this.temporaryIds.nodes.push(o.id),this.temporaryIds.edges.push(n.id)}this.touchTime=(new Date).valueOf()}}},{key:"_dragControlNode",value:function(t){var e=this.body.functions.getPointer(t.center);if(void 0!==this.temporaryIds.nodes[0]){var i=this.body.nodes[this.temporaryIds.nodes[0]];i.x=this.canvas._XconvertDOMtoCanvas(e.x),i.y=this.canvas._YconvertDOMtoCanvas(e.y),this.body.emitter.emit("_redraw")}else{var o=e.x-this.lastTouch.x,n=e.y-this.lastTouch.y;this.body.view.translation={x:this.lastTouch.translation.x+o,y:this.lastTouch.translation.y+n}}}},{key:"_finishConnect",value:function(t){var e=this.body.functions.getPointer(t.center),i=this.selectionHandler._pointerToPositionObject(e),o=void 0;void 0!==this.temporaryIds.edges[0]&&(o=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var n=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,r=n.length-1;r>=0;r--)if(-1===this.temporaryIds.nodes.indexOf(n[r])){s=this.body.nodes[n[r]];break}this._cleanupTemporaryNodesAndEdges(),void 0!==s&&(s.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):void 0!==this.body.nodes[o]&&void 0!==this.body.nodes[s.id]&&this._performAddEdge(o,s.id)),this.body.emitter.emit("_redraw")}},{key:"_performAddNode",value:function(t){var e=this,i={id:s.randomUUID(),x:t.pointer.canvas.x,y:t.pointer.canvas.y,label:"new"};if("function"==typeof this.options.addNode){if(2!==this.options.addNode.length)throw new Error("The function for add does not support two arguments (data,callback)");this.options.addNode(i,function(t){null!==t&&void 0!==t&&"addNode"===e.inMode&&(e.body.data.nodes.getDataSet().add(t),e.showManipulatorToolbar())})}else this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(t,e){var i=this,o={from:t,to:e};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(o,function(t){null!==t&&void 0!==t&&"addEdge"===i.inMode&&(i.body.data.edges.getDataSet().add(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().add(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(t,e){var i=this,o={id:this.edgeBeingEditedId,from:t,to:e};if("function"==typeof this.options.editEdge){if(2!==this.options.editEdge.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editEdge(o,function(t){null===t||void 0===t||"editEdge"!==i.inMode?(i.body.edges[o.id].updateEdgeType(),i.body.emitter.emit("_redraw")):(i.body.data.edges.getDataSet().update(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().update(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),t}();e["default"]=h,t.exports=e["default"]},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var i="string",o="boolean",n="number",s="array",r="object",a="dom",h="any",d={configure:{enabled:{"boolean":o},filter:{"boolean":o,string:i,array:s,"function":"function"},container:{dom:a},showButton:{"boolean":o},__type__:{object:r,"boolean":o,string:i,array:s,"function":"function"}},edges:{arrows:{to:{enabled:{"boolean":o},scaleFactor:{number:n},__type__:{object:r,"boolean":o}},middle:{enabled:{"boolean":o},scaleFactor:{number:n},__type__:{object:r,"boolean":o}},from:{enabled:{"boolean":o},scaleFactor:{number:n},__type__:{object:r,"boolean":o}},__type__:{string:["from","to","middle"],object:r}},arrowStrikethrough:{"boolean":o},color:{color:{string:i},highlight:{string:i},hover:{string:i},inherit:{string:["from","to","both"],"boolean":o},opacity:{number:n},__type__:{object:r,string:i}},dashes:{"boolean":o,array:s},font:{color:{string:i},size:{number:n},face:{string:i},background:{string:i},strokeWidth:{number:n},strokeColor:{string:i},align:{string:["horizontal","top","middle","bottom"]},__type__:{object:r,string:i}},hidden:{"boolean":o},hoverWidth:{"function":"function",number:n},label:{string:i,undefined:"undefined"},labelHighlightBold:{"boolean":o},length:{number:n,undefined:"undefined"},physics:{"boolean":o},scaling:{min:{number:n},max:{number:n},label:{enabled:{"boolean":o},min:{number:n},max:{number:n},maxVisible:{number:n},drawThreshold:{number:n},__type__:{object:r,"boolean":o}},customScalingFunction:{"function":"function"},__type__:{object:r}},selectionWidth:{"function":"function",number:n},selfReferenceSize:{number:n},shadow:{enabled:{"boolean":o},color:{string:i},size:{number:n},x:{number:n},y:{number:n},__type__:{object:r,"boolean":o}},smooth:{enabled:{"boolean":o},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:n},forceDirection:{string:["horizontal","vertical","none"],"boolean":o},__type__:{object:r,"boolean":o}},title:{string:i,undefined:"undefined"},width:{number:n},value:{number:n,undefined:"undefined"},__type__:{object:r}},groups:{useDefaultGroups:{"boolean":o},__any__:"get from nodes, will be overwritten below",__type__:{object:r}},interaction:{dragNodes:{"boolean":o},dragView:{"boolean":o},hideEdgesOnDrag:{"boolean":o},hideNodesOnDrag:{"boolean":o},hover:{"boolean":o},keyboard:{enabled:{"boolean":o},speed:{x:{number:n},y:{number:n},zoom:{number:n},__type__:{object:r}},bindToWindow:{"boolean":o},__type__:{object:r,"boolean":o}},multiselect:{"boolean":o},navigationButtons:{"boolean":o},selectable:{"boolean":o},selectConnectedEdges:{"boolean":o},hoverConnectedEdges:{"boolean":o},tooltipDelay:{number:n},zoomView:{"boolean":o},__type__:{object:r}},layout:{randomSeed:{undefined:"undefined",number:n},improvedLayout:{"boolean":o},hierarchical:{enabled:{"boolean":o},levelSeparation:{number:n},nodeSpacing:{number:n},treeSpacing:{number:n},blockShifting:{"boolean":o},edgeMinimization:{"boolean":o},parentCentralization:{"boolean":o},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},__type__:{object:r,"boolean":o}},__type__:{object:r}},manipulation:{enabled:{"boolean":o},initiallyActive:{"boolean":o},addNode:{"boolean":o,"function":"function"},addEdge:{"boolean":o,"function":"function"},editNode:{"function":"function"},editEdge:{"boolean":o,"function":"function"},deleteNode:{"boolean":o,"function":"function"},deleteEdge:{"boolean":o,"function":"function"},controlNodeStyle:"get from nodes, will be overwritten below",__type__:{object:r,"boolean":o}},nodes:{borderWidth:{number:n},borderWidthSelected:{number:n,undefined:"undefined"},brokenImage:{string:i,undefined:"undefined"},color:{border:{string:i},background:{string:i},highlight:{border:{string:i},background:{string:i},__type__:{object:r,string:i}},hover:{border:{string:i},background:{string:i},__type__:{object:r,string:i}},__type__:{object:r,string:i}},fixed:{x:{"boolean":o},y:{"boolean":o},__type__:{object:r,"boolean":o}},font:{color:{string:i},size:{number:n},face:{string:i},background:{string:i},strokeWidth:{number:n},strokeColor:{string:i},__type__:{object:r,string:i}},group:{string:i,number:n,undefined:"undefined"},hidden:{"boolean":o},icon:{face:{string:i},code:{string:i},size:{number:n},color:{string:i},__type__:{object:r}},id:{string:i,number:n},image:{string:i,undefined:"undefined"},label:{string:i,undefined:"undefined"},labelHighlightBold:{"boolean":o},level:{number:n,undefined:"undefined"},mass:{number:n},physics:{"boolean":o},scaling:{min:{number:n},max:{number:n},label:{enabled:{"boolean":o},min:{number:n},max:{number:n},maxVisible:{number:n},drawThreshold:{number:n},__type__:{object:r,"boolean":o}},customScalingFunction:{"function":"function"},__type__:{object:r}},shadow:{enabled:{"boolean":o},color:{string:i},size:{number:n},x:{number:n},y:{number:n},__type__:{object:r,"boolean":o}},shape:{string:["ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon"]},shapeProperties:{borderDashes:{"boolean":o,array:s},borderRadius:{number:n},interpolation:{"boolean":o},useImageSize:{"boolean":o},useBorderWithImage:{"boolean":o},__type__:{object:r}},size:{number:n},title:{string:i,undefined:"undefined"},value:{number:n,undefined:"undefined"},x:{number:n},y:{number:n},__type__:{object:r}},physics:{enabled:{"boolean":o},barnesHut:{gravitationalConstant:{number:n},centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},damping:{number:n},avoidOverlap:{number:n},__type__:{object:r}},forceAtlas2Based:{gravitationalConstant:{number:n},centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},damping:{number:n},avoidOverlap:{number:n},__type__:{object:r}},repulsion:{centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},nodeDistance:{number:n},damping:{number:n},__type__:{object:r}},hierarchicalRepulsion:{centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},nodeDistance:{number:n},damping:{number:n},__type__:{object:r}},maxVelocity:{number:n},minVelocity:{number:n},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{"boolean":o},iterations:{number:n},updateInterval:{number:n},onlyDynamicEdges:{"boolean":o},fit:{"boolean":o},__type__:{object:r,"boolean":o}},timestep:{number:n},adaptiveTimestep:{"boolean":o},__type__:{object:r,"boolean":o}},autoResize:{"boolean":o},clickToUse:{"boolean":o},locale:{string:i},locales:{__any__:{any:h},__type__:{object:r}},height:{string:i},width:{string:i},__type__:{object:r}};d.groups.__any__=d.nodes,d.manipulation.controlNodeStyle=d.nodes;var l={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"]}},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"],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]},middle:{enabled:!1,scaleFactor:[1,0,3,.05]},from:{enabled:!1,scaleFactor:[1,0,3,.05]}},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],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"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!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},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{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:{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]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01]},global:{locale:["en","nl"]}};e.allOptions=d,e.configureOptions=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function t(t,e){for(var i=0;in&&h>a;){a+=1;var m=this._getHighestEnergyNode(i),g=s(m,4);for(u=g[0],l=g[1],c=g[2],p=g[3],f=l,v=0;f>r&&d>v;){v+=1,this._moveNode(u,c,p);var y=this._getEnergy(u),b=s(y,3);f=b[0],c=b[1],p=b[2]}}}},{key:"_getHighestEnergyNode",value:function(t){for(var e=this.body.nodeIndices,i=this.body.nodes,o=0,n=e[0],r=0,a=0,h=0;ho&&(o=c,n=d,r=p,a=f)}}return[n,o,r,a]}},{key:"_getEnergy",value:function(t){for(var e=this.body.nodeIndices,i=this.body.nodes,o=i[t].x,n=i[t].y,s=0,r=0,a=0;ad;d++)for(var s=0;h-1>s;s++)for(var r=s+1;h>r;r++)o[e[s]][e[r]]=Math.min(o[e[s]][e[r]],o[e[s]][e[d]]+o[e[d]][e[r]]),o[e[r]][e[s]]=o[e[s]][e[r]];return o}}]),t}();e["default"]=n,t.exports=e["default"]},function(t,e){"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.circle=function(t,e,i){this.beginPath(),this.arc(t,e,i,0,2*Math.PI,!1),this.closePath()},CanvasRenderingContext2D.prototype.square=function(t,e,i){this.beginPath(),this.rect(t-i,e-i,2*i,2*i),this.closePath()},CanvasRenderingContext2D.prototype.triangle=function(t,e,i){this.beginPath(),i*=1.15,e+=.275*i;var o=2*i,n=o/2,s=Math.sqrt(3)/6*o,r=Math.sqrt(o*o-n*n);this.moveTo(t,e-(r-s)),this.lineTo(t+n,e+s),this.lineTo(t-n,e+s),this.lineTo(t,e-(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.triangleDown=function(t,e,i){this.beginPath(),i*=1.15,e-=.275*i;var o=2*i,n=o/2,s=Math.sqrt(3)/6*o,r=Math.sqrt(o*o-n*n);this.moveTo(t,e+(r-s)),this.lineTo(t+n,e-s),this.lineTo(t-n,e-s),this.lineTo(t,e+(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.star=function(t,e,i){this.beginPath(),i*=.82,e+=.1*i;for(var o=0;10>o;o++){var n=o%2===0?1.3*i:.5*i;this.lineTo(t+n*Math.sin(2*o*Math.PI/10),e-n*Math.cos(2*o*Math.PI/10))}this.closePath()},CanvasRenderingContext2D.prototype.diamond=function(t,e,i){this.beginPath(),this.lineTo(t,e+i),this.lineTo(t+i,e),this.lineTo(t,e-i),this.lineTo(t-i,e),this.closePath()},CanvasRenderingContext2D.prototype.roundRect=function(t,e,i,o,n){var s=Math.PI/180;0>i-2*n&&(n=i/2),0>o-2*n&&(n=o/2),this.beginPath(),this.moveTo(t+n,e),this.lineTo(t+i-n,e),this.arc(t+i-n,e+n,n,270*s,360*s,!1),this.lineTo(t+i,e+o-n),this.arc(t+i-n,e+o-n,n,0,90*s,!1),this.lineTo(t+n,e+o),this.arc(t+n,e+o-n,n,90*s,180*s,!1),this.lineTo(t,e+n),this.arc(t+n,e+n,n,180*s,270*s,!1),this.closePath()},CanvasRenderingContext2D.prototype.ellipse=function(t,e,i,o){var n=.5522848,s=i/2*n,r=o/2*n,a=t+i,h=e+o,d=t+i/2,l=e+o/2;this.beginPath(),this.moveTo(t,l),this.bezierCurveTo(t,l-r,d-s,e,d,e),this.bezierCurveTo(d+s,e,a,l-r,a,l),this.bezierCurveTo(a,l+r,d+s,h,d,h),this.bezierCurveTo(d-s,h,t,l+r,t,l),this.closePath()},CanvasRenderingContext2D.prototype.database=function(t,e,i,o){var n=1/3,s=i,r=o*n,a=.5522848,h=s/2*a,d=r/2*a,l=t+s,u=e+r,c=t+s/2,p=e+r/2,f=e+(o-r/2),v=e+o;this.beginPath(),this.moveTo(l,p),this.bezierCurveTo(l,p+d,c+h,u,c,u),this.bezierCurveTo(c-h,u,t,p+d,t,p),this.bezierCurveTo(t,p-d,c-h,e,c,e),this.bezierCurveTo(c+h,e,l,p-d,l,p),this.lineTo(l,f),this.bezierCurveTo(l,f+d,c+h,v,c,v),this.bezierCurveTo(c-h,v,t,f+d,t,f),this.lineTo(t,p)},CanvasRenderingContext2D.prototype.arrow=function(t,e,i,o){var n=t-o*Math.cos(i),s=e-o*Math.sin(i),r=t-.9*o*Math.cos(i),a=e-.9*o*Math.sin(i),h=n+o/3*Math.cos(i+.5*Math.PI),d=s+o/3*Math.sin(i+.5*Math.PI),l=n+o/3*Math.cos(i-.5*Math.PI),u=s+o/3*Math.sin(i-.5*Math.PI);this.beginPath(),this.moveTo(t,e),this.lineTo(h,d),this.lineTo(r,a),this.lineTo(l,u),this.closePath()},CanvasRenderingContext2D.prototype.dashedLine=function(t,e,i,o,n){this.beginPath(),this.moveTo(t,e);for(var s=n.length,r=i-t,a=o-e,h=a/r,d=Math.sqrt(r*r+a*a),l=0,u=!0,c=0,p=n[0];d>=.1;)p=n[l++%s],p>d&&(p=d),c=Math.sqrt(p*p/(1+h*h)),c=0>r?-c:c,t+=c,e+=h*c,u===!0?this.lineTo(t,e):this.moveTo(t,e),d-=p,u=!u})},function(t,e){function i(t){return P=t,p()}function o(){I=0,N=P.charAt(0)}function n(){I++,N=P.charAt(I)}function s(){return P.charAt(I+1)}function r(t){return A.test(t)}function a(t,e){if(t||(t={}),e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function h(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 d(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;o>i;i++)if(e.id===r.nodes[i].id){n=r.nodes[i];break}for(n||(n={id:e.id},t.node&&(n.attr=a(n.attr,t.node))),i=s.length-1;i>=0;i--){var h=s[i];h.nodes||(h.nodes=[]),-1===h.nodes.indexOf(n)&&h.nodes.push(n)}e.attr&&(n.attr=a(n.attr,e.attr))}function l(t,e){if(t.edges||(t.edges=[]),t.edges.push(e),t.edge){var i=a({},t.edge);e.attr=a(i,e.attr)}}function u(t,e,i,o,n){var s={from:e,to:i,type:o};return t.edge&&(s.attr=a({},t.edge)),s.attr=a(s.attr||{},n),s}function c(){for(L=T.NULL,z="";" "===N||" "===N||"\n"===N||"\r"===N;)n();do{var t=!1;if("#"===N){for(var e=I-1;" "===P.charAt(e)||" "===P.charAt(e);)e--;if("\n"===P.charAt(e)||""===P.charAt(e)){for(;""!=N&&"\n"!=N;)n();t=!0}}if("/"===N&&"/"===s()){for(;""!=N&&"\n"!=N;)n();t=!0}if("/"===N&&"*"===s()){for(;""!=N;){if("*"===N&&"/"===s()){n(),n();break}n()}t=!0}for(;" "===N||" "===N||"\n"===N||"\r"===N;)n()}while(t);if(""===N)return void(L=T.DELIMITER);var i=N+s();if(E[i])return L=T.DELIMITER,z=i,n(),void n();if(E[N])return L=T.DELIMITER,z=N,void n();if(r(N)||"-"===N){for(z+=N,n();r(N);)z+=N,n();return"false"===z?z=!1:"true"===z?z=!0:isNaN(Number(z))||(z=Number(z)),void(L=T.IDENTIFIER)}if('"'===N){for(n();""!=N&&('"'!=N||'"'===N&&'"'===s());)z+=N,'"'===N&&n(),n();if('"'!=N)throw w('End of string " expected');return n(),void(L=T.IDENTIFIER)}for(L=T.UNKNOWN;""!=N;)z+=N,n();throw new SyntaxError('Syntax error in part "'+x(z,30)+'"')}function p(){var t={};if(o(),c(),"strict"===z&&(t.strict=!0,c()),"graph"!==z&&"digraph"!==z||(t.type=z,c()),L===T.IDENTIFIER&&(t.id=z,c()),"{"!=z)throw w("Angle bracket { expected");if(c(),f(t),"}"!=z)throw w("Angle bracket } expected");if(c(),""!==z)throw w("End of file expected");return c(),delete t.node,delete t.edge,delete t.graph,t}function f(t){for(;""!==z&&"}"!=z;)v(t),";"===z&&c()}function v(t){var e=m(t);if(e)return void b(t,e);var i=g(t);if(!i){if(L!=T.IDENTIFIER)throw w("Identifier expected");var o=z;if(c(),"="===z){if(c(),L!=T.IDENTIFIER)throw w("Identifier expected");t[o]=z,c()}else y(t,o)}}function m(t){var e=null;if("subgraph"===z&&(e={},e.type="subgraph",c(),L===T.IDENTIFIER&&(e.id=z,c())),"{"===z){if(c(),e||(e={}),e.parent=t,e.node=t.node,e.edge=t.edge,e.graph=t.graph,f(e),"}"!=z)throw w("Angle bracket } expected");c(),delete e.node,delete e.edge,delete e.graph,delete e.parent,t.subgraphs||(t.subgraphs=[]),t.subgraphs.push(e)}return e}function g(t){return"node"===z?(c(),t.node=_(),"node"):"edge"===z?(c(),t.edge=_(),"edge"):"graph"===z?(c(),t.graph=_(),"graph"):null}function y(t,e){var i={id:e},o=_();o&&(i.attr=o),d(t,i),b(t,e)}function b(t,e){for(;"->"===z||"--"===z;){var i,o=z;c();var n=m(t);if(n)i=n;else{if(L!=T.IDENTIFIER)throw w("Identifier or subgraph expected");i=z,d(t,{id:i}),c()}var s=_(),r=u(t,e,i,o,s);l(t,r),e=i}}function _(){for(var t=null;"["===z;){for(c(),t={};""!==z&&"]"!=z;){if(L!=T.IDENTIFIER)throw w("Attribute name expected");var e=z;if(c(),"="!=z)throw w("Equal sign = expected");if(c(),L!=T.IDENTIFIER)throw w("Attribute value expected");var i=z;h(t,e,i),c(),","==z&&c()}if("]"!=z)throw w("Bracket ] expected");c()}return t}function w(t){return new SyntaxError(t+', got "'+x(z,30)+'" (char '+I+")")}function x(t,e){return t.length<=e?t:t.substr(0,27)+"..."}function k(t,e,i){Array.isArray(t)?t.forEach(function(t){Array.isArray(e)?e.forEach(function(e){i(t,e)}):i(t,e)}):Array.isArray(e)?e.forEach(function(e){i(t,e)}):i(t,e)}function O(t,e,i){for(var o=e.split("."),n=o.pop(),s=t,r=0;r":!0,"--":!0},P="",I=0,N="",z="",L=T.NULL,A=/[a-zA-Z_0-9.:#]/;e.parseDOT=i,e.DOTToGraph=D},function(t,e){function i(t,e){var i=[],o=[],n={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};void 0!==e&&(void 0!==e.fixed&&(n.nodes.fixed=e.fixed),void 0!==e.parseColor&&(n.nodes.parseColor=e.parseColor),void 0!==e.inheritColor&&(n.edges.inheritColor=e.inheritColor));for(var s=t.edges,r=t.nodes,a=0;ai;i++)if(t[i]!=e[i])return!1;return!0},e.convert=function(t,i){var o;if(void 0!==t){if(null===t)return null;if(!i)return t;if("string"!=typeof i&&!(i instanceof String))throw new Error("Type must be a string");switch(i){case"boolean":case"Boolean":return Boolean(t);case"number":case"Number":return Number(t.valueOf());case"string":case"String":return String(t);case"Date":if(e.isNumber(t))return new Date(t);if(t instanceof Date)return new Date(t.valueOf());if(n.isMoment(t))return new Date(t.valueOf());if(e.isString(t))return o=r.exec(t),o?new Date(Number(o[1])):n(t).toDate();throw new Error("Cannot convert object of type "+e.getType(t)+" to type Date");case"Moment":if(e.isNumber(t))return n(t);if(t instanceof Date)return n(t.valueOf());if(n.isMoment(t))return n(t);if(e.isString(t))return o=r.exec(t),n(o?Number(o[1]):t);throw new Error("Cannot convert object of type "+e.getType(t)+" to type Date");case"ISODate":if(e.isNumber(t))return new Date(t);if(t instanceof Date)return t.toISOString();if(n.isMoment(t))return t.toDate().toISOString();if(e.isString(t))return o=r.exec(t),o?new Date(Number(o[1])).toISOString():new Date(t).toISOString();throw new Error("Cannot convert object of type "+e.getType(t)+" to type ISODate");case"ASPDate":if(e.isNumber(t))return"/Date("+t+")/";if(t instanceof Date)return"/Date("+t.valueOf()+")/";if(e.isString(t)){o=r.exec(t);var s;return s=o?new Date(Number(o[1])).valueOf():new Date(t).valueOf(),"/Date("+s+")/"}throw new Error("Cannot convert object of type "+e.getType(t)+" to type ASPDate");default:throw new Error('Unknown type "'+i+'"')}}};var r=/^\/?Date\((\-?\d+)/i;e.getType=function(t){var e="undefined"==typeof t?"undefined":o(t);return"object"==e?null===t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":Array.isArray(t)?"Array":t instanceof Date?"Date":"Object":"number"==e?"Number":"boolean"==e?"Boolean":"string"==e?"String":void 0===e?"undefined":e},e.copyAndExtendArray=function(t,e){for(var i=[],o=0;oi;i++)e(t[i],i,t);else for(i in t)t.hasOwnProperty(i)&&e(t[i],i,t)},e.toArray=function(t){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(t[i]);return e},e.updateProperty=function(t,e,i){return t[e]!==i?(t[e]=i,!0):!1},e.throttle=function(t,e){var i=null,o=!1;return function n(){i?o=!0:(o=!1,t(),i=setTimeout(function(){i=null,o&&n()},e))}},e.addEventListener=function(t,e,i,o){t.addEventListener?(void 0===o&&(o=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.addEventListener(e,i,o)):t.attachEvent("on"+e,i)},e.removeEventListener=function(t,e,i,o){t.removeEventListener?(void 0===o&&(o=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.removeEventListener(e,i,o)):t.detachEvent("on"+e,i)},e.preventDefault=function(t){t||(t=window.event),t.preventDefault?t.preventDefault():t.returnValue=!1},e.getTarget=function(t){t||(t=window.event);var e;return t.target?e=t.target:t.srcElement&&(e=t.srcElement),void 0!=e.nodeType&&3==e.nodeType&&(e=e.parentNode),e},e.hasParent=function(t,e){for(var i=t;i;){if(i===e)return!0;i=i.parentNode}return!1},e.option={},e.option.asBoolean=function(t,e){return"function"==typeof t&&(t=t()),null!=t?0!=t:e||null},e.option.asNumber=function(t,e){return"function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null},e.option.asString=function(t,e){return"function"==typeof t&&(t=t()),null!=t?String(t):e||null},e.option.asSize=function(t,i){return"function"==typeof t&&(t=t()),e.isString(t)?t:e.isNumber(t)?t+"px":i||null},e.option.asElement=function(t,e){return"function"==typeof t&&(t=t()),t||e||null},e.hexToRGB=function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,i,o){return e+e+i+i+o+o});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null},e.overrideOpacity=function(t,i){if(-1!=t.indexOf("rgba"))return t;if(-1!=t.indexOf("rgb")){var o=t.substr(t.indexOf("(")+1).replace(")","").split(",");return"rgba("+o[0]+","+o[1]+","+o[2]+","+i+")"}var o=e.hexToRGB(t);return null==o?t:"rgba("+o.r+","+o.g+","+o.b+","+i+")"},e.RGBToHex=function(t,e,i){return"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1)},e.parseColor=function(t){var i;if(e.isString(t)===!0){if(e.isValidRGB(t)===!0){var o=t.substr(4).substr(0,t.length-5).split(",").map(function(t){return parseInt(t)});t=e.RGBToHex(o[0],o[1],o[2])}if(e.isValidHex(t)===!0){var n=e.hexToHSV(t),s={h:n.h,s:.8*n.s,v:Math.min(1,1.02*n.v)},r={h:n.h,s:Math.min(1,1.25*n.s),v:.8*n.v},a=e.HSVToHex(r.h,r.s,r.v),h=e.HSVToHex(s.h,s.s,s.v);i={background:t,border:a,highlight:{background:h,border:a},hover:{background:h,border:a}}}else i={background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else i={},i.background=t.background||void 0,i.border=t.border||void 0,e.isString(t.highlight)?i.highlight={border:t.highlight,background:t.highlight}:(i.highlight={},i.highlight.background=t.highlight&&t.highlight.background||void 0,i.highlight.border=t.highlight&&t.highlight.border||void 0),e.isString(t.hover)?i.hover={border:t.hover,background:t.hover}:(i.hover={},i.hover.background=t.hover&&t.hover.background||void 0,i.hover.border=t.hover&&t.hover.border||void 0);return i},e.RGBToHSV=function(t,e,i){t/=255,e/=255,i/=255;var o=Math.min(t,Math.min(e,i)),n=Math.max(t,Math.max(e,i));if(o==n)return{h:0,s:0,v:o};var s=t==o?e-i:i==o?t-e:i-t,r=t==o?3:i==o?1:5,a=60*(r-s/(n-o))/360,h=(n-o)/n,d=n;return{h:a,s:h,v:d}};var a={split:function(t){var e={};return t.split(";").forEach(function(t){if(""!=t.trim()){var i=t.split(":"),o=i[0].trim(),n=i[1].trim();e[o]=n}}),e},join:function(t){return Object.keys(t).map(function(e){return e+": "+t[e]}).join("; ")}};e.addCssText=function(t,i){var o=a.split(t.style.cssText),n=a.split(i),s=e.extend(o,n);t.style.cssText=a.join(s)},e.removeCssText=function(t,e){var i=a.split(t.style.cssText),o=a.split(e);for(var n in o)o.hasOwnProperty(n)&&delete i[n];t.style.cssText=a.join(i)},e.HSVToRGB=function(t,e,i){var o,n,s,r=Math.floor(6*t),a=6*t-r,h=i*(1-e),d=i*(1-a*e),l=i*(1-(1-a)*e);switch(r%6){case 0:o=i,n=l,s=h;break;case 1:o=d,n=i,s=h;break;case 2:o=h,n=i,s=l;break;case 3:o=h,n=d,s=i;break;case 4:o=l,n=h,s=i;break;case 5:o=i,n=h,s=d}return{r:Math.floor(255*o),g:Math.floor(255*n),b:Math.floor(255*s)}},e.HSVToHex=function(t,i,o){var n=e.HSVToRGB(t,i,o);return e.RGBToHex(n.r,n.g,n.b)},e.hexToHSV=function(t){var i=e.hexToRGB(t);return e.RGBToHSV(i.r,i.g,i.b)},e.isValidHex=function(t){var e=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t);return e},e.isValidRGB=function(t){t=t.replace(" ","");var e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/i.test(t);return e},e.isValidRGBA=function(t){t=t.replace(" ","");var e=/rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(.{1,3})\)/i.test(t);return e},e.selectiveBridgeObject=function(t,i){if("object"==("undefined"==typeof i?"undefined":o(i))){for(var n=Object.create(i),s=0;s0&&e(o,t[n-1])<0;n--)t[n]=t[n-1];t[n]=o}return t},e.mergeOptions=function(t,e,i){var o=(arguments.length<=3||void 0===arguments[3]?!1:arguments[3],arguments.length<=4||void 0===arguments[4]?{}:arguments[4]);if(null===e[i])t[i]=Object.create(o[i]);else if(void 0!==e[i])if("boolean"==typeof e[i])t[i].enabled=e[i];else{void 0===e[i].enabled&&(t[i].enabled=!0);for(var n in e[i])e[i].hasOwnProperty(n)&&(t[i][n]=e[i][n])}},e.binarySearchCustom=function(t,e,i,o){for(var n=1e4,s=0,r=0,a=t.length-1;a>=r&&n>s;){var h=Math.floor((r+a)/2),d=t[h],l=void 0===o?d[i]:d[i][o],c=e(l);if(0==c)return h;-1==c?r=h+1:a=h-1,s++}return-1},e.binarySearchValue=function(t,e,i,o,n){for(var s,r,a,h,d=1e4,l=0,c=0,u=t.length-1,n=void 0!=n?n:function(t,e){return t==e?0:e>t?-1:1};u>=c&&d>l;){if(h=Math.floor(.5*(u+c)),s=t[Math.max(0,h-1)][i],r=t[h][i],a=t[Math.min(t.length-1,h+1)][i],0==n(r,e))return h;if(n(s,e)<0&&n(r,e)>0)return"before"==o?Math.max(0,h-1):h;if(n(r,e)<0&&n(a,e)>0)return"before"==o?h:Math.min(t.length-1,h+1);n(r,e)<0?c=h+1:u=h-1,l++}return-1},e.easingFunctions={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return.5>t?2*t*t:-1+(4-2*t)*t},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return.5>t?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return.5>t?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return.5>t?16*t*t*t*t*t:1+16*--t*t*t*t*t}}},function(t,e,i){t.exports="undefined"!=typeof window&&window.moment||i(3)},function(t,e,i){(function(t){!function(e,i){t.exports=i()}(this,function(){function e(){return Qi.apply(null,arguments)}function i(t){Qi=t}function o(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function n(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function s(t,e){var i,o=[];for(i=0;i0)for(i in $i)o=$i[i],n=e[o],p(n)||(t[o]=n);return t}function m(t){f(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),to===!1&&(to=!0,e.updateOffset(this),to=!1)}function v(t){return t instanceof m||null!=t&&null!=t._isAMomentObject}function g(t){return 0>t?Math.ceil(t):Math.floor(t)}function y(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=g(e)),i}function b(t,e,i){var o,n=Math.min(t.length,e.length),s=Math.abs(t.length-e.length),r=0;for(o=0;n>o;o++)(i&&t[o]!==e[o]||!i&&y(t[o])!==y(e[o]))&&r++;return r+s}function _(t){e.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function w(t,e){var i=!0;return a(function(){return i&&(_(t+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),i=!1),e.apply(this,arguments)},e)}function x(t,e){eo[t]||(_(e),eo[t]=!0)}function k(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function O(t){return"[object Object]"===Object.prototype.toString.call(t)}function M(t){var e,i;for(i in t)e=t[i],k(e)?this[i]=e:this["_"+i]=e;this._config=t,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function D(t,e){var i,o=a({},t);for(i in e)r(e,i)&&(O(t[i])&&O(e[i])?(o[i]={},a(o[i],t[i]),a(o[i],e[i])):null!=e[i]?o[i]=e[i]:delete o[i]);return o}function S(t){null!=t&&this.set(t)}function C(t){return t?t.toLowerCase().replace("_","-"):t}function T(t){for(var e,i,o,n,s=0;s0;){if(o=E(n.slice(0,e).join("-")))return o;if(i&&i.length>=e&&b(n,i,!0)>=e-1)break;e--}s++}return null}function E(e){var i=null;if(!oo[e]&&"undefined"!=typeof t&&t&&t.exports)try{i=io._abbr,!function(){var t=new Error('Cannot find module "./locale"');throw t.code="MODULE_NOT_FOUND",t}(),P(i)}catch(o){}return oo[e]}function P(t,e){var i;return t&&(i=p(e)?z(t):I(t,e),i&&(io=i)),io._abbr}function I(t,e){return null!==e?(e.abbr=t,null!=oo[t]?(x("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale"),e=D(oo[t]._config,e)):null!=e.parentLocale&&(null!=oo[e.parentLocale]?e=D(oo[e.parentLocale]._config,e):x("parentLocaleUndefined","specified parentLocale is not defined yet")),oo[t]=new S(e),P(t),oo[t]):(delete oo[t],null)}function N(t,e){if(null!=e){var i;null!=oo[t]&&(e=D(oo[t]._config,e)),i=new S(e),i.parentLocale=oo[t],oo[t]=i,P(t)}else null!=oo[t]&&(null!=oo[t].parentLocale?oo[t]=oo[t].parentLocale:null!=oo[t]&&delete oo[t]);return oo[t]}function z(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return io;if(!o(t)){if(e=E(t))return e;t=[t]}return T(t)}function L(){return Object.keys(oo)}function R(t,e){var i=t.toLowerCase();no[i]=no[i+"s"]=no[e]=t}function A(t){return"string"==typeof t?no[t]||no[t.toLowerCase()]:void 0}function B(t){var e,i,o={};for(i in t)r(t,i)&&(e=A(i),e&&(o[e]=t[i]));return o}function F(t,i){return function(o){return null!=o?(H(this,t,o),e.updateOffset(this,i),this):j(this,t)}}function j(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function H(t,e,i){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](i)}function W(t,e){var i;if("object"==typeof t)for(i in t)this.set(i,t[i]);else if(t=A(t),k(this[t]))return this[t](e);return this}function Y(t,e,i){var o=""+Math.abs(t),n=e-o.length,s=t>=0;return(s?i?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+o}function G(t,e,i,o){var n=o;"string"==typeof o&&(n=function(){return this[o]()}),t&&(ho[t]=n),e&&(ho[e[0]]=function(){return Y(n.apply(this,arguments),e[1],e[2])}),i&&(ho[i]=function(){return this.localeData().ordinal(n.apply(this,arguments),t)})}function V(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function U(t){var e,i,o=t.match(so);for(e=0,i=o.length;i>e;e++)ho[o[e]]?o[e]=ho[o[e]]:o[e]=V(o[e]);return function(n){var s="";for(e=0;i>e;e++)s+=o[e]instanceof Function?o[e].call(n,t):o[e];return s}}function q(t,e){return t.isValid()?(e=X(e,t.localeData()),ao[e]=ao[e]||U(e),ao[e](t)):t.localeData().invalidDate()}function X(t,e){function i(t){return e.longDateFormat(t)||t}var o=5;for(ro.lastIndex=0;o>=0&&ro.test(t);)t=t.replace(ro,i),ro.lastIndex=0,o-=1;return t}function Z(t,e,i){So[t]=k(e)?e:function(t,o){return t&&i?i:e}}function K(t,e){return r(So,t)?So[t](e._strict,e._locale):new RegExp(J(t))}function J(t){return Q(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,o,n){return e||i||o||n}))}function Q(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function $(t,e){var i,o=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(o=function(t,i){i[e]=y(t)}),i=0;io;o++){if(n=h([2e3,o]),i&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),i||this._monthsParse[o]||(s="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[o]=new RegExp(s.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[o].test(t))return o;if(i&&"MMM"===e&&this._shortMonthsParse[o].test(t))return o;if(!i&&this._monthsParse[o].test(t))return o}}function rt(t,e){var i;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=y(e);else if(e=t.localeData().monthsParse(e),"number"!=typeof e)return t;return i=Math.min(t.date(),it(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t}function at(t){return null!=t?(rt(this,t),e.updateOffset(this,!0),this):j(this,"Month")}function ht(){return it(this.year(),this.month())}function dt(t){return this._monthsParseExact?(r(this,"_monthsRegex")||ct.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex}function lt(t){return this._monthsParseExact?(r(this,"_monthsRegex")||ct.call(this),t?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex}function ct(){function t(t,e){return e.length-t.length}var e,i,o=[],n=[],s=[];for(e=0;12>e;e++)i=h([2e3,e]),o.push(this.monthsShort(i,"")),n.push(this.months(i,"")),s.push(this.months(i,"")),s.push(this.monthsShort(i,""));for(o.sort(t),n.sort(t),s.sort(t),e=0;12>e;e++)o[e]=Q(o[e]),n[e]=Q(n[e]),s[e]=Q(s[e]);this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")$","i"),this._monthsShortStrictRegex=new RegExp("^("+o.join("|")+")$","i")}function ut(t){var e,i=t._a;return i&&-2===l(t).overflow&&(e=i[Eo]<0||i[Eo]>11?Eo:i[Po]<1||i[Po]>it(i[To],i[Eo])?Po:i[Io]<0||i[Io]>24||24===i[Io]&&(0!==i[No]||0!==i[zo]||0!==i[Lo])?Io:i[No]<0||i[No]>59?No:i[zo]<0||i[zo]>59?zo:i[Lo]<0||i[Lo]>999?Lo:-1,l(t)._overflowDayOfYear&&(To>e||e>Po)&&(e=Po),l(t)._overflowWeeks&&-1===e&&(e=Ro),l(t)._overflowWeekday&&-1===e&&(e=Ao),l(t).overflow=e),t}function pt(t){var e,i,o,n,s,r,a=t._i,h=Yo.exec(a)||Go.exec(a);if(h){for(l(t).iso=!0,e=0,i=Uo.length;i>e;e++)if(Uo[e][1].exec(h[1])){n=Uo[e][0],o=Uo[e][2]!==!1;break}if(null==n)return void(t._isValid=!1);if(h[3]){for(e=0,i=qo.length;i>e;e++)if(qo[e][1].exec(h[3])){s=(h[2]||" ")+qo[e][0];break}if(null==s)return void(t._isValid=!1)}if(!o&&null!=s)return void(t._isValid=!1);if(h[4]){if(!Vo.exec(h[4]))return void(t._isValid=!1);r="Z"}t._f=n+(s||"")+(r||""),Ct(t)}else t._isValid=!1}function ft(t){var i=Xo.exec(t._i);return null!==i?void(t._d=new Date(+i[1])):(pt(t),void(t._isValid===!1&&(delete t._isValid,e.createFromInputFallback(t))))}function mt(t,e,i,o,n,s,r){var a=new Date(t,e,i,o,n,s,r);return 100>t&&t>=0&&isFinite(a.getFullYear())&&a.setFullYear(t),a}function vt(t){var e=new Date(Date.UTC.apply(null,arguments));return 100>t&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function gt(t){return yt(t)?366:365}function yt(t){return t%4===0&&t%100!==0||t%400===0}function bt(){return yt(this.year())}function _t(t,e,i){var o=7+e-i,n=(7+vt(t,0,o).getUTCDay()-e)%7;return-n+o-1}function wt(t,e,i,o,n){var s,r,a=(7+i-o)%7,h=_t(t,o,n),d=1+7*(e-1)+a+h;return 0>=d?(s=t-1,r=gt(s)+d):d>gt(t)?(s=t+1,r=d-gt(t)):(s=t,r=d),{year:s,dayOfYear:r}}function xt(t,e,i){var o,n,s=_t(t.year(),e,i),r=Math.floor((t.dayOfYear()-s-1)/7)+1;return 1>r?(n=t.year()-1,o=r+kt(n,e,i)):r>kt(t.year(),e,i)?(o=r-kt(t.year(),e,i),n=t.year()+1):(n=t.year(),o=r),{week:o,year:n}}function kt(t,e,i){var o=_t(t,e,i),n=_t(t+1,e,i);return(gt(t)-o+n)/7}function Ot(t,e,i){return null!=t?t:null!=e?e:i}function Mt(t){var i=new Date(e.now());return t._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()]}function Dt(t){var e,i,o,n,s=[];if(!t._d){for(o=Mt(t),t._w&&null==t._a[Po]&&null==t._a[Eo]&&St(t),t._dayOfYear&&(n=Ot(t._a[To],o[To]),t._dayOfYear>gt(n)&&(l(t)._overflowDayOfYear=!0),i=vt(n,0,t._dayOfYear),t._a[Eo]=i.getUTCMonth(),t._a[Po]=i.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=s[e]=o[e];for(;7>e;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Io]&&0===t._a[No]&&0===t._a[zo]&&0===t._a[Lo]&&(t._nextDay=!0,t._a[Io]=0),t._d=(t._useUTC?vt:mt).apply(null,s),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Io]=24)}}function St(t){var e,i,o,n,s,r,a,h;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(s=1,r=4,i=Ot(e.GG,t._a[To],xt(Rt(),1,4).year),o=Ot(e.W,1),n=Ot(e.E,1),(1>n||n>7)&&(h=!0)):(s=t._locale._week.dow,r=t._locale._week.doy,i=Ot(e.gg,t._a[To],xt(Rt(),s,r).year),o=Ot(e.w,1),null!=e.d?(n=e.d,(0>n||n>6)&&(h=!0)):null!=e.e?(n=e.e+s,(e.e<0||e.e>6)&&(h=!0)):n=s),1>o||o>kt(i,s,r)?l(t)._overflowWeeks=!0:null!=h?l(t)._overflowWeekday=!0:(a=wt(i,o,n,s,r),t._a[To]=a.year,t._dayOfYear=a.dayOfYear)}function Ct(t){if(t._f===e.ISO_8601)return void pt(t);t._a=[],l(t).empty=!0;var i,o,n,s,r,a=""+t._i,h=a.length,d=0;for(n=X(t._f,t._locale).match(so)||[],i=0;i0&&l(t).unusedInput.push(r),a=a.slice(a.indexOf(o)+o.length),d+=o.length),ho[s]?(o?l(t).empty=!1:l(t).unusedTokens.push(s),et(s,o,t)):t._strict&&!o&&l(t).unusedTokens.push(s);l(t).charsLeftOver=h-d,a.length>0&&l(t).unusedInput.push(a),l(t).bigHour===!0&&t._a[Io]<=12&&t._a[Io]>0&&(l(t).bigHour=void 0),t._a[Io]=Tt(t._locale,t._a[Io],t._meridiem),Dt(t),ut(t)}function Tt(t,e,i){var o;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?(o=t.isPM(i),o&&12>e&&(e+=12),o||12!==e||(e=0),e):e}function Et(t){var e,i,o,n,s;if(0===t._f.length)return l(t).invalidFormat=!0,void(t._d=new Date(NaN));for(n=0;ns)&&(o=s,i=e));a(t,i||e)}function Pt(t){if(!t._d){var e=B(t._i);t._a=s([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),Dt(t)}}function It(t){var e=new m(ut(Nt(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Nt(t){var e=t._i,i=t._f;return t._locale=t._locale||z(t._l),null===e||void 0===i&&""===e?u({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),v(e)?new m(ut(e)):(o(i)?Et(t):i?Ct(t):n(e)?t._d=e:zt(t),c(t)||(t._d=null),t))}function zt(t){var i=t._i;void 0===i?t._d=new Date(e.now()):n(i)?t._d=new Date(+i):"string"==typeof i?ft(t):o(i)?(t._a=s(i.slice(0),function(t){return parseInt(t,10)}),Dt(t)):"object"==typeof i?Pt(t):"number"==typeof i?t._d=new Date(i):e.createFromInputFallback(t)}function Lt(t,e,i,o,n){var s={};return"boolean"==typeof i&&(o=i,i=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=n,s._l=i,s._i=t,s._f=e,s._strict=o,It(s)}function Rt(t,e,i,o){return Lt(t,e,i,o,!1)}function At(t,e){var i,n;if(1===e.length&&o(e[0])&&(e=e[0]),!e.length)return Rt();for(i=e[0],n=1;nt&&(t=-t,i="-"),i+Y(~~(t/60),2)+e+Y(~~t%60,2)})}function Yt(t,e){var i=(e||"").match(t)||[],o=i[i.length-1]||[],n=(o+"").match($o)||["-",0,0],s=+(60*n[1])+y(n[2]);return"+"===n[0]?s:-s}function Gt(t,i){var o,s;return i._isUTC?(o=i.clone(),s=(v(t)||n(t)?+t:+Rt(t))-+o,o._d.setTime(+o._d+s),e.updateOffset(o,!1),o):Rt(t).local()}function Vt(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Ut(t,i){var o,n=this._offset||0;return this.isValid()?null!=t?("string"==typeof t?t=Yt(Oo,t):Math.abs(t)<16&&(t=60*t),!this._isUTC&&i&&(o=Vt(this)),this._offset=t,this._isUTC=!0,null!=o&&this.add(o,"m"),n!==t&&(!i||this._changeInProgress?de(this,oe(t-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?n:Vt(this):null!=t?this:NaN}function qt(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Xt(t){return this.utcOffset(0,t)}function Zt(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Vt(this),"m")),this}function Kt(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Yt(ko,this._i)),this}function Jt(t){return this.isValid()?(t=t?Rt(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function Qt(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function $t(){if(!p(this._isDSTShifted))return this._isDSTShifted;var t={};if(f(t,this),t=Nt(t),t._a){var e=t._isUTC?h(t._a):Rt(t._a);this._isDSTShifted=this.isValid()&&b(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function te(){return this.isValid()?!this._isUTC:!1}function ee(){return this.isValid()?this._isUTC:!1}function ie(){return this.isValid()?this._isUTC&&0===this._offset:!1}function oe(t,e){var i,o,n,s=t,a=null;return Ht(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(s={},e?s[e]=t:s.milliseconds=t):(a=tn.exec(t))?(i="-"===a[1]?-1:1,s={y:0,d:y(a[Po])*i,h:y(a[Io])*i,m:y(a[No])*i,s:y(a[zo])*i,ms:y(a[Lo])*i}):(a=en.exec(t))?(i="-"===a[1]?-1:1,s={y:ne(a[2],i),M:ne(a[3],i),w:ne(a[4],i),d:ne(a[5],i),h:ne(a[6],i),m:ne(a[7],i),s:ne(a[8],i)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(n=re(Rt(s.from),Rt(s.to)),s={},s.ms=n.milliseconds,s.M=n.months),o=new jt(s),Ht(t)&&r(t,"_locale")&&(o._locale=t._locale),o}function ne(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function se(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function re(t,e){var i;return t.isValid()&&e.isValid()?(e=Gt(e,t),t.isBefore(e)?i=se(t,e):(i=se(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function ae(t){ +return 0>t?-1*Math.round(-1*t):Math.round(t)}function he(t,e){return function(i,o){var n,s;return null===o||isNaN(+o)||(x(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),s=i,i=o,o=s),i="string"==typeof i?+i:i,n=oe(i,o),de(this,n,t),this}}function de(t,i,o,n){var s=i._milliseconds,r=ae(i._days),a=ae(i._months);t.isValid()&&(n=null==n?!0:n,s&&t._d.setTime(+t._d+s*o),r&&H(t,"Date",j(t,"Date")+r*o),a&&rt(t,j(t,"Month")+a*o),n&&e.updateOffset(t,r||a))}function le(t,e){var i=t||Rt(),o=Gt(i,this).startOf("day"),n=this.diff(o,"days",!0),s=-6>n?"sameElse":-1>n?"lastWeek":0>n?"lastDay":1>n?"sameDay":2>n?"nextDay":7>n?"nextWeek":"sameElse",r=e&&(k(e[s])?e[s]():e[s]);return this.format(r||this.localeData().calendar(s,this,Rt(i)))}function ce(){return new m(this)}function ue(t,e){var i=v(t)?t:Rt(t);return this.isValid()&&i.isValid()?(e=A(p(e)?"millisecond":e),"millisecond"===e?+this>+i:+i<+this.clone().startOf(e)):!1}function pe(t,e){var i=v(t)?t:Rt(t);return this.isValid()&&i.isValid()?(e=A(p(e)?"millisecond":e),"millisecond"===e?+i>+this:+this.clone().endOf(e)<+i):!1}function fe(t,e,i){return this.isAfter(t,i)&&this.isBefore(e,i)}function me(t,e){var i,o=v(t)?t:Rt(t);return this.isValid()&&o.isValid()?(e=A(e||"millisecond"),"millisecond"===e?+this===+o:(i=+o,+this.clone().startOf(e)<=i&&i<=+this.clone().endOf(e))):!1}function ve(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function ge(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function ye(t,e,i){var o,n,s,r;return this.isValid()?(o=Gt(t,this),o.isValid()?(n=6e4*(o.utcOffset()-this.utcOffset()),e=A(e),"year"===e||"month"===e||"quarter"===e?(r=be(this,o),"quarter"===e?r/=3:"year"===e&&(r/=12)):(s=this-o,r="second"===e?s/1e3:"minute"===e?s/6e4:"hour"===e?s/36e5:"day"===e?(s-n)/864e5:"week"===e?(s-n)/6048e5:s),i?r:g(r)):NaN):NaN}function be(t,e){var i,o,n=12*(e.year()-t.year())+(e.month()-t.month()),s=t.clone().add(n,"months");return 0>e-s?(i=t.clone().add(n-1,"months"),o=(e-s)/(s-i)):(i=t.clone().add(n+1,"months"),o=(e-s)/(i-s)),-(n+o)}function _e(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function we(){var t=this.clone().utc();return 0s&&(e=s),qe.call(this,t,e,i,o,n))}function qe(t,e,i,o,n){var s=wt(t,e,i,o,n),r=vt(s.year,0,s.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}function Xe(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Ze(t){return xt(t,this._week.dow,this._week.doy).week}function Ke(){return this._week.dow}function Je(){return this._week.doy}function Qe(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function $e(t){var e=xt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function ti(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function ei(t,e){return o(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]}function ii(t){return this._weekdaysShort[t.day()]}function oi(t){return this._weekdaysMin[t.day()]}function ni(t,e,i){var o,n,s;for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;7>o;o++){if(n=Rt([2e3,1]).day(o),i&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(n,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(n,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(n,"").replace(".",".?")+"$","i")),this._weekdaysParse[o]||(s="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[o]=new RegExp(s.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[o].test(t))return o;if(i&&"ddd"===e&&this._shortWeekdaysParse[o].test(t))return o;if(i&&"dd"===e&&this._minWeekdaysParse[o].test(t))return o;if(!i&&this._weekdaysParse[o].test(t))return o}}function si(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=ti(t,this.localeData()),this.add(t-e,"d")):e}function ri(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function ai(t){return this.isValid()?null==t?this.day()||7:this.day(this.day()%7?t:t-7):null!=t?this:NaN}function hi(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function di(){return this.hours()%12||12}function li(t,e){G(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function ci(t,e){return e._meridiemParse}function ui(t){return"p"===(t+"").toLowerCase().charAt(0)}function pi(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}function fi(t,e){e[Lo]=y(1e3*("0."+t))}function mi(){return this._isUTC?"UTC":""}function vi(){return this._isUTC?"Coordinated Universal Time":""}function gi(t){return Rt(1e3*t)}function yi(){return Rt.apply(null,arguments).parseZone()}function bi(t,e,i){var o=this._calendar[t];return k(o)?o.call(e,i):o}function _i(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])}function wi(){return this._invalidDate}function xi(t){return this._ordinal.replace("%d",t)}function ki(t){return t}function Oi(t,e,i,o){var n=this._relativeTime[i];return k(n)?n(t,e,i,o):n.replace(/%d/i,t)}function Mi(t,e){var i=this._relativeTime[t>0?"future":"past"];return k(i)?i(e):i.replace(/%s/i,e)}function Di(t,e,i,o){var n=z(),s=h().set(o,e);return n[i](s,t)}function Si(t,e,i,o,n){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return Di(t,e,i,n);var s,r=[];for(s=0;o>s;s++)r[s]=Di(t,s,i,n);return r}function Ci(t,e){return Si(t,e,"months",12,"month")}function Ti(t,e){return Si(t,e,"monthsShort",12,"month")}function Ei(t,e){return Si(t,e,"weekdays",7,"day")}function Pi(t,e){return Si(t,e,"weekdaysShort",7,"day")}function Ii(t,e){return Si(t,e,"weekdaysMin",7,"day")}function Ni(){var t=this._data;return this._milliseconds=Dn(this._milliseconds),this._days=Dn(this._days),this._months=Dn(this._months),t.milliseconds=Dn(t.milliseconds),t.seconds=Dn(t.seconds),t.minutes=Dn(t.minutes),t.hours=Dn(t.hours),t.months=Dn(t.months),t.years=Dn(t.years),this}function zi(t,e,i,o){var n=oe(e,i);return t._milliseconds+=o*n._milliseconds,t._days+=o*n._days,t._months+=o*n._months,t._bubble()}function Li(t,e){return zi(this,t,e,1)}function Ri(t,e){return zi(this,t,e,-1)}function Ai(t){return 0>t?Math.floor(t):Math.ceil(t)}function Bi(){var t,e,i,o,n,s=this._milliseconds,r=this._days,a=this._months,h=this._data;return s>=0&&r>=0&&a>=0||0>=s&&0>=r&&0>=a||(s+=864e5*Ai(ji(a)+r),r=0,a=0),h.milliseconds=s%1e3,t=g(s/1e3),h.seconds=t%60,e=g(t/60),h.minutes=e%60,i=g(e/60),h.hours=i%24,r+=g(i/24),n=g(Fi(r)),a+=n,r-=Ai(ji(n)),o=g(a/12),a%=12,h.days=r,h.months=a,h.years=o,this}function Fi(t){return 4800*t/146097}function ji(t){return 146097*t/4800}function Hi(t){var e,i,o=this._milliseconds;if(t=A(t),"month"===t||"year"===t)return e=this._days+o/864e5,i=this._months+Fi(e),"month"===t?i:i/12;switch(e=this._days+Math.round(ji(this._months)),t){case"week":return e/7+o/6048e5;case"day":return e+o/864e5;case"hour":return 24*e+o/36e5;case"minute":return 1440*e+o/6e4;case"second":return 86400*e+o/1e3;case"millisecond":return Math.floor(864e5*e)+o;default:throw new Error("Unknown unit "+t)}}function Wi(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*y(this._months/12)}function Yi(t){return function(){return this.as(t)}}function Gi(t){return t=A(t),this[t+"s"]()}function Vi(t){return function(){return this._data[t]}}function Ui(){return g(this.days()/7)}function qi(t,e,i,o,n){return n.relativeTime(e||1,!!i,t,o)}function Xi(t,e,i){var o=oe(t).abs(),n=Wn(o.as("s")),s=Wn(o.as("m")),r=Wn(o.as("h")),a=Wn(o.as("d")),h=Wn(o.as("M")),d=Wn(o.as("y")),l=n=s&&["m"]||s=r&&["h"]||r=a&&["d"]||a=h&&["M"]||h=d&&["y"]||["yy",d];return l[2]=e,l[3]=+t>0,l[4]=i,qi.apply(null,l)}function Zi(t,e){return void 0===Yn[t]?!1:void 0===e?Yn[t]:(Yn[t]=e,!0)}function Ki(t){var e=this.localeData(),i=Xi(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)}function Ji(){var t,e,i,o=Gn(this._milliseconds)/1e3,n=Gn(this._days),s=Gn(this._months);t=g(o/60),e=g(t/60),o%=60,t%=60,i=g(s/12),s%=12;var r=i,a=s,h=n,d=e,l=t,c=o,u=this.asSeconds();return u?(0>u?"-":"")+"P"+(r?r+"Y":"")+(a?a+"M":"")+(h?h+"D":"")+(d||l||c?"T":"")+(d?d+"H":"")+(l?l+"M":"")+(c?c+"S":""):"P0D"}var Qi,$i=e.momentProperties=[],to=!1,eo={};e.suppressDeprecationWarnings=!1;var io,oo={},no={},so=/(\[[^\[]*\])|(\\)?([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?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ro=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ao={},ho={},lo=/\d/,co=/\d\d/,uo=/\d{3}/,po=/\d{4}/,fo=/[+-]?\d{6}/,mo=/\d\d?/,vo=/\d\d\d\d?/,go=/\d\d\d\d\d\d?/,yo=/\d{1,3}/,bo=/\d{1,4}/,_o=/[+-]?\d{1,6}/,wo=/\d+/,xo=/[+-]?\d+/,ko=/Z|[+-]\d\d:?\d\d/gi,Oo=/Z|[+-]\d\d(?::?\d\d)?/gi,Mo=/[+-]?\d+(\.\d{1,3})?/,Do=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,So={},Co={},To=0,Eo=1,Po=2,Io=3,No=4,zo=5,Lo=6,Ro=7,Ao=8;G("M",["MM",2],"Mo",function(){return this.month()+1}),G("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),G("MMMM",0,0,function(t){return this.localeData().months(this,t)}),R("month","M"),Z("M",mo),Z("MM",mo,co),Z("MMM",function(t,e){return e.monthsShortRegex(t)}),Z("MMMM",function(t,e){return e.monthsRegex(t)}),$(["M","MM"],function(t,e){e[Eo]=y(t)-1}),$(["MMM","MMMM"],function(t,e,i,o){var n=i._locale.monthsParse(t,o,i._strict);null!=n?e[Eo]=n:l(i).invalidMonth=t});var Bo=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,Fo="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),jo="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Ho=Do,Wo=Do,Yo=/^\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)?)?/,Go=/^\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)?)?/,Vo=/Z|[+-]\d\d(?::?\d\d)?/,Uo=[["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}/]],qo=[["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/]],Xo=/^\/?Date\((\-?\d+)/i;e.createFromInputFallback=w("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),G("Y",0,0,function(){var t=this.year();return 9999>=t?""+t:"+"+t}),G(0,["YY",2],0,function(){return this.year()%100}),G(0,["YYYY",4],0,"year"),G(0,["YYYYY",5],0,"year"),G(0,["YYYYYY",6,!0],0,"year"),R("year","y"),Z("Y",xo),Z("YY",mo,co),Z("YYYY",bo,po),Z("YYYYY",_o,fo),Z("YYYYYY",_o,fo),$(["YYYYY","YYYYYY"],To),$("YYYY",function(t,i){i[To]=2===t.length?e.parseTwoDigitYear(t):y(t)}),$("YY",function(t,i){i[To]=e.parseTwoDigitYear(t)}),$("Y",function(t,e){e[To]=parseInt(t,10)}),e.parseTwoDigitYear=function(t){return y(t)+(y(t)>68?1900:2e3)};var Zo=F("FullYear",!1);e.ISO_8601=function(){};var Ko=w("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=Rt.apply(null,arguments);return this.isValid()&&t.isValid()?this>t?this:t:u()}),Jo=w("moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=Rt.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:u()}),Qo=function(){return Date.now?Date.now():+new Date};Wt("Z",":"),Wt("ZZ",""),Z("Z",Oo),Z("ZZ",Oo),$(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=Yt(Oo,t)});var $o=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var tn=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,en=/^(-)?P(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)W)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?$/;oe.fn=jt.prototype;var on=he(1,"add"),nn=he(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var sn=w("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});G(0,["gg",2],0,function(){return this.weekYear()%100}),G(0,["GG",2],0,function(){return this.isoWeekYear()%100}),He("gggg","weekYear"),He("ggggg","weekYear"),He("GGGG","isoWeekYear"),He("GGGGG","isoWeekYear"),R("weekYear","gg"),R("isoWeekYear","GG"),Z("G",xo),Z("g",xo),Z("GG",mo,co),Z("gg",mo,co),Z("GGGG",bo,po),Z("gggg",bo,po),Z("GGGGG",_o,fo),Z("ggggg",_o,fo),tt(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,o){e[o.substr(0,2)]=y(t)}),tt(["gg","GG"],function(t,i,o,n){i[n]=e.parseTwoDigitYear(t)}),G("Q",0,"Qo","quarter"),R("quarter","Q"),Z("Q",lo),$("Q",function(t,e){e[Eo]=3*(y(t)-1)}),G("w",["ww",2],"wo","week"),G("W",["WW",2],"Wo","isoWeek"),R("week","w"),R("isoWeek","W"),Z("w",mo),Z("ww",mo,co),Z("W",mo),Z("WW",mo,co),tt(["w","ww","W","WW"],function(t,e,i,o){e[o.substr(0,1)]=y(t)});var rn={dow:0,doy:6};G("D",["DD",2],"Do","date"),R("date","D"),Z("D",mo),Z("DD",mo,co),Z("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),$(["D","DD"],Po),$("Do",function(t,e){e[Po]=y(t.match(mo)[0],10)});var an=F("Date",!0);G("d",0,"do","day"),G("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),G("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),G("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),G("e",0,0,"weekday"),G("E",0,0,"isoWeekday"),R("day","d"),R("weekday","e"),R("isoWeekday","E"),Z("d",mo),Z("e",mo),Z("E",mo),Z("dd",Do),Z("ddd",Do),Z("dddd",Do),tt(["dd","ddd","dddd"],function(t,e,i,o){var n=i._locale.weekdaysParse(t,o,i._strict);null!=n?e.d=n:l(i).invalidWeekday=t}),tt(["d","e","E"],function(t,e,i,o){e[o]=y(t)});var hn="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),dn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ln="Su_Mo_Tu_We_Th_Fr_Sa".split("_");G("DDD",["DDDD",3],"DDDo","dayOfYear"),R("dayOfYear","DDD"),Z("DDD",yo),Z("DDDD",uo),$(["DDD","DDDD"],function(t,e,i){i._dayOfYear=y(t)}),G("H",["HH",2],0,"hour"),G("h",["hh",2],0,di),G("hmm",0,0,function(){return""+di.apply(this)+Y(this.minutes(),2)}),G("hmmss",0,0,function(){return""+di.apply(this)+Y(this.minutes(),2)+Y(this.seconds(),2)}),G("Hmm",0,0,function(){return""+this.hours()+Y(this.minutes(),2)}),G("Hmmss",0,0,function(){return""+this.hours()+Y(this.minutes(),2)+Y(this.seconds(),2)}),li("a",!0),li("A",!1),R("hour","h"),Z("a",ci),Z("A",ci),Z("H",mo),Z("h",mo),Z("HH",mo,co),Z("hh",mo,co),Z("hmm",vo),Z("hmmss",go),Z("Hmm",vo),Z("Hmmss",go),$(["H","HH"],Io),$(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),$(["h","hh"],function(t,e,i){e[Io]=y(t),l(i).bigHour=!0}),$("hmm",function(t,e,i){var o=t.length-2;e[Io]=y(t.substr(0,o)),e[No]=y(t.substr(o)),l(i).bigHour=!0}),$("hmmss",function(t,e,i){var o=t.length-4,n=t.length-2;e[Io]=y(t.substr(0,o)),e[No]=y(t.substr(o,2)),e[zo]=y(t.substr(n)),l(i).bigHour=!0}),$("Hmm",function(t,e,i){var o=t.length-2;e[Io]=y(t.substr(0,o)),e[No]=y(t.substr(o))}),$("Hmmss",function(t,e,i){var o=t.length-4,n=t.length-2;e[Io]=y(t.substr(0,o)),e[No]=y(t.substr(o,2)),e[zo]=y(t.substr(n))});var cn=/[ap]\.?m?\.?/i,un=F("Hours",!0);G("m",["mm",2],0,"minute"),R("minute","m"),Z("m",mo),Z("mm",mo,co),$(["m","mm"],No);var pn=F("Minutes",!1);G("s",["ss",2],0,"second"),R("second","s"),Z("s",mo),Z("ss",mo,co),$(["s","ss"],zo);var fn=F("Seconds",!1);G("S",0,0,function(){return~~(this.millisecond()/100)}),G(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),G(0,["SSS",3],0,"millisecond"),G(0,["SSSS",4],0,function(){return 10*this.millisecond()}),G(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),G(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),G(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),G(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),G(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),R("millisecond","ms"),Z("S",yo,lo),Z("SS",yo,co),Z("SSS",yo,uo);var mn;for(mn="SSSS";mn.length<=9;mn+="S")Z(mn,wo);for(mn="S";mn.length<=9;mn+="S")$(mn,fi);var vn=F("Milliseconds",!1);G("z",0,0,"zoneAbbr"),G("zz",0,0,"zoneName");var gn=m.prototype;gn.add=on,gn.calendar=le,gn.clone=ce,gn.diff=ye,gn.endOf=Ee,gn.format=xe,gn.from=ke,gn.fromNow=Oe,gn.to=Me,gn.toNow=De,gn.get=W,gn.invalidAt=Fe,gn.isAfter=ue,gn.isBefore=pe,gn.isBetween=fe,gn.isSame=me,gn.isSameOrAfter=ve,gn.isSameOrBefore=ge,gn.isValid=Ae,gn.lang=sn,gn.locale=Se,gn.localeData=Ce,gn.max=Jo,gn.min=Ko,gn.parsingFlags=Be,gn.set=W,gn.startOf=Te,gn.subtract=nn,gn.toArray=ze,gn.toObject=Le,gn.toDate=Ne,gn.toISOString=we,gn.toJSON=Re,gn.toString=_e,gn.unix=Ie,gn.valueOf=Pe,gn.creationData=je,gn.year=Zo,gn.isLeapYear=bt,gn.weekYear=We,gn.isoWeekYear=Ye,gn.quarter=gn.quarters=Xe,gn.month=at,gn.daysInMonth=ht,gn.week=gn.weeks=Qe,gn.isoWeek=gn.isoWeeks=$e,gn.weeksInYear=Ve,gn.isoWeeksInYear=Ge,gn.date=an,gn.day=gn.days=si,gn.weekday=ri,gn.isoWeekday=ai,gn.dayOfYear=hi,gn.hour=gn.hours=un,gn.minute=gn.minutes=pn,gn.second=gn.seconds=fn,gn.millisecond=gn.milliseconds=vn,gn.utcOffset=Ut,gn.utc=Xt,gn.local=Zt,gn.parseZone=Kt,gn.hasAlignedHourOffset=Jt,gn.isDST=Qt,gn.isDSTShifted=$t,gn.isLocal=te,gn.isUtcOffset=ee,gn.isUtc=ie,gn.isUTC=ie,gn.zoneAbbr=mi,gn.zoneName=vi,gn.dates=w("dates accessor is deprecated. Use date instead.",an),gn.months=w("months accessor is deprecated. Use month instead",at),gn.years=w("years accessor is deprecated. Use year instead",Zo),gn.zone=w("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",qt);var yn=gn,bn={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},_n={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"},wn="Invalid date",xn="%d",kn=/\d{1,2}/,On={future:"in %s",past:"%s ago",s:"a few 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"},Mn=S.prototype;Mn._calendar=bn,Mn.calendar=bi,Mn._longDateFormat=_n,Mn.longDateFormat=_i,Mn._invalidDate=wn,Mn.invalidDate=wi,Mn._ordinal=xn,Mn.ordinal=xi,Mn._ordinalParse=kn,Mn.preparse=ki,Mn.postformat=ki,Mn._relativeTime=On,Mn.relativeTime=Oi,Mn.pastFuture=Mi,Mn.set=M,Mn.months=ot,Mn._months=Fo,Mn.monthsShort=nt,Mn._monthsShort=jo,Mn.monthsParse=st,Mn._monthsRegex=Wo,Mn.monthsRegex=lt,Mn._monthsShortRegex=Ho,Mn.monthsShortRegex=dt,Mn.week=Ze,Mn._week=rn,Mn.firstDayOfYear=Je,Mn.firstDayOfWeek=Ke,Mn.weekdays=ei,Mn._weekdays=hn,Mn.weekdaysMin=oi,Mn._weekdaysMin=ln,Mn.weekdaysShort=ii,Mn._weekdaysShort=dn,Mn.weekdaysParse=ni,Mn.isPM=ui,Mn._meridiemParse=cn,Mn.meridiem=pi,P("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,i=1===y(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+i}}),e.lang=w("moment.lang is deprecated. Use moment.locale instead.",P),e.langData=w("moment.langData is deprecated. Use moment.localeData instead.",z);var Dn=Math.abs,Sn=Yi("ms"),Cn=Yi("s"),Tn=Yi("m"),En=Yi("h"),Pn=Yi("d"),In=Yi("w"),Nn=Yi("M"),zn=Yi("y"),Ln=Vi("milliseconds"),Rn=Vi("seconds"),An=Vi("minutes"),Bn=Vi("hours"),Fn=Vi("days"),jn=Vi("months"),Hn=Vi("years"),Wn=Math.round,Yn={s:45,m:45,h:22,d:26,M:11},Gn=Math.abs,Vn=jt.prototype;Vn.abs=Ni,Vn.add=Li,Vn.subtract=Ri,Vn.as=Hi,Vn.asMilliseconds=Sn,Vn.asSeconds=Cn,Vn.asMinutes=Tn,Vn.asHours=En,Vn.asDays=Pn,Vn.asWeeks=In,Vn.asMonths=Nn,Vn.asYears=zn,Vn.valueOf=Wi,Vn._bubble=Bi,Vn.get=Gi,Vn.milliseconds=Ln,Vn.seconds=Rn,Vn.minutes=An,Vn.hours=Bn,Vn.days=Fn,Vn.weeks=Ui,Vn.months=jn,Vn.years=Hn,Vn.humanize=Ki,Vn.toISOString=Ji,Vn.toString=Ji,Vn.toJSON=Ji,Vn.locale=Se,Vn.localeData=Ce,Vn.toIsoString=w("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ji),Vn.lang=sn,G("X",0,0,"unix"),G("x",0,0,"valueOf"),Z("x",xo),Z("X",Mo),$("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),$("x",function(t,e,i){i._d=new Date(y(t))}),e.version="2.12.0",i(Rt),e.fn=yn,e.min=Bt,e.max=Ft,e.now=Qo,e.utc=h,e.unix=gi,e.months=Ci,e.isDate=n,e.locale=P,e.invalid=u,e.duration=oe,e.isMoment=v,e.weekdays=Ei,e.parseZone=yi,e.localeData=z,e.isDuration=Ht,e.monthsShort=Ti,e.weekdaysMin=Ii,e.defineLocale=I,e.updateLocale=N,e.locales=L,e.weekdaysShort=Pi,e.normalizeUnits=A,e.relativeTimeThreshold=Zi,e.prototype=yn;var Un=e;return Un})}).call(e,i(4)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){function i(t){throw new Error("Cannot find module '"+t+"'.")}i.keys=function(){return[]},i.resolve=i,t.exports=i,i.id=5},function(t,e){(function(e){function i(t,e,i){var o=e&&i||0,n=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){16>n&&(e[o+n++]=c[t])});16>n;)e[o+n++]=0;return e}function o(t,e){var i=e||0,o=l;return o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]}function n(t,e,i){var n=e&&i||0,s=e||[];t=t||{};var r=void 0!==t.clockseq?t.clockseq:m,a=void 0!==t.msecs?t.msecs:(new Date).getTime(),h=void 0!==t.nsecs?t.nsecs:g+1,d=a-v+(h-g)/1e4;if(0>d&&void 0===t.clockseq&&(r=r+1&16383),(0>d||a>v)&&void 0===t.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");v=a,g=h,m=r,a+=122192928e5;var l=(1e4*(268435455&a)+h)%4294967296;s[n++]=l>>>24&255,s[n++]=l>>>16&255,s[n++]=l>>>8&255,s[n++]=255&l;var c=a/4294967296*1e4&268435455;s[n++]=c>>>8&255,s[n++]=255&c,s[n++]=c>>>24&15|16,s[n++]=c>>>16&255,s[n++]=r>>>8|128,s[n++]=255&r;for(var u=t.node||f,p=0;6>p;p++)s[n+p]=u[p];return e?e:o(s)}function s(t,e,i){var n=e&&i||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null),t=t||{};var s=t.random||(t.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e)for(var a=0;16>a;a++)e[n+a]=s[a];return e||o(s)}var r,a="undefined"!=typeof window?window:"undefined"!=typeof e?e:null;if(a&&a.crypto&&crypto.getRandomValues){var h=new Uint8Array(16);r=function(){return crypto.getRandomValues(h),h}}if(!r){var d=new Array(16);r=function(){for(var t,e=0;16>e;e++)0===(3&e)&&(t=4294967296*Math.random()),d[e]=t>>>((3&e)<<3)&255;return d}}for(var l=[],c={},u=0;256>u;u++)l[u]=(u+256).toString(16).substr(1),c[l[u]]=u;var p=r(),f=[1|p[0],p[1],p[2],p[3],p[4],p[5]],m=16383&(p[6]<<8|p[7]),v=0,g=0,y=s;y.v1=n,y.v4=s,y.parse=i,y.unparse=o,t.exports=y}).call(e,function(){return this}())},function(t,e){e.prepareElements=function(t){for(var e in t)t.hasOwnProperty(e)&&(t[e].redundant=t[e].used,t[e].used=[])},e.cleanupElements=function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].redundant){for(var i=0;i0?(o=e[t].redundant[0],e[t].redundant.shift()):(o=document.createElementNS("http://www.w3.org/2000/svg",t),i.appendChild(o)):(o=document.createElementNS("http://www.w3.org/2000/svg",t),e[t]={used:[],redundant:[]},i.appendChild(o)),e[t].used.push(o),o},e.getDOMElement=function(t,e,i,o){var n;return e.hasOwnProperty(t)?e[t].redundant.length>0?(n=e[t].redundant[0],e[t].redundant.shift()):(n=document.createElement(t),void 0!==o?i.insertBefore(n,o):i.appendChild(n)):(n=document.createElement(t),e[t]={used:[],redundant:[]},void 0!==o?i.insertBefore(n,o):i.appendChild(n)),e[t].used.push(n),n},e.drawPoint=function(t,i,o,n,s,r){var a;if("circle"==o.style?(a=e.getSVGElement("circle",n,s),a.setAttributeNS(null,"cx",t),a.setAttributeNS(null,"cy",i),a.setAttributeNS(null,"r",.5*o.size)):(a=e.getSVGElement("rect",n,s),a.setAttributeNS(null,"x",t-.5*o.size),a.setAttributeNS(null,"y",i-.5*o.size),a.setAttributeNS(null,"width",o.size),a.setAttributeNS(null,"height",o.size)),void 0!==o.styles&&a.setAttributeNS(null,"style",o.styles),a.setAttributeNS(null,"class",o.className+" vis-point"),r){var h=e.getSVGElement("text",n,s);r.xOffset&&(t+=r.xOffset),r.yOffset&&(i+=r.yOffset),r.content&&(h.textContent=r.content),r.className&&h.setAttributeNS(null,"class",r.className+" vis-label"),h.setAttributeNS(null,"x",t),h.setAttributeNS(null,"y",i)}return a},e.drawBar=function(t,i,o,n,s,r,a,h){if(0!=n){0>n&&(n*=-1,i-=n);var d=e.getSVGElement("rect",r,a);d.setAttributeNS(null,"x",t-.5*o),d.setAttributeNS(null,"y",i),d.setAttributeNS(null,"width",o),d.setAttributeNS(null,"height",n),d.setAttributeNS(null,"class",s),h&&d.setAttributeNS(null,"style",h)}}},function(t,e,i){function o(t,e){if(t&&!Array.isArray(t)&&(e=t,t=null),this._options=e||{},this._data={},this.length=0,this._fieldId=this._options.fieldId||"id",this._type={},this._options.type)for(var i=Object.keys(this._options.type),o=0,n=i.length;n>o;o++){var s=i[o],r=this._options.type[s];"Date"==r||"ISODate"==r||"ASPDate"==r?this._type[s]="Date":this._type[s]=r}if(this._options.convert)throw new Error('Option "convert" is deprecated. Use "type" instead.');this._subscribers={},t&&this.add(t),this.setOptions(e)}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s=i(1),r=i(9);o.prototype.setOptions=function(t){t&&void 0!==t.queue&&(t.queue===!1?this._queue&&(this._queue.destroy(),delete this._queue):(this._queue||(this._queue=r.extend(this,{replace:["add","update","remove"]})),"object"===n(t.queue)&&this._queue.setOptions(t.queue)))},o.prototype.on=function(t,e){var i=this._subscribers[t];i||(i=[],this._subscribers[t]=i),i.push({callback:e})},o.prototype.subscribe=function(){throw new Error("DataSet.subscribe is deprecated. Use DataSet.on instead.")},o.prototype.off=function(t,e){var i=this._subscribers[t];i&&(this._subscribers[t]=i.filter(function(t){return t.callback!=e}))},o.prototype.unsubscribe=function(){throw new Error("DataSet.unsubscribe is deprecated. Use DataSet.off instead.")},o.prototype._trigger=function(t,e,i){if("*"==t)throw new Error("Cannot trigger event *");var o=[];t in this._subscribers&&(o=o.concat(this._subscribers[t])),"*"in this._subscribers&&(o=o.concat(this._subscribers["*"]));for(var n=0,s=o.length;s>n;n++){var r=o[n];r.callback&&r.callback(t,e,i||null)}},o.prototype.add=function(t,e){var i,o=[],n=this;if(Array.isArray(t))for(var s=0,r=t.length;r>s;s++)i=n._addItem(t[s]),o.push(i);else{if(!(t instanceof Object))throw new Error("Unknown dataType");i=n._addItem(t),o.push(i)}return o.length&&this._trigger("add",{items:o},e),o},o.prototype.update=function(t,e){var i=[],o=[],n=[],r=[],a=this,h=a._fieldId,d=function(t){var e=t[h];if(a._data[e]){var d=s.extend({},a._data[e]);e=a._updateItem(t),o.push(e),r.push(t),n.push(d)}else e=a._addItem(t),i.push(e)};if(Array.isArray(t))for(var l=0,c=t.length;c>l;l++)t[l]instanceof Object?d(t[l]):console.warn("Ignoring input item, which is not an object at index "+l);else{if(!(t instanceof Object))throw new Error("Unknown dataType");d(t)}if(i.length&&this._trigger("add",{items:i},e),o.length){var u={items:o,oldData:n,data:r};this._trigger("update",u,e)}return i.concat(o)},o.prototype.get=function(t){var e,i,o,n=this,r=s.getType(arguments[0]);"String"==r||"Number"==r?(e=arguments[0],o=arguments[1]):"Array"==r?(i=arguments[0],o=arguments[1]):o=arguments[0];var a;if(o&&o.returnType){var h=["Array","Object"];a=-1==h.indexOf(o.returnType)?"Array":o.returnType}else a="Array";var d,l,c,u,p,f=o&&o.type||this._options.type,m=o&&o.filter,v=[];if(void 0!=e)d=n._getItem(e,f),d&&m&&!m(d)&&(d=null);else if(void 0!=i)for(u=0,p=i.length;p>u;u++)d=n._getItem(i[u],f),m&&!m(d)||v.push(d);else for(l=Object.keys(this._data),u=0,p=l.length;p>u;u++)c=l[u],d=n._getItem(c,f),m&&!m(d)||v.push(d);if(o&&o.order&&void 0==e&&this._sort(v,o.order),o&&o.fields){var g=o.fields;if(void 0!=e)d=this._filterFields(d,g);else for(u=0,p=v.length;p>u;u++)v[u]=this._filterFields(v[u],g)}if("Object"==a){var y,b={};for(u=0,p=v.length;p>u;u++)y=v[u],b[y.id]=y;return b}return void 0!=e?d:v},o.prototype.getIds=function(t){var e,i,o,n,s,r=this._data,a=t&&t.filter,h=t&&t.order,d=t&&t.type||this._options.type,l=Object.keys(r),c=[];if(a)if(h){for(s=[],e=0,i=l.length;i>e;e++)o=l[e],n=this._getItem(o,d),a(n)&&s.push(n);for(this._sort(s,h),e=0,i=s.length;i>e;e++)c.push(s[e][this._fieldId]); +}else for(e=0,i=l.length;i>e;e++)o=l[e],n=this._getItem(o,d),a(n)&&c.push(n[this._fieldId]);else if(h){for(s=[],e=0,i=l.length;i>e;e++)o=l[e],s.push(r[o]);for(this._sort(s,h),e=0,i=s.length;i>e;e++)c.push(s[e][this._fieldId])}else for(e=0,i=l.length;i>e;e++)o=l[e],n=r[o],c.push(n[this._fieldId]);return c},o.prototype.getDataSet=function(){return this},o.prototype.forEach=function(t,e){var i,o,n,s,r=e&&e.filter,a=e&&e.type||this._options.type,h=this._data,d=Object.keys(h);if(e&&e.order){var l=this.get(e);for(i=0,o=l.length;o>i;i++)n=l[i],s=n[this._fieldId],t(n,s)}else for(i=0,o=d.length;o>i;i++)s=d[i],n=this._getItem(s,a),r&&!r(n)||t(n,s)},o.prototype.map=function(t,e){var i,o,n,s,r=e&&e.filter,a=e&&e.type||this._options.type,h=[],d=this._data,l=Object.keys(d);for(i=0,o=l.length;o>i;i++)n=l[i],s=this._getItem(n,a),r&&!r(s)||h.push(t(s,n));return e&&e.order&&this._sort(h,e.order),h},o.prototype._filterFields=function(t,e){if(!t)return t;var i,o,n={},s=Object.keys(t),r=s.length;if(Array.isArray(e))for(i=0;r>i;i++)o=s[i],-1!=e.indexOf(o)&&(n[o]=t[o]);else for(i=0;r>i;i++)o=s[i],e.hasOwnProperty(o)&&(n[e[o]]=t[o]);return n},o.prototype._sort=function(t,e){if(s.isString(e)){var i=e;t.sort(function(t,e){var o=t[i],n=e[i];return o>n?1:n>o?-1:0})}else{if("function"!=typeof e)throw new TypeError("Order must be a function or a string");t.sort(e)}},o.prototype.remove=function(t,e){var i,o,n,s=[];if(Array.isArray(t))for(i=0,o=t.length;o>i;i++)n=this._remove(t[i]),null!=n&&s.push(n);else n=this._remove(t),null!=n&&s.push(n);return s.length&&this._trigger("remove",{items:s},e),s},o.prototype._remove=function(t){if(s.isNumber(t)||s.isString(t)){if(this._data[t])return delete this._data[t],this.length--,t}else if(t instanceof Object){var e=t[this._fieldId];if(void 0!==e&&this._data[e])return delete this._data[e],this.length--,e}return null},o.prototype.clear=function(t){var e=Object.keys(this._data);return this._data={},this.length=0,this._trigger("remove",{items:e},t),e},o.prototype.max=function(t){var e,i,o=this._data,n=Object.keys(o),s=null,r=null;for(e=0,i=n.length;i>e;e++){var a=n[e],h=o[a],d=h[t];null!=d&&(!s||d>r)&&(s=h,r=d)}return s},o.prototype.min=function(t){var e,i,o=this._data,n=Object.keys(o),s=null,r=null;for(e=0,i=n.length;i>e;e++){var a=n[e],h=o[a],d=h[t];null!=d&&(!s||r>d)&&(s=h,r=d)}return s},o.prototype.distinct=function(t){var e,i,o,n=this._data,r=Object.keys(n),a=[],h=this._options.type&&this._options.type[t]||null,d=0;for(e=0,o=r.length;o>e;e++){var l=r[e],c=n[l],u=c[t],p=!1;for(i=0;d>i;i++)if(a[i]==u){p=!0;break}p||void 0===u||(a[d]=u,d++)}if(h)for(e=0,o=a.length;o>e;e++)a[e]=s.convert(a[e],h);return a},o.prototype._addItem=function(t){var e=t[this._fieldId];if(void 0!=e){if(this._data[e])throw new Error("Cannot add item: item with id "+e+" already exists")}else e=s.randomUUID(),t[this._fieldId]=e;var i,o,n={},r=Object.keys(t);for(i=0,o=r.length;o>i;i++){var a=r[i],h=this._type[a];n[a]=s.convert(t[a],h)}return this._data[e]=n,this.length++,e},o.prototype._getItem=function(t,e){var i,o,n,r,a=this._data[t];if(!a)return null;var h={},d=Object.keys(a);if(e)for(n=0,r=d.length;r>n;n++)i=d[n],o=a[i],h[i]=s.convert(o,e[i]);else for(n=0,r=d.length;r>n;n++)i=d[n],o=a[i],h[i]=o;return h},o.prototype._updateItem=function(t){var e=t[this._fieldId];if(void 0==e)throw new Error("Cannot update item: item has no id (item: "+JSON.stringify(t)+")");var i=this._data[e];if(!i)throw new Error("Cannot update item: no item with id "+e+" found");for(var o=Object.keys(t),n=0,r=o.length;r>n;n++){var a=o[n],h=this._type[a];i[a]=s.convert(t[a],h)}return e},t.exports=o},function(t,e){function i(t){this.delay=null,this.max=1/0,this._queue=[],this._timeout=null,this._extended=null,this.setOptions(t)}i.prototype.setOptions=function(t){t&&"undefined"!=typeof t.delay&&(this.delay=t.delay),t&&"undefined"!=typeof t.max&&(this.max=t.max),this._flushIfNeeded()},i.extend=function(t,e){var o=new i(e);if(void 0!==t.flush)throw new Error("Target object already has a property flush");t.flush=function(){o.flush()};var n=[{name:"flush",original:void 0}];if(e&&e.replace)for(var s=0;sthis.max&&this.flush(),clearTimeout(this._timeout),this.queue.length>0&&"number"==typeof this.delay){var t=this;this._timeout=setTimeout(function(){t.flush()},this.delay)}},i.prototype.flush=function(){for(;this._queue.length>0;){var t=this._queue.shift();t.fn.apply(t.context||t.fn,t.args||[])}},t.exports=i},function(t,e,i){function o(t,e){this._data=null,this._ids={},this.length=0,this._options=e||{},this._fieldId="id",this._subscribers={};var i=this;this.listener=function(){i._onEvent.apply(i,arguments)},this.setData(t)}var n=i(1),s=i(8);o.prototype.setData=function(t){var e,i,o,n;if(this._data&&(this._data.off&&this._data.off("*",this.listener),e=Object.keys(this._ids),this._ids={},this.length=0,this._trigger("remove",{items:e})),this._data=t,this._data){for(this._fieldId=this._options.fieldId||this._data&&this._data.options&&this._data.options.fieldId||"id",e=this._data.getIds({filter:this._options&&this._options.filter}),o=0,n=e.length;n>o;o++)i=e[o],this._ids[i]=!0;this.length=e.length,this._trigger("add",{items:e}),this._data.on&&this._data.on("*",this.listener)}},o.prototype.refresh=function(){var t,e,i,o=this._data.getIds({filter:this._options&&this._options.filter}),n=Object.keys(this._ids),s={},r=[],a=[];for(e=0,i=o.length;i>e;e++)t=o[e],s[t]=!0,this._ids[t]||(r.push(t),this._ids[t]=!0);for(e=0,i=n.length;i>e;e++)t=n[e],s[t]||(a.push(t),delete this._ids[t]);this.length+=r.length-a.length,r.length&&this._trigger("add",{items:r}),a.length&&this._trigger("remove",{items:a})},o.prototype.get=function(t){var e,i,o,s=this,r=n.getType(arguments[0]);"String"==r||"Number"==r||"Array"==r?(e=arguments[0],i=arguments[1],o=arguments[2]):(i=arguments[0],o=arguments[1]);var a=n.extend({},this._options,i);this._options.filter&&i&&i.filter&&(a.filter=function(t){return s._options.filter(t)&&i.filter(t)});var h=[];return void 0!=e&&h.push(e),h.push(a),h.push(o),this._data&&this._data.get.apply(this._data,h)},o.prototype.getIds=function(t){var e;if(this._data){var i,o=this._options.filter;i=t&&t.filter?o?function(e){return o(e)&&t.filter(e)}:t.filter:o,e=this._data.getIds({filter:i,order:t&&t.order})}else e=[];return e},o.prototype.map=function(t,e){var i=[];if(this._data){var o,n=this._options.filter;o=e&&e.filter?n?function(t){return n(t)&&e.filter(t)}:e.filter:n,i=this._data.map(t,{filter:o,order:e&&e.order})}else i=[];return i},o.prototype.getDataSet=function(){for(var t=this;t instanceof o;)t=t._data;return t||null},o.prototype._onEvent=function(t,e,i){var o,n,s,r,a=e&&e.items,h=this._data,d=[],l=[],c=[],u=[];if(a&&h){switch(t){case"add":for(o=0,n=a.length;n>o;o++)s=a[o],r=this.get(s),r&&(this._ids[s]=!0,l.push(s));break;case"update":for(o=0,n=a.length;n>o;o++)s=a[o],r=this.get(s),r?this._ids[s]?(c.push(s),d.push(e.data[o])):(this._ids[s]=!0,l.push(s)):this._ids[s]&&(delete this._ids[s],u.push(s));break;case"remove":for(o=0,n=a.length;n>o;o++)s=a[o],this._ids[s]&&(delete this._ids[s],u.push(s))}this.length+=l.length-u.length,l.length&&this._trigger("add",{items:l},i),c.length&&this._trigger("update",{items:c,data:d},i),u.length&&this._trigger("remove",{items:u},i)}},o.prototype.on=s.prototype.on,o.prototype.off=s.prototype.off,o.prototype._trigger=s.prototype._trigger,o.prototype.subscribe=o.prototype.on,o.prototype.unsubscribe=o.prototype.off,t.exports=o},function(t,e,i){function o(t,e,i){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");this.containerElement=t,this.width="400px",this.height="400px",this.margin=10,this.defaultXCenter="55%",this.defaultYCenter="50%",this.xLabel="x",this.yLabel="y",this.zLabel="z";var n=function(t){return t};this.xValueLabel=n,this.yValueLabel=n,this.zValueLabel=n,this.filterLabel="time",this.legendLabel="value",this.style=o.STYLE.DOT,this.showPerspective=!0,this.showGrid=!0,this.keepAspectRatio=!0,this.showShadow=!1,this.showGrayBottom=!1,this.showTooltip=!1,this.verticalRatio=.5,this.animationInterval=1e3,this.animationPreload=!1,this.camera=new p,this.camera.setArmRotation(1,.5),this.camera.setArmLength(1.7),this.eye=new c(0,0,-1),this.dataTable=null,this.dataPoints=null,this.colX=void 0,this.colY=void 0,this.colZ=void 0,this.colValue=void 0,this.colFilter=void 0,this.xMin=0,this.xStep=void 0,this.xMax=1,this.yMin=0,this.yStep=void 0,this.yMax=1,this.zMin=0,this.zStep=void 0,this.zMax=1,this.valueMin=0,this.valueMax=1,this.xBarWidth=1,this.yBarWidth=1,this.axisColor="#4D4D4D",this.gridColor="#D3D3D3",this.dataColor={fill:"#7DC1FF",stroke:"#3267D2",strokeWidth:1},this.dotSizeRatio=.02,this.create(),this.setOptions(i),e&&this.setData(e)}function n(t){return"clientX"in t?t.clientX:t.targetTouches[0]&&t.targetTouches[0].clientX||0}function s(t){return"clientY"in t?t.clientY:t.targetTouches[0]&&t.targetTouches[0].clientY||0}var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a=i(12),h=i(8),d=i(10),l=i(1),c=i(13),u=i(14),p=i(15),f=i(16),m=i(17),v=i(18);a(o.prototype),o.prototype._setScale=function(){this.scale=new c(1/(this.xMax-this.xMin),1/(this.yMax-this.yMin),1/(this.zMax-this.zMin)),this.keepAspectRatio&&(this.scale.x3&&(this.colFilter=3);else{if(this.style!==o.STYLE.DOTCOLOR&&this.style!==o.STYLE.DOTSIZE&&this.style!==o.STYLE.BARCOLOR&&this.style!==o.STYLE.BARSIZE)throw'Unknown style "'+this.style+'"';this.colX=0,this.colY=1,this.colZ=2,this.colValue=3,t.getNumberOfColumns()>4&&(this.colFilter=4)}},o.prototype.getNumberOfRows=function(t){return t.length},o.prototype.getNumberOfColumns=function(t){var e=0;for(var i in t[0])t[0].hasOwnProperty(i)&&e++;return e},o.prototype.getDistinctValues=function(t,e){for(var i=[],o=0;ot[o][e]&&(i.min=t[o][e]),i.maxt;t++){var f=(t-u)/(p-u),m=240*f,g=this._hsv2rgb(m,1,1);c.strokeStyle=g,c.beginPath(),c.moveTo(h,r+t),c.lineTo(a,r+t),c.stroke()}c.strokeStyle=this.axisColor,c.strokeRect(h,r,i,s)}if(this.style===o.STYLE.DOTSIZE&&(c.strokeStyle=this.axisColor,c.fillStyle=this.dataColor.fill,c.beginPath(),c.moveTo(h,r),c.lineTo(a,r),c.lineTo(a-i+e,d),c.lineTo(h,d),c.closePath(),c.fill(),c.stroke()),this.style===o.STYLE.DOTCOLOR||this.style===o.STYLE.DOTSIZE){var y=5,b=new v(this.valueMin,this.valueMax,(this.valueMax-this.valueMin)/5,!0);for(b.start(),b.getCurrent()0?this.yMin:this.yMax,n=this._convert3Dto2D(new c(w,r,this.zMin)),Math.cos(2*_)>0?(m.textAlign="center",m.textBaseline="top",n.y+=b):Math.sin(2*_)<0?(m.textAlign="right",m.textBaseline="middle"):(m.textAlign="left",m.textBaseline="middle"),m.fillStyle=this.axisColor,m.fillText(" "+this.xValueLabel(i.getCurrent())+" ",n.x,n.y),i.next()}for(m.lineWidth=1,o=void 0===this.defaultYStep,i=new v(this.yMin,this.yMax,this.yStep,o),i.start(),i.getCurrent()0?this.xMin:this.xMax,n=this._convert3Dto2D(new c(s,i.getCurrent(),this.zMin)),Math.cos(2*_)<0?(m.textAlign="center",m.textBaseline="top",n.y+=b):Math.sin(2*_)>0?(m.textAlign="right",m.textBaseline="middle"):(m.textAlign="left",m.textBaseline="middle"),m.fillStyle=this.axisColor,m.fillText(" "+this.yValueLabel(i.getCurrent())+" ",n.x,n.y),i.next();for(m.lineWidth=1,o=void 0===this.defaultZStep,i=new v(this.zMin,this.zMax,this.zStep,o),i.start(),i.getCurrent()0?this.xMin:this.xMax,r=Math.sin(_)<0?this.yMin:this.yMax;!i.end();)t=this._convert3Dto2D(new c(s,r,i.getCurrent())),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(t.x,t.y),m.lineTo(t.x-b,t.y),m.stroke(),m.textAlign="right",m.textBaseline="middle",m.fillStyle=this.axisColor,m.fillText(this.zValueLabel(i.getCurrent())+" ",t.x-5,t.y),i.next();m.lineWidth=1,t=this._convert3Dto2D(new c(s,r,this.zMin)),e=this._convert3Dto2D(new c(s,r,this.zMax)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(t.x,t.y),m.lineTo(e.x,e.y),m.stroke(),m.lineWidth=1,u=this._convert3Dto2D(new c(this.xMin,this.yMin,this.zMin)),p=this._convert3Dto2D(new c(this.xMax,this.yMin,this.zMin)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(u.x,u.y),m.lineTo(p.x,p.y),m.stroke(),u=this._convert3Dto2D(new c(this.xMin,this.yMax,this.zMin)),p=this._convert3Dto2D(new c(this.xMax,this.yMax,this.zMin)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(u.x,u.y),m.lineTo(p.x,p.y),m.stroke(),m.lineWidth=1,t=this._convert3Dto2D(new c(this.xMin,this.yMin,this.zMin)),e=this._convert3Dto2D(new c(this.xMin,this.yMax,this.zMin)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(t.x,t.y),m.lineTo(e.x,e.y),m.stroke(),t=this._convert3Dto2D(new c(this.xMax,this.yMin,this.zMin)),e=this._convert3Dto2D(new c(this.xMax,this.yMax,this.zMin)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(t.x,t.y),m.lineTo(e.x,e.y),m.stroke();var x=this.xLabel;x.length>0&&(l=.1/this.scale.y,s=(this.xMin+this.xMax)/2,r=Math.cos(_)>0?this.yMin-l:this.yMax+l,n=this._convert3Dto2D(new c(s,r,this.zMin)),Math.cos(2*_)>0?(m.textAlign="center",m.textBaseline="top"):Math.sin(2*_)<0?(m.textAlign="right",m.textBaseline="middle"):(m.textAlign="left",m.textBaseline="middle"),m.fillStyle=this.axisColor,m.fillText(x,n.x,n.y));var k=this.yLabel;k.length>0&&(d=.1/this.scale.x,s=Math.sin(_)>0?this.xMin-d:this.xMax+d,r=(this.yMin+this.yMax)/2,n=this._convert3Dto2D(new c(s,r,this.zMin)),Math.cos(2*_)<0?(m.textAlign="center",m.textBaseline="top"):Math.sin(2*_)>0?(m.textAlign="right",m.textBaseline="middle"):(m.textAlign="left",m.textBaseline="middle"),m.fillStyle=this.axisColor,m.fillText(k,n.x,n.y));var O=this.zLabel;O.length>0&&(h=30,s=Math.cos(_)>0?this.xMin:this.xMax,r=Math.sin(_)<0?this.yMin:this.yMax,a=(this.zMin+this.zMax)/2,n=this._convert3Dto2D(new c(s,r,a)),m.textAlign="right",m.textBaseline="middle",m.fillStyle=this.axisColor,m.fillText(O,n.x-h,n.y))},o.prototype._hsv2rgb=function(t,e,i){var o,n,s,r,a,h;switch(r=i*e,a=Math.floor(t/60),h=r*(1-Math.abs(t/60%2-1)),a){case 0:o=r,n=h,s=0;break;case 1:o=h,n=r,s=0;break;case 2:o=0,n=r,s=h;break;case 3:o=0,n=h,s=r;break;case 4:o=h,n=0,s=r;break;case 5:o=r,n=0,s=h;break;default:o=0,n=0,s=0}return"RGB("+parseInt(255*o)+","+parseInt(255*n)+","+parseInt(255*s)+")"},o.prototype._redrawDataGrid=function(){var t,e,i,n,s,r,a,h,d,l,u,p,f=this.frame.canvas,m=f.getContext("2d");if(m.lineJoin="round",m.lineCap="round",!(void 0===this.dataPoints||this.dataPoints.length<=0)){for(s=0;s0}else r=!0;r?(p=(t.point.z+e.point.z+i.point.z+n.point.z)/4,d=240*(1-(p-this.zMin)*this.scale.z/this.verticalRatio),l=1,this.showShadow?(u=Math.min(1+x.x/k/2,1),a=this._hsv2rgb(d,l,u),h=a):(u=1,a=this._hsv2rgb(d,l,u),h=this.axisColor)):(a="gray",h=this.axisColor),m.lineWidth=this._getStrokeWidth(t),m.fillStyle=a,m.strokeStyle=h,m.beginPath(),m.moveTo(t.screen.x,t.screen.y),m.lineTo(e.screen.x,e.screen.y),m.lineTo(n.screen.x,n.screen.y),m.lineTo(i.screen.x,i.screen.y),m.closePath(),m.fill(),m.stroke()}}else for(s=0;su&&(u=0);var p,f,m;this.style===o.STYLE.DOTCOLOR?(p=240*(1-(d.point.value-this.valueMin)*this.scale.value),f=this._hsv2rgb(p,1,1),m=this._hsv2rgb(p,1,.8)):this.style===o.STYLE.DOTSIZE?(f=this.dataColor.fill,m=this.dataColor.stroke):(p=240*(1-(d.point.z-this.zMin)*this.scale.z/this.verticalRatio),f=this._hsv2rgb(p,1,1),m=this._hsv2rgb(p,1,.8)),i.lineWidth=this._getStrokeWidth(d),i.strokeStyle=m,i.fillStyle=f,i.beginPath(),i.arc(d.screen.x,d.screen.y,u,0,2*Math.PI,!0),i.fill(),i.stroke()}}},o.prototype._redrawDataBar=function(){var t,e,i,n,s=this.frame.canvas,r=s.getContext("2d");if(!(void 0===this.dataPoints||this.dataPoints.length<=0)){for(t=0;t0){for(t=this.dataPoints[0],o.lineWidth=this._getStrokeWidth(t),o.lineJoin="round",o.lineCap="round",o.strokeStyle=this.dataColor.stroke,o.beginPath(),o.moveTo(t.screen.x,t.screen.y),e=1;e0?1:0>t?-1:0}var o=e[0],n=e[1],s=e[2],r=i((n.x-o.x)*(t.y-o.y)-(n.y-o.y)*(t.x-o.x)),a=i((s.x-n.x)*(t.y-n.y)-(s.y-n.y)*(t.x-n.x)),h=i((o.x-s.x)*(t.y-s.y)-(o.y-s.y)*(t.x-s.x));return!(0!=r&&0!=a&&r!=a||0!=a&&0!=h&&a!=h||0!=r&&0!=h&&r!=h)},o.prototype._dataPointFromXY=function(t,e){var i,n=100,s=null,r=null,a=null,h=new u(t,e);if(this.style===o.STYLE.BAR||this.style===o.STYLE.BARCOLOR||this.style===o.STYLE.BARSIZE)for(i=this.dataPoints.length-1;i>=0;i--){s=this.dataPoints[i];var d=s.surfaces;if(d)for(var l=d.length-1;l>=0;l--){var c=d[l],p=c.corners,f=[p[0].screen,p[1].screen,p[2].screen],m=[p[2].screen,p[3].screen,p[0].screen];if(this._insideTriangle(h,f)||this._insideTriangle(h,m))return s}}else for(i=0;ib)&&n>b&&(a=b,r=s)}}return r},o.prototype._showTooltip=function(t){var e,i,o;this.tooltip?(e=this.tooltip.dom.content,i=this.tooltip.dom.line,o=this.tooltip.dom.dot):(e=document.createElement("div"),e.style.position="absolute",e.style.padding="10px",e.style.border="1px solid #4d4d4d",e.style.color="#1a1a1a",e.style.background="rgba(255,255,255,0.7)",e.style.borderRadius="2px",e.style.boxShadow="5px 5px 10px rgba(128,128,128,0.5)",i=document.createElement("div"),i.style.position="absolute",i.style.height="40px",i.style.width="0",i.style.borderLeft="1px solid #4d4d4d",o=document.createElement("div"),o.style.position="absolute",o.style.height="0",o.style.width="0",o.style.border="5px solid #4d4d4d",o.style.borderRadius="5px",this.tooltip={dataPoint:null,dom:{content:e,line:i,dot:o}}),this._hideTooltip(),this.tooltip.dataPoint=t,"function"==typeof this.showTooltip?e.innerHTML=this.showTooltip(t.point):e.innerHTML="
"+this.xLabel+":"+t.point.x+"
"+this.yLabel+":"+t.point.y+"
"+this.zLabel+":"+t.point.z+"
",e.style.left="0",e.style.top="0",this.frame.appendChild(e),this.frame.appendChild(i),this.frame.appendChild(o);var n=e.offsetWidth,s=e.offsetHeight,r=i.offsetHeight,a=o.offsetWidth,h=o.offsetHeight,d=t.screen.x-n/2;d=Math.min(Math.max(d,10),this.frame.clientWidth-10-n),i.style.left=t.screen.x+"px",i.style.top=t.screen.y-r+"px",e.style.left=d+"px",e.style.top=t.screen.y-r-s+"px",o.style.left=t.screen.x-a/2+"px",o.style.top=t.screen.y-h/2+"px"},o.prototype._hideTooltip=function(){if(this.tooltip){this.tooltip.dataPoint=null;for(var t in this.tooltip.dom)if(this.tooltip.dom.hasOwnProperty(t)){var e=this.tooltip.dom[t];e&&e.parentNode&&e.parentNode.removeChild(e)}}},t.exports=o},function(t,e){function i(t){return t?o(t):void 0}function o(t){for(var e in i.prototype)t[e]=i.prototype[e];return t}t.exports=i,i.prototype.on=i.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},i.prototype.once=function(t,e){function i(){o.off(t,i),e.apply(this,arguments)}var o=this;return this._callbacks=this._callbacks||{},i.fn=e,this.on(t,i),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks[t];if(!i)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var o,n=0;no;++o)i[o].apply(this,e)}return this},i.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks[t]||[]},i.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e){function i(t,e,i){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0,this.z=void 0!==i?i:0}i.subtract=function(t,e){var o=new i;return o.x=t.x-e.x,o.y=t.y-e.y,o.z=t.z-e.z,o},i.add=function(t,e){var o=new i;return o.x=t.x+e.x,o.y=t.y+e.y,o.z=t.z+e.z,o},i.avg=function(t,e){return new i((t.x+e.x)/2,(t.y+e.y)/2,(t.z+e.z)/2)},i.crossProduct=function(t,e){var o=new i;return o.x=t.y*e.z-t.z*e.y,o.y=t.z*e.x-t.x*e.z,o.z=t.x*e.y-t.y*e.x,o},i.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},t.exports=i},function(t,e){function i(t,e){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0}t.exports=i},function(t,e,i){function o(){this.armLocation=new n,this.armRotation={},this.armRotation.horizontal=0,this.armRotation.vertical=0,this.armLength=1.7,this.cameraLocation=new n,this.cameraRotation=new n(.5*Math.PI,0,0),this.calculateCameraOrientation()}var n=i(13);o.prototype.setArmLocation=function(t,e,i){this.armLocation.x=t,this.armLocation.y=e,this.armLocation.z=i,this.calculateCameraOrientation()},o.prototype.setArmRotation=function(t,e){void 0!==t&&(this.armRotation.horizontal=t),void 0!==e&&(this.armRotation.vertical=e,this.armRotation.vertical<0&&(this.armRotation.vertical=0),this.armRotation.vertical>.5*Math.PI&&(this.armRotation.vertical=.5*Math.PI)),void 0===t&&void 0===e||this.calculateCameraOrientation()},o.prototype.getArmRotation=function(){var t={};return t.horizontal=this.armRotation.horizontal,t.vertical=this.armRotation.vertical,t},o.prototype.setArmLength=function(t){void 0!==t&&(this.armLength=t,this.armLength<.71&&(this.armLength=.71),this.armLength>5&&(this.armLength=5),this.calculateCameraOrientation())},o.prototype.getArmLength=function(){return this.armLength},o.prototype.getCameraLocation=function(){return this.cameraLocation},o.prototype.getCameraRotation=function(){return this.cameraRotation},o.prototype.calculateCameraOrientation=function(){this.cameraLocation.x=this.armLocation.x-this.armLength*Math.sin(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.y=this.armLocation.y-this.armLength*Math.cos(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.z=this.armLocation.z+this.armLength*Math.sin(this.armRotation.vertical),this.cameraRotation.x=Math.PI/2-this.armRotation.vertical,this.cameraRotation.y=0,this.cameraRotation.z=-this.armRotation.horizontal},t.exports=o},function(t,e,i){function o(t,e,i){this.data=t,this.column=e,this.graph=i,this.index=void 0,this.value=void 0,this.values=i.getDistinctValues(t.get(),this.column),this.values.sort(function(t,e){return t>e?1:e>t?-1:0}),this.values.length>0&&this.selectValue(0),this.dataPoints=[],this.loaded=!1,this.onLoadCallback=void 0,i.animationPreload?(this.loaded=!1,this.loadInBackground()):this.loaded=!0}var n=i(10);o.prototype.isLoaded=function(){return this.loaded},o.prototype.getLoadedProgress=function(){for(var t=this.values.length,e=0;this.dataPoints[e];)e++;return Math.round(e/t*100)},o.prototype.getLabel=function(){return this.graph.filterLabel},o.prototype.getColumn=function(){return this.column},o.prototype.getSelectedValue=function(){return void 0!==this.index?this.values[this.index]:void 0},o.prototype.getValues=function(){return this.values},o.prototype.getValue=function(t){if(t>=this.values.length)throw"Error: index out of range";return this.values[t]},o.prototype._getDataPoints=function(t){if(void 0===t&&(t=this.index),void 0===t)return[];var e;if(this.dataPoints[t])e=this.dataPoints[t];else{var i={};i.column=this.column,i.value=this.values[t];var o=new n(this.data,{filter:function(t){return t[i.column]==i.value}}).get();e=this.graph._getDataPoints(o),this.dataPoints[t]=e}return e},o.prototype.setOnLoadCallback=function(t){this.onLoadCallback=t},o.prototype.selectValue=function(t){if(t>=this.values.length)throw"Error: index out of range";this.index=t,this.value=this.values[t]},o.prototype.loadInBackground=function(t){void 0===t&&(t=0);var e=this.graph.frame;if(t0&&(t--,this.setIndex(t))},o.prototype.next=function(){var t=this.getIndex();t0?this.setIndex(0):this.index=void 0},o.prototype.setIndex=function(t){if(!(to&&(o=0),o>this.values.length-1&&(o=this.values.length-1),o},o.prototype.indexToLeft=function(t){var e=parseFloat(this.frame.bar.style.width)-this.frame.slide.clientWidth-10,i=t/(this.values.length-1)*e,o=i+3;return o},o.prototype._onMouseMove=function(t){var e=t.clientX-this.startClientX,i=this.startSlideX+e,o=this.leftToIndex(i);this.setIndex(o),n.preventDefault()},o.prototype._onMouseUp=function(t){this.frame.style.cursor="auto",n.removeEventListener(document,"mousemove",this.onmousemove),n.removeEventListener(document,"mouseup",this.onmouseup),n.preventDefault()},t.exports=o},function(t,e){function i(t,e,i,o){this._start=0,this._end=0,this._step=1,this.prettyStep=!0,this.precision=5,this._current=0,this.setRange(t,e,i,o)}i.prototype.setRange=function(t,e,i,o){this._start=t?t:0,this._end=e?e:0,this.setStep(i,o)},i.prototype.setStep=function(t,e){void 0===t||0>=t||(void 0!==e&&(this.prettyStep=e),this.prettyStep===!0?this._step=i.calculatePrettyStep(t):this._step=t)},i.calculatePrettyStep=function(t){var e=function(t){return Math.log(t)/Math.LN10},i=Math.pow(10,Math.round(e(t))),o=2*Math.pow(10,Math.round(e(t/2))),n=5*Math.pow(10,Math.round(e(t/5))),s=i;return Math.abs(o-t)<=Math.abs(s-t)&&(s=o),Math.abs(n-t)<=Math.abs(s-t)&&(s=n),0>=s&&(s=1),s},i.prototype.getCurrent=function(){return parseFloat(this._current.toPrecision(this.precision))},i.prototype.getStep=function(){return this._step},i.prototype.start=function(){this._current=this._start-this._start%this._step},i.prototype.next=function(){this._current+=this._step},i.prototype.end=function(){return this._current>this._end},t.exports=i},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e,i,o){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!(Array.isArray(i)||i instanceof c||i instanceof u)&&i instanceof Object){var s=o;o=i,i=s}var r=this;this.defaultOptions={start:null,end:null,autoResize:!0,throttleRedraw:0,orientation:{axis:"bottom",item:"bottom"},moment:d,width:null,height:null,maxHeight:null,minHeight:null},this.options=l.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this)},hiddenDates:[],util:{getScale:function(){return r.timeAxis.step.scale},getStep:function(){return r.timeAxis.step.step},toScreen:r._toScreen.bind(r),toGlobalScreen:r._toGlobalScreen.bind(r),toTime:r._toTime.bind(r),toGlobalTime:r._toGlobalTime.bind(r)}},this.range=new p(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new m(this.body),this.timeAxis2=null,this.components.push(this.timeAxis),this.currentTime=new v(this.body),this.components.push(this.currentTime),this.itemSet=new y(this.body),this.components.push(this.itemSet),this.itemsData=null,this.groupsData=null,this.on("tap",function(t){r.emit("click",r.getEventProperties(t))}),this.on("doubletap",function(t){r.emit("doubleClick",r.getEventProperties(t))}),this.dom.root.oncontextmenu=function(t){r.emit("contextmenu",r.getEventProperties(t))},this.fitDone=!1,this.on("changed",function(){if(null!=this.itemsData&&!r.fitDone)if(r.fitDone=!0,void 0!=r.options.start||void 0!=r.options.end){if(void 0==r.options.start||void 0==r.options.end)var t=r.getItemRange();var e=void 0!=r.options.start?r.options.start:t.min,i=void 0!=r.options.end?r.options.end:t.max;r.setWindow(e,i,{animation:!1})}else r.fit({animation:!1})}),o&&this.setOptions(o),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}var s=i(20),r=o(s),a=i(26),h=o(a),d=(i(12),i(22),i(2)),l=i(1),c=i(8),u=i(10),p=i(27),f=i(30),m=i(41),v=i(46),g=i(44),y=i(31),b=i(26).printStyle,_=i(47).allOptions,w=i(47).configureOptions;n.prototype=new f,n.prototype._createConfigurator=function(){return new r["default"](this,this.dom.container,w)},n.prototype.redraw=function(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()},n.prototype.setOptions=function(t){var e=h["default"].validate(t,_);if(e===!0&&console.log("%cErrors have been found in the supplied options object.",b),f.prototype.setOptions.call(this,t),"type"in t&&t.type!==this.options.type){this.options.type=t.type;var i=this.itemsData;if(i){var o=this.getSelection();this.setItems(null),this.setItems(i),this.setSelection(o)}}},n.prototype.setItems=function(t){var e;e=t?t instanceof c||t instanceof u?t:new c(t,{type:{start:"Date",end:"Date"}}):null,this.itemsData=e,this.itemSet&&this.itemSet.setItems(e)},n.prototype.setGroups=function(t){var e;e=t?t instanceof c||t instanceof u?t:new c(t):null,this.groupsData=e,this.itemSet.setGroups(e)},n.prototype.setData=function(t){t&&t.groups&&this.setGroups(t.groups),t&&t.items&&this.setItems(t.items)},n.prototype.setSelection=function(t,e){this.itemSet&&this.itemSet.setSelection(t),e&&e.focus&&this.focus(t,e)},n.prototype.getSelection=function(){return this.itemSet&&this.itemSet.getSelection()||[]},n.prototype.focus=function(t,e){if(this.itemsData&&void 0!=t){var i=Array.isArray(t)?t:[t],o=this.itemsData.getDataSet().get(i,{type:{start:"Date",end:"Date"}}),n=null,s=null;if(o.forEach(function(t){var e=t.start.valueOf(),i="end"in t?t.end.valueOf():t.start.valueOf();(null===n||n>e)&&(n=e),(null===s||i>s)&&(s=i)}),null!==n&&null!==s){var r=(n+s)/2,a=Math.max(this.range.end-this.range.start,1.1*(s-n)),h=e&&void 0!==e.animation?e.animation:!0;this.range.setRange(r-a/2,r+a/2,h)}}},n.prototype.fit=function(t){var e=t&&void 0!==t.animation?t.animation:!0,i=this.getItemRange();this.range.setRange(i.min,i.max,e)},n.prototype.getItemRange=function(){var t=this,e=this.getDataRange(),i=null!==e.min?e.min.valueOf():null,o=null!==e.max?e.max.valueOf():null,n=null,s=null;if(null!=i&&null!=o){var r,a,h,d,c;!function(){var e=function(t){return l.convert(t.data.start,"Date").valueOf()},u=function(t){var e=void 0!=t.data.end?t.data.end:t.data.start;return l.convert(e,"Date").valueOf()};r=o-i,0>=r&&(r=10),a=r/t.props.center.width,l.forEach(t.itemSet.items,function(t){t.show(),t.repositionX();var r=e(t),h=u(t),d=r-(t.getWidthLeft()+10)*a,l=h+(t.getWidthRight()+10)*a;i>d&&(i=d,n=t),l>o&&(o=l,s=t)}.bind(t)),n&&s&&(h=n.getWidthLeft()+10,d=s.getWidthRight()+10,c=t.props.center.width-h-d,c>0&&(i=e(n)-h*r/c,o=u(s)+d*r/c))}()}return{min:null!=i?new Date(i):null,max:null!=o?new Date(o):null}},n.prototype.getDataRange=function(){var t=null,e=null,i=this.itemsData&&this.itemsData.getDataSet();return i&&i.forEach(function(i){var o=l.convert(i.start,"Date").valueOf(),n=l.convert(void 0!=i.end?i.end:i.start,"Date").valueOf();(null===t||t>o)&&(t=o),(null===e||n>e)&&(e=n)}),{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},n.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,o=e-l.getAbsoluteLeft(this.dom.centerContainer),n=i-l.getAbsoluteTop(this.dom.centerContainer),s=this.itemSet.itemFromTarget(t),r=this.itemSet.groupFromTarget(t),a=g.customTimeFromTarget(t),h=this.itemSet.options.snap||null,d=this.body.util.getScale(),c=this.body.util.getStep(),u=this._toTime(o),p=h?h(u,d,c):u,f=l.getTarget(t),m=null;return null!=s?m="item":null!=a?m="custom-time":l.hasParent(f,this.timeAxis.dom.foreground)?m="axis":this.timeAxis2&&l.hasParent(f,this.timeAxis2.dom.foreground)?m="axis":l.hasParent(f,this.itemSet.dom.labelSet)?m="group-label":l.hasParent(f,this.currentTime.bar)?m="current-time":l.hasParent(f,this.dom.center)&&(m="background"),{event:t,item:s?s.id:null,group:r?r.groupId:null,what:m,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:n,time:u,snappedTime:p}},t.exports=n},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},r=function(){function t(t,e){for(var i=0;i0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),i++);this.options.showButton===!0&&!function(){var e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerHTML="generate options",e.onclick=function(){t._printOptions()},e.onmouseover=function(){e.className="vis-configuration vis-config-button hover"},e.onmouseout=function(){e.className="vis-configuration vis-config-button"},t.optionsContainer=document.createElement("div"),t.optionsContainer.className="vis-configuration vis-config-option-container",t.domElements.push(t.optionsContainer),t.domElements.push(e)}(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t1?o-1:0),r=1;o>r;r++)n[r-1]=e[r];return n.forEach(function(t){s.appendChild(t)}),i.domElements.push(s),{v:i.domElements.length}}();if("object"===("undefined"==typeof a?"undefined":s(a)))return a.v}return 0}},{key:"_makeHeader",value:function(t){var e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerHTML=t,this._makeItem([],e)}},{key:"_makeLabel",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=document.createElement("div");return o.className="vis-configuration vis-config-label vis-config-s"+e.length,i===!0?o.innerHTML=""+t+":":o.innerHTML=t+":",o}},{key:"_makeDropdown",value:function(t,e,i){var o=document.createElement("select");o.className="vis-configuration vis-config-select";var n=0;void 0!==e&&-1!==t.indexOf(e)&&(n=t.indexOf(e));for(var s=0;se&&n>e*c?(a.min=Math.ceil(e*c),l=a.min,d="range increased"):n>e/c&&(a.min=Math.ceil(e/c),l=a.min,d="range increased"),e*c>s&&1!==s&&(a.max=Math.ceil(e*c),l=a.max,d="range increased"),a.value=e}else a.value=o;var u=document.createElement("input");u.className="vis-configuration vis-config-rangeinput",u.value=a.value;var p=this;a.onchange=function(){u.value=this.value,p._update(Number(this.value),i)},a.oninput=function(){u.value=this.value};var f=this._makeLabel(i[i.length-1],i),m=this._makeItem(i,f,a,u);""!==d&&this.popupHistory[m]!==l&&(this.popupHistory[m]=l,this._setupPopup(d,m))}},{key:"_setupPopup",value:function(t,e){var i=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCountervar options = "+JSON.stringify(t,null,2)+""}},{key:"getOptions",value:function(){for(var t={},e=0;es;s++)for(r=0;rp?p+1:p;var f=l/this.r,m=a.RGBToHSV(this.color.r,this.color.g,this.color.b);m.h=p,m.s=f;var v=a.HSVToRGB(m.h,m.s,m.v);v.a=this.color.a,this.color=v,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+")"}}]),t}();e["default"]=h},function(t,e,i){if("undefined"!=typeof window){var o=i(23),n=window.Hammer||i(24);t.exports=o(n,{preventDefault:"mouse"})}else t.exports=function(){throw Error("hammer.js is only available in a browser, not in node.js.")}},function(t,e,i){var o,n,s;!function(i){n=[],o=i,s="function"==typeof o?o.apply(e,n):o,!(void 0!==s&&(t.exports=s))}(function(){var t=null;return function e(i,o){function n(t){return t.match(/[^ ]+/g)}function s(e){if("hammer.input"!==e.type){if(e.srcEvent._handled||(e.srcEvent._handled={}),e.srcEvent._handled[e.type])return;e.srcEvent._handled[e.type]=!0}var i=!1;e.stopPropagation=function(){i=!0};var o=e.srcEvent.stopPropagation.bind(e.srcEvent);"function"==typeof o&&(e.srcEvent.stopPropagation=function(){o(),e.stopPropagation()}),e.firstTarget=t;for(var n=t;n&&!i;){var s=n.hammer;if(s)for(var r,a=0;a0?d._handlers[t]=o:(i.off(t,s),delete d._handlers[t]))}),d},d.emit=function(e,o){t=o.target,i.emit(e,o)},d.destroy=function(){var t=i.element.hammer,e=t.indexOf(d);-1!==e&&t.splice(e,1),t.length||delete i.element.hammer,d._handlers={},i.destroy()},d}})},function(t,e,i){var o;!function(n,s,r,a){function h(t,e,i){return setTimeout(p(t,i),e)}function d(t,e,i){return Array.isArray(t)?(l(t,i[e],i),!0):!1}function l(t,e,i){var o;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==a)for(o=0;o\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=n.console&&(n.console.warn||n.console.log);return s&&s.call(n.console,o,i),t.apply(this,arguments)}}function u(t,e,i){var o,n=e.prototype;o=t.prototype=Object.create(n),o.constructor=t,o._super=n,i&&ct(o,i)}function p(t,e){return function(){return t.apply(e,arguments)}}function f(t,e){return typeof t==ft?t.apply(e?e[0]||a:a,e):t}function m(t,e){return t===a?e:t}function v(t,e,i){l(_(e),function(e){t.addEventListener(e,i,!1)})}function g(t,e,i){l(_(e),function(e){t.removeEventListener(e,i,!1)})}function y(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function b(t,e){return t.indexOf(e)>-1}function _(t){return t.trim().split(/\s+/g)}function w(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;oi[e]}):o.sort()),o}function O(t,e){for(var i,o,n=e[0].toUpperCase()+e.slice(1),s=0;s1&&!i.firstMultiple?i.firstMultiple=N(e):1===n&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,h=e.center=z(o);e.timeStamp=gt(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=B(a,h),e.distance=A(a,h),P(i,e),e.offsetDirection=R(e.deltaX,e.deltaY);var d=L(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=d.x,e.overallVelocityY=d.y,e.overallVelocity=vt(d.x)>vt(d.y)?d.x:d.y,e.scale=r?j(r.pointers,o):1,e.rotation=r?F(r.pointers,o):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,I(i,e);var l=t.element;y(e.srcEvent.target,l)&&(l=e.srcEvent.target),e.target=l}function P(t,e){var i=e.center,o=t.offsetDelta||{},n=t.prevDelta||{},s=t.prevInput||{};e.eventType!==Et&&s.eventType!==It||(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)}function I(t,e){var i,o,n,s,r=t.lastInterval||e,h=e.timeStamp-r.timeStamp;if(e.eventType!=Nt&&(h>Tt||r.velocity===a)){var d=e.deltaX-r.deltaX,l=e.deltaY-r.deltaY,c=L(h,d,l);o=c.x,n=c.y,i=vt(c.x)>vt(c.y)?c.x:c.y,s=R(d,l),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}function N(t){for(var e=[],i=0;in;)i+=t[n].clientX,o+=t[n].clientY,n++;return{x:mt(i/e),y:mt(o/e)}}function L(t,e,i){return{x:e/t||0,y:i/t||0}}function R(t,e){return t===e?zt:vt(t)>=vt(e)?0>t?Lt:Rt:0>e?At:Bt}function A(t,e,i){i||(i=Wt);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return Math.sqrt(o*o+n*n)}function B(t,e,i){i||(i=Wt);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return 180*Math.atan2(n,o)/Math.PI}function F(t,e){return B(e[1],e[0],Yt)+B(t[1],t[0],Yt)}function j(t,e){return A(e[0],e[1],Yt)/A(t[0],t[1],Yt)}function H(){this.evEl=Vt,this.evWin=Ut,this.allow=!0,this.pressed=!1,S.apply(this,arguments)}function W(){this.evEl=Zt,this.evWin=Kt,S.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function Y(){this.evTarget=Qt,this.evWin=$t,this.started=!1,S.apply(this,arguments)}function G(t,e){var i=x(t.touches),o=x(t.changedTouches);return e&(It|Nt)&&(i=k(i.concat(o),"identifier",!0)),[i,o]}function V(){this.evTarget=ee,this.targetIds={},S.apply(this,arguments)}function U(t,e){var i=x(t.touches),o=this.targetIds;if(e&(Et|Pt)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var n,s,r=x(t.changedTouches),a=[],h=this.target;if(s=i.filter(function(t){return y(t.target,h)}),e===Et)for(n=0;na&&(e.push(t),a=e.length-1):n&(It|Nt)&&(i=!0),0>a||(e[a]=t,this.callback(this.manager,n,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),i&&e.splice(a,1))}});var Jt={touchstart:Et,touchmove:Pt,touchend:It,touchcancel:Nt},Qt="touchstart",$t="touchstart touchmove touchend touchcancel";u(Y,S,{handler:function(t){var e=Jt[t.type];if(e===Et&&(this.started=!0),this.started){var i=G.call(this,t,e);e&(It|Nt)&&i[0].length-i[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Mt,srcEvent:t})}}});var te={touchstart:Et,touchmove:Pt,touchend:It,touchcancel:Nt},ee="touchstart touchmove touchend touchcancel";u(V,S,{handler:function(t){var e=te[t.type],i=U.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Mt,srcEvent:t})}}),u(q,S,{handler:function(t,e,i){var o=i.pointerType==Mt,n=i.pointerType==St;if(o)this.mouse.allow=!1;else if(n&&!this.mouse.allow)return;e&(It|Nt)&&(this.mouse.allow=!0),this.callback(t,e,i)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var ie=O(pt.style,"touchAction"),oe=ie!==a,ne="compute",se="auto",re="manipulation",ae="none",he="pan-x",de="pan-y";X.prototype={set:function(t){t==ne&&(t=this.compute()),oe&&this.manager.element.style&&(this.manager.element.style[ie]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return l(this.manager.recognizers,function(e){f(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),Z(t.join(" "))},preventDefaults:function(t){if(!oe){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)return void e.preventDefault();var o=this.actions,n=b(o,ae),s=b(o,de),r=b(o,he);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&Ft||r&&i&jt?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var le=1,ce=2,ue=4,pe=8,fe=pe,me=16,ve=32;K.prototype={defaults:{},set:function(t){return ct(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(d(t,"recognizeWith",this))return this;var e=this.simultaneous;return t=$(t,this),e[t.id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return d(t,"dropRecognizeWith",this)?this:(t=$(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(d(t,"requireFailure",this))return this;var e=this.requireFail;return t=$(t,this),-1===w(e,t)&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(d(t,"dropRequireFailure",this))return this;t=$(t,this);var e=w(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){i.manager.emit(e,t)}var i=this,o=this.state;pe>o&&e(i.options.event+J(o)),e(i.options.event),t.additionalEvent&&e(t.additionalEvent),o>=pe&&e(i.options.event+J(o))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=ve)},canEmit:function(){for(var t=0;ts?Lt:Rt,i=s!=this.pX,o=Math.abs(t.deltaX)):(n=0===r?zt:0>r?At:Bt,i=r!=this.pY,o=Math.abs(t.deltaY))),t.direction=n,i&&o>e.threshold&&n&e.direction},attrTest:function(t){return tt.prototype.attrTest.call(this,t)&&(this.state&ce||!(this.state&ce)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Q(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),u(it,tt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ae]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ce)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),u(ot,K,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[se]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distancee.time;if(this._input=t,!o||!i||t.eventType&(It|Nt)&&!n)this.reset();else if(t.eventType&Et)this.reset(),this._timer=h(function(){this.state=fe,this.tryEmit()},e.time,this);else if(t.eventType&It)return fe;return ve},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===fe&&(t&&t.eventType&It?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=gt(),this.manager.emit(this.options.event,this._input)))}}),u(nt,tt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ae]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ce)}}),u(st,tt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ft|jt,pointers:1},getTouchAction:function(){return et.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Ft|jt)?e=t.overallVelocity:i&Ft?e=t.overallVelocityX:i&jt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&vt(e)>this.options.velocity&&t.eventType&It},emit:function(t){var e=Q(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),u(rt,K,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[re]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distances.distance?console.log('%cUnknown option detected: "'+e+'" in '+t.printLocation(n.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(s.path,s.closestMatch,""),d):n.distance<=r?console.log('%cUnknown option detected: "'+e+'". Did you mean "'+n.closestMatch+'"?'+t.printLocation(n.path,e),d):console.log('%cUnknown option detected: "'+e+'". Did you mean one of these: '+t.print(Object.keys(i))+t.printLocation(o,e),d),a=!0}},{key:"findInOptions",value:function(e,i,o){var n=arguments.length<=3||void 0===arguments[3]?!1:arguments[3],s=1e9,a="",h=[],d=e.toLowerCase(),l=void 0;for(var c in i){var u=void 0;if(void 0!==i[c].__type__&&n===!0){var p=t.findInOptions(e,i[c],r.copyAndExtendArray(o,c));s>p.distance&&(a=p.closestMatch,h=p.path,s=p.distance,l=p.indexMatch)}else-1!==c.toLowerCase().indexOf(d)&&(l=c),u=t.levenshteinDistance(e,c),s>u&&(a=c,h=r.copyArray(o),s=u)}return{closestMatch:a,path:h,distance:s,indexMatch:l}}},{key:"printLocation",value:function(t,e){for(var i=arguments.length<=2||void 0===arguments[2]?"Problem value found at: \n":arguments[2],o="\n\n"+i+"options = {\n",n=0;ns;s++)o+=" ";o+=t[n]+": {\n"}for(var r=0;ru,a=r||null===n?n:d+(n-d)*i,p=r||null===s?s:c+(s-c)*i;y=h._applyRange(a,p),l.updateHiddenDates(h.options.moment,h.body,h.options.hiddenDates),v=v||y,y&&h.body.emitter.emit("rangechange",{start:new Date(h.start),end:new Date(h.end),byUser:o}),r?v&&h.body.emitter.emit("rangechanged",{start:new Date(h.start),end:new Date(h.end),byUser:o}):h.animationTimer=setTimeout(_,20)}};return g()}var y=this._applyRange(n,s);if(l.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),y){var b={start:new Date(this.start),end:new Date(this.end),byUser:o};this.body.emitter.emit("rangechange",b),this.body.emitter.emit("rangechanged",b)}},o.prototype._cancelAnimation=function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)},o.prototype._applyRange=function(t,e){var i,o=null!=t?a.convert(t,"Date").valueOf():this.start,n=null!=e?a.convert(e,"Date").valueOf():this.end,s=null!=this.options.max?a.convert(this.options.max,"Date").valueOf():null,r=null!=this.options.min?a.convert(this.options.min,"Date").valueOf():null;if(isNaN(o)||null===o)throw new Error('Invalid start "'+t+'"');if(isNaN(n)||null===n)throw new Error('Invalid end "'+e+'"');if(o>n&&(n=o),null!==r&&r>o&&(i=r-o,o+=i,n+=i,null!=s&&n>s&&(n=s)),null!==s&&n>s&&(i=n-s,o-=i,n-=i,null!=r&&r>o&&(o=r)),null!==this.options.zoomMin){var h=parseFloat(this.options.zoomMin);0>h&&(h=0),h>n-o&&(this.end-this.start===h&&o>this.start&&nd&&(d=0),n-o>d&&(this.end-this.start===d&&othis.end?(o=this.start,n=this.end):(i=n-o-d,o+=i/2,n-=i/2))}var l=this.start!=o||this.end!=n;return o>=this.start&&o<=this.end||n>=this.start&&n<=this.end||this.start>=o&&this.start<=n||this.end>=o&&this.end<=n||this.body.emitter.emit("checkRangedItems"),this.start=o,this.end=n,l},o.prototype.getRange=function(){return{start:this.start,end:this.end}},o.prototype.conversion=function(t,e){return o.conversion(this.start,this.end,t,e)},o.conversion=function(t,e,i,o){return void 0===o&&(o=0),0!=i&&e-t!=0?{offset:t,scale:i/(e-t-o)}:{offset:0,scale:1}},o.prototype._onDragStart=function(t){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this._isInsideRange(t)&&this.props.touch.allowDragging&&(this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.dragging=!0,this.body.dom.root&&(this.body.dom.root.style.cursor="move"))},o.prototype._onDrag=function(t){if(this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging){var e=this.options.direction;n(e);var i="horizontal"==e?t.deltaX:t.deltaY;i-=this.deltaDifference;var o=this.props.touch.end-this.props.touch.start,s=l.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end);o-=s;var r="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height,a=-i/r*o,h=this.props.touch.start+a,d=this.props.touch.end+a,c=l.snapAwayFromHidden(this.body.hiddenDates,h,this.previousDelta-i,!0),u=l.snapAwayFromHidden(this.body.hiddenDates,d,this.previousDelta-i,!0);if(c!=h||u!=d)return this.deltaDifference+=i,this.props.touch.start=c,this.props.touch.end=u,void this._onDrag(t);this.previousDelta=i,this._applyRange(h,d);var p=new Date(this.start),f=new Date(this.end);this.body.emitter.emit("rangechange",{start:p,end:f,byUser:!0})}},o.prototype._onDragEnd=function(t){this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging&&(this.props.touch.dragging=!1,this.body.dom.root&&(this.body.dom.root.style.cursor="auto"),this.body.emitter.emit("rangechanged",{start:new Date(this.start),end:new Date(this.end),byUser:!0}))},o.prototype._onMouseWheel=function(t){if(this.options.zoomable&&this.options.moveable&&this._isInsideRange(t)&&(!this.options.zoomKey||t[this.options.zoomKey])){var e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),e){var i;i=0>e?1-e/5:1/(1+e/5);var o=s({x:t.clientX,y:t.clientY},this.body.dom.center),n=this._pointerToDate(o);this.zoom(i,n,e)}t.preventDefault()}},o.prototype._onTouch=function(t){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.scaleOffset=0,this.deltaDifference=0},o.prototype._onPinch=function(t){if(this.options.zoomable&&this.options.moveable){this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=s(t.center,this.body.dom.center));var e=1/(t.scale+this.scaleOffset),i=this._pointerToDate(this.props.touch.center),o=l.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),n=l.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,i),r=o-n,a=i-n+(this.props.touch.start-(i-n))*e,h=i+r+(this.props.touch.end-(i+r))*e;this.startToFront=0>=1-e,this.endToFront=0>=e-1;var d=l.snapAwayFromHidden(this.body.hiddenDates,a,1-e,!0),c=l.snapAwayFromHidden(this.body.hiddenDates,h,e-1,!0);d==a&&c==h||(this.props.touch.start=d,this.props.touch.end=c,this.scaleOffset=1-t.scale,a=d,h=c),this.setRange(a,h,!1,!0),this.startToFront=!1,this.endToFront=!0}},o.prototype._isInsideRange=function(t){var e=t.center?t.center.x:t.clientX,i=e-a.getAbsoluteLeft(this.body.dom.centerContainer),o=this.body.util.toTime(i);return o>=this.start&&o<=this.end},o.prototype._pointerToDate=function(t){var e,i=this.options.direction;if(n(i),"horizontal"==i)return this.body.util.toTime(t.x).valueOf();var o=this.body.domProps.center.height;return e=this.conversion(o),t.y/e.scale+e.offset},o.prototype.zoom=function(t,e,i){null==e&&(e=(this.start+this.end)/2);var o=l.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),n=l.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,e),s=o-n,r=e-n+(this.start-(e-n))*t,a=e+s+(this.end-(e+s))*t;this.startToFront=!(i>0),this.endToFront=!(-i>0);var h=l.snapAwayFromHidden(this.body.hiddenDates,r,i,!0),d=l.snapAwayFromHidden(this.body.hiddenDates,a,-i,!0);h==r&&d==a||(r=h,a=d),this.setRange(r,a,!1,!0),this.startToFront=!1,this.endToFront=!0},o.prototype.move=function(t){var e=this.end-this.start,i=this.start+e*t,o=this.end+e*t;this.start=i,this.end=o},o.prototype.moveTo=function(t){var e=(this.start+this.end)/2,i=e-t,o=this.start-i,n=this.end-i;this.setRange(o,n)},t.exports=o},function(t,e){function i(t,e){this.options=null,this.props=null}i.prototype.setOptions=function(t){t&&util.extend(this.options,t)},i.prototype.redraw=function(){return!1},i.prototype.destroy=function(){},i.prototype._isResized=function(){var t=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;return this.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,t},t.exports=i},function(t,e){e.convertHiddenOptions=function(t,i,o){if(o&&!Array.isArray(o))return e.convertHiddenOptions(t,i,[o]);if(i.hiddenDates=[],o&&1==Array.isArray(o)){for(var n=0;n=4*a){var u=0,p=s.clone();switch(o[h].repeat){case"daily":d.day()!=l.day()&&(u=1),d.dayOfYear(n.dayOfYear()),d.year(n.year()),d.subtract(7,"days"),l.dayOfYear(n.dayOfYear()),l.year(n.year()),l.subtract(7-u,"days"),p.add(1,"weeks");break;case"weekly":var f=l.diff(d,"days"),m=d.day();d.date(n.date()),d.month(n.month()),d.year(n.year()),l=d.clone(),d.day(m),l.day(m),l.add(f,"days"),d.subtract(1,"weeks"),l.subtract(1,"weeks"),p.add(1,"weeks");break;case"monthly":d.month()!=l.month()&&(u=1),d.month(n.month()),d.year(n.year()),d.subtract(1,"months"),l.month(n.month()),l.year(n.year()),l.subtract(1,"months"),l.add(u,"months"),p.add(1,"months");break;case"yearly":d.year()!=l.year()&&(u=1),d.year(n.year()),d.subtract(1,"years"),l.year(n.year()),l.subtract(1,"years"),l.add(u,"years"),p.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",o[h].repeat)}for(;p>d;)switch(i.hiddenDates.push({start:d.valueOf(),end:l.valueOf()}),o[h].repeat){case"daily":d.add(1,"days"),l.add(1,"days");break;case"weekly":d.add(1,"weeks"),l.add(1,"weeks");break;case"monthly":d.add(1,"months"),l.add(1,"months");break;case"yearly":d.add(1,"y"),l.add(1,"y");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",o[h].repeat)}i.hiddenDates.push({start:d.valueOf(),end:l.valueOf()})}}e.removeDuplicates(i);var v=e.isHidden(i.range.start,i.hiddenDates),g=e.isHidden(i.range.end,i.hiddenDates),y=i.range.start,b=i.range.end;1==v.hidden&&(y=1==i.range.startToFront?v.startDate-1:v.endDate+1),1==g.hidden&&(b=1==i.range.endToFront?g.startDate-1:g.endDate+1),1!=v.hidden&&1!=g.hidden||i.range._applyRange(y,b)}},e.removeDuplicates=function(t){for(var e=t.hiddenDates,i=[],o=0;o=e[o].start&&e[n].end<=e[o].end?e[n].remove=!0:e[n].start>=e[o].start&&e[n].start<=e[o].end?(e[o].end=e[n].end,e[n].remove=!0):e[n].end>=e[o].start&&e[n].end<=e[o].end&&(e[o].start=e[n].start,e[n].remove=!0));for(var o=0;o=r&&a>n){o=!0;break}}if(1==o&&n=e&&i>r&&(o+=r-s)}return o},e.correctTimeForHidden=function(t,i,o,n){return n=t(n).toDate().valueOf(),n-=e.getHiddenDurationBefore(t,i,o,n)},e.getHiddenDurationBefore=function(t,e,i,o){var n=0;o=t(o).toDate().valueOf();for(var s=0;s=i.start&&a=a&&(n+=a-r)}return n},e.getAccumulatedHiddenDuration=function(t,e,i){for(var o=0,n=0,s=e.start,r=0;r=e.start&&h=i)break;o+=h-a}}return o},e.snapAwayFromHidden=function(t,i,o,n){var s=e.isHidden(i,t);return 1==s.hidden?0>o?1==n?s.startDate-(s.endDate-i)-1:s.startDate-1:1==n?s.endDate+(i-s.startDate)+1:s.endDate+1:i},e.isHidden=function(t,e){for(var i=0;i=o&&n>t)return{hidden:!0,startDate:o,endDate:n}}return{hidden:!1,startDate:o,endDate:n}}},function(t,e,i){function o(){}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s=i(12),r=i(22),a=i(25),h=i(1),d=(i(8),i(10),i(27),i(31),i(41)),l=i(42),c=i(29),u=i(44);s(o.prototype),o.prototype._create=function(t){function e(t){i.isActive()&&i.emit("mousewheel",t)}this.dom={},this.dom.container=t,this.dom.root=document.createElement("div"),this.dom.background=document.createElement("div"), +this.dom.backgroundVertical=document.createElement("div"),this.dom.backgroundHorizontal=document.createElement("div"),this.dom.centerContainer=document.createElement("div"),this.dom.leftContainer=document.createElement("div"),this.dom.rightContainer=document.createElement("div"),this.dom.center=document.createElement("div"),this.dom.left=document.createElement("div"),this.dom.right=document.createElement("div"),this.dom.top=document.createElement("div"),this.dom.bottom=document.createElement("div"),this.dom.shadowTop=document.createElement("div"),this.dom.shadowBottom=document.createElement("div"),this.dom.shadowTopLeft=document.createElement("div"),this.dom.shadowBottomLeft=document.createElement("div"),this.dom.shadowTopRight=document.createElement("div"),this.dom.shadowBottomRight=document.createElement("div"),this.dom.root.className="vis-timeline",this.dom.background.className="vis-panel vis-background",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical",this.dom.backgroundHorizontal.className="vis-panel vis-background vis-horizontal",this.dom.centerContainer.className="vis-panel vis-center",this.dom.leftContainer.className="vis-panel vis-left",this.dom.rightContainer.className="vis-panel vis-right",this.dom.top.className="vis-panel vis-top",this.dom.bottom.className="vis-panel vis-bottom",this.dom.left.className="vis-content",this.dom.center.className="vis-content",this.dom.right.className="vis-content",this.dom.shadowTop.className="vis-shadow vis-top",this.dom.shadowBottom.className="vis-shadow vis-bottom",this.dom.shadowTopLeft.className="vis-shadow vis-top",this.dom.shadowBottomLeft.className="vis-shadow vis-bottom",this.dom.shadowTopRight.className="vis-shadow vis-top",this.dom.shadowBottomRight.className="vis-shadow vis-bottom",this.dom.root.appendChild(this.dom.background),this.dom.root.appendChild(this.dom.backgroundVertical),this.dom.root.appendChild(this.dom.backgroundHorizontal),this.dom.root.appendChild(this.dom.centerContainer),this.dom.root.appendChild(this.dom.leftContainer),this.dom.root.appendChild(this.dom.rightContainer),this.dom.root.appendChild(this.dom.top),this.dom.root.appendChild(this.dom.bottom),this.dom.centerContainer.appendChild(this.dom.center),this.dom.leftContainer.appendChild(this.dom.left),this.dom.rightContainer.appendChild(this.dom.right),this.dom.centerContainer.appendChild(this.dom.shadowTop),this.dom.centerContainer.appendChild(this.dom.shadowBottom),this.dom.leftContainer.appendChild(this.dom.shadowTopLeft),this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft),this.dom.rightContainer.appendChild(this.dom.shadowTopRight),this.dom.rightContainer.appendChild(this.dom.shadowBottomRight),this.on("rangechange",function(){this.initialDrawDone===!0&&this._redraw()}.bind(this)),this.on("touch",this._onTouch.bind(this)),this.on("pan",this._onDrag.bind(this));var i=this;this.on("_change",function(t){t&&1==t.queue?i._redrawTimer||(i._redrawTimer=setTimeout(function(){i._redrawTimer=null,i._redraw()},0)):i._redraw()}),this.hammer=new r(this.dom.root);var o=this.hammer.get("pinch").set({enable:!0});a.disablePreventDefaultVertically(o),this.hammer.get("pan").set({threshold:5,direction:r.DIRECTION_HORIZONTAL}),this.listeners={};var n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];if(n.forEach(function(t){var e=function(e){i.isActive()&&i.emit(t,e)};i.hammer.on(t,e),i.listeners[t]=e}),a.onTouch(this.hammer,function(t){i.emit("touch",t)}.bind(this)),a.onRelease(this.hammer,function(t){i.emit("release",t)}.bind(this)),this.dom.root.addEventListener("mousewheel",e),this.dom.root.addEventListener("DOMMouseScroll",e),this.props={root:{},background:{},centerContainer:{},leftContainer:{},rightContainer:{},center:{},left:{},right:{},top:{},bottom:{},border:{},scrollTop:0,scrollTopMin:0},this.customTimes=[],this.touch={},this.redrawCount=0,this.initialDrawDone=!1,!t)throw new Error("No container provided");t.appendChild(this.dom.root)},o.prototype.setOptions=function(t){if(t){var e=["width","height","minHeight","maxHeight","autoResize","start","end","clickToUse","dataAttributes","hiddenDates","locale","locales","moment","throttleRedraw"];if(h.selectiveExtend(e,this.options,t),this.options.orientation={item:void 0,axis:void 0},"orientation"in t&&("string"==typeof t.orientation?this.options.orientation={item:t.orientation,axis:t.orientation}:"object"===n(t.orientation)&&("item"in t.orientation&&(this.options.orientation.item=t.orientation.item),"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis))),"both"===this.options.orientation.axis){if(!this.timeAxis2){var i=this.timeAxis2=new d(this.body);i.setOptions=function(t){var e=t?h.extend({},t):{};e.orientation="top",d.prototype.setOptions.call(i,e)},this.components.push(i)}}else if(this.timeAxis2){var o=this.components.indexOf(this.timeAxis2);-1!==o&&this.components.splice(o,1),this.timeAxis2.destroy(),this.timeAxis2=null}if("function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),"hiddenDates"in this.options&&c.convertHiddenOptions(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new l(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),"showCustomTime"in t)throw new Error("Option `showCustomTime` is deprecated. Create a custom time bar via timeline.addCustomTime(time [, id])");this._initAutoResize()}if(this.components.forEach(function(e){return e.setOptions(t)}),"configure"in t){this.configurator||(this.configurator=this._createConfigurator()),this.configurator.setOptions(t.configure);var s=h.deepExtend({},this.options);this.components.forEach(function(t){h.deepExtend(s,t.options)}),this.configurator.setModuleOptions({global:s})}this._origRedraw?this._redraw():(this._origRedraw=this._redraw.bind(this),this._redraw=h.throttle(this._origRedraw,this.options.throttleRedraw))},o.prototype.isActive=function(){return!this.activator||this.activator.active},o.prototype.destroy=function(){this.setItems(null),this.setGroups(null),this.off(),this._stopAutoResize(),this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root),this.dom=null,this.activator&&(this.activator.destroy(),delete this.activator);for(var t in this.listeners)this.listeners.hasOwnProperty(t)&&delete this.listeners[t];this.listeners=null,this.hammer=null,this.components.forEach(function(t){return t.destroy()}),this.body=null},o.prototype.setCustomTime=function(t,e){var i=this.customTimes.filter(function(t){return e===t.options.id});if(0===i.length)throw new Error("No custom time bar found with id "+JSON.stringify(e));i.length>0&&i[0].setCustomTime(t)},o.prototype.getCustomTime=function(t){var e=this.customTimes.filter(function(e){return e.options.id===t});if(0===e.length)throw new Error("No custom time bar found with id "+JSON.stringify(t));return e[0].getCustomTime()},o.prototype.setCustomTimeTitle=function(t,e){var i=this.customTimes.filter(function(t){return t.options.id===e});if(0===i.length)throw new Error("No custom time bar found with id "+JSON.stringify(e));return i.length>0?i[0].setCustomTitle(t):void 0},o.prototype.getEventProperties=function(t){return{event:t}},o.prototype.addCustomTime=function(t,e){var i=void 0!==t?h.convert(t,"Date").valueOf():new Date,o=this.customTimes.some(function(t){return t.options.id===e});if(o)throw new Error("A custom time with id "+JSON.stringify(e)+" already exists");var n=new u(this.body,h.extend({},this.options,{time:i,id:e}));return this.customTimes.push(n),this.components.push(n),this._redraw(),e},o.prototype.removeCustomTime=function(t){var e=this.customTimes.filter(function(e){return e.options.id===t});if(0===e.length)throw new Error("No custom time bar found with id "+JSON.stringify(t));e.forEach(function(t){this.customTimes.splice(this.customTimes.indexOf(t),1),this.components.splice(this.components.indexOf(t),1),t.destroy()}.bind(this))},o.prototype.getVisibleItems=function(){return this.itemSet&&this.itemSet.getVisibleItems()||[]},o.prototype.fit=function(t){var e=this.getDataRange();if(null!==e.min||null!==e.max){var i=e.max-e.min,o=new Date(e.min.valueOf()-.01*i),n=new Date(e.max.valueOf()+.01*i),s=t&&void 0!==t.animation?t.animation:!0;this.range.setRange(o,n,s)}},o.prototype.getDataRange=function(){throw new Error("Cannot invoke abstract method getDataRange")},o.prototype.setWindow=function(t,e,i){var o;if(1==arguments.length){var n=arguments[0];o=void 0!==n.animation?n.animation:!0,this.range.setRange(n.start,n.end,o)}else o=i&&void 0!==i.animation?i.animation:!0,this.range.setRange(t,e,o)},o.prototype.moveTo=function(t,e){var i=this.range.end-this.range.start,o=h.convert(t,"Date").valueOf(),n=o-i/2,s=o+i/2,r=e&&void 0!==e.animation?e.animation:!0;this.range.setRange(n,s,r)},o.prototype.getWindow=function(){var t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}},o.prototype.redraw=function(){this._redraw()},o.prototype._redraw=function(){this.redrawCount++;var t=!1,e=this.options,i=this.props,o=this.dom;if(o&&o.container&&0!=o.container.clientWidth){c.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),"top"==e.orientation?(h.addClassName(o.root,"vis-top"),h.removeClassName(o.root,"vis-bottom")):(h.removeClassName(o.root,"vis-top"),h.addClassName(o.root,"vis-bottom")),o.root.style.maxHeight=h.option.asSize(e.maxHeight,""),o.root.style.minHeight=h.option.asSize(e.minHeight,""),o.root.style.width=h.option.asSize(e.width,""),i.border.left=(o.centerContainer.offsetWidth-o.centerContainer.clientWidth)/2,i.border.right=i.border.left,i.border.top=(o.centerContainer.offsetHeight-o.centerContainer.clientHeight)/2,i.border.bottom=i.border.top;var n=o.root.offsetHeight-o.root.clientHeight,s=o.root.offsetWidth-o.root.clientWidth;0===o.centerContainer.clientHeight&&(i.border.left=i.border.top,i.border.right=i.border.left),0===o.root.clientHeight&&(s=n),i.center.height=o.center.offsetHeight,i.left.height=o.left.offsetHeight,i.right.height=o.right.offsetHeight,i.top.height=o.top.clientHeight||-i.border.top,i.bottom.height=o.bottom.clientHeight||-i.border.bottom;var a=Math.max(i.left.height,i.center.height,i.right.height),d=i.top.height+a+i.bottom.height+n+i.border.top+i.border.bottom;o.root.style.height=h.option.asSize(e.height,d+"px"),i.root.height=o.root.offsetHeight,i.background.height=i.root.height-n;var l=i.root.height-i.top.height-i.bottom.height-n;i.centerContainer.height=l,i.leftContainer.height=l,i.rightContainer.height=i.leftContainer.height,i.root.width=o.root.offsetWidth,i.background.width=i.root.width-s,i.left.width=o.leftContainer.clientWidth||-i.border.left,i.leftContainer.width=i.left.width,i.right.width=o.rightContainer.clientWidth||-i.border.right,i.rightContainer.width=i.right.width;var u=i.root.width-i.left.width-i.right.width-s;i.center.width=u,i.centerContainer.width=u,i.top.width=u,i.bottom.width=u,o.background.style.height=i.background.height+"px",o.backgroundVertical.style.height=i.background.height+"px",o.backgroundHorizontal.style.height=i.centerContainer.height+"px",o.centerContainer.style.height=i.centerContainer.height+"px",o.leftContainer.style.height=i.leftContainer.height+"px",o.rightContainer.style.height=i.rightContainer.height+"px",o.background.style.width=i.background.width+"px",o.backgroundVertical.style.width=i.centerContainer.width+"px",o.backgroundHorizontal.style.width=i.background.width+"px",o.centerContainer.style.width=i.center.width+"px",o.top.style.width=i.top.width+"px",o.bottom.style.width=i.bottom.width+"px",o.background.style.left="0",o.background.style.top="0",o.backgroundVertical.style.left=i.left.width+i.border.left+"px",o.backgroundVertical.style.top="0",o.backgroundHorizontal.style.left="0",o.backgroundHorizontal.style.top=i.top.height+"px",o.centerContainer.style.left=i.left.width+"px",o.centerContainer.style.top=i.top.height+"px",o.leftContainer.style.left="0",o.leftContainer.style.top=i.top.height+"px",o.rightContainer.style.left=i.left.width+i.center.width+"px",o.rightContainer.style.top=i.top.height+"px",o.top.style.left=i.left.width+"px",o.top.style.top="0",o.bottom.style.left=i.left.width+"px",o.bottom.style.top=i.top.height+i.centerContainer.height+"px",this._updateScrollTop();var p=this.props.scrollTop;"top"!=e.orientation.item&&(p+=Math.max(this.props.centerContainer.height-this.props.center.height-this.props.border.top-this.props.border.bottom,0)),o.center.style.left="0",o.center.style.top=p+"px",o.left.style.left="0",o.left.style.top=p+"px",o.right.style.left="0",o.right.style.top=p+"px";var f=0==this.props.scrollTop?"hidden":"",m=this.props.scrollTop==this.props.scrollTopMin?"hidden":"";o.shadowTop.style.visibility=f,o.shadowBottom.style.visibility=m,o.shadowTopLeft.style.visibility=f,o.shadowBottomLeft.style.visibility=m,o.shadowTopRight.style.visibility=f,o.shadowBottomRight.style.visibility=m;var v=this.props.center.height>this.props.centerContainer.height;this.hammer.get("pan").set({direction:v?r.DIRECTION_ALL:r.DIRECTION_HORIZONTAL}),this.components.forEach(function(e){t=e.redraw()||t});var g=5;if(t){if(this.redrawCount0&&(this.props.scrollTop=0),this.props.scrollTope;e++)o=this.selection[e],n=this.items[o],n&&n.unselect();for(this.selection=[],e=0,i=t.length;i>e;e++)o=t[e],n=this.items[o],n&&(this.selection.push(o),n.select())},o.prototype.getSelection=function(){return this.selection.concat([])},o.prototype.getVisibleItems=function(){var t=this.body.range.getRange(),e=this.body.util.toScreen(t.start),i=this.body.util.toScreen(t.end),o=[];for(var n in this.groups)if(this.groups.hasOwnProperty(n))for(var s=this.groups[n],r=s.visibleItems,a=0;ae&&o.push(h.id)}return o},o.prototype._deselect=function(t){for(var e=this.selection,i=0,o=e.length;o>i;i++)if(e[i]==t){e.splice(i,1);break}},o.prototype.redraw=function(){var t=this.options.margin,e=this.body.range,i=r.option.asSize,o=this.options,n=o.orientation.item,s=!1,a=this.dom.frame;this.props.top=this.body.domProps.top.height+this.body.domProps.border.top,this.props.left=this.body.domProps.left.width+this.body.domProps.border.left,a.className="vis-itemset",s=this._orderGroups()||s;var h=e.end-e.start,d=h!=this.lastVisibleInterval||this.props.width!=this.props.lastWidth;d&&(this.stackDirty=!0),this.lastVisibleInterval=h,this.props.lastWidth=this.props.width;var l=this.stackDirty,c=this._firstGroup(),u={item:t.item,axis:t.axis},p={item:t.item,axis:t.item.vertical/2},f=0,m=t.axis+t.item.vertical;return this.groups[y].redraw(e,p,l),r.forEach(this.groups,function(t){var i=t==c?u:p,o=t.redraw(e,i,l);s=o||s,f+=t.height}),f=Math.max(f,m),this.stackDirty=!1,a.style.height=i(f),this.props.width=a.offsetWidth,this.props.height=f,this.dom.axis.style.top=i("top"==n?this.body.domProps.top.height+this.body.domProps.border.top:this.body.domProps.top.height+this.body.domProps.centerContainer.height),this.dom.axis.style.left="0",s=this._isResized()||s},o.prototype._firstGroup=function(){var t="top"==this.options.orientation.item?0:this.groupIds.length-1,e=this.groupIds[t],i=this.groups[e]||this.groups[g];return i||null},o.prototype._updateUngrouped=function(){var t,e,i=this.groups[g];this.groups[y];if(this.groupsData){if(i){i.hide(),delete this.groups[g];for(e in this.items)if(this.items.hasOwnProperty(e)){t=this.items[e],t.parent&&t.parent.remove(t);var o=this._getGroupId(t.data),n=this.groups[o];n&&n.add(t)||t.hide()}}}else if(!i){var s=null,r=null;i=new c(s,r,this),this.groups[g]=i;for(e in this.items)this.items.hasOwnProperty(e)&&(t=this.items[e],i.add(t));i.show()}},o.prototype.getLabelSet=function(){return this.dom.labelSet},o.prototype.setItems=function(t){var e,i=this,o=this.itemsData;if(t){if(!(t instanceof a||t instanceof h))throw new TypeError("Data must be an instance of DataSet or DataView");this.itemsData=t}else this.itemsData=null;if(o&&(r.forEach(this.itemListeners,function(t,e){o.off(e,t)}),e=o.getIds(),this._onRemove(e)),this.itemsData){var n=this.id;r.forEach(this.itemListeners,function(t,e){i.itemsData.on(e,t,n)}),e=this.itemsData.getIds(),this._onAdd(e),this._updateUngrouped()}this.body.emitter.emit("_change",{queue:!0})},o.prototype.getItems=function(){return this.itemsData},o.prototype.setGroups=function(t){var e,i=this;if(this.groupsData&&(r.forEach(this.groupListeners,function(t,e){i.groupsData.off(e,t)}),e=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(e)),t){if(!(t instanceof a||t instanceof h))throw new TypeError("Data must be an instance of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var o=this.id;r.forEach(this.groupListeners,function(t,e){i.groupsData.on(e,t,o)}),e=this.groupsData.getIds(),this._onAddGroups(e)}this._updateUngrouped(),this._order(),this.body.emitter.emit("_change",{queue:!0})},o.prototype.getGroups=function(){return this.groupsData},o.prototype.removeItem=function(t){var e=this.itemsData.get(t),i=this.itemsData.getDataSet();e&&this.options.onRemove(e,function(e){e&&i.remove(t)})},o.prototype._getType=function(t){return t.type||this.options.type||(t.end?"range":"box")},o.prototype._getGroupId=function(t){var e=this._getType(t);return"background"==e&&void 0==t.group?y:this.groupsData?t.group:g},o.prototype._onUpdate=function(t){var e=this;t.forEach(function(t){var i,n=e.itemsData.get(t,e.itemOptions),s=e.items[t],r=e._getType(n),a=o.types[r];if(s&&(a&&s instanceof a?e._updateItem(s,n):(i=s.selected,e._removeItem(s),s=null)),!s){if(!a)throw"rangeoverflow"==r?new TypeError('Item type "rangeoverflow" is deprecated. Use css styling instead: .vis-item.vis-range .vis-item-content {overflow: visible;}'):new TypeError('Unknown item type "'+r+'"');s=new a(n,e.conversion,e.options),s.id=t,e._addItem(s),i&&(this.selection.push(t),s.select())}}.bind(this)),this._order(),this.stackDirty=!0,this.body.emitter.emit("_change",{queue:!0})},o.prototype._onAdd=o.prototype._onUpdate,o.prototype._onRemove=function(t){var e=0,i=this;t.forEach(function(t){var o=i.items[t];o&&(e++,i._removeItem(o))}),e&&(this._order(),this.stackDirty=!0,this.body.emitter.emit("_change",{queue:!0}))},o.prototype._order=function(){r.forEach(this.groups,function(t){t.order()})},o.prototype._onUpdateGroups=function(t){this._onAddGroups(t)},o.prototype._onAddGroups=function(t){var e=this;t.forEach(function(t){var i=e.groupsData.get(t),o=e.groups[t];if(o)o.setData(i);else{if(t==g||t==y)throw new Error("Illegal group id. "+t+" is a reserved id.");var n=Object.create(e.options);r.extend(n,{height:null}),o=new c(t,i,e),e.groups[t]=o;for(var s in e.items)if(e.items.hasOwnProperty(s)){var a=e.items[s];a.data.group==t&&o.add(a)}o.order(),o.show()}}),this.body.emitter.emit("_change",{queue:!0})},o.prototype._onRemoveGroups=function(t){var e=this.groups;t.forEach(function(t){var i=e[t];i&&(i.hide(),delete e[t])}),this.markDirty(),this.body.emitter.emit("_change",{queue:!0})},o.prototype._orderGroups=function(){if(this.groupsData){var t=this.groupsData.getIds({order:this.options.groupOrder}),e=!r.equalArray(t,this.groupIds);if(e){var i=this.groups;t.forEach(function(t){i[t].hide()}),t.forEach(function(t){i[t].show()}),this.groupIds=t}return e}return!1},o.prototype._addItem=function(t){this.items[t.id]=t;var e=this._getGroupId(t.data),i=this.groups[e];i&&i.add(t)},o.prototype._updateItem=function(t,e){var i=t.data.group,o=t.data.subgroup;if(t.setData(e),i!=t.data.group||o!=t.data.subgroup){var n=this.groups[i];n&&n.remove(t);var s=this._getGroupId(t.data),r=this.groups[s];r&&r.add(t)}},o.prototype._removeItem=function(t){t.hide(),delete this.items[t.id];var e=this.selection.indexOf(t.id);-1!=e&&this.selection.splice(e,1),t.parent&&t.parent.remove(t)},o.prototype._constructByEndArray=function(t){for(var e=[],i=0;in+s)return}else{var a=e.height;if(n+a-s>o)return}}if(e&&e!=this.groupTouchParams.group){var h=this.groupsData,d=h.get(e.groupId),l=h.get(this.groupTouchParams.group.groupId);l&&d&&(this.options.groupOrderSwap(l,d,this.groupsData),this.groupsData.update(l),this.groupsData.update(d));var c=this.groupsData.getIds({order:this.options.groupOrder});if(!r.equalArray(c,this.groupTouchParams.originalOrder))for(var h=this.groupsData,u=this.groupTouchParams.originalOrder,p=this.groupTouchParams.group.groupId,f=Math.min(u.length,c.length),m=0,v=0,g=0;f>m;){for(;f>m+v&&f>m+g&&c[m+v]==u[m+g];)m++;if(m+v>=f)break;if(c[m+v]!=p)if(u[m+g]!=p){var y=c.indexOf(u[m+g]),b=h.get(c[m+v]),_=h.get(u[m+g]);this.options.groupOrderSwap(b,_,h),h.update(b),h.update(_);var w=c[m+v];c[m+v]=u[m+g],c[y]=w,m++}else g=1;else v=1}}}},o.prototype._onGroupDragEnd=function(t){if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();var e=this,i=e.groupTouchParams.group.groupId,o=e.groupsData.getDataSet(),n=r.extend({},o.get(i));e.options.onMoveGroup(n,function(t){if(t)t[o._fieldId]=i,o.update(t);else{var n=o.getIds({order:e.options.groupOrder});if(!r.equalArray(n,e.groupTouchParams.originalOrder))for(var s=e.groupTouchParams.originalOrder,a=Math.min(s.length,n.length),h=0;a>h;){for(;a>h&&n[h]==s[h];)h++;if(h>=a)break;var d=n.indexOf(s[h]),l=o.get(n[h]),c=o.get(s[h]);e.options.groupOrderSwap(l,c,o),groupsData.update(l),groupsData.update(c);var u=n[h];n[h]=s[h],n[d]=u,h++}}}),e.body.emitter.emit("groupDragged",{groupId:i})}},o.prototype._onSelectItem=function(t){if(this.options.selectable){var e=t.srcEvent&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey),i=t.srcEvent&&t.srcEvent.shiftKey;if(e||i)return void this._onMultiSelectItem(t);var o=this.getSelection(),n=this.itemFromTarget(t),s=n?[n.id]:[];this.setSelection(s);var r=this.getSelection();(r.length>0||o.length>0)&&this.body.emitter.emit("select",{items:r,event:t})}},o.prototype._onAddItem=function(t){if(this.options.selectable&&this.options.editable.add){var e=this,i=this.options.snap||null,o=this.itemFromTarget(t);if(o){var n=e.itemsData.get(o.id);this.options.onUpdate(n,function(t){t&&e.itemsData.getDataSet().update(t)})}else{var s=r.getAbsoluteLeft(this.dom.frame),a=t.center.x-s,h=this.body.util.toTime(a),d=this.body.util.getScale(),l=this.body.util.getStep(),c={start:i?i(h,d,l):h,content:"new item"};if("range"===this.options.type){var u=this.body.util.toTime(a+this.props.width/5);c.end=i?i(u,d,l):u}c[this.itemsData._fieldId]=r.randomUUID();var p=this.groupFromTarget(t);p&&(c.group=p.groupId),c=this._cloneItemData(c),this.options.onAdd(c,function(t){t&&e.itemsData.getDataSet().add(t)})}}},o.prototype._onMultiSelectItem=function(t){if(this.options.selectable){var e=this.itemFromTarget(t);if(e){var i=this.options.multiselect?this.getSelection():[],n=t.srcEvent&&t.srcEvent.shiftKey||!1;if(n&&this.options.multiselect){var s=this.itemsData.get(e.id).group,r=void 0;this.options.multiselectPerGroup&&i.length>0&&(r=this.itemsData.get(i[0]).group),this.options.multiselectPerGroup&&void 0!=r&&r!=s||i.push(e.id);var a=o._getItemRange(this.itemsData.get(i,this.itemOptions));if(!this.options.multiselectPerGroup||r==s){i=[];for(var h in this.items)if(this.items.hasOwnProperty(h)){var d=this.items[h],l=d.data.start,c=void 0!==d.data.end?d.data.end:l;!(l>=a.min&&c<=a.max)||this.options.multiselectPerGroup&&r!=this.itemsData.get(d.id).group||d instanceof v||i.push(d.id)}}}else{var u=i.indexOf(e.id);-1==u?i.push(e.id):i.splice(u,1)}this.setSelection(i),this.body.emitter.emit("select",{items:this.getSelection(),event:t})}}},o._getItemRange=function(t){var e=null,i=null;return t.forEach(function(t){(null==i||t.starte)&&(e=t.end):(null==e||t.start>e)&&(e=t.start)}),{min:i,max:e}},o.prototype.itemFromTarget=function(t){for(var e=t.target;e;){if(e.hasOwnProperty("timeline-item"))return e["timeline-item"];e=e.parentNode}return null},o.prototype.groupFromTarget=function(t){for(var e=t.center?t.center.y:t.clientY,i=0;ia&&ea)return n}else if(0===i&&e0?t.step:1,this.autoScale=!1)},o.prototype.setAutoScale=function(t){this.autoScale=t},o.prototype.setMinimumStep=function(t){if(void 0!=t){var e=31104e6,i=2592e6,o=864e5,n=36e5,s=6e4,r=1e3,a=1;1e3*e>t&&(this.scale="year",this.step=1e3),500*e>t&&(this.scale="year",this.step=500),100*e>t&&(this.scale="year",this.step=100),50*e>t&&(this.scale="year",this.step=50),10*e>t&&(this.scale="year",this.step=10),5*e>t&&(this.scale="year",this.step=5),e>t&&(this.scale="year",this.step=1),3*i>t&&(this.scale="month",this.step=3),i>t&&(this.scale="month",this.step=1),5*o>t&&(this.scale="day",this.step=5),2*o>t&&(this.scale="day",this.step=2),o>t&&(this.scale="day",this.step=1),o/2>t&&(this.scale="weekday",this.step=1),4*n>t&&(this.scale="hour",this.step=4),n>t&&(this.scale="hour",this.step=1),15*s>t&&(this.scale="minute",this.step=15),10*s>t&&(this.scale="minute",this.step=10),5*s>t&&(this.scale="minute",this.step=5),s>t&&(this.scale="minute",this.step=1),15*r>t&&(this.scale="second",this.step=15),10*r>t&&(this.scale="second",this.step=10),5*r>t&&(this.scale="second",this.step=5),r>t&&(this.scale="second",this.step=1),200*a>t&&(this.scale="millisecond",this.step=200),100*a>t&&(this.scale="millisecond",this.step=100),50*a>t&&(this.scale="millisecond",this.step=50),10*a>t&&(this.scale="millisecond",this.step=10),5*a>t&&(this.scale="millisecond",this.step=5),a>t&&(this.scale="millisecond",this.step=1)}},o.snap=function(t,e,i){var o=n(t);if("year"==e){var s=o.year()+Math.round(o.month()/12);o.year(Math.round(s/i)*i),o.month(0),o.date(0),o.hours(0),o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("month"==e)o.date()>15?(o.date(1),o.add(1,"month")):o.date(1),o.hours(0),o.minutes(0),o.seconds(0),o.milliseconds(0);else if("day"==e){switch(i){case 5:case 2:o.hours(24*Math.round(o.hours()/24));break;default:o.hours(12*Math.round(o.hours()/12))}o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("weekday"==e){switch(i){case 5:case 2:o.hours(12*Math.round(o.hours()/12));break;default:o.hours(6*Math.round(o.hours()/6))}o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("hour"==e){switch(i){case 4:o.minutes(60*Math.round(o.minutes()/60));break;default:o.minutes(30*Math.round(o.minutes()/30))}o.seconds(0),o.milliseconds(0)}else if("minute"==e){switch(i){case 15:case 10:o.minutes(5*Math.round(o.minutes()/5)),o.seconds(0);break;case 5:o.seconds(60*Math.round(o.seconds()/60));break;default:o.seconds(30*Math.round(o.seconds()/30))}o.milliseconds(0)}else if("second"==e)switch(i){case 15:case 10:o.seconds(5*Math.round(o.seconds()/5)),o.milliseconds(0);break;case 5:o.milliseconds(1e3*Math.round(o.milliseconds()/1e3));break;default:o.milliseconds(500*Math.round(o.milliseconds()/500))}else if("millisecond"==e){var r=i>5?i/2:1;o.milliseconds(Math.round(o.milliseconds()/r)*r)}return o},o.prototype.isMajor=function(){if(1==this.switchedYear)switch(this.switchedYear=!1,this.scale){case"year":case"month":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedMonth)switch(this.switchedMonth=!1,this.scale){case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedDay)switch(this.switchedDay=!1,this.scale){case"millisecond":case"second":case"minute":case"hour":return!0;default:return!1}var t=this.moment(this.current);switch(this.scale){case"millisecond":return 0==t.milliseconds();case"second":return 0==t.seconds();case"minute":return 0==t.hours()&&0==t.minutes();case"hour":return 0==t.hours();case"weekday":case"day":return 1==t.date();case"month":return 0==t.month();case"year":return!1;default:return!1}},o.prototype.getLabelMinor=function(t){void 0==t&&(t=this.current);var e=this.format.minorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""},o.prototype.getLabelMajor=function(t){void 0==t&&(t=this.current);var e=this.format.majorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""},o.prototype.getClassName=function(){function t(t){return t/h%2==0?" vis-even":" vis-odd"}function e(t){return t.isSame(new Date,"day")?" vis-today":t.isSame(s().add(1,"day"),"day")?" vis-tomorrow":t.isSame(s().add(-1,"day"),"day")?" vis-yesterday":""}function i(t){return t.isSame(new Date,"week")?" vis-current-week":""}function o(t){return t.isSame(new Date,"month")?" vis-current-month":""}function n(t){return t.isSame(new Date,"year")?" vis-current-year":""}var s=this.moment,r=this.moment(this.current),a=r.locale?r.locale("en"):r.lang("en"),h=this.step;switch(this.scale){case"millisecond":return t(a.milliseconds()).trim();case"second":return t(a.seconds()).trim();case"minute":return t(a.minutes()).trim();case"hour":var d=a.hours();return 4==this.step&&(d=d+"-h"+(d+4)),"vis-h"+d+e(a)+t(a.hours());case"weekday":return"vis-"+a.format("dddd").toLowerCase()+e(a)+i(a)+t(a.date());case"day":var l=a.date(),c=a.format("MMMM").toLowerCase();return"vis-day"+l+" vis-"+c+o(a)+t(l-1);case"month":return"vis-"+a.format("MMMM").toLowerCase()+o(a)+t(a.month());case"year":var u=a.year();return"vis-year"+u+n(a)+t(u);default:return""}},t.exports=o},function(t,e,i){function o(t,e,i){this.groupId=t,this.subgroups={},this.subgroupIndex=0,this.subgroupOrderer=e&&e.subgroupOrder,this.itemSet=i,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;var o=this;this.itemSet.body.emitter.on("checkRangedItems",function(){o.checkRangedItems=!0}),this._create(),this.setData(e)}var n=i(1),s=i(34);i(35);o.prototype._create=function(){var t=document.createElement("div");this.itemSet.options.groupEditable.order?t.className="vis-label draggable":t.className="vis-label",this.dom.label=t;var e=document.createElement("div");e.className="vis-inner",t.appendChild(e),this.dom.inner=e;var i=document.createElement("div");i.className="vis-group",i["timeline-group"]=this,this.dom.foreground=i,this.dom.background=document.createElement("div"),this.dom.background.className="vis-group",this.dom.axis=document.createElement("div"),this.dom.axis.className="vis-group",this.dom.marker=document.createElement("div"),this.dom.marker.style.visibility="hidden",this.dom.marker.innerHTML="?",this.dom.background.appendChild(this.dom.marker)},o.prototype.setData=function(t){var e;if(e=this.itemSet.options&&this.itemSet.options.groupTemplate?this.itemSet.options.groupTemplate(t):t&&t.content,e instanceof Element){for(this.dom.inner.appendChild(e);this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(e)}else void 0!==e&&null!==e?this.dom.inner.innerHTML=e:this.dom.inner.innerHTML=this.groupId||"";this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?n.removeClassName(this.dom.inner,"vis-hidden"):n.addClassName(this.dom.inner,"vis-hidden");var i=t&&t.className||null;i!=this.className&&(this.className&&(n.removeClassName(this.dom.label,this.className),n.removeClassName(this.dom.foreground,this.className),n.removeClassName(this.dom.background,this.className),n.removeClassName(this.dom.axis,this.className)),n.addClassName(this.dom.label,i),n.addClassName(this.dom.foreground,i),n.addClassName(this.dom.background,i),n.addClassName(this.dom.axis,i),this.className=i),this.style&&(n.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(n.addCssText(this.dom.label,t.style),this.style=t.style)},o.prototype.getLabelWidth=function(){return this.props.label.width},o.prototype.redraw=function(t,e,i){var o=!1,r=this.dom.marker.clientHeight;if(r!=this.lastMarkerHeight&&(this.lastMarkerHeight=r,n.forEach(this.items,function(t){t.dirty=!0,t.displayed&&t.redraw()}),i=!0),this._calculateSubGroupHeights(),"function"==typeof this.itemSet.options.order){if(i){var a=this,h=!1;n.forEach(this.items,function(t){t.displayed||(t.redraw(),a.visibleItems.push(t)),t.repositionX(h)});var d=this.orderedItems.byStart.slice().sort(function(t,e){return a.itemSet.options.order(t.data,e.data)});s.stack(d,e,!0)}this.visibleItems=this._updateVisibleItems(this.orderedItems,this.visibleItems,t)}else this.visibleItems=this._updateVisibleItems(this.orderedItems,this.visibleItems,t),this.itemSet.options.stack?s.stack(this.visibleItems,e,i):s.nostack(this.visibleItems,e,this.subgroups);var l=this._calculateHeight(e),c=this.dom.foreground;this.top=c.offsetTop,this.left=c.offsetLeft,this.width=c.offsetWidth,o=n.updateProperty(this,"height",l)||o,o=n.updateProperty(this.props.label,"width",this.dom.inner.clientWidth)||o,o=n.updateProperty(this.props.label,"height",this.dom.inner.clientHeight)||o,this.dom.background.style.height=l+"px",this.dom.foreground.style.height=l+"px",this.dom.label.style.height=l+"px";for(var u=0,p=this.visibleItems.length;p>u;u++){var f=this.visibleItems[u];f.repositionY(e)}return o},o.prototype._calculateSubGroupHeights=function(){if(Object.keys(this.subgroups).length>0){var t=this;this.resetSubgroups(),n.forEach(this.visibleItems,function(e){void 0!==e.data.subgroup&&(t.subgroups[e.data.subgroup].height=Math.max(t.subgroups[e.data.subgroup].height,e.height),t.subgroups[e.data.subgroup].visible=!0)})}},o.prototype._calculateHeight=function(t){var e,i=this.visibleItems;if(i.length>0){var o=i[0].top,s=i[0].top+i[0].height;if(n.forEach(i,function(t){o=Math.min(o,t.top),s=Math.max(s,t.top+t.height)}),o>t.axis){var r=o-t.axis;s-=r,n.forEach(i,function(t){t.top-=r})}e=s+t.item.vertical/2}else e=0;return e=Math.max(e,this.props.label.height)},o.prototype.show=function(){this.dom.label.parentNode||this.itemSet.dom.labelSet.appendChild(this.dom.label),this.dom.foreground.parentNode||this.itemSet.dom.foreground.appendChild(this.dom.foreground),this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background),this.dom.axis.parentNode||this.itemSet.dom.axis.appendChild(this.dom.axis)},o.prototype.hide=function(){var t=this.dom.label;t.parentNode&&t.parentNode.removeChild(t);var e=this.dom.foreground;e.parentNode&&e.parentNode.removeChild(e);var i=this.dom.background;i.parentNode&&i.parentNode.removeChild(i);var o=this.dom.axis;o.parentNode&&o.parentNode.removeChild(o)},o.prototype.add=function(t){if(this.items[t.id]=t,t.setParent(this),void 0!==t.data.subgroup&&(void 0===this.subgroups[t.data.subgroup]&&(this.subgroups[t.data.subgroup]={height:0,visible:!1,index:this.subgroupIndex,items:[]},this.subgroupIndex++),this.subgroups[t.data.subgroup].items.push(t)),this.orderSubgroups(),-1==this.visibleItems.indexOf(t)){var e=this.itemSet.body.range;this._checkIfVisible(t,this.visibleItems,e)}},o.prototype.orderSubgroups=function(){if(void 0!==this.subgroupOrderer){var t=[];if("string"==typeof this.subgroupOrderer){for(var e in this.subgroups)t.push({subgroup:e,sortField:this.subgroups[e].items[0].data[this.subgroupOrderer]});t.sort(function(t,e){return t.sortField-e.sortField})}else if("function"==typeof this.subgroupOrderer){for(var e in this.subgroups)t.push(this.subgroups[e].items[0].data);t.sort(this.subgroupOrderer)}if(t.length>0)for(var i=0;it?-1:l>=t?0:1};if(e.length>0)for(s=0;sl}),1==this.checkRangedItems)for(this.checkRangedItems=!1,s=0;sl})}for(s=0;s=0&&(s=e[r],!n(s));r--)void 0===o[s.id]&&(o[s.id]=!0,i.push(s));for(r=t+1;rn;n++)t[n].top=null;for(n=0,s=t.length;s>n;n++){var r=t[n];if(r.stack&&null===r.top){r.top=i.axis;do{for(var a=null,h=0,d=t.length;d>h;h++){var l=t[h];if(null!==l.top&&l!==r&&l.stack&&e.collision(r,l,i.item)){a=l;break}}null!=a&&(r.top=a.top+a.height+i.item.vertical)}while(a)}}},e.nostack=function(t,e,i){var o,n,s;for(o=0,n=t.length;n>o;o++)if(void 0!==t[o].data.subgroup){s=e.axis;for(var r in i)i.hasOwnProperty(r)&&1==i[r].visible&&i[r].indexe.left&&t.top-o.vertical+ie.top}},function(t,e,i){function o(t,e,i){if(this.props={content:{width:0}},this.overflow=!1,t){if(void 0==t.start)throw new Error('Property "start" missing in item '+t.id);if(void 0==t.end)throw new Error('Property "end" missing in item '+t.id)}n.call(this,t,e,i)}var n=(i(22),i(36));o.prototype=new n(null,null,null),o.prototype.baseClassName="vis-item vis-range",o.prototype.isVisible=function(t){return this.data.startt.start},o.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("div"),t.frame=document.createElement("div"),t.frame.className="vis-item-overflow",t.box.appendChild(t.frame),t.content=document.createElement("div"),t.content.className="vis-item-content",t.frame.appendChild(t.content),t.box["timeline-item"]=this,this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.box.parentNode){var e=this.parent.dom.foreground;if(!e)throw new Error("Cannot redraw item: parent has no foreground container element");e.appendChild(t.box)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateTitle(this.dom.box),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var i=(this.options.editable.updateTime||this.options.editable.updateGroup||this.editable===!0)&&this.editable!==!1,o=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(i?" vis-editable":" vis-readonly");t.box.className=this.baseClassName+o,this.overflow="hidden"!==window.getComputedStyle(t.frame).overflow,this.dom.content.style.maxWidth="none",this.props.content.width=this.dom.content.offsetWidth,this.height=this.dom.box.offsetHeight,this.dom.content.style.maxWidth="",this.dirty=!1}this._repaintDeleteButton(t.box),this._repaintDragLeft(),this._repaintDragRight()},o.prototype.show=function(){this.displayed||this.redraw()},o.prototype.hide=function(){if(this.displayed){var t=this.dom.box;t.parentNode&&t.parentNode.removeChild(t),this.displayed=!1}},o.prototype.repositionX=function(t){var e,i,o=this.parent.width,n=this.conversion.toScreen(this.data.start),s=this.conversion.toScreen(this.data.end);void 0!==t&&t!==!0||(-o>n&&(n=-o),s>2*o&&(s=2*o));var r=Math.max(s-n,1);switch(this.overflow?(this.left=n,this.width=r+this.props.content.width,i=this.props.content.width):(this.left=n,this.width=r,i=Math.min(s-n,this.props.content.width)),this.dom.box.style.left=this.left+"px",this.dom.box.style.width=r+"px",this.options.align){case"left":this.dom.content.style.left="0";break;case"right":this.dom.content.style.left=Math.max(r-i,0)+"px";break;case"center":this.dom.content.style.left=Math.max((r-i)/2,0)+"px";break;default:e=this.overflow?s>0?Math.max(-n,0):-i:0>n?-n:0,this.dom.content.style.left=e+"px"}},o.prototype.repositionY=function(){var t=this.options.orientation.item,e=this.dom.box;"top"==t?e.style.top=this.top+"px":e.style.top=this.parent.height-this.top-this.height+"px"},o.prototype._repaintDragLeft=function(){if(this.selected&&this.options.editable.updateTime&&!this.dom.dragLeft){var t=document.createElement("div");t.className="vis-drag-left",t.dragLeftItem=this,this.dom.box.appendChild(t),this.dom.dragLeft=t}else!this.selected&&this.dom.dragLeft&&(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)},o.prototype._repaintDragRight=function(){if(this.selected&&this.options.editable.updateTime&&!this.dom.dragRight){var t=document.createElement("div");t.className="vis-drag-right",t.dragRightItem=this,this.dom.box.appendChild(t),this.dom.dragRight=t}else!this.selected&&this.dom.dragRight&&(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)},t.exports=o},function(t,e,i){function o(t,e,i){this.id=null,this.parent=null,this.data=t,this.dom=null,this.conversion=e||{},this.options=i||{},this.selected=!1,this.displayed=!1,this.dirty=!0,this.top=null,this.left=null,this.width=null,this.height=null,this.editable=null,this.data&&this.data.hasOwnProperty("editable")&&"boolean"==typeof this.data.editable&&(this.editable=t.editable)}var n=i(22),s=i(1);o.prototype.stack=!0,o.prototype.select=function(){this.selected=!0,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.unselect=function(){this.selected=!1,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.setData=function(t){var e=void 0!=t.group&&this.data.group!=t.group;e&&this.parent.itemSet._moveToGroup(this,t.group),t.hasOwnProperty("editable")&&"boolean"==typeof t.editable&&(this.editable=t.editable),this.data=t,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.setParent=function(t){this.displayed?(this.hide(),this.parent=t,this.parent&&this.show()):this.parent=t},o.prototype.isVisible=function(t){return!1},o.prototype.show=function(){return!1},o.prototype.hide=function(){return!1},o.prototype.redraw=function(){},o.prototype.repositionX=function(){},o.prototype.repositionY=function(){},o.prototype._repaintDeleteButton=function(t){var e=(this.options.editable.remove||this.data.editable===!0)&&this.data.editable!==!1;if(this.selected&&e&&!this.dom.deleteButton){var i=this,o=document.createElement("div");o.className="vis-delete",o.title="Delete this item",new n(o).on("tap",function(t){t.stopPropagation(),i.parent.removeFromDataSet(i)}),t.appendChild(o),this.dom.deleteButton=o}else!this.selected&&this.dom.deleteButton&&(this.dom.deleteButton.parentNode&&this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton),this.dom.deleteButton=null)},o.prototype._updateContents=function(t){var e;if(this.options.template){var i=this.parent.itemSet.itemsData.get(this.id);e=this.options.template(i)}else e=this.data.content;var o=this._contentToString(this.content)!==this._contentToString(e);if(o){if(e instanceof Element)t.innerHTML="",t.appendChild(e);else if(void 0!=e)t.innerHTML=e;else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '+this.id);this.content=e}},o.prototype._updateTitle=function(t){null!=this.data.title?t.title=this.data.title||"":t.removeAttribute("vis-title")},o.prototype._updateDataAttributes=function(t){if(this.options.dataAttributes&&this.options.dataAttributes.length>0){var e=[];if(Array.isArray(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=Object.keys(this.data)}for(var i=0;in;n++){var r=this.visibleItems[n];r.repositionY(e)}return o},o.prototype.show=function(){this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background)},t.exports=o},function(t,e,i){function o(t,e,i){if(this.props={dot:{width:0,height:0},line:{width:0,height:0}},t&&void 0==t.start)throw new Error('Property "start" missing in item '+t);n.call(this,t,e,i)}var n=i(36);i(1);o.prototype=new n(null,null,null),o.prototype.isVisible=function(t){var e=(t.end-t.start)/4;return this.data.start>t.start-e&&this.data.startt.start-e&&this.data.startt.start},o.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("div"),t.frame=document.createElement("div"),t.frame.className="vis-item-overflow",t.box.appendChild(t.frame),t.content=document.createElement("div"),t.content.className="vis-item-content",t.frame.appendChild(t.content),this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.box.parentNode){var e=this.parent.dom.background;if(!e)throw new Error("Cannot redraw item: parent has no background container element");e.appendChild(t.box)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateTitle(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);var i=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"");t.box.className=this.baseClassName+i,this.overflow="hidden"!==window.getComputedStyle(t.content).overflow,this.props.content.width=this.dom.content.offsetWidth,this.height=0,this.dirty=!1}},o.prototype.show=r.prototype.show,o.prototype.hide=r.prototype.hide,o.prototype.repositionX=r.prototype.repositionX,o.prototype.repositionY=function(t){var e="top"===this.options.orientation.item;this.dom.content.style.top=e?"":"0",this.dom.content.style.bottom=e?"0":"";var i;if(void 0!==this.data.subgroup){var o=this.data.subgroup,n=this.parent.subgroups,r=n[o].index;if(1==e){i=this.parent.subgroups[o].height+t.item.vertical,i+=0==r?t.axis-.5*t.item.vertical:0;var a=this.parent.top;for(var h in n)n.hasOwnProperty(h)&&1==n[h].visible&&n[h].indexr&&(a+=l)}i=this.parent.subgroups[o].height+t.item.vertical,this.dom.box.style.top=this.parent.height-d+a+"px",this.dom.box.style.bottom=""}}else this.parent instanceof s?(i=Math.max(this.parent.height,this.parent.itemSet.body.domProps.center.height,this.parent.itemSet.body.domProps.centerContainer.height),this.dom.box.style.top=e?"0":"",this.dom.box.style.bottom=e?"":"0"):(i=this.parent.height,this.dom.box.style.top=this.parent.top+"px",this.dom.box.style.bottom="");this.dom.box.style.height=i+"px"},t.exports=o},function(t,e,i){function o(t,e){this.dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},this.props={range:{start:0,end:0,minimumStep:0},lineTop:0},this.defaultOptions={orientation:{axis:"bottom"},showMinorLabels:!0,showMajorLabels:!0,maxMinorChars:7,format:a.FORMAT,moment:d,timeAxis:null},this.options=s.extend({},this.defaultOptions),this.body=t,this._create(),this.setOptions(e)}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s=i(1),r=i(28),a=i(32),h=i(29),d=i(2);o.prototype=new r,o.prototype.setOptions=function(t){t&&(s.selectiveExtend(["showMinorLabels","showMajorLabels","maxMinorChars","hiddenDates","timeAxis","moment"],this.options,t),s.selectiveDeepExtend(["format"],this.options,t),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.axis=t.orientation:"object"===n(t.orientation)&&"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis)),"locale"in t&&("function"==typeof d.locale?d.locale(t.locale):d.lang(t.locale)))},o.prototype._create=function(){this.dom.foreground=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.foreground.className="vis-time-axis vis-foreground",this.dom.background.className="vis-time-axis vis-background"},o.prototype.destroy=function(){this.dom.foreground.parentNode&&this.dom.foreground.parentNode.removeChild(this.dom.foreground),this.dom.background.parentNode&&this.dom.background.parentNode.removeChild(this.dom.background),this.body=null},o.prototype.redraw=function(){var t=this.props,e=this.dom.foreground,i=this.dom.background,o="top"==this.options.orientation.axis?this.body.dom.top:this.body.dom.bottom,n=e.parentNode!==o;this._calculateCharSize();var s=this.options.showMinorLabels&&"none"!==this.options.orientation.axis,r=this.options.showMajorLabels&&"none"!==this.options.orientation.axis;t.minorLabelHeight=s?t.minorCharHeight:0,t.majorLabelHeight=r?t.majorCharHeight:0,t.height=t.minorLabelHeight+t.majorLabelHeight,t.width=e.offsetWidth,t.minorLineHeight=this.body.domProps.root.height-t.majorLabelHeight-("top"==this.options.orientation.axis?this.body.domProps.bottom.height:this.body.domProps.top.height),t.minorLineWidth=1,t.majorLineHeight=t.minorLineHeight+t.majorLabelHeight,t.majorLineWidth=1;var a=e.nextSibling,h=i.nextSibling;return e.parentNode&&e.parentNode.removeChild(e),i.parentNode&&i.parentNode.removeChild(i),e.style.height=this.props.height+"px",this._repaintLabels(),a?o.insertBefore(e,a):o.appendChild(e),h?this.body.dom.backgroundVertical.insertBefore(i,h):this.body.dom.backgroundVertical.appendChild(i),this._isResized()||n},o.prototype._repaintLabels=function(){var t=this.options.orientation.axis,e=s.convert(this.body.range.start,"Number"),i=s.convert(this.body.range.end,"Number"),o=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf(),n=o-h.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this.body.range,o);n-=this.body.util.toTime(0).valueOf();var r=new a(new Date(e),new Date(i),n,this.body.hiddenDates);r.setMoment(this.options.moment),this.options.format&&r.setFormat(this.options.format),this.options.timeAxis&&r.setScale(this.options.timeAxis),this.step=r;var d=this.dom;d.redundant.lines=d.lines,d.redundant.majorTexts=d.majorTexts,d.redundant.minorTexts=d.minorTexts,d.lines=[],d.majorTexts=[],d.minorTexts=[];var c,u,p,f,m,v,g,y,b,_,w=0,x=void 0,k=0,O=1e3;for(r.start(),u=r.getCurrent(),f=this.body.util.toScreen(u);r.hasNext()&&O>k;){k++,m=r.isMajor(),_=r.getClassName(),b=r.getLabelMinor(),c=u,p=f,r.next(),u=r.getCurrent(),v=r.isMajor(),f=this.body.util.toScreen(u),g=w,w=f-p;var M=w>=.4*g;if(this.options.showMinorLabels&&M){var D=this._repaintMinorText(p,b,t,_);D.style.width=w+"px"}m&&this.options.showMajorLabels?(p>0&&(void 0==x&&(x=p),D=this._repaintMajorText(p,r.getLabelMajor(),t,_)),y=this._repaintMajorLine(p,w,t,_)):M?y=this._repaintMinorLine(p,w,t,_):y&&(y.style.width=parseInt(y.style.width)+w+"px")}if(k!==O||l||(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to "+O+" lines."),l=!0),this.options.showMajorLabels){var S=this.body.util.toTime(0),C=r.getLabelMajor(S),T=C.length*(this.props.majorCharWidth||10)+10;(void 0==x||x>T)&&this._repaintMajorText(0,C,t,_)}s.forEach(this.dom.redundant,function(t){for(;t.length;){var e=t.pop();e&&e.parentNode&&e.parentNode.removeChild(e)}})},o.prototype._repaintMinorText=function(t,e,i,o){var n=this.dom.redundant.minorTexts.shift();if(!n){var s=document.createTextNode("");n=document.createElement("div"),n.appendChild(s),this.dom.foreground.appendChild(n)}return this.dom.minorTexts.push(n),n.childNodes[0].nodeValue=e,n.style.top="top"==i?this.props.majorLabelHeight+"px":"0",n.style.left=t+"px",n.className="vis-text vis-minor "+o,n},o.prototype._repaintMajorText=function(t,e,i,o){var n=this.dom.redundant.majorTexts.shift();if(!n){var s=document.createTextNode(e);n=document.createElement("div"),n.appendChild(s),this.dom.foreground.appendChild(n)}return this.dom.majorTexts.push(n),n.childNodes[0].nodeValue=e,n.className="vis-text vis-major "+o,n.style.top="top"==i?"0":this.props.minorLabelHeight+"px",n.style.left=t+"px",n},o.prototype._repaintMinorLine=function(t,e,i,o){var n=this.dom.redundant.lines.shift();n||(n=document.createElement("div"),this.dom.background.appendChild(n)),this.dom.lines.push(n);var s=this.props;return"top"==i?n.style.top=s.majorLabelHeight+"px":n.style.top=this.body.domProps.top.height+"px",n.style.height=s.minorLineHeight+"px",n.style.left=t-s.minorLineWidth/2+"px",n.style.width=e+"px",n.className="vis-grid vis-vertical vis-minor "+o,n},o.prototype._repaintMajorLine=function(t,e,i,o){var n=this.dom.redundant.lines.shift();n||(n=document.createElement("div"),this.dom.background.appendChild(n)),this.dom.lines.push(n);var s=this.props;return"top"==i?n.style.top="0":n.style.top=this.body.domProps.top.height+"px",n.style.left=t-s.majorLineWidth/2+"px",n.style.height=s.majorLineHeight+"px",n.style.width=e+"px",n.className="vis-grid vis-vertical vis-major "+o,n},o.prototype._calculateCharSize=function(){this.dom.measureCharMinor||(this.dom.measureCharMinor=document.createElement("DIV"),this.dom.measureCharMinor.className="vis-text vis-minor vis-measure",this.dom.measureCharMinor.style.position="absolute",this.dom.measureCharMinor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMinor)),this.props.minorCharHeight=this.dom.measureCharMinor.clientHeight,this.props.minorCharWidth=this.dom.measureCharMinor.clientWidth,this.dom.measureCharMajor||(this.dom.measureCharMajor=document.createElement("DIV"),this.dom.measureCharMajor.className="vis-text vis-major vis-measure",this.dom.measureCharMajor.style.position="absolute",this.dom.measureCharMajor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMajor)),this.props.majorCharHeight=this.dom.measureCharMajor.clientHeight,this.props.majorCharWidth=this.dom.measureCharMajor.clientWidth};var l=!1;t.exports=o},function(t,e,i){function o(t){this.active=!1,this.dom={container:t},this.dom.overlay=document.createElement("div"),this.dom.overlay.className="vis-overlay",this.dom.container.appendChild(this.dom.overlay),this.hammer=a(this.dom.overlay),this.hammer.on("tap",this._onTapOverlay.bind(this));var e=this,i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];i.forEach(function(t){e.hammer.on(t,function(t){t.stopPropagation()})}),document&&document.body&&(this.onClick=function(i){n(i.target,t)||e.deactivate()},document.body.addEventListener("click",this.onClick)),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=s(),this.escListener=this.deactivate.bind(this)}function n(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}var s=i(43),r=i(12),a=i(22),h=i(1);r(o.prototype),o.current=null,o.prototype.destroy=function(){this.deactivate(),this.dom.overlay.parentNode.removeChild(this.dom.overlay),this.onClick&&document.body.removeEventListener("click",this.onClick),this.hammer.destroy(),this.hammer=null},o.prototype.activate=function(){o.current&&o.current.deactivate(),o.current=this,this.active=!0,this.dom.overlay.style.display="none",h.addClassName(this.dom.container,"vis-active"),this.emit("change"),this.emit("activate"),this.keycharm.bind("esc",this.escListener)},o.prototype.deactivate=function(){this.active=!1,this.dom.overlay.style.display="",h.removeClassName(this.dom.container,"vis-active"),this.keycharm.unbind("esc",this.escListener),this.emit("change"),this.emit("deactivate")},o.prototype._onTapOverlay=function(t){this.activate(),t.stopPropagation()},t.exports=o},function(t,e,i){var o,n,s;!function(i,r){n=[],o=r,s="function"==typeof o?o.apply(e,n):o,!(void 0!==s&&(t.exports=s))}(this,function(){function t(t){var e,i=t&&t.preventDefault||!1,o=t&&t.container||window,n={},s={keydown:{},keyup:{}},r={};for(e=97;122>=e;e++)r[String.fromCharCode(e)]={code:65+(e-97),shift:!1};for(e=65;90>=e;e++)r[String.fromCharCode(e)]={code:e,shift:!0};for(e=0;9>=e;e++)r[""+e]={code:48+e,shift:!1};for(e=1;12>=e;e++)r["F"+e]={code:111+e,shift:!1};for(e=0;9>=e;e++)r["num"+e]={code:96+e,shift:!1};r["num*"]={code:106,shift:!1},r["num+"]={code:107,shift:!1},r["num-"]={code:109,shift:!1},r["num/"]={code:111,shift:!1},r["num."]={code:110,shift:!1},r.left={code:37,shift:!1},r.up={code:38,shift:!1},r.right={code:39,shift:!1},r.down={code:40,shift:!1},r.space={code:32,shift:!1},r.enter={code:13,shift:!1},r.shift={code:16,shift:void 0},r.esc={code:27,shift:!1},r.backspace={code:8,shift:!1},r.tab={code:9,shift:!1},r.ctrl={code:17,shift:!1},r.alt={code:18,shift:!1},r["delete"]={code:46,shift:!1},r.pageup={code:33,shift:!1},r.pagedown={code:34,shift:!1},r["="]={code:187,shift:!1},r["-"]={code:189,shift:!1},r["]"]={code:221,shift:!1},r["["]={code:219,shift:!1};var a=function(t){d(t,"keydown")},h=function(t){d(t,"keyup")},d=function(t,e){if(void 0!==s[e][t.keyCode]){for(var o=s[e][t.keyCode],n=0;no&&(o=30),o>1e3&&(o=1e3),e.redraw(),e.body.emitter.emit("currentTimeTick"),e.currentTimeTimer=setTimeout(t,o)}var e=this;t()},o.prototype.stop=function(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)},o.prototype.setCurrentTime=function(t){var e=n.convert(t,"Date").valueOf(),i=(new Date).valueOf();this.offset=e-i,this.redraw()},o.prototype.getCurrentTime=function(){return new Date((new Date).valueOf()+this.offset)},t.exports=o},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var i="string",o="boolean",n="number",s="array",r="date",a="object",h="dom",d="moment",l="any",c={configure:{enabled:{"boolean":o},filter:{"boolean":o,"function":"function"},container:{dom:h},__type__:{object:a,"boolean":o,"function":"function"}},align:{string:i},autoResize:{"boolean":o},throttleRedraw:{number:n},clickToUse:{"boolean":o},dataAttributes:{string:i,array:s},editable:{add:{"boolean":o,undefined:"undefined"},remove:{"boolean":o,undefined:"undefined"},updateGroup:{"boolean":o,undefined:"undefined"},updateTime:{"boolean":o,undefined:"undefined"},__type__:{"boolean":o,object:a}},end:{number:n,date:r,string:i,moment:d},format:{minorLabels:{millisecond:{string:i,undefined:"undefined"},second:{string:i,undefined:"undefined"},minute:{string:i,undefined:"undefined"},hour:{string:i,undefined:"undefined"},weekday:{string:i,undefined:"undefined"},day:{string:i,undefined:"undefined"},month:{string:i,undefined:"undefined"},year:{string:i,undefined:"undefined"},__type__:{object:a}},majorLabels:{millisecond:{string:i,undefined:"undefined"},second:{string:i,undefined:"undefined"},minute:{string:i,undefined:"undefined"},hour:{string:i,undefined:"undefined"},weekday:{string:i,undefined:"undefined"},day:{string:i,undefined:"undefined"},month:{string:i,undefined:"undefined"},year:{string:i,undefined:"undefined"},__type__:{object:a}},__type__:{object:a}},moment:{"function":"function"},groupOrder:{string:i,"function":"function"},groupEditable:{add:{"boolean":o,undefined:"undefined"},remove:{"boolean":o,undefined:"undefined"},order:{"boolean":o,undefined:"undefined"},__type__:{"boolean":o,object:a}},groupOrderSwap:{"function":"function"},height:{string:i,number:n},hiddenDates:{start:{date:r,number:n,string:i,moment:d},end:{date:r,number:n,string:i,moment:d},repeat:{string:i},__type__:{object:a,array:s}},itemsAlwaysDraggable:{"boolean":o},locale:{string:i},locales:{__any__:{any:l},__type__:{object:a}},margin:{axis:{number:n},item:{horizontal:{number:n,undefined:"undefined"},vertical:{number:n,undefined:"undefined"},__type__:{object:a,number:n}},__type__:{object:a,number:n}},max:{date:r,number:n,string:i,moment:d},maxHeight:{number:n,string:i},maxMinorChars:{number:n},min:{date:r,number:n,string:i,moment:d},minHeight:{number:n,string:i},moveable:{"boolean":o},multiselect:{"boolean":o},multiselectPerGroup:{"boolean":o},onAdd:{"function":"function"},onUpdate:{"function":"function"},onMove:{"function":"function"},onMoving:{"function":"function"},onRemove:{"function":"function"},onAddGroup:{"function":"function"},onMoveGroup:{"function":"function"},onRemoveGroup:{"function":"function"},order:{"function":"function"},orientation:{axis:{string:i,undefined:"undefined"},item:{string:i,undefined:"undefined"},__type__:{string:i,object:a}},selectable:{"boolean":o},showCurrentTime:{"boolean":o},showMajorLabels:{"boolean":o},showMinorLabels:{"boolean":o},stack:{"boolean":o},snap:{"function":"function","null":"null"},start:{date:r,number:n,string:i,moment:d},template:{"function":"function"},groupTemplate:{"function":"function"},timeAxis:{scale:{string:i,undefined:"undefined"},step:{number:n,undefined:"undefined"},__type__:{object:a}},type:{string:i},width:{string:i,number:n},zoomable:{"boolean":o},zoomKey:{string:["ctrlKey","altKey","metaKey",""]},zoomMax:{number:n},zoomMin:{number:n},__type__:{object:a}},u={global:{align:["center","left","right"],autoResize:!0,throttleRedraw:[10,0,1e3,10],clickToUse:!1,editable:{add:!1,remove:!1,updateGroup:!1,updateTime:!1},end:"",format:{minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",month:"YYYY",year:""}},groupsDraggable:!1,height:"",locale:"",margin:{axis:[20,0,100,1],item:{horizontal:[10,0,100,1],vertical:[10,0,100,1]}},max:"",maxHeight:"",maxMinorChars:[7,0,20,1],min:"",minHeight:"",moveable:!1,multiselect:!1,multiselectPerGroup:!1,orientation:{axis:["both","bottom","top"],item:["bottom","top"]},selectable:!0,showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,stack:!0,start:"",type:["box","point","range","background"],width:"100%",zoomable:!0,zoomKey:["ctrlKey","altKey","metaKey",""],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1]}};e.allOptions=c,e.configureOptions=u},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e,i,o){if(!(Array.isArray(i)||i instanceof c||i instanceof u)&&i instanceof Object){var n=o;o=i,i=n}var s=this;this.defaultOptions={start:null,end:null,autoResize:!0,orientation:{axis:"bottom",item:"bottom"},moment:d,width:null,height:null,maxHeight:null,minHeight:null},this.options=l.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this)},hiddenDates:[],util:{toScreen:s._toScreen.bind(s),toGlobalScreen:s._toGlobalScreen.bind(s),toTime:s._toTime.bind(s),toGlobalTime:s._toGlobalTime.bind(s)}},this.range=new p(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new m(this.body),this.components.push(this.timeAxis),this.currentTime=new v(this.body),this.components.push(this.currentTime),this.linegraph=new y(this.body),this.components.push(this.linegraph),this.itemsData=null,this.groupsData=null,this.on("tap",function(t){s.emit("click",s.getEventProperties(t))}),this.on("doubletap",function(t){s.emit("doubleClick",s.getEventProperties(t))}),this.dom.root.oncontextmenu=function(t){s.emit("contextmenu",s.getEventProperties(t))},o&&this.setOptions(o),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}var s=i(20),r=o(s),a=i(26),h=o(a),d=(i(12),i(22),i(2)),l=i(1),c=i(8),u=i(10),p=i(27),f=i(30),m=i(41),v=i(46),g=i(44),y=i(49),b=i(26).printStyle,_=i(57).allOptions,w=i(57).configureOptions;n.prototype=new f, +n.prototype.setOptions=function(t){var e=h["default"].validate(t,_);e===!0&&console.log("%cErrors have been found in the supplied options object.",b),f.prototype.setOptions.call(this,t)},n.prototype.setItems=function(t){var e,i=null==this.itemsData;if(e=t?t instanceof c||t instanceof u?t:new c(t,{type:{start:"Date",end:"Date"}}):null,this.itemsData=e,this.linegraph&&this.linegraph.setItems(e),i)if(void 0!=this.options.start||void 0!=this.options.end){var o=void 0!=this.options.start?this.options.start:null,n=void 0!=this.options.end?this.options.end:null;this.setWindow(o,n,{animation:!1})}else this.fit({animation:!1})},n.prototype.setGroups=function(t){var e;e=t?t instanceof c||t instanceof u?t:new c(t):null,this.groupsData=e,this.linegraph.setGroups(e)},n.prototype.getLegend=function(t,e,i){return void 0===e&&(e=15),void 0===i&&(i=15),void 0!==this.linegraph.groups[t]?this.linegraph.groups[t].getLegend(e,i):"cannot find group:'"+t+"'"},n.prototype.isGroupVisible=function(t){return void 0!==this.linegraph.groups[t]?this.linegraph.groups[t].visible&&(void 0===this.linegraph.options.groups.visibility[t]||1==this.linegraph.options.groups.visibility[t]):!1},n.prototype.getDataRange=function(){var t=null,e=null;for(var i in this.linegraph.groups)if(this.linegraph.groups.hasOwnProperty(i)&&1==this.linegraph.groups[i].visible)for(var o=0;os?s:t,e=null==e?s:s>e?s:e}return{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},n.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,o=e-l.getAbsoluteLeft(this.dom.centerContainer),n=i-l.getAbsoluteTop(this.dom.centerContainer),s=this._toTime(o),r=g.customTimeFromTarget(t),a=l.getTarget(t),h=null;l.hasParent(a,this.timeAxis.dom.foreground)?h="axis":this.timeAxis2&&l.hasParent(a,this.timeAxis2.dom.foreground)?h="axis":l.hasParent(a,this.linegraph.yAxisLeft.dom.frame)?h="data-axis":l.hasParent(a,this.linegraph.yAxisRight.dom.frame)?h="data-axis":l.hasParent(a,this.linegraph.legendLeft.dom.frame)?h="legend":l.hasParent(a,this.linegraph.legendRight.dom.frame)?h="legend":null!=r?h="custom-time":l.hasParent(a,this.currentTime.bar)?h="current-time":l.hasParent(a,this.dom.center)&&(h="background");var d=[],c=this.linegraph.yAxisLeft,u=this.linegraph.yAxisRight;return c.hidden||d.push(c.screenToValue(n)),u.hidden||d.push(u.screenToValue(n)),{event:t,what:h,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:n,time:s,value:d}},n.prototype._createConfigurator=function(){return new r["default"](this,this.dom.container,w)},t.exports=n},function(t,e,i){function o(t,e){this.id=s.randomUUID(),this.body=t,this.defaultOptions={yAxisOrientation:"left",defaultGroup:"default",sort:!0,sampling:!0,stack:!1,graphHeight:"400px",shaded:{enabled:!1,orientation:"bottom"},style:"line",barChart:{width:50,sideBySide:!1,align:"center"},interpolation:{enabled:!0,parametrization:"centripetal",alpha:.5},drawPoints:{enabled:!0,size:6,style:"square"},dataAxis:{},legend:{},groups:{visibility:{}}},this.options=s.extend({},this.defaultOptions),this.dom={},this.props={},this.hammer=null,this.groups={},this.abortedGraphUpdate=!1,this.updateSVGheight=!1,this.updateSVGheightOnResize=!1,this.forceGraphUpdate=!0;var i=this;this.itemsData=null,this.groupsData=null,this.itemListeners={add:function(t,e,o){i._onAdd(e.items)},update:function(t,e,o){i._onUpdate(e.items)},remove:function(t,e,o){i._onRemove(e.items)}},this.groupListeners={add:function(t,e,o){i._onAddGroups(e.items)},update:function(t,e,o){i._onUpdateGroups(e.items)},remove:function(t,e,o){i._onRemoveGroups(e.items)}},this.items={},this.selection=[],this.lastStart=this.body.range.start,this.touchParams={},this.svgElements={},this.setOptions(e),this.groupsUsingDefaultStyles=[0],this.body.emitter.on("rangechanged",function(){i.lastStart=i.body.range.start,i.svg.style.left=s.option.asSize(-i.props.width),i.forceGraphUpdate=!0,i.redraw.call(i)}),this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups}}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s=i(1),r=i(7),a=i(8),h=i(10),d=i(28),l=i(50),c=i(52),u=i(56),p=i(53),f=i(55),m=i(54),v="__ungrouped__";o.prototype=new d,o.prototype._create=function(){var t=document.createElement("div");t.className="vis-line-graph",this.dom.frame=t,this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="relative",this.svg.style.height=(""+this.options.graphHeight).replace("px","")+"px",this.svg.style.display="block",t.appendChild(this.svg),this.options.dataAxis.orientation="left",this.yAxisLeft=new l(this.body,this.options.dataAxis,this.svg,this.options.groups),this.options.dataAxis.orientation="right",this.yAxisRight=new l(this.body,this.options.dataAxis,this.svg,this.options.groups),delete this.options.dataAxis.orientation,this.legendLeft=new u(this.body,this.options.legend,"left",this.options.groups),this.legendRight=new u(this.body,this.options.legend,"right",this.options.groups),this.show()},o.prototype.setOptions=function(t){if(t){var e=["sampling","defaultGroup","stack","height","graphHeight","yAxisOrientation","style","barChart","dataAxis","sort","groups"];void 0===t.graphHeight&&void 0!==t.height?(this.updateSVGheight=!0,this.updateSVGheightOnResize=!0):void 0!==this.body.domProps.centerContainer.height&&void 0!==t.graphHeight&&parseInt((t.graphHeight+"").replace("px",""))i?-1:1});for(var o=new Array(t.length),n=0;n0){var h={};for(this._getRelevantData(a,h,n,s),this._applySampling(a,h),e=0;e0)switch(t.options.style){case"line":l.hasOwnProperty(a[e])||(l[a[e]]=f.calcPath(h[a[e]],t)),f.draw(l[a[e]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||m.draw(h[a[e]],t,this.framework);break;case"bar":}}}return r.cleanupElements(this.svgElements),!1},o.prototype._stack=function(t,e){var i,o,n,s,r;i=0;for(var a=0;at[a].x){r=e[h],s=0==h?r:e[h-1],i=h;break}}void 0===r&&(s=e[e.length-1],r=e[e.length-1]),o=r.x-s.x,n=r.y-s.y,0==o?t[a].y=t[a].orginalY+r.y:t[a].y=t[a].orginalY+n/o*(t[a].x-s.x)+s.y}},o.prototype._getRelevantData=function(t,e,i,o){var n,r,a,h;if(t.length>0)for(r=0;rt?-1:1},c=Math.max(0,s.binarySearchValue(d,i,"x","before",l)),u=Math.min(d.length,s.binarySearchValue(d,o,"x","after",l)+1);0>=u&&(u=d.length);var p=new Array(u-c);for(a=c;u>a;a++)h=n.itemsData[a],p[a-c]=h;e[t[r]]=p}else e[t[r]]=n.itemsData}},o.prototype._applySampling=function(t,e){var i;if(t.length>0)for(var o=0;o0){var s=1,r=n.length,a=this.body.util.toGlobalScreen(n[n.length-1].x)-this.body.util.toGlobalScreen(n[0].x),h=r/a;s=Math.min(Math.ceil(.2*r),Math.max(1,Math.round(h)));for(var d=new Array(r),l=0;r>l;l+=s){var c=Math.round(l/s);d[c]=n[l]}e[t[o]]=d.splice(0,Math.round(r/s))}}},o.prototype._getYRanges=function(t,e,i){var o,n,s,r,a=[],h=[];if(t.length>0){for(s=0;s0&&(n=this.groups[t[s]],r.stack===!0&&"bar"===r.style?"left"===r.yAxisOrientation?a=a.concat(n.getItems()):h=h.concat(n.getItems()):i[t[s]]=n.getYRange(o,t[s]));p.getStackedYRange(a,i,t,"__barStackLeft","left"),p.getStackedYRange(h,i,t,"__barStackRight","right")}},o.prototype._updateYAxis=function(t,e){var i,o,n=!1,s=!1,r=!1,a=1e9,h=1e9,d=-1e9,l=-1e9;if(t.length>0){for(var c=0;ci?i:a,d=o>d?o:d):(r=!0,h=h>i?i:h,l=o>l?o:l));1==s&&this.yAxisLeft.setRange(a,d),1==r&&this.yAxisRight.setRange(h,l)}n=this._toggleAxisVisiblity(s,this.yAxisLeft)||n,n=this._toggleAxisVisiblity(r,this.yAxisRight)||n,1==r&&1==s?(this.yAxisLeft.drawIcons=!0,this.yAxisRight.drawIcons=!0):(this.yAxisLeft.drawIcons=!1,this.yAxisRight.drawIcons=!1),this.yAxisRight.master=!s,this.yAxisRight.masterAxis=this.yAxisLeft,0==this.yAxisRight.master?(1==r?this.yAxisLeft.lineOffset=this.yAxisRight.width:this.yAxisLeft.lineOffset=0,n=this.yAxisLeft.redraw()||n,n=this.yAxisRight.redraw()||n):n=this.yAxisRight.redraw()||n;for(var p=["__barStackLeft","__barStackRight","__lineStackLeft","__lineStackRight"],c=0;ct?-1:1});for(var a=0;a=0&&t._redrawLabel(o-2,e.val,i,"vis-y-axis vis-major",t.props.majorCharHeight),t.master===!0&&(n?t._redrawLine(o,i,"vis-grid vis-horizontal vis-major",t.options.majorLinesOffset,t.props.majorLineWidth):t._redrawLine(o,i,"vis-grid vis-horizontal vis-minor",t.options.minorLinesOffset,t.props.minorLineWidth))});var d=0;void 0!==this.options[i].title&&void 0!==this.options[i].title.text&&(d=this.props.titleCharHeight);var l=this.options.icons===!0?Math.max(this.options.iconWidth,d)+this.options.labelOffsetX+15:d+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-l&&this.options.visible===!0?(this.width=this.maxLabelSize+l,this.options.width=this.width+"px",s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),this.redraw(),e=!0):this.maxLabelSizethis.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+l),this.options.width=this.width+"px",s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),this.redraw(),e=!0):(s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),e=!1),e},o.prototype.convertValue=function(t){return this.scale.convertValue(t)},o.prototype.screenToValue=function(t){return this.scale.screenToValue(t)},o.prototype._redrawLabel=function(t,e,i,o,n){var r=s.getDOMElement("div",this.DOMelements.labels,this.dom.frame);r.className=o,r.innerHTML=e,"left"===i?(r.style.left="-"+this.options.labelOffsetX+"px",r.style.textAlign="right"):(r.style.right="-"+this.options.labelOffsetX+"px",r.style.textAlign="left"),r.style.top=t-.5*n+this.options.labelOffsetY+"px",e+="";var a=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize.5*(h.magnitudefactor*h.minorSteps[h.minorStepIdx])?e+h.magnitudefactor*h.minorSteps[h.minorStepIdx]:e};i&&(this._start-=2*this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._start=d(this._start)),o&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=d(this._end)),this.determineScale()}}i.prototype.setCharHeight=function(t){this.majorCharHeight=t},i.prototype.setHeight=function(t){this.containerHeight=t},i.prototype.determineScale=function(){var t=this._end-this._start;this.scale=this.containerHeight/t;var e=this.majorCharHeight/this.scale,i=t>0?Math.round(Math.log(t)/Math.LN10):0;this.minorStepIdx=-1,this.magnitudefactor=Math.pow(10,i);var o=0;0>i&&(o=i);for(var n=!1,s=o;Math.abs(s)<=Math.abs(i);s++){this.magnitudefactor=Math.pow(10,s);for(var r=0;r=e){n=!0,this.minorStepIdx=r;break}}if(n===!0)break}},i.prototype.is_major=function(t){return t%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])===0},i.prototype.getStep=function(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]},i.prototype.getFirstMajor=function(){var t=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(t-this._start%t)%t)},i.prototype.formatValue=function(t){var e=t.toPrecision(5);return"function"==typeof this.formattingFunction&&(e=this.formattingFunction(t)),"number"==typeof e?""+e:"string"==typeof e?e:t.toPrecision(5)},i.prototype.getLines=function(){for(var t=[],e=this.getStep(),i=(e-this._start%e)%e,o=this._start+i;this._end-o>1e-5;o+=e)o!=this._start&&t.push({major:this.is_major(o),y:this.convertValue(o),val:this.formatValue(o)});return t},i.prototype.followScale=function(t){var e=this.minorStepIdx,i=this._start,o=this._end,n=this,s=function(){n.magnitudefactor*=2},r=function(){n.magnitudefactor/=2};t.minorStepIdx<=1&&this.minorStepIdx<=1||t.minorStepIdx>1&&this.minorStepIdx>1||(t.minorStepIdxo+1e-5)r(),d=!1;else{if(!this.autoScaleStart&&this._start=0)){r(),d=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}this.autoScaleStart&&this.autoScaleEnd&&o-i>c?(s(),d=!1):d=!0}}},i.prototype.convertValue=function(t){return this.containerHeight-(t-this._start)*this.scale},i.prototype.screenToValue=function(t){return(this.containerHeight-t)/this.scale+this._start},t.exports=i},function(t,e,i){function o(t,e,i,o){this.id=e;var n=["sampling","style","sort","yAxisOrientation","barChart","drawPoints","shaded","interpolation","zIndex","excludeFromStacking","excludeFromLegend"];this.options=s.selectiveBridgeObject(n,i),this.usingDefaultStyle=void 0===t.className,this.groupsUsingDefaultStyles=o, +this.zeroPosition=0,this.update(t),1==this.usingDefaultStyle&&(this.groupsUsingDefaultStyles[0]+=1),this.itemsData=[],this.visible=void 0===t.visible?!0:t.visible}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s=i(1),r=(i(7),i(53)),a=i(55),h=i(54);o.prototype.setItems=function(t){null!=t?(this.itemsData=t,1==this.options.sort&&s.insertSort(this.itemsData,function(t,e){return t.x>e.x?1:-1})):this.itemsData=[]},o.prototype.getItems=function(){return this.itemsData},o.prototype.setZeroPosition=function(t){this.zeroPosition=t},o.prototype.setOptions=function(t){if(void 0!==t){var e=["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"];s.selectiveDeepExtend(e,this.options,t),"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),s.mergeOptions(this.options,t,"interpolation"),s.mergeOptions(this.options,t,"drawPoints"),s.mergeOptions(this.options,t,"shaded"),t.interpolation&&"object"==n(t.interpolation)&&t.interpolation.parametrization&&("uniform"==t.interpolation.parametrization?this.options.interpolation.alpha=0:"chordal"==t.interpolation.parametrization?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization="centripetal",this.options.interpolation.alpha=.5))}},o.prototype.update=function(t){this.group=t,this.content=t.content||"graph",this.className=t.className||this.className||"vis-graph-group"+this.groupsUsingDefaultStyles[0]%10,this.visible=void 0===t.visible?!0:t.visible,this.style=t.style,this.setOptions(t.options)},o.prototype.getLegend=function(t,e,i,o,n){if(void 0==i||null==i){var s=document.createElementNS("http://www.w3.org/2000/svg","svg");i={svg:s,svgElements:{},options:this.options,groups:[this]}}switch(void 0!=o&&null!=o||(o=0),void 0!=n&&null!=n||(n=.5*e),this.options.style){case"line":a.drawIcon(this,o,n,t,e,i);break;case"points":case"point":h.drawIcon(this,o,n,t,e,i);break;case"bar":r.drawIcon(this,o,n,t,e,i)}return{icon:i.svg,label:this.content,orientation:this.options.yAxisOrientation}},o.prototype.getYRange=function(t){for(var e=t[0].y,i=t[0].y,o=0;ot[o].y?t[o].y:e,i=i0&&(i=Math.min(i,Math.abs(e[o-1].screen_x-e[o].screen_x))),0===i&&(void 0===t[e[o].screen_x]&&(t[e[o].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),t[e[o].screen_x].amount+=1)},o._getSafeDrawData=function(t,e,i){var o,n;return t0?(o=i>t?i:t,n=0,"left"===e.options.barChart.align?n-=.5*t:"right"===e.options.barChart.align&&(n+=.5*t)):(o=e.options.barChart.width,n=0,"left"===e.options.barChart.align?n-=.5*e.options.barChart.width:"right"===e.options.barChart.align&&(n+=.5*e.options.barChart.width)),{width:o,offset:n}},o.getStackedYRange=function(t,e,i,n,s){if(t.length>0){t.sort(function(t,e){return t.screen_x===e.screen_x?t.groupIde[s].screen_y?e[s].screen_y:o,n=nt[r].accumulatedNegative?t[r].accumulatedNegative:o,o=o>t[r].accumulatedPositive?t[r].accumulatedPositive:o,n=n0){var i=[];return i=1==e.options.interpolation.enabled?o._catmullRom(t,e):o._linear(t)}},o.drawIcon=function(t,e,i,o,s,r){var a,h,d=.5*s,l=n.getSVGElement("rect",r.svgElements,r.svg);if(l.setAttributeNS(null,"x",e),l.setAttributeNS(null,"y",i-d),l.setAttributeNS(null,"width",o),l.setAttributeNS(null,"height",2*d),l.setAttributeNS(null,"class","vis-outline"),a=n.getSVGElement("path",r.svgElements,r.svg),a.setAttributeNS(null,"class",t.className),void 0!==t.style&&a.setAttributeNS(null,"style",t.style),a.setAttributeNS(null,"d","M"+e+","+i+" L"+(e+o)+","+i),1==t.options.shaded.enabled&&(h=n.getSVGElement("path",r.svgElements,r.svg),"top"==t.options.shaded.orientation?h.setAttributeNS(null,"d","M"+e+", "+(i-d)+"L"+e+","+i+" L"+(e+o)+","+i+" L"+(e+o)+","+(i-d)):h.setAttributeNS(null,"d","M"+e+","+i+" L"+e+","+(i+d)+" L"+(e+o)+","+(i+d)+"L"+(e+o)+","+i),h.setAttributeNS(null,"class",t.className+" vis-icon-fill"),void 0!==t.options.shaded.style&&""!==t.options.shaded.style&&h.setAttributeNS(null,"style",t.options.shaded.style)),1==t.options.drawPoints.enabled){var c={style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size,className:t.className};n.drawPoint(e+.5*o,i,c,r.svgElements,r.svg)}},o.drawShading=function(t,e,i,o){if(1==e.options.shaded.enabled){var s=Number(o.svg.style.height.replace("px","")),r=n.getSVGElement("path",o.svgElements,o.svg),a="L";1==e.options.interpolation.enabled&&(a="C");var h,d=0;d="top"==e.options.shaded.orientation?0:"bottom"==e.options.shaded.orientation?s:Math.min(Math.max(0,e.zeroPosition),s),h="group"==e.options.shaded.orientation&&null!=i&&void 0!=i?"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" L"+i[i.length-1][0]+","+i[i.length-1][1]+" "+this.serializePath(i,a,!0)+i[0][0]+","+i[0][1]+" Z":"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" V"+d+" H"+t[0][0]+" Z",r.setAttributeNS(null,"class",e.className+" vis-fill"),void 0!==e.options.shaded.style&&r.setAttributeNS(null,"style",e.options.shaded.style),r.setAttributeNS(null,"d",h)}},o.draw=function(t,e,i){if(null!=t&&void 0!=t){var o=n.getSVGElement("path",i.svgElements,i.svg);o.setAttributeNS(null,"class",e.className),void 0!==e.style&&o.setAttributeNS(null,"style",e.style);var s="L";1==e.options.interpolation.enabled&&(s="C"),o.setAttributeNS(null,"d","M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,s,!1))}},o.serializePath=function(t,e,i){if(t.length<2)return"";var o=e;if(i)for(var n=t.length-2;n>0;n--)o+=t[n][0]+","+t[n][1]+" ";else for(var n=1;nl;l++)e=0==l?t[0]:t[l-1],i=t[l],o=t[l+1],n=d>l+2?t[l+2]:o,s={screen_x:(-e.screen_x+6*i.screen_x+o.screen_x)*h,screen_y:(-e.screen_y+6*i.screen_y+o.screen_y)*h},r={screen_x:(i.screen_x+6*o.screen_x-n.screen_x)*h,screen_y:(i.screen_y+6*o.screen_y-n.screen_y)*h},a.push([s.screen_x,s.screen_y]),a.push([r.screen_x,r.screen_y]),a.push([o.screen_x,o.screen_y]);return a},o._catmullRom=function(t,e){var i=e.options.interpolation.alpha;if(0==i||void 0===i)return this._catmullRomUniform(t);var o,n,s,r,a,h,d,l,c,u,p,f,m,v,g,y,b,_,w,x=[];x.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]);for(var k=t.length,O=0;k-1>O;O++)o=0==O?t[0]:t[O-1],n=t[O],s=t[O+1],r=k>O+2?t[O+2]:s,d=Math.sqrt(Math.pow(o.screen_x-n.screen_x,2)+Math.pow(o.screen_y-n.screen_y,2)),l=Math.sqrt(Math.pow(n.screen_x-s.screen_x,2)+Math.pow(n.screen_y-s.screen_y,2)),c=Math.sqrt(Math.pow(s.screen_x-r.screen_x,2)+Math.pow(s.screen_y-r.screen_y,2)),v=Math.pow(c,i),y=Math.pow(c,2*i),g=Math.pow(l,i),b=Math.pow(l,2*i),w=Math.pow(d,i),_=Math.pow(d,2*i),u=2*_+3*w*g+b,p=2*y+3*v*g+b,f=3*w*(w+g),f>0&&(f=1/f),m=3*v*(v+g),m>0&&(m=1/m),a={screen_x:(-b*o.screen_x+u*n.screen_x+_*s.screen_x)*f,screen_y:(-b*o.screen_y+u*n.screen_y+_*s.screen_y)*f},h={screen_x:(y*n.screen_x+p*s.screen_x-b*r.screen_x)*m,screen_y:(y*n.screen_y+p*s.screen_y-b*r.screen_y)*m},0==a.screen_x&&0==a.screen_y&&(a=n),0==h.screen_x&&0==h.screen_y&&(h=s),x.push([a.screen_x,a.screen_y]),x.push([h.screen_x,h.screen_y]),x.push([s.screen_x,s.screen_y]);return x},o._linear=function(t){for(var e=[],i=0;it?-1:1});for(var i=0;i")}this.dom.textArea.innerHTML=s,this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},o.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=Object.keys(this.groups);t.sort(function(t,e){return e>t?-1:1}),s.resetElements(this.svgElements);var e=window.getComputedStyle(this.dom.frame).paddingTop,i=Number(e.replace("px","")),o=i,n=this.options.iconSize,r=.75*this.options.iconSize,a=i+.5*r+3;this.svg.style.width=n+5+i+"px";for(var h=0;h0){var i=this.groupIndex%this.groupsArray.length;this.groupIndex++,e={},e.color=this.groups[this.groupsArray[i]],this.groups[t]=e}else{var o=this.defaultIndex%this.defaultGroups.length;this.defaultIndex++,e={},e.color=this.defaultGroups[o],this.groups[t]=e}return e}},{key:"add",value:function(t,e){return this.groups[t]=e,this.groupsArray.push(t),e}}]),t}();e["default"]=r},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;it.left&&this.shape.topt.top}},{key:"isBoundingBoxOverlappingWith",value:function(t){return this.shape.boundingBox.leftt.left&&this.shape.boundingBox.topt.top}}],[{key:"parseOptions",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],n=["color","font","fixed","shadow"];if(A.selectiveNotDeepExtend(n,t,e,i),A.mergeOptions(t,e,"shadow",i,o),void 0!==e.color&&null!==e.color){var s=A.parseColor(e.color);A.fillIfDefined(t.color,s)}else i===!0&&null===e.color&&(t.color=A.bridgeObject(o.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))),void 0!==e.font&&null!==e.font?a["default"].parseOptions(t.font,e):i===!0&&null===e.font&&(t.font=A.bridgeObject(o.font)),void 0!==e.scaling&&A.mergeOptions(t.scaling,e.scaling,"label",i,o.scaling)}}]),t}();e["default"]=B},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},r=function(){function t(t,e){for(var i=0;i=this.nodeOptions.scaling.label.maxVisible&&(r=Number(this.nodeOptions.scaling.label.maxVisible)/this.body.view.scale);var h=this.size.yLine,d=this._getColor(a),l=n(d,2),c=l[0],u=l[1],p=this._setAlignment(t,i,h,s),f=n(p,2);i=f[0],h=f[1],t.font=(e&&this.nodeOptions.labelHighlightBold?"bold ":"")+r+"px "+this.fontOptions.face,t.fillStyle=c,this.isEdgeLabel||"left"!==this.fontOptions.align?t.textAlign="center":(t.textAlign=this.fontOptions.align,i-=.5*this.size.width),this.fontOptions.strokeWidth>0&&(t.lineWidth=this.fontOptions.strokeWidth,t.strokeStyle=u,t.lineJoin="round");for(var m=0;m0&&t.strokeText(this.lines[m],i,h),t.fillText(this.lines[m],i,h),h+=r}},{key:"_setAlignment",value:function(t,e,i,o){if(this.isEdgeLabel&&"horizontal"!==this.fontOptions.align&&this.pointToSelf===!1){e=0,i=0;var n=2;"top"===this.fontOptions.align?(t.textBaseline="alphabetic",i-=2*n):"bottom"===this.fontOptions.align?(t.textBaseline="hanging",i+=2*n):t.textBaseline="middle"}else t.textBaseline=o;return[e,i]}},{key:"_getColor",value:function(t){var e=this.fontOptions.color||"#000000",i=this.fontOptions.strokeColor||"#ffffff";if(t<=this.nodeOptions.scaling.label.drawThreshold){var o=Math.max(0,Math.min(1,1-(this.nodeOptions.scaling.label.drawThreshold-t)));e=a.overrideOpacity(e,o),i=a.overrideOpacity(i,o)}return[e,i]}},{key:"getTextSize",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i={width:this._processLabel(t,e),height:this.fontOptions.size*this.lineCount,lineCount:this.lineCount};return i}},{key:"calculateLabelSize",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?0:arguments[2],o=arguments.length<=3||void 0===arguments[3]?0:arguments[3],n=arguments.length<=4||void 0===arguments[4]?"middle":arguments[4];this.labelDirty===!0&&(this.size.width=this._processLabel(t,e)),this.size.height=this.fontOptions.size*this.lineCount,this.size.left=i-.5*this.size.width,this.size.top=o-.5*this.size.height,this.size.yLine=o+.5*(1-this.lineCount)*this.fontOptions.size,"hanging"===n&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4),this.labelDirty=!1}},{key:"_processLabel",value:function(t,e){var i=0,o=[""],n=0;if(void 0!==this.nodeOptions.label){o=String(this.nodeOptions.label).split("\n"),n=o.length,t.font=(e&&this.nodeOptions.labelHighlightBold?"bold ":"")+this.fontOptions.size+"px "+this.fontOptions.face,i=t.measureText(o[0]).width;for(var s=1;n>s;s++){var r=t.measureText(o[s]).width;i=r>i?r:i}}return this.lines=o,this.lineCount=n,i}}],[{key:"parseOptions",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2];if("string"==typeof e.font){var o=e.font.split(" ");t.size=o[0].replace("px",""),t.face=o[1],t.color=o[2]}else"object"===s(e.font)&&a.fillIfDefined(t,e.font,i);t.size=Number(t.size)}}]),t}();e["default"]=h},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),this.updateBoundingBox(e,i,t,o),this.labelModule.draw(t,e,i,o)}},{key:"updateBoundingBox",value:function(t,e,i,o){this.resize(i,o),this.left=t-.5*this.width,this.top=e-.5*this.height;var n=this.options.shapeProperties.borderRadius;this.boundingBox.left=this.left-n,this.boundingBox.top=this.top-n,this.boundingBox.bottom=this.top+this.height+n,this.boundingBox.right=this.left+this.width+n}},{key:"distanceToBorder",value:function(t,e){this.resize(t);var i=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(e)),Math.abs(this.height/2/Math.sin(e)))+i}}]),e}(d["default"]);e["default"]=l},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;ithis.imageObj.height?(o=this.imageObj.width/this.imageObj.height,e=2*this.options.size*o||this.imageObj.width,i=2*this.options.size||this.imageObj.height):(o=this.imageObj.width&&this.imageObj.height?this.imageObj.height/this.imageObj.width:1,e=2*this.options.size,i=2*this.options.size*o):(e=this.imageObj.width,i=this.imageObj.height),this.width=e,this.height=i,this.radius=.5*this.width}}},{key:"_drawRawCircle",value:function(t,e,i,o,n,s){var r=this.options.borderWidth,a=this.options.borderWidthSelected||2*this.options.borderWidth,h=(o?a:r)/this.body.view.scale;t.lineWidth=Math.min(this.width,h),t.strokeStyle=o?this.options.color.highlight.border:n?this.options.color.hover.border:this.options.color.border,t.fillStyle=o?this.options.color.highlight.background:n?this.options.color.hover.background:this.options.color.background,t.circle(e,i,s),this.enableShadow(t),t.fill(),this.disableShadow(t),t.save(),h>0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore()}},{key:"_drawImageAtPosition",value:function(t){if(0!=this.imageObj.width){t.globalAlpha=1,this.enableShadow(t);var e=this.imageObj.width/this.width/this.body.view.scale;if(e>2&&this.options.shapeProperties.interpolation===!0){var i=this.imageObj.width,o=this.imageObj.height,n=document.createElement("canvas");n.width=i,n.height=i;var s=n.getContext("2d");e*=.5,i*=.5,o*=.5,s.drawImage(this.imageObj,0,0,i,o);for(var r=0,a=1;e>2&&4>a;)s.drawImage(n,r,0,i,o,r+i,0,i/2,o/2),r+=i,e*=.5,i*=.5,o*=.5,a+=1;t.drawImage(n,r,0,i,o,this.left,this.top,this.width,this.height)}else t.drawImage(this.imageObj,this.left,this.top,this.width,this.height);this.disableShadow(t)}}},{key:"_drawImageLabel",value:function(t,e,i,o){var n,s=0;if(void 0!==this.height){s=.5*this.height;var r=this.labelModule.getTextSize(t);r.lineCount>=1&&(s+=r.height/2)}n=i+s,this.options.label&&(this.labelOffset=s),this.labelModule.draw(t,e,n,o,"hanging")}}]),e}(d["default"]);e["default"]=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),this.updateBoundingBox(e,i,t,o),this.labelModule.draw(t,e,i,o)}},{key:"updateBoundingBox",value:function(t,e,i,o){this.resize(i,o),this.left=t-.5*this.width,this.top=e-.5*this.height,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:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(d["default"]);e["default"]=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),void 0!==this.options.label){var l=n+.5*this.height+3;this.labelModule.draw(t,o,l,s,"hanging")}this.updateBoundingBox(o,n)}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+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+3))}}]),e}(d["default"]);e["default"]=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),this.updateBoundingBox(e,i,t,o),this.labelModule.draw(t,e,i,o)}},{key:"updateBoundingBox",value:function(t,e,i,o){this.resize(i,o),this.left=t-.5*this.width,this.top=e-.5*this.height,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:"distanceToBorder",value:function(t,e){this.resize(t);var i=.5*this.width,o=.5*this.height,n=Math.sin(e)*i,s=Math.cos(e)*o;return i*o/Math.sqrt(n*n+s*s)}}]),e}(d["default"]);e["default"]=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i0){var i=5;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+i)}}},{key:"_icon",value:function(t,e,i,o){var n=Number(this.options.icon.size);void 0!==this.options.icon.code?(t.font=(o?"bold ":"")+n+"px "+this.options.icon.face,t.fillStyle=this.options.icon.color||"black",t.textAlign="center",t.textBaseline="middle",this.enableShadow(t),t.fillText(this.options.icon.code,e,i),this.disableShadow(t)):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(t,e){return this._distanceToBorder(t,e)}}]),e}(d["default"]);e["default"]=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),t.closePath()}this._drawImageAtPosition(t),this._drawImageLabel(t,e,i,o||n),this.updateBoundingBox(e,i)}},{key:"updateBoundingBox",value:function(t,e){this.resize(),this.left=t-this.width/2,this.top=e-this.height/2,this.boundingBox.top=this.top,this.boundingBox.left=this.left,this.boundingBox.right=this.left+this.width,this.boundingBox.bottom=this.top+this.height,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(t,e){return this._distanceToBorder(t,e)}}]),e}(d["default"]);e["default"]=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;ii.shape.height?(r=i.x+.5*i.shape.width,a=i.y-h):(r=i.x+h,a=i.y-.5*i.shape.height),s=this._pointOnCircle(r,a,h,.125),this.labelModule.draw(t,s.x,s.y,n)}}}},{key:"isOverlappingWith",value:function(t){if(this.connected){var e=10,i=this.from.x,o=this.from.y,n=this.to.x,s=this.to.y,r=t.left,a=t.top,h=this.edgeType.getDistanceToEdge(i,o,n,s,r,a);return e>h}return!1}},{key:"_rotateForLabelAlignment",value:function(t){var e=this.from.y-this.to.y,i=this.from.x-this.to.x,o=Math.atan2(e,i);(-1>o&&0>i||o>0&&0>i)&&(o+=Math.PI),t.rotate(o)}},{key:"_pointOnCircle",value:function(t,e,i,o){var n=2*o*Math.PI;return{x:t+i*Math.cos(n),y:e-i*Math.sin(n)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}}],[{key:"parseOptions",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],n=["arrowStrikethrough","id","from","hidden","hoverWidth","label","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","to","title","value","width"];if(g.selectiveDeepExtend(n,t,e,i),g.mergeOptions(t,e,"smooth",i,o),g.mergeOptions(t,e,"shadow",i,o),void 0!==e.dashes&&null!==e.dashes?t.dashes=e.dashes:i===!0&&null===e.dashes&&(t.dashes=Object.create(o.dashes)),void 0!==e.scaling&&null!==e.scaling?(void 0!==e.scaling.min&&(t.scaling.min=e.scaling.min),void 0!==e.scaling.max&&(t.scaling.max=e.scaling.max),g.mergeOptions(t.scaling,e.scaling,"label",i,o.scaling)):i===!0&&null===e.scaling&&(t.scaling=Object.create(o.scaling)),void 0!==e.arrows&&null!==e.arrows)if("string"==typeof e.arrows){var r=e.arrows.toLowerCase();-1!=r.indexOf("to")&&(t.arrows.to.enabled=!0),-1!=r.indexOf("middle")&&(t.arrows.middle.enabled=!0),-1!=r.indexOf("from")&&(t.arrows.from.enabled=!0)}else{if("object"!==s(e.arrows))throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+JSON.stringify(e.arrows));g.mergeOptions(t.arrows,e.arrows,"to",i,o.arrows),g.mergeOptions(t.arrows,e.arrows,"middle",i,o.arrows),g.mergeOptions(t.arrows,e.arrows,"from",i,o.arrows)}else i===!0&&null===e.arrows&&(t.arrows=Object.create(o.arrows));if(void 0!==e.color&&null!==e.color)if(t.color=g.deepExtend({},t.color,!0),g.isString(e.color))t.color.color=e.color,t.color.highlight=e.color,t.color.hover=e.color,t.color.inherit=!1;else{var a=!1;void 0!==e.color.color&&(t.color.color=e.color.color,a=!0),void 0!==e.color.highlight&&(t.color.highlight=e.color.highlight,a=!0),void 0!==e.color.hover&&(t.color.hover=e.color.hover,a=!0),void 0!==e.color.inherit&&(t.color.inherit=e.color.inherit),void 0!==e.color.opacity&&(t.color.opacity=Math.min(1,Math.max(0,e.color.opacity))),void 0===e.color.inherit&&a===!0&&(t.color.inherit=!1)}else i===!0&&null===e.color&&(t.color=g.bridgeObject(o.color));void 0!==e.font&&null!==e.font?h["default"].parseOptions(t.font,e):i===!0&&null===e.font&&(t.font=g.bridgeObject(o.font))}}]),t}();e["default"]=y},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(){function t(t,e){for(var i=0;iMath.abs(e)||this.options.smooth.forceDirection===!0||"horizontal"===this.options.smooth.forceDirection)&&"vertical"!==this.options.smooth.forceDirection?(o=this.from.y,s=this.to.y,i=this.from.x-r*t,n=this.to.x+r*t):(o=this.from.y-r*e,s=this.to.y+r*e,i=this.from.x,n=this.to.x),[{x:i,y:o},{x:n,y:s}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(t,e){return this._findBorderPositionBezier(t,e)}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,s){var r=arguments.length<=6||void 0===arguments[6]?this._getViaCoordinates():arguments[6],h=a(r,2),d=h[0],l=h[1];return this._getDistanceToBezierEdge(t,e,i,o,n,s,d,l)}},{key:"getPoint",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?this._getViaCoordinates():arguments[1],i=a(e,2),o=i[0],n=i[1],s=t,r=[];r[0]=Math.pow(1-s,3),r[1]=3*s*Math.pow(1-s,2),r[2]=3*Math.pow(s,2)*(1-s),r[3]=Math.pow(s,3);var h=r[0]*this.fromPoint.x+r[1]*o.x+r[2]*n.x+r[3]*this.toPoint.x,d=r[0]*this.fromPoint.y+r[1]*o.y+r[2]*n.y+r[3]*this.toPoint.y;return{x:h,y:d}}}]),e}(l["default"]);e["default"]=c},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;il;l++)c=.1*l,v[0]=Math.pow(1-c,3),v[1]=3*c*Math.pow(1-c,2),v[2]=3*Math.pow(c,2)*(1-c),v[3]=Math.pow(c,3),u=v[0]*t+v[1]*r.x+v[2]*a.x+v[3]*i,p=v[0]*e+v[1]*r.y+v[2]*a.y+v[3]*o,l>0&&(d=this._getDistanceToLine(f,m,u,p,n,s),h=h>d?d:h),f=u,m=p;return h}}]),e}(d["default"]);e["default"]=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i=l&&h>d;){var m=.5*(l+c);if(i=this.getPoint(m,a),o=Math.atan2(p.y-i.y,p.x-i.x),n=p.distanceToBorder(e,o),s=Math.sqrt(Math.pow(i.x-p.x,2)+Math.pow(i.y-p.y,2)),r=n-s,Math.abs(r)r?f===!1?l=m:c=m:f===!1?c=m:l=m,d++}return i.t=m,i}},{key:"_getDistanceToBezierEdge",value:function(t,e,i,o,n,s,r){var a=1e9,h=void 0,d=void 0,l=void 0,c=void 0,u=void 0,p=t,f=e;for(d=1;10>d;d++)l=.1*d,c=Math.pow(1-l,2)*t+2*l*(1-l)*r.x+Math.pow(l,2)*i,u=Math.pow(1-l,2)*e+2*l*(1-l)*r.y+Math.pow(l,2)*o,d>0&&(h=this._getDistanceToLine(p,f,c,u,n,s),a=a>h?h:a),p=c,f=u;return a}}]),e}(d["default"]);e["default"]=l},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function t(t,e){for(var i=0;io.shape.height?(e=o.x+.5*o.shape.width,i=o.y-n):(e=o.x+n,i=o.y-.5*o.shape.height),[e,i,n]}},{key:"_pointOnCircle",value:function(t,e,i,o){var n=2*o*Math.PI;return{x:t+i*Math.cos(n),y:e-i*Math.sin(n)}}},{key:"_findBorderPositionCircle",value:function(t,e,i){for(var o=i.x,n=i.y,s=i.low,r=i.high,a=i.direction,h=10,d=0,l=this.options.selfReferenceSize,c=void 0,u=void 0,p=void 0,f=void 0,m=void 0,v=.05,g=.5*(s+r);r>=s&&h>d&&(g=.5*(s+r),c=this._pointOnCircle(o,n,l,g),u=Math.atan2(t.y-c.y,t.x-c.x),p=t.distanceToBorder(e,u),f=Math.sqrt(Math.pow(c.x-t.x,2)+Math.pow(c.y-t.y,2)),m=p-f,!(Math.abs(m)0?a>0?s=g:r=g:a>0?r=g:s=g,d++;return c.t=g,c}},{key:"getLineWidth",value:function(t,e){return t===!0?Math.max(this.selectionWidth,.3/this.body.view.scale):e===!0?Math.max(this.hoverWidth,.3/this.body.view.scale):Math.max(this.options.width,.3/this.body.view.scale)}},{key:"getColor",value:function(t,e,i){var o=this.options.color;if(o.inherit!==!1){if("both"===o.inherit&&this.from.id!==this.to.id){var n=t.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),s=void 0,a=void 0;return s=this.from.options.color.highlight.border,a=this.to.options.color.highlight.border,this.from.selected===!1&&this.to.selected===!1?(s=r.overrideOpacity(this.from.options.color.border,this.options.color.opacity),a=r.overrideOpacity(this.to.options.color.border,this.options.color.opacity)):this.from.selected===!0&&this.to.selected===!1?a=this.to.options.color.border:this.from.selected===!1&&this.to.selected===!0&&(s=this.from.options.color.border),n.addColorStop(0,s),n.addColorStop(1,a),n}this.colorDirty===!0&&("to"===o.inherit?(this.color.highlight=this.to.options.color.highlight.border,this.color.hover=this.to.options.color.hover.border,this.color.color=r.overrideOpacity(this.to.options.color.border,o.opacity)):(this.color.highlight=this.from.options.color.highlight.border,this.color.hover=this.from.options.color.hover.border,this.color.color=r.overrideOpacity(this.from.options.color.border,o.opacity)))}else this.colorDirty===!0&&(this.color.highlight=o.highlight,this.color.hover=o.hover,this.color.color=r.overrideOpacity(o.color,o.opacity));return this.colorDirty=!1,e===!0?this.color.highlight:i===!0?this.color.hover:this.color.color}},{key:"_circle",value:function(t,e,i,o){this.enableShadow(t),t.beginPath(),t.arc(e,i,o,0,2*Math.PI,!1),t.stroke(),this.disableShadow(t)}},{key:"getDistanceToEdge",value:function(t,e,i,o,s,r,a){var h=0;if(this.from!=this.to)h=this._getDistanceToEdge(t,e,i,o,s,r,a);else{var d=this._getCircleData(),l=n(d,3),c=l[0],u=l[1],p=l[2],f=c-s,m=u-r;h=Math.abs(Math.sqrt(f*f+m*m)-p)}return this.labelModule.size.lefts&&this.labelModule.size.topr?0:h}},{key:"_getDistanceToLine",value:function(t,e,i,o,n,s){var r=i-t,a=o-e,h=r*r+a*a,d=((n-t)*r+(s-e)*a)/h;d>1?d=1:0>d&&(d=0);var l=t+d*r,c=e+d*a,u=l-n,p=c-s;return Math.sqrt(u*u+p*p)}},{key:"getArrowData",value:function(t,e,i,o,s){var r=void 0,a=void 0,h=void 0,d=void 0,l=void 0,c=void 0,u=this.getLineWidth(o,s);if("from"===e?(h=this.from,d=this.to,l=.1,c=this.options.arrows.from.scaleFactor):"to"===e?(h=this.to,d=this.from,l=-.1,c=this.options.arrows.to.scaleFactor):(h=this.to,d=this.from,c=this.options.arrows.middle.scaleFactor),h!=d)if("middle"!==e)if(this.options.smooth.enabled===!0){a=this.findBorderPosition(h,t,{via:i});var p=this.getPoint(Math.max(0,Math.min(1,a.t+l)),i);r=Math.atan2(a.y-p.y,a.x-p.x)}else r=Math.atan2(h.y-d.y,h.x-d.x),a=this.findBorderPosition(h,t);else r=Math.atan2(h.y-d.y,h.x-d.x),a=this.getPoint(.5,i);else{var f=this._getCircleData(t),m=n(f,3),v=m[0],g=m[1],y=m[2];"from"===e?(a=this.findBorderPosition(this.from,t,{x:v,y:g,low:.25,high:.6,direction:-1}),r=-2*a.t*Math.PI+1.5*Math.PI+.1*Math.PI):"to"===e?(a=this.findBorderPosition(this.from,t,{x:v,y:g,low:.6,high:1,direction:1}),r=-2*a.t*Math.PI+1.5*Math.PI-1.1*Math.PI):(a=this._pointOnCircle(v,g,y,.175),r=3.9269908169872414)}var b=15*c+3*u,_=a.x-.9*b*Math.cos(r),w=a.y-.9*b*Math.sin(r),x={x:_,y:w};return{point:a,core:x,angle:r,length:b}}},{key:"drawArrowHead",value:function(t,e,i,o){t.strokeStyle=this.getColor(t,e,i),t.fillStyle=t.strokeStyle,t.lineWidth=this.getLineWidth(e,i),t.arrow(o.point.x,o.point.y,o.angle,o.length),this.enableShadow(t),t.fill(),this.disableShadow(t)}},{key:"enableShadow",value:function(t){this.options.shadow.enabled===!0&&(t.shadowColor=this.options.shadow.color,t.shadowBlur=this.options.shadow.size,t.shadowOffsetX=this.options.shadow.x,t.shadowOffsetY=this.options.shadow.y)}},{key:"disableShadow",value:function(t){this.options.shadow.enabled===!0&&(t.shadowColor="rgba(0,0,0,0)",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0)}}]),t}();e["default"]=a},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*s,e=this.from.y-i*s):this.from.x>this.to.x&&(t=this.from.x-i*s,e=this.from.y-i*s):this.from.ythis.to.x&&(t=this.from.x-i*s,e=this.from.y+i*s)),"discrete"===o&&(t=i*s>n?this.from.x:t)):Math.abs(this.from.x-this.to.x)>Math.abs(this.from.y-this.to.y)&&(this.from.y>=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*n,e=this.from.y-i*n):this.from.x>this.to.x&&(t=this.from.x-i*n,e=this.from.y-i*n):this.from.ythis.to.x&&(t=this.from.x-i*n,e=this.from.y+i*n)),"discrete"===o&&(e=i*n>s?this.from.y:e));else if("straightCross"===o)Math.abs(this.from.x-this.to.x)<=Math.abs(this.from.y-this.to.y)?(t=this.from.x,e=this.from.yMath.abs(this.from.y-this.to.y)&&(t=this.from.x=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*s,e=this.from.y-i*s,t=this.to.xthis.to.x&&(t=this.from.x-i*s,e=this.from.y-i*s,t=this.to.x>t?this.to.x:t):this.from.ythis.to.x&&(t=this.from.x-i*s,e=this.from.y+i*s,t=this.to.x>t?this.to.x:t)):Math.abs(this.from.x-this.to.x)>Math.abs(this.from.y-this.to.y)&&(this.from.y>=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*n,e=this.from.y-i*n,e=this.to.y>e?this.to.y:e):this.from.x>this.to.x&&(t=this.from.x-i*n,e=this.from.y-i*n,e=this.to.y>e?this.to.y:e):this.from.ythis.to.x&&(t=this.from.x-i*n,e=this.from.y+i*n,e=this.to.y1||this.startedStabilization===!0)&&setTimeout(function(){t.body.emitter.emit("stabilized",{iterations:e}),t.startedStabilization=!1,t.stabilizationIterations=0},0)}},{key:"physicsTick",value:function(){if(this.startedStabilization===!1&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0),this.stabilized===!1){if(this.adaptiveTimestep===!0&&this.adaptiveTimestepEnabled===!0){var t=1.2;this.adaptiveCounter%this.adaptiveInterval===0?(this.timestep=2*this.timestep,this.calculateForces(),this.moveNodes(),this.revert(),this.timestep=.5*this.timestep,this.calculateForces(),this.moveNodes(),this.calculateForces(),this.moveNodes(),this._evaluateStepQuality()===!0?this.timestep=t*this.timestep:this.timestep/ts))return!1;return!0}},{key:"moveNodes",value:function(){for(var t=this.physicsBody.physicsNodeIndices,e=this.options.maxVelocity?this.options.maxVelocity:1e9,i=0,o=0,n=5,s=0;se?s[t].x>0?e:-e:s[t].x,i.x+=s[t].x*o}else n[t].x=0,s[t].x=0;if(i.options.fixed.y===!1){var h=this.modelOptions.damping*s[t].y,d=(n[t].y-h)/i.options.mass;s[t].y+=d*o,s[t].y=Math.abs(s[t].y)>e?s[t].y>0?e:-e:s[t].y,i.y+=s[t].y*o}else n[t].y=0,s[t].y=0;var l=Math.sqrt(Math.pow(s[t].x,2)+Math.pow(s[t].y,2));return l}},{key:"calculateForces",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve()}},{key:"_freezeNodes",value:function(){var t=this.body.nodes;for(var e in t)t.hasOwnProperty(e)&&t[e].x&&t[e].y&&(this.freezeCache[e]={x:t[e].options.fixed.x,y:t[e].options.fixed.y},t[e].options.fixed.x=!0,t[e].options.fixed.y=!0)}},{key:"_restoreFrozenNodes",value:function(){var t=this.body.nodes;for(var e in t)t.hasOwnProperty(e)&&void 0!==this.freezeCache[e]&&(t[e].options.fixed.x=this.freezeCache[e].x,t[e].options.fixed.y=this.freezeCache[e].y);this.freezeCache={}}},{key:"stabilize",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?this.options.stabilization.iterations:arguments[0];return"number"!=typeof e&&(console.log("The stabilize method needs a numeric amount of iterations. Switching to default: ",this.options.stabilization.iterations),e=this.options.stabilization.iterations),0===this.physicsBody.physicsNodeIndices.length?void(this.ready=!0):(this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,void setTimeout(function(){return t._stabilizationBatch()},0))}},{key:"_stabilizationBatch",value:function(){this.startedStabilization===!1&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0);for(var t=0;this.stabilized===!1&&t0){var t=void 0,e=this.body.nodes,i=this.physicsBody.physicsNodeIndices,o=i.length,n=this._formBarnesHutTree(e,i);this.barnesHutTree=n;for(var s=0;o>s;s++)t=e[i[s]],t.options.mass>0&&(this._getForceContribution(n.root.children.NW,t),this._getForceContribution(n.root.children.NE,t),this._getForceContribution(n.root.children.SW,t),this._getForceContribution(n.root.children.SE,t))}}},{key:"_getForceContribution",value:function(t,e){if(t.childrenCount>0){var i=void 0,o=void 0,n=void 0;i=t.centerOfMass.x-e.x,o=t.centerOfMass.y-e.y,n=Math.sqrt(i*i+o*o),n*t.calcSize>this.thetaInversed?this._calculateForces(n,i,o,e,t):4===t.childrenCount?(this._getForceContribution(t.children.NW,e),this._getForceContribution(t.children.NE,e),this._getForceContribution(t.children.SW,e),this._getForceContribution(t.children.SE,e)):t.children.data.id!=e.id&&this._calculateForces(n,i,o,e,t)}}},{key:"_calculateForces",value:function(t,e,i,o,n){0===t&&(t=.1,e=t),this.overlapAvoidanceFactor<1&&(t=Math.max(.1+this.overlapAvoidanceFactor*o.shape.radius,t-o.shape.radius));var s=this.options.gravitationalConstant*n.mass*o.options.mass/Math.pow(t,3),r=e*s,a=i*s;this.physicsBody.forces[o.id].x+=r,this.physicsBody.forces[o.id].y+=a}},{key:"_formBarnesHutTree",value:function(t,e){for(var i=void 0,o=e.length,n=t[e[0]].x,s=t[e[0]].y,r=t[e[0]].x,a=t[e[0]].y,h=1;o>h;h++){var d=t[e[h]].x,l=t[e[h]].y;t[e[h]].options.mass>0&&(n>d&&(n=d),d>r&&(r=d),s>l&&(s=l),l>a&&(a=l))}var c=Math.abs(r-n)-Math.abs(a-s);c>0?(s-=.5*c,a+=.5*c):(n+=.5*c,r-=.5*c);var u=1e-5,p=Math.max(u,Math.abs(r-n)),f=.5*p,m=.5*(n+r),v=.5*(s+a),g={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:m-f,maxX:m+f,minY:v-f,maxY:v+f},size:p,calcSize:1/p,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(g.root);for(var y=0;o>y;y++)i=t[e[y]],i.options.mass>0&&this._placeInTree(g.root,i);return g}},{key:"_updateBranchMass",value:function(t,e){var i=t.mass+e.options.mass,o=1/i;t.centerOfMass.x=t.centerOfMass.x*t.mass+e.x*e.options.mass,t.centerOfMass.x*=o,t.centerOfMass.y=t.centerOfMass.y*t.mass+e.y*e.options.mass,t.centerOfMass.y*=o,t.mass=i;var n=Math.max(Math.max(e.height,e.radius),e.width);t.maxWidth=t.maxWidthe.x?t.children.NW.range.maxY>e.y?this._placeInRegion(t,e,"NW"):this._placeInRegion(t,e,"SW"):t.children.NW.range.maxY>e.y?this._placeInRegion(t,e,"NE"):this._placeInRegion(t,e,"SE")}},{key:"_placeInRegion",value:function(t,e,i){switch(t.children[i].childrenCount){case 0:t.children[i].children.data=e,t.children[i].childrenCount=1,this._updateBranchMass(t.children[i],e);break;case 1:t.children[i].children.data.x===e.x&&t.children[i].children.data.y===e.y?(e.x+=this.seededRandom(),e.y+=this.seededRandom()):(this._splitBranch(t.children[i]),this._placeInTree(t.children[i],e));break;case 4:this._placeInTree(t.children[i],e)}}},{key:"_splitBranch",value:function(t){var e=null;1===t.childrenCount&&(e=t.children.data,t.mass=0,t.centerOfMass.x=0,t.centerOfMass.y=0),t.childrenCount=4,t.children.data=null,this._insertRegion(t,"NW"),this._insertRegion(t,"NE"),this._insertRegion(t,"SW"),this._insertRegion(t,"SE"),null!=e&&this._placeInTree(t,e)}},{key:"_insertRegion",value:function(t,e){var i=void 0,o=void 0,n=void 0,s=void 0,r=.5*t.size;switch(e){case"NW":i=t.range.minX,o=t.range.minX+r,n=t.range.minY,s=t.range.minY+r;break;case"NE":i=t.range.minX+r,o=t.range.maxX,n=t.range.minY,s=t.range.minY+r;break;case"SW":i=t.range.minX,o=t.range.minX+r,n=t.range.minY+r,s=t.range.maxY;break;case"SE":i=t.range.minX+r,o=t.range.maxX,n=t.range.minY+r,s=t.range.maxY}t.children[e]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:o,minY:n,maxY:s},size:.5*t.size,calcSize:2*t.calcSize,children:{data:null},maxWidth:0,level:t.level+1,childrenCount:0}}},{key:"_debug",value:function(t,e){void 0!==this.barnesHutTree&&(t.lineWidth=1,this._drawBranch(this.barnesHutTree.root,t,e))}},{key:"_drawBranch",value:function(t,e,i){void 0===i&&(i="#FF0000"),4===t.childrenCount&&(this._drawBranch(t.children.NW,e),this._drawBranch(t.children.NE,e),this._drawBranch(t.children.SE,e),this._drawBranch(t.children.SW,e)),e.strokeStyle=i,e.beginPath(),e.moveTo(t.range.minX,t.range.minY),e.lineTo(t.range.maxX,t.range.minY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.minY),e.lineTo(t.range.maxX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.maxY),e.lineTo(t.range.minX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.minX,t.range.maxY),e.lineTo(t.range.minX,t.range.minY),e.stroke()}}]),t}();e["default"]=n},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;ii&&(s=.5*c>i?1:u*i+p,s/=i,o=t*s,n=e*s,l[r.id].x-=o,l[r.id].y-=n,l[a.id].x+=o,l[a.id].y+=n)}}}]),t}();e["default"]=n},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;ii?-Math.pow(f*i,2)+Math.pow(f*p,2):0,0===i?i=.01:s/=i,o=t*s,n=e*s,u[r.id].x-=o,u[r.id].y-=n,u[a.id].x+=o,u[a.id].y+=n}}}]),t}();e["default"]=n},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;i0){var s=n.edges.length+1,r=this.options.centralGravity*s*n.options.mass;o[n.id].x=e*r,o[n.id].y=i*r}}}]),e}(d["default"]);e["default"]=l},function(t,e,i){ +function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},r=function(){function t(t,e){for(var i=0;i=t&&i.push(n.id)}for(var r=0;r0&&Object.keys(p).length>0&&m===!0&&o.push({nodes:u,edges:p})}}}for(var b=0;bo?r.x:o,n=r.ys?r.y:s;return{x:.5*(i+o),y:.5*(n+s)}}},{key:"openCluster",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!0:arguments[2];if(void 0===t)throw new Error("No clusterNodeId supplied to openCluster.");if(void 0===this.body.nodes[t])throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(void 0===this.body.nodes[t].containedNodes)return void console.log("The node:"+t+" is not a cluster.");var o=this.body.nodes[t],n=o.containedNodes,s=o.containedEdges;if(void 0!==e&&void 0!==e.releaseFunction&&"function"==typeof e.releaseFunction){var r={},a={x:o.x,y:o.y};for(var d in n)if(n.hasOwnProperty(d)){var l=this.body.nodes[d];r[d]={x:l.x,y:l.y}}var u=e.releaseFunction(a,r);for(var p in n)if(n.hasOwnProperty(p)){var f=this.body.nodes[p];void 0!==u[p]&&(f.x=void 0===u[p].x?o.x:u[p].x,f.y=void 0===u[p].y?o.y:u[p].y)}}else for(var m in n)if(n.hasOwnProperty(m)){var v=this.body.nodes[m];v=n[m],v.options.fixed.x===!1&&(v.x=o.x),v.options.fixed.y===!1&&(v.y=o.y)}for(var g in n)if(n.hasOwnProperty(g)){var y=this.body.nodes[g];y.vx=o.vx,y.vy=o.vy,y.setOptions({hidden:!1,physics:!0}),delete this.clusteredNodes[g]}for(var b=[],_=0;_o;)e.push(this.body.nodes[t].id),t=this.clusteredNodes[t].clusterId,o++;return e.push(this.body.nodes[t].id),e.reverse(),e}},{key:"_getConnectedId",value:function(t,e){return t.toId!=e?t.toId:t.fromId!=e?t.fromId:t.fromId}},{key:"_getHubSize",value:function(){for(var t=0,e=0,i=0,o=0,n=0;no&&(o=s.edges.length),t+=s.edges.length,e+=Math.pow(s.edges.length,2),i+=1}t/=i,e/=i;var r=e-Math.pow(t,2),a=Math.sqrt(r),h=Math.floor(t+2*a);return h>o&&(h=o),h}}]),t}();e["default"]=u},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i0)for(var a=0;ae.shape.boundingBox.left&&(s=e.shape.boundingBox.left),re.shape.boundingBox.top&&(o=e.shape.boundingBox.top),n0)for(var a=0;ae.x&&(s=e.x),re.y&&(o=e.y),n0,t.renderTimer=void 0}),this.body.emitter.on("destroy",function(){t.renderRequests=0,t.allowRedraw=!1,t.renderingActive=!1,t.requiresTimeout===!0?clearTimeout(t.renderTimer):cancelAnimationFrame(t.renderTimer),t.body.emitter.off()})}},{key:"setOptions",value:function(t){if(void 0!==t){var e=["hideEdgesOnDrag","hideNodesOnDrag"];s.selectiveDeepExtend(e,this.options,t)}}},{key:"_startRendering",value:function(){this.renderingActive===!0&&void 0===this.renderTimer&&(this.requiresTimeout===!0?this.renderTimer=window.setTimeout(this._renderStep.bind(this),this.simulationInterval):this.renderTimer=window.requestAnimationFrame(this._renderStep.bind(this)))}},{key:"_renderStep",value:function(){this.renderingActive===!0&&(this.renderTimer=void 0,this.requiresTimeout===!0&&this._startRendering(),this._redraw(),this.requiresTimeout===!1&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var t=this;this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,this.requiresTimeout===!0?window.setTimeout(function(){t._redraw(!1)},0):window.requestAnimationFrame(function(){t._redraw(!1)}))}},{key:"_redraw",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;var e=this.canvas.frame.canvas.getContext("2d");0!==this.canvas.frame.canvas.width&&0!==this.canvas.frame.canvas.height||this.canvas.setSize(),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 i=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(e.clearRect(0,0,i,o),0===this.canvas.frame.clientWidth)return;e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale),e.beginPath(),this.body.emitter.emit("beforeDrawing",e),e.closePath(),t===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&this._drawEdges(e),(this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1)&&this._drawNodes(e,t),e.beginPath(),this.body.emitter.emit("afterDrawing",e),e.closePath(),e.restore(),t===!0&&e.clearRect(0,0,i,o)}}},{key:"_resizeNodes",value:function(){var t=this.canvas.frame.canvas.getContext("2d");void 0===this.pixelRatio&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0),t.save(),t.translate(this.body.view.translation.x,this.body.view.translation.y),t.scale(this.body.view.scale,this.body.view.scale);var e=this.body.nodes,i=void 0;for(var o in e)e.hasOwnProperty(o)&&(i=e[o],i.resize(t),i.updateBoundingBox(t,i.selected));t.restore()}},{key:"_drawNodes",value:function(t){for(var e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i=this.body.nodes,o=this.body.nodeIndices,n=void 0,s=[],r=20,a=this.canvas.DOMtoCanvas({x:-r,y:-r}),h=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+r,y:this.canvas.frame.canvas.clientHeight+r}),d={top:a.y,left:a.x,bottom:h.y,right:h.x},l=0;l0){var t=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,e=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,i=this.cameraState.scale;1!=t&&1!=e?i=.5*this.cameraState.scale*(t+e):1!=t?i=this.cameraState.scale*t:1!=e&&(i=this.cameraState.scale*e),this.body.view.scale=i;var o=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),n={x:o.x-this.cameraState.position.x,y:o.y-this.cameraState.position.y};this.body.view.translation.x+=n.x*this.body.view.scale,this.body.view.translation.y+=n.y*this.body.view.scale}}},{key:"_prepareValue",value:function(t){if("number"==typeof t)return t+"px";if("string"==typeof t){if(-1!==t.indexOf("%")||-1!==t.indexOf("px"))return t;if(-1===t.indexOf("%"))return t+"px"}throw new Error("Could not use the value supplied for width or height:"+t)}},{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){var t=this.frame.canvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.frame.canvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerHTML="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(e)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var t=this;void 0!==this.hammer&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new s(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:s.DIRECTION_ALL}),r.onTouch(this.hammer,function(e){t.body.eventListeners.onTouch(e)}),this.hammer.on("tap",function(e){t.body.eventListeners.onTap(e)}),this.hammer.on("doubletap",function(e){t.body.eventListeners.onDoubleTap(e)}),this.hammer.on("press",function(e){t.body.eventListeners.onHold(e)}),this.hammer.on("panstart",function(e){t.body.eventListeners.onDragStart(e)}),this.hammer.on("panmove",function(e){t.body.eventListeners.onDrag(e)}),this.hammer.on("panend",function(e){t.body.eventListeners.onDragEnd(e)}),this.hammer.on("pinch",function(e){t.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener("mousewheel",function(e){t.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("DOMMouseScroll",function(e){t.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("mousemove",function(e){t.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener("contextmenu",function(e){t.body.eventListeners.onContext(e)}),this.hammerFrame=new s(this.frame),r.onRelease(this.hammerFrame,function(e){t.body.eventListeners.onRelease(e)})}},{key:"setSize",value:function(){var t=arguments.length<=0||void 0===arguments[0]?this.options.width:arguments[0],e=arguments.length<=1||void 0===arguments[1]?this.options.height:arguments[1];t=this._prepareValue(t),e=this._prepareValue(e);var i=!1,o=this.frame.canvas.width,n=this.frame.canvas.height,s=this.frame.canvas.getContext("2d"),r=this.pixelRatio;return this.pixelRatio=(window.devicePixelRatio||1)/(s.webkitBackingStorePixelRatio||s.mozBackingStorePixelRatio||s.msBackingStorePixelRatio||s.oBackingStorePixelRatio||s.backingStorePixelRatio||1),t!=this.options.width||e!=this.options.height||this.frame.style.width!=t||this.frame.style.height!=e?(this._getCameraState(r),this.frame.style.width=t,this.frame.style.height=e,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=t,this.options.height=e,i=!0):(this.frame.canvas.width==Math.round(this.frame.canvas.clientWidth*this.pixelRatio)&&this.frame.canvas.height==Math.round(this.frame.canvas.clientHeight*this.pixelRatio)||this._getCameraState(r),this.frame.canvas.width!=Math.round(this.frame.canvas.clientWidth*this.pixelRatio)&&(this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),i=!0),this.frame.canvas.height!=Math.round(this.frame.canvas.clientHeight*this.pixelRatio)&&(this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),i=!0)),i===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(o/this.pixelRatio),oldHeight:Math.round(n/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,i}},{key:"_XconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(t){return{x:this._XconvertCanvasToDOM(t.x),y:this._YconvertCanvasToDOM(t.y)}}},{key:"DOMtoCanvas",value:function(t){return{x:this._XconvertDOMtoCanvas(t.x),y:this._YconvertDOMtoCanvas(t.y)}}}]),t}();e["default"]=h},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i.5*this.body.nodeIndices.length)return void this.fit(t,!1);i=a["default"].getRange(this.body.nodes,t.nodes);var h=this.body.nodeIndices.length;o=12.662/(h+7.4147)+.0964822;var d=Math.min(this.canvas.frame.canvas.clientWidth/600,this.canvas.frame.canvas.clientHeight/600);o*=d}else{this.body.emitter.emit("_resizeNodes"),i=a["default"].getRange(this.body.nodes,t.nodes);var l=1.1*Math.abs(i.maxX-i.minX),c=1.1*Math.abs(i.maxY-i.minY),u=this.canvas.frame.canvas.clientWidth/l,p=this.canvas.frame.canvas.clientHeight/c;o=p>=u?u:p}o>1?o=1:0===o&&(o=1);var f=a["default"].findCenter(i),m={position:f,scale:o,animation:t.animation};this.moveTo(m)}},{key:"focus",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(void 0!==this.body.nodes[t]){var i={x:this.body.nodes[t].x,y:this.body.nodes[t].y};e.position=i,e.lockedOnNode=t,this.moveTo(e)}else console.log("Node: "+t+" cannot be found.")}},{key:"moveTo",value:function(t){return void 0===t?void(t={}):(void 0===t.offset&&(t.offset={x:0,y:0}),void 0===t.offset.x&&(t.offset.x=0),void 0===t.offset.y&&(t.offset.y=0),void 0===t.scale&&(t.scale=this.body.view.scale),void 0===t.position&&(t.position=this.getViewPosition()),void 0===t.animation&&(t.animation={duration:0}),t.animation===!1&&(t.animation={duration:0}),t.animation===!0&&(t.animation={}),void 0===t.animation.duration&&(t.animation.duration=1e3),void 0===t.animation.easingFunction&&(t.animation.easingFunction="easeInOutQuad"),void this.animateView(t))}},{key:"animateView",value:function(t){if(void 0!==t){this.animationEasingFunction=t.animation.easingFunction,this.releaseNode(),t.locked===!0&&(this.lockedOnNodeId=t.lockedOnNode,this.lockedOnNodeOffset=t.offset),0!=this.easingTime&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=t.scale,this.body.view.scale=this.targetScale;var e=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:e.x-t.position.x,y:e.y-t.position.y};this.targetTranslation={x:this.sourceTranslation.x+i.x*this.targetScale+t.offset.x,y:this.sourceTranslation.y+i.y*this.targetScale+t.offset.y},0===t.animation.duration?void 0!=this.lockedOnNodeId?(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)):(this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw")):(this.animationSpeed=1/(60*t.animation.duration*.001)||1/60,this.animationEasingFunction=t.animation.easingFunction,this.viewFunction=this._transitionRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))}}},{key:"_lockedRedraw",value:function(){var t={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},e=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:e.x-t.x,y:e.y-t.y},o=this.body.view.translation,n={ +x:o.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:o.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=n}},{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 t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];this.easingTime+=this.animationSpeed,this.easingTime=t===!0?1:this.easingTime;var e=h.easingFunctions[this.animationEasingFunction](this.easingTime);this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*e,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*e,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*e},this.easingTime>=1&&(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,void 0!=this.lockedOnNodeId&&(this.viewFunction=this._lockedRedraw.bind(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})}}]),t}();e["default"]=d},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i50&&(this.drag.pointer=this.getPointer(t.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=(new Date).valueOf())}},{key:"onTap",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect&&(t.changedPointers[0].ctrlKey||t.changedPointers[0].metaKey);this.checkSelectionChanges(e,t,i),this.selectionHandler._generateClickEvent("click",t,e)}},{key:"onDoubleTap",value:function(t){var e=this.getPointer(t.center);this.selectionHandler._generateClickEvent("doubleClick",t,e)}},{key:"onHold",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(e,t,i),this.selectionHandler._generateClickEvent("click",t,e),this.selectionHandler._generateClickEvent("hold",t,e)}},{key:"onRelease",value:function(t){if((new Date).valueOf()-this.touchTime>10){var e=this.getPointer(t.center);this.selectionHandler._generateClickEvent("release",t,e),this.touchTime=(new Date).valueOf()}}},{key:"onContext",value:function(t){var e=this.getPointer({x:t.clientX,y:t.clientY});this.selectionHandler._generateClickEvent("oncontext",t,e)}},{key:"checkSelectionChanges",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=this.selectionHandler._getSelectedEdgeCount(),n=this.selectionHandler._getSelectedNodeCount(),s=this.selectionHandler.getSelection(),r=void 0;r=i===!0?this.selectionHandler.selectAdditionalOnPoint(t):this.selectionHandler.selectOnPoint(t);var a=this.selectionHandler._getSelectedEdgeCount(),h=this.selectionHandler._getSelectedNodeCount(),d=this.selectionHandler.getSelection(),l=this._determineIfDifferent(s,d),c=l.nodesChanged,u=l.edgesChanged,p=!1;h-n>0?(this.selectionHandler._generateClickEvent("selectNode",e,t),r=!0,p=!0):c===!0&&h>0?(this.selectionHandler._generateClickEvent("deselectNode",e,t,s),this.selectionHandler._generateClickEvent("selectNode",e,t),p=!0,r=!0):0>h-n&&(this.selectionHandler._generateClickEvent("deselectNode",e,t,s),r=!0),a-o>0&&p===!1?(this.selectionHandler._generateClickEvent("selectEdge",e,t),r=!0):a>0&&u===!0?(this.selectionHandler._generateClickEvent("deselectEdge",e,t,s),this.selectionHandler._generateClickEvent("selectEdge",e,t),r=!0):0>a-o&&(this.selectionHandler._generateClickEvent("deselectEdge",e,t,s),r=!0),r===!0&&this.selectionHandler._generateClickEvent("select",e,t)}},{key:"_determineIfDifferent",value:function(t,e){for(var i=!1,o=!1,n=0;nt&&(t=1e-5),t>10&&(t=10);var o=void 0;void 0!==this.drag&&this.drag.dragging===!0&&(o=this.canvas.DOMtoCanvas(this.drag.pointer));var n=this.body.view.translation,s=t/i,r=(1-s)*e.x+n.x*s,a=(1-s)*e.y+n.y*s;if(this.body.view.scale=t,this.body.view.translation={x:r,y:a},void 0!=o){var h=this.canvas.canvasToDOM(o);this.drag.pointer.x=h.x,this.drag.pointer.y=h.y}this.body.emitter.emit("_requestRedraw"),t>i?this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale}):this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale})}}},{key:"onMouseWheel",value:function(t){if(this.options.zoomView===!0){var e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),0!==e){var i=this.body.view.scale,o=e/10;0>e&&(o/=1-o),i*=1+o;var n=this.getPointer({x:t.clientX,y:t.clientY});this.zoom(i,n)}t.preventDefault()}}},{key:"onMouseMove",value:function(t){var e=this,i=this.getPointer({x:t.clientX,y:t.clientY}),o=!1;if(void 0!==this.popup&&(this.popup.hidden===!1&&this._checkHidePopup(i),this.popup.hidden===!1&&(o=!0,this.popup.setPosition(i.x+3,i.y-5),this.popup.show())),this.options.keyboard.bindToWindow===!1&&this.options.keyboard.enabled===!0&&this.canvas.frame.focus(),o===!1&&(void 0!==this.popupTimer&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=setTimeout(function(){return e._checkShowPopup(i)},this.options.tooltipDelay))),this.options.hover===!0){var n=this.selectionHandler.getNodeAt(i);void 0===n&&(n=this.selectionHandler.getEdgeAt(i)),this.selectionHandler.hoverObject(n)}}},{key:"_checkShowPopup",value:function(t){var e=this.canvas._XconvertDOMtoCanvas(t.x),i=this.canvas._YconvertDOMtoCanvas(t.y),o={left:e,top:i,right:e,bottom:i},n=void 0===this.popupObj?void 0:this.popupObj.id,s=!1,r="node";if(void 0===this.popupObj){for(var a=this.body.nodeIndices,h=this.body.nodes,l=void 0,c=[],u=0;u0&&(this.popupObj=h[c[c.length-1]],s=!0)}if(void 0===this.popupObj&&s===!1){for(var p=this.body.edgeIndices,f=this.body.edges,m=void 0,v=[],g=0;g0&&(this.popupObj=f[v[v.length-1]],r="edge")}void 0!==this.popupObj?this.popupObj.id!==n&&(void 0===this.popup&&(this.popup=new d["default"](this.canvas.frame)),this.popup.popupTargetType=r,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(t.x+3,t.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):void 0!==this.popup&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(t){var e=this.selectionHandler._pointerToPositionObject(t),i=!1;if("node"===this.popup.popupTargetType){if(void 0!==this.body.nodes[this.popup.popupTargetId]&&(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(e),i===!0)){var o=this.selectionHandler.getNodeAt(t);i=o.id===this.popup.popupTargetId}}else void 0===this.selectionHandler.getNodeAt(t)&&void 0!==this.body.edges[this.popup.popupTargetId]&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(e));i===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),t}();e["default"]=c},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=(new Date).valueOf())}},{key:"_stopMovement",value:function(){for(var t in this.boundFunctions)this.boundFunctions.hasOwnProperty(t)&&(this.body.emitter.off("initRedraw",this.boundFunctions[t]),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(){this.body.view.scale*=1+this.options.keyboard.speed.zoom,this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale})}},{key:"_zoomOut",value:function(){this.body.view.scale/=1+this.options.keyboard.speed.zoom,this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale})}},{key:"configureKeyboardBindings",value:function(){var t=this;void 0!==this.keycharm&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=a({container:window,preventDefault:!0}):this.keycharm=a({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0&&(this.keycharm.bind("up",function(){t.bindToRedraw("_moveUp")},"keydown"),this.keycharm.bind("down",function(){t.bindToRedraw("_moveDown")},"keydown"),this.keycharm.bind("left",function(){t.bindToRedraw("_moveLeft")},"keydown"),this.keycharm.bind("right",function(){t.bindToRedraw("_moveRight")},"keydown"),this.keycharm.bind("=",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num+",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num-",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("-",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("[",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("]",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pageup",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pagedown",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("up",function(){t.unbindFromRedraw("_moveUp")},"keyup"),this.keycharm.bind("down",function(){t.unbindFromRedraw("_moveDown")},"keyup"),this.keycharm.bind("left",function(){t.unbindFromRedraw("_moveLeft")},"keyup"),this.keycharm.bind("right",function(){t.unbindFromRedraw("_moveRight")},"keyup"),this.keycharm.bind("=",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num+",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("[",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("]",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pageup",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pagedown",function(){t.unbindFromRedraw("_zoomOut")},"keyup")))}}]),t}();e["default"]=h},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;io&&(s=o-e-this.padding),sn&&(r=n-i-this.padding),r0?e===!0?this.body.nodes[o[o.length-1]]:o[o.length-1]:void 0}},{key:"_getEdgesOverlappingWith",value:function(t,e){for(var i=this.body.edges,o=0;o0?e===!0?this.body.edges[o[o.length-1]]:o[o.length-1]:void 0}},{key:"_addToSelection",value:function(t){t instanceof a["default"]?this.selectionObj.nodes[t.id]=t:this.selectionObj.edges[t.id]=t}},{key:"_addToHover",value:function(t){t instanceof a["default"]?this.hoverObj.nodes[t.id]=t:this.hoverObj.edges[t.id]=t}},{key:"_removeFromSelection",value:function(t){t instanceof a["default"]?(delete this.selectionObj.nodes[t.id],this._unselectConnectedEdges(t)):delete this.selectionObj.edges[t.id]}},{key:"unselectAll",value:function(){for(var t in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(t)&&this.selectionObj.nodes[t].unselect();for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&this.selectionObj.edges[e].unselect();this.selectionObj={nodes:{},edges:{}}}},{key:"_getSelectedNodeCount",value:function(){var t=0;for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&(t+=1);return t}},{key:"_getSelectedNode",value:function(){for(var t in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(t))return this.selectionObj.nodes[t]}},{key:"_getSelectedEdge",value:function(){for(var t in this.selectionObj.edges)if(this.selectionObj.edges.hasOwnProperty(t))return this.selectionObj.edges[t]}},{key:"_getSelectedEdgeCount",value:function(){var t=0;for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&(t+=1);return t}},{key:"_getSelectedObjectCount",value:function(){var t=0;for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&(t+=1);for(var i in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(i)&&(t+=1);return t}},{key:"_selectionIsEmpty",value:function(){for(var t in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(t))return!1;for(var e in this.selectionObj.edges)if(this.selectionObj.edges.hasOwnProperty(e))return!1;return!0}},{key:"_clusterInSelection",value:function(){for(var t in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(t)&&this.selectionObj.nodes[t].clusterSize>1)return!0;return!1}},{key:"_selectConnectedEdges",value:function(t){for(var e=0;e0&&(this.options.hierarchical.levelSeparation*=-1):this.options.hierarchical.levelSeparation<0&&(this.options.hierarchical.levelSeparation*=-1),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(e);if(i===!0)return this.body.emitter.emit("refresh"),l.deepExtend(e,this.optionsBackup)}return e}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(t){if(this.options.hierarchical.enabled===!0){void 0===t.physics||t.physics===!0?(t.physics={enabled:void 0===this.optionsBackup.physics.enabled?!0:this.optionsBackup.physics.enabled, +solver:"hierarchicalRepulsion"},this.optionsBackup.physics.enabled=void 0===this.optionsBackup.physics.enabled?!0:this.optionsBackup.physics.enabled,this.optionsBackup.physics.solver=this.optionsBackup.physics.solver||"barnesHut"):"object"===r(t.physics)?(this.optionsBackup.physics.enabled=void 0===t.physics.enabled?!0:t.physics.enabled,this.optionsBackup.physics.solver=t.physics.solver||"barnesHut",t.physics.solver="hierarchicalRepulsion"):t.physics!==!1&&(this.optionsBackup.physics.solver="barnesHut",t.physics={solver:"hierarchicalRepulsion"});var e="horizontal";"RL"!==this.options.hierarchical.direction&&"LR"!==this.options.hierarchical.direction||(e="vertical"),void 0===t.edges?(this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges={smooth:!1}):void 0===t.edges.smooth?(this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges.smooth=!1):"boolean"==typeof t.edges.smooth?(this.optionsBackup.edges={smooth:t.edges.smooth},t.edges.smooth={enabled:t.edges.smooth,type:e}):(void 0!==t.edges.smooth.type&&"dynamic"!==t.edges.smooth.type&&(e=t.edges.smooth.type),this.optionsBackup.edges={smooth:void 0===t.edges.smooth.enabled?!0:t.edges.smooth.enabled,type:void 0===t.edges.smooth.type?"dynamic":t.edges.smooth.type,roundness:void 0===t.edges.smooth.roundness?.5:t.edges.smooth.roundness,forceDirection:void 0===t.edges.smooth.forceDirection?!1:t.edges.smooth.forceDirection},t.edges.smooth={enabled:void 0===t.edges.smooth.enabled?!0:t.edges.smooth.enabled,type:e,roundness:void 0===t.edges.smooth.roundness?.5:t.edges.smooth.roundness,forceDirection:void 0===t.edges.smooth.forceDirection?!1:t.edges.smooth.forceDirection}),this.body.emitter.emit("_forceDisableDynamicCurves",e)}return t}},{key:"seededRandom",value:function(){var t=1e4*Math.sin(this.randomSeed++);return t-Math.floor(t)}},{key:"positionInitially",value:function(t){if(this.options.hierarchical.enabled!==!0){this.randomSeed=this.initialRandomSeed;for(var e=0;es){for(var r=this.body.nodeIndices.length;this.body.nodeIndices.length>s;){n+=1;var a=this.body.nodeIndices.length;n%3===0?this.body.modules.clustering.clusterBridges():this.body.modules.clustering.clusterOutliers();var h=this.body.nodeIndices.length;if(a==h&&n%3!==0||n>o)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*r)})}this.body.modules.kamadaKawai.solve(this.body.nodeIndices,this.body.edgeIndices,!0),this._shiftToCenter();for(var d=70,l=0;l0){var t=void 0,e=void 0,i=!1,o=!0,n=!1;this.hierarchicalLevels={},this.lastNodeOnLevel={},this.hierarchicalChildrenReference={},this.hierarchicalParentReference={},this.hierarchicalTrees={},this.treeIndex=-1,this.distributionOrdering={},this.distributionIndex={},this.distributionOrderingPresence={};for(e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&(t=this.body.nodes[e],void 0===t.options.x&&void 0===t.options.y&&(o=!1),void 0!==t.options.level?(i=!0,this.hierarchicalLevels[e]=t.options.level):n=!0);if(n===!0&&i===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");n===!0&&("hubsize"===this.options.hierarchical.sortMethod?this._determineLevelsByHubsize():"directed"===this.options.hierarchical.sortMethod?this._determineLevelsDirected():"custom"===this.options.hierarchical.sortMethod&&this._determineLevelsCustomCallback());for(var s in this.body.nodes)this.body.nodes.hasOwnProperty(s)&&void 0===this.hierarchicalLevels[s]&&(this.hierarchicalLevels[s]=0);var r=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(r),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var t=this,e=!1,i={},o=function(){for(var e=a(),i=0;i0)for(var n=0;n=l&&(r=Math.min(c,r),a=Math.max(c,a))}return[r,a,o,n]},l=function w(e){var i=t.hierarchicalLevels[e];if(t.hierarchicalChildrenReference[e]){var o=t.hierarchicalChildrenReference[e];if(o.length>0)for(var n=0;n1)for(var a=0;at.options.hierarchical.nodeSpacing){var u={};u[i.id]=!0;var p={};p[o.id]=!0,h(i,u),h(o,p);var f=c(i,o),m=d(u,f),v=s(m,4),g=(v[0],v[1]),y=(v[2],v[3],d(p,f)),b=s(y,4),_=b[0],w=(b[1],b[2]),x=(b[3],Math.abs(g-_));if(x>t.options.hierarchical.nodeSpacing){var k=g-_+t.options.hierarchical.nodeSpacing;k<-w+t.options.hierarchical.nodeSpacing&&(k=-w+t.options.hierarchical.nodeSpacing),0>k&&(t._shiftBlock(o.id,k),e=!0,n===!0&&t._centerParent(o))}}},m=function(o,n){for(var r=n.id,a=n.edges,l=t.hierarchicalLevels[n.id],c=t.options.hierarchical.levelSeparation*t.options.hierarchical.levelSeparation,u={},p=[],f=0;fr;r++){var a=g(o,i),h=y(o,i),d=40,l=Math.max(-d,Math.min(d,Math.round(a/h)));if(o-=l,void 0!==s[o])break;s[o]=r}return o},_=function(o){var r=t._getPositionForHierarchy(n);if(void 0===i[n.id]){var a={};a[n.id]=!0,h(n,a),i[n.id]=a}var l=d(i[n.id]),c=s(l,4),u=(c[0],c[1],c[2]),p=c[3],f=o-r,m=0;f>0?m=Math.min(f,p-t.options.hierarchical.nodeSpacing):0>f&&(m=-Math.min(-f,u-t.options.hierarchical.nodeSpacing)),0!=m&&(t._shiftBlock(n.id,m),e=!0)},w=function(i){var o=t._getPositionForHierarchy(n),r=t._getSpaceAroundNode(n),a=s(r,2),h=a[0],d=a[1],l=i-o,c=o;l>0?c=Math.min(o+(d-t.options.hierarchical.nodeSpacing),i):0>l&&(c=Math.max(o-(h-t.options.hierarchical.nodeSpacing),i)),c!==o&&(t._setPositionForHierarchy(n,c,void 0,!0),e=!0)},x=b(o,p);_(x),x=b(o,a),w(x)},v=function(i){var o=Object.keys(t.distributionOrdering);o=o.reverse();for(var n=0;i>n;n++){e=!1;for(var s=0;sn&&(e=!1,p(f,o,!0),e===!0);n++);},y=function(){for(var e in t.body.nodes)t.body.nodes.hasOwnProperty(e)&&t._centerParent(t.body.nodes[e])},b=function(){var e=Object.keys(t.distributionOrdering);e=e.reverse();for(var i=0;i0)for(var d=0;dg&&Math.abs(g)0&&Math.abs(g)0&&(r=this._getPositionForHierarchy(i[n-1])+this.options.hierarchical.nodeSpacing),this._setPositionForHierarchy(s,r,e),this._validataPositionAndContinue(s,e,r),o++}}}}},{key:"_placeBranchNodes",value:function(t,e){if(void 0!==this.hierarchicalChildrenReference[t]){for(var i=[],o=0;oe&&void 0===this.positionedNodes[s.id]))return;var a=void 0;a=0===n?this._getPositionForHierarchy(this.body.nodes[t]):this._getPositionForHierarchy(i[n-1])+this.options.hierarchical.nodeSpacing,this._setPositionForHierarchy(s,a,r),this._validataPositionAndContinue(s,r,a)}for(var h=1e9,d=-1e9,l=0;l0&&(e=this._getHubSize(),0!==e);)for(var o in this.body.nodes)if(this.body.nodes.hasOwnProperty(o)){var n=this.body.nodes[o];n.edges.length===e&&this._crawlNetwork(i,o)}}},{key:"_determineLevelsCustomCallback",value:function(){var t=this,e=1e5,i=function(t,e,i){},o=function(o,n,s){var r=t.hierarchicalLevels[o.id];void 0===r&&(t.hierarchicalLevels[o.id]=e);var a=i(d["default"].cloneOptions(o,"node"),d["default"].cloneOptions(n,"node"),d["default"].cloneOptions(s,"edge"));t.hierarchicalLevels[n.id]=t.hierarchicalLevels[o.id]+a};this._crawlNetwork(o),this._setMinLevelToZero()}},{key:"_determineLevelsDirected",value:function(){var t=this,e=1e4,i=function(i,o,n){var s=t.hierarchicalLevels[i.id];void 0===s&&(t.hierarchicalLevels[i.id]=e),n.toId==o.id?t.hierarchicalLevels[o.id]=t.hierarchicalLevels[i.id]+1:t.hierarchicalLevels[o.id]=t.hierarchicalLevels[i.id]-1};this._crawlNetwork(i),this._setMinLevelToZero()}},{key:"_setMinLevelToZero",value:function(){var t=1e9;for(var e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&void 0!==this.hierarchicalLevels[e]&&(t=Math.min(this.hierarchicalLevels[e],t));for(var i in this.body.nodes)this.body.nodes.hasOwnProperty(i)&&void 0!==this.hierarchicalLevels[i]&&(this.hierarchicalLevels[i]-=t)}},{key:"_generateMap",value:function(){var t=this,e=function(e,i){if(t.hierarchicalLevels[i.id]>t.hierarchicalLevels[e.id]){var o=e.id,n=i.id;void 0===t.hierarchicalChildrenReference[o]&&(t.hierarchicalChildrenReference[o]=[]),t.hierarchicalChildrenReference[o].push(n),void 0===t.hierarchicalParentReference[n]&&(t.hierarchicalParentReference[n]=[]),t.hierarchicalParentReference[n].push(o)}};this._crawlNetwork(e)}},{key:"_crawlNetwork",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?function(){}:arguments[0],i=arguments[1],o={},n=0,s=function d(i,n){if(void 0===o[i.id]){void 0===t.hierarchicalTrees[i.id]&&(t.hierarchicalTrees[i.id]=n,t.treeIndex=Math.max(n,t.treeIndex)),o[i.id]=!0;for(var s=void 0,r=0;r1&&("UD"===this.options.hierarchical.direction||"DU"===this.options.hierarchical.direction?t.sort(function(t,e){return t.x-e.x}):t.sort(function(t,e){return t.y-e.y}))}}]),t}();e["default"]=c},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i0&&this.options.deleteNode!==!1?(n===!0&&this._createSeperator(4),this._createDeleteButton(o)):0===t&&this.options.deleteEdge!==!1&&(n===!0&&this._createSeperator(4),this._createDeleteButton(o))),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this)),this._temporaryBindEvent("select",this.showManipulatorToolbar.bind(this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.addDescription||this.options.locales.en.addDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindEvent("click",this._performAddNode.bind(this))}},{key:"editNode",value:function(){var t=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var e=this.selectionHandler._getSelectedNode();if(void 0!==e){if(this.inMode="editNode","function"!=typeof this.options.editNode)throw new Error("No function has been configured to handle the editing of nodes.");if(e.isCluster!==!0){var i=s.deepExtend({},e.options,!1);if(i.x=e.x,i.y=e.y,2!==this.options.editNode.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editNode(i,function(e){null!==e&&void 0!==e&&"editNode"===t.inMode&&t.body.data.nodes.getDataSet().update(e),t.showManipulatorToolbar()})}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError)}else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.edgeDescription||this.options.locales.en.edgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindUI("onTouch",this._handleConnect.bind(this)),this._temporaryBindUI("onDragEnd",this._finishConnect.bind(this)),this._temporaryBindUI("onDrag",this._dragControlNode.bind(this)),this._temporaryBindUI("onRelease",this._finishConnect.bind(this)),this._temporaryBindUI("onDragStart",function(){}),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){var t=this;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",this.guiEnabled===!0){var e=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],void 0!==this.edgeBeingEditedId?!function(){var e=t.body.edges[t.edgeBeingEditedId],i=t._getNewTargetNode(e.from.x,e.from.y),o=t._getNewTargetNode(e.to.x,e.to.y);t.temporaryIds.nodes.push(i.id),t.temporaryIds.nodes.push(o.id),t.body.nodes[i.id]=i,t.body.nodeIndices.push(i.id),t.body.nodes[o.id]=o,t.body.nodeIndices.push(o.id),t._temporaryBindUI("onTouch",t._controlNodeTouch.bind(t)),t._temporaryBindUI("onTap",function(){}),t._temporaryBindUI("onHold",function(){}),t._temporaryBindUI("onDragStart",t._controlNodeDragStart.bind(t)),t._temporaryBindUI("onDrag",t._controlNodeDrag.bind(t)),t._temporaryBindUI("onDragEnd",t._controlNodeDragEnd.bind(t)),t._temporaryBindUI("onMouseMove",function(){}),t._temporaryBindEvent("beforeDrawing",function(t){var n=e.edgeType.findBorderPositions(t);i.selected===!1&&(i.x=n.from.x,i.y=n.from.y),o.selected===!1&&(o.x=n.to.x,o.y=n.to.y)}),t.body.emitter.emit("_redraw")}():this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var t=this;this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";var e=this.selectionHandler.getSelectedNodes(),i=this.selectionHandler.getSelectedEdges(),o=void 0;if(e.length>0){for(var n=0;n0&&"function"==typeof this.options.deleteEdge&&(o=this.options.deleteEdge);if("function"==typeof o){var s={nodes:e,edges:i};if(2!==o.length)throw new Error("The function for delete does not support two arguments (data, callback)");o(s,function(e){null!==e&&void 0!==e&&"delete"===t.inMode?(t.body.data.edges.getDataSet().remove(e.edges),t.body.data.nodes.getDataSet().remove(e.nodes),t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar()):(t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().remove(i),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){void 0===this.manipulationDiv&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?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",this.editMode===!0?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(t,e){var i=s.deepExtend({},this.options.controlNodeStyle);i.id="targetNode"+s.randomUUID(),i.hidden=!1,i.physics=!1,i.x=t,i.y=e;var o=this.body.functions.createNode(i);return o.shape.boundingBox={left:t,right:t,top:e,bottom:e},o}},{key:"_createEditButton",value:function(){this._clean(),this.manipulationDOM={},s.recursiveDOMDelete(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,this.toggleEditMode.bind(this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(s.recursiveDOMDelete(this.editModeDiv),s.recursiveDOMDelete(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 t=0;t=0;r--)if(n[r]!==this.selectedControlNode.id){s=this.body.nodes[n[r]];break}if(void 0!==s&&void 0!==this.selectedControlNode)if(s.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(s.id,o.to.id):this._performEditEdge(o.from.id,s.id)}else o.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(t){if((new Date).valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(t.center),this.lastTouch.translation=s.extend({},this.body.view.translation);var e=this.lastTouch,i=this.selectionHandler.getNodeAt(e);if(void 0!==i)if(i.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var o=this._getNewTargetNode(i.x,i.y);this.body.nodes[o.id]=o,this.body.nodeIndices.push(o.id);var n=this.body.functions.createEdge({id:"connectionEdge"+s.randomUUID(),from:i.id,to:o.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[n.id]=n,this.body.edgeIndices.push(n.id),this.temporaryIds.nodes.push(o.id),this.temporaryIds.edges.push(n.id)}this.touchTime=(new Date).valueOf()}}},{key:"_dragControlNode",value:function(t){var e=this.body.functions.getPointer(t.center);if(void 0!==this.temporaryIds.nodes[0]){var i=this.body.nodes[this.temporaryIds.nodes[0]];i.x=this.canvas._XconvertDOMtoCanvas(e.x),i.y=this.canvas._YconvertDOMtoCanvas(e.y),this.body.emitter.emit("_redraw")}else{var o=e.x-this.lastTouch.x,n=e.y-this.lastTouch.y;this.body.view.translation={x:this.lastTouch.translation.x+o,y:this.lastTouch.translation.y+n}}}},{key:"_finishConnect",value:function(t){var e=this.body.functions.getPointer(t.center),i=this.selectionHandler._pointerToPositionObject(e),o=void 0;void 0!==this.temporaryIds.edges[0]&&(o=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var n=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,r=n.length-1;r>=0;r--)if(-1===this.temporaryIds.nodes.indexOf(n[r])){s=this.body.nodes[n[r]];break}this._cleanupTemporaryNodesAndEdges(),void 0!==s&&(s.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):void 0!==this.body.nodes[o]&&void 0!==this.body.nodes[s.id]&&this._performAddEdge(o,s.id)),this.body.emitter.emit("_redraw")}},{key:"_performAddNode",value:function(t){var e=this,i={id:s.randomUUID(),x:t.pointer.canvas.x,y:t.pointer.canvas.y,label:"new"};if("function"==typeof this.options.addNode){if(2!==this.options.addNode.length)throw new Error("The function for add does not support two arguments (data,callback)");this.options.addNode(i,function(t){null!==t&&void 0!==t&&"addNode"===e.inMode&&(e.body.data.nodes.getDataSet().add(t),e.showManipulatorToolbar())})}else this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(t,e){var i=this,o={from:t,to:e};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(o,function(t){null!==t&&void 0!==t&&"addEdge"===i.inMode&&(i.body.data.edges.getDataSet().add(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().add(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(t,e){var i=this,o={id:this.edgeBeingEditedId,from:t,to:e};if("function"==typeof this.options.editEdge){if(2!==this.options.editEdge.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editEdge(o,function(t){null===t||void 0===t||"editEdge"!==i.inMode?(i.body.edges[o.id].updateEdgeType(),i.body.emitter.emit("_redraw")):(i.body.data.edges.getDataSet().update(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().update(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),t}();e["default"]=h},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var i="string",o="boolean",n="number",s="array",r="object",a="dom",h="any",d={configure:{enabled:{"boolean":o},filter:{"boolean":o,string:i,array:s,"function":"function"},container:{dom:a},showButton:{"boolean":o},__type__:{object:r,"boolean":o,string:i,array:s,"function":"function"}},edges:{arrows:{to:{enabled:{"boolean":o},scaleFactor:{number:n},__type__:{object:r,"boolean":o}},middle:{enabled:{"boolean":o},scaleFactor:{number:n},__type__:{object:r,"boolean":o}},from:{enabled:{"boolean":o},scaleFactor:{number:n},__type__:{object:r,"boolean":o}},__type__:{string:["from","to","middle"],object:r}},arrowStrikethrough:{"boolean":o},color:{color:{string:i},highlight:{string:i},hover:{string:i},inherit:{string:["from","to","both"],"boolean":o},opacity:{number:n},__type__:{object:r,string:i}},dashes:{"boolean":o,array:s},font:{color:{string:i},size:{number:n},face:{string:i},background:{string:i},strokeWidth:{number:n},strokeColor:{string:i},align:{string:["horizontal","top","middle","bottom"]},__type__:{object:r,string:i}},hidden:{"boolean":o},hoverWidth:{"function":"function",number:n},label:{string:i,undefined:"undefined"},labelHighlightBold:{"boolean":o},length:{number:n,undefined:"undefined"},physics:{"boolean":o},scaling:{min:{number:n},max:{number:n},label:{enabled:{"boolean":o},min:{number:n},max:{number:n},maxVisible:{number:n},drawThreshold:{number:n},__type__:{object:r,"boolean":o}},customScalingFunction:{"function":"function"},__type__:{object:r}},selectionWidth:{"function":"function",number:n},selfReferenceSize:{number:n},shadow:{enabled:{"boolean":o},color:{string:i},size:{number:n},x:{number:n},y:{number:n},__type__:{object:r,"boolean":o}},smooth:{enabled:{"boolean":o},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:n},forceDirection:{string:["horizontal","vertical","none"],"boolean":o},__type__:{object:r,"boolean":o}},title:{string:i,undefined:"undefined"},width:{number:n},value:{number:n,undefined:"undefined"},__type__:{object:r}},groups:{useDefaultGroups:{"boolean":o},__any__:"get from nodes, will be overwritten below",__type__:{object:r}},interaction:{dragNodes:{"boolean":o},dragView:{"boolean":o},hideEdgesOnDrag:{"boolean":o},hideNodesOnDrag:{"boolean":o},hover:{"boolean":o},keyboard:{enabled:{"boolean":o},speed:{x:{number:n},y:{number:n},zoom:{number:n},__type__:{object:r}},bindToWindow:{"boolean":o},__type__:{object:r,"boolean":o}},multiselect:{"boolean":o},navigationButtons:{"boolean":o},selectable:{"boolean":o},selectConnectedEdges:{"boolean":o},hoverConnectedEdges:{"boolean":o},tooltipDelay:{number:n},zoomView:{"boolean":o},__type__:{object:r}},layout:{randomSeed:{undefined:"undefined",number:n},improvedLayout:{"boolean":o},hierarchical:{enabled:{"boolean":o},levelSeparation:{number:n},nodeSpacing:{number:n},treeSpacing:{number:n},blockShifting:{"boolean":o},edgeMinimization:{"boolean":o},parentCentralization:{"boolean":o},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},__type__:{object:r,"boolean":o}},__type__:{object:r}},manipulation:{enabled:{"boolean":o},initiallyActive:{"boolean":o},addNode:{"boolean":o,"function":"function"},addEdge:{"boolean":o,"function":"function"},editNode:{"function":"function"},editEdge:{"boolean":o,"function":"function"},deleteNode:{"boolean":o,"function":"function"},deleteEdge:{"boolean":o,"function":"function"},controlNodeStyle:"get from nodes, will be overwritten below",__type__:{object:r,"boolean":o}},nodes:{borderWidth:{number:n},borderWidthSelected:{number:n,undefined:"undefined"},brokenImage:{string:i,undefined:"undefined"},color:{border:{string:i},background:{string:i},highlight:{border:{string:i},background:{string:i},__type__:{object:r,string:i}},hover:{border:{string:i},background:{string:i},__type__:{object:r,string:i}},__type__:{object:r,string:i}},fixed:{x:{"boolean":o},y:{"boolean":o},__type__:{object:r,"boolean":o}},font:{color:{string:i},size:{number:n},face:{string:i},background:{string:i},strokeWidth:{number:n},strokeColor:{string:i},__type__:{object:r,string:i}},group:{string:i,number:n,undefined:"undefined"},hidden:{"boolean":o},icon:{face:{string:i},code:{string:i},size:{number:n},color:{string:i},__type__:{object:r}},id:{string:i,number:n},image:{string:i,undefined:"undefined"},label:{string:i,undefined:"undefined"},labelHighlightBold:{"boolean":o},level:{number:n,undefined:"undefined"},mass:{number:n},physics:{"boolean":o},scaling:{min:{number:n},max:{number:n},label:{enabled:{"boolean":o},min:{number:n},max:{number:n},maxVisible:{number:n},drawThreshold:{number:n},__type__:{object:r,"boolean":o}},customScalingFunction:{"function":"function"},__type__:{object:r}},shadow:{enabled:{"boolean":o},color:{string:i},size:{number:n},x:{number:n},y:{number:n},__type__:{object:r,"boolean":o}},shape:{string:["ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon"]},shapeProperties:{borderDashes:{"boolean":o,array:s},borderRadius:{number:n},interpolation:{"boolean":o},useImageSize:{"boolean":o},useBorderWithImage:{"boolean":o},__type__:{object:r}},size:{number:n},title:{string:i,undefined:"undefined"},value:{number:n,undefined:"undefined"},x:{number:n},y:{number:n},__type__:{object:r}},physics:{enabled:{"boolean":o},barnesHut:{gravitationalConstant:{number:n},centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},damping:{number:n},avoidOverlap:{number:n},__type__:{object:r}},forceAtlas2Based:{gravitationalConstant:{number:n},centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},damping:{number:n},avoidOverlap:{number:n},__type__:{object:r}},repulsion:{centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},nodeDistance:{number:n},damping:{number:n},__type__:{object:r}},hierarchicalRepulsion:{centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},nodeDistance:{number:n},damping:{number:n},__type__:{object:r}},maxVelocity:{number:n},minVelocity:{number:n},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{"boolean":o},iterations:{number:n},updateInterval:{number:n},onlyDynamicEdges:{"boolean":o},fit:{"boolean":o},__type__:{object:r,"boolean":o}},timestep:{number:n},adaptiveTimestep:{"boolean":o},__type__:{object:r,"boolean":o}},autoResize:{"boolean":o},clickToUse:{"boolean":o},locale:{string:i},locales:{__any__:{any:h},__type__:{object:r}},height:{string:i},width:{string:i},__type__:{object:r}};d.groups.__any__=d.nodes,d.manipulation.controlNodeStyle=d.nodes;var l={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"]}},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"],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]},middle:{enabled:!1,scaleFactor:[1,0,3,.05]},from:{enabled:!1,scaleFactor:[1,0,3,.05]}},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],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"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!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},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{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:{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]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01]},global:{locale:["en","nl"]}};e.allOptions=d,e.configureOptions=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function t(t,e){for(var i=0;in&&h>a;){a+=1;var v=this._getHighestEnergyNode(i),g=s(v,4);for(c=g[0],l=g[1],u=g[2],p=g[3],f=l,m=0;f>r&&d>m;){m+=1,this._moveNode(c,u,p);var y=this._getEnergy(c),b=s(y,3);f=b[0],u=b[1],p=b[2]}}}},{key:"_getHighestEnergyNode",value:function(t){for(var e=this.body.nodeIndices,i=this.body.nodes,o=0,n=e[0],r=0,a=0,h=0;ho&&(o=u,n=d,r=p,a=f)}}return[n,o,r,a]}},{key:"_getEnergy",value:function(t){for(var e=this.body.nodeIndices,i=this.body.nodes,o=i[t].x,n=i[t].y,s=0,r=0,a=0;al;l++)for(var c=0;d-1>c;c++)for(var u=c+1;d>u;u++)o[e[c]][e[u]]=Math.min(o[e[c]][e[u]],o[e[c]][e[l]]+o[e[l]][e[u]]),o[e[u]][e[c]]=o[e[c]][e[u]];return o}}]),t}();e["default"]=n},function(t,e){"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.circle=function(t,e,i){this.beginPath(),this.arc(t,e,i,0,2*Math.PI,!1),this.closePath()},CanvasRenderingContext2D.prototype.square=function(t,e,i){this.beginPath(),this.rect(t-i,e-i,2*i,2*i),this.closePath()},CanvasRenderingContext2D.prototype.triangle=function(t,e,i){this.beginPath(),i*=1.15,e+=.275*i;var o=2*i,n=o/2,s=Math.sqrt(3)/6*o,r=Math.sqrt(o*o-n*n);this.moveTo(t,e-(r-s)),this.lineTo(t+n,e+s),this.lineTo(t-n,e+s),this.lineTo(t,e-(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.triangleDown=function(t,e,i){this.beginPath(),i*=1.15,e-=.275*i;var o=2*i,n=o/2,s=Math.sqrt(3)/6*o,r=Math.sqrt(o*o-n*n);this.moveTo(t,e+(r-s)),this.lineTo(t+n,e-s),this.lineTo(t-n,e-s),this.lineTo(t,e+(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.star=function(t,e,i){this.beginPath(),i*=.82,e+=.1*i;for(var o=0;10>o;o++){var n=o%2===0?1.3*i:.5*i;this.lineTo(t+n*Math.sin(2*o*Math.PI/10),e-n*Math.cos(2*o*Math.PI/10))}this.closePath()},CanvasRenderingContext2D.prototype.diamond=function(t,e,i){this.beginPath(),this.lineTo(t,e+i),this.lineTo(t+i,e),this.lineTo(t,e-i),this.lineTo(t-i,e),this.closePath()},CanvasRenderingContext2D.prototype.roundRect=function(t,e,i,o,n){var s=Math.PI/180;0>i-2*n&&(n=i/2),0>o-2*n&&(n=o/2),this.beginPath(),this.moveTo(t+n,e),this.lineTo(t+i-n,e),this.arc(t+i-n,e+n,n,270*s,360*s,!1),this.lineTo(t+i,e+o-n),this.arc(t+i-n,e+o-n,n,0,90*s,!1),this.lineTo(t+n,e+o),this.arc(t+n,e+o-n,n,90*s,180*s,!1),this.lineTo(t,e+n),this.arc(t+n,e+n,n,180*s,270*s,!1),this.closePath()},CanvasRenderingContext2D.prototype.ellipse=function(t,e,i,o){var n=.5522848,s=i/2*n,r=o/2*n,a=t+i,h=e+o,d=t+i/2,l=e+o/2;this.beginPath(),this.moveTo(t,l),this.bezierCurveTo(t,l-r,d-s,e,d,e),this.bezierCurveTo(d+s,e,a,l-r,a,l),this.bezierCurveTo(a,l+r,d+s,h,d,h),this.bezierCurveTo(d-s,h,t,l+r,t,l),this.closePath()},CanvasRenderingContext2D.prototype.database=function(t,e,i,o){var n=1/3,s=i,r=o*n,a=.5522848,h=s/2*a,d=r/2*a,l=t+s,c=e+r,u=t+s/2,p=e+r/2,f=e+(o-r/2),m=e+o;this.beginPath(),this.moveTo(l,p),this.bezierCurveTo(l,p+d,u+h,c,u,c),this.bezierCurveTo(u-h,c,t,p+d,t,p),this.bezierCurveTo(t,p-d,u-h,e,u,e),this.bezierCurveTo(u+h,e,l,p-d,l,p),this.lineTo(l,f),this.bezierCurveTo(l,f+d,u+h,m,u,m),this.bezierCurveTo(u-h,m,t,f+d,t,f),this.lineTo(t,p)},CanvasRenderingContext2D.prototype.arrow=function(t,e,i,o){var n=t-o*Math.cos(i),s=e-o*Math.sin(i),r=t-.9*o*Math.cos(i),a=e-.9*o*Math.sin(i),h=n+o/3*Math.cos(i+.5*Math.PI),d=s+o/3*Math.sin(i+.5*Math.PI),l=n+o/3*Math.cos(i-.5*Math.PI),c=s+o/3*Math.sin(i-.5*Math.PI);this.beginPath(),this.moveTo(t,e),this.lineTo(h,d),this.lineTo(r,a),this.lineTo(l,c),this.closePath()},CanvasRenderingContext2D.prototype.dashedLine=function(t,e,i,o,n){this.beginPath(),this.moveTo(t,e);for(var s=n.length,r=i-t,a=o-e,h=a/r,d=Math.sqrt(r*r+a*a),l=0,c=!0,u=0,p=n[0];d>=.1;)p=n[l++%s],p>d&&(p=d),u=Math.sqrt(p*p/(1+h*h)),u=0>r?-u:u,t+=u,e+=h*u,c===!0?this.lineTo(t,e):this.moveTo(t,e),d-=p,c=!c})},function(t,e){function i(t){return P=t,p()}function o(){I=0,N=P.charAt(0)}function n(){I++,N=P.charAt(I)}function s(){return P.charAt(I+1)}function r(t){return R.test(t)}function a(t,e){if(t||(t={}),e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function h(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 d(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;o>i;i++)if(e.id===r.nodes[i].id){n=r.nodes[i];break}for(n||(n={id:e.id},t.node&&(n.attr=a(n.attr,t.node))),i=s.length-1;i>=0;i--){var h=s[i];h.nodes||(h.nodes=[]),-1===h.nodes.indexOf(n)&&h.nodes.push(n)}e.attr&&(n.attr=a(n.attr,e.attr))}function l(t,e){if(t.edges||(t.edges=[]),t.edges.push(e),t.edge){var i=a({},t.edge);e.attr=a(i,e.attr)}}function c(t,e,i,o,n){var s={from:e,to:i,type:o};return t.edge&&(s.attr=a({},t.edge)),s.attr=a(s.attr||{},n),s}function u(){for(L=T.NULL,z="";" "===N||" "===N||"\n"===N||"\r"===N;)n();do{var t=!1;if("#"===N){for(var e=I-1;" "===P.charAt(e)||" "===P.charAt(e);)e--;if("\n"===P.charAt(e)||""===P.charAt(e)){for(;""!=N&&"\n"!=N;)n();t=!0}}if("/"===N&&"/"===s()){for(;""!=N&&"\n"!=N;)n();t=!0}if("/"===N&&"*"===s()){for(;""!=N;){if("*"===N&&"/"===s()){n(),n();break}n()}t=!0}for(;" "===N||" "===N||"\n"===N||"\r"===N;)n()}while(t);if(""===N)return void(L=T.DELIMITER);var i=N+s();if(E[i])return L=T.DELIMITER,z=i,n(),void n();if(E[N])return L=T.DELIMITER,z=N,void n();if(r(N)||"-"===N){for(z+=N,n();r(N);)z+=N,n();return"false"===z?z=!1:"true"===z?z=!0:isNaN(Number(z))||(z=Number(z)),void(L=T.IDENTIFIER)}if('"'===N){for(n();""!=N&&('"'!=N||'"'===N&&'"'===s());)z+=N,'"'===N&&n(),n();if('"'!=N)throw w('End of string " expected');return n(),void(L=T.IDENTIFIER)}for(L=T.UNKNOWN;""!=N;)z+=N,n();throw new SyntaxError('Syntax error in part "'+x(z,30)+'"')}function p(){var t={};if(o(),u(),"strict"===z&&(t.strict=!0,u()),"graph"!==z&&"digraph"!==z||(t.type=z,u()),L===T.IDENTIFIER&&(t.id=z,u()),"{"!=z)throw w("Angle bracket { expected");if(u(),f(t),"}"!=z)throw w("Angle bracket } expected");if(u(),""!==z)throw w("End of file expected");return u(),delete t.node,delete t.edge,delete t.graph,t}function f(t){for(;""!==z&&"}"!=z;)m(t),";"===z&&u()}function m(t){var e=v(t);if(e)return void b(t,e);var i=g(t);if(!i){if(L!=T.IDENTIFIER)throw w("Identifier expected");var o=z;if(u(),"="===z){if(u(),L!=T.IDENTIFIER)throw w("Identifier expected");t[o]=z,u()}else y(t,o)}}function v(t){var e=null;if("subgraph"===z&&(e={},e.type="subgraph",u(),L===T.IDENTIFIER&&(e.id=z,u())),"{"===z){if(u(),e||(e={}),e.parent=t,e.node=t.node,e.edge=t.edge,e.graph=t.graph,f(e),"}"!=z)throw w("Angle bracket } expected");u(),delete e.node,delete e.edge,delete e.graph,delete e.parent,t.subgraphs||(t.subgraphs=[]),t.subgraphs.push(e)}return e}function g(t){return"node"===z?(u(),t.node=_(),"node"):"edge"===z?(u(),t.edge=_(),"edge"):"graph"===z?(u(),t.graph=_(),"graph"):null}function y(t,e){var i={id:e},o=_();o&&(i.attr=o),d(t,i),b(t,e)}function b(t,e){for(;"->"===z||"--"===z;){var i,o=z;u();var n=v(t);if(n)i=n;else{if(L!=T.IDENTIFIER)throw w("Identifier or subgraph expected");i=z,d(t,{id:i}),u()}var s=_(),r=c(t,e,i,o,s);l(t,r),e=i}}function _(){for(var t=null;"["===z;){for(u(),t={};""!==z&&"]"!=z;){if(L!=T.IDENTIFIER)throw w("Attribute name expected");var e=z;if(u(),"="!=z)throw w("Equal sign = expected");if(u(),L!=T.IDENTIFIER)throw w("Attribute value expected");var i=z;h(t,e,i),u(),","==z&&u()}if("]"!=z)throw w("Bracket ] expected");u()}return t}function w(t){return new SyntaxError(t+', got "'+x(z,30)+'" (char '+I+")")}function x(t,e){return t.length<=e?t:t.substr(0,27)+"..."}function k(t,e,i){Array.isArray(t)?t.forEach(function(t){Array.isArray(e)?e.forEach(function(e){i(t,e)}):i(t,e)}):Array.isArray(e)?e.forEach(function(e){i(t,e)}):i(t,e)}function O(t,e,i){for(var o=e.split("."),n=o.pop(),s=t,r=0;r":!0,"--":!0},P="",I=0,N="",z="",L=T.NULL,R=/[a-zA-Z_0-9.:#]/;e.parseDOT=i,e.DOTToGraph=D},function(t,e){function i(t,e){var i=[],o=[],n={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};void 0!==e&&(void 0!==e.fixed&&(n.nodes.fixed=e.fixed),void 0!==e.parseColor&&(n.nodes.parseColor=e.parseColor),void 0!==e.inheritColor&&(n.edges.inheritColor=e.inheritColor));for(var s=t.edges,r=t.nodes,a=0;a'#ffffff' This is the color of the stroke assuming the value for stroke is higher than 0. + + font.align + String + 'center' + This can be set to 'left' to make the label left-aligned. Otherwise, + defaults to 'center'. + group String diff --git a/examples/network/exampleApplications/disassemblerExample.html b/examples/network/exampleApplications/disassemblerExample.html new file mode 100644 index 00000000..0245999a --- /dev/null +++ b/examples/network/exampleApplications/disassemblerExample.html @@ -0,0 +1,67 @@ + + + + + + + +

Use VisJS to diagram the Control-Flow-Graph (CFG) of a function from +a program you wish to analyze.

+


+ + + diff --git a/examples/network/labels/labelAlignment.html b/examples/network/labels/labelAlignment.html index d302bc84..2397e219 100644 --- a/examples/network/labels/labelAlignment.html +++ b/examples/network/labels/labelAlignment.html @@ -21,7 +21,10 @@ -

Labels of edges can be aligned to edges in various ways.
Label alignment for nodes (top, bottom, left, right, inside) is planned but not in vis yet.

+

Labels of edges can be aligned to edges in various ways.

+

Text-alignment within node labels can be 'left' or 'center', other font alignments not implemented.

+

Label alignment (placement of label "box") for nodes (top, bottom, left, right, inside) is +planned but not in vis yet.

@@ -30,9 +33,10 @@ var nodes = [ {id: 1, label: 'Node 1'}, {id: 2, label: 'Node 2'}, - {id: 3, label: 'Node 3'}, + {id: 3, label: 'Node 3:\nLeft-Aligned', font: {'face': 'Monospace', align: 'left'}}, {id: 4, label: 'Node 4'}, - {id: 5, label: 'Node 5'} + {id: 5, label: 'Node 5\nLeft-Aligned box', shape: 'box', + font: {'face': 'Monospace', align: 'left'}} ]; // create an array with edges diff --git a/gulpfile.js b/gulpfile.js index af46d93f..78b99401 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -45,7 +45,15 @@ var webpackConfig = { }, module: { loaders: [ - { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader'} + { + test: /\.js$/, + exclude: /node_modules/, + loader: 'babel', + query: { + cacheDirectory: true, + presets: ['es2015'] + } + } ], // exclude requires of moment.js language files diff --git a/lib/hammerUtil.js b/lib/hammerUtil.js index 4e1b79d2..caafb7de 100644 --- a/lib/hammerUtil.js +++ b/lib/hammerUtil.js @@ -46,3 +46,23 @@ exports.offTouch = function (hammer, callback) { * @param {function} callback Callback, called as callback(event) */ exports.offRelease = exports.offTouch; + +/** + * Hack the PinchRecognizer such that it doesn't prevent default behavior + * for vertical panning. + * + * Yeah ... this is quite a hack ... see https://github.com/hammerjs/hammer.js/issues/932 + * + * @param {Hammer.Pinch} pinchRecognizer + * @return {Hammer.Pinch} returns the pinchRecognizer + */ +exports.disablePreventDefaultVertically = function (pinchRecognizer) { + var TOUCH_ACTION_PAN_Y = 'pan-y'; + + pinchRecognizer.getTouchAction = function() { + // default method returns [TOUCH_ACTION_NONE] + return [TOUCH_ACTION_PAN_Y]; + }; + + return pinchRecognizer; +}; diff --git a/lib/network/Network.js b/lib/network/Network.js index 68d10c76..e01f0f16 100644 --- a/lib/network/Network.js +++ b/lib/network/Network.js @@ -2,16 +2,15 @@ require('./shapes'); let Emitter = require('emitter-component'); -let Hammer = require('../module/hammer'); let util = require('../util'); let DataSet = require('../DataSet'); let DataView = require('../DataView'); let dotparser = require('./dotparser'); let gephiParser = require('./gephiParser'); -let Images = require('./Images'); let Activator = require('../shared/Activator'); let locales = require('./locales'); +import Images from './Images'; import Groups from './modules/Groups'; import NodesHandler from './modules/NodesHandler'; import EdgesHandler from './modules/EdgesHandler'; diff --git a/lib/network/modules/Canvas.js b/lib/network/modules/Canvas.js index 9abe1f5d..e0f15abb 100644 --- a/lib/network/modules/Canvas.js +++ b/lib/network/modules/Canvas.js @@ -17,6 +17,7 @@ class Canvas { this.resizeTimer = undefined; this.resizeFunction = this._onResize.bind(this); this.cameraState = {}; + this.initialized = false; this.options = {}; this.defaultOptions = { @@ -88,10 +89,15 @@ class Canvas { * @private */ _getCameraState(pixelRatio = this.pixelRatio) { - this.cameraState.previousWidth = this.frame.canvas.width / pixelRatio; - this.cameraState.previousHeight = this.frame.canvas.height / pixelRatio; - this.cameraState.scale = this.body.view.scale; - this.cameraState.position = this.DOMtoCanvas({x: 0.5 * this.frame.canvas.width / pixelRatio, y: 0.5 * this.frame.canvas.height / pixelRatio}); + if (this.initialized === true) { + this.cameraState.previousWidth = this.frame.canvas.width / pixelRatio; + this.cameraState.previousHeight = this.frame.canvas.height / pixelRatio; + this.cameraState.scale = this.body.view.scale; + this.cameraState.position = this.DOMtoCanvas({ + x: 0.5 * this.frame.canvas.width / pixelRatio, + y: 0.5 * this.frame.canvas.height / pixelRatio + }); + } } /** @@ -216,7 +222,7 @@ class Canvas { this.hammer = new Hammer(this.frame.canvas); this.hammer.get('pinch').set({enable: true}); // enable to get better response, todo: test on mobile. - this.hammer.get('pan').set({threshold:5, direction:30}); // 30 is ALL_DIRECTIONS in hammer. + this.hammer.get('pan').set({threshold:5, direction: Hammer.DIRECTION_ALL}); hammerUtil.onTouch(this.hammer, (event) => {this.body.eventListeners.onTouch(event)}); this.hammer.on('tap', (event) => {this.body.eventListeners.onTap(event)}); @@ -311,6 +317,9 @@ class Canvas { this._setCameraState(); } + + // set initialized so the get and set camera will work from now on. + this.initialized = true; return emitEvent; }; diff --git a/lib/network/modules/NodesHandler.js b/lib/network/modules/NodesHandler.js index 475092fc..e548bd41 100644 --- a/lib/network/modules/NodesHandler.js +++ b/lib/network/modules/NodesHandler.js @@ -49,7 +49,7 @@ class NodesHandler { background: 'none', strokeWidth: 0, // px strokeColor: '#ffffff', - align: 'horizontal' + align: 'center' }, group: undefined, hidden: false, diff --git a/lib/network/modules/SelectionHandler.js b/lib/network/modules/SelectionHandler.js index 415b6ba8..ea768468 100644 --- a/lib/network/modules/SelectionHandler.js +++ b/lib/network/modules/SelectionHandler.js @@ -1,5 +1,6 @@ -let Node = require("./components/Node"); -let Edge = require("./components/Edge"); +import Node from './components/Node'; +import Edge from './components/Edge'; + let util = require('../../util'); class SelectionHandler { diff --git a/lib/network/modules/components/Edge.js b/lib/network/modules/components/Edge.js index 7afa94b1..415bf580 100644 --- a/lib/network/modules/components/Edge.js +++ b/lib/network/modules/components/Edge.js @@ -49,7 +49,7 @@ class Edge { this.connected = false; - this.labelModule = new Label(this.body, this.options); + this.labelModule = new Label(this.body, this.options, true /* It's an edge label */); this.setOptions(options); } diff --git a/lib/network/modules/components/Node.js b/lib/network/modules/components/Node.js index 79e32375..d03aace0 100644 --- a/lib/network/modules/components/Node.js +++ b/lib/network/modules/components/Node.js @@ -67,7 +67,7 @@ class Node { this.selected = false; this.hover = false; - this.labelModule = new Label(this.body, this.options); + this.labelModule = new Label(this.body, this.options, false /* Not edge label */); this.setOptions(options); } diff --git a/lib/network/modules/components/shared/Label.js b/lib/network/modules/components/shared/Label.js index 64c0c374..9e00d431 100644 --- a/lib/network/modules/components/shared/Label.js +++ b/lib/network/modules/components/shared/Label.js @@ -1,7 +1,7 @@ let util = require('../../../../util'); class Label { - constructor(body,options) { + constructor(body,options,edgelabel = false) { this.body = body; this.pointToSelf = false; @@ -9,6 +9,7 @@ class Label { this.fontOptions = {}; this.setOptions(options); this.size = {top: 0, left: 0, width: 0, height: 0, yLine: 0}; // could be cached + this.isEdgeLabel = edgelabel; } setOptions(options, allowDeletion = false) { @@ -87,19 +88,23 @@ class Label { let lineMargin = 2; - switch (this.fontOptions.align) { - case 'middle': - ctx.fillRect(-this.size.width * 0.5, -this.size.height * 0.5, this.size.width, this.size.height); - break; - case 'top': - ctx.fillRect(-this.size.width * 0.5, -(this.size.height + lineMargin), this.size.width, this.size.height); - break; - case 'bottom': - ctx.fillRect(-this.size.width * 0.5, lineMargin, this.size.width, this.size.height); - break; - default: - ctx.fillRect(this.size.left, this.size.top - 0.5*lineMargin, this.size.width, this.size.height); - break; + if (this.isEdgeLabel) { + switch (this.fontOptions.align) { + case 'middle': + ctx.fillRect(-this.size.width * 0.5, -this.size.height * 0.5, this.size.width, this.size.height); + break; + case 'top': + ctx.fillRect(-this.size.width * 0.5, -(this.size.height + lineMargin), this.size.width, this.size.height); + break; + case 'bottom': + ctx.fillRect(-this.size.width * 0.5, lineMargin, this.size.width, this.size.height); + break; + default: + ctx.fillRect(this.size.left, this.size.top - 0.5*lineMargin, this.size.width, this.size.height); + break; + } + } else { + ctx.fillRect(this.size.left, this.size.top - 0.5*lineMargin, this.size.width, this.size.height); } } } @@ -127,7 +132,13 @@ class Label { // configure context for drawing the text ctx.font = (selected && this.nodeOptions.labelHighlightBold ? 'bold ' : '') + fontSize + "px " + this.fontOptions.face; ctx.fillStyle = fontColor; - ctx.textAlign = 'center'; + // When the textAlign property is 'left', make label left-justified + if ((!this.isEdgeLabel) && this.fontOptions.align === 'left') { + ctx.textAlign = this.fontOptions.align; + x = x - 0.5 * this.size.width; // Shift label 1/2-distance to the left + } else { + ctx.textAlign = 'center'; + } // set the strokeWidth if (this.fontOptions.strokeWidth > 0) { @@ -149,7 +160,7 @@ class Label { _setAlignment(ctx, x, yLine, baseline) { // check for label alignment (for edges) // TODO: make alignment for nodes - if (this.fontOptions.align !== 'horizontal' && this.pointToSelf === false) { + if (this.isEdgeLabel && this.fontOptions.align !== 'horizontal' && this.pointToSelf === false) { x = 0; yLine = 0; diff --git a/lib/timeline/Core.js b/lib/timeline/Core.js index 86350197..97281b73 100644 --- a/lib/timeline/Core.js +++ b/lib/timeline/Core.js @@ -118,8 +118,9 @@ Core.prototype._create = function (container) { // create event listeners for all interesting events, these events will be // emitted via emitter this.hammer = new Hammer(this.dom.root); - this.hammer.get('pinch').set({enable: true}); - this.hammer.get('pan').set({threshold:5, direction:30}); // 30 is ALL_DIRECTIONS in hammer. + var pinchRecognizer = this.hammer.get('pinch').set({enable: true}); + hammerUtil.disablePreventDefaultVertically(pinchRecognizer); + this.hammer.get('pan').set({threshold:5, direction: Hammer.DIRECTION_HORIZONTAL}); this.listeners = {}; var events = [ @@ -768,6 +769,12 @@ Core.prototype._redraw = function() { dom.shadowTopRight.style.visibility = visibilityTop; dom.shadowBottomRight.style.visibility = visibilityBottom; + // enable/disable vertical panning + var contentsOverflow = this.props.center.height > this.props.centerContainer.height; + this.hammer.get('pan').set({ + direction: contentsOverflow ? Hammer.DIRECTION_ALL : Hammer.DIRECTION_HORIZONTAL + }); + // redraw all components this.components.forEach(function (component) { resized = component.redraw() || resized; diff --git a/lib/timeline/Graph2d.js b/lib/timeline/Graph2d.js index a5498eb5..cd350ec3 100644 --- a/lib/timeline/Graph2d.js +++ b/lib/timeline/Graph2d.js @@ -11,12 +11,13 @@ var CurrentTime = require('./component/CurrentTime'); var CustomTime = require('./component/CustomTime'); var LineGraph = require('./component/LineGraph'); -var Configurator = require('../shared/Configurator'); -var Validator = require('../shared/Validator').default; var printStyle = require('../shared/Validator').printStyle; var allOptions = require('./optionsGraph2d').allOptions; var configureOptions = require('./optionsGraph2d').configureOptions; +import Configurator from '../shared/Configurator'; +import Validator from '../shared/Validator'; + /** * Create a timeline visualization * @param {HTMLElement} container diff --git a/lib/timeline/Timeline.js b/lib/timeline/Timeline.js index e2bfd555..a69f58dd 100644 --- a/lib/timeline/Timeline.js +++ b/lib/timeline/Timeline.js @@ -11,12 +11,14 @@ var CurrentTime = require('./component/CurrentTime'); var CustomTime = require('./component/CustomTime'); var ItemSet = require('./component/ItemSet'); -var Configurator = require('../shared/Configurator'); -var Validator = require('../shared/Validator').default; var printStyle = require('../shared/Validator').printStyle; var allOptions = require('./optionsTimeline').allOptions; var configureOptions = require('./optionsTimeline').configureOptions; +import Configurator from '../shared/Configurator'; +import Validator from '../shared/Validator'; + + /** * Create a timeline visualization * @param {HTMLElement} container diff --git a/lib/timeline/component/CustomTime.js b/lib/timeline/component/CustomTime.js index 72ee0000..63c1545c 100644 --- a/lib/timeline/component/CustomTime.js +++ b/lib/timeline/component/CustomTime.js @@ -84,7 +84,7 @@ CustomTime.prototype._create = function() { this.hammer.on('panstart', this._onDragStart.bind(this)); this.hammer.on('panmove', this._onDrag.bind(this)); this.hammer.on('panend', this._onDragEnd.bind(this)); - this.hammer.get('pan').set({threshold:5, direction:30}); // 30 is ALL_DIRECTIONS in hammer. + this.hammer.get('pan').set({threshold:5, direction: Hammer.DIRECTION_HORIZONTAL}); }; /** diff --git a/lib/timeline/component/DataScale.js b/lib/timeline/component/DataScale.js index 5065f0e3..a87477fb 100644 --- a/lib/timeline/component/DataScale.js +++ b/lib/timeline/component/DataScale.js @@ -59,7 +59,9 @@ DataScale.prototype.determineScale = function () { var range = this._end - this._start; this.scale = this.containerHeight / range; var minimumStepValue = this.majorCharHeight / this.scale; - var orderOfMagnitude = Math.round(Math.log(range) / Math.LN10); + var orderOfMagnitude = (range > 0) + ? Math.round(Math.log(range) / Math.LN10) + : 0; this.minorStepIdx = -1; this.magnitudefactor = Math.pow(10, orderOfMagnitude); diff --git a/lib/timeline/component/ItemSet.js b/lib/timeline/component/ItemSet.js index d66c77e4..27aaee38 100644 --- a/lib/timeline/component/ItemSet.js +++ b/lib/timeline/component/ItemSet.js @@ -220,7 +220,7 @@ ItemSet.prototype._create = function(){ this.hammer.on('panstart', this._onDragStart.bind(this)); this.hammer.on('panmove', this._onDrag.bind(this)); this.hammer.on('panend', this._onDragEnd.bind(this)); - this.hammer.get('pan').set({threshold:5, direction:30}); // 30 is ALL_DIRECTIONS in hammer. + this.hammer.get('pan').set({threshold:5, direction: Hammer.DIRECTION_HORIZONTAL}); // single select (or unselect) when tapping an item this.hammer.on('tap', this._onSelectItem.bind(this)); @@ -235,7 +235,7 @@ ItemSet.prototype._create = function(){ this.groupHammer.on('panstart', this._onGroupDragStart.bind(this)); this.groupHammer.on('panmove', this._onGroupDrag.bind(this)); this.groupHammer.on('panend', this._onGroupDragEnd.bind(this)); - this.groupHammer.get('pan').set({threshold:5, direction:30}); + this.groupHammer.get('pan').set({threshold:5, direction: Hammer.DIRECTION_HORIZONTAL}); // attach to the DOM this.show(); diff --git a/lib/timeline/component/item/BoxItem.js b/lib/timeline/component/item/BoxItem.js index a129e0be..8c58ca42 100644 --- a/lib/timeline/component/item/BoxItem.js +++ b/lib/timeline/component/item/BoxItem.js @@ -168,28 +168,33 @@ BoxItem.prototype.hide = function() { BoxItem.prototype.repositionX = function() { var start = this.conversion.toScreen(this.data.start); var align = this.options.align; - var left; // calculate left position of the box if (align == 'right') { this.left = start - this.width; + + // reposition box, line, and dot + this.dom.box.style.left = this.left + 'px'; + this.dom.line.style.left = (start - this.props.line.width) + 'px'; + this.dom.dot.style.left = (start - this.props.line.width / 2 - this.props.dot.width / 2) + 'px'; } else if (align == 'left') { this.left = start; + + // reposition box, line, and dot + this.dom.box.style.left = this.left + 'px'; + this.dom.line.style.left = start + 'px'; + this.dom.dot.style.left = (start + this.props.line.width / 2 - this.props.dot.width / 2) + 'px'; } else { // default or 'center' this.left = start - this.width / 2; - } - // reposition box - this.dom.box.style.left = this.left + 'px'; - - // reposition line - this.dom.line.style.left = (start - this.props.line.width / 2) + 'px'; - - // reposition dot - this.dom.dot.style.left = (start - this.props.dot.width / 2) + 'px'; + // reposition box, line, and dot + this.dom.box.style.left = this.left + 'px'; + this.dom.line.style.left = (start - this.props.line.width / 2) + 'px'; + this.dom.dot.style.left = (start - this.props.dot.width / 2) + 'px'; + } }; /** diff --git a/package.json b/package.json index 9ab02141..79522316 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vis", - "version": "4.15.0", + "version": "4.15.1", "description": "A dynamic, browser-based visualization library.", "homepage": "http://visjs.org/", "license": "(Apache-2.0 OR MIT)", @@ -30,26 +30,27 @@ }, "dependencies": {}, "devDependencies": { + "babel-core": "^6.6.5", + "babel-loader": "^6.2.4", + "babel-preset-es2015": "^6.6.0", + "babelify": "^7.2.0", + "clean-css": "^3.4.10", "emitter-component": "^1.1.1", + "gulp": "^3.9.1", + "gulp-concat": "^2.6.0", + "gulp-minify-css": "^1.2.4", + "gulp-rename": "^1.2.2", + "gulp-util": "^3.0.7", "hammerjs": "^2.0.6", "keycharm": "^0.2.0", - "moment": "^2.10.2", - "propagating-hammerjs": "^1.4.5", + "merge-stream": "^1.0.0", + "mocha": "^2.4.5", + "moment": "^2.12.0", + "propagating-hammerjs": "^1.4.6", + "rimraf": "^2.5.2", + "uglify-js": "^2.6.2", "uuid": "^2.0.1", - "babel": "^5.1.11", - "babel-loader": "^5.0.0", - "babelify": "^6.0.2", - "clean-css": "^3.2.1", - "gulp": "^3.8.11", - "gulp-concat": "^2.5.2", - "gulp-minify-css": "^1.0.0", - "gulp-rename": "^1.2.2", - "gulp-util": "^3.0.4", - "merge-stream": "^0.1.7", - "mocha": "^2.2.4", - "rimraf": "^2.3.2", - "uglify-js": "^2.4.20", - "webpack": "^1.8.5", - "yargs": "^3.7.2" + "webpack": "^1.12.14", + "yargs": "^4.2.0" } } diff --git a/test/networkTest.html b/test/networkTest.html index 71208a78..b10873b4 100644 --- a/test/networkTest.html +++ b/test/networkTest.html @@ -20,164 +20,41 @@