diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 89f3f6da..00000000 --- a/.eslintrc +++ /dev/null @@ -1,209 +0,0 @@ -{ - "parser": "babel-eslint", - "extends": "airbnb-base", - "env": { - "browser": true, - "commonjs": true, - "jasmine": true, - "jest": true - }, - "globals": {}, - "rules": { - "class-methods-use-this": 0, - "comma-dangle": 0, - "consistent-return": 1, - "dot-notation": 2, - "eol-last": 2, - "eqeqeq": 1, - "func-names": 0, - "import/extensions": 0, - "import/no-extraneous-dependencies": 0, - "new-cap": 2, - "newline-per-chained-call": 1, - "no-eq-null": 1, - "no-extra-semi": 0, - "no-irregular-whitespace": 2, - "no-mixed-spaces-and-tabs": 2, - "no-multi-str": 2, - "no-multiple-empty-lines": 2, - "no-new": 2, - "no-param-reassign": 0, - "no-plusplus": 0, - "no-restricted-properties": 0, - "no-restricted-syntax": 1, - "no-shadow": 1, - "no-spaced-func": 2, - "no-trailing-spaces": 2, - "no-undef": 0, - "no-underscore-dangle": 0, - "no-unused-vars": 1, - "no-restricted-globals": [ - 2, - "Handsontable", - { - "name": "console", - "message": "Using the `console` object is not allowed within Handsontable. Please use one of the helpers from `console.js` file inside the Handsontable CE instead." - } - ], - "no-use-before-define": 0, - "no-var": 0, - "no-void": 0, - "no-with": 2, - "object-curly-spacing": 0, - "object-shorthand": 1, - "one-var": 0, - "padded-blocks": 0, - "prefer-arrow-callback": 1, - "prefer-const": 0, - "prefer-rest-params": 1, - "prefer-spread": 1, - "prefer-template": 1, - "space-infix-ops": 2, - "vars-on-top": 0, - "linebreak-style": 0, - "camelcase": [ - 2, - { - "properties": "never" - } - ], - "curly": [ - 2, - "all" - ], - "import/no-unresolved": [ - 2, - { - "ignore": ["handsontable"] - } - ], - "no-mixed-operators": [ - 2, - "groups": [ - ["+", "-", "*", "/", "%", "**"] - ] - ], - "arrow-parens": [ - 2, - "always", - { - "requireForBlockBody": true - } - ], - "no-unneeded-ternary": [ - 2, - { - "defaultAssignment": true - } - ], - "no-confusing-arrow": [ - 2, - { - "allowParens": true - } - ], - "indent": [ - 2, - 2, - { - "SwitchCase": 1, - "FunctionDeclaration": {"parameters": "first"}, - "FunctionExpression": {"parameters": "first"} - } - ], - "comma-style": [ - 2, - "last" - ], - "max-depth": [ - 2, - 5 - ], - "max-len": [ - 2, - { - "code": 170, - "ignoreComments": true - } - ], - "max-params": [ - 2, - 9 - ], - "space-before-function-paren": [ - 2, - { - "anonymous": "ignore", - "named": "never" - } - ], - "array-bracket-spacing": [ - 2, - "never", - {} - ], - "space-in-parens": [ - 2, - "never" - ], - "quote-props": [ - 2, - "as-needed" - ], - "key-spacing": [ - 2, - { - "beforeColon": false, - "afterColon": true - } - ], - "space-unary-ops": [ - 2, - { - "words": false, - "nonwords": false - } - ], - "yoda": [ - 2, - "never" - ], - "brace-style": [ - 2, - "1tbs", - { - "allowSingleLine": true - } - ], - "comma-spacing": [ - 2, - { - "after": true, - "before": false - } - ], - "semi-spacing": [ - 2, - { - "before": false, - "after": true - } - ], - "space-before-blocks": [ - 2, - "always" - ], - "keyword-spacing": [ - 2, - {} - ], - "semi": [ - 2, - "always" - ], - "quotes": [ - 2, - "single" - ] - } -} diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..b67ac96d --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,92 @@ +module.exports = { + "extends": "airbnb-base", + "parser": "babel-eslint", + "env": { + "browser": true, + "commonjs": true, + "jasmine": true, + "jest": true, + "es6": true, + }, + "rules": { + "arrow-parens": [ + "error", + "as-needed", + { "requireForBlockBody": true } + ], + "class-methods-use-this": "off", + "comma-dangle": "off", + "consistent-return": "off", + "func-names": "off", + "import/extensions": "off", + "import/no-extraneous-dependencies": "off", + "import/no-unresolved": [ + "error", + { "ignore": ["handsontable", "walkontable"] } + ], + "indent": [ + "error", + 2, + { + "SwitchCase": 1, + "FunctionDeclaration": { "parameters": "first" }, + "FunctionExpression": { "parameters": "first" } + } + ], + "max-len": [ + "error", + { + "code": 170, + "ignoreComments": true + } + ], + "newline-per-chained-call": "off", + "no-constant-condition": [ + "error", + { "checkLoops": false } + ], + "no-eq-null": "error", + "no-mixed-operators": [ + "error", + { "groups": [["+", "-", "*", "/", "%", "**"]] } + ], + "no-multiple-empty-lines": [ + "error", + { "max": 1 } + ], + "no-param-reassign": "off", + "no-plusplus": [ + "error", + { "allowForLoopAfterthoughts": true } + ], + "no-restricted-globals": [ + "error", + "Handsontable", + { + "name": "console", + "message": "Using the `console` object is not allowed within Handsontable. Please use one of the helpers from the `console.js` file instead." + } + ], + "no-underscore-dangle": "off", + "no-use-before-define": [ + "error", + { + "functions": false, + "classes": false + } + ], + "no-void": "off", + "padded-blocks": "off", + "quotes": [ "error", "single" ], + "space-before-function-paren": ["error", "never"], + }, + "overrides": [ + { + "files": ["test/**", "src/3rdparty/walkontable/test/**", "*.unit.js", "*.e2e.js", "src/plugins/**/test/helpers/**"], + "rules": { + "no-restricted-globals": "off", + "no-undef": "off", + } + } + ], +} diff --git a/dist/handsontable.css b/dist/handsontable.css index 196b5057..3433c5de 100644 --- a/dist/handsontable.css +++ b/dist/handsontable.css @@ -20,8 +20,8 @@ * RELIABILITY AND PERFORMANCE WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE SOFTWARE WILL BE * UNINTERRUPTED OR ERROR FREE. * - * Version: 5.0.1 - * Release date: 16/08/2018 (built at 16/08/2018 12:38:43) + * Version: 5.0.2 + * Release date: 12/09/2018 (built at 12/09/2018 12:36:00) */ /** * Fix for bootstrap styles diff --git a/dist/handsontable.full.css b/dist/handsontable.full.css index 41f25a69..6efa1e12 100644 --- a/dist/handsontable.full.css +++ b/dist/handsontable.full.css @@ -20,8 +20,8 @@ * RELIABILITY AND PERFORMANCE WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE SOFTWARE WILL BE * UNINTERRUPTED OR ERROR FREE. * - * Version: 5.0.1 - * Release date: 16/08/2018 (built at 16/08/2018 12:38:43) + * Version: 5.0.2 + * Release date: 12/09/2018 (built at 12/09/2018 12:36:00) */ /** * Fix for bootstrap styles diff --git a/dist/handsontable.full.js b/dist/handsontable.full.js index cd4f0c21..fd6e1b07 100644 --- a/dist/handsontable.full.js +++ b/dist/handsontable.full.js @@ -20,8 +20,8 @@ * RELIABILITY AND PERFORMANCE WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE SOFTWARE WILL BE * UNINTERRUPTED OR ERROR FREE. * - * Version: 5.0.1 - * Release date: 16/08/2018 (built at 16/08/2018 12:38:43) + * Version: 5.0.2 + * Release date: 12/09/2018 (built at 12/09/2018 12:36:00) */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') @@ -125,7 +125,7 @@ function to2dArray(arr) { while (i < ilen) { arr[i] = [arr[i]]; - i++; + i += 1; } } @@ -135,7 +135,7 @@ function extendArray(arr, extension) { while (i < ilen) { arr.push(extension[i]); - i++; + i += 1; } } @@ -177,6 +177,7 @@ function pivot(arr) { function arrayReduce(array, iteratee, accumulator, initFromArray) { var index = -1; var iterable = array; + var result = accumulator; if (!Array.isArray(array)) { iterable = Array.from(array); @@ -184,13 +185,18 @@ function arrayReduce(array, iteratee, accumulator, initFromArray) { var length = iterable.length; if (initFromArray && length) { - accumulator = iterable[++index]; + index += 1; + result = iterable[index]; } - while (++index < length) { - accumulator = iteratee(accumulator, iterable[index], index, iterable); + + index += 1; + + while (index < length) { + result = iteratee(result, iterable[index], index, iterable); + index += 1; } - return accumulator; + return result; } /** @@ -204,7 +210,7 @@ function arrayReduce(array, iteratee, accumulator, initFromArray) { * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { - var index = -1; + var index = 0; var iterable = array; if (!Array.isArray(array)) { @@ -215,12 +221,15 @@ function arrayFilter(array, predicate) { var result = []; var resIndex = -1; - while (++index < length) { + while (index < length) { var value = iterable[index]; if (predicate(value, index, iterable)) { - result[++resIndex] = value; + resIndex += 1; + result[resIndex] = value; } + + index += 1; } return result; @@ -235,7 +244,7 @@ function arrayFilter(array, predicate) { * @returns {Array} Returns the new filtered array. */ function arrayMap(array, iteratee) { - var index = -1; + var index = 0; var iterable = array; if (!Array.isArray(array)) { @@ -246,10 +255,12 @@ function arrayMap(array, iteratee) { var result = []; var resIndex = -1; - while (++index < length) { + while (index < length) { var value = iterable[index]; - result[++resIndex] = iteratee(value, index, iterable); + resIndex += 1; + result[resIndex] = iteratee(value, index, iterable); + index += 1; } return result; @@ -266,7 +277,7 @@ function arrayMap(array, iteratee) { * @returns {Array} Returns `array`. */ function arrayEach(array, iteratee) { - var index = -1; + var index = 0; var iterable = array; if (!Array.isArray(array)) { @@ -275,10 +286,12 @@ function arrayEach(array, iteratee) { var length = iterable.length; - while (++index < length) { + while (index < length) { if (iteratee(iterable[index], index, iterable) === false) { break; } + + index += 1; } return array; @@ -546,15 +559,17 @@ function mixin(Base) { if (typeof value === 'function') { Base.prototype[key] = value; } else { - var getter = function _getter(propertyName, initialValue) { - propertyName = '_' + propertyName; + var getter = function _getter(property, initialValue) { + var propertyName = '_' + property; var initValue = function initValue(newValue) { - if (Array.isArray(newValue) || isObject(newValue)) { - newValue = deepClone(newValue); + var result = newValue; + + if (Array.isArray(result) || isObject(result)) { + result = deepClone(result); } - return newValue; + return result; }; return function () { @@ -565,8 +580,8 @@ function mixin(Base) { return this[propertyName]; }; }; - var setter = function _setter(propertyName) { - propertyName = '_' + propertyName; + var setter = function _setter(property) { + var propertyName = '_' + property; return function (newValue) { this[propertyName] = newValue; @@ -622,6 +637,7 @@ function defineGetter(object, property, value, options) { * @returns {Object} Returns `object`. */ function objectEach(object, iteratee) { + // eslint-disable-next-line no-restricted-syntax for (var key in object) { if (!object.hasOwnProperty || object.hasOwnProperty && Object.prototype.hasOwnProperty.call(object, key)) { if (iteratee(object[key], key, object) === false) { @@ -675,7 +691,7 @@ function deepObjectSize(object) { result += recursObjLen(key); }); } else { - result++; + result += 1; } return result; @@ -785,7 +801,7 @@ exports.isOutsideInput = isOutsideInput; var _browser = __webpack_require__(50); -var _feature = __webpack_require__(42); +var _feature = __webpack_require__(41); function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } @@ -801,18 +817,19 @@ function getParent(element) { var iteration = -1; var parent = null; + var elementToCheck = element; - while (element != null) { + while (elementToCheck !== null) { if (iteration === level) { - parent = element; + parent = elementToCheck; break; } - if (element.host && element.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { - element = element.host; + if (elementToCheck.host && elementToCheck.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { + elementToCheck = elementToCheck.host; } else { - iteration++; - element = element.parentNode; + iteration += 1; + elementToCheck = elementToCheck.parentNode; } } @@ -829,14 +846,16 @@ function getParent(element) { * @returns {HTMLElement|null} */ function closest(element, nodes, until) { - while (element != null && element !== until) { - if (element.nodeType === Node.ELEMENT_NODE && (nodes.indexOf(element.nodeName) > -1 || nodes.indexOf(element) > -1)) { - return element; + var elementToCheck = element; + + while (elementToCheck !== null && elementToCheck !== until) { + if (elementToCheck.nodeType === Node.ELEMENT_NODE && (nodes.indexOf(elementToCheck.nodeName) > -1 || nodes.indexOf(elementToCheck) > -1)) { + return elementToCheck; } - if (element.host && element.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { - element = element.host; + if (elementToCheck.host && elementToCheck.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { + elementToCheck = elementToCheck.host; } else { - element = element.parentNode; + elementToCheck = elementToCheck.parentNode; } } @@ -853,19 +872,20 @@ function closest(element, nodes, until) { */ function closestDown(element, nodes, until) { var matched = []; + var elementToCheck = element; - while (element) { - element = closest(element, nodes, until); + while (elementToCheck) { + elementToCheck = closest(elementToCheck, nodes, until); - if (!element || until && !until.contains(element)) { + if (!elementToCheck || until && !until.contains(elementToCheck)) { break; } - matched.push(element); + matched.push(elementToCheck); - if (element.host && element.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { - element = element.host; + if (elementToCheck.host && elementToCheck.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { + elementToCheck = elementToCheck.host; } else { - element = element.parentNode; + elementToCheck = elementToCheck.parentNode; } } var length = matched.length; @@ -891,7 +911,7 @@ function isChildOf(child, parent) { queriedParents.push(parent); } - while (node != null) { + while (node !== null) { if (queriedParents.indexOf(node) > -1) { return true; } @@ -916,7 +936,7 @@ function isChildOfWebComponentTable(element) { return testElement.nodeType === Node.ELEMENT_NODE && testElement.nodeName === hotTableName.toUpperCase(); } - while (parentNode != null) { + while (parentNode !== null) { if (isHotTable(parentNode)) { result = true; break; @@ -934,6 +954,8 @@ function isChildOfWebComponentTable(element) { return result; } +/* global Polymer wrap unwrap */ + /** * Wrap element into polymer/webcomponent container if exists * @@ -941,7 +963,6 @@ function isChildOfWebComponentTable(element) { * @returns {*} */ function polymerWrap(element) { - /* global Polymer */ return typeof Polymer !== 'undefined' && typeof wrap === 'function' ? wrap(element) : element; } @@ -952,7 +973,6 @@ function polymerWrap(element) { * @returns {*} */ function polymerUnwrap(element) { - /* global Polymer */ return typeof Polymer !== 'undefined' && typeof unwrap === 'function' ? unwrap(element) : element; } @@ -967,11 +987,12 @@ function polymerUnwrap(element) { */ function index(element) { var i = 0; + var elementToCheck = element; - if (element.previousSibling) { + if (elementToCheck.previousSibling) { /* eslint-disable no-cond-assign */ - while (element = element.previousSibling) { - ++i; + while (elementToCheck = elementToCheck.previousSibling) { + i += 1; } } @@ -1006,7 +1027,7 @@ function filterEmptyClassNames(classNames) { while (classNames[len]) { result.push(classNames[len]); - len++; + len += 1; } return result; @@ -1029,7 +1050,9 @@ if (classListSupport) { return element.classList.contains(className); }; - _addClass = function _addClass(element, className) { + _addClass = function _addClass(element, classes) { + var className = classes; + if (typeof className === 'string') { className = className.split(' '); } @@ -1046,13 +1069,15 @@ if (classListSupport) { while (className && className[len]) { element.classList.add(className[len]); - len++; + len += 1; } } } }; - _removeClass = function _removeClass(element, className) { + _removeClass = function _removeClass(element, classes) { + var className = classes; + if (typeof className === 'string') { className = className.split(' '); } @@ -1069,7 +1094,7 @@ if (classListSupport) { while (className && className[len]) { element.classList.remove(className[len]); - len++; + len += 1; } } } @@ -1084,9 +1109,10 @@ if (classListSupport) { return element.className !== void 0 && createClassNameRegExp(className).test(element.className); }; - _addClass = function _addClass(element, className) { + _addClass = function _addClass(element, classes) { var len = 0; var _className = element.className; + var className = classes; if (typeof className === 'string') { className = className.split(' '); @@ -1098,15 +1124,16 @@ if (classListSupport) { if (!createClassNameRegExp(className[len]).test(_className)) { _className += ' ' + className[len]; } - len++; + len += 1; } } element.className = _className; }; - _removeClass = function _removeClass(element, className) { + _removeClass = function _removeClass(element, classes) { var len = 0; var _className = element.className; + var className = classes; if (typeof className === 'string') { className = className.split(' '); @@ -1114,7 +1141,7 @@ if (classListSupport) { while (className && className[len]) { // String.prototype.trim is defined in polyfill.js _className = _className.replace(createClassNameRegExp(className[len]), ' ').trim(); - len++; + len += 1; } if (element.className !== _className) { element.className = _className; @@ -1268,37 +1295,36 @@ function isVisible(elem) { * @return {Object} Returns object with `top` and `left` props */ function offset(elem) { + var docElem = document.documentElement; + var elementToCheck = elem; var offsetLeft = void 0; var offsetTop = void 0; var lastElem = void 0; - var docElem = void 0; var box = void 0; - docElem = document.documentElement; - - if ((0, _feature.hasCaptionProblem)() && elem.firstChild && elem.firstChild.nodeName === 'CAPTION') { + if ((0, _feature.hasCaptionProblem)() && elementToCheck.firstChild && elementToCheck.firstChild.nodeName === 'CAPTION') { // fixes problem with Firefox ignoring in TABLE offset (see also export outerHeight) // http://jsperf.com/offset-vs-getboundingclientrect/8 - box = elem.getBoundingClientRect(); + box = elementToCheck.getBoundingClientRect(); return { top: box.top + (window.pageYOffset || docElem.scrollTop) - (docElem.clientTop || 0), left: box.left + (window.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || 0) }; } - offsetLeft = elem.offsetLeft; - offsetTop = elem.offsetTop; - lastElem = elem; + offsetLeft = elementToCheck.offsetLeft; + offsetTop = elementToCheck.offsetTop; + lastElem = elementToCheck; /* eslint-disable no-cond-assign */ - while (elem = elem.offsetParent) { + while (elementToCheck = elementToCheck.offsetParent) { // from my observation, document.body always has scrollLeft/scrollTop == 0 - if (elem === document.body) { + if (elementToCheck === document.body) { break; } - offsetLeft += elem.offsetLeft; - offsetTop += elem.offsetTop; - lastElem = elem; + offsetLeft += elementToCheck.offsetLeft; + offsetTop += elementToCheck.offsetTop; + lastElem = elementToCheck; } // slow - http://jsperf.com/offset-vs-getboundingclientrect/6 @@ -2008,18 +2034,17 @@ var registeredPlugins = new WeakMap(); * Utility to register plugins and common namespace for keeping reference to all plugins classes */ function registerPlugin(pluginName, PluginClass) { - pluginName = (0, _string.toUpperCaseFirst)(pluginName); + var correctedPluginName = (0, _string.toUpperCaseFirst)(pluginName); _pluginHooks2.default.getSingleton().add('construct', function () { - var holder = void 0; - if (!registeredPlugins.has(this)) { registeredPlugins.set(this, {}); } - holder = registeredPlugins.get(this); - if (!holder[pluginName]) { - holder[pluginName] = new PluginClass(this); + var holder = registeredPlugins.get(this); + + if (!holder[correctedPluginName]) { + holder[correctedPluginName] = new PluginClass(this); } }); _pluginHooks2.default.getSingleton().add('afterDestroy', function () { @@ -2094,9 +2119,9 @@ exports.getPluginName = getPluginName; var global = __webpack_require__(16); var core = __webpack_require__(48); -var hide = __webpack_require__(38); -var redefine = __webpack_require__(37); -var ctx = __webpack_require__(39); +var hide = __webpack_require__(37); +var redefine = __webpack_require__(36); +var ctx = __webpack_require__(38); var PROTOTYPE = 'prototype'; var $export = function (type, name, source) { @@ -2152,7 +2177,7 @@ var _object = __webpack_require__(1); var _array = __webpack_require__(0); -var _recordTranslator = __webpack_require__(55); +var _recordTranslator = __webpack_require__(54); var _plugins = __webpack_require__(5); @@ -2634,7 +2659,7 @@ var _element = __webpack_require__(2); var _object = __webpack_require__(1); -var _feature = __webpack_require__(42); +var _feature = __webpack_require__(41); var _event = __webpack_require__(12); @@ -2689,10 +2714,9 @@ var EventManager = function () { var context = this.context; function callbackProxy(event) { - event = extendEvent(context, event); - - callback.call(this, event); + callback.call(this, extendEvent(context, event)); } + this.context.eventListeners.push({ element: element, event: eventName, @@ -2705,7 +2729,8 @@ var EventManager = function () { } else { element.attachEvent('on' + eventName, callbackProxy); } - listenersCounter++; + + listenersCounter += 1; return function () { _this.removeEventListener(element, eventName, callback); @@ -2726,7 +2751,8 @@ var EventManager = function () { var len = this.context.eventListeners.length; var tmpEvent = void 0; - while (len--) { + while (len) { + len -= 1; tmpEvent = this.context.eventListeners[len]; if (tmpEvent.event === eventName && tmpEvent.element === element) { @@ -2741,7 +2767,7 @@ var EventManager = function () { } else { tmpEvent.element.detachEvent('on' + tmpEvent.event, tmpEvent.callbackProxy); } - listenersCounter--; + listenersCounter -= 1; } } } @@ -2761,7 +2787,8 @@ var EventManager = function () { } var len = this.context.eventListeners.length; - while (len--) { + while (len) { + len -= 1; var event = this.context.eventListeners[len]; if (event) { @@ -2852,12 +2879,12 @@ function extendEvent(context, event) { var realTarget = void 0; var target = void 0; var len = void 0; - var nativeStopImmediatePropagation = void 0; event.isTargetWebComponent = false; event.realTarget = event.target; - nativeStopImmediatePropagation = event.stopImmediatePropagation; + var nativeStopImmediatePropagation = event.stopImmediatePropagation; + event.stopImmediatePropagation = function () { nativeStopImmediatePropagation.apply(this); (0, _event.stopImmediatePropagation)(this); @@ -2866,10 +2893,13 @@ function extendEvent(context, event) { if (!EventManager.isHotTableEnv) { return event; } + // eslint-disable-next-line no-param-reassign event = (0, _element.polymerWrap)(event); len = event.path ? event.path.length : 0; - while (len--) { + while (len) { + len -= 1; + if (event.path[len].nodeName === componentName) { isHotTableSpotted = true; } else if (isHotTableSpotted && event.path[len].shadowRoot) { @@ -2924,7 +2954,7 @@ function extendEvent(context, event) { exports.default = EventManager; function getListenersCounter() { return listenersCounter; -}; +} /***/ }), /* 10 */ @@ -2954,13 +2984,14 @@ function getCondition(name, args) { condition = _conditions$name.condition, descriptor = _conditions$name.descriptor; + var conditionArguments = args; if (descriptor.inputValuesDecorator) { - args = descriptor.inputValuesDecorator(args); + conditionArguments = descriptor.inputValuesDecorator(conditionArguments); } return function (dataRow) { - return condition.apply(dataRow.meta.instance, [].concat([dataRow], [args])); + return condition.apply(dataRow.meta.instance, [].concat([dataRow], [conditionArguments])); }; } @@ -3127,7 +3158,7 @@ function _injectProductInfo(key, element) { if (trial || schemaValidity) { if (schemaValidity) { - var releaseTime = Math.floor((0, _moment2.default)('16/08/2018', 'DD/MM/YYYY').toDate().getTime() / 8.64e7); + var releaseTime = Math.floor((0, _moment2.default)('12/09/2018', 'DD/MM/YYYY').toDate().getTime() / 8.64e7); var keyGenTime = _extractTime(key); if (keyGenTime > 45000 || keyGenTime !== parseInt(keyGenTime, 10)) { @@ -5088,7 +5119,7 @@ var Hooks = function () { _createClass(Hooks, null, [{ key: 'getSingleton', value: function getSingleton() { - return globalSingleton; + return getGlobalSingleton(); } /** @@ -5341,13 +5372,14 @@ var Hooks = function () { value: function run(context, key, p1, p2, p3, p4, p5, p6) { { var globalHandlers = this.globalBucket[key]; - var index = -1; var length = globalHandlers ? globalHandlers.length : 0; + var index = 0; if (length) { // Do not optimise this loop with arrayEach or arrow function! If you do You'll decrease perf because of GC. - while (++index < length) { + while (index < length) { if (!globalHandlers[index] || globalHandlers[index].skip) { + index += 1; /* eslint-disable no-continue */ continue; } @@ -5355,23 +5387,27 @@ var Hooks = function () { var res = globalHandlers[index].call(context, p1, p2, p3, p4, p5, p6); if (res !== void 0) { + // eslint-disable-next-line no-param-reassign p1 = res; } if (globalHandlers[index] && globalHandlers[index].runOnce) { this.remove(key, globalHandlers[index]); } + + index += 1; } } } { var localHandlers = this.getBucket(context)[key]; - var _index = -1; var _length = localHandlers ? localHandlers.length : 0; + var _index = 0; if (_length) { // Do not optimise this loop with arrayEach or arrow function! If you do You'll decrease perf because of GC. - while (++_index < _length) { + while (_index < _length) { if (!localHandlers[_index] || localHandlers[_index].skip) { + _index += 1; /* eslint-disable no-continue */ continue; } @@ -5379,11 +5415,14 @@ var Hooks = function () { var _res = localHandlers[_index].call(context, p1, p2, p3, p4, p5, p6); if (_res !== void 0) { + // eslint-disable-next-line no-param-reassign p1 = _res; } if (localHandlers[_index] && localHandlers[_index].runOnce) { this.remove(key, localHandlers[_index], context); } + + _index += 1; } } } @@ -5511,6 +5550,10 @@ var Hooks = function () { var globalSingleton = new Hooks(); +function getGlobalSingleton() { + return globalSingleton; +} + exports.default = Hooks; /***/ }), @@ -5987,22 +6030,19 @@ function prepareVerticalAlignClass(className, alignment) { if (className.indexOf(alignment) !== -1) { return className; } - className = className.replace('htTop', '').replace('htMiddle', '').replace('htBottom', '').replace(' ', ''); - className += ' ' + alignment; + var replacedClassName = className.replace('htTop', '').replace('htMiddle', '').replace('htBottom', '').replace(' ', ''); - return className; + return replacedClassName + ' ' + alignment; } function prepareHorizontalAlignClass(className, alignment) { if (className.indexOf(alignment) !== -1) { return className; } - className = className.replace('htLeft', '').replace('htCenter', '').replace('htRight', '').replace('htJustify', '').replace(' ', ''); + var replacedClassName = className.replace('htLeft', '').replace('htCenter', '').replace('htRight', '').replace('htJustify', '').replace(' ', ''); - className += ' ' + alignment; - - return className; + return replacedClassName + ' ' + alignment; } function getAlignmentClasses(ranges, callback) { @@ -10765,7 +10805,14 @@ function log() { (_console = console).log.apply(_console, arguments); } -} /* eslint-disable no-console */ +} + +/** + * Logs warn to the console if the `console` object is exposed. + * + * @param {...*} args Values which will be logged. + */ +/* eslint-disable no-console */ /* eslint-disable no-restricted-globals */ /** @@ -10775,20 +10822,13 @@ function log() { * Source: https://stackoverflow.com/a/5473193 */ -; - -/** - * Logs warn to the console if the `console` object is exposed. - * - * @param {...*} args Values which will be logged. - */ function warn() { if ((0, _mixed.isDefined)(console)) { var _console2; (_console2 = console).warn.apply(_console2, arguments); } -}; +} /** * Logs info to the console if the `console` object is exposed. @@ -10801,7 +10841,7 @@ function info() { (_console3 = console).info.apply(_console3, arguments); } -}; +} /** * Logs error to the console if the `console` object is exposed. @@ -10814,7 +10854,7 @@ function error() { (_console4 = console).error.apply(_console4, arguments); } -}; +} /***/ }), /* 27 */ @@ -10921,7 +10961,8 @@ function equalsIgnoreCase() { var length = strings.length; - while (length--) { + while (length) { + length -= 1; var string = (0, _mixed.stringify)(strings[length]).toLowerCase(); if (unique.indexOf(string) === -1) { @@ -10985,9 +11026,7 @@ var STRIP_TAGS_REGEX = /<\/?\w+\/?>|<\w+[\s|/][^>]*>/gi; * @return {String} */ function stripTags(string) { - string += ''; - - return string.replace(STRIP_TAGS_REGEX, ''); + return ('' + string).replace(STRIP_TAGS_REGEX, ''); } /***/ }), @@ -11455,7 +11494,7 @@ function throttleAfterHits(func) { } if (remainHits) { - remainHits--; + remainHits -= 1; return func.apply(this, args); } @@ -11645,83 +11684,6 @@ function curryRight(func) { /***/ }), /* 35 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.__esModule = true; -exports.isFormulaExpression = isFormulaExpression; -exports.isFormulaExpressionEscaped = isFormulaExpressionEscaped; -exports.unescapeFormulaExpression = unescapeFormulaExpression; -exports.toUpperCaseFormula = toUpperCaseFormula; -exports.cellCoordFactory = cellCoordFactory; -/** - * Check if provided expression is valid formula expression. - * - * @param {*} expression Expression to check. - * @returns {Boolean} - */ -function isFormulaExpression(expression) { - return typeof expression === 'string' && expression.length >= 2 && expression.charAt(0) === '='; -} - -/** - * Check if provided formula expression is escaped. - * - * @param {*} expression Expression to check. - * @returns {Boolean} - */ -function isFormulaExpressionEscaped(expression) { - return typeof expression === 'string' && expression.charAt(0) === '\'' && expression.charAt(1) === '='; -} - -/** - * Replace escaped formula expression into valid string. - * - * @param {String} expression Expression to process. - * @returns {String} - */ -function unescapeFormulaExpression(expression) { - return isFormulaExpressionEscaped(expression) ? expression.substr(1) : expression; -} - -/** - * Upper case formula expression. - * - * @param {String} expression Formula expression. - * @returns {String} - */ -function toUpperCaseFormula(expression) { - var PATTERN = /(\\"|"(?:\\"|[^"])*"|(\+))|(\\'|'(?:\\'|[^'])*'|(\+))/g; - var strings = expression.match(PATTERN) || []; - var index = -1; - - return expression.toUpperCase().replace(PATTERN, function () { - ++index; - - return strings[index]; - }); -} - -/** - * Cell coordinates function factory. - * - * @param {String} axis An axis name (`row` or `column`) which default index will be applied to. - * @param {Number} defaultIndex Default index. - * @returns {Function} - */ -function cellCoordFactory(axis, defaultIndex) { - return function (cell) { - return { - row: axis === 'row' ? defaultIndex : cell.row, - column: axis === 'column' ? defaultIndex : cell.column - }; - }; -} - -/***/ }), -/* 36 */ /***/ (function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; @@ -11731,12 +11693,12 @@ module.exports = function (it, key) { /***/ }), -/* 37 */ +/* 36 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(16); -var hide = __webpack_require__(38); -var has = __webpack_require__(36); +var hide = __webpack_require__(37); +var has = __webpack_require__(35); var SRC = __webpack_require__(58)('src'); var TO_STRING = 'toString'; var $toString = Function[TO_STRING]; @@ -11768,7 +11730,7 @@ __webpack_require__(48).inspectSource = function (it) { /***/ }), -/* 38 */ +/* 37 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(23); @@ -11782,7 +11744,7 @@ module.exports = __webpack_require__(27) ? function (object, key, value) { /***/ }), -/* 39 */ +/* 38 */ /***/ (function(module, exports, __webpack_require__) { // optional / simple context binding @@ -11808,7 +11770,7 @@ module.exports = function (fn, that, length) { /***/ }), -/* 40 */ +/* 39 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) @@ -11819,12 +11781,12 @@ module.exports = function (it) { /***/ }), -/* 41 */ +/* 40 */ /***/ (function(module, exports, __webpack_require__) { var META = __webpack_require__(58)('meta'); var isObject = __webpack_require__(13); -var has = __webpack_require__(36); +var has = __webpack_require__(35); var setDesc = __webpack_require__(23).f; var id = 0; var isExtensible = Object.isExtensible || function () { @@ -11878,7 +11840,7 @@ var meta = module.exports = { /***/ }), -/* 42 */ +/* 41 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -12026,7 +11988,7 @@ function getComparisonFunction(language) { } /***/ }), -/* 43 */ +/* 42 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -12093,7 +12055,7 @@ exports.getRegisteredValidatorNames = getNames; exports.getRegisteredValidators = getValues; /***/ }), -/* 44 */ +/* 43 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -12275,6 +12237,83 @@ function addItem(key, item) { } } +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.isFormulaExpression = isFormulaExpression; +exports.isFormulaExpressionEscaped = isFormulaExpressionEscaped; +exports.unescapeFormulaExpression = unescapeFormulaExpression; +exports.toUpperCaseFormula = toUpperCaseFormula; +exports.cellCoordFactory = cellCoordFactory; +/** + * Check if provided expression is valid formula expression. + * + * @param {*} expression Expression to check. + * @returns {Boolean} + */ +function isFormulaExpression(expression) { + return typeof expression === 'string' && expression.length >= 2 && expression.charAt(0) === '='; +} + +/** + * Check if provided formula expression is escaped. + * + * @param {*} expression Expression to check. + * @returns {Boolean} + */ +function isFormulaExpressionEscaped(expression) { + return typeof expression === 'string' && expression.charAt(0) === '\'' && expression.charAt(1) === '='; +} + +/** + * Replace escaped formula expression into valid string. + * + * @param {String} expression Expression to process. + * @returns {String} + */ +function unescapeFormulaExpression(expression) { + return isFormulaExpressionEscaped(expression) ? expression.substr(1) : expression; +} + +/** + * Upper case formula expression. + * + * @param {String} expression Formula expression. + * @returns {String} + */ +function toUpperCaseFormula(expression) { + var PATTERN = /(\\"|"(?:\\"|[^"])*"|(\+))|(\\'|'(?:\\'|[^'])*'|(\+))/g; + var strings = expression.match(PATTERN) || []; + var index = -1; + + return expression.toUpperCase().replace(PATTERN, function () { + index += 1; + + return strings[index]; + }); +} + +/** + * Cell coordinates function factory. + * + * @param {String} axis An axis name (`row` or `column`) which default index will be applied to. + * @param {Number} defaultIndex Default index. + * @returns {Function} + */ +function cellCoordFactory(axis, defaultIndex) { + return function (cell) { + return { + row: axis === 'row' ? defaultIndex : cell.row, + column: axis === 'column' ? defaultIndex : cell.column + }; + }; +} + /***/ }), /* 45 */ /***/ (function(module, exports, __webpack_require__) { @@ -12785,6 +12824,234 @@ function isSafari() { /***/ }), /* 51 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(13); +module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; +}; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.3.31 Array.prototype[@@unscopables] +var UNSCOPABLES = __webpack_require__(14)('unscopables'); +var ArrayProto = Array.prototype; +if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(37)(ArrayProto, UNSCOPABLES, {}); +module.exports = function (key) { + ArrayProto[UNSCOPABLES][key] = true; +}; + + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.RecordTranslator = undefined; + +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; }; }(); + +exports.registerIdentity = registerIdentity; +exports.getTranslator = getTranslator; +exports.getIdentity = getIdentity; + +var _core = __webpack_require__(156); + +var _core2 = _interopRequireDefault(_core); + +var _object = __webpack_require__(1); + +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"); } } + +/** + * @class RecordTranslator + * @util + */ +var RecordTranslator = exports.RecordTranslator = function () { + function RecordTranslator(hot) { + _classCallCheck(this, RecordTranslator); + + this.hot = hot; + } + + /** + * Translate physical row index into visual. + * + * @param {Number} row Physical row index. + * @returns {Number} Returns visual row index. + */ + + + _createClass(RecordTranslator, [{ + key: 'toVisualRow', + value: function toVisualRow(row) { + return this.hot.runHooks('unmodifyRow', row); + } + + /** + * Translate physical column index into visual. + * + * @param {Number} column Physical column index. + * @returns {Number} Returns visual column index. + */ + + }, { + key: 'toVisualColumn', + value: function toVisualColumn(column) { + return this.hot.runHooks('unmodifyCol', column); + } + + /** + * Translate physical coordinates into visual. Can be passed as separate 2 arguments (row, column) or as an object in first + * argument with `row` and `column` keys. + * + * @param {Number|Object} row Physical coordinates or row index. + * @param {Number} [column] Physical column index. + * @returns {Object|Array} Returns an object with visual records or an array if coordinates passed as separate arguments. + */ + + }, { + key: 'toVisual', + value: function toVisual(row, column) { + var result = void 0; + + if ((0, _object.isObject)(row)) { + result = { + row: this.toVisualRow(row.row), + column: this.toVisualColumn(row.column) + }; + } else { + result = [this.toVisualRow(row), this.toVisualColumn(column)]; + } + + return result; + } + + /** + * Translate visual row index into physical. + * + * @param {Number} row Visual row index. + * @returns {Number} Returns physical row index. + */ + + }, { + key: 'toPhysicalRow', + value: function toPhysicalRow(row) { + return this.hot.runHooks('modifyRow', row); + } + + /** + * Translate visual column index into physical. + * + * @param {Number} column Visual column index. + * @returns {Number} Returns physical column index. + */ + + }, { + key: 'toPhysicalColumn', + value: function toPhysicalColumn(column) { + return this.hot.runHooks('modifyCol', column); + } + + /** + * Translate visual coordinates into physical. Can be passed as separate 2 arguments (row, column) or as an object in first + * argument with `row` and `column` keys. + * + * @param {Number|Object} row Visual coordinates or row index. + * @param {Number} [column] Visual column index. + * @returns {Object|Array} Returns an object with physical records or an array if coordinates passed as separate arguments. + */ + + }, { + key: 'toPhysical', + value: function toPhysical(row, column) { + var result = void 0; + + if ((0, _object.isObject)(row)) { + result = { + row: this.toPhysicalRow(row.row), + column: this.toPhysicalColumn(row.column) + }; + } else { + result = [this.toPhysicalRow(row), this.toPhysicalColumn(column)]; + } + + return result; + } + }]); + + return RecordTranslator; +}(); + +var identities = new WeakMap(); +var translatorSingletons = new WeakMap(); + +/** + * Allows to register custom identity manually. + * + * @param {*} identity + * @param {*} hot + */ +function registerIdentity(identity, hot) { + identities.set(identity, hot); +} + +/** + * Returns a cached instance of RecordTranslator or create the new one for given identity. + * + * @param {*} identity + * @returns {RecordTranslator} + */ +function getTranslator(identity) { + var instance = identity instanceof _core2.default ? identity : getIdentity(identity); + var singleton = void 0; + + if (translatorSingletons.has(instance)) { + singleton = translatorSingletons.get(instance); + } else { + singleton = new RecordTranslator(instance); + translatorSingletons.set(instance, singleton); + } + + return singleton; +} + +/** + * Returns mapped identity. + * + * @param {*} identity + * @returns {*} + */ +function getIdentity(identity) { + if (!identities.has(identity)) { + throw Error('Record translator was not registered for this object identity'); + } + + return identities.get(identity); +} + +/***/ }), +/* 55 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -12912,22 +13179,25 @@ var arrayMapper = { function countRowShift(logicalRow) { // Todo: compare perf between reduce vs sort->each->brake return (0, _array.arrayReduce)(removedItems, function (count, removedLogicalRow) { + var result = count; + if (logicalRow > removedLogicalRow) { - count++; + result += 1; } - return count; + return result; }, 0); } this._arrayMap = (0, _array.arrayMap)(this._arrayMap, function (logicalRow) { - var rowShift = countRowShift(logicalRow); + var logicalRowIndex = logicalRow; + var rowShift = countRowShift(logicalRowIndex); if (rowShift) { - logicalRow -= rowShift; + logicalRowIndex -= rowShift; } - return logicalRow; + return logicalRowIndex; }); }, @@ -12944,10 +13214,13 @@ var arrayMapper = { var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; this._arrayMap = (0, _array.arrayMap)(this._arrayMap, function (row) { - if (row >= physicalIndex) { - row += amount; + var physicalRowIndex = row; + + if (physicalRowIndex >= physicalIndex) { + physicalRowIndex += amount; } - return row; + + return physicalRowIndex; }); (0, _number.rangeEach)(amount - 1, function (count) { @@ -12984,215 +13257,6 @@ var arrayMapper = { exports.default = arrayMapper; -/***/ }), -/* 52 */ -/***/ (function(module, exports) { - -var toString = {}.toString; - -module.exports = function (it) { - return toString.call(it).slice(8, -1); -}; - - -/***/ }), -/* 53 */ -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(13); -module.exports = function (it, TYPE) { - if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); - return it; -}; - - -/***/ }), -/* 54 */ -/***/ (function(module, exports, __webpack_require__) { - -// 22.1.3.31 Array.prototype[@@unscopables] -var UNSCOPABLES = __webpack_require__(14)('unscopables'); -var ArrayProto = Array.prototype; -if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(38)(ArrayProto, UNSCOPABLES, {}); -module.exports = function (key) { - ArrayProto[UNSCOPABLES][key] = true; -}; - - -/***/ }), -/* 55 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.__esModule = true; -exports.RecordTranslator = undefined; - -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; }; }(); - -exports.registerIdentity = registerIdentity; -exports.getTranslator = getTranslator; - -var _core = __webpack_require__(156); - -var _core2 = _interopRequireDefault(_core); - -var _object = __webpack_require__(1); - -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"); } } - -/** - * @class RecordTranslator - * @util - */ -var RecordTranslator = function () { - function RecordTranslator(hot) { - _classCallCheck(this, RecordTranslator); - - this.hot = hot; - } - - /** - * Translate physical row index into visual. - * - * @param {Number} row Physical row index. - * @returns {Number} Returns visual row index. - */ - - - _createClass(RecordTranslator, [{ - key: 'toVisualRow', - value: function toVisualRow(row) { - return this.hot.runHooks('unmodifyRow', row); - } - - /** - * Translate physical column index into visual. - * - * @param {Number} column Physical column index. - * @returns {Number} Returns visual column index. - */ - - }, { - key: 'toVisualColumn', - value: function toVisualColumn(column) { - return this.hot.runHooks('unmodifyCol', column); - } - - /** - * Translate physical coordinates into visual. Can be passed as separate 2 arguments (row, column) or as an object in first - * argument with `row` and `column` keys. - * - * @param {Number|Object} row Physical coordinates or row index. - * @param {Number} [column] Physical column index. - * @returns {Object|Array} Returns an object with visual records or an array if coordinates passed as separate arguments. - */ - - }, { - key: 'toVisual', - value: function toVisual(row, column) { - var result = void 0; - - if ((0, _object.isObject)(row)) { - result = { - row: this.toVisualRow(row.row), - column: this.toVisualColumn(row.column) - }; - } else { - result = [this.toVisualRow(row), this.toVisualColumn(column)]; - } - - return result; - } - - /** - * Translate visual row index into physical. - * - * @param {Number} row Visual row index. - * @returns {Number} Returns physical row index. - */ - - }, { - key: 'toPhysicalRow', - value: function toPhysicalRow(row) { - return this.hot.runHooks('modifyRow', row); - } - - /** - * Translate visual column index into physical. - * - * @param {Number} column Visual column index. - * @returns {Number} Returns physical column index. - */ - - }, { - key: 'toPhysicalColumn', - value: function toPhysicalColumn(column) { - return this.hot.runHooks('modifyCol', column); - } - - /** - * Translate visual coordinates into physical. Can be passed as separate 2 arguments (row, column) or as an object in first - * argument with `row` and `column` keys. - * - * @param {Number|Object} row Visual coordinates or row index. - * @param {Number} [column] Visual column index. - * @returns {Object|Array} Returns an object with physical records or an array if coordinates passed as separate arguments. - */ - - }, { - key: 'toPhysical', - value: function toPhysical(row, column) { - var result = void 0; - - if ((0, _object.isObject)(row)) { - result = { - row: this.toPhysicalRow(row.row), - column: this.toPhysicalColumn(row.column) - }; - } else { - result = [this.toPhysicalRow(row), this.toPhysicalColumn(column)]; - } - - return result; - } - }]); - - return RecordTranslator; -}(); - -exports.RecordTranslator = RecordTranslator; - - -var identities = new WeakMap(); -var translatorSingletons = new WeakMap(); - -function registerIdentity(identity, hot) { - identities.set(identity, hot); -} - -function getTranslator(identity) { - var singleton = void 0; - - if (!(identity instanceof _core2.default)) { - if (!identities.has(identity)) { - throw Error('Record translator was not registered for this object identity'); - } - identity = identities.get(identity); - } - if (translatorSingletons.has(identity)) { - singleton = translatorSingletons.get(identity); - } else { - singleton = new RecordTranslator(identity); - translatorSingletons.set(identity, singleton); - } - - return singleton; -} - /***/ }), /* 56 */ /***/ (function(module, exports, __webpack_require__) { @@ -13423,7 +13487,7 @@ module.exports = {}; /***/ (function(module, exports, __webpack_require__) { var def = __webpack_require__(23).f; -var has = __webpack_require__(36); +var has = __webpack_require__(35); var TAG = __webpack_require__(14)('toStringTag'); module.exports = function (it, tag, stat) { @@ -13964,10 +14028,12 @@ TextEditor.prototype.hideEditableElement = function () { this.textareaParentStyle.top = '-9999px'; this.textareaParentStyle.left = '-9999px'; this.textareaParentStyle.zIndex = '-1'; + this.textareaParentStyle.position = 'fixed'; }; TextEditor.prototype.showEditableElement = function () { this.textareaParentStyle.zIndex = this.holderZIndex >= 0 ? this.holderZIndex : ''; + this.textareaParentStyle.position = ''; }; TextEditor.prototype.getValue = function () { @@ -13995,10 +14061,9 @@ TextEditor.prototype.beginEditing = function () { var onBeforeKeyDown = function onBeforeKeyDown(event) { var instance = this; var that = instance.getActiveEditor(); - var ctrlDown = void 0; // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL) - ctrlDown = (event.ctrlKey || event.metaKey) && !event.altKey; + var ctrlDown = (event.ctrlKey || event.metaKey) && !event.altKey; // Process only events that have been fired in the editor if (event.target !== that.TEXTAREA || (0, _event.isImmediatePropagationStopped)(event)) { @@ -14177,7 +14242,8 @@ TextEditor.prototype.getEditedCell = function () { }; TextEditor.prototype.refreshValue = function () { - var sourceData = this.instance.getSourceDataAtCell(this.row, this.prop); + var physicalRow = this.instance.toPhysicalRow(this.row); + var sourceData = this.instance.getSourceDataAtCell(physicalRow, this.col); this.originalValue = sourceData; this.setValue(sourceData); @@ -14283,7 +14349,7 @@ TextEditor.prototype.refreshDimensions = function () { this.TEXTAREA.style.fontSize = cellComputedStyle.fontSize; this.TEXTAREA.style.fontFamily = cellComputedStyle.fontFamily; - this.TEXTAREA.style.backgroundColor = backgroundColor ? backgroundColor : (0, _element.getComputedStyle)(this.TEXTAREA).backgroundColor; + this.TEXTAREA.style.backgroundColor = backgroundColor || (0, _element.getComputedStyle)(this.TEXTAREA).backgroundColor; this.autoResize.init(this.TEXTAREA, { minHeight: Math.min(height, maxHeight), @@ -14347,7 +14413,7 @@ exports.toEmptyString = toEmptyString; exports.unifyColumnValues = unifyColumnValues; exports.intersectValues = intersectValues; -var _feature = __webpack_require__(42); +var _feature = __webpack_require__(41); var _array = __webpack_require__(0); @@ -14376,11 +14442,13 @@ function sortComparison(a, b) { * @returns {*} */ function toVisualValue(value, defaultEmptyValue) { - if (value === '') { - value = '(' + defaultEmptyValue + ')'; + var visualValue = value; + + if (visualValue === '') { + visualValue = '(' + defaultEmptyValue + ')'; } - return value; + return visualValue; } var SUPPORT_SET_CONSTRUCTOR = new Set([1]).has(1); @@ -14393,18 +14461,20 @@ var SUPPORT_FAST_DEDUPE = SUPPORT_SET_CONSTRUCTOR && typeof Array.from === 'func * @returns {Function} */ function createArrayAssertion(initialData) { + var dataset = initialData; + if (SUPPORT_SET_CONSTRUCTOR) { - initialData = new Set(initialData); + dataset = new Set(dataset); } return function (value) { var result = void 0; if (SUPPORT_SET_CONSTRUCTOR) { - result = initialData.has(value); + result = dataset.has(value); } else { /* eslint-disable no-bitwise */ - result = !!~initialData.indexOf(value); + result = !!~dataset.indexOf(value); } return result; @@ -14418,7 +14488,7 @@ function createArrayAssertion(initialData) { * @returns {String} */ function toEmptyString(value) { - return value == null ? '' : value; + return value === null || value === void 0 ? '' : value; } /** @@ -14428,12 +14498,14 @@ function toEmptyString(value) { * @returns {Array} */ function unifyColumnValues(values) { + var unifiedValues = values; + if (SUPPORT_FAST_DEDUPE) { - values = Array.from(new Set(values)); + unifiedValues = Array.from(new Set(unifiedValues)); } else { - values = (0, _array.arrayUnique)(values); + unifiedValues = (0, _array.arrayUnique)(unifiedValues); } - values = values.sort(function (a, b) { + unifiedValues = unifiedValues.sort(function (a, b) { if (typeof a === 'number' && typeof b === 'number') { return a - b; } @@ -14445,7 +14517,7 @@ function unifyColumnValues(values) { return a > b ? 1 : -1; }); - return values; + return unifiedValues; } /** @@ -31286,7 +31358,7 @@ var _localHooks = __webpack_require__(20); var _localHooks2 = _interopRequireDefault(_localHooks); -var _utils = __webpack_require__(35); +var _utils = __webpack_require__(44); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -31399,10 +31471,10 @@ var ExpressionModifier = function () { var startFrom = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; (0, _array.arrayEach)(this.cells, function (cell) { - if (deltaRow != null) { + if (deltaRow !== null && deltaRow !== void 0) { _this._translateCell(cell, 'row', deltaRow, startFrom.row); } - if (deltaColumn != null) { + if (deltaColumn !== null && deltaColumn !== void 0) { _this._translateCell(cell, 'column', deltaColumn, startFrom.column); } }); @@ -31527,18 +31599,18 @@ var ExpressionModifier = function () { return; } (0, _array.arrayEach)(matches, function (coord) { - coord = coord.match(BARE_CELL_REGEX); + var cellCoords = coord.match(BARE_CELL_REGEX); - if (!coord) { + if (!cellCoords) { return; } - var _extractLabel = (0, _hotFormulaParser.extractLabel)(coord[0]), + var _extractLabel = (0, _hotFormulaParser.extractLabel)(cellCoords[0]), _extractLabel2 = _slicedToArray(_extractLabel, 2), row = _extractLabel2[0], column = _extractLabel2[1]; - _this3.cells.push(_this3._createCell({ row: row, column: column }, { row: row, column: column }, coord[0])); + _this3.cells.push(_this3._createCell({ row: row, column: column }, { row: row, column: column }, cellCoords[0])); }); } @@ -31598,8 +31670,8 @@ var ExpressionModifier = function () { }, { key: '_searchCell', value: function _searchCell(label) { - var _arrayFilter = (0, _array.arrayFilter)(this.cells, function (cell) { - return cell.origLabel === label; + var _arrayFilter = (0, _array.arrayFilter)(this.cells, function (cellMeta) { + return cellMeta.origLabel === label; }), _arrayFilter2 = _slicedToArray(_arrayFilter, 1), cell = _arrayFilter2[0]; @@ -31627,13 +31699,13 @@ var ExpressionModifier = function () { type: label.indexOf(':') === -1 ? 'cell' : 'range', refError: false, toLabel: function toLabel() { - var label = (0, _hotFormulaParser.toLabel)(this.start.row, this.start.column); + var newLabel = (0, _hotFormulaParser.toLabel)(this.start.row, this.start.column); if (this.type === 'range') { - label += ':' + (0, _hotFormulaParser.toLabel)(this.end.row, this.end.column); + newLabel += ':' + (0, _hotFormulaParser.toLabel)(this.end.row, this.end.column); } - return label; + return newLabel; } }; } @@ -31675,7 +31747,7 @@ module.exports = function (index, length) { /* 73 */ /***/ (function(module, exports, __webpack_require__) { -var redefine = __webpack_require__(37); +var redefine = __webpack_require__(36); module.exports = function (target, src, safe) { for (var key in src) redefine(target, key, src[key], safe); return target; @@ -31707,7 +31779,7 @@ module.exports = function (it, Constructor, name, forbiddenField) { /* 76 */ /***/ (function(module, exports, __webpack_require__) { -var ctx = __webpack_require__(39); +var ctx = __webpack_require__(38); var call = __webpack_require__(172); var isArrayIter = __webpack_require__(173); var anObject = __webpack_require__(21); @@ -31742,9 +31814,9 @@ exports.RETURN = RETURN; var global = __webpack_require__(16); var $export = __webpack_require__(6); -var redefine = __webpack_require__(37); +var redefine = __webpack_require__(36); var redefineAll = __webpack_require__(73); -var meta = __webpack_require__(41); +var meta = __webpack_require__(40); var forOf = __webpack_require__(76); var anInstance = __webpack_require__(75); var isObject = __webpack_require__(13); @@ -31834,7 +31906,7 @@ var pIE = __webpack_require__(62); var createDesc = __webpack_require__(59); var toIObject = __webpack_require__(29); var toPrimitive = __webpack_require__(90); -var has = __webpack_require__(36); +var has = __webpack_require__(35); var IE8_DOM_DEFINE = __webpack_require__(168); var gOPD = Object.getOwnPropertyDescriptor; @@ -31859,9 +31931,9 @@ exports.f = __webpack_require__(27) ? gOPD : function getOwnPropertyDescriptor(O // 4 -> Array#every // 5 -> Array#find // 6 -> Array#findIndex -var ctx = __webpack_require__(39); +var ctx = __webpack_require__(38); var IObject = __webpack_require__(92); -var toObject = __webpack_require__(40); +var toObject = __webpack_require__(39); var toLength = __webpack_require__(30); var asc = __webpack_require__(484); module.exports = function (TYPE, $create) { @@ -31911,8 +31983,8 @@ exports.f = Object.getOwnPropertySymbols; "use strict"; -var hide = __webpack_require__(38); -var redefine = __webpack_require__(37); +var hide = __webpack_require__(37); +var redefine = __webpack_require__(36); var fails = __webpack_require__(28); var defined = __webpack_require__(47); var wks = __webpack_require__(14); @@ -31946,7 +32018,7 @@ module.exports = function (KEY, length, exec) { "use strict"; -var addToUnscopables = __webpack_require__(54); +var addToUnscopables = __webpack_require__(53); var step = __webpack_require__(178); var Iterators = __webpack_require__(60); var toIObject = __webpack_require__(29); @@ -32038,7 +32110,7 @@ function spreadsheetColumnIndex(label) { result += Math.pow(COLUMN_LABEL_BASE_LENGTH, j) * (COLUMN_LABEL_BASE.indexOf(label[i]) + 1); } } - --result; + result -= 1; return result; } @@ -32131,7 +32203,7 @@ function translateRowsToColumns(input) { for (j = 0, jlen = input[i].length; j < jlen; j++) { if (j === olen) { output.push([]); - olen++; + olen += 1; } output[j].push(input[i][j]); } @@ -32158,8 +32230,7 @@ function translateRowsToColumns(input) { * @returns {Function} */ function cellMethodLookupFactory(methodName, allowUndefined) { - - allowUndefined = typeof allowUndefined === 'undefined' ? true : allowUndefined; + var isUndefinedAllowed = typeof allowUndefined === 'undefined' ? true : allowUndefined; return function cellMethodLookup(row, col) { return function getMethodFromProperties(properties) { @@ -32179,7 +32250,7 @@ function cellMethodLookupFactory(methodName, allowUndefined) { if ((0, _object.hasOwnProperty)(type, methodName)) { return type[methodName]; // method defined in type. - } else if (allowUndefined) { + } else if (isUndefinedAllowed) { return; // method does not defined in type (eg. validator), returns undefined } } @@ -32231,19 +32302,20 @@ var _staticRegister = (0, _staticRegister3.default)('languagesDictionaries'), function registerLanguage(languageCodeOrDictionary, dictionary) { var languageCode = languageCodeOrDictionary; + var dictionaryObject = dictionary; // Dictionary passed as first argument. if ((0, _object.isObject)(languageCodeOrDictionary)) { - dictionary = languageCodeOrDictionary; - languageCode = dictionary.languageCode; + dictionaryObject = languageCodeOrDictionary; + languageCode = dictionaryObject.languageCode; } - extendLanguageDictionary(languageCode, dictionary); - registerGloballyLanguageDictionary(languageCode, (0, _object.deepClone)(dictionary)); + extendLanguageDictionary(languageCode, dictionaryObject); + registerGloballyLanguageDictionary(languageCode, (0, _object.deepClone)(dictionaryObject)); // We do not allow user to work with dictionary by reference, it can cause lot of bugs. - return (0, _object.deepClone)(dictionary); -}; + return (0, _object.deepClone)(dictionaryObject); +} /** * Get language dictionary for specific language code. @@ -32499,7 +32571,7 @@ function transformSelectionToColumnDistance(selectionRanges) { }); var normalizedColumnRanges = (0, _array.arrayReduce)(orderedIndexes, function (acc, visualColumnIndex, index, array) { if (index !== 0 && visualColumnIndex === array[index - 1] + 1) { - acc[acc.length - 1][1]++; + acc[acc.length - 1][1] += 1; } else { acc.push([visualColumnIndex, 1]); } @@ -32556,7 +32628,7 @@ function transformSelectionToRowDistance(selectionRanges) { }); var normalizedRowRanges = (0, _array.arrayReduce)(orderedIndexes, function (acc, rowIndex, index, array) { if (index !== 0 && rowIndex === array[index - 1] + 1) { - acc[acc.length - 1][1]++; + acc[acc.length - 1][1] += 1; } else { acc.push([rowIndex, 1]); } @@ -32579,7 +32651,7 @@ function isValidCoord(coord) { var maxTableItemsCount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Infinity; return typeof coord === 'number' && coord >= 0 && coord < maxTableItemsCount; -}; +} /***/ }), /* 86 */ @@ -32755,7 +32827,7 @@ exports.default = BaseComponent; "use strict"; var strong = __webpack_require__(167); -var validate = __webpack_require__(53); +var validate = __webpack_require__(52); var MAP = 'Map'; // 23.1 Map Objects @@ -32857,7 +32929,7 @@ module.exports = Object.create || function create(O, Properties) { /***/ (function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings -var cof = __webpack_require__(52); +var cof = __webpack_require__(51); // eslint-disable-next-line no-prototype-builtins module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); @@ -32938,7 +33010,7 @@ module.exports = function (exec, skipClosing) { "use strict"; var strong = __webpack_require__(167); -var validate = __webpack_require__(53); +var validate = __webpack_require__(52); var SET = 'Set'; // 23.2 Set Objects @@ -32959,13 +33031,13 @@ module.exports = __webpack_require__(77)(SET, function (get) { "use strict"; var each = __webpack_require__(79)(0); -var redefine = __webpack_require__(37); -var meta = __webpack_require__(41); +var redefine = __webpack_require__(36); +var meta = __webpack_require__(40); var assign = __webpack_require__(182); var weak = __webpack_require__(183); var isObject = __webpack_require__(13); var fails = __webpack_require__(28); -var validate = __webpack_require__(53); +var validate = __webpack_require__(52); var WEAK_MAP = 'WeakMap'; var getWeak = meta.getWeak; var isExtensible = Object.isExtensible; @@ -33025,7 +33097,7 @@ if (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp) "use strict"; var weak = __webpack_require__(183); -var validate = __webpack_require__(53); +var validate = __webpack_require__(52); var WEAK_SET = 'WeakSet'; // 23.4 WeakSet Objects @@ -33047,7 +33119,7 @@ __webpack_require__(77)(WEAK_SET, function (get) { var LIBRARY = __webpack_require__(57); var global = __webpack_require__(16); -var ctx = __webpack_require__(39); +var ctx = __webpack_require__(38); var classof = __webpack_require__(175); var $export = __webpack_require__(6); var isObject = __webpack_require__(13); @@ -33336,7 +33408,7 @@ $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(96)(function /* 101 */ /***/ (function(module, exports, __webpack_require__) { -var ctx = __webpack_require__(39); +var ctx = __webpack_require__(38); var invoke = __webpack_require__(487); var html = __webpack_require__(171); var cel = __webpack_require__(89); @@ -33379,7 +33451,7 @@ if (!setTask || !clearTask) { delete queue[id]; }; // Node.js 0.8- - if (__webpack_require__(52)(process) == 'process') { + if (__webpack_require__(51)(process) == 'process') { defer = function (id) { process.nextTick(ctx(run, id, 1)); }; @@ -33440,11 +33512,11 @@ module.exports = navigator && navigator.userAgent || ''; // ECMAScript 6 symbols shim var global = __webpack_require__(16); -var has = __webpack_require__(36); +var has = __webpack_require__(35); var DESCRIPTORS = __webpack_require__(27); var $export = __webpack_require__(6); -var redefine = __webpack_require__(37); -var META = __webpack_require__(41).KEY; +var redefine = __webpack_require__(36); +var META = __webpack_require__(40).KEY; var $fails = __webpack_require__(28); var shared = __webpack_require__(94); var setToStringTag = __webpack_require__(61); @@ -33664,7 +33736,7 @@ $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { }); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) -$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(38)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(37)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag] setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag] @@ -33692,7 +33764,7 @@ exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { // 19.1.2.5 Object.freeze(O) var isObject = __webpack_require__(13); -var meta = __webpack_require__(41).onFreeze; +var meta = __webpack_require__(40).onFreeze; __webpack_require__(31)('freeze', function ($freeze) { return function freeze(it) { @@ -33707,7 +33779,7 @@ __webpack_require__(31)('freeze', function ($freeze) { // 19.1.2.17 Object.seal(O) var isObject = __webpack_require__(13); -var meta = __webpack_require__(41).onFreeze; +var meta = __webpack_require__(40).onFreeze; __webpack_require__(31)('seal', function ($seal) { return function seal(it) { @@ -33722,7 +33794,7 @@ __webpack_require__(31)('seal', function ($seal) { // 19.1.2.15 Object.preventExtensions(O) var isObject = __webpack_require__(13); -var meta = __webpack_require__(41).onFreeze; +var meta = __webpack_require__(40).onFreeze; __webpack_require__(31)('preventExtensions', function ($preventExtensions) { return function preventExtensions(it) { @@ -33793,7 +33865,7 @@ __webpack_require__(31)('getOwnPropertyDescriptor', function () { /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 Object.getPrototypeOf(O) -var toObject = __webpack_require__(40); +var toObject = __webpack_require__(39); var $getPrototypeOf = __webpack_require__(177); __webpack_require__(31)('getPrototypeOf', function () { @@ -33808,7 +33880,7 @@ __webpack_require__(31)('getPrototypeOf', function () { /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 Object.keys(O) -var toObject = __webpack_require__(40); +var toObject = __webpack_require__(39); var $keys = __webpack_require__(46); __webpack_require__(31)('keys', function () { @@ -34206,9 +34278,9 @@ __webpack_require__(81)('search', 1, function (defined, SEARCH, $search) { "use strict"; -var ctx = __webpack_require__(39); +var ctx = __webpack_require__(38); var $export = __webpack_require__(6); -var toObject = __webpack_require__(40); +var toObject = __webpack_require__(39); var call = __webpack_require__(172); var isArrayIter = __webpack_require__(173); var toLength = __webpack_require__(30); @@ -34294,7 +34366,7 @@ var $export = __webpack_require__(6); $export($export.P, 'Array', { copyWithin: __webpack_require__(496) }); -__webpack_require__(54)('copyWithin'); +__webpack_require__(53)('copyWithin'); /***/ }), @@ -34315,7 +34387,7 @@ $export($export.P + $export.F * forced, 'Array', { return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); -__webpack_require__(54)(KEY); +__webpack_require__(53)(KEY); /***/ }), @@ -34336,7 +34408,7 @@ $export($export.P + $export.F * forced, 'Array', { return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); -__webpack_require__(54)(KEY); +__webpack_require__(53)(KEY); /***/ }), @@ -34348,7 +34420,7 @@ var $export = __webpack_require__(6); $export($export.P, 'Array', { fill: __webpack_require__(497) }); -__webpack_require__(54)('fill'); +__webpack_require__(53)('fill'); /***/ }), @@ -34453,7 +34525,7 @@ $export($export.P, 'Array', { } }); -__webpack_require__(54)('includes'); +__webpack_require__(53)('includes'); /***/ }), @@ -34570,9 +34642,9 @@ $export($export.G + $export.B, { var $iterators = __webpack_require__(82); var getKeys = __webpack_require__(46); -var redefine = __webpack_require__(37); +var redefine = __webpack_require__(36); var global = __webpack_require__(16); -var hide = __webpack_require__(38); +var hide = __webpack_require__(37); var Iterators = __webpack_require__(60); var wks = __webpack_require__(14); var ITERATOR = wks('iterator'); @@ -34646,7 +34718,7 @@ var _editors = __webpack_require__(19); var _renderers = __webpack_require__(15); -var _validators = __webpack_require__(43); +var _validators = __webpack_require__(42); var _autocompleteType = __webpack_require__(531); @@ -34799,7 +34871,7 @@ var _plugins = __webpack_require__(5); var _renderers = __webpack_require__(15); -var _validators = __webpack_require__(43); +var _validators = __webpack_require__(42); var _string = __webpack_require__(32); @@ -34815,7 +34887,7 @@ var _dataSource2 = _interopRequireDefault(_dataSource); var _data = __webpack_require__(83); -var _recordTranslator = __webpack_require__(55); +var _recordTranslator = __webpack_require__(54); var _rootInstance = __webpack_require__(455); @@ -35093,14 +35165,16 @@ function Core(rootElement, userSettings) { * Alter actions such as "remove_row" and "remove_col" support array indexes in the * format `[[index, amount], [index, amount]...]` this can be used to remove * non-consecutive columns or rows in one call. - * @param {Number} amount Ammount rows or columns to remove. + * @param {Number} [amount=1] Ammount rows or columns to remove. * @param {String} [source] Optional. Source of hook runner. * @param {Boolean} [keepEmptyRows] Optional. Flag for preventing deletion of empty rows. */ - alter: function alter(action, index, amount, source, keepEmptyRows) { - var delta = void 0; + alter: function alter(action, index) { + var amount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; + var source = arguments[3]; + var keepEmptyRows = arguments[4]; - amount = amount || 1; + var delta = void 0; function spliceWith(data, startIndex, count, toInject) { var valueFactory = function valueFactory() { @@ -35181,7 +35255,7 @@ function Core(rootElement, userSettings) { if (instance.getSettings().maxRows === numberOfSourceRows) { return; } - + // eslint-disable-next-line no-param-reassign index = (0, _mixed.isDefined)(index) ? index : numberOfSourceRows; delta = datamap.createRow(index, amount, source); @@ -35238,6 +35312,7 @@ function Core(rootElement, userSettings) { // If the 'index' is an integer decrease it by 'offset' otherwise pass it through to make the value // compatible with datamap.removeCol method. if (Number.isInteger(groupIndex)) { + // eslint-disable-next-line no-param-reassign groupIndex = Math.max(groupIndex - offset, 0); } @@ -35291,6 +35366,7 @@ function Core(rootElement, userSettings) { // If the 'index' is an integer decrease it by 'offset' otherwise pass it through to make the value // compatible with datamap.removeCol method. if (Number.isInteger(groupIndex)) { + // eslint-disable-next-line no-param-reassign groupIndex = Math.max(groupIndex - offset, 0); } @@ -35485,6 +35561,7 @@ function Core(rootElement, userSettings) { case 'shift_down': repeatCol = end ? end.col - start.col + 1 : 0; repeatRow = end ? end.row - start.row + 1 : 0; + // eslint-disable-next-line no-param-reassign input = (0, _data.translateRowsToColumns)(input); for (c = 0, clen = input.length, cmax = Math.max(clen, repeatCol); c < cmax; c++) { if (c < clen) { @@ -35576,9 +35653,9 @@ function Core(rootElement, userSettings) { cellMeta = instance.getCellMeta(current.row, current.col); if ((source === 'CopyPaste.paste' || source === 'Autofill.autofill') && cellMeta.skipRowOnPaste) { - skippedRow++; - current.row++; - rlen++; + skippedRow += 1; + current.row += 1; + rlen += 1; /* eslint-disable no-continue */ continue; } @@ -35591,13 +35668,13 @@ function Core(rootElement, userSettings) { cellMeta = instance.getCellMeta(current.row, current.col); if ((source === 'CopyPaste.paste' || source === 'Autofill.fill') && cellMeta.skipColumnOnPaste) { - skippedColumn++; - current.col++; - clen++; + skippedColumn += 1; + current.col += 1; + clen += 1; continue; } if (cellMeta.readOnly) { - current.col++; + current.col += 1; /* eslint-disable no-continue */ continue; } @@ -35637,9 +35714,9 @@ function Core(rootElement, userSettings) { setData.push([current.row, current.col, value]); } pushData = true; - current.col++; + current.col += 1; } - current.row++; + current.row += 1; } instance.setDataAtCell(setData, null, null, source || 'populateFromArray'); break; @@ -35701,7 +35778,7 @@ function Core(rootElement, userSettings) { validatorsInQueue: 0, valid: true, addValidatorToQueue: function addValidatorToQueue() { - this.validatorsInQueue++; + this.validatorsInQueue += 1; resolved = false; }, removeValidatorFormQueue: function removeValidatorFormQueue() { @@ -35774,7 +35851,7 @@ function Core(rootElement, userSettings) { cellPropertiesReference.valid = true; // we cancelled the change, so cell value is still valid var cell = instance.getCell(cellPropertiesReference.visualRow, cellPropertiesReference.visualCol); (0, _element.removeClass)(cell, instance.getSettings().invalidCellClassName); - --index; + // index -= 1; } waitingForValidator.removeValidatorFormQueue(); }; @@ -35824,7 +35901,7 @@ function Core(rootElement, userSettings) { continue; } - if (changes[i][2] == null && changes[i][3] == null) { + if ((changes[i][2] === null || changes[i][2] === void 0) && (changes[i][3] === null || changes[i][3] === void 0)) { /* eslint-disable no-continue */ continue; } @@ -35910,12 +35987,13 @@ function Core(rootElement, userSettings) { } if ((0, _function.isFunction)(validator)) { - + // eslint-disable-next-line no-param-reassign value = instance.runHooks('beforeValidate', value, cellProperties.visualRow, cellProperties.prop, source); // To provide consistent behaviour, validation should be always asynchronous instance._registerTimeout(setTimeout(function () { validator.call(cellProperties, value, function (valid) { + // eslint-disable-next-line no-param-reassign valid = instance.runHooks('afterValidate', valid, value, cellProperties.visualRow, cellProperties.prop, source); cellProperties.valid = valid; @@ -35955,6 +36033,7 @@ function Core(rootElement, userSettings) { this.setDataAtCell = function (row, column, value, source) { var input = setDataInputToArray(row, column, value); var changes = []; + var changeSource = source; var i = void 0; var ilen = void 0; var prop = void 0; @@ -35970,14 +36049,14 @@ function Core(rootElement, userSettings) { changes.push([input[i][0], prop, dataSource.getAtCell(recordTranslator.toPhysicalRow(input[i][0]), input[i][1]), input[i][2]]); } - if (!source && (typeof row === 'undefined' ? 'undefined' : _typeof(row)) === 'object') { - source = column; + if (!changeSource && (typeof row === 'undefined' ? 'undefined' : _typeof(row)) === 'object') { + changeSource = column; } - instance.runHooks('afterSetDataAtCell', changes, source); + instance.runHooks('afterSetDataAtCell', changes, changeSource); - validateChanges(changes, source, function () { - applyChanges(changes, source); + validateChanges(changes, changeSource, function () { + applyChanges(changes, changeSource); }); }; @@ -35996,6 +36075,7 @@ function Core(rootElement, userSettings) { this.setDataAtRowProp = function (row, prop, value, source) { var input = setDataInputToArray(row, prop, value); var changes = []; + var changeSource = source; var i = void 0; var ilen = void 0; @@ -36003,14 +36083,14 @@ function Core(rootElement, userSettings) { changes.push([input[i][0], input[i][1], dataSource.getAtCell(recordTranslator.toPhysicalRow(input[i][0]), input[i][1]), input[i][2]]); } - if (!source && (typeof row === 'undefined' ? 'undefined' : _typeof(row)) === 'object') { - source = prop; + if (!changeSource && (typeof row === 'undefined' ? 'undefined' : _typeof(row)) === 'object') { + changeSource = prop; } - instance.runHooks('afterSetDataAtRowProp', changes, source); + instance.runHooks('afterSetDataAtRowProp', changes, changeSource); - validateChanges(changes, source, function () { - applyChanges(changes, source); + validateChanges(changes, changeSource, function () { + applyChanges(changes, changeSource); }); }; @@ -36104,12 +36184,11 @@ function Core(rootElement, userSettings) { * Useful **only** when the type of handled cells is `numeric`. */ this.populateFromArray = function (row, column, input, endRow, endCol, source, method, direction, deltas) { - var c = void 0; - if (!((typeof input === 'undefined' ? 'undefined' : _typeof(input)) === 'object' && _typeof(input[0]) === 'object')) { throw new Error('populateFromArray parameter `input` must be an array of arrays'); // API changed in 0.9-beta2, let's check if you use it correctly } - c = typeof endRow === 'number' ? new _src.CellCoords(endRow, endCol) : null; + + var c = typeof endRow === 'number' ? new _src.CellCoords(endRow, endCol) : null; return grid.populateFromArray(new _src.CellCoords(row, column), input, c, source, method, direction, deltas); }; @@ -36314,10 +36393,12 @@ function Core(rootElement, userSettings) { if (!(data.push && data.splice)) { // check if data is array. Must use duck-type check so Backbone Collections also pass it // when data is not an array, attempt to make a single-row array of it + // eslint-disable-next-line no-param-reassign data = [data]; } } else if (data === null) { var dataSchema = datamap.getSchema(); + // eslint-disable-next-line no-param-reassign data = []; var row = void 0; var r = 0; @@ -36484,6 +36565,7 @@ function Core(rootElement, userSettings) { throw new Error('"cols" setting is no longer supported. do you mean startCols, minCols or maxCols?'); } + // eslint-disable-next-line no-restricted-syntax for (i in settings) { if (i === 'data') { /* eslint-disable-next-line no-continue */ @@ -36556,18 +36638,14 @@ function Core(rootElement, userSettings) { } } - j++; + j += 1; } } if ((0, _mixed.isDefined)(settings.cell)) { - for (var key in settings.cell) { - if ((0, _object.hasOwnProperty)(settings.cell, key)) { - var cell = settings.cell[key]; - - instance.setCellMetaObject(cell.row, cell.col, cell); - } - } + (0, _object.objectEach)(settings.cell, function (cell) { + instance.setCellMetaObject(cell.row, cell.col, cell); + }); } instance.runHooks('afterCellMetaReset'); @@ -36682,6 +36760,7 @@ function Core(rootElement, userSettings) { type = (0, _cellTypes.getCellType)(obj.type); } + // eslint-disable-next-line no-restricted-syntax for (var i in type) { if ((0, _object.hasOwnProperty)(type, i) && !(0, _object.hasOwnProperty)(obj, i)) { expandedType[i] = type[i]; @@ -37063,27 +37142,27 @@ function Core(rootElement, userSettings) { this.getDataType = function (rowFrom, columnFrom, rowTo, columnTo) { var _this3 = this; + var coords = rowFrom === void 0 ? [0, 0, this.countRows(), this.countCols()] : [rowFrom, columnFrom, rowTo, columnTo]; + var rowStart = coords[0], + columnStart = coords[1]; + var rowEnd = coords[2], + columnEnd = coords[3]; + var previousType = null; var currentType = null; - if (rowFrom === void 0) { - rowFrom = 0; - rowTo = this.countRows(); - columnFrom = 0; - columnTo = this.countCols(); - } - if (rowTo === void 0) { - rowTo = rowFrom; + if (rowEnd === void 0) { + rowEnd = rowStart; } - if (columnTo === void 0) { - columnTo = columnFrom; + if (columnEnd === void 0) { + columnEnd = columnStart; } var type = 'mixed'; - (0, _number.rangeEach)(Math.min(rowFrom, rowTo), Math.max(rowFrom, rowTo), function (row) { + (0, _number.rangeEach)(Math.min(rowStart, rowEnd), Math.max(rowStart, rowEnd), function (row) { var isTypeEqual = true; - (0, _number.rangeEach)(Math.min(columnFrom, columnTo), Math.max(columnFrom, columnTo), function (column) { + (0, _number.rangeEach)(Math.min(columnStart, columnEnd), Math.max(columnStart, columnEnd), function (column) { var cellType = _this3.getCellMeta(row, column); currentType = cellType.type; @@ -37162,13 +37241,12 @@ function Core(rootElement, userSettings) { * @param {Object} prop Meta object. */ this.setCellMetaObject = function (row, column, prop) { + var _this4 = this; + if ((typeof prop === 'undefined' ? 'undefined' : _typeof(prop)) === 'object') { - for (var key in prop) { - if ((0, _object.hasOwnProperty)(prop, key)) { - var value = prop[key]; - this.setCellMeta(row, column, key, value); - } - } + (0, _object.objectEach)(prop, function (value, key) { + _this4.setCellMeta(row, column, key, value); + }); } }; @@ -37227,16 +37305,15 @@ function Core(rootElement, userSettings) { */ this.getCellMeta = function (row, column) { var prop = datamap.colToProp(column); - var cellProperties = void 0; var _recordTranslator$toP5 = recordTranslator.toPhysical(row, column), _recordTranslator$toP6 = _slicedToArray(_recordTranslator$toP5, 2), - physicalRow = _recordTranslator$toP6[0], + potentialPhysicalRow = _recordTranslator$toP6[0], physicalColumn = _recordTranslator$toP6[1]; - // Workaround for #11. Connected also with #3849. It should be fixed within #4497. - + var physicalRow = potentialPhysicalRow; + // Workaround for #11. Connected also with #3849. It should be fixed within #4497. if (physicalRow === null) { physicalRow = row; } @@ -37252,7 +37329,7 @@ function Core(rootElement, userSettings) { priv.cellSettings[physicalRow][physicalColumn] = new priv.columnSettings[physicalColumn](); } - cellProperties = priv.cellSettings[physicalRow][physicalColumn]; // retrieve cellProperties from cache + var cellProperties = priv.cellSettings[physicalRow][physicalColumn]; // retrieve cellProperties from cache cellProperties.row = physicalRow; cellProperties.col = physicalColumn; @@ -37468,14 +37545,14 @@ function Core(rootElement, userSettings) { while (i >= 0) { if (rows !== undefined && rows.indexOf(i) === -1) { - i--; + i -= 1; continue; } var j = instance.countCols() - 1; while (j >= 0) { if (columns !== undefined && columns.indexOf(j) === -1) { - j--; + j -= 1; continue; } waitingForValidator.addValidatorToQueue(); @@ -37489,9 +37566,9 @@ function Core(rootElement, userSettings) { } waitingForValidator.removeValidatorFormQueue(); }, 'validateCells'); - j--; + j -= 1; } - i--; + i -= 1; } waitingForValidator.checkIfQueueIsEmpty(); }; @@ -37507,21 +37584,22 @@ function Core(rootElement, userSettings) { */ this.getRowHeader = function (row) { var rowHeader = priv.settings.rowHeaders; + var physicalRow = row; - if (row !== void 0) { - row = instance.runHooks('modifyRowHeader', row); + if (physicalRow !== void 0) { + physicalRow = instance.runHooks('modifyRowHeader', physicalRow); } - if (row === void 0) { + if (physicalRow === void 0) { rowHeader = []; (0, _number.rangeEach)(instance.countRows() - 1, function (i) { rowHeader.push(instance.getRowHeader(i)); }); - } else if (Array.isArray(rowHeader) && rowHeader[row] !== void 0) { - rowHeader = rowHeader[row]; + } else if (Array.isArray(rowHeader) && rowHeader[physicalRow] !== void 0) { + rowHeader = rowHeader[physicalRow]; } else if ((0, _function.isFunction)(rowHeader)) { - rowHeader = rowHeader(row); + rowHeader = rowHeader(physicalRow); } else if (rowHeader && typeof rowHeader !== 'string' && typeof rowHeader !== 'number') { - rowHeader = row + 1; + rowHeader = physicalRow + 1; } return rowHeader; @@ -37571,11 +37649,10 @@ function Core(rootElement, userSettings) { */ this.getColHeader = function (column) { var columnsAsFunc = priv.settings.columns && (0, _function.isFunction)(priv.settings.columns); + var columnIndex = instance.runHooks('modifyColHeader', column); var result = priv.settings.colHeaders; - column = instance.runHooks('modifyColHeader', column); - - if (column === void 0) { + if (columnIndex === void 0) { var out = []; var ilen = columnsAsFunc ? instance.countSourceCols() : instance.countCols(); @@ -37598,19 +37675,19 @@ function Core(rootElement, userSettings) { return arr[visualColumnIndex]; }; - var baseCol = column; - column = instance.runHooks('modifyCol', column); + var baseCol = columnIndex; + var physicalColumn = instance.runHooks('modifyCol', baseCol); - var prop = translateVisualIndexToColumns(column); + var prop = translateVisualIndexToColumns(physicalColumn); if (priv.settings.columns && (0, _function.isFunction)(priv.settings.columns) && priv.settings.columns(prop) && priv.settings.columns(prop).title) { result = priv.settings.columns(prop).title; - } else if (priv.settings.columns && priv.settings.columns[column] && priv.settings.columns[column].title) { - result = priv.settings.columns[column].title; - } else if (Array.isArray(priv.settings.colHeaders) && priv.settings.colHeaders[column] !== void 0) { - result = priv.settings.colHeaders[column]; + } else if (priv.settings.columns && priv.settings.columns[physicalColumn] && priv.settings.columns[physicalColumn].title) { + result = priv.settings.columns[physicalColumn].title; + } else if (Array.isArray(priv.settings.colHeaders) && priv.settings.colHeaders[physicalColumn] !== void 0) { + result = priv.settings.colHeaders[physicalColumn]; } else if ((0, _function.isFunction)(priv.settings.colHeaders)) { - result = priv.settings.colHeaders(column); + result = priv.settings.colHeaders(physicalColumn); } else if (priv.settings.colHeaders && typeof priv.settings.colHeaders !== 'string' && typeof priv.settings.colHeaders !== 'number') { result = (0, _data.spreadsheetColumnLabel)(baseCol); // see #1458 } @@ -37805,7 +37882,7 @@ function Core(rootElement, userSettings) { for (var i = 0; i < dataLen; i++) { if (priv.settings.columns(i)) { - columnLen++; + columnLen += 1; } } @@ -38233,18 +38310,17 @@ function Core(rootElement, userSettings) { instance.runHooks('afterDestroy'); _pluginHooks2.default.getSingleton().destroy(instance); - for (var i in instance) { - if ((0, _object.hasOwnProperty)(instance, i)) { - // replace instance methods with post mortem - if ((0, _function.isFunction)(instance[i])) { - instance[i] = postMortem(i); - } else if (i !== 'guid') { - // replace instance properties with null (restores memory) - // it should not be necessary but this prevents a memory leak side effects that show itself in Jasmine tests - instance[i] = null; - } + (0, _object.objectEach)(instance, function (property, key, obj) { + // replace instance methods with post mortem + if ((0, _function.isFunction)(property)) { + obj[key] = postMortem(key); + } else if (key !== 'guid') { + // replace instance properties with null (restores memory) + // it should not be necessary but this prevents a memory leak side effects that show itself in Jasmine tests + obj[key] = null; } - } + }); + instance.isDestroyed = true; // replace private properties with null (restores memory) @@ -38432,11 +38508,13 @@ function Core(rootElement, userSettings) { this._registerTimeout = function (handle) { var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - if (typeof handle === 'function') { - handle = setTimeout(handle, delay); + var handleFunc = handle; + + if (typeof handleFunc === 'function') { + handleFunc = setTimeout(handleFunc, delay); } - this.timeouts.push(handle); + this.timeouts.push(handleFunc); }; /** @@ -38493,7 +38571,7 @@ function Core(rootElement, userSettings) { }; _pluginHooks2.default.getSingleton().run(instance, 'construct'); -}; +} /***/ }), /* 157 */ @@ -38516,7 +38594,7 @@ var _object = __webpack_require__(1); * @return {Object} ColumnSettings */ function columnFactory(GridSettings, conflictList) { - function ColumnSettings() {}; + function ColumnSettings() {} (0, _object.inherit)(ColumnSettings, GridSettings); @@ -38637,14 +38715,17 @@ var GhostTable = function () { }, { key: 'addColumnHeadersRow', value: function addColumnHeadersRow(samples) { - if (this.hot.getColHeader(0) != null) { + var colHeader = this.hot.getColHeader(0); + + if (colHeader !== null && colHeader !== void 0) { var rowObject = { row: -1 }; + this.rows.push(rowObject); this.container = this.createContainer(this.hot.rootElement.className); - this.samples = samples; this.table = this.createTable(this.hot.table.className); + this.table.colGroup.appendChild(this.createColGroupsCol()); this.table.tHead.appendChild(this.createColumnHeadersRow()); this.container.container.appendChild(this.table.fragment); @@ -39031,9 +39112,9 @@ var GhostTable = function () { var d = document; var fragment = d.createDocumentFragment(); var container = d.createElement('div'); + var containerClassName = 'htGhostTable htAutoSize ' + className.trim(); - className = 'htGhostTable htAutoSize ' + className.trim(); - (0, _element.addClass)(container, className); + (0, _element.addClass)(container, containerClassName); fragment.appendChild(container); return { fragment: fragment, container: container }; @@ -39127,7 +39208,7 @@ var _localHooks = __webpack_require__(20); var _localHooks2 = _interopRequireDefault(_localHooks); -var _predefinedItems = __webpack_require__(44); +var _predefinedItems = __webpack_require__(43); var _event = __webpack_require__(12); @@ -39689,9 +39770,10 @@ var Menu = function () { var itemIsSelectionDisabled = function itemIsSelectionDisabled(itemToTest) { return itemToTest.disableSelection; }; + var itemValue = value; - if (typeof value === 'function') { - value = value.call(this.hot); + if (typeof itemValue === 'function') { + itemValue = itemValue.call(this.hot); } (0, _element.empty)(TD); (0, _element.addClass)(wrapper, 'htItemWrapper'); @@ -39701,9 +39783,9 @@ var Menu = function () { (0, _element.addClass)(TD, 'htSeparator'); } else if (typeof item.renderer === 'function') { (0, _element.addClass)(TD, 'htCustomMenuRenderer'); - TD.appendChild(item.renderer(hot, wrapper, row, col, prop, value)); + TD.appendChild(item.renderer(hot, wrapper, row, col, prop, itemValue)); } else { - (0, _element.fastInnerHTML)(wrapper, value); + (0, _element.fastInnerHTML)(wrapper, itemValue); } if (itemIsDisabled(item)) { (0, _element.addClass)(TD, 'htDisabled'); @@ -39756,23 +39838,24 @@ var Menu = function () { value: function createContainer() { var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + var className = name; var container = void 0; - if (name) { - if ((0, _function.isFunction)(name)) { - name = name.call(this.hot); + if (className) { + if ((0, _function.isFunction)(className)) { + className = className.call(this.hot); - if (name === null || (0, _mixed.isUndefined)(name)) { - name = ''; + if (className === null || (0, _mixed.isUndefined)(className)) { + className = ''; } else { - name = name.toString(); + className = className.toString(); } } - name = name.replace(/[^A-z0-9]/g, '_'); - name = this.options.className + 'Sub_' + name; + className = className.replace(/[^A-z0-9]/g, '_'); + className = this.options.className + 'Sub_' + className; - container = document.querySelector('.' + this.options.className + '.' + name); + container = document.querySelector('.' + this.options.className + '.' + className); } else { container = document.querySelector('.' + this.options.className); } @@ -39782,8 +39865,8 @@ var Menu = function () { (0, _element.addClass)(container, 'htMenu ' + this.options.className); - if (name) { - (0, _element.addClass)(container, name); + if (className) { + (0, _element.addClass)(container, className); } document.getElementsByTagName('body')[0].appendChild(container); } @@ -40371,7 +40454,7 @@ var _object = __webpack_require__(1); var _array = __webpack_require__(0); -var _predefinedItems = __webpack_require__(44); +var _predefinedItems = __webpack_require__(43); var _conditionRegisterer = __webpack_require__(10); @@ -40472,17 +40555,19 @@ var TYPES = exports.TYPES = (_TYPES = {}, _defineProperty(_TYPES, TYPE_NUMERIC, */ function getOptionsList(type) { var items = []; + var typeName = type; - if (!TYPES[type]) { - type = TYPE_TEXT; + if (!TYPES[typeName]) { + typeName = TYPE_TEXT; } - (0, _array.arrayEach)(TYPES[type], function (type) { + + (0, _array.arrayEach)(TYPES[typeName], function (typeValue) { var option = void 0; - if (type === _predefinedItems.SEPARATOR) { + if (typeValue === _predefinedItems.SEPARATOR) { option = { name: _predefinedItems.SEPARATOR }; } else { - option = (0, _object.clone)((0, _conditionRegisterer.getConditionDescriptor)(type)); + option = (0, _object.clone)((0, _conditionRegisterer.getConditionDescriptor)(typeValue)); } items.push(option); }); @@ -40538,18 +40623,12 @@ var _element = __webpack_require__(2); var _object = __webpack_require__(1); -var _constants = __webpack_require__(3); - -var C = _interopRequireWildcard(_constants); - var _base = __webpack_require__(68); var _base2 = _interopRequireDefault(_base); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 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; } @@ -40597,8 +40676,8 @@ var InputUI = function (_BaseUI) { value: function registerHooks() { var _this2 = this; - this.addLocalHook('click', function (event) { - return _this2.onClick(event); + this.addLocalHook('click', function () { + return _this2.onClick(); }); this.addLocalHook('keyup', function (event) { return _this2.onKeyup(event); @@ -40658,13 +40737,11 @@ var InputUI = function (_BaseUI) { /** * OnClick listener. - * - * @param {Event} event */ }, { key: 'onClick', - value: function onClick(event) {} + value: function onClick() {} /** * OnKeyup listener. @@ -40837,19 +40914,21 @@ function setEndDate(rangeBar, value) { * @returns {Date|null} Parsed Date object or null, if not a valid date string. */ function parseDate(date) { - if (date === null) { + var newDate = date; + + if (newDate === null) { return null; } - if (!(date instanceof Date)) { - date = new Date(date); + if (!(newDate instanceof Date)) { + newDate = new Date(newDate); - if (date.toString() === 'Invalid Date') { + if (newDate.toString() === 'Invalid Date') { return null; } } - return date; + return newDate; } /** @@ -40859,9 +40938,9 @@ function parseDate(date) { * @returns {Number|null} The year from the provided date. */ function getDateYear(date) { - date = parseDate(date); + var newDate = parseDate(date); - return date ? date.getFullYear() : null; + return newDate ? newDate.getFullYear() : null; } /***/ }), @@ -40908,15 +40987,15 @@ exports.default = BaseUI; var dP = __webpack_require__(23).f; var create = __webpack_require__(91); var redefineAll = __webpack_require__(73); -var ctx = __webpack_require__(39); +var ctx = __webpack_require__(38); var anInstance = __webpack_require__(75); var forOf = __webpack_require__(76); var $iterDefine = __webpack_require__(176); var step = __webpack_require__(178); var setSpecies = __webpack_require__(179); var DESCRIPTORS = __webpack_require__(27); -var fastKey = __webpack_require__(41).fastKey; -var validate = __webpack_require__(53); +var fastKey = __webpack_require__(40).fastKey; +var validate = __webpack_require__(52); var SIZE = DESCRIPTORS ? '_s' : 'size'; var getEntry = function (that, key) { @@ -41063,7 +41142,7 @@ module.exports = !__webpack_require__(27) && !__webpack_require__(28)(function ( /* 169 */ /***/ (function(module, exports, __webpack_require__) { -var has = __webpack_require__(36); +var has = __webpack_require__(35); var toIObject = __webpack_require__(29); var arrayIndexOf = __webpack_require__(170)(false); var IE_PROTO = __webpack_require__(93)('IE_PROTO'); @@ -41170,7 +41249,7 @@ module.exports = __webpack_require__(48).getIteratorMethod = function (it) { /***/ (function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() -var cof = __webpack_require__(52); +var cof = __webpack_require__(51); var TAG = __webpack_require__(14)('toStringTag'); // ES3 wrong here var ARG = cof(function () { return arguments; }()) == 'Arguments'; @@ -41202,8 +41281,8 @@ module.exports = function (it) { var LIBRARY = __webpack_require__(57); var $export = __webpack_require__(6); -var redefine = __webpack_require__(37); -var hide = __webpack_require__(38); +var redefine = __webpack_require__(36); +var hide = __webpack_require__(37); var Iterators = __webpack_require__(60); var $iterCreate = __webpack_require__(482); var setToStringTag = __webpack_require__(61); @@ -41275,8 +41354,8 @@ module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) -var has = __webpack_require__(36); -var toObject = __webpack_require__(40); +var has = __webpack_require__(35); +var toObject = __webpack_require__(39); var IE_PROTO = __webpack_require__(93)('IE_PROTO'); var ObjectProto = Object.prototype; @@ -41334,7 +41413,7 @@ module.exports = { set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line function (test, buggy, set) { try { - set = __webpack_require__(39)(Function.call, __webpack_require__(78).f(Object.prototype, '__proto__').set, 2); + set = __webpack_require__(38)(Function.call, __webpack_require__(78).f(Object.prototype, '__proto__').set, 2); set(test, []); buggy = !(test instanceof Array); } catch (e) { buggy = true; } @@ -41354,7 +41433,7 @@ module.exports = { /***/ (function(module, exports, __webpack_require__) { // 7.2.2 IsArray(argument) -var cof = __webpack_require__(52); +var cof = __webpack_require__(51); module.exports = Array.isArray || function isArray(arg) { return cof(arg) == 'Array'; }; @@ -41370,7 +41449,7 @@ module.exports = Array.isArray || function isArray(arg) { var getKeys = __webpack_require__(46); var gOPS = __webpack_require__(80); var pIE = __webpack_require__(62); -var toObject = __webpack_require__(40); +var toObject = __webpack_require__(39); var IObject = __webpack_require__(92); var $assign = Object.assign; @@ -41408,14 +41487,14 @@ module.exports = !$assign || __webpack_require__(28)(function () { "use strict"; var redefineAll = __webpack_require__(73); -var getWeak = __webpack_require__(41).getWeak; +var getWeak = __webpack_require__(40).getWeak; var anObject = __webpack_require__(21); var isObject = __webpack_require__(13); var anInstance = __webpack_require__(75); var forOf = __webpack_require__(76); var createArrayMethod = __webpack_require__(79); -var $has = __webpack_require__(36); -var validate = __webpack_require__(53); +var $has = __webpack_require__(35); +var validate = __webpack_require__(52); var arrayFind = createArrayMethod(5); var arrayFindIndex = createArrayMethod(6); var id = 0; @@ -41575,7 +41654,7 @@ module.exports = function repeat(count) { // 7.2.8 IsRegExp(argument) var isObject = __webpack_require__(13); -var cof = __webpack_require__(52); +var cof = __webpack_require__(51); var MATCH = __webpack_require__(14)('match'); module.exports = function (it) { var isRegExp; @@ -41773,7 +41852,7 @@ var ViewportColumnsCalculator = function () { var compensatedViewportWidth = scrollOffset > 0 ? viewportWidth + 1 : viewportWidth; if (sum >= scrollOffset && sum + columnWidth <= scrollOffset + compensatedViewportWidth) { - if (this.startColumn == null) { + if (this.startColumn === null || this.startColumn === void 0) { this.startColumn = i; } this.endColumn = i; @@ -41797,7 +41876,7 @@ var ViewportColumnsCalculator = function () { var viewportSum = startPositions[this.endColumn] + columnWidth - startPositions[this.startColumn - 1]; if (viewportSum <= viewportWidth || !onlyFullyVisible) { - this.startColumn--; + this.startColumn -= 1; } if (viewportSum > viewportWidth) { break; @@ -41830,7 +41909,8 @@ var ViewportColumnsCalculator = function () { if (this.stretch === 'none') { return; } - this.totalTargetWidth = totalWidth; + var totalColumnsWidth = totalWidth; + this.totalTargetWidth = totalColumnsWidth; var priv = privatePool.get(this); var totalColumns = priv.totalColumns; @@ -41841,18 +41921,18 @@ var ViewportColumnsCalculator = function () { var permanentColumnWidth = priv.stretchingColumnWidthFn(void 0, i); if (typeof permanentColumnWidth === 'number') { - totalWidth -= permanentColumnWidth; + totalColumnsWidth -= permanentColumnWidth; } else { sumAll += columnWidth; } } - var remainingSize = totalWidth - sumAll; + var remainingSize = totalColumnsWidth - sumAll; if (this.stretch === 'all' && remainingSize > 0) { - this.stretchAllRatio = totalWidth / sumAll; + this.stretchAllRatio = totalColumnsWidth / sumAll; this.stretchAllColumnsWidth = []; this.needVerifyLastColumnWidth = true; - } else if (this.stretch === 'last' && totalWidth !== Infinity) { + } else if (this.stretch === 'last' && totalColumnsWidth !== Infinity) { var _columnWidth = this._getColumnWidth(totalColumns - 1); var lastColumnWidth = remainingSize + _columnWidth; @@ -41951,7 +42031,7 @@ var ViewportColumnsCalculator = function () { value: function _getColumnWidth(column) { var width = privatePool.get(this).columnWidthFn(column); - if (width === void 0) { + if (isNaN(width)) { width = ViewportColumnsCalculator.DEFAULT_WIDTH; } @@ -42081,7 +42161,7 @@ var ViewportRowsCalculator = function () { for (var i = 0; i < totalRows; i++) { rowHeight = rowHeightFn(i); - if (rowHeight === undefined) { + if (isNaN(rowHeight)) { rowHeight = ViewportRowsCalculator.DEFAULT_HEIGHT; } if (sum <= scrollOffset && !onlyFullyVisible) { @@ -42117,7 +42197,7 @@ var ViewportRowsCalculator = function () { var viewportSum = startPositions[this.endRow] + rowHeight - startPositions[this.startRow - 1]; if (viewportSum <= viewportHeight - horizontalScrollbarHeight || !onlyFullyVisible) { - this.startRow--; + this.startRow -= 1; } if (viewportSum >= viewportHeight - horizontalScrollbarHeight) { break; @@ -45614,17 +45694,15 @@ var Settings = function () { // reference to settings this.settings = {}; - for (var i in this.defaults) { - if ((0, _object.hasOwnProperty)(this.defaults, i)) { - if (settings[i] !== void 0) { - this.settings[i] = settings[i]; - } else if (this.defaults[i] === void 0) { - throw new Error('A required setting "' + i + '" was not provided'); - } else { - this.settings[i] = this.defaults[i]; - } + (0, _object.objectEach)(this.defaults, function (value, key) { + if (settings[key] !== void 0) { + _this.settings[key] = settings[key]; + } else if (value === void 0) { + throw new Error('A required setting "' + key + '" was not provided'); + } else { + _this.settings[key] = value; } - } + }); } /** @@ -45639,13 +45717,13 @@ var Settings = function () { _createClass(Settings, [{ key: 'update', value: function update(settings, value) { + var _this2 = this; + if (value === void 0) { // settings is object - for (var i in settings) { - if ((0, _object.hasOwnProperty)(settings, i)) { - this.settings[i] = settings[i]; - } - } + (0, _object.objectEach)(settings, function (settingValue, key) { + _this2.settings[key] = settingValue; + }); } else { // if value is defined then settings is the key this.settings[settings] = value; @@ -45950,10 +46028,11 @@ var Table = function () { var rowHeaders = this.wot.getSetting('rowHeaders').length; var columnHeaders = this.wot.getSetting('columnHeaders').length; var syncScroll = false; + var runFastDraw = fastDraw; if (!this.isWorkingOnClone()) { this.holderOffset = (0, _element.offset)(this.holder); - fastDraw = wtViewport.createRenderCalculators(fastDraw); + runFastDraw = wtViewport.createRenderCalculators(runFastDraw); if (rowHeaders && !this.wot.getSetting('fixedColumnsLeft')) { var leftScrollPos = wtOverlays.leftOverlay.getScrollPosition(); @@ -45962,7 +46041,7 @@ var Table = function () { this.correctHeaderWidth = leftScrollPos > 0; if (previousState !== this.correctHeaderWidth) { - fastDraw = false; + runFastDraw = false; } } } @@ -45971,7 +46050,7 @@ var Table = function () { syncScroll = wtOverlays.prepareOverlays(); } - if (fastDraw) { + if (runFastDraw) { if (!this.isWorkingOnClone()) { // in case we only scrolled without redraw, update visible rows information in oldRowsCalculator wtViewport.createVisibleCalculators(); @@ -46007,7 +46086,7 @@ var Table = function () { this.alignOverlaysWithTrimmingContainer(); this._doDraw(); // creates calculator after draw } - this.refreshSelections(fastDraw); + this.refreshSelections(runFastDraw); if (!this.isWorkingOnClone()) { wtOverlays.topOverlay.resetFixedPosition(); @@ -46203,20 +46282,22 @@ var Table = function () { }, { key: 'getCoords', value: function getCoords(TD) { - if (TD.nodeName !== 'TD' && TD.nodeName !== 'TH') { - TD = (0, _element.closest)(TD, ['TD', 'TH']); + var cellElement = TD; + + if (cellElement.nodeName !== 'TD' && cellElement.nodeName !== 'TH') { + cellElement = (0, _element.closest)(cellElement, ['TD', 'TH']); } - if (TD === null) { + if (cellElement === null) { return null; } - var TR = TD.parentNode; + var TR = cellElement.parentNode; var CONTAINER = TR.parentNode; var row = (0, _element.index)(TR); - var col = TD.cellIndex; + var col = cellElement.cellIndex; - if ((0, _element.overlayContainsElement)(_base2.default.CLONE_TOP_LEFT_CORNER, TD) || (0, _element.overlayContainsElement)(_base2.default.CLONE_TOP, TD)) { + if ((0, _element.overlayContainsElement)(_base2.default.CLONE_TOP_LEFT_CORNER, cellElement) || (0, _element.overlayContainsElement)(_base2.default.CLONE_TOP, cellElement)) { if (CONTAINER.nodeName === 'THEAD') { row -= CONTAINER.childNodes.length; } @@ -46226,7 +46307,7 @@ var Table = function () { row = this.rowFilter.renderedToSource(row); } - if ((0, _element.overlayContainsElement)(_base2.default.CLONE_TOP_LEFT_CORNER, TD) || (0, _element.overlayContainsElement)(_base2.default.CLONE_LEFT, TD)) { + if ((0, _element.overlayContainsElement)(_base2.default.CLONE_TOP_LEFT_CORNER, cellElement) || (0, _element.overlayContainsElement)(_base2.default.CLONE_LEFT, cellElement)) { col = this.columnFilter.offsettedTH(col); } else { col = this.columnFilter.visibleRowHeadedColumnToSourceColumn(col); @@ -46428,7 +46509,7 @@ var Table = function () { key: 'getStretchedColumnWidth', value: function getStretchedColumnWidth(sourceColumn) { var columnWidth = this.getColumnWidth(sourceColumn); - var width = columnWidth == null ? this.instance.wtSettings.settings.defaultColumnWidth : columnWidth; + var width = columnWidth === null || columnWidth === void 0 ? this.instance.wtSettings.settings.defaultColumnWidth : columnWidth; var calculator = this.wot.wtViewport.columnsRenderCalculator; if (calculator) { @@ -46472,14 +46553,16 @@ var Table = function () { }, { key: '_correctRowHeaderWidth', value: function _correctRowHeaderWidth(width) { + var rowHeaderWidth = width; + if (typeof width !== 'number') { - width = this.wot.getSetting('defaultColumnWidth'); + rowHeaderWidth = this.wot.getSetting('defaultColumnWidth'); } if (this.correctHeaderWidth) { - width++; + rowHeaderWidth += 1; } - return width; + return rowHeaderWidth; } }]); @@ -46644,11 +46727,11 @@ var TableRenderer = function () { rowHeaderWidthSetting = this.instance.getSetting('onModifyRowHeaderWidth', rowHeaderWidthSetting); - if (rowHeaderWidthSetting != null) { + if (rowHeaderWidthSetting !== null && rowHeaderWidthSetting !== void 0) { for (var i = 0; i < this.rowHeaderCount; i++) { var width = Array.isArray(rowHeaderWidthSetting) ? rowHeaderWidthSetting[i] : rowHeaderWidthSetting; - width = width == null ? defaultColumnWidth : width; + width = width === null || width === void 0 ? defaultColumnWidth : width; this.COLGROUP.childNodes[i].style.width = width + 'px'; } @@ -46677,7 +46760,7 @@ var TableRenderer = function () { value: function removeRedundantRows(renderedRowsCount) { while (this.wtTable.tbodyChildrenLength > renderedRowsCount) { this.TBODY.removeChild(this.TBODY.lastChild); - this.wtTable.tbodyChildrenLength--; + this.wtTable.tbodyChildrenLength -= 1; } } @@ -46727,13 +46810,13 @@ var TableRenderer = function () { if (height) { // Decrease height. 1 pixel will be "replaced" by 1px border top - height--; + height -= 1; TR.firstChild.style.height = height + 'px'; } else { TR.firstChild.style.height = ''; } } - visibleRowIndex++; + visibleRowIndex += 1; sourceRowIndex = this.rowFilter.renderedToSource(visibleRowIndex); } } @@ -46780,7 +46863,7 @@ var TableRenderer = function () { } while (rowCount) { - rowCount--; + rowCount -= 1; sourceRowIndex = this.instance.wtTable.rowFilter.renderedToSource(rowCount); previousRowHeight = this.instance.wtTable.getRowHeight(sourceRowIndex); currentTr = this.instance.wtTable.getTrForRow(sourceRowIndex); @@ -46793,7 +46876,8 @@ var TableRenderer = function () { } if (!previousRowHeight && this.instance.wtSettings.settings.defaultRowHeight < rowInnerHeight || previousRowHeight < rowInnerHeight) { - this.instance.wtViewport.oversizedRows[sourceRowIndex] = ++rowInnerHeight; + rowInnerHeight += 1; + this.instance.wtViewport.oversizedRows[sourceRowIndex] = rowInnerHeight; } } } @@ -46859,7 +46943,7 @@ var TableRenderer = function () { var columnHeaderHeightSetting = this.wot.getSetting('columnHeaderHeight') || []; while (level) { - level--; + level -= 1; previousColHeaderHeight = this.wot.wtTable.getColumnHeaderHeight(level); currentHeader = this.wot.wtTable.getColumnHeader(sourceColIndex, level); @@ -46875,7 +46959,7 @@ var TableRenderer = function () { } if (Array.isArray(columnHeaderHeightSetting)) { - if (columnHeaderHeightSetting[level] != null) { + if (columnHeaderHeightSetting[level] !== null && columnHeaderHeightSetting[level] !== void 0) { this.wot.wtViewport.oversizedColumnHeaders[level] = columnHeaderHeightSetting[level]; } } else if (!isNaN(columnHeaderHeightSetting)) { @@ -46943,11 +47027,11 @@ var TableRenderer = function () { rowHeaderWidthSetting = this.instance.getSetting('onModifyRowHeaderWidth', rowHeaderWidthSetting); - if (rowHeaderWidthSetting != null) { + if (rowHeaderWidthSetting !== null && rowHeaderWidthSetting !== void 0) { for (var i = 0; i < this.rowHeaderCount; i++) { var width = Array.isArray(rowHeaderWidthSetting) ? rowHeaderWidthSetting[i] : rowHeaderWidthSetting; - width = width == null ? defaultColumnWidth : width; + width = width === null || width === void 0 ? defaultColumnWidth : width; this.COLGROUP.childNodes[i].style.width = width + 'px'; } @@ -46968,7 +47052,7 @@ var TableRenderer = function () { key: 'appendToTbody', value: function appendToTbody(TR) { this.TBODY.appendChild(TR); - this.wtTable.tbodyChildrenLength++; + this.wtTable.tbodyChildrenLength += 1; } /** @@ -47095,11 +47179,11 @@ var TableRenderer = function () { while (this.wtTable.colgroupChildrenLength < columnCount + this.rowHeaderCount) { this.COLGROUP.appendChild(document.createElement('COL')); - this.wtTable.colgroupChildrenLength++; + this.wtTable.colgroupChildrenLength += 1; } while (this.wtTable.colgroupChildrenLength > columnCount + this.rowHeaderCount) { this.COLGROUP.removeChild(this.COLGROUP.lastChild); - this.wtTable.colgroupChildrenLength--; + this.wtTable.colgroupChildrenLength -= 1; } if (this.rowHeaderCount) { (0, _element.addClass)(this.COLGROUP.childNodes[0], 'rowHeader'); @@ -47128,11 +47212,11 @@ var TableRenderer = function () { while (this.theadChildrenLength < columnCount + this.rowHeaderCount) { TR.appendChild(document.createElement('TH')); - this.theadChildrenLength++; + this.theadChildrenLength += 1; } while (this.theadChildrenLength > columnCount + this.rowHeaderCount) { TR.removeChild(TR.lastChild); - this.theadChildrenLength--; + this.theadChildrenLength -= 1; } } var theadChildrenLength = this.THEAD.childNodes.length; @@ -47190,11 +47274,11 @@ var TableRenderer = function () { var TD = document.createElement('TD'); TR.appendChild(TD); - count++; + count += 1; } while (count > desiredCount) { TR.removeChild(TR.lastChild); - count--; + count -= 1; } } @@ -47207,7 +47291,7 @@ var TableRenderer = function () { value: function removeRedundantColumns(columnsToRender) { while (this.wtTable.tbodyChildrenLength > columnsToRender) { this.TBODY.removeChild(this.TBODY.lastChild); - this.wtTable.tbodyChildrenLength--; + this.wtTable.tbodyChildrenLength -= 1; } } }]); @@ -47400,11 +47484,13 @@ var Viewport = function () { }, { key: 'sumColumnWidths', value: function sumColumnWidths(from, length) { + var wtTable = this.wot.wtTable; var sum = 0; + var column = from; - while (from < length) { - sum += this.wot.wtTable.getColumnWidth(from); - from++; + while (column < length) { + sum += wtTable.getColumnWidth(column); + column += 1; } return sum; @@ -47420,15 +47506,15 @@ var Viewport = function () { if (this.containerWidth) { return this.containerWidth; } + var mainContainer = this.instance.wtTable.holder; - var fillWidth = void 0; - var dummyElement = void 0; + var dummyElement = document.createElement('div'); - dummyElement = document.createElement('div'); dummyElement.style.width = '100%'; dummyElement.style.height = '1px'; mainContainer.appendChild(dummyElement); - fillWidth = dummyElement.offsetWidth; + + var fillWidth = dummyElement.offsetWidth; this.containerWidth = fillWidth; mainContainer.removeChild(dummyElement); @@ -47488,12 +47574,12 @@ var Viewport = function () { key: 'getViewportHeight', value: function getViewportHeight() { var containerHeight = this.getWorkspaceHeight(); - var columnHeaderHeight = void 0; if (containerHeight === Infinity) { return containerHeight; } - columnHeaderHeight = this.getColumnHeaderHeight(); + + var columnHeaderHeight = this.getColumnHeaderHeight(); if (columnHeaderHeight > 0) { containerHeight -= columnHeaderHeight; @@ -47558,12 +47644,12 @@ var Viewport = function () { key: 'getViewportWidth', value: function getViewportWidth() { var containerWidth = this.getWorkspaceWidth(); - var rowHeaderWidth = void 0; if (containerWidth === Infinity) { return containerWidth; } - rowHeaderWidth = this.getRowHeaderWidth(); + + var rowHeaderWidth = this.getRowHeaderWidth(); if (rowHeaderWidth > 0) { return containerWidth - rowHeaderWidth; @@ -47588,12 +47674,8 @@ var Viewport = function () { var visible = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; var height = void 0; - var pos = void 0; - var fixedRowsTop = void 0; var scrollbarHeight = void 0; - var fixedRowsBottom = void 0; var fixedRowsHeight = void 0; - var totalRows = void 0; this.rowHeaderWidth = NaN; @@ -47602,14 +47684,16 @@ var Viewport = function () { } else { height = this.getViewportHeight(); } - pos = this.wot.wtOverlays.topOverlay.getScrollPosition() - this.wot.wtOverlays.topOverlay.getTableParentOffset(); + + var pos = this.wot.wtOverlays.topOverlay.getScrollPosition() - this.wot.wtOverlays.topOverlay.getTableParentOffset(); if (pos < 0) { pos = 0; } - fixedRowsTop = this.wot.getSetting('fixedRowsTop'); - fixedRowsBottom = this.wot.getSetting('fixedRowsBottom'); - totalRows = this.wot.getSetting('totalRows'); + + var fixedRowsTop = this.wot.getSetting('fixedRowsTop'); + var fixedRowsBottom = this.wot.getSetting('fixedRowsBottom'); + var totalRows = this.wot.getSetting('totalRows'); if (fixedRowsTop) { fixedRowsHeight = this.wot.wtOverlays.topOverlay.sumCellSizes(0, fixedRowsTop); @@ -47650,17 +47734,15 @@ var Viewport = function () { var visible = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; var width = this.getViewportWidth(); - var pos = void 0; - var fixedColumnsLeft = void 0; + var pos = this.wot.wtOverlays.leftOverlay.getScrollPosition() - this.wot.wtOverlays.leftOverlay.getTableParentOffset(); this.columnHeaderHeight = NaN; - pos = this.wot.wtOverlays.leftOverlay.getScrollPosition() - this.wot.wtOverlays.leftOverlay.getTableParentOffset(); - if (pos < 0) { pos = 0; } - fixedColumnsLeft = this.wot.getSetting('fixedColumnsLeft'); + + var fixedColumnsLeft = this.wot.getSetting('fixedColumnsLeft'); if (fixedColumnsLeft) { var fixedColumnsWidth = this.wot.wtOverlays.leftOverlay.sumCellSizes(0, fixedColumnsLeft); @@ -47692,16 +47774,18 @@ var Viewport = function () { value: function createRenderCalculators() { var fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - if (fastDraw) { + var runFastDraw = fastDraw; + + if (runFastDraw) { var proposedRowsVisibleCalculator = this.createRowsCalculator(true); var proposedColumnsVisibleCalculator = this.createColumnsCalculator(true); if (!(this.areAllProposedVisibleRowsAlreadyRendered(proposedRowsVisibleCalculator) && this.areAllProposedVisibleColumnsAlreadyRendered(proposedColumnsVisibleCalculator))) { - fastDraw = false; + runFastDraw = false; } } - if (!fastDraw) { + if (!runFastDraw) { this.rowsRenderCalculator = this.createRowsCalculator(); this.columnsRenderCalculator = this.createColumnsCalculator(); } @@ -47709,7 +47793,7 @@ var Viewport = function () { this.rowsVisibleCalculator = null; this.columnsVisibleCalculator = null; - return fastDraw; + return runFastDraw; } /** @@ -48040,6 +48124,8 @@ var Border = function () { }, { key: 'createMultipleSelectorHandles', value: function createMultipleSelectorHandles() { + var _this3 = this; + this.selectionHandles = { topLeft: document.createElement('DIV'), topLeftHitArea: document.createElement('DIV'), @@ -48068,12 +48154,10 @@ var Border = function () { 'border-radius': parseInt(hitAreaWidth / 1.5, 10) + 'px' }; - for (var prop in hitAreaStyle) { - if ((0, _object.hasOwnProperty)(hitAreaStyle, prop)) { - this.selectionHandles.styles.bottomRightHitArea[prop] = hitAreaStyle[prop]; - this.selectionHandles.styles.topLeftHitArea[prop] = hitAreaStyle[prop]; - } - } + (0, _object.objectEach)(hitAreaStyle, function (value, key) { + _this3.selectionHandles.styles.bottomRightHitArea[key] = value; + _this3.selectionHandles.styles.topLeftHitArea[key] = value; + }); var handleStyle = { position: 'absolute', @@ -48084,12 +48168,11 @@ var Border = function () { border: '1px solid #4285c8' }; - for (var _prop in handleStyle) { - if ((0, _object.hasOwnProperty)(handleStyle, _prop)) { - this.selectionHandles.styles.bottomRight[_prop] = handleStyle[_prop]; - this.selectionHandles.styles.topLeft[_prop] = handleStyle[_prop]; - } - } + (0, _object.objectEach)(handleStyle, function (value, key) { + _this3.selectionHandles.styles.bottomRight[key] = value; + _this3.selectionHandles.styles.topLeft[key] = value; + }); + this.main.appendChild(this.selectionHandles.topLeft); this.main.appendChild(this.selectionHandles.bottomRight); this.main.appendChild(this.selectionHandles.topLeftHitArea); @@ -48402,7 +48485,7 @@ var Border = function () { }, { key: 'getDimensionsFromHeader', value: function getDimensionsFromHeader(direction, fromIndex, toIndex, containerOffset) { - var _this3 = this; + var _this4 = this; var rootHotElement = this.wot.wtTable.wtRootElement.parentNode; var getHeaderFn = null; @@ -48419,7 +48502,7 @@ var Border = function () { getHeaderFn = function getHeaderFn() { var _wot$wtTable; - return (_wot$wtTable = _this3.wot.wtTable).getRowHeader.apply(_wot$wtTable, arguments); + return (_wot$wtTable = _this4.wot.wtTable).getRowHeader.apply(_wot$wtTable, arguments); }; dimensionFn = function dimensionFn() { return _element.outerHeight.apply(undefined, arguments); @@ -48433,7 +48516,7 @@ var Border = function () { getHeaderFn = function getHeaderFn() { var _wot$wtTable2; - return (_wot$wtTable2 = _this3.wot.wtTable).getColumnHeader.apply(_wot$wtTable2, arguments); + return (_wot$wtTable2 = _this4.wot.wtTable).getColumnHeader.apply(_wot$wtTable2, arguments); }; dimensionFn = function dimensionFn() { return _element.outerWidth.apply(undefined, arguments); @@ -48663,8 +48746,6 @@ function onBeforeKeyDown(event) { } AutocompleteEditor.prototype.prepare = function () { - this.instance.addHook('beforeKeyDown', onBeforeKeyDown); - for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { args[_key3] = arguments[_key3]; } @@ -48673,6 +48754,7 @@ AutocompleteEditor.prototype.prepare = function () { }; AutocompleteEditor.prototype.open = function () { + this.instance.addHook('beforeKeyDown', onBeforeKeyDown); // Ugly fix for handsontable which grab window object for autocomplete scroll listener instead table element. this.TEXTAREA_PARENT.style.overflow = 'auto'; @@ -48698,32 +48780,32 @@ AutocompleteEditor.prototype.open = function () { filteringCaseSensitive = _this$cellProperties.filteringCaseSensitive, allowHtml = _this$cellProperties.allowHtml; + var cellValue = (0, _mixed.stringify)(value); var indexOfMatch = void 0; var match = void 0; - value = (0, _mixed.stringify)(value); - - if (value && !allowHtml) { - indexOfMatch = filteringCaseSensitive === true ? value.indexOf(this.query) : value.toLowerCase().indexOf(_this.query.toLowerCase()); + if (cellValue && !allowHtml) { + indexOfMatch = filteringCaseSensitive === true ? cellValue.indexOf(this.query) : cellValue.toLowerCase().indexOf(_this.query.toLowerCase()); if (indexOfMatch !== -1) { - match = value.substr(indexOfMatch, _this.query.length); - value = value.replace(match, '' + match + ''); + match = cellValue.substr(indexOfMatch, _this.query.length); + cellValue = cellValue.replace(match, '' + match + ''); } } - TD.innerHTML = value; + TD.innerHTML = cellValue; }, autoColumnSize: true, modifyColWidth: function modifyColWidth(width, col) { // workaround for text overlapping the dropdown, not really accurate var autoWidths = this.getPlugin('autoColumnSize').widths; + var columnWidth = width; if (autoWidths[col]) { - width = autoWidths[col]; + columnWidth = autoWidths[col]; } - return trimDropdown ? width : width + 15; + return trimDropdown ? columnWidth : columnWidth + 15; } }); @@ -48758,13 +48840,14 @@ AutocompleteEditor.prototype.queryChoices = function (query) { } }; -AutocompleteEditor.prototype.updateChoicesList = function (choices) { +AutocompleteEditor.prototype.updateChoicesList = function (choicesList) { var pos = (0, _element.getCaretPosition)(this.TEXTAREA); var endPos = (0, _element.getSelectionEndPosition)(this.TEXTAREA); var sortByRelevanceSetting = this.cellProperties.sortByRelevance; var filterSetting = this.cellProperties.filter; var orderByRelevance = null; var highlightIndex = null; + var choices = choicesList; if (sortByRelevanceSetting) { orderByRelevance = AutocompleteEditor.sortByRelevance(this.stripValueIfNeeded(this.getValue()), choices, this.cellProperties.filteringCaseSensitive); @@ -48850,7 +48933,7 @@ AutocompleteEditor.prototype.limitDropdownIfNeeded = function (spaceAvailable, d do { lastRowHeight = this.htEditor.getRowHeight(i) || this.htEditor.view.wt.wtSettings.settings.defaultRowHeight; tempHeight += lastRowHeight; - i++; + i += 1; } while (tempHeight < spaceAvailable); height = tempHeight - lastRowHeight; @@ -48902,10 +48985,6 @@ AutocompleteEditor.prototype.setDropdownHeight = function (height) { }; AutocompleteEditor.prototype.finishEditing = function (restoreOriginalValue) { - if (!restoreOriginalValue) { - this.instance.removeHook('beforeKeyDown', onBeforeKeyDown); - } - for (var _len5 = arguments.length, args = Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) { args[_key5 - 1] = arguments[_key5]; } @@ -49024,7 +49103,6 @@ AutocompleteEditor.prototype.stripValuesIfNeeded = function (values) { AutocompleteEditor.prototype.allowKeyEventPropagation = function (keyCode) { var selectedRange = this.htEditor.getSelectedRangeLast(); - var selected = { row: selectedRange ? selectedRange.from.row : -1 }; var allowed = false; @@ -49038,11 +49116,21 @@ AutocompleteEditor.prototype.allowKeyEventPropagation = function (keyCode) { return allowed; }; -AutocompleteEditor.prototype.discardEditor = function () { +AutocompleteEditor.prototype.close = function () { + this.instance.removeHook('beforeKeyDown', onBeforeKeyDown); + for (var _len6 = arguments.length, args = Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { args[_key6] = arguments[_key6]; } + _handsontableEditor2.default.prototype.close.apply(this, args); +}; + +AutocompleteEditor.prototype.discardEditor = function () { + for (var _len7 = arguments.length, args = Array(_len7), _key7 = 0; _key7 < _len7; _key7++) { + args[_key7] = arguments[_key7]; + } + _handsontableEditor2.default.prototype.discardEditor.apply(this, args); this.instance.view.render(); @@ -53288,13 +53376,17 @@ function createCellHeadersRange(firstRowIndex, nextRowIndex) { var toValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : nextRowIndex; // Will swap `fromValue` with `toValue` if it's necessary. + var from = fromValue, + to = toValue; + + if (firstRowIndex > nextRowIndex) { - var _ref = [toValue, fromValue]; - fromValue = _ref[0]; - toValue = _ref[1]; + var _ref = [to, from]; + from = _ref[0]; + to = _ref[1]; } - return fromValue + '-' + toValue; + return from + '-' + to; } /** @@ -53607,18 +53699,15 @@ var Highlight = function () { _createClass(Highlight, [{ key: 'isEnabledFor', value: function isEnabledFor(highlightType) { - var disableHighlight = this.options.disableHighlight; - // Legacy compatibility. - if (highlightType === 'current') { - highlightType = CELL_TYPE; - } + var type = highlightType === 'current' ? CELL_TYPE : highlightType; + var disableHighlight = this.options.disableHighlight; if (typeof disableHighlight === 'string') { disableHighlight = [disableHighlight]; } - return disableHighlight === false || Array.isArray(disableHighlight) && !disableHighlight.includes(highlightType); + return disableHighlight === false || Array.isArray(disableHighlight) && !disableHighlight.includes(type); } /** @@ -53917,15 +54006,15 @@ var SamplesGenerator = function () { } return SamplesGenerator.SAMPLE_COUNT; } - }, { - key: 'setSampleCount', - /** * Set the sample count. * * @param {Number} sampleCount Number of samples to be collected. */ + + }, { + key: 'setSampleCount', value: function setSampleCount(sampleCount) { this.customSampleCount = sampleCount; } @@ -53986,10 +54075,11 @@ var SamplesGenerator = function () { var samples = new Map(); - if (typeof specifierRange === 'number') { - specifierRange = { from: specifierRange, to: specifierRange }; - } - (0, _number.rangeEach)(specifierRange.from, specifierRange.to, function (index) { + var _ref = typeof specifierRange === 'number' ? { from: specifierRange, to: specifierRange } : specifierRange, + from = _ref.from, + to = _ref.to; + + (0, _number.rangeEach)(from, to, function (index) { var sample = _this.generateSample(type, range, index); samples.set(index, sample); @@ -54021,9 +54111,9 @@ var SamplesGenerator = function () { var sampledValues = []; (0, _number.rangeEach)(range.from, range.to, function (index) { - var _ref = type === 'row' ? _this2.dataFactory(specifierValue, index) : _this2.dataFactory(index, specifierValue), - value = _ref.value, - bundleCountSeed = _ref.bundleCountSeed; + var _ref2 = type === 'row' ? _this2.dataFactory(specifierValue, index) : _this2.dataFactory(index, specifierValue), + value = _ref2.value, + bundleCountSeed = _ref2.bundleCountSeed; var hasCustomBundleSeed = bundleCountSeed > 0; var length = void 0; @@ -54054,7 +54144,7 @@ var SamplesGenerator = function () { if (!duplicate || _this2.allowDuplicates || hasCustomBundleSeed) { sample.strings.push(_defineProperty({ value: value }, computedKey, index)); sampledValues.push(value); - sample.needed--; + sample.needed -= 1; } } }); @@ -54144,13 +54234,13 @@ var CommandExecutor = function () { } var commandSplit = commandName.split(':'); - commandName = commandSplit[0]; + var commandNamePrimary = commandSplit[0]; var subCommandName = commandSplit.length === 2 ? commandSplit[1] : null; - var command = this.commands[commandName]; + var command = this.commands[commandNamePrimary]; if (!command) { - throw new Error('Menu command \'' + commandName + '\' not exists.'); + throw new Error('Menu command \'' + commandNamePrimary + '\' not exists.'); } if (subCommandName && command.submenu) { command = findSubCommand(subCommandName, command.submenu.items); @@ -54215,7 +54305,7 @@ var _object = __webpack_require__(1); var _array = __webpack_require__(0); -var _predefinedItems = __webpack_require__(44); +var _predefinedItems = __webpack_require__(43); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -54294,11 +54384,12 @@ var ItemsFactory = function () { }(); function _getItems() { - var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + var itemsPattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; var defaultPattern = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; var items = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var result = []; + var pattern = itemsPattern; if (pattern && pattern.items) { pattern = pattern.items; @@ -54880,9 +54971,8 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; var CONDITION_NAME = exports.CONDITION_NAME = 'eq'; -function condition(dataRow) { - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : inputValues, - _ref2 = _slicedToArray(_ref, 1), +function condition(dataRow, _ref) { + var _ref2 = _slicedToArray(_ref, 1), value = _ref2[0]; return (0, _mixed.stringify)(dataRow.value).toLowerCase() === (0, _mixed.stringify)(value); @@ -54922,26 +55012,28 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; var CONDITION_NAME = exports.CONDITION_NAME = 'between'; -function condition(dataRow) { - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : inputValues, - _ref2 = _slicedToArray(_ref, 2), +function condition(dataRow, _ref) { + var _ref2 = _slicedToArray(_ref, 2), from = _ref2[0], to = _ref2[1]; + var fromValue = from; + var toValue = to; + if (dataRow.meta.type === 'numeric') { - var _from = parseFloat(from, 10); - var _to = parseFloat(to, 10); + var _from = parseFloat(fromValue, 10); + var _to = parseFloat(toValue, 10); - from = Math.min(_from, _to); - to = Math.max(_from, _to); + fromValue = Math.min(_from, _to); + toValue = Math.max(_from, _to); } else if (dataRow.meta.type === 'date') { - var dateBefore = (0, _conditionRegisterer.getCondition)(_before.CONDITION_NAME, [to]); - var dateAfter = (0, _conditionRegisterer.getCondition)(_after.CONDITION_NAME, [from]); + var dateBefore = (0, _conditionRegisterer.getCondition)(_before.CONDITION_NAME, [toValue]); + var dateAfter = (0, _conditionRegisterer.getCondition)(_after.CONDITION_NAME, [fromValue]); return dateBefore(dataRow) && dateAfter(dataRow); } - return dataRow.value >= from && dataRow.value <= to; + return dataRow.value >= fromValue && dataRow.value <= toValue; } (0, _conditionRegisterer.registerCondition)(CONDITION_NAME, condition, { @@ -54980,9 +55072,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de var CONDITION_NAME = exports.CONDITION_NAME = 'date_after'; -function condition(dataRow) { - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : inputValues, - _ref2 = _slicedToArray(_ref, 1), +function condition(dataRow, _ref) { + var _ref2 = _slicedToArray(_ref, 1), value = _ref2[0]; var date = (0, _moment2.default)(dataRow.value, dataRow.meta.dateFormat); @@ -55031,9 +55122,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de var CONDITION_NAME = exports.CONDITION_NAME = 'date_before'; -function condition(dataRow) { - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : inputValues, - _ref2 = _slicedToArray(_ref, 1), +function condition(dataRow, _ref) { + var _ref2 = _slicedToArray(_ref, 1), value = _ref2[0]; var date = (0, _moment2.default)(dataRow.value, dataRow.meta.dateFormat); @@ -55078,9 +55168,8 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; var CONDITION_NAME = exports.CONDITION_NAME = 'contains'; -function condition(dataRow) { - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : inputValues, - _ref2 = _slicedToArray(_ref, 1), +function condition(dataRow, _ref) { + var _ref2 = _slicedToArray(_ref, 1), value = _ref2[0]; return (0, _mixed.stringify)(dataRow.value).toLowerCase().indexOf((0, _mixed.stringify)(value)) >= 0; @@ -55380,11 +55469,9 @@ var ConditionCollection = function () { var result = []; (0, _array.arrayEach)(this.orderStack, function (column) { - var conditions = (0, _array.arrayMap)(_this2.getConditions(column), function () { - var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : condition, - name = _ref.name, + var conditions = (0, _array.arrayMap)(_this2.getConditions(column), function (_ref) { + var name = _ref.name, args = _ref.args; - return { name: name, args: args }; }); var operation = _this2.columnTypes[column]; @@ -55566,7 +55653,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons */ var DataFilter = function () { function DataFilter(conditionCollection) { - var columnDataFactory = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (column) { + var columnDataFactory = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () { return []; }; @@ -55712,9 +55799,10 @@ var BaseCell = function () { get: function get() { return this.rowOffset + this._row; }, - set: function set(row) { - this._row = row; + set: function set(rowIndex) { + this._row = rowIndex; }, + enumerable: true, configurable: true }); @@ -55722,9 +55810,10 @@ var BaseCell = function () { get: function get() { return this.columnOffset + this._column; }, - set: function set(column) { - this._column = column; + set: function set(columnIndex) { + this._column = columnIndex; }, + enumerable: true, configurable: true }); @@ -55886,15 +55975,14 @@ var HeadersUI = function (_BaseUI) { _createClass(HeadersUI, [{ key: 'appendLevelIndicators', value: function appendLevelIndicators(row, TH) { - row = this.trimRowsPlugin.rowsMapper.getValueByIndex(row); - - var rowLevel = this.dataManager.getRowLevel(row); - var rowObject = this.dataManager.getDataObject(row); + var rowIndex = this.trimRowsPlugin.rowsMapper.getValueByIndex(row); + var rowLevel = this.dataManager.getRowLevel(rowIndex); + var rowObject = this.dataManager.getDataObject(rowIndex); var innerDiv = TH.getElementsByTagName('DIV')[0]; var innerSpan = innerDiv.querySelector('span.rowHeader'); var previousIndicators = innerDiv.querySelectorAll('[class^="ht_nesting"]'); - (0, _array.arrayEach)(previousIndicators, function (elem, i) { + (0, _array.arrayEach)(previousIndicators, function (elem) { if (elem) { innerDiv.removeChild(elem); } @@ -55906,7 +55994,7 @@ var HeadersUI = function (_BaseUI) { var initialContent = innerSpan.cloneNode(true); innerDiv.innerHTML = ''; - (0, _number.rangeEach)(0, rowLevel - 1, function (i) { + (0, _number.rangeEach)(0, rowLevel - 1, function () { var levelIndicator = document.createElement('SPAN'); (0, _element.addClass)(levelIndicator, HeadersUI.CSS_CLASSES.emptyIndicator); innerDiv.appendChild(levelIndicator); @@ -55919,7 +56007,7 @@ var HeadersUI = function (_BaseUI) { var buttonsContainer = document.createElement('DIV'); (0, _element.addClass)(TH, HeadersUI.CSS_CLASSES.parent); - if (this.collapsingUI.areChildrenCollapsed(row)) { + if (this.collapsingUI.areChildrenCollapsed(rowIndex)) { (0, _element.addClass)(buttonsContainer, HeadersUI.CSS_CLASSES.button + ' ' + HeadersUI.CSS_CLASSES.expandButton); } else { (0, _element.addClass)(buttonsContainer, HeadersUI.CSS_CLASSES.button + ' ' + HeadersUI.CSS_CLASSES.collapseButton); @@ -55939,11 +56027,13 @@ var HeadersUI = function (_BaseUI) { }, { key: 'updateRowHeaderWidth', value: function updateRowHeaderWidth(deepestLevel) { - if (!deepestLevel) { - deepestLevel = this.dataManager.cache.levelCount; + var deepestLevelIndex = deepestLevel; + + if (!deepestLevelIndex) { + deepestLevelIndex = this.dataManager.cache.levelCount; } - this.rowHeaderWidthCache = Math.max(50, 11 + 10 * deepestLevel + 25); + this.rowHeaderWidthCache = Math.max(50, 11 + 10 * deepestLevelIndex + 25); this.hot.render(); } @@ -56091,8 +56181,11 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -_handsontable2.default.baseVersion = '5.0.1'; +/* eslint-enable no-unused-vars */ + +_handsontable2.default.baseVersion = '5.0.2'; +/* eslint-disable no-unused-vars */ exports.default = _handsontable2.default; /***/ }), @@ -56126,7 +56219,7 @@ var setToStringTag = __webpack_require__(61); var IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() -__webpack_require__(38)(IteratorPrototype, __webpack_require__(14)('iterator'), function () { return this; }); +__webpack_require__(37)(IteratorPrototype, __webpack_require__(14)('iterator'), function () { return this; }); module.exports = function (Constructor, NAME, next) { Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); @@ -56229,7 +56322,7 @@ var macrotask = __webpack_require__(101).set; var Observer = global.MutationObserver || global.WebKitMutationObserver; var process = global.process; var Promise = global.Promise; -var isNode = __webpack_require__(52)(process) == 'process'; +var isNode = __webpack_require__(51)(process) == 'process'; module.exports = function () { var head, last, notify; @@ -56423,7 +56516,7 @@ module.exports = function () { "use strict"; // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) -var toObject = __webpack_require__(40); +var toObject = __webpack_require__(39); var toAbsoluteIndex = __webpack_require__(72); var toLength = __webpack_require__(30); @@ -56456,7 +56549,7 @@ module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* "use strict"; // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) -var toObject = __webpack_require__(40); +var toObject = __webpack_require__(39); var toAbsoluteIndex = __webpack_require__(72); var toLength = __webpack_require__(30); module.exports = function fill(value /* , start = 0, end = @length */) { @@ -56614,7 +56707,7 @@ var _editors = __webpack_require__(19); var _renderers = __webpack_require__(15); -var _validators = __webpack_require__(43); +var _validators = __webpack_require__(42); var _cellTypes = __webpack_require__(155); @@ -56654,7 +56747,7 @@ var _date = __webpack_require__(452); var dateHelpers = _interopRequireWildcard(_date); -var _feature = __webpack_require__(42); +var _feature = __webpack_require__(41); var featureHelpers = _interopRequireWildcard(_feature); @@ -56733,11 +56826,11 @@ Handsontable.DefaultSettings = _defaultSettings2.default; Handsontable.EventManager = _eventManager2.default; Handsontable._getListenersCounter = _eventManager.getListenersCounter; // For MemoryLeak tests -Handsontable.buildDate = '16/08/2018 12:38:43'; +Handsontable.buildDate = '12/09/2018 12:36:00'; Handsontable.packageName = 'handsontable-pro'; -Handsontable.version = '5.0.1'; +Handsontable.version = '5.0.2'; -var baseVersion = '5.0.1'; +var baseVersion = '5.0.2'; if (baseVersion) { Handsontable.baseVersion = baseVersion; @@ -57323,12 +57416,13 @@ var LeftOverlay = function (_Overlay) { }, { key: 'sumCellSizes', value: function sumCellSizes(from, to) { - var sum = 0; var defaultColumnWidth = this.wot.wtSettings.defaultColumnWidth; + var column = from; + var sum = 0; - while (from < to) { - sum += this.wot.wtTable.getStretchedColumnWidth(from) || defaultColumnWidth; - from++; + while (column < to) { + sum += this.wot.wtTable.getStretchedColumnWidth(column) || defaultColumnWidth; + column += 1; } return sum; @@ -57369,7 +57463,6 @@ var LeftOverlay = function (_Overlay) { var overlayRoot = this.clone.wtTable.holder.parentNode; var overlayRootStyle = overlayRoot.style; var preventOverflow = this.wot.getSetting('preventOverflow'); - var tableWidth = void 0; if (this.trimmingContainer !== window || preventOverflow === 'vertical') { var height = this.wot.wtViewport.getWorkspaceHeight() - scrollbarHeight; @@ -57383,7 +57476,7 @@ var LeftOverlay = function (_Overlay) { this.clone.wtTable.holder.style.height = overlayRootStyle.height; - tableWidth = (0, _element.outerWidth)(this.clone.wtTable.TABLE); + var tableWidth = (0, _element.outerWidth)(this.clone.wtTable.TABLE); overlayRootStyle.width = (tableWidth === 0 ? tableWidth : tableWidth + 4) + 'px'; } @@ -57696,14 +57789,15 @@ var TopOverlay = function (_Overlay) { }, { key: 'sumCellSizes', value: function sumCellSizes(from, to) { - var sum = 0; var defaultRowHeight = this.wot.wtSettings.settings.defaultRowHeight; + var row = from; + var sum = 0; - while (from < to) { - var height = this.wot.wtTable.getRowHeight(from); + while (row < to) { + var height = this.wot.wtTable.getRowHeight(row); sum += height === void 0 ? defaultRowHeight : height; - from++; + row += 1; } return sum; @@ -57744,7 +57838,6 @@ var TopOverlay = function (_Overlay) { var overlayRoot = this.clone.wtTable.holder.parentNode; var overlayRootStyle = overlayRoot.style; var preventOverflow = this.wot.getSetting('preventOverflow'); - var tableHeight = void 0; if (this.trimmingContainer !== window || preventOverflow === 'horizontal') { var width = this.wot.wtViewport.getWorkspaceWidth() - scrollbarWidth; @@ -57758,7 +57851,7 @@ var TopOverlay = function (_Overlay) { this.clone.wtTable.holder.style.width = overlayRootStyle.width; - tableHeight = (0, _element.outerHeight)(this.clone.wtTable.TABLE); + var tableHeight = (0, _element.outerHeight)(this.clone.wtTable.TABLE); overlayRootStyle.height = (tableHeight === 0 ? tableHeight : tableHeight + 4) + 'px'; } @@ -58266,15 +58359,17 @@ var Selection = function () { var TD = wotInstance.wtTable.getCell(new _coords2.default(sourceRow, sourceColumn)); if ((typeof TD === 'undefined' ? 'undefined' : _typeof(TD)) === 'object') { + var cellClassName = className; + if (markIntersections) { - className = this.classNameGenerator(TD); + cellClassName = this.classNameGenerator(TD); - if (!this.classNames.includes(className)) { - this.classNames.push(className); + if (!this.classNames.includes(cellClassName)) { + this.classNames.push(cellClassName); } } - (0, _element.addClass)(TD, className); + (0, _element.addClass)(TD, cellClassName); } return this; @@ -59000,7 +59095,9 @@ var DateEditor = function (_TextEditor) { options.bound = false; options.format = options.format || this.defaultDateFormat; options.reposition = options.reposition || false; - options.onSelect = function (dateStr) { + options.onSelect = function (value) { + var dateStr = value; + if (!isNaN(dateStr.getTime())) { dateStr = (0, _moment2.default)(dateStr).format(_this4.cellProperties.dateFormat || _this4.defaultDateFormat); } @@ -65209,6 +65306,8 @@ var _baseEditor = __webpack_require__(63); var _baseEditor2 = _interopRequireDefault(_baseEditor); +var _object = __webpack_require__(1); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var SelectEditor = _baseEditor2.default.prototype.extend(); @@ -65244,6 +65343,8 @@ SelectEditor.prototype.registerHooks = function () { }; SelectEditor.prototype.prepare = function () { + var _this2 = this; + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } @@ -65261,14 +65362,12 @@ SelectEditor.prototype.prepare = function () { (0, _element.empty)(this.select); - for (var option in options) { - if (Object.prototype.hasOwnProperty.call(options, option)) { - var optionElement = document.createElement('OPTION'); - optionElement.value = option; - (0, _element.fastInnerHTML)(optionElement, options[option]); - this.select.appendChild(optionElement); - } - } + (0, _object.objectEach)(options, function (value, key) { + var optionElement = document.createElement('OPTION'); + optionElement.value = key; + (0, _element.fastInnerHTML)(optionElement, value); + _this2.select.appendChild(optionElement); + }); }; SelectEditor.prototype.prepareOptions = function (optionsToPrepare) { @@ -65812,8 +65911,7 @@ function checkboxRenderer(instance, TD, row, col, prop, value, cellProperties) { var cell = instance.getCell(visualRow, visualColumn); - if (cell == null) { - + if (cell === null || cell === void 0) { callback(visualRow, visualColumn, cachedCellProperties); } else { var checkboxes = cell.querySelectorAll('input[type=checkbox]'); @@ -65993,11 +66091,7 @@ function htmlRenderer(instance, TD, row, col, prop, value) { (0, _index.getRenderer)('base').apply(this, [instance, TD, row, col, prop, value].concat(args)); - if (value === null || value === void 0) { - value = ''; - } - - (0, _element.fastInnerHTML)(TD, value); + (0, _element.fastInnerHTML)(TD, value === null || value === void 0 ? '' : value); } exports.default = htmlRenderer; @@ -66036,7 +66130,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * @param {Object} cellProperties Cell properties (shared by cell renderer and editor) */ function numericRenderer(instance, TD, row, col, prop, value, cellProperties) { - if ((0, _number.isNumeric)(value)) { + var newValue = value; + + if ((0, _number.isNumeric)(newValue)) { var numericFormat = cellProperties.numericFormat; var cellCulture = numericFormat && numericFormat.culture || '-'; var cellFormatPattern = numericFormat && numericFormat.pattern; @@ -66054,7 +66150,7 @@ function numericRenderer(instance, TD, row, col, prop, value, cellProperties) { _numbro2.default.setLanguage(cellCulture); - value = (0, _numbro2.default)(value).format(cellFormatPattern || '0'); + newValue = (0, _numbro2.default)(newValue).format(cellFormatPattern || '0'); if (classArr.indexOf('htLeft') < 0 && classArr.indexOf('htCenter') < 0 && classArr.indexOf('htRight') < 0 && classArr.indexOf('htJustify') < 0) { classArr.push('htRight'); @@ -66067,7 +66163,7 @@ function numericRenderer(instance, TD, row, col, prop, value, cellProperties) { cellProperties.className = classArr.join(' '); } - (0, _index.getRenderer)('text')(instance, TD, row, col, prop, value, cellProperties); + (0, _index.getRenderer)('text')(instance, TD, row, col, prop, newValue, cellProperties); } exports.default = numericRenderer; @@ -66105,9 +66201,7 @@ function passwordRenderer(instance, TD, row, col, prop, value, cellProperties) { (0, _index.getRenderer)('text').apply(this, [instance, TD, row, col, prop, value, cellProperties].concat(args)); - value = TD.innerHTML; - - var hashLength = cellProperties.hashLength || value.length; + var hashLength = cellProperties.hashLength || TD.innerHTML.length; var hashSymbol = cellProperties.hashSymbol || '*'; var hash = ''; @@ -66154,12 +66248,13 @@ function textRenderer(instance, TD, row, col, prop, value, cellProperties) { } (0, _index.getRenderer)('base').apply(this, [instance, TD, row, col, prop, value, cellProperties].concat(args)); + var escaped = value; - if (!value && cellProperties.placeholder) { - value = cellProperties.placeholder; + if (!escaped && cellProperties.placeholder) { + escaped = cellProperties.placeholder; } - var escaped = (0, _mixed.stringify)(value); + escaped = (0, _mixed.stringify)(escaped); if (!instance.getSettings().trimWhitespace) { escaped = escaped.replace(/ /g, String.fromCharCode(160)); @@ -66199,11 +66294,13 @@ exports.default = autocompleteValidator; * @param {Function} callback - Callback called with validation result */ function autocompleteValidator(value, callback) { - if (value == null) { - value = ''; + var valueToValidate = value; + + if (valueToValidate === null || valueToValidate === void 0) { + valueToValidate = ''; } - if (this.allowEmpty && value === '') { + if (this.allowEmpty && valueToValidate === '') { callback(true); return; @@ -66211,14 +66308,14 @@ function autocompleteValidator(value, callback) { if (this.strict && this.source) { if (typeof this.source === 'function') { - this.source(value, process(value, callback)); + this.source(valueToValidate, process(valueToValidate, callback)); } else { - process(value, callback)(this.source); + process(valueToValidate, callback)(this.source); } } else { callback(true); } -}; +} /** * Function responsible for validation of autocomplete value. @@ -66274,17 +66371,18 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * @param {Function} callback - Callback called with validation result */ function dateValidator(value, callback) { - var valid = true; var dateEditor = (0, _editors.getEditorInstance)('date', this.instance); + var valueToValidate = value; + var valid = true; - if (value == null) { - value = ''; + if (valueToValidate === null || valueToValidate === void 0) { + valueToValidate = ''; } - var isValidDate = (0, _moment2.default)(new Date(value)).isValid() || (0, _moment2.default)(value, dateEditor.defaultDateFormat).isValid(); + var isValidDate = (0, _moment2.default)(new Date(valueToValidate)).isValid() || (0, _moment2.default)(valueToValidate, dateEditor.defaultDateFormat).isValid(); // is it in the specified format - var isValidFormat = (0, _moment2.default)(value, this.dateFormat || dateEditor.defaultDateFormat, true).isValid(); + var isValidFormat = (0, _moment2.default)(valueToValidate, this.dateFormat || dateEditor.defaultDateFormat, true).isValid(); - if (this.allowEmpty && value === '') { + if (this.allowEmpty && valueToValidate === '') { isValidDate = true; isValidFormat = true; } @@ -66298,7 +66396,7 @@ function dateValidator(value, callback) { if (isValidDate && !isValidFormat) { if (this.correctFormat === true) { // if format correction is enabled - var correctedValue = correctFormat(value, this.dateFormat); + var correctedValue = correctFormat(valueToValidate, this.dateFormat); var row = this.instance.runHooks('unmodifyRow', this.row); var column = this.instance.runHooks('unmodifyCol', this.col); @@ -66310,7 +66408,7 @@ function dateValidator(value, callback) { } callback(valid); -}; +} /** * Format the given string using moment.js' format feature @@ -66332,7 +66430,7 @@ function correctFormat(value, dateFormat) { } return date.format(dateFormat); -}; +} /***/ }), /* 529 */ @@ -66352,17 +66450,19 @@ exports.default = numericValidator; * @param {*} callback - Callback called with validation result */ function numericValidator(value, callback) { - if (value == null) { - value = ''; + var valueToValidate = value; + + if (valueToValidate === null || valueToValidate === void 0) { + valueToValidate = ''; } - if (this.allowEmpty && value === '') { + if (this.allowEmpty && valueToValidate === '') { callback(true); - } else if (value === '') { + } else if (valueToValidate === '') { callback(false); } else { - callback(/^-?\d*(\.|,)?\d*$/.test(value)); + callback(/^-?\d*(\.|,)?\d*$/.test(valueToValidate)); } -}; +} /***/ }), /* 530 */ @@ -66395,28 +66495,29 @@ var STRICT_FORMATS = ['YYYY-MM-DDTHH:mm:ss.SSSZ', 'X', // Unix timestamp * @param {Function} callback - Callback called with validation result */ function timeValidator(value, callback) { - var valid = true; var timeFormat = this.timeFormat || 'h:mm:ss a'; + var valid = true; + var valueToValidate = value; - if (value === null) { - value = ''; + if (valueToValidate === null) { + valueToValidate = ''; } - value = /^\d{3,}$/.test(value) ? parseInt(value, 10) : value; + valueToValidate = /^\d{3,}$/.test(valueToValidate) ? parseInt(valueToValidate, 10) : valueToValidate; - var twoDigitValue = /^\d{1,2}$/.test(value); + var twoDigitValue = /^\d{1,2}$/.test(valueToValidate); if (twoDigitValue) { - value += ':00'; + valueToValidate += ':00'; } - var date = (0, _moment2.default)(value, STRICT_FORMATS, true).isValid() ? (0, _moment2.default)(value) : (0, _moment2.default)(value, timeFormat); + var date = (0, _moment2.default)(valueToValidate, STRICT_FORMATS, true).isValid() ? (0, _moment2.default)(valueToValidate) : (0, _moment2.default)(valueToValidate, timeFormat); var isValidTime = date.isValid(); // is it in the specified format - var isValidFormat = (0, _moment2.default)(value, timeFormat, true).isValid() && !twoDigitValue; + var isValidFormat = (0, _moment2.default)(valueToValidate, timeFormat, true).isValid() && !twoDigitValue; - if (this.allowEmpty && value === '') { + if (this.allowEmpty && valueToValidate === '') { isValidTime = true; isValidFormat = true; } @@ -66441,7 +66542,7 @@ function timeValidator(value, callback) { } callback(valid); -}; +} /***/ }), /* 531 */ @@ -66456,7 +66557,7 @@ var _editors = __webpack_require__(19); var _renderers = __webpack_require__(15); -var _validators = __webpack_require__(43); +var _validators = __webpack_require__(42); var CELL_TYPE = 'autocomplete'; @@ -66499,7 +66600,7 @@ var _editors = __webpack_require__(19); var _renderers = __webpack_require__(15); -var _validators = __webpack_require__(43); +var _validators = __webpack_require__(42); var CELL_TYPE = 'date'; @@ -66523,7 +66624,7 @@ var _editors = __webpack_require__(19); var _renderers = __webpack_require__(15); -var _validators = __webpack_require__(43); +var _validators = __webpack_require__(42); var CELL_TYPE = 'dropdown'; @@ -66568,7 +66669,7 @@ var _editors = __webpack_require__(19); var _renderers = __webpack_require__(15); -var _validators = __webpack_require__(43); +var _validators = __webpack_require__(42); var CELL_TYPE = 'numeric'; @@ -66633,7 +66734,7 @@ var _editors = __webpack_require__(19); var _renderers = __webpack_require__(15); -var _validators = __webpack_require__(43); +var _validators = __webpack_require__(42); var CELL_TYPE = 'time'; @@ -66735,29 +66836,31 @@ DataMap.prototype.recursiveDuckSchema = function (object) { * @returns {Number} */ DataMap.prototype.recursiveDuckColumns = function (schema, lastCol, parent) { + var _this2 = this; + + var lastColumn = lastCol; + var propertyParent = parent; var prop = void 0; - if (typeof lastCol === 'undefined') { - lastCol = 0; - parent = ''; + if (typeof lastColumn === 'undefined') { + lastColumn = 0; + propertyParent = ''; } if ((typeof schema === 'undefined' ? 'undefined' : _typeof(schema)) === 'object' && !Array.isArray(schema)) { - for (var i in schema) { - if ((0, _object.hasOwnProperty)(schema, i)) { - if (schema[i] === null) { - prop = parent + i; - this.colToPropCache.push(prop); - this.propToColCache.set(prop, lastCol); - - lastCol++; - } else { - lastCol = this.recursiveDuckColumns(schema[i], lastCol, i + '.'); - } + (0, _object.objectEach)(schema, function (value, key) { + if (value === null) { + prop = propertyParent + key; + _this2.colToPropCache.push(prop); + _this2.propToColCache.set(prop, lastColumn); + + lastColumn += 1; + } else { + lastColumn = _this2.recursiveDuckColumns(value, lastColumn, key + '.'); } - } + }); } - return lastCol; + return lastColumn; }; DataMap.prototype.createMap = function () { @@ -66795,7 +66898,7 @@ DataMap.prototype.createMap = function () { this.propToColCache.set(column.data, index); } - filteredIndex++; + filteredIndex += 1; } } } else { @@ -66810,13 +66913,13 @@ DataMap.prototype.createMap = function () { * @returns {Number} Physical column index. */ DataMap.prototype.colToProp = function (col) { - col = this.instance.runHooks('modifyCol', col); + var physicalColumn = this.instance.runHooks('modifyCol', col); - if (!isNaN(col) && this.colToPropCache && typeof this.colToPropCache[col] !== 'undefined') { - return this.colToPropCache[col]; + if (!isNaN(physicalColumn) && this.colToPropCache && typeof this.colToPropCache[physicalColumn] !== 'undefined') { + return this.colToPropCache[physicalColumn]; } - return col; + return physicalColumn; }; /** @@ -66863,18 +66966,19 @@ DataMap.prototype.getSchema = function () { * @returns {Number} Returns number of created rows. */ DataMap.prototype.createRow = function (index) { - var _this2 = this; + var _this3 = this; var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; var source = arguments[2]; var numberOfCreatedRows = 0; + var rowIndex = index; - if (typeof index !== 'number' || index >= this.instance.countSourceRows()) { - index = this.instance.countSourceRows(); + if (typeof rowIndex !== 'number' || rowIndex >= this.instance.countSourceRows()) { + rowIndex = this.instance.countSourceRows(); } - var continueProcess = this.instance.runHooks('beforeCreateRow', index, amount, source); + var continueProcess = this.instance.runHooks('beforeCreateRow', rowIndex, amount, source); if (continueProcess === false) { return 0; @@ -66886,10 +66990,10 @@ DataMap.prototype.createRow = function (index) { var _loop = function _loop() { var row = null; - if (_this2.instance.dataType === 'array') { - if (_this2.instance.getSettings().dataSchema) { + if (_this3.instance.dataType === 'array') { + if (_this3.instance.getSettings().dataSchema) { // Clone template array - row = (0, _object.deepClone)(_this2.getSchema()); + row = (0, _object.deepClone)(_this3.getSchema()); } else { row = []; /* eslint-disable no-loop-func */ @@ -66897,27 +67001,27 @@ DataMap.prototype.createRow = function (index) { return row.push(null); }); } - } else if (_this2.instance.dataType === 'function') { - row = _this2.instance.getSettings().dataSchema(index); + } else if (_this3.instance.dataType === 'function') { + row = _this3.instance.getSettings().dataSchema(rowIndex); } else { row = {}; - (0, _object.deepExtend)(row, _this2.getSchema()); + (0, _object.deepExtend)(row, _this3.getSchema()); } - if (index === _this2.instance.countSourceRows()) { - _this2.dataSource.push(row); + if (rowIndex === _this3.instance.countSourceRows()) { + _this3.dataSource.push(row); } else { - _this2.spliceData(index, 0, row); + _this3.spliceData(rowIndex, 0, row); } - numberOfCreatedRows++; + numberOfCreatedRows += 1; }; while (numberOfCreatedRows < amount && this.instance.countSourceRows() < maxRows) { _loop(); } - this.instance.runHooks('afterCreateRow', index, numberOfCreatedRows, source); + this.instance.runHooks('afterCreateRow', rowIndex, numberOfCreatedRows, source); this.instance.forceFullRender = true; // used when data was changed return numberOfCreatedRows; @@ -66927,37 +67031,35 @@ DataMap.prototype.createRow = function (index) { * Creates col at the right of the data array. * * @param {Number} [index] Visual index of the column before which the new column will be inserted - * @param {Number} [amount] An amount of columns to add. + * @param {Number} [amount=1] An amount of columns to add. * @param {String} [source] Source of method call. * @fires Hooks#afterCreateCol * @returns {Number} Returns number of created columns */ -DataMap.prototype.createCol = function (index, amount, source) { +DataMap.prototype.createCol = function (index) { + var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; + var source = arguments[2]; + if (!this.instance.isColumnModificationAllowed()) { throw new Error('Cannot create new column. When data source in an object, ' + 'you can only have as much columns as defined in first data row, data schema or in the \'columns\' setting.' + 'If you want to be able to add new columns, you have to use array datasource.'); } var rlen = this.instance.countSourceRows(); var data = this.dataSource; + var countColumns = this.instance.countCols(); + var columnIndex = typeof index !== 'number' || index >= countColumns ? countColumns : index; var constructor = void 0; var numberOfCreatedCols = 0; var currentIndex = void 0; - if (!amount) { - amount = 1; - } - - if (typeof index !== 'number' || index >= this.instance.countCols()) { - index = this.instance.countCols(); - } - this.instance.runHooks('beforeCreateCol', index, amount, source); + this.instance.runHooks('beforeCreateCol', columnIndex, amount, source); - currentIndex = index; + currentIndex = columnIndex; var maxCols = this.instance.getSettings().maxCols; while (numberOfCreatedCols < amount && this.instance.countCols() < maxCols) { constructor = (0, _setting.columnFactory)(this.GridSettings, this.priv.columnsSettingConflicts); - if (typeof index !== 'number' || index >= this.instance.countCols()) { + if (typeof columnIndex !== 'number' || columnIndex >= this.instance.countCols()) { if (rlen > 0) { for (var r = 0; r < rlen; r++) { if (typeof data[r] === 'undefined') { @@ -66978,11 +67080,11 @@ DataMap.prototype.createCol = function (index, amount, source) { this.priv.columnSettings.splice(currentIndex, 0, constructor); } - numberOfCreatedCols++; - currentIndex++; + numberOfCreatedCols += 1; + currentIndex += 1; } - this.instance.runHooks('afterCreateCol', index, numberOfCreatedCols, source); + this.instance.runHooks('afterCreateCol', columnIndex, numberOfCreatedCols, source); this.instance.forceFullRender = true; // used when data was changed return numberOfCreatedCols; @@ -66992,41 +67094,36 @@ DataMap.prototype.createCol = function (index, amount, source) { * Removes row from the data array. * * @param {Number} [index] Visual index of the row to be removed. If not provided, the last row will be removed - * @param {Number} [amount] Amount of the rows to be removed. If not provided, one row will be removed + * @param {Number} [amount=1] Amount of the rows to be removed. If not provided, one row will be removed * @param {String} [source] Source of method call. * @fires Hooks#beforeRemoveRow * @fires Hooks#afterRemoveRow */ -DataMap.prototype.removeRow = function (index, amount, source) { - if (!amount) { - amount = 1; - } - if (typeof index !== 'number') { - index = -amount; - } +DataMap.prototype.removeRow = function (index) { + var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; + var source = arguments[2]; - amount = this.instance.runHooks('modifyRemovedAmount', amount, index); + var rowIndex = typeof index !== 'number' ? -amount : index; + var rowsAmount = this.instance.runHooks('modifyRemovedAmount', amount, rowIndex); - index = (this.instance.countSourceRows() + index) % this.instance.countSourceRows(); + rowIndex = (this.instance.countSourceRows() + rowIndex) % this.instance.countSourceRows(); - var logicRows = this.visualRowsToPhysical(index, amount); - var actionWasNotCancelled = this.instance.runHooks('beforeRemoveRow', index, amount, logicRows, source); + var logicRows = this.visualRowsToPhysical(rowIndex, rowsAmount); + var actionWasNotCancelled = this.instance.runHooks('beforeRemoveRow', rowIndex, rowsAmount, logicRows, source); if (actionWasNotCancelled === false) { return; } var data = this.dataSource; - var newData = void 0; - - newData = this.filterData(index, amount); + var newData = this.filterData(rowIndex, rowsAmount); if (newData) { data.length = 0; Array.prototype.push.apply(data, newData); } - this.instance.runHooks('afterRemoveRow', index, amount, logicRows, source); + this.instance.runHooks('afterRemoveRow', rowIndex, rowsAmount, logicRows, source); this.instance.forceFullRender = true; // used when data was changed }; @@ -67035,29 +67132,27 @@ DataMap.prototype.removeRow = function (index, amount, source) { * Removes column from the data array. * * @param {Number} [index] Visual index of the column to be removed. If not provided, the last column will be removed - * @param {Number} [amount] Amount of the columns to be removed. If not provided, one column will be removed + * @param {Number} [amount=1] Amount of the columns to be removed. If not provided, one column will be removed * @param {String} [source] Source of method call. * @fires Hooks#beforeRemoveCol * @fires Hooks#afterRemoveCol */ -DataMap.prototype.removeCol = function (index, amount, source) { +DataMap.prototype.removeCol = function (index) { + var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; + var source = arguments[2]; + if (this.instance.dataType === 'object' || this.instance.getSettings().columns) { throw new Error('cannot remove column with object data source or columns option specified'); } - if (!amount) { - amount = 1; - } - if (typeof index !== 'number') { - index = -amount; - } + var columnIndex = typeof index !== 'number' ? -amount : index; - index = (this.instance.countCols() + index) % this.instance.countCols(); + columnIndex = (this.instance.countCols() + columnIndex) % this.instance.countCols(); - var logicColumns = this.visualColumnsToPhysical(index, amount); + var logicColumns = this.visualColumnsToPhysical(columnIndex, amount); var descendingLogicColumns = logicColumns.slice(0).sort(function (a, b) { return b - a; }); - var actionWasNotCancelled = this.instance.runHooks('beforeRemoveCol', index, amount, logicColumns, source); + var actionWasNotCancelled = this.instance.runHooks('beforeRemoveCol', columnIndex, amount, logicColumns, source); if (actionWasNotCancelled === false) { return; @@ -67089,7 +67184,7 @@ DataMap.prototype.removeCol = function (index, amount, source) { } } - this.instance.runHooks('afterRemoveCol', index, amount, logicColumns, source); + this.instance.runHooks('afterRemoveCol', columnIndex, amount, logicColumns, source); this.instance.forceFullRender = true; // used when data was changed }; @@ -67116,7 +67211,7 @@ DataMap.prototype.spliceCol = function (col, index, amount) { var i = 0; while (i < amount) { elements.push(null); // add null in place of removed elements - i++; + i += 1; } (0, _array.to2dArray)(elements); this.instance.populateFromArray(index, col, elements, null, null, 'spliceCol'); @@ -67146,7 +67241,7 @@ DataMap.prototype.spliceRow = function (row, index, amount) { var i = 0; while (i < amount) { elements.push(null); // add null in place of removed elements - i++; + i += 1; } this.instance.populateFromArray(row, index, [elements], null, null, 'spliceRow'); @@ -67195,11 +67290,11 @@ DataMap.prototype.filterData = function (index, amount) { * @param {Number} prop */ DataMap.prototype.get = function (row, prop) { - row = this.instance.runHooks('modifyRow', row); + var physicalRow = this.instance.runHooks('modifyRow', row); - var dataRow = this.dataSource[row]; + var dataRow = this.dataSource[physicalRow]; // TODO: To remove, use 'modifyData' hook instead (see below) - var modifiedRowData = this.instance.runHooks('modifyRowData', row); + var modifiedRowData = this.instance.runHooks('modifyRowData', physicalRow); dataRow = isNaN(modifiedRowData) ? modifiedRowData : dataRow; // @@ -67238,13 +67333,13 @@ DataMap.prototype.get = function (row, prop) { * } * }]} */ - value = prop(this.dataSource.slice(row, row + 1)[0]); + value = prop(this.dataSource.slice(physicalRow, physicalRow + 1)[0]); } if (this.instance.hasHook('modifyData')) { var valueHolder = (0, _object.createObjectPropListener)(value); - this.instance.runHooks('modifyData', row, this.propToCol(prop), valueHolder, 'get'); + this.instance.runHooks('modifyData', physicalRow, this.propToCol(prop), valueHolder, 'get'); if (valueHolder.isTouched()) { value = valueHolder.value; @@ -67279,28 +67374,28 @@ DataMap.prototype.getCopyable = function (row, prop) { * @param {String} [source] Source of hook runner. */ DataMap.prototype.set = function (row, prop, value, source) { - row = this.instance.runHooks('modifyRow', row, source || 'datamapGet'); - - var dataRow = this.dataSource[row]; + var physicalRow = this.instance.runHooks('modifyRow', row, source || 'datamapGet'); + var newValue = value; + var dataRow = this.dataSource[physicalRow]; // TODO: To remove, use 'modifyData' hook instead (see below) - var modifiedRowData = this.instance.runHooks('modifyRowData', row); + var modifiedRowData = this.instance.runHooks('modifyRowData', physicalRow); dataRow = isNaN(modifiedRowData) ? modifiedRowData : dataRow; // if (this.instance.hasHook('modifyData')) { - var valueHolder = (0, _object.createObjectPropListener)(value); + var valueHolder = (0, _object.createObjectPropListener)(newValue); - this.instance.runHooks('modifyData', row, this.propToCol(prop), valueHolder, 'set'); + this.instance.runHooks('modifyData', physicalRow, this.propToCol(prop), valueHolder, 'set'); if (valueHolder.isTouched()) { - value = valueHolder.value; + newValue = valueHolder.value; } } // try to set value under property `prop` (includes dot) if (dataRow && dataRow.hasOwnProperty && (0, _object.hasOwnProperty)(dataRow, prop)) { - dataRow[prop] = value; + dataRow[prop] = newValue; } else if (typeof prop === 'string' && prop.indexOf('.') > -1) { var sliced = prop.split('.'); var out = dataRow; @@ -67313,12 +67408,12 @@ DataMap.prototype.set = function (row, prop, value, source) { } out = out[sliced[i]]; } - out[sliced[i]] = value; + out[sliced[i]] = newValue; } else if (typeof prop === 'function') { /* see the `function` handler in `get` */ - prop(this.dataSource.slice(row, row + 1)[0], value); + prop(this.dataSource.slice(physicalRow, physicalRow + 1)[0], newValue); } else { - dataRow[prop] = value; + dataRow[prop] = newValue; } }; @@ -67343,8 +67438,8 @@ DataMap.prototype.visualRowsToPhysical = function (index, amount) { row = this.instance.runHooks('modifyRow', physicRow); logicRows.push(row); - rowsToRemove--; - physicRow++; + rowsToRemove -= 1; + physicRow += 1; } return logicRows; @@ -67367,8 +67462,8 @@ DataMap.prototype.visualColumnsToPhysical = function (index, amount) { visualCols.push(col); - colsToRemove--; - physicalCol++; + colsToRemove -= 1; + physicalCol += 1; } return visualCols; @@ -67398,10 +67493,10 @@ DataMap.prototype.clearLengthCache = function () { * @returns {Number} */ DataMap.prototype.getLength = function () { - var _this3 = this; + var _this4 = this; - var maxRows = void 0, - maxRowsFromSettings = this.instance.getSettings().maxRows; + var maxRowsFromSettings = this.instance.getSettings().maxRows; + var maxRows = void 0; if (maxRowsFromSettings < 0 || maxRowsFromSettings === 0) { maxRows = 0; @@ -67422,10 +67517,10 @@ DataMap.prototype.getLength = function () { this.latestSourceRowsCount = length; if (this.cachedLength === null || reValidate) { (0, _number.rangeEach)(length - 1, function (row) { - row = _this3.instance.runHooks('modifyRow', row); + var physicalRow = _this4.instance.runHooks('modifyRow', row); - if (row === null) { - --length; + if (physicalRow === null) { + length -= 1; } }); this.cachedLength = length; @@ -67473,9 +67568,7 @@ DataMap.prototype.getAll = function () { DataMap.prototype.getRange = function (start, end, destination) { var output = []; var r = void 0; - var rlen = void 0; var c = void 0; - var clen = void 0; var row = void 0; var maxRows = this.instance.getSettings().maxRows; @@ -67487,8 +67580,8 @@ DataMap.prototype.getRange = function (start, end, destination) { var getFn = destination === this.DESTINATION_CLIPBOARD_GENERATOR ? this.getCopyable : this.get; - rlen = Math.min(Math.max(maxRows - 1, 0), Math.max(start.row, end.row)); - clen = Math.min(Math.max(maxCols - 1, 0), Math.max(start.col, end.col)); + var rlen = Math.min(Math.max(maxRows - 1, 0), Math.max(start.row, end.row)); + var clen = Math.min(Math.max(maxCols - 1, 0), Math.max(start.col, end.col)); for (r = Math.min(start.row, end.row); r <= rlen; r++) { row = []; @@ -67537,11 +67630,11 @@ DataMap.prototype.getCopyableText = function (start, end) { * @param {Number} delay Time of the delay in milliseconds. */ DataMap.prototype.onSkipLengthCache = function (delay) { - var _this4 = this; + var _this5 = this; this.skipCache = true; setTimeout(function () { - _this4.skipCache = false; + _this5.skipCache = false; }, delay); }; @@ -67575,7 +67668,7 @@ var _createClass = function () { function defineProperties(target, props) { for exports.parseDelay = parseDelay; -var _feature = __webpack_require__(42); +var _feature = __webpack_require__(41); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -67703,12 +67796,22 @@ var Interval = function () { }(); exports.default = Interval; + +/** + * Convert delay from string format to milliseconds. + * + * @param {Number|String} delay + * @returns {Number} + */ + function parseDelay(delay) { - if (typeof delay === 'string' && /fps$/.test(delay)) { - delay = 1000 / parseInt(delay.replace('fps', '') || 0, 10); + var result = delay; + + if (typeof result === 'string' && /fps$/.test(result)) { + result = 1000 / parseInt(result.replace('fps', '') || 0, 10); } - return delay; + return result; } /***/ }), @@ -67797,13 +67900,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de function EditorManager(instance, priv, selection) { var _this = this; + var eventManager = new _eventManager2.default(instance); var destroyed = false; var lock = false; - var eventManager = void 0; var activeEditor = void 0; - eventManager = new _eventManager2.default(instance); - function moveSelectionAfterEnter(shiftKey) { var enterMoves = typeof priv.settings.enterMoves === 'function' ? priv.settings.enterMoves(event) : priv.settings.enterMoves; @@ -68115,14 +68216,6 @@ function EditorManager(instance, priv, selection) { return; } - var row = void 0; - var col = void 0; - var prop = void 0; - var td = void 0; - var originalValue = void 0; - var cellProperties = void 0; - var editorClass = void 0; - if (activeEditor && activeEditor.isWaiting()) { this.closeEditor(false, false, function (dataSaved) { if (dataSaved) { @@ -68132,14 +68225,14 @@ function EditorManager(instance, priv, selection) { return; } - row = instance.selection.selectedRange.current().highlight.row; - col = instance.selection.selectedRange.current().highlight.col; - prop = instance.colToProp(col); - td = instance.getCell(row, col); - originalValue = instance.getSourceDataAtCell(instance.runHooks('modifyRow', row), col); - cellProperties = instance.getCellMeta(row, col); - editorClass = instance.getCellEditor(cellProperties); + var row = instance.selection.selectedRange.current().highlight.row; + var col = instance.selection.selectedRange.current().highlight.col; + var prop = instance.colToProp(col); + var td = instance.getCell(row, col); + var originalValue = instance.getSourceDataAtCell(instance.runHooks('modifyRow', row), col); + var cellProperties = instance.getCellMeta(row, col); + var editorClass = instance.getCellEditor(cellProperties); if (editorClass) { activeEditor = (0, _editors.getEditorInstance)(editorClass, instance); @@ -68276,6 +68369,25 @@ var _mouseEventHandler = __webpack_require__(454); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/** + * Cross-platform helper to clear text selection. + */ +var clearTextSelection = function clearTextSelection() { + // http://stackoverflow.com/questions/3169786/clear-text-selection-with-javascript + if (window.getSelection) { + if (window.getSelection().empty) { + // Chrome + window.getSelection().empty(); + } else if (window.getSelection().removeAllRanges) { + // Firefox + window.getSelection().removeAllRanges(); + } + } else if (document.selection) { + // IE? + document.selection.empty(); + } +}; + /** * Handsontable TableView constructor * @param {Object} instance @@ -68427,22 +68539,6 @@ function TableView(instance) { event.preventDefault(); }); - var clearTextSelection = function clearTextSelection() { - // http://stackoverflow.com/questions/3169786/clear-text-selection-with-javascript - if (window.getSelection) { - if (window.getSelection().empty) { - // Chrome - window.getSelection().empty(); - } else if (window.getSelection().removeAllRanges) { - // Firefox - window.getSelection().removeAllRanges(); - } - } else if (document.selection) { - // IE? - document.selection.empty(); - } - }; - var walkontableConfig = { debug: function debug() { return that.settings.debug; @@ -69083,15 +69179,17 @@ var DataSource = function () { (0, _array.arrayEach)(this.data, function (row) { var property = _this.colToProp(column); + var value = void 0; if (typeof property === 'string') { - row = (0, _object.getProperty)(row, property); + value = (0, _object.getProperty)(row, property); } else if (typeof property === 'function') { - row = property(row); + value = property(row); } else { - row = row[property]; + value = row[property]; } - result.push(row); + + result.push(value); }); return result; @@ -69352,7 +69450,7 @@ function pluralize(phrasePropositions, pluralForm) { } return phrasePropositions; -}; +} /***/ }), /* 549 */ @@ -70299,15 +70397,15 @@ var Selection = function () { value: function selectColumns(startColumn) { var endColumn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : startColumn; - startColumn = typeof startColumn === 'string' ? this.tableProps.propToCol(startColumn) : startColumn; - endColumn = typeof endColumn === 'string' ? this.tableProps.propToCol(endColumn) : endColumn; + var start = typeof startColumn === 'string' ? this.tableProps.propToCol(startColumn) : startColumn; + var end = typeof endColumn === 'string' ? this.tableProps.propToCol(endColumn) : endColumn; var countCols = this.tableProps.countCols(); - var isValid = (0, _utils.isValidCoord)(startColumn, countCols) && (0, _utils.isValidCoord)(endColumn, countCols); + var isValid = (0, _utils.isValidCoord)(start, countCols) && (0, _utils.isValidCoord)(end, countCols); if (isValid) { - this.setRangeStartOnly(new _src.CellCoords(-1, startColumn)); - this.setRangeEnd(new _src.CellCoords(this.tableProps.countRows() - 1, endColumn)); + this.setRangeStartOnly(new _src.CellCoords(-1, start)); + this.setRangeEnd(new _src.CellCoords(this.tableProps.countRows() - 1, end)); this.finish(); } @@ -70760,7 +70858,7 @@ function jQueryWrapper(Handsontable) { return output; }; -}; +} /***/ }), /* 560 */ @@ -71158,9 +71256,8 @@ var Storage = function () { }, { key: 'loadValue', value: function loadValue(key, defaultValue) { - key = typeof key === 'undefined' ? defaultValue : key; - - var value = window.localStorage.getItem(this.prefix + '_' + key); + var itemKey = typeof key === 'undefined' ? defaultValue : key; + var value = window.localStorage.getItem(this.prefix + '_' + itemKey); return value === null ? void 0 : JSON.parse(value); } @@ -71206,29 +71303,29 @@ var Storage = function () { var keysJSON = window.localStorage.getItem(this.prefix + '__persistentStateKeys'); var keys = typeof keysJSON === 'string' ? JSON.parse(keysJSON) : void 0; - this.savedKeys = keys ? keys : []; + this.savedKeys = keys || []; } - }, { - key: 'saveSavedKeys', - /** * Save saved key in localStorage. * * @private */ + + }, { + key: 'saveSavedKeys', value: function saveSavedKeys() { window.localStorage.setItem(this.prefix + '__persistentStateKeys', JSON.stringify(this.savedKeys)); } - }, { - key: 'clearSavedKeys', - /** * Clear saved key from localStorage. * * @private */ + + }, { + key: 'clearSavedKeys', value: function clearSavedKeys() { this.savedKeys.length = 0; this.saveSavedKeys(); @@ -71261,7 +71358,7 @@ var _base2 = _interopRequireDefault(_base); var _array = __webpack_require__(0); -var _feature = __webpack_require__(42); +var _feature = __webpack_require__(41); var _element = __webpack_require__(2); @@ -71463,7 +71560,7 @@ var AutoColumnSize = function (_BasePlugin) { var setting = this.hot.getSettings().autoColumnSize; - if (setting && setting.useHeaders != null) { + if (setting && setting.useHeaders !== null && setting.useHeaders !== void 0) { this.ghostTable.setSetting('useHeaders', setting.useHeaders); } @@ -71531,16 +71628,12 @@ var AutoColumnSize = function (_BasePlugin) { var rowRange = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { from: 0, to: this.hot.countRows() - 1 }; var force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - if (typeof colRange === 'number') { - colRange = { from: colRange, to: colRange }; - } - if (typeof rowRange === 'number') { - rowRange = { from: rowRange, to: rowRange }; - } + var columnsRange = typeof colRange === 'number' ? { from: colRange, to: colRange } : colRange; + var rowsRange = typeof rowRange === 'number' ? { from: rowRange, to: rowRange } : rowRange; - (0, _number.rangeEach)(colRange.from, colRange.to, function (col) { + (0, _number.rangeEach)(columnsRange.from, columnsRange.to, function (col) { if (force || _this3.widths[col] === void 0 && !_this3.hot._getColWidthFromSettings(col)) { - var samples = _this3.samplesGenerator.generateColumnSamples(col, rowRange); + var samples = _this3.samplesGenerator.generateColumnSamples(col, rowsRange); (0, _array.arrayEach)(samples, function (_ref) { var _ref2 = _slicedToArray(_ref, 2), @@ -71909,12 +72002,15 @@ var AutoColumnSize = function (_BasePlugin) { }, { key: 'onBeforeColumnResize', value: function onBeforeColumnResize(col, size, isDblClick) { + var newSize = size; + if (isDblClick) { this.calculateColumnsWidth(col, void 0, true); - size = this.getColumnWidth(col, void 0, false); + + newSize = this.getColumnWidth(col, void 0, false); } - return size; + return newSize; } /** @@ -72378,6 +72474,7 @@ var Autofill = function (_BasePlugin) { lastFilledInRowIndex = rowIndex; } } + return lastFilledInRowIndex; } @@ -72423,9 +72520,10 @@ var Autofill = function (_BasePlugin) { var cornersOfSelectedCells = this.getCornersOfSelectedCells(); var lastFilledInRowIndex = this.getIndexOfLastAdjacentFilledInRow(cornersOfSelectedCells); - if (lastFilledInRowIndex === -1) { + if (lastFilledInRowIndex === -1 || lastFilledInRowIndex === void 0) { return false; } + this.addSelectionFromStartAreaToSpecificRowIndex(cornersOfSelectedCells, lastFilledInRowIndex); return true; @@ -72536,7 +72634,7 @@ var Autofill = function (_BasePlugin) { key: 'onBeforeCellMouseOver', value: function onBeforeCellMouseOver(coords) { if (this.mouseDownOnCellCorner && !this.hot.view.isMouseDown() && this.handleDraggedCells) { - this.handleDraggedCells++; + this.handleDraggedCells += 1; this.showBorder(coords); this.addNewRowIfNeeded(); @@ -72706,9 +72804,9 @@ function getDeltas(start, end, data, direction) { * @returns {{direction: String, start: CellCoords, end: CellCoords}} */ function getDragDirectionAndRange(startSelection, endSelection) { - var startOfDragCoords = void 0, - endOfDragCoords = void 0, - directionOfDrag = void 0; + var startOfDragCoords = void 0; + var endOfDragCoords = void 0; + var directionOfDrag = void 0; if (endSelection[0] === startSelection[0] && endSelection[1] < startSelection[1]) { directionOfDrag = 'left'; @@ -72804,7 +72902,7 @@ var _base2 = _interopRequireDefault(_base); var _array = __webpack_require__(0); -var _feature = __webpack_require__(42); +var _feature = __webpack_require__(41); var _element = __webpack_require__(2); @@ -73039,24 +73137,20 @@ var AutoRowSize = function (_BasePlugin) { var colRange = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { from: 0, to: this.hot.countCols() - 1 }; var force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - if (typeof rowRange === 'number') { - rowRange = { from: rowRange, to: rowRange }; - } - if (typeof colRange === 'number') { - colRange = { from: colRange, to: colRange }; - } + var rowsRange = typeof rowRange === 'number' ? { from: rowRange, to: rowRange } : rowRange; + var columnsRange = typeof colRange === 'number' ? { from: colRange, to: colRange } : colRange; if (this.hot.getColHeader(0) !== null) { - var samples = this.samplesGenerator.generateRowSamples(-1, colRange); + var samples = this.samplesGenerator.generateRowSamples(-1, columnsRange); this.ghostTable.addColumnHeadersRow(samples.get(-1)); } - (0, _number.rangeEach)(rowRange.from, rowRange.to, function (row) { + (0, _number.rangeEach)(rowsRange.from, rowsRange.to, function (row) { // For rows we must calculate row height even when user had set height value manually. // We can shrink column but cannot shrink rows! if (force || _this3.heights[row] === void 0) { - var _samples = _this3.samplesGenerator.generateRowSamples(row, colRange); + var _samples = _this3.samplesGenerator.generateRowSamples(row, columnsRange); (0, _array.arrayEach)(_samples, function (_ref) { var _ref2 = _slicedToArray(_ref, 2), @@ -73296,10 +73390,11 @@ var AutoRowSize = function (_BasePlugin) { value: function clearCacheByRange(range) { var _this5 = this; - if (typeof range === 'number') { - range = { from: range, to: range }; - } - (0, _number.rangeEach)(Math.min(range.from, range.to), Math.max(range.from, range.to), function (row) { + var _ref3 = typeof range === 'number' ? { from: range, to: range } : range, + from = _ref3.from, + to = _ref3.to; + + (0, _number.rangeEach)(Math.min(from, to), Math.max(from, to), function (row) { _this5.heights[row] = void 0; }); } @@ -73328,10 +73423,10 @@ var AutoRowSize = function (_BasePlugin) { key: 'onBeforeRender', value: function onBeforeRender() { var force = this.hot.renderCall; - this.calculateRowsHeight({ from: this.getFirstVisibleRow(), to: this.getLastVisibleRow() }, void 0, force); - var fixedRowsBottom = this.hot.getSettings().fixedRowsBottom; + this.calculateRowsHeight({ from: this.getFirstVisibleRow(), to: this.getLastVisibleRow() }, void 0, force); + // Calculate rows height synchronously for bottom overlay if (fixedRowsBottom) { var totalRows = this.hot.countRows() - 1; @@ -73371,12 +73466,15 @@ var AutoRowSize = function (_BasePlugin) { }, { key: 'onBeforeRowResize', value: function onBeforeRowResize(row, size, isDblClick) { + var newSize = size; + if (isDblClick) { this.calculateRowsHeight(row, void 0, true); - size = this.getRowHeight(row); + + newSize = this.getRowHeight(row); } - return size; + return newSize; } /** @@ -73903,12 +74001,14 @@ var ColumnSorting = function (_BasePlugin) { }, { key: 'onModifyRow', value: function onModifyRow(row, source) { + var physicalRow = row; + if (this.blockPluginTranslation === false && source !== this.pluginName) { - var rowInMapper = this.rowsMapper.getValueByIndex(row); - row = rowInMapper === null ? row : rowInMapper; + var rowInMapper = this.rowsMapper.getValueByIndex(physicalRow); + physicalRow = rowInMapper === null ? physicalRow : rowInMapper; } - return row; + return physicalRow; } /** @@ -73922,11 +74022,13 @@ var ColumnSorting = function (_BasePlugin) { }, { key: 'onUnmodifyRow', value: function onUnmodifyRow(row, source) { + var visualRow = row; + if (this.blockPluginTranslation === false && source !== this.pluginName) { - row = this.rowsMapper.getIndexByValue(row); + visualRow = this.rowsMapper.getIndexByValue(visualRow); } - return row; + return visualRow; } /** @@ -74202,16 +74304,19 @@ var _utils = __webpack_require__(86); * @returns {Function} The compare function. */ function defaultSort(sortOrder, columnMeta) { - // We are soring array of arrays. Single array is in form [rowIndex, ...value]. We compare just values, stored at second index of array. + // We are sorting array of arrays. Single array is in form [rowIndex, ...value]. We compare just values, stored at second index of array. return function (_ref, _ref2) { var _ref4 = _slicedToArray(_ref, 2), - value = _ref4[1]; + firstValue = _ref4[1]; var _ref3 = _slicedToArray(_ref2, 2), - nextValue = _ref3[1]; + secondValue = _ref3[1]; var sortEmptyCells = columnMeta.columnSorting.sortEmptyCells; + var value = firstValue; + var nextValue = secondValue; + if (typeof value === 'string') { value = value.toLowerCase(); } @@ -74461,7 +74566,7 @@ function merge(array, compareFunction, startIndex, middleIndex, endIndex) { } return array; -}; +} /***/ }), /* 572 */ @@ -74669,15 +74774,15 @@ var LinkedList = function () { } } } - }, { - key: "pop", - /** * Return last node from the linked list. * * @returns {NodeStructure} Last node. */ + + }, { + key: "pop", value: function pop() { if (this.last === null) { return null; @@ -74688,15 +74793,15 @@ var LinkedList = function () { return temp; } - }, { - key: "shift", - /** * Return first node from the linked list. * * @returns {NodeStructure} First node. */ + + }, { + key: "shift", value: function shift() { if (this.first === null) { return null; @@ -74707,13 +74812,13 @@ var LinkedList = function () { return temp; } - }, { - key: "recursiveReverse", - /** * Reverses the linked list recursively */ + + }, { + key: "recursiveReverse", value: function recursiveReverse() { function inverse(current, next) { if (!next) { @@ -74734,13 +74839,13 @@ var LinkedList = function () { this.first = this.last; this.last = temp; } - }, { - key: "reverse", - /** * Reverses the linked list iteratively */ + + }, { + key: "reverse", value: function reverse() { if (!this.first || !this.first.next) { return; @@ -74769,8 +74874,6 @@ var LinkedList = function () { return LinkedList; }(); -; - exports.NodeStructure = NodeStructure; exports.default = LinkedList; @@ -74785,7 +74888,7 @@ exports.__esModule = 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 _arrayMapper = __webpack_require__(51); +var _arrayMapper = __webpack_require__(55); var _arrayMapper2 = _interopRequireDefault(_arrayMapper); @@ -75212,9 +75315,9 @@ var Comments = function (_BasePlugin) { var editorValue = this.editor.getValue(); var comment = ''; - if (value != null) { + if (value !== null && value !== void 0) { comment = value; - } else if (editorValue != null) { + } else if (editorValue !== null && editorValue !== void 0) { comment = editorValue; } @@ -75663,12 +75766,12 @@ var Comments = function (_BasePlugin) { }, { key: 'onContextMenuRemoveComment', value: function onContextMenuRemoveComment() { - this.contextMenuEvent = true; - var _hot$getSelectedRange = this.hot.getSelectedRangeLast(), from = _hot$getSelectedRange.from, to = _hot$getSelectedRange.to; + this.contextMenuEvent = true; + for (var i = from.row; i <= to.row; i++) { for (var j = from.col; j <= to.col; j++) { this.removeCommentAtCell(i, j, false); @@ -75687,12 +75790,12 @@ var Comments = function (_BasePlugin) { }, { key: 'onContextMenuMakeReadOnly', value: function onContextMenuMakeReadOnly() { - this.contextMenuEvent = true; - var _hot$getSelectedRange2 = this.hot.getSelectedRangeLast(), from = _hot$getSelectedRange2.from, to = _hot$getSelectedRange2.to; + this.contextMenuEvent = true; + for (var i = from.row; i <= to.row; i++) { for (var j = from.col; j <= to.col; j++) { var currentState = !!this.getCommentMeta(i, j, META_READONLY); @@ -75993,8 +76096,9 @@ var CommentEditor = function () { value: function setValue() { var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; - value = value || ''; - this.getInputElement().value = value; + var comment = value || ''; + + this.getInputElement().value = comment; } /** @@ -76040,19 +76144,17 @@ var CommentEditor = function () { }, { key: 'createEditor', value: function createEditor() { + var editor = document.createElement('div'); + var textArea = document.createElement('textarea'); var container = document.querySelector('.' + CommentEditor.CLASS_EDITOR_CONTAINER); - var editor = void 0; - var textArea = void 0; if (!container) { container = document.createElement('div'); (0, _element.addClass)(container, CommentEditor.CLASS_EDITOR_CONTAINER); document.body.appendChild(container); } - editor = document.createElement('div'); - (0, _element.addClass)(editor, CommentEditor.CLASS_EDITOR); - textArea = document.createElement('textarea'); + (0, _element.addClass)(editor, CommentEditor.CLASS_EDITOR); (0, _element.addClass)(textArea, CommentEditor.CLASS_INPUT); editor.appendChild(textArea); @@ -76182,13 +76284,13 @@ var DisplaySwitch = function () { this.wasLastActionShow = true; this.showDebounced(range); } - }, { - key: 'cancelHiding', - /** * Cancel hiding comment. */ + + }, { + key: 'cancelHiding', value: function cancelHiding() { this.wasLastActionShow = true; @@ -76285,7 +76387,7 @@ var _event = __webpack_require__(12); var _element = __webpack_require__(2); -var _predefinedItems = __webpack_require__(44); +var _predefinedItems = __webpack_require__(43); __webpack_require__(591); @@ -77585,12 +77687,12 @@ var Cursor = function () { var windowScrollTop = (0, _element.getWindowScrollTop)(); var windowScrollLeft = (0, _element.getWindowScrollLeft)(); - var top = void 0, - topRelative = void 0; - var left = void 0, - leftRelative = void 0; - var cellHeight = void 0, - cellWidth = void 0; + var top = void 0; + var topRelative = void 0; + var left = void 0; + var leftRelative = void 0; + var cellHeight = void 0; + var cellWidth = void 0; this.type = this.getSourceType(object); @@ -78231,7 +78333,6 @@ var CopyPaste = function (_BasePlugin) { event.preventDefault(); } - var inputArray = void 0; var pastedData = void 0; if (event && typeof event.clipboardData !== 'undefined') { @@ -78240,7 +78341,7 @@ var CopyPaste = function (_BasePlugin) { pastedData = window.clipboardData.getData('Text'); } - inputArray = _SheetClip2.default.parse(pastedData); + var inputArray = _SheetClip2.default.parse(pastedData); if (inputArray.length === 0) { return; @@ -78646,34 +78747,6 @@ function deactivateElement(wrapper) { wrapper.eventManager.clear(); } -/** - * Destroy the FocusableWrapper instance. - * - * @param {FocusableWrapper} wrapper - */ -function destroyElement(wrapper) { - if (!(wrapper instanceof FocusableWrapper)) { - return; - } - - if (refCounter > 0) { - refCounter -= 1; - } - - deactivateElement(wrapper); - - if (refCounter <= 0) { - refCounter = 0; - - // Detach secondary element from the DOM. - if (secondaryElement && secondaryElement.parentNode) { - secondaryElement.parentNode.removeChild(secondaryElement); - secondaryElement = null; - } - wrapper.mainElement = null; - } -} - var runLocalHooks = function runLocalHooks(eventName, subject) { return function (event) { return subject.runLocalHooks(eventName, event); @@ -78724,6 +78797,34 @@ function createOrGetSecondaryElement() { return element; } +/** + * Destroy the FocusableWrapper instance. + * + * @param {FocusableWrapper} wrapper + */ +function destroyElement(wrapper) { + if (!(wrapper instanceof FocusableWrapper)) { + return; + } + + if (refCounter > 0) { + refCounter -= 1; + } + + deactivateElement(wrapper); + + if (refCounter <= 0) { + refCounter = 0; + + // Detach secondary element from the DOM. + if (secondaryElement && secondaryElement.parentNode) { + secondaryElement.parentNode.removeChild(secondaryElement); + secondaryElement = null; + } + wrapper.mainElement = null; + } +} + exports.createElement = createElement; exports.deactivateElement = deactivateElement; exports.destroyElement = destroyElement; @@ -79358,11 +79459,13 @@ var CustomBorders = function (_BasePlugin) { var values = Object.values(border); return (0, _array.arrayReduce)(values, function (accumulator, value) { + var result = accumulator; + if (value.hide) { - accumulator += 1; + result += 1; } - return accumulator; + return result; }, 0); } @@ -80338,7 +80441,9 @@ var ManualColumnFreeze = function (_BasePlugin) { this.frozenColumnsBasePositions[settings.fixedColumnsLeft] = column; } - this.getMovePlugin().moveColumn(column, settings.fixedColumnsLeft++); + this.getMovePlugin().moveColumn(column, settings.fixedColumnsLeft); + + settings.fixedColumnsLeft += 1; } /** @@ -80364,7 +80469,7 @@ var ManualColumnFreeze = function (_BasePlugin) { var returnCol = this.getBestColumnReturnPosition(column); priv.moveByFreeze = true; - settings.fixedColumnsLeft--; + settings.fixedColumnsLeft -= 1; this.getMovePlugin().moveColumn(column, returnCol + 1); } @@ -80406,7 +80511,7 @@ var ManualColumnFreeze = function (_BasePlugin) { initialCol = movePlugin.columnsMapper.getValueByIndex(column); while (j !== null && j <= initialCol) { - i++; + i += 1; j = movePlugin.columnsMapper.getValueByIndex(i); } } else { @@ -80414,7 +80519,7 @@ var ManualColumnFreeze = function (_BasePlugin) { this.frozenColumnsBasePositions[column] = void 0; while (j !== null && j <= initialCol) { - i++; + i += 1; j = movePlugin.columnsMapper.getValueByIndex(i); } i = j; @@ -81066,7 +81171,7 @@ var ManualColumnMove = function (_BasePlugin) { if (priv.rootElementOffset + wtTable.holder.offsetWidth + scrollLeft < priv.target.eventPageX) { if (priv.coordsColumn < priv.countCols) { - priv.coordsColumn++; + priv.coordsColumn += 1; } } @@ -81461,13 +81566,15 @@ var ManualColumnMove = function (_BasePlugin) { }, { key: 'onModifyCol', value: function onModifyCol(column, source) { + var physicalColumn = column; + if (source !== this.pluginName) { // ugly fix for try to insert new, needed columns after pasting data - var columnInMapper = this.columnsMapper.getValueByIndex(column); - column = columnInMapper === null ? column : columnInMapper; + var columnInMapper = this.columnsMapper.getValueByIndex(physicalColumn); + physicalColumn = columnInMapper === null ? physicalColumn : columnInMapper; } - return column; + return physicalColumn; } /** @@ -81533,7 +81640,7 @@ exports.__esModule = 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 _arrayMapper = __webpack_require__(51); +var _arrayMapper = __webpack_require__(55); var _arrayMapper2 = _interopRequireDefault(_arrayMapper); @@ -82224,7 +82331,7 @@ var ManualColumnResize = function (_BasePlugin) { this.hot._registerTimeout(this.autoresizeTimeout); } - this.dblclick++; + this.dblclick += 1; this.startX = (0, _event.pageX)(event); this.newSize = this.startWidth; @@ -82345,17 +82452,17 @@ var ManualColumnResize = function (_BasePlugin) { }, { key: 'setManualSize', value: function setManualSize(column, width) { - width = Math.max(width, 20); + var newWidth = Math.max(width, 20); /** * We need to run col through modifyCol hook, in case the order of displayed columns is different than the order * in data source. For instance, this order can be modified by manualColumnMove plugin. */ - column = this.hot.runHooks('modifyCol', column); + var physicalColumn = this.hot.runHooks('modifyCol', column); - this.manualColumnWidths[column] = width; + this.manualColumnWidths[physicalColumn] = newWidth; - return width; + return newWidth; } /** @@ -82367,9 +82474,9 @@ var ManualColumnResize = function (_BasePlugin) { }, { key: 'clearManualSize', value: function clearManualSize(column) { - column = this.hot.runHooks('modifyCol', column); + var physicalColumn = this.hot.runHooks('modifyCol', column); - this.manualColumnWidths[column] = void 0; + this.manualColumnWidths[physicalColumn] = void 0; } /** @@ -82384,15 +82491,18 @@ var ManualColumnResize = function (_BasePlugin) { }, { key: 'onModifyColWidth', value: function onModifyColWidth(width, column) { + var newWidth = width; + if (this.enabled) { - column = this.hot.runHooks('modifyCol', column); + var physicalColumn = this.hot.runHooks('modifyCol', column); + var columnWidth = this.manualColumnWidths[physicalColumn]; - if (this.hot.getSettings().manualColumnResize && this.manualColumnWidths[column]) { - return this.manualColumnWidths[column]; + if (this.hot.getSettings().manualColumnResize && columnWidth) { + newWidth = columnWidth; } } - return width; + return newWidth; } /** @@ -83315,12 +83425,14 @@ var ManualRowMove = function (_BasePlugin) { }, { key: 'onModifyRow', value: function onModifyRow(row, source) { + var physicalRow = row; + if (source !== this.pluginName) { - var rowInMapper = this.rowsMapper.getValueByIndex(row); - row = rowInMapper === null ? row : rowInMapper; + var rowInMapper = this.rowsMapper.getValueByIndex(physicalRow); + physicalRow = rowInMapper === null ? physicalRow : rowInMapper; } - return row; + return physicalRow; } /** @@ -83387,7 +83499,7 @@ exports.__esModule = 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 _arrayMapper = __webpack_require__(51); +var _arrayMapper = __webpack_require__(55); var _arrayMapper2 = _interopRequireDefault(_arrayMapper); @@ -84048,15 +84160,15 @@ var ManualRowResize = function (_BasePlugin) { this.setupGuidePosition(); this.pressed = this.hot; - if (this.autoresizeTimeout == null) { + if (this.autoresizeTimeout === null) { this.autoresizeTimeout = setTimeout(function () { return _this5.afterMouseDownTimeout(); }, 500); this.hot._registerTimeout(this.autoresizeTimeout); } - this.dblclick++; + this.dblclick += 1; this.startY = (0, _event.pageY)(event); this.newSize = this.startHeight; } @@ -84177,8 +84289,9 @@ var ManualRowResize = function (_BasePlugin) { }, { key: 'setManualSize', value: function setManualSize(row, height) { - row = this.hot.runHooks('modifyRow', row); - this.manualRowHeights[row] = height; + var physicalRow = this.hot.runHooks('modifyRow', row); + + this.manualRowHeights[physicalRow] = height; return height; } @@ -84200,10 +84313,8 @@ var ManualRowResize = function (_BasePlugin) { if (this.enabled) { var autoRowSizePlugin = this.hot.getPlugin('autoRowSize'); var autoRowHeightResult = autoRowSizePlugin ? autoRowSizePlugin.heights[row] : null; - - row = this.hot.runHooks('modifyRow', row); - - var manualRowHeight = this.manualRowHeights[row]; + var physicalRow = this.hot.runHooks('modifyRow', row); + var manualRowHeight = this.manualRowHeights[physicalRow]; if (manualRowHeight !== void 0 && (manualRowHeight === autoRowHeightResult || manualRowHeight > (height || 0))) { return manualRowHeight; @@ -85263,10 +85374,12 @@ var MergeCells = function (_BasePlugin) { value: function onModifyAutofillRange(drag, select) { this.autofillCalculations.correctSelectionAreaSize(select); var dragDirection = this.autofillCalculations.getDirection(select, drag); + var dragArea = drag; - if (this.autofillCalculations.dragAreaOverlapsCollections(select, drag, dragDirection)) { - drag = select; - return drag; + if (this.autofillCalculations.dragAreaOverlapsCollections(select, dragArea, dragDirection)) { + dragArea = select; + + return dragArea; } var mergedCellsWithinSelectionArea = this.mergedCellsCollection.getWithinRange({ @@ -85275,12 +85388,12 @@ var MergeCells = function (_BasePlugin) { }); if (!mergedCellsWithinSelectionArea) { - return drag; + return dragArea; } - drag = this.autofillCalculations.snapDragArea(select, drag, dragDirection, mergedCellsWithinSelectionArea); + dragArea = this.autofillCalculations.snapDragArea(select, dragArea, dragDirection, mergedCellsWithinSelectionArea); - return drag; + return dragArea; } /** @@ -85605,11 +85718,12 @@ var MergedCellsCollection = function () { var mergedCells = this.mergedCells; var foundMergedCells = []; + var testedRange = range; - if (!range.includesRange) { - var from = new _index.CellCoords(range.from.row, range.from.col); - var to = new _index.CellCoords(range.to.row, range.to.col); - range = new _index.CellRange(from, from, to); + if (!testedRange.includesRange) { + var from = new _index.CellCoords(testedRange.from.row, testedRange.from.col); + var to = new _index.CellCoords(testedRange.to.row, testedRange.to.col); + testedRange = new _index.CellRange(from, from, to); } (0, _array.arrayEach)(mergedCells, function (mergedCell) { @@ -85618,10 +85732,10 @@ var MergedCellsCollection = function () { var mergedCellRange = new _index.CellRange(mergedCellTopLeft, mergedCellTopLeft, mergedCellBottomRight); if (countPartials) { - if (range.overlaps(mergedCellRange)) { + if (testedRange.overlaps(mergedCellRange)) { foundMergedCells.push(mergedCell); } - } else if (range.includesRange(mergedCellRange)) { + } else if (testedRange.includesRange(mergedCellRange)) { foundMergedCells.push(mergedCell); } }); @@ -86835,21 +86949,20 @@ var MultipleSelectionHandles = function (_BasePlugin) { }); this.eventManager.addEventListener(this.hot.rootElement, 'touchmove', function (event) { - var scrollTop = (0, _element.getWindowScrollTop)(), - scrollLeft = (0, _element.getWindowScrollLeft)(), - endTarget = void 0, - targetCoords = void 0, - selectedRange = void 0, - rangeWidth = void 0, - rangeHeight = void 0, - rangeDirection = void 0, - newRangeCoords = void 0; + var scrollTop = (0, _element.getWindowScrollTop)(); + var scrollLeft = (0, _element.getWindowScrollLeft)(); + var targetCoords = void 0; + var selectedRange = void 0; + var rangeWidth = void 0; + var rangeHeight = void 0; + var rangeDirection = void 0; + var newRangeCoords = void 0; if (_this.dragged.length === 0) { return; } - endTarget = document.elementFromPoint(event.touches[0].screenX - scrollLeft, event.touches[0].screenY - scrollTop); + var endTarget = document.elementFromPoint(event.touches[0].screenX - scrollLeft, event.touches[0].screenY - scrollTop); if (!endTarget || endTarget === _this.lastSetCell) { return; @@ -88132,7 +88245,7 @@ function cleanPatches(patches) { * If observeChanges uses native Object.observe method, then it produces patches for length property. Filter them. * If path can't be parsed. Filter it. */ - patches = (0, _array.arrayFilter)(patches, function (patch) { + var cleanedPatches = (0, _array.arrayFilter)(patches, function (patch) { if (/[/]length/ig.test(patch.path)) { return false; } @@ -88145,7 +88258,7 @@ function cleanPatches(patches) { /** * Extend patches with changed cells coords */ - patches = (0, _array.arrayMap)(patches, function (patch) { + cleanedPatches = (0, _array.arrayMap)(cleanedPatches, function (patch) { var coords = parsePath(patch.path); patch.row = coords.row; @@ -88157,7 +88270,7 @@ function cleanPatches(patches) { * Removing or adding column will produce one patch for each table row. * Leaves only one patch for each column add/remove operation. */ - patches = (0, _array.arrayFilter)(patches, function (patch) { + cleanedPatches = (0, _array.arrayFilter)(cleanedPatches, function (patch) { if (['add', 'remove'].indexOf(patch.op) !== -1 && !isNaN(patch.col)) { if (newOrRemovedColumns.indexOf(patch.col) !== -1) { return false; @@ -88169,7 +88282,7 @@ function cleanPatches(patches) { }); newOrRemovedColumns.length = 0; - return patches; + return cleanedPatches; } /** @@ -88429,15 +88542,15 @@ var Search = function (_BasePlugin) { return queryResult; } - }, { - key: 'getCallback', - /** * Gets the callback function. * * @returns {Function} Return the callback function. */ + + }, { + key: 'getCallback', value: function getCallback() { return this.callback; } @@ -88606,7 +88719,7 @@ var _base2 = _interopRequireDefault(_base); var _plugins = __webpack_require__(5); -var _feature = __webpack_require__(42); +var _feature = __webpack_require__(41); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -88922,12 +89035,10 @@ function UndoRedo(instance) { } var originalData = plugin.instance.getSourceDataArray(); + var rowIndex = (originalData.length + index) % originalData.length; + var removedData = (0, _object.deepClone)(originalData.slice(rowIndex, rowIndex + amount)); - index = (originalData.length + index) % originalData.length; - - var removedData = (0, _object.deepClone)(originalData.slice(index, index + amount)); - - plugin.done(new UndoRedo.RemoveRowAction(index, removedData)); + plugin.done(new UndoRedo.RemoveRowAction(rowIndex, removedData)); }); instance.addHook('afterCreateCol', function (index, amount, source) { @@ -88944,9 +89055,7 @@ function UndoRedo(instance) { } var originalData = plugin.instance.getSourceDataArray(); - - index = (plugin.instance.countCols() + index) % plugin.instance.countCols(); - + var columnIndex = (plugin.instance.countCols() + index) % plugin.instance.countCols(); var removedData = []; var headers = []; var indexes = []; @@ -88955,26 +89064,25 @@ function UndoRedo(instance) { var column = []; var origRow = originalData[i]; - (0, _number.rangeEach)(index, index + (amount - 1), function (j) { + (0, _number.rangeEach)(columnIndex, columnIndex + (amount - 1), function (j) { column.push(origRow[instance.runHooks('modifyCol', j)]); }); removedData.push(column); }); (0, _number.rangeEach)(amount - 1, function (i) { - indexes.push(instance.runHooks('modifyCol', index + i)); + indexes.push(instance.runHooks('modifyCol', columnIndex + i)); }); if (Array.isArray(instance.getSettings().colHeaders)) { (0, _number.rangeEach)(amount - 1, function (i) { - headers.push(instance.getSettings().colHeaders[instance.runHooks('modifyCol', index + i)] || null); + headers.push(instance.getSettings().colHeaders[instance.runHooks('modifyCol', columnIndex + i)] || null); }); } var manualColumnMovePlugin = plugin.instance.getPlugin('manualColumnMove'); - var columnsMap = manualColumnMovePlugin.isEnabled() ? manualColumnMovePlugin.columnsMapper.__arrayMap : []; - var action = new UndoRedo.RemoveColumnAction(index, indexes, removedData, headers, columnsMap); + var action = new UndoRedo.RemoveColumnAction(columnIndex, indexes, removedData, headers, columnsMap); plugin.done(action); }); @@ -89131,9 +89239,9 @@ UndoRedo.ChangeAction = function (changes) { (0, _object.inherit)(UndoRedo.ChangeAction, UndoRedo.Action); UndoRedo.ChangeAction.prototype.undo = function (instance, undoneCallback) { - var data = (0, _object.deepClone)(this.changes), - emptyRowsAtTheEnd = instance.countEmptyRows(true), - emptyColsAtTheEnd = instance.countEmptyCols(true); + var data = (0, _object.deepClone)(this.changes); + var emptyRowsAtTheEnd = instance.countEmptyRows(true); + var emptyColsAtTheEnd = instance.countEmptyCols(true); for (var i = 0, len = data.length; i < len; i++) { data[i].splice(3, 1); @@ -89181,8 +89289,8 @@ UndoRedo.CreateRowAction = function (index, amount) { (0, _object.inherit)(UndoRedo.CreateRowAction, UndoRedo.Action); UndoRedo.CreateRowAction.prototype.undo = function (instance, undoneCallback) { - var rowCount = instance.countRows(), - minSpareRows = instance.getSettings().minSpareRows; + var rowCount = instance.countRows(); + var minSpareRows = instance.getSettings().minSpareRows; if (this.index >= rowCount && this.index - minSpareRows < rowCount) { this.index -= minSpareRows; // work around the situation where the needed row was removed due to an 'undo' of a made change @@ -89733,8 +89841,6 @@ var _base = __webpack_require__(7); var _base2 = _interopRequireDefault(_base); -var _array = __webpack_require__(0); - var _number = __webpack_require__(4); var _plugins = __webpack_require__(5); @@ -89839,8 +89945,8 @@ var BindRowsWithHeaders = function (_BasePlugin) { this.addHook('beforeRemoveRow', function (index, amount) { return _this2.onBeforeRemoveRow(index, amount); }); - this.addHook('afterRemoveRow', function (index, amount) { - return _this2.onAfterRemoveRow(index, amount); + this.addHook('afterRemoveRow', function () { + return _this2.onAfterRemoveRow(); }); this.addHook('afterLoadData', function (firstRun) { return _this2.onAfterLoadData(firstRun); @@ -89930,13 +90036,11 @@ var BindRowsWithHeaders = function (_BasePlugin) { * On after remove row listener. * * @private - * @param {Number} index Row index. - * @param {Number} amount Defines how many rows removed. */ }, { key: 'onAfterRemoveRow', - value: function onAfterRemoveRow(index, amount) { + value: function onAfterRemoveRow() { this.bindStrategy.removeRow(this.removedRows); } @@ -89985,10 +90089,6 @@ exports.__esModule = 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 _arrayMapper = __webpack_require__(51); - -var _object = __webpack_require__(1); - var _number = __webpack_require__(4); var _string = __webpack_require__(32); @@ -90072,11 +90172,9 @@ var BindStrategy = function () { }, { key: 'createRow', value: function createRow() { - for (var _len = arguments.length, params = Array(_len), _key = 0; _key < _len; _key++) { - params[_key] = arguments[_key]; - } + var _strategy; - this.strategy.createRow.apply(this.strategy, params); + (_strategy = this.strategy).createRow.apply(_strategy, arguments); } /** @@ -90088,11 +90186,9 @@ var BindStrategy = function () { }, { key: 'removeRow', value: function removeRow() { - for (var _len2 = arguments.length, params = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - params[_key2] = arguments[_key2]; - } + var _strategy2; - this.strategy.removeRow.apply(this.strategy, params); + (_strategy2 = this.strategy).removeRow.apply(_strategy2, arguments); } /** @@ -90104,11 +90200,9 @@ var BindStrategy = function () { }, { key: 'translate', value: function translate() { - for (var _len3 = arguments.length, params = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { - params[_key3] = arguments[_key3]; - } + var _strategy3; - return this.strategy.getValueByIndex.apply(this.strategy, params); + return (_strategy3 = this.strategy).getValueByIndex.apply(_strategy3, arguments); } /** @@ -90174,7 +90268,7 @@ exports.__esModule = 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 _arrayMapper = __webpack_require__(51); +var _arrayMapper = __webpack_require__(55); var _arrayMapper2 = _interopRequireDefault(_arrayMapper); @@ -90260,7 +90354,7 @@ exports.__esModule = 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 _arrayMapper = __webpack_require__(51); +var _arrayMapper = __webpack_require__(55); var _arrayMapper2 = _interopRequireDefault(_arrayMapper); @@ -90783,11 +90877,8 @@ var CollapsibleColumns = function (_BasePlugin) { (0, _array.arrayEach)(nestedHeadersColspanArray, function (headerLevel, i) { (0, _array.arrayEach)(headerLevel, function (header, j) { if (header.colspan > 1) { - i = parseInt(i, 10); - j = parseInt(j, 10); - - var row = _this4.nestedHeadersPlugin.levelToRowCoords(i); - var col = j; + var row = _this4.nestedHeadersPlugin.levelToRowCoords(parseInt(i, 10)); + var col = parseInt(j, 10); _this4.markSectionAs(action === 'collapse' ? 'collapsed' : 'expanded', row, col, true); _this4.toggleCollapsibleSection({ @@ -90800,13 +90891,13 @@ var CollapsibleColumns = function (_BasePlugin) { } else { (0, _object.objectEach)(this.buttonEnabledList, function (headerRow, i) { (0, _object.objectEach)(headerRow, function (header, j) { - i = parseInt(i, 10); - j = parseInt(j, 10); + var rowIndex = parseInt(i, 10); + var columnIndex = parseInt(j, 10); - _this4.markSectionAs(action === 'collapse' ? 'collapsed' : 'expanded', i, j, true); + _this4.markSectionAs(action === 'collapse' ? 'collapsed' : 'expanded', rowIndex, columnIndex, true); _this4.toggleCollapsibleSection({ - row: i, - col: j + row: rowIndex, + col: columnIndex }, action); }); }); @@ -90889,6 +90980,7 @@ var CollapsibleColumns = function (_BasePlugin) { }); this.hot.render(); + this.hot.view.wt.wtOverlays.adjustElementsSize(true); } /** @@ -91015,8 +91107,6 @@ var _base2 = _interopRequireDefault(_base); var _object = __webpack_require__(1); -var _array = __webpack_require__(0); - var _plugins = __webpack_require__(5); var _endpoints5 = __webpack_require__(645); @@ -91038,7 +91128,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function" * @description * Allows making pre-defined calculations on the cell values and display the results within Handsontable. * [See the demo for more information](https://docs.handsontable.com/pro/demo-summary-calculations.html). - * + *s * @example * const container = document.getElementById('example'); * const hot = new Handsontable(container, { @@ -91237,13 +91327,13 @@ var ColumnSummary = function (_BasePlugin) { }, { key: 'calculateSum', value: function calculateSum(endpoint) { + var _this3 = this; + var sum = 0; - for (var r in endpoint.ranges) { - if ((0, _object.hasOwnProperty)(endpoint.ranges, r)) { - sum += this.getPartialSum(endpoint.ranges[r], endpoint.sourceColumn); - } - } + (0, _object.objectEach)(endpoint.ranges, function (range) { + sum += _this3.getPartialSum(range, endpoint.sourceColumn); + }); return sum; } @@ -91267,13 +91357,13 @@ var ColumnSummary = function (_BasePlugin) { do { cellValue = this.getCellValue(i, col) || 0; - var decimalPlaces = ((cellValue + '').split('.')[1] || []).length || 1; + var decimalPlaces = (('' + cellValue).split('.')[1] || []).length || 1; if (decimalPlaces > biggestDecimalPlacesCount) { biggestDecimalPlacesCount = decimalPlaces; } sum += cellValue || 0; - i--; + i -= 1; } while (i >= rowRange[0]); // Workaround for e.g. 802.2 + 1.1 = 803.3000000000001 @@ -91292,30 +91382,30 @@ var ColumnSummary = function (_BasePlugin) { }, { key: 'calculateMinMax', value: function calculateMinMax(endpoint, type) { + var _this4 = this; + var result = null; - for (var r in endpoint.ranges) { - if ((0, _object.hasOwnProperty)(endpoint.ranges, r)) { - var partialResult = this.getPartialMinMax(endpoint.ranges[r], endpoint.sourceColumn, type); + (0, _object.objectEach)(endpoint.ranges, function (range) { + var partialResult = _this4.getPartialMinMax(range, endpoint.sourceColumn, type); - if (result === null && partialResult !== null) { - result = partialResult; - } + if (result === null && partialResult !== null) { + result = partialResult; + } - if (partialResult !== null) { - switch (type) { - case 'min': - result = Math.min(result, partialResult); - break; - case 'max': - result = Math.max(result, partialResult); - break; - default: - break; - } + if (partialResult !== null) { + switch (type) { + case 'min': + result = Math.min(result, partialResult); + break; + case 'max': + result = Math.max(result, partialResult); + break; + default: + break; } } - } + }); return result === null ? 'Not enough data' : result; } @@ -91355,7 +91445,7 @@ var ColumnSummary = function (_BasePlugin) { } } - i--; + i -= 1; } while (i >= rowRange[0]); return result; @@ -91381,10 +91471,10 @@ var ColumnSummary = function (_BasePlugin) { cellValue = this.getCellValue(i, col); if (!cellValue) { - counter++; + counter += 1; } - i--; + i -= 1; } while (i >= rowRange[0]); return counter; @@ -91401,18 +91491,18 @@ var ColumnSummary = function (_BasePlugin) { }, { key: 'countEntries', value: function countEntries(endpoint) { + var _this5 = this; + var result = 0; var ranges = endpoint.ranges; - for (var r in ranges) { - if ((0, _object.hasOwnProperty)(ranges, r)) { - var partial = ranges[r][1] === void 0 ? 1 : ranges[r][1] - ranges[r][0] + 1; - var emptyCount = this.countEmpty(ranges[r], endpoint.sourceColumn); + (0, _object.objectEach)(ranges, function (range) { + var partial = range[1] === void 0 ? 1 : range[1] - range[0] + 1; + var emptyCount = _this5.countEmpty(range, endpoint.sourceColumn); - result += partial; - result -= emptyCount; - } - } + result += partial; + result -= emptyCount; + }); return result; } @@ -91507,12 +91597,11 @@ var ColumnSummary = function (_BasePlugin) { * * @private * @param {Array} rows Array of logical rows to be moved. - * @param {Number} target Index of the destination row. */ }, { key: 'onBeforeRowMove', - value: function onBeforeRowMove(rows, target) { + value: function onBeforeRowMove(rows) { this.endpoints.resetSetupBeforeStructureAlteration('move_row', rows[0], rows.length, rows, this.pluginName); } @@ -91555,7 +91644,7 @@ var _array = __webpack_require__(0); var _console = __webpack_require__(26); -var _recordTranslator = __webpack_require__(55); +var _recordTranslator = __webpack_require__(54); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -91684,18 +91773,19 @@ var Endpoints = function () { var _this = this; var endpointsArray = []; + var settingsArray = settings; - if (!settings && typeof this.settings === 'function') { + if (!settingsArray && typeof this.settings === 'function') { this.settingsType = 'function'; return; } - if (!settings) { - settings = this.settings; + if (!settingsArray) { + settingsArray = this.settings; } - (0, _array.arrayEach)(settings, function (val) { + (0, _array.arrayEach)(settingsArray, function (val) { var newEndpoint = {}; _this.assignSetting(val, newEndpoint, 'ranges', [[0, _this.hot.countRows() - 1]]); @@ -91759,13 +91849,11 @@ var Endpoints = function () { * @param {String} action Type of the action performed. * @param {Number} index Row/column index. * @param {Number} number Number of rows/columns added/removed. - * @param {Array} [logicRows] Array of the logical indexes. - * @param {String} [source] Source of change. */ }, { key: 'resetSetupBeforeStructureAlteration', - value: function resetSetupBeforeStructureAlteration(action, index, number, logicRows, source) { + value: function resetSetupBeforeStructureAlteration(action, index, number) { if (this.settingsType !== 'function') { return; } @@ -91773,7 +91861,7 @@ var Endpoints = function () { var type = action.indexOf('row') > -1 ? 'row' : 'col'; var endpoints = this.getAllEndpoints(); - (0, _array.arrayEach)(endpoints, function (val, key, obj) { + (0, _array.arrayEach)(endpoints, function (val) { if (type === 'row' && val.destinationRow >= index) { if (action === 'insert_row') { val.alterRowOffset = number; @@ -91820,7 +91908,7 @@ var Endpoints = function () { // and it needs to be run to properly calculate the endpoint value. var beforeRenderCallback = function beforeRenderCallback() { _this2.hot.removeHook('beforeRender', beforeRenderCallback); - return _this2.refreshAllEndpoints(true); + return _this2.refreshAllEndpoints(); }; this.hot.addHookOnce('beforeRender', beforeRenderCallback); return; @@ -91832,7 +91920,7 @@ var Endpoints = function () { var rowMoving = action.indexOf('move_row') === 0; var placeOfAlteration = index; - (0, _array.arrayEach)(endpoints, function (val, key, obj) { + (0, _array.arrayEach)(endpoints, function (val) { if (type === 'row' && val.destinationRow >= placeOfAlteration) { val.alterRowOffset = multiplier * number; } @@ -91845,19 +91933,19 @@ var Endpoints = function () { this.resetAllEndpoints(endpoints, !rowMoving); if (rowMoving) { - (0, _array.arrayEach)(endpoints, function (endpoint, key, obj) { + (0, _array.arrayEach)(endpoints, function (endpoint) { _this2.extendEndpointRanges(endpoint, placeOfAlteration, logicRows[0], logicRows.length); _this2.recreatePhysicalRanges(endpoint); _this2.clearOffsetInformation(endpoint); }); } else { - (0, _array.arrayEach)(endpoints, function (endpoint, key, obj) { + (0, _array.arrayEach)(endpoints, function (endpoint) { _this2.shiftEndpointCoordinates(endpoint, placeOfAlteration); }); } if (forceRefresh) { - this.refreshAllEndpoints(true); + this.refreshAllEndpoints(); } } @@ -91888,7 +91976,7 @@ var Endpoints = function () { }, { key: 'extendEndpointRanges', value: function extendEndpointRanges(endpoint, placeOfAlteration, previousPosition, offset) { - (0, _array.arrayEach)(endpoint.ranges, function (range, i) { + (0, _array.arrayEach)(endpoint.ranges, function (range) { // is a range, not a single row if (range[1]) { @@ -91902,8 +91990,8 @@ var Endpoints = function () { range[1] -= offset; if (placeOfAlteration <= range[0]) { - range[0]++; - range[1]++; + range[0] += 1; + range[1] += 1; } } } @@ -91975,7 +92063,7 @@ var Endpoints = function () { if (endpoint.alterRowOffset && endpoint.alterRowOffset !== 0) { endpoint.destinationRow += endpoint.alterRowOffset || 0; - (0, _array.arrayEach)(endpoint.ranges, function (element, i) { + (0, _array.arrayEach)(endpoint.ranges, function (element) { (0, _array.arrayEach)(element, function (subElement, j) { if (subElement >= offsetStartIndex) { element[j] += endpoint.alterRowOffset || 0; @@ -92002,13 +92090,14 @@ var Endpoints = function () { var useOffset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + var endpointsArray = endpoints; this.cellsToSetCache = []; - if (!endpoints) { - endpoints = this.getAllEndpoints(); + if (!endpointsArray) { + endpointsArray = this.getAllEndpoints(); } - (0, _array.arrayEach)(endpoints, function (value) { + (0, _array.arrayEach)(endpointsArray, function (value) { _this4.resetEndpointValue(value, useOffset); }); @@ -92019,13 +92108,11 @@ var Endpoints = function () { /** * Calculate and refresh all defined endpoints. - * - * @param {Boolean} init `true` if it's the initial call. */ }, { key: 'refreshAllEndpoints', - value: function refreshAllEndpoints(init) { + value: function refreshAllEndpoints() { var _this5 = this; this.cellsToSetCache = []; @@ -92056,14 +92143,14 @@ var Endpoints = function () { var needToRefresh = []; this.cellsToSetCache = []; - (0, _array.arrayEach)(changes, function (value, key, changes) { + (0, _array.arrayEach)(changes, function (value, key, changesObj) { // if nothing changed, dont update anything - if ((value[2] || '') + '' === value[3] + '') { + if ('' + (value[2] || '') === '' + value[3]) { return; } - (0, _array.arrayEach)(_this6.getAllEndpoints(), function (value, j) { - if (_this6.hot.propToCol(changes[key][1]) === value.sourceColumn && needToRefresh.indexOf(j) === -1) { + (0, _array.arrayEach)(_this6.getAllEndpoints(), function (endpoint, j) { + if (_this6.hot.propToCol(changesObj[key][1]) === endpoint.sourceColumn && needToRefresh.indexOf(j) === -1) { needToRefresh.push(j); } }); @@ -92231,11 +92318,9 @@ var _base2 = _interopRequireDefault(_base); var _array = __webpack_require__(0); -var _object = __webpack_require__(1); - -var _commandExecutor = __webpack_require__(463); +var _commandExecutor2 = __webpack_require__(463); -var _commandExecutor2 = _interopRequireDefault(_commandExecutor); +var _commandExecutor3 = _interopRequireDefault(_commandExecutor2); var _eventManager = __webpack_require__(9); @@ -92259,7 +92344,7 @@ var _pluginHooks2 = _interopRequireDefault(_pluginHooks); var _event = __webpack_require__(12); -var _predefinedItems = __webpack_require__(44); +var _predefinedItems = __webpack_require__(43); __webpack_require__(647); @@ -92351,7 +92436,7 @@ var DropdownMenu = function (_BasePlugin) { * @private * @type {CommandExecutor} */ - _this.commandExecutor = new _commandExecutor2.default(_this.hot); + _this.commandExecutor = new _commandExecutor3.default(_this.hot); /** * Instance of {@link ItemsFactory}. * @@ -92443,11 +92528,13 @@ var DropdownMenu = function (_BasePlugin) { return _this2.onMenuAfterClose(); }); _this2.menu.addLocalHook('executeCommand', function () { + var _executeCommand; + for (var _len = arguments.length, params = Array(_len), _key = 0; _key < _len; _key++) { params[_key] = arguments[_key]; } - return _this2.executeCommand.apply(_this2, params); + return (_executeCommand = _this2.executeCommand).call.apply(_executeCommand, [_this2].concat(params)); }); // Register all commands. Predefined and added by user or by plugins @@ -92572,12 +92659,14 @@ var DropdownMenu = function (_BasePlugin) { }, { key: 'executeCommand', - value: function executeCommand() { - for (var _len2 = arguments.length, params = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - params[_key2] = arguments[_key2]; + value: function executeCommand(commandName) { + var _commandExecutor; + + for (var _len2 = arguments.length, params = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + params[_key2 - 1] = arguments[_key2]; } - this.commandExecutor.execute.apply(this.commandExecutor, params); + (_commandExecutor = this.commandExecutor).execute.apply(_commandExecutor, [commandName].concat(params)); } /** @@ -92763,8 +92852,6 @@ var _base = __webpack_require__(7); var _base2 = _interopRequireDefault(_base); -var _object = __webpack_require__(1); - var _plugins = __webpack_require__(5); var _dataProvider = __webpack_require__(649); @@ -92988,10 +93075,6 @@ var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = [ 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 _array = __webpack_require__(0); - -var _object = __webpack_require__(1); - var _number = __webpack_require__(4); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -93317,8 +93400,8 @@ var Csv = function (_BaseType) { if (hasRowHeaders) { result += _this2._escapeCell(rowHeaders[index]) + options.columnDelimiter; } - result += value.map(function (value) { - return _this2._escapeCell(value); + result += value.map(function (cellValue) { + return _this2._escapeCell(cellValue); }).join(options.columnDelimiter); }); @@ -93338,15 +93421,15 @@ var Csv = function (_BaseType) { value: function _escapeCell(value) { var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - value = (0, _mixed.stringify)(value); + var escapedValue = (0, _mixed.stringify)(value); - if (value !== '' && (force || value.indexOf(CHAR_CARRIAGE_RETURN) >= 0 || value.indexOf(CHAR_DOUBLE_QUOTES) >= 0 || value.indexOf(CHAR_LINE_FEED) >= 0 || value.indexOf(this.options.columnDelimiter) >= 0)) { + if (escapedValue !== '' && (force || escapedValue.indexOf(CHAR_CARRIAGE_RETURN) >= 0 || escapedValue.indexOf(CHAR_DOUBLE_QUOTES) >= 0 || escapedValue.indexOf(CHAR_LINE_FEED) >= 0 || escapedValue.indexOf(this.options.columnDelimiter) >= 0)) { - value = value.replace(new RegExp('"', 'g'), '""'); - value = '"' + value + '"'; + escapedValue = escapedValue.replace(new RegExp('"', 'g'), '""'); + escapedValue = '"' + escapedValue + '"'; } - return value; + return escapedValue; } }], [{ key: 'DEFAULT_OPTIONS', @@ -93505,7 +93588,7 @@ var _element = __webpack_require__(2); var _plugins = __webpack_require__(5); -var _predefinedItems = __webpack_require__(44); +var _predefinedItems = __webpack_require__(43); var _constants = __webpack_require__(3); @@ -93757,7 +93840,7 @@ var Filters = function (_BasePlugin) { this.addHook('afterDropdownMenuHide', function () { return _this2.onAfterDropdownMenuHide(); }); - this.addHook('afterChange', function (changes, source) { + this.addHook('afterChange', function (changes) { return _this2.onAfterChange(changes); }); @@ -94639,6 +94722,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 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; } @@ -94875,9 +94960,11 @@ var ConditionComponent = function (_BaseComponent) { }, { key: 'reset', value: function reset() { + var _hot; + var lastSelectedColumn = this.hot.getPlugin('filters').getSelectedColumn(); var visualIndex = lastSelectedColumn && lastSelectedColumn.visualIndex; - var columnType = this.hot.getDataType.apply(this.hot, this.hot.getSelectedLast() || [0, visualIndex]); + var columnType = (_hot = this.hot).getDataType.apply(_hot, _toConsumableArray(this.hot.getSelectedLast() || [0, visualIndex])); var items = (0, _constants3.default)(columnType); (0, _array.arrayEach)(this.getInputElements(), function (element) { @@ -95125,16 +95212,17 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; var CONDITION_NAME = exports.CONDITION_NAME = 'gt'; -function condition(dataRow) { - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : inputValues, - _ref2 = _slicedToArray(_ref, 1), +function condition(dataRow, _ref) { + var _ref2 = _slicedToArray(_ref, 1), value = _ref2[0]; + var conditionValue = value; + if (dataRow.meta.type === 'numeric') { - value = parseFloat(value, 10); + conditionValue = parseFloat(conditionValue, 10); } - return dataRow.value > value; + return dataRow.value > conditionValue; } (0, _conditionRegisterer.registerCondition)(CONDITION_NAME, condition, { @@ -95167,16 +95255,17 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; var CONDITION_NAME = exports.CONDITION_NAME = 'gte'; -function condition(dataRow) { - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : inputValues, - _ref2 = _slicedToArray(_ref, 1), +function condition(dataRow, _ref) { + var _ref2 = _slicedToArray(_ref, 1), value = _ref2[0]; + var conditionValue = value; + if (dataRow.meta.type === 'numeric') { - value = parseFloat(value, 10); + conditionValue = parseFloat(conditionValue, 10); } - return dataRow.value >= value; + return dataRow.value >= conditionValue; } (0, _conditionRegisterer.registerCondition)(CONDITION_NAME, condition, { @@ -95209,16 +95298,17 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; var CONDITION_NAME = exports.CONDITION_NAME = 'lt'; -function condition(dataRow) { - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : inputValues, - _ref2 = _slicedToArray(_ref, 1), +function condition(dataRow, _ref) { + var _ref2 = _slicedToArray(_ref, 1), value = _ref2[0]; + var conditionValue = value; + if (dataRow.meta.type === 'numeric') { - value = parseFloat(value, 10); + conditionValue = parseFloat(conditionValue, 10); } - return dataRow.value < value; + return dataRow.value < conditionValue; } (0, _conditionRegisterer.registerCondition)(CONDITION_NAME, condition, { @@ -95251,16 +95341,17 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; var CONDITION_NAME = exports.CONDITION_NAME = 'lte'; -function condition(dataRow) { - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : inputValues, - _ref2 = _slicedToArray(_ref, 1), +function condition(dataRow, _ref) { + var _ref2 = _slicedToArray(_ref, 1), value = _ref2[0]; + var conditionValue = value; + if (dataRow.meta.type === 'numeric') { - value = parseFloat(value, 10); + conditionValue = parseFloat(conditionValue, 10); } - return dataRow.value <= value; + return dataRow.value <= conditionValue; } (0, _conditionRegisterer.registerCondition)(CONDITION_NAME, condition, { @@ -95328,9 +95419,8 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; var CONDITION_NAME = exports.CONDITION_NAME = 'begins_with'; -function condition(dataRow) { - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : inputValues, - _ref2 = _slicedToArray(_ref, 1), +function condition(dataRow, _ref) { + var _ref2 = _slicedToArray(_ref, 1), value = _ref2[0]; return (0, _mixed.stringify)(dataRow.value).toLowerCase().startsWith((0, _mixed.stringify)(value)); @@ -95368,9 +95458,8 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; var CONDITION_NAME = exports.CONDITION_NAME = 'ends_with'; -function condition(dataRow) { - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : inputValues, - _ref2 = _slicedToArray(_ref, 1), +function condition(dataRow, _ref) { + var _ref2 = _slicedToArray(_ref, 1), value = _ref2[0]; return (0, _mixed.stringify)(dataRow.value).toLowerCase().endsWith((0, _mixed.stringify)(value)); @@ -95561,9 +95650,8 @@ var _utils = __webpack_require__(66); var CONDITION_NAME = exports.CONDITION_NAME = 'by_value'; -function condition(dataRow) { - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : inputValues, - _ref2 = _slicedToArray(_ref, 1), +function condition(dataRow, _ref) { + var _ref2 = _slicedToArray(_ref, 1), value = _ref2[0]; return value(dataRow.value); @@ -95572,9 +95660,8 @@ function condition(dataRow) { (0, _conditionRegisterer.registerCondition)(CONDITION_NAME, condition, { name: 'By value', inputsCount: 0, - inputValuesDecorator: function inputValuesDecorator() { - var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : inputValues, - _ref4 = _slicedToArray(_ref3, 1), + inputValuesDecorator: function inputValuesDecorator(_ref3) { + var _ref4 = _slicedToArray(_ref3, 1), data = _ref4[0]; return [(0, _utils.createArrayAssertion)(data)]; @@ -95594,14 +95681,8 @@ exports.__esModule = true; exports.CONDITION_NAME = undefined; exports.condition = condition; -var _constants = __webpack_require__(3); - -var C = _interopRequireWildcard(_constants); - var _conditionRegisterer = __webpack_require__(10); -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - var CONDITION_NAME = exports.CONDITION_NAME = 'true'; function condition() { @@ -95623,14 +95704,8 @@ exports.__esModule = true; exports.CONDITION_NAME = undefined; exports.condition = condition; -var _constants = __webpack_require__(3); - -var C = _interopRequireWildcard(_constants); - var _conditionRegisterer = __webpack_require__(10); -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - var CONDITION_NAME = exports.CONDITION_NAME = 'false'; function condition() { @@ -95666,7 +95741,7 @@ var _constants = __webpack_require__(3); var C = _interopRequireWildcard(_constants); -var _predefinedItems = __webpack_require__(44); +var _predefinedItems = __webpack_require__(43); var _base = __webpack_require__(68); @@ -95735,8 +95810,8 @@ var SelectUI = function (_BaseUI) { value: function registerHooks() { var _this2 = this; - this.addLocalHook('click', function (event) { - return _this2.onClick(event); + this.addLocalHook('click', function () { + return _this2.onClick(); }); } @@ -95906,12 +95981,11 @@ var SelectUI = function (_BaseUI) { * On element click listener. * * @private - * @param {Event} event DOM Event */ }, { key: 'onClick', - value: function onClick(event) { + value: function onClick() { this.openOptions(); } @@ -96034,7 +96108,7 @@ var OperatorsComponent = function (_BaseComponent) { hidden: function hidden() { return _this2.isHidden(); }, - renderer: function renderer(hot, wrapper, row, col, prop, value) { + renderer: function renderer(hot, wrapper) { (0, _element.addClass)(wrapper.parentNode, 'htFiltersMenuOperators'); (0, _array.arrayEach)(_this2.elements, function (ui) { @@ -96158,11 +96232,13 @@ var OperatorsComponent = function (_BaseComponent) { var operationId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _conjunction.OPERATION_ID; var column = arguments[1]; - if (operationId === _disjunctionWithExtraCondition.OPERATION_ID) { - operationId = _disjunction.OPERATION_ID; + var selectedOperationId = operationId; + + if (selectedOperationId === _disjunctionWithExtraCondition.OPERATION_ID) { + selectedOperationId = _disjunction.OPERATION_ID; } - this.setCachedState(column, operationId); + this.setCachedState(column, selectedOperationId); } /** @@ -96954,7 +97030,7 @@ var MultipleSelectUI = function (_BaseUI) { filteredItems = [].concat(_toConsumableArray(this.items)); } else { filteredItems = (0, _array.arrayFilter)(this.items, function (item) { - return (item.value + '').toLowerCase().indexOf(value) >= 0; + return ('' + item.value).toLowerCase().indexOf(value) >= 0; }); } this.itemsBox.loadData(filteredItems); @@ -97290,7 +97366,7 @@ var ActionBarComponent = function (_BaseComponent) { hidden: function hidden() { return _this3.isHidden(); }, - renderer: function renderer(hot, wrapper, row, col, prop, value) { + renderer: function renderer(hot, wrapper) { (0, _element.addClass)(wrapper.parentNode, 'htFiltersMenuActionBar'); (0, _array.arrayEach)(_this3.elements, function (ui) { @@ -97395,7 +97471,7 @@ var ConditionUpdateObserver = function () { function ConditionUpdateObserver(conditionCollection) { var _this = this; - var columnDataFactory = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (column) { + var columnDataFactory = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () { return []; }; @@ -97538,24 +97614,23 @@ var ConditionUpdateObserver = function () { conditionsAfter.shift(); } - var visibleDataFactory = (0, _function.curry)(function (conditionsBefore, column) { + var visibleDataFactory = (0, _function.curry)(function (curriedConditionsBefore, curriedColumn) { var conditionsStack = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; var splitConditionCollection = new _conditionCollection2.default(); - - conditionsBefore = [].concat(conditionsBefore, conditionsStack); + var curriedConditionsBeforeArray = [].concat(curriedConditionsBefore, conditionsStack); // Create new condition collection to determine what rows should be visible in "filter by value" box in the next conditions in the chain - splitConditionCollection.importAllConditions(conditionsBefore); + splitConditionCollection.importAllConditions(curriedConditionsBeforeArray); - var allRows = _this3.columnDataFactory(column); + var allRows = _this3.columnDataFactory(curriedColumn); var visibleRows = void 0; if (splitConditionCollection.isEmpty()) { visibleRows = allRows; } else { - visibleRows = new _dataFilter2.default(splitConditionCollection, function (column) { - return _this3.columnDataFactory(column); + visibleRows = new _dataFilter2.default(splitConditionCollection, function (columnData) { + return _this3.columnDataFactory(columnData); }).filter(); } visibleRows = (0, _array.arrayMap)(visibleRows, function (rowData) { @@ -97666,7 +97741,7 @@ var _eventManager2 = _interopRequireDefault(_eventManager); var _plugins = __webpack_require__(5); -var _utils = __webpack_require__(35); +var _utils = __webpack_require__(44); var _sheet = __webpack_require__(683); @@ -97936,12 +98011,11 @@ var Formulas = function (_BasePlugin) { * * @private * @param {Array} cells An array of recalculated/changed cells. - * @param {String} type Recalculation type (`optimized` or `full`). */ }, { key: 'onSheetAfterRecalculate', - value: function onSheetAfterRecalculate(cells, type) { + value: function onSheetAfterRecalculate(cells) { if (this._skipRendering) { this._skipRendering = false; @@ -97990,11 +98064,13 @@ var Formulas = function (_BasePlugin) { }, { key: 'onBeforeValueRender', value: function onBeforeValueRender(value) { - if ((0, _utils.isFormulaExpressionEscaped)(value)) { - value = (0, _utils.unescapeFormulaExpression)(value); + var renderValue = value; + + if ((0, _utils.isFormulaExpressionEscaped)(renderValue)) { + renderValue = (0, _utils.unescapeFormulaExpression)(renderValue); } - return value; + return renderValue; } /** @@ -98004,19 +98080,19 @@ var Formulas = function (_BasePlugin) { * @param {*} value Value to validate. * @param {Number} row Row index. * @param {Number} prop Column property. - * @param {String} source Validation source call. */ }, { key: 'onBeforeValidate', - value: function onBeforeValidate(value, row, prop, source) { + value: function onBeforeValidate(value, row, prop) { var column = this.hot.propToCol(prop); + var validateValue = value; if (this.hasComputedCellValue(row, column)) { - value = this.getCellValue(row, column); + validateValue = this.getCellValue(row, column); } - return value; + return validateValue; } /** @@ -98045,17 +98121,18 @@ var Formulas = function (_BasePlugin) { oldValue = _ref3[2], newValue = _ref3[3]; - column = _this3.hot.propToCol(column); - row = _this3.t.toPhysicalRow(row); + var physicalColumn = _this3.hot.propToCol(column); + var physicalRow = _this3.t.toPhysicalRow(row); + var value = newValue; - if ((0, _utils.isFormulaExpression)(newValue)) { - newValue = (0, _utils.toUpperCaseFormula)(newValue); + if ((0, _utils.isFormulaExpression)(value)) { + value = (0, _utils.toUpperCaseFormula)(value); } - _this3.dataProvider.collectChanges(row, column, newValue); + _this3.dataProvider.collectChanges(physicalRow, physicalColumn, value); - if (oldValue !== newValue) { - _this3.sheet.applyChanges(row, column, newValue); + if (oldValue !== value) { + _this3.sheet.applyChanges(physicalRow, physicalColumn, value); } }); this.recalculate(); @@ -98260,13 +98337,11 @@ var _hotFormulaParser = __webpack_require__(69); var _array = __webpack_require__(0); -var _number = __webpack_require__(4); - var _localHooks = __webpack_require__(20); var _localHooks2 = _interopRequireDefault(_localHooks); -var _recordTranslator = __webpack_require__(55); +var _recordTranslator = __webpack_require__(54); var _object = __webpack_require__(1); @@ -98278,7 +98353,7 @@ var _reference = __webpack_require__(684); var _reference2 = _interopRequireDefault(_reference); -var _utils = __webpack_require__(35); +var _utils = __webpack_require__(44); var _matrix = __webpack_require__(685); @@ -98637,16 +98712,18 @@ var Sheet = function () { _this4.matrix.registerCellRef(cell); _this4._processingCell.addPrecedent(cell); - if ((0, _hotFormulaParser.error)(cellData)) { + var newCellData = cellData; + + if ((0, _hotFormulaParser.error)(newCellData)) { var computedCell = _this4.matrix.getCellAt(cell.row, cell.column); if (computedCell && computedCell.hasError()) { - throw Error(cellData); + throw Error(newCellData); } } - if ((0, _utils.isFormulaExpression)(cellData)) { - var _parser$parse3 = _this4.parser.parse(cellData.substr(1)), + if ((0, _utils.isFormulaExpression)(newCellData)) { + var _parser$parse3 = _this4.parser.parse(newCellData.substr(1)), error = _parser$parse3.error, result = _parser$parse3.result; @@ -98654,10 +98731,10 @@ var Sheet = function () { throw Error(error); } - cellData = result; + newCellData = result; } - return cellData; + return newCellData; }); }; @@ -98889,11 +98966,11 @@ var Matrix = function () { key: 'remove', value: function remove(cellValue) { var isArray = Array.isArray(cellValue); - var isEqual = function isEqual(cell, cellValue) { + var isEqual = function isEqual(cell, values) { var result = false; if (isArray) { - (0, _array.arrayEach)(cellValue, function (value) { + (0, _array.arrayEach)(values, function (value) { if (cell.isEqual(value)) { result = true; @@ -98901,7 +98978,7 @@ var Matrix = function () { } }); } else { - result = cell.isEqual(cellValue); + result = cell.isEqual(values); } return result; @@ -99034,8 +99111,6 @@ var _createClass = function () { function defineProperties(target, props) { for exports.registerOperation = registerOperation; -var _array = __webpack_require__(0); - var _object = __webpack_require__(1); var _localHooks = __webpack_require__(20); @@ -99211,7 +99286,7 @@ exports.operate = operate; var _array = __webpack_require__(0); -var _utils = __webpack_require__(35); +var _utils = __webpack_require__(44); var _value = __webpack_require__(45); @@ -99294,7 +99369,7 @@ exports.operate = operate; var _array = __webpack_require__(0); -var _utils = __webpack_require__(35); +var _utils = __webpack_require__(44); var _value = __webpack_require__(45); @@ -99399,7 +99474,7 @@ exports.operate = operate; var _array = __webpack_require__(0); -var _utils = __webpack_require__(35); +var _utils = __webpack_require__(44); var _value = __webpack_require__(45); @@ -99504,7 +99579,7 @@ exports.operate = operate; var _array = __webpack_require__(0); -var _utils = __webpack_require__(35); +var _utils = __webpack_require__(44); var _value = __webpack_require__(45); @@ -99537,14 +99612,14 @@ var OPERATION_NAME = exports.OPERATION_NAME = 'remove_column'; function operate(start, amount) { var modifyFormula = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; - amount = -amount; + var columnsAmount = -amount; var matrix = this.matrix, dataProvider = this.dataProvider, sheet = this.sheet; - var translate = [0, amount]; - var indexOffset = Math.abs(amount) - 1; + var translate = [0, columnsAmount]; + var indexOffset = Math.abs(columnsAmount) - 1; var removedCellRef = matrix.removeCellRefsAtRange({ column: start }, { column: start + indexOffset }); var toRemove = []; @@ -99597,7 +99672,7 @@ function operate(start, amount) { var expModifier = new _expressionModifier2.default(value); expModifier.useCustomModifier(customTranslateModifier); - expModifier.translate({ column: amount }, startCoord({ row: origRow, column: origColumn })); + expModifier.translate({ column: columnsAmount }, startCoord({ row: origRow, column: origColumn })); dataProvider.updateSourceData(row, column, expModifier.toString()); } @@ -99661,7 +99736,7 @@ exports.operate = operate; var _array = __webpack_require__(0); -var _utils = __webpack_require__(35); +var _utils = __webpack_require__(44); var _value = __webpack_require__(45); @@ -99694,14 +99769,14 @@ var OPERATION_NAME = exports.OPERATION_NAME = 'remove_row'; function operate(start, amount) { var modifyFormula = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; - amount = -amount; + var rowsAmount = -amount; var matrix = this.matrix, dataProvider = this.dataProvider, sheet = this.sheet; - var translate = [amount, 0]; - var indexOffset = Math.abs(amount) - 1; + var translate = [rowsAmount, 0]; + var indexOffset = Math.abs(rowsAmount) - 1; var removedCellRef = matrix.removeCellRefsAtRange({ row: start }, { row: start + indexOffset }); var toRemove = []; @@ -99754,7 +99829,7 @@ function operate(start, amount) { var expModifier = new _expressionModifier2.default(value); expModifier.useCustomModifier(customTranslateModifier); - expModifier.translate({ row: amount }, startCoord({ row: origRow, column: origColumn })); + expModifier.translate({ row: rowsAmount }, startCoord({ row: origRow, column: origColumn })); dataProvider.updateSourceData(row, column, expModifier.toString()); } @@ -99824,9 +99899,7 @@ var _number = __webpack_require__(4); var _object = __webpack_require__(1); -var _recordTranslator = __webpack_require__(55); - -var _utils = __webpack_require__(35); +var _recordTranslator = __webpack_require__(54); function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } @@ -100112,8 +100185,6 @@ var _createClass = function () { function defineProperties(target, props) { for var _array = __webpack_require__(0); -var _number = __webpack_require__(4); - var _stack = __webpack_require__(694); var _stack2 = _interopRequireDefault(_stack); @@ -100923,13 +100994,10 @@ var GanttChart = function (_BasePlugin) { }, { key: 'getAdjacentWeekColumn', - value: function getAdjacentWeekColumn(date) { - var following = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - var previous = arguments[2]; - - date = (0, _utils.parseDate)(date); + value: function getAdjacentWeekColumn(date, following, previous) { + var convertedDate = (0, _utils.parseDate)(date); var delta = previous === true ? -7 : 7; - var adjacentWeek = date.setDate(date.getDate() + delta); + var adjacentWeek = convertedDate.setDate(convertedDate.getDate() + delta); return this.dateCalculator.dateToColumn(adjacentWeek); } @@ -101085,12 +101153,11 @@ var GanttChart = function (_BasePlugin) { * @param {Number} row Row index. * @param {Number} startDateColumn Start column index. * @param {Number} endDateColumn End column index. - * @param {Object} additionalData Additional range data. */ }, { key: 'renderRangeBar', - value: function renderRangeBar(row, startDateColumn, endDateColumn, additionalData) { + value: function renderRangeBar(row, startDateColumn, endDateColumn) { var year = this.dateCalculator.getYear(); var currentBar = this.rangeBars[year][row][startDateColumn]; @@ -101155,10 +101222,10 @@ var GanttChart = function (_BasePlugin) { this.rangeBars[year][row][startDateColumn] = null; (0, _object.objectEach)(this.rangeList, function (prop, i) { - i = parseInt(i, 10); + var id = parseInt(i, 10); if (JSON.stringify(prop) === JSON.stringify([row, startDateColumn])) { - _this6.rangeList[i] = null; + _this6.rangeList[id] = null; } }); } @@ -101231,8 +101298,8 @@ var GanttChart = function (_BasePlugin) { var titleValue = ''; - (0, _object.objectEach)(cellProperties.additionalData, function (prop, i) { - titleValue += i + ': ' + prop + '\n'; + (0, _object.objectEach)(cellProperties.additionalData, function (cellMeta, i) { + titleValue += i + ': ' + cellMeta + '\n'; }); titleValue = titleValue.replace(/\n$/, ''); @@ -101555,15 +101622,15 @@ var DateCalculator = function () { }, { key: 'dateToColumn', value: function dateToColumn(date) { - date = (0, _utils.parseDate)(date); + var convertedDate = (0, _utils.parseDate)(date); - if (!date) { + if (!convertedDate) { return false; } - var month = date.getMonth(); - var day = date.getDate() - 1; - var year = date.getFullYear(); + var month = convertedDate.getMonth(); + var day = convertedDate.getDate() - 1; + var year = convertedDate.getFullYear(); return this.getWeekColumn(day, month, year); } @@ -101630,7 +101697,7 @@ var DateCalculator = function () { var monthObject = monthList[i]; if (Object.keys(month).length > 1) { - fullMonthCount++; + fullMonthCount += 1; } if (fullMonthCount === monthIndex) { @@ -101705,15 +101772,15 @@ var DateCalculator = function () { value: function isOnTheEdgeOfWeek(date) { var _this2 = this; - date = (0, _utils.parseDate)(date); + var convertedDate = (0, _utils.parseDate)(date); - if (!date) { + if (!convertedDate) { return null; } - var month = date.getMonth(); - var day = date.getDate() - 1; - var year = date.getFullYear(); + var month = convertedDate.getMonth(); + var day = convertedDate.getDate() - 1; + var year = convertedDate.getFullYear(); var monthCacheArray = this.getMonthCacheArray(month, year); var isOnTheEdgeOfWeek = false; @@ -101721,7 +101788,7 @@ var DateCalculator = function () { (0, _object.objectEach)(monthCache, function (column) { if (!_this2.allowSplitWeeks && column.length !== 7) { - if (day === 0 || day === new Date(date.getYear(), date.getMonth() + 1, 0).getDate() - 1) { + if (day === 0 || day === new Date(convertedDate.getYear(), convertedDate.getMonth() + 1, 0).getDate() - 1) { return true; } } @@ -102064,7 +102131,7 @@ var DateCalculator = function () { if (!_this4.allowSplitWeeks && currentMonth.daysBeforeFullWeeks) { mixedMonthToAdd.push((0, _utils.getMixedMonthObject)((0, _utils.getMixedMonthName)(monthIndex, monthList), monthIndex)); - mixedMonthsAdded++; + mixedMonthsAdded += 1; } currentMonth.fullWeeks = Math.floor((currentMonth.days - currentMonth.daysBeforeFullWeeks) / 7); @@ -102073,7 +102140,7 @@ var DateCalculator = function () { if (!_this4.allowSplitWeeks) { if (monthIndex === monthList.length - 1 && currentMonth.daysAfterFullWeeks) { mixedMonthToAdd.push((0, _utils.getMixedMonthObject)((0, _utils.getMixedMonthName)(monthIndex, monthList), null)); - mixedMonthsAdded++; + mixedMonthsAdded += 1; } weekSectionCount += currentMonth.fullWeeks + mixedMonthsAdded; @@ -102278,14 +102345,14 @@ var GanttChartDataFeed = function () { var _this2 = this; this.sourceHooks = { - afterLoadData: function afterLoadData(firstRun) { - return _this2.onAfterSourceLoadData(firstRun); + afterLoadData: function afterLoadData() { + return _this2.onAfterSourceLoadData(); }, - afterChange: function afterChange(changes, source) { - return _this2.onAfterSourceChange(changes, source); + afterChange: function afterChange(changes) { + return _this2.onAfterSourceChange(changes); }, - afterColumnSort: function afterColumnSort(column, order) { - return _this2.onAfterColumnSort(column, order); + afterColumnSort: function afterColumnSort() { + return _this2.onAfterColumnSort(); } }; @@ -102476,12 +102543,11 @@ var GanttChartDataFeed = function () { * * @private * @param {Array} changes List of changes. - * @param {String} source Change source. */ }, { key: 'onAfterSourceChange', - value: function onAfterSourceChange(changes, source) { + value: function onAfterSourceChange(changes) { var _this4 = this; this.asyncCall(function () { @@ -102504,10 +102570,10 @@ var GanttChartDataFeed = function () { } (0, _object.objectEach)(changesByRows, function (prop, i) { - i = parseInt(i, 10); + var row = parseInt(i, 10); - if (_this4.chartPlugin.getRangeBarCoordinates(i)) { - _this4.chartPlugin.removeRangeBarByColumn(i, _this4.chartPlugin.rangeList[i][1]); + if (_this4.chartPlugin.getRangeBarCoordinates(row)) { + _this4.chartPlugin.removeRangeBarByColumn(row, _this4.chartPlugin.rangeList[row][1]); } _this4.updateFromSource(i); @@ -102519,15 +102585,14 @@ var GanttChartDataFeed = function () { * afterLoadData hook callback for the source Handsontable instance. * * @private - * @param firstRun */ }, { key: 'onAfterSourceLoadData', - value: function onAfterSourceLoadData(firstRun) { + value: function onAfterSourceLoadData() { var _this5 = this; - this.asyncCall(function (firstRun) { + this.asyncCall(function () { _this5.chartPlugin.removeAllRangeBars(); _this5.updateFromSource(); }); @@ -102537,13 +102602,11 @@ var GanttChartDataFeed = function () { * afterColumnSort hook callback for the source Handsontable instance. * * @private - * @param {Number} column Sorted column. - * @param order */ }, { key: 'onAfterColumnSort', - value: function onAfterColumnSort(column, order) { + value: function onAfterColumnSort() { var _this6 = this; this.asyncCall(function () { @@ -102724,7 +102787,8 @@ var HeaderTooltips = function (_BasePlugin) { var headerLevels = this.hot.view.wt.getSetting('columnHeaders').length; var mainHeaders = this.hot.view.wt.wtTable.THEAD; var topHeaders = this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.THEAD; - var topLeftCornerHeaders = this.hot.view.wt.wtOverlays.topLeftCornerOverlay ? hot.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.THEAD : null; + var topLeftCornerOverlay = this.hot.view.wt.wtOverlays.topLeftCornerOverlay; + var topLeftCornerHeaders = topLeftCornerOverlay ? topLeftCornerOverlay.clone.wtTable.THEAD : null; (0, _number.rangeEach)(0, headerLevels - 1, function (i) { var masterLevel = mainHeaders.childNodes[i]; @@ -102943,8 +103007,8 @@ var NestedHeaders = function (_BasePlugin) { this.addHook('afterInit', function () { return _this3.onAfterInit(); }); - this.addHook('afterOnCellMouseDown', function (event, coords, TD) { - return _this3.onAfterOnCellMouseDown(event, coords, TD); + this.addHook('afterOnCellMouseDown', function (event, coords) { + return _this3.onAfterOnCellMouseDown(event, coords); }); this.addHook('beforeOnCellMouseOver', function (event, coords, TD, blockCalculations) { return _this3.onBeforeOnCellMouseOver(event, coords, TD, blockCalculations); @@ -103078,7 +103142,7 @@ var NestedHeaders = function (_BasePlugin) { if (childHeaders.length > 0) { var childColspanSum = 0; - (0, _array.arrayEach)(childHeaders, function (col, i) { + (0, _array.arrayEach)(childHeaders, function (col) { childColspanSum += _this5.getColspan(row + 1, col); }); @@ -103110,8 +103174,8 @@ var NestedHeaders = function (_BasePlugin) { } } - (0, _object.objectEach)(this.settings, function (levelValue, level) { - (0, _object.objectEach)(levelValue, function (val, col, levelValue) { + (0, _object.objectEach)(this.settings, function (levelValues, level) { + (0, _object.objectEach)(levelValues, function (val, col, levelValue) { checkIfExists(_this6.colspanArray, level); if (levelValue[col].colspan === void 0) { @@ -103148,7 +103212,7 @@ var NestedHeaders = function (_BasePlugin) { value: function fillColspanArrayWithDummies(colspan, level) { var _this7 = this; - (0, _number.rangeEach)(0, colspan - 2, function (i) { + (0, _number.rangeEach)(0, colspan - 2, function () { _this7.colspanArray[level].push({ label: '', colspan: 1, @@ -103289,7 +103353,7 @@ var NestedHeaders = function (_BasePlugin) { break; } - parentCol--; + parentCol -= 1; } while (column >= 0); return parentCol; @@ -103368,8 +103432,6 @@ var NestedHeaders = function (_BasePlugin) { if (selection === void 0) { return; } - var highlightHeaderClassName = 'ht__highlight'; - var activeHeaderClassName = 'ht__active_highlight'; var wtOverlays = this.hot.view.wt.wtOverlays; var selectionByHeader = this.hot.selection.isSelectedByColumnHeader(); @@ -103397,7 +103459,7 @@ var NestedHeaders = function (_BasePlugin) { var colspanLen = _this9.getColspan(level - _this9.columnHeaderLevelCount, visibleColumnIndex); var isInSelection = visibleColumnIndex >= from && visibleColumnIndex + colspanLen - 1 <= to; - (0, _array.arrayEach)(listTH, function (TH, index, array) { + (0, _array.arrayEach)(listTH, function (TH) { if (TH === void 0) { return false; } @@ -103460,12 +103522,11 @@ var NestedHeaders = function (_BasePlugin) { * @private * @param {MouseEvent} event Mouse event. * @param {Object} coords Clicked cell coords. - * @param {HTMLElement} TD */ }, { key: 'onAfterOnCellMouseDown', - value: function onAfterOnCellMouseDown(event, coords, TD) { + value: function onAfterOnCellMouseDown(event, coords) { if (coords.row < 0) { var colspan = this.getColspan(coords.row, coords.col); var lastColIndex = coords.col + colspan - 1; @@ -104061,11 +104122,11 @@ var NestedRows = function (_BasePlugin) { fromParent = this.dataManager.getRowParent(translatedStartIndexes[0]); toParent = this.dataManager.getRowParent(translatedTargetIndex); - if (toParent == null) { + if (toParent === null || toParent === void 0) { toParent = this.dataManager.getRowParent(translatedTargetIndex - 1); } - if (toParent == null) { + if (toParent === null || toParent === void 0) { toParent = this.dataManager.getDataObject(translatedTargetIndex - 1); priv.movedToFirstChild = true; } @@ -104093,7 +104154,7 @@ var NestedRows = function (_BasePlugin) { translatedStartIndexes.reverse(); if (priv.movedToFirstChild !== true) { - translatedTargetIndex--; + translatedTargetIndex -= 1; } } @@ -104162,7 +104223,7 @@ var NestedRows = function (_BasePlugin) { } } else if (priv.movedToCollapsed) { var parentObject = this.dataManager.getRowParent(translatedTargetIndex - 1); - if (parentObject == null) { + if (parentObject === null || parentObject === void 0) { parentObject = this.dataManager.getDataObject(translatedTargetIndex - 1); } var parentIndex = this.dataManager.getRowIndex(parentObject); @@ -104249,13 +104310,12 @@ var NestedRows = function (_BasePlugin) { * @private * @param {Number} index * @param {Number} amount - * @param {Array} logicRows * @returns {Boolean} */ }, { key: 'onBeforeDataFilter', - value: function onBeforeDataFilter(index, amount, logicRows) { + value: function onBeforeDataFilter(index, amount) { var realLogicRows = []; var startIndex = this.dataManager.translateTrimmedRow(index); var priv = privatePool.get(this); @@ -104389,7 +104449,7 @@ var NestedRows = function (_BasePlugin) { }); if (isChild) { - childrenCount--; + childrenCount -= 1; } }); @@ -104400,13 +104460,11 @@ var NestedRows = function (_BasePlugin) { * `beforeAddChild` hook callback. * * @private - * @param {Object} parent Parent element. - * @param {Object} element New child element. */ }, { key: 'onBeforeAddChild', - value: function onBeforeAddChild(parent, element) { + value: function onBeforeAddChild() { this.collapsingUI.collapsedRowsStash.stash(); } @@ -104431,13 +104489,11 @@ var NestedRows = function (_BasePlugin) { * `beforeDetachChild` hook callback. * * @private - * @param {Object} parent Parent element. - * @param {Object} element New child element. */ }, { key: 'onBeforeDetachChild', - value: function onBeforeDetachChild(parent, element) { + value: function onBeforeDetachChild() { this.collapsingUI.collapsedRowsStash.stash(); } @@ -104542,7 +104598,7 @@ var _object = __webpack_require__(1); var _array = __webpack_require__(0); -var _recordTranslator = __webpack_require__(55); +var _recordTranslator = __webpack_require__(54); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -104640,7 +104696,7 @@ var DataManager = function () { if (!this.cache.levels[level]) { this.cache.levels[level] = []; - this.cache.levelCount++; + this.cache.levelCount += 1; } this.cache.levels[level].push(node); this.cache.rows.push(node); @@ -104651,7 +104707,7 @@ var DataManager = function () { }); if (this.hasChildren(node)) { - (0, _array.arrayEach)(node.__children, function (elem, i) { + (0, _array.arrayEach)(node.__children, function (elem) { _this2.cacheNode(elem, level + 1, node); }); } @@ -104666,7 +104722,7 @@ var DataManager = function () { }, { key: 'getDataObject', value: function getDataObject(row) { - return row == null ? null : this.cache.rows[row]; + return row === null || row === void 0 ? null : this.cache.rows[row]; } /** @@ -104686,43 +104742,46 @@ var DataManager = function () { var _this3 = this; var rootLevel = false; + var readedNodesCount = readCount; - if (isNaN(readCount) && readCount.end) { - return readCount; + if (isNaN(readedNodesCount) && readedNodesCount.end) { + return readedNodesCount; } - if (!parent) { - parent = { + var parentObj = parent; + + if (!parentObj) { + parentObj = { __children: this.data }; rootLevel = true; - readCount--; + readedNodesCount -= 1; } - if (neededIndex != null && readCount === neededIndex) { - return { result: parent, end: true }; + if (neededIndex !== null && neededIndex !== void 0 && readedNodesCount === neededIndex) { + return { result: parentObj, end: true }; } - if (neededObject != null && parent === neededObject) { - return { result: readCount, end: true }; + if (neededObject !== null && neededObject !== void 0 && parentObj === neededObject) { + return { result: readedNodesCount, end: true }; } - readCount++; + readedNodesCount += 1; - if (parent.__children) { - (0, _array.arrayEach)(parent.__children, function (val, i) { + if (parentObj.__children) { + (0, _array.arrayEach)(parentObj.__children, function (val) { - _this3.parentReference.set(val, rootLevel ? null : parent); + _this3.parentReference.set(val, rootLevel ? null : parentObj); - readCount = _this3.readTreeNodes(val, readCount, neededIndex, neededObject); + readedNodesCount = _this3.readTreeNodes(val, readedNodesCount, neededIndex, neededObject); - if (isNaN(readCount) && readCount.end) { + if (isNaN(readedNodesCount) && readedNodesCount.end) { return false; } }); } - return readCount; + return readedNodesCount; } /** @@ -104783,7 +104842,7 @@ var DataManager = function () { }, { key: 'getRowIndex', value: function getRowIndex(rowObj) { - return rowObj == null ? null : this.cache.nodeInfo.get(rowObj).row; + return rowObj === null || rowObj === void 0 ? null : this.cache.nodeInfo.get(rowObj).row; } /** @@ -104806,7 +104865,7 @@ var DataManager = function () { var parent = this.getRowParent(row); - if (parent == null) { + if (parent === null || parent === void 0) { return this.data.indexOf(rowObj); } @@ -104840,17 +104899,18 @@ var DataManager = function () { var _this4 = this; var rowCount = 0; + var parentNode = parent; - if (!isNaN(parent)) { - parent = this.getDataObject(parent); + if (!isNaN(parentNode)) { + parentNode = this.getDataObject(parentNode); } - if (!parent || !parent.__children) { + if (!parentNode || !parentNode.__children) { return 0; } - (0, _array.arrayEach)(parent.__children, function (elem, i) { - rowCount++; + (0, _array.arrayEach)(parentNode.__children, function (elem) { + rowCount += 1; if (elem.__children) { rowCount += _this4.countChildren(elem); } @@ -104928,7 +104988,7 @@ var DataManager = function () { }, { key: 'getRowObjectLevel', value: function getRowObjectLevel(rowObject) { - return rowObject == null ? null : this.cache.nodeInfo.get(rowObject).level; + return rowObject === null || rowObject === void 0 ? null : this.cache.nodeInfo.get(rowObject).level; } /** @@ -104941,20 +105001,24 @@ var DataManager = function () { }, { key: 'hasChildren', value: function hasChildren(row) { - if (!isNaN(row)) { - row = this.getDataObject(row); + var rowObj = row; + + if (!isNaN(rowObj)) { + rowObj = this.getDataObject(rowObj); } - return !!(row.__children && row.__children.length); + return !!(rowObj.__children && rowObj.__children.length); } }, { key: 'isParent', value: function isParent(row) { - if (!isNaN(row)) { - row = this.getDataObject(row); + var rowObj = row; + + if (!isNaN(rowObj)) { + rowObj = this.getDataObject(rowObj); } - return !!(0, _object.hasOwnProperty)(row, '__children'); + return !!(0, _object.hasOwnProperty)(rowObj, '__children'); } /** @@ -104967,7 +105031,8 @@ var DataManager = function () { }, { key: 'addChild', value: function addChild(parent, element) { - this.hot.runHooks('beforeAddChild', parent, element); + var childElement = element; + this.hot.runHooks('beforeAddChild', parent, childElement); var parentIndex = null; if (parent) { @@ -104984,18 +105049,18 @@ var DataManager = function () { functionalParent.__children = []; } - if (!element) { - element = this.mockNode(); + if (!childElement) { + childElement = this.mockNode(); } - functionalParent.__children.push(element); + functionalParent.__children.push(childElement); this.rewriteCache(); - var newRowIndex = this.getRowIndex(element); + var newRowIndex = this.getRowIndex(childElement); this.hot.runHooks('afterCreateRow', newRowIndex, 1); - this.hot.runHooks('afterAddChild', parent, element); + this.hot.runHooks('afterAddChild', parent, childElement); } /** @@ -105010,7 +105075,8 @@ var DataManager = function () { }, { key: 'addChildAtIndex', value: function addChildAtIndex(parent, index, element, globalIndex) { - this.hot.runHooks('beforeAddChild', parent, element, index); + var childElement = element; + this.hot.runHooks('beforeAddChild', parent, childElement, index); this.hot.runHooks('beforeCreateRow', globalIndex + 1, 1); var functionalParent = parent; @@ -105022,16 +105088,16 @@ var DataManager = function () { functionalParent.__children = []; } - if (!element) { - element = this.mockNode(); + if (!childElement) { + childElement = this.mockNode(); } - functionalParent.__children.splice(index, null, element); + functionalParent.__children.splice(index, null, childElement); this.rewriteCache(); this.hot.runHooks('afterCreateRow', globalIndex + 1, 1); - this.hot.runHooks('afterAddChild', parent, element, index); + this.hot.runHooks('afterAddChild', parent, childElement, index); } /** @@ -105103,7 +105169,7 @@ var DataManager = function () { this.hot.runHooks('beforeDetachChild', parent, element); - if (indexWithinParent != null) { + if (indexWithinParent !== null && indexWithinParent !== void 0) { this.hot.runHooks('beforeRemoveRow', childRowIndex, 1, [childRowIndex], this.plugin.pluginName); parent.__children.splice(indexWithinParent, 1); @@ -105152,11 +105218,11 @@ var DataManager = function () { var elementsToRemove = []; - (0, _array.arrayEach)(logicRows, function (elem, ind) { + (0, _array.arrayEach)(logicRows, function (elem) { elementsToRemove.push(_this6.getDataObject(elem)); }); - (0, _array.arrayEach)(elementsToRemove, function (elem, ind) { + (0, _array.arrayEach)(elementsToRemove, function (elem) { var indexWithinParent = _this6.getRowIndexWithinParent(elem); var tempParent = _this6.getRowParent(elem); @@ -105182,13 +105248,13 @@ var DataManager = function () { }, { key: 'spliceData', value: function spliceData(index, amount, element) { - index = this.translateTrimmedRow(index); + var elementIndex = this.translateTrimmedRow(index); - if (index == null) { + if (elementIndex === null || elementIndex === void 0) { return; } - var previousElement = this.getDataObject(index - 1); + var previousElement = this.getDataObject(elementIndex - 1); var newRowParent = null; var indexWithinParent = null; @@ -105196,8 +105262,8 @@ var DataManager = function () { newRowParent = previousElement; indexWithinParent = 0; } else { - newRowParent = this.getRowParent(index); - indexWithinParent = this.getRowIndexWithinParent(index); + newRowParent = this.getRowParent(elementIndex); + indexWithinParent = this.getRowIndexWithinParent(elementIndex); } if (newRowParent) { @@ -105232,11 +105298,11 @@ var DataManager = function () { var toParent = this.getRowParent(toIndex); - if (toParent == null) { + if (toParent === null || toParent === void 0) { toParent = this.getRowParent(toIndex - 1); } - if (toParent == null) { + if (toParent === null || toParent === void 0) { toParent = this.getDataObject(toIndex - 1); } @@ -105360,10 +105426,10 @@ var CollapsingUI = function (_BaseUI) { // Workaround for wrong indexes being set in the trimRows plugin _this.expandMultipleChildren(_this.lastCollapsedRows, false); }, - shiftStash: function shiftStash(elementIndex) { + shiftStash: function shiftStash(index) { var delta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; - elementIndex = _this.translateTrimmedRow(elementIndex); + var elementIndex = _this.translateTrimmedRow(index); (0, _array.arrayEach)(_this.lastCollapsedRows, function (elem, i) { if (elem > elementIndex - 1) { _this.lastCollapsedRows[i] = elem + delta; @@ -105418,7 +105484,7 @@ var CollapsingUI = function (_BaseUI) { } if (this.dataManager.hasChildren(rowObject)) { - (0, _array.arrayEach)(rowObject.__children, function (elem, i) { + (0, _array.arrayEach)(rowObject.__children, function (elem) { rowsToCollapse.push(_this2.dataManager.getRowIndex(elem)); }); } @@ -105458,7 +105524,7 @@ var CollapsingUI = function (_BaseUI) { var rowsToTrim = []; - (0, _array.arrayEach)(rows, function (elem, i) { + (0, _array.arrayEach)(rows, function (elem) { rowsToTrim = rowsToTrim.concat(_this3.collapseChildren(elem, false, false)); }); @@ -105505,7 +105571,7 @@ var CollapsingUI = function (_BaseUI) { var rowsToTrim = []; - (0, _array.arrayEach)(rowIndexes, function (elem, i) { + (0, _array.arrayEach)(rowIndexes, function (elem) { rowsToTrim.push(elem); if (recursive) { _this4.collapseChildRows(elem, rowsToTrim); @@ -105524,7 +105590,7 @@ var CollapsingUI = function (_BaseUI) { * * @param {Number} parentIndex Index of the parent node. * @param {Array} [rowsToTrim = []] Array of rows to trim. Defaults to an empty array. - * @param {Boolean} [recursive = true] `true` if the collapsing process should be recursive. + * @param {Boolean} [recursive] `true` if the collapsing process should be recursive. * @param {Boolean} [doTrimming = false] `true` if rows should be trimmed. */ @@ -105535,13 +105601,13 @@ var CollapsingUI = function (_BaseUI) { var _this5 = this; - var recursive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + var recursive = arguments[2]; var doTrimming = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; if (this.dataManager.hasChildren(parentIndex)) { var parentObject = this.dataManager.getDataObject(parentIndex); - (0, _array.arrayEach)(parentObject.__children, function (elem, i) { + (0, _array.arrayEach)(parentObject.__children, function (elem) { var elemIndex = _this5.dataManager.getRowIndex(elem); rowsToTrim.push(elemIndex); _this5.collapseChildRows(elemIndex, rowsToTrim); @@ -105587,7 +105653,7 @@ var CollapsingUI = function (_BaseUI) { var rowsToUntrim = []; - (0, _array.arrayEach)(rowIndexes, function (elem, i) { + (0, _array.arrayEach)(rowIndexes, function (elem) { rowsToUntrim.push(elem); if (recursive) { _this6.expandChildRows(elem, rowsToUntrim); @@ -105606,7 +105672,7 @@ var CollapsingUI = function (_BaseUI) { * * @param {Number} parentIndex Index of the parent row. * @param {Array} [rowsToUntrim = []] Array of the rows to be untrimmed. - * @param {Boolean} [recursive = true] `true` if it should expand the rows' children recursively. + * @param {Boolean} [recursive] `true` if it should expand the rows' children recursively. * @param {Boolean} [doTrimming = false] `true` if rows should be untrimmed. */ @@ -105617,13 +105683,13 @@ var CollapsingUI = function (_BaseUI) { var _this7 = this; - var recursive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + var recursive = arguments[2]; var doTrimming = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; if (this.dataManager.hasChildren(parentIndex)) { var parentObject = this.dataManager.getDataObject(parentIndex); - (0, _array.arrayEach)(parentObject.__children, function (elem, i) { + (0, _array.arrayEach)(parentObject.__children, function (elem) { if (!_this7.isAnyParentCollapsed(elem)) { var elemIndex = _this7.dataManager.getRowIndex(elem); rowsToUntrim.push(elemIndex); @@ -105669,7 +105735,7 @@ var CollapsingUI = function (_BaseUI) { this.collapsedRows.splice(this.collapsedRows.indexOf(rowIndex), 1); if (this.dataManager.hasChildren(rowObject)) { - (0, _array.arrayEach)(rowObject.__children, function (elem, i) { + (0, _array.arrayEach)(rowObject.__children, function (elem) { var childIndex = _this8.dataManager.getRowIndex(elem); rowsToExpand.push(childIndex); @@ -105707,7 +105773,7 @@ var CollapsingUI = function (_BaseUI) { var rowsToUntrim = []; - (0, _array.arrayEach)(rows, function (elem, i) { + (0, _array.arrayEach)(rows, function (elem) { rowsToUntrim = rowsToUntrim.concat(_this9.expandChildren(elem, false, false)); }); @@ -105732,7 +105798,7 @@ var CollapsingUI = function (_BaseUI) { var sourceData = this.hot.getSourceData(); var parentsToCollapse = []; - (0, _array.arrayEach)(sourceData, function (elem, i) { + (0, _array.arrayEach)(sourceData, function (elem) { if (_this10.dataManager.hasChildren(elem)) { parentsToCollapse.push(elem); } @@ -105755,7 +105821,7 @@ var CollapsingUI = function (_BaseUI) { var sourceData = this.hot.getSourceData(); var parentsToExpand = []; - (0, _array.arrayEach)(sourceData, function (elem, i) { + (0, _array.arrayEach)(sourceData, function (elem) { if (_this11.dataManager.hasChildren(elem)) { parentsToExpand.push(elem); } @@ -105788,7 +105854,7 @@ var CollapsingUI = function (_BaseUI) { } if (this.dataManager.hasChildren(rowObj)) { - (0, _array.arrayEach)(rowObj.__children, function (elem, i) { + (0, _array.arrayEach)(rowObj.__children, function (elem) { var rowIndex = _this12.dataManager.getRowIndex(elem); if (!_this12.trimRowsPlugin.isTrimmed(rowIndex)) { @@ -105832,12 +105898,11 @@ var CollapsingUI = function (_BaseUI) { * @private * @param {MouseEvent} event `mousedown` event * @param {Object} coords Coordinates of the clicked cell/header. - * @param {HTMLElement} TD Clicked cell/header. */ }, { key: 'toggleState', - value: function toggleState(event, coords, TD) { + value: function toggleState(event, coords) { if (coords.col >= 0) { return; } @@ -105994,9 +106059,6 @@ var ContextMenuUI = function (_BaseUI) { }, callback: function callback() { - var translatedRowIndex = _this2.dataManager.translateTrimmedRow(_this2.hot.getSelectedLast()[0]); - var element = _this2.dataManager.getDataObject(translatedRowIndex); - _this2.dataManager.detachFromParent(_this2.hot.getSelectedLast()); }, disabled: function disabled() { @@ -106020,9 +106082,7 @@ var ContextMenuUI = function (_BaseUI) { } }); - defaultOptions = this.modifyRowInsertingOptions(defaultOptions); - - return defaultOptions; + return this.modifyRowInsertingOptions(defaultOptions); } /** @@ -106039,9 +106099,10 @@ var ContextMenuUI = function (_BaseUI) { var priv = privatePool.get(this); (0, _number.rangeEach)(0, defaultOptions.items.length - 1, function (i) { + var option = priv[defaultOptions.items[i].key]; - if (priv[defaultOptions.items[i].key] != null) { - defaultOptions.items[i].callback = priv[defaultOptions.items[i].key]; + if (option !== null && option !== void 0) { + defaultOptions.items[i].callback = option; } }); @@ -106087,7 +106148,7 @@ var _array = __webpack_require__(0); var _plugins = __webpack_require__(5); -var _predefinedItems = __webpack_require__(44); +var _predefinedItems = __webpack_require__(43); var _hideColumn = __webpack_require__(709); @@ -106306,11 +106367,11 @@ var HiddenColumns = function (_BasePlugin) { var _this3 = this; (0, _array.arrayEach)(columns, function (column) { - column = parseInt(column, 10); - column = _this3.getLogicalColumnIndex(column); + var columnIndex = parseInt(column, 10); + columnIndex = _this3.getLogicalColumnIndex(columnIndex); - if (_this3.isHidden(column, true)) { - _this3.hiddenColumns.splice(_this3.hiddenColumns.indexOf(column), 1); + if (_this3.isHidden(columnIndex, true)) { + _this3.hiddenColumns.splice(_this3.hiddenColumns.indexOf(columnIndex), 1); } }); } @@ -106343,11 +106404,11 @@ var HiddenColumns = function (_BasePlugin) { var _this4 = this; (0, _array.arrayEach)(columns, function (column) { - column = parseInt(column, 10); - column = _this4.getLogicalColumnIndex(column); + var columnIndex = parseInt(column, 10); + columnIndex = _this4.getLogicalColumnIndex(columnIndex); - if (!_this4.isHidden(column, true)) { - _this4.hiddenColumns.push(column); + if (!_this4.isHidden(columnIndex, true)) { + _this4.hiddenColumns.push(columnIndex); } }); } @@ -106381,11 +106442,13 @@ var HiddenColumns = function (_BasePlugin) { value: function isHidden(column) { var isLogicIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var columnIndex = column; + if (!isLogicIndex) { - column = this.getLogicalColumnIndex(column); + columnIndex = this.getLogicalColumnIndex(columnIndex); } - return this.hiddenColumns.indexOf(column) > -1; + return this.hiddenColumns.indexOf(columnIndex) > -1; } /** @@ -106437,11 +106500,13 @@ var HiddenColumns = function (_BasePlugin) { }, { key: 'onBeforeStretchingColumnWidth', value: function onBeforeStretchingColumnWidth(width, column) { + var stretchedWidth = width; + if (this.isHidden(column)) { - width = 0; + stretchedWidth = 0; } - return width; + return stretchedWidth; } /** @@ -106479,13 +106544,13 @@ var HiddenColumns = function (_BasePlugin) { }, { key: 'onAfterGetCellMeta', value: function onAfterGetCellMeta(row, col, cellProperties) { - col = this.hot.runHooks('unmodifyCol', col); + var colIndex = this.hot.runHooks('unmodifyCol', col); if (this.settings.copyPasteEnabled === false && this.isHidden(col)) { cellProperties.skipColumnOnPaste = true; } - if (this.isHidden(col)) { + if (this.isHidden(colIndex)) { if (cellProperties.renderer !== hiddenRenderer) { cellProperties.baseRenderer = cellProperties.renderer; } @@ -106512,7 +106577,7 @@ var HiddenColumns = function (_BasePlugin) { break; } - i--; + i -= 1; } while (i >= 0); if (firstSectionHidden && cellProperties.className.indexOf('firstVisibleColumn') === -1) { @@ -106609,7 +106674,7 @@ var HiddenColumns = function (_BasePlugin) { firstSectionHidden = false; break; } - i--; + i -= 1; } while (i >= 0); if (firstSectionHidden) { @@ -106648,13 +106713,15 @@ var HiddenColumns = function (_BasePlugin) { coords.col = 0; var getNextColumn = function getNextColumn(col) { - var logicalCol = _this6.getLogicalColumnIndex(col); + var visualColumn = col; + var logicalCol = _this6.getLogicalColumnIndex(visualColumn); if (_this6.isHidden(logicalCol, true)) { - col = getNextColumn(++col); + visualColumn += 1; + visualColumn = getNextColumn(visualColumn); } - return col; + return visualColumn; }; coords.col = getNextColumn(coords.col); @@ -106675,27 +106742,30 @@ var HiddenColumns = function (_BasePlugin) { var columnCount = this.hot.countCols(); var getNextColumn = function getNextColumn(col) { - var logicalCol = _this7.getLogicalColumnIndex(col); + var visualColumn = col; + var logicalCol = _this7.getLogicalColumnIndex(visualColumn); if (_this7.isHidden(logicalCol, true)) { - if (_this7.lastSelectedColumn > col || coords.col === columnCount - 1) { - if (col > 0) { - col = getNextColumn(--col); + if (_this7.lastSelectedColumn > visualColumn || coords.col === columnCount - 1) { + if (visualColumn > 0) { + visualColumn -= 1; + visualColumn = getNextColumn(visualColumn); } else { (0, _number.rangeEach)(0, _this7.lastSelectedColumn, function (i) { if (!_this7.isHidden(i)) { - col = i; + visualColumn = i; return false; } }); } } else { - col = getNextColumn(++col); + visualColumn += 1; + visualColumn = getNextColumn(visualColumn); } } - return col; + return visualColumn; }; coords.col = getNextColumn(coords.col); @@ -106729,10 +106799,12 @@ var HiddenColumns = function (_BasePlugin) { var tempHidden = []; (0, _array.arrayEach)(this.hiddenColumns, function (col) { - if (col >= index) { - col += amount; + var visualColumn = col; + + if (visualColumn >= index) { + visualColumn += amount; } - tempHidden.push(col); + tempHidden.push(visualColumn); }); this.hiddenColumns = tempHidden; } @@ -106749,10 +106821,12 @@ var HiddenColumns = function (_BasePlugin) { var tempHidden = []; (0, _array.arrayEach)(this.hiddenColumns, function (col) { - if (col >= index) { - col -= amount; + var visualColumn = col; + + if (visualColumn >= index) { + visualColumn -= amount; } - tempHidden.push(col); + tempHidden.push(visualColumn); }); this.hiddenColumns = tempHidden; } @@ -107263,11 +107337,11 @@ var HiddenRows = function (_BasePlugin) { var _this3 = this; (0, _array.arrayEach)(rows, function (row) { - row = parseInt(row, 10); - row = _this3.getLogicalRowIndex(row); + var visualRow = parseInt(row, 10); + visualRow = _this3.getLogicalRowIndex(visualRow); - if (_this3.isHidden(row, true)) { - _this3.hiddenRows.splice(_this3.hiddenRows.indexOf(row), 1); + if (_this3.isHidden(visualRow, true)) { + _this3.hiddenRows.splice(_this3.hiddenRows.indexOf(visualRow), 1); } }); } @@ -107300,11 +107374,11 @@ var HiddenRows = function (_BasePlugin) { var _this4 = this; (0, _array.arrayEach)(rows, function (row) { - row = parseInt(row, 10); - row = _this4.getLogicalRowIndex(row); + var visualRow = parseInt(row, 10); + visualRow = _this4.getLogicalRowIndex(visualRow); - if (!_this4.isHidden(row, true)) { - _this4.hiddenRows.push(row); + if (!_this4.isHidden(visualRow, true)) { + _this4.hiddenRows.push(visualRow); } }); } @@ -107338,11 +107412,13 @@ var HiddenRows = function (_BasePlugin) { value: function isHidden(row) { var isLogicIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var logicalRow = row; + if (!isLogicIndex) { - row = this.getLogicalRowIndex(row); + logicalRow = this.getLogicalRowIndex(logicalRow); } - return this.hiddenRows.indexOf(row) > -1; + return this.hiddenRows.indexOf(logicalRow) > -1; } /** @@ -107391,17 +107467,17 @@ var HiddenRows = function (_BasePlugin) { }, { key: 'onAfterGetCellMeta', value: function onAfterGetCellMeta(row, col, cellProperties) { - row = this.hot.runHooks('unmodifyRow', row); + var visualRow = this.hot.runHooks('unmodifyRow', row); - if (this.settings.copyPasteEnabled === false && this.isHidden(row)) { + if (this.settings.copyPasteEnabled === false && this.isHidden(visualRow)) { cellProperties.skipRowOnPaste = true; } else { cellProperties.skipRowOnPaste = false; } - if (this.isHidden(row - 1)) { + if (this.isHidden(visualRow - 1)) { var firstSectionHidden = true; - var i = row - 1; + var i = visualRow - 1; cellProperties.className = cellProperties.className || ''; @@ -107414,7 +107490,7 @@ var HiddenRows = function (_BasePlugin) { firstSectionHidden = false; break; } - i--; + i -= 1; } while (i >= 0); if (firstSectionHidden && cellProperties.className.indexOf('firstVisibleRow') === -1) { @@ -107470,7 +107546,7 @@ var HiddenRows = function (_BasePlugin) { firstSectionHidden = false; break; } - i--; + i -= 1; } while (i >= 0); if (firstSectionHidden) { @@ -107567,22 +107643,23 @@ var HiddenRows = function (_BasePlugin) { var getNextRow = function getNextRow(row) { var direction = 0; + var visualRow = row; if (actualSelection) { - direction = row > actualSelection[0] ? 1 : -1; + direction = visualRow > actualSelection[0] ? 1 : -1; _this6.lastSelectedRow = actualSelection[0]; } - if (lastPossibleIndex < row || row < 0) { + if (lastPossibleIndex < visualRow || visualRow < 0) { return _this6.lastSelectedRow; } - if (_this6.isHidden(row)) { - row = getNextRow(row + direction); + if (_this6.isHidden(visualRow)) { + visualRow = getNextRow(visualRow + direction); } - return row; + return visualRow; }; coords.row = getNextRow(coords.row); @@ -107607,12 +107684,14 @@ var HiddenRows = function (_BasePlugin) { coords.row = 0; var getNextRow = function getNextRow(row) { + var visualRow = row; - if (_this7.isHidden(row)) { - row = getNextRow(++row); + if (_this7.isHidden(visualRow)) { + visualRow += 1; + visualRow = getNextRow(visualRow); } - return row; + return visualRow; }; coords.row = getNextRow(coords.row); @@ -107633,25 +107712,29 @@ var HiddenRows = function (_BasePlugin) { var rowCount = this.hot.countRows(); var getNextRow = function getNextRow(row) { - if (_this8.isHidden(row)) { - if (_this8.lastSelectedRow > row || coords.row === rowCount - 1) { - if (row > 0) { - row = getNextRow(--row); + var visualRow = row; + + if (_this8.isHidden(visualRow)) { + if (_this8.lastSelectedRow > visualRow || coords.row === rowCount - 1) { + if (visualRow > 0) { + visualRow -= 1; + visualRow = getNextRow(visualRow); } else { (0, _number.rangeEach)(0, _this8.lastSelectedRow, function (i) { if (!_this8.isHidden(i)) { - row = i; + visualRow = i; return false; } }); } } else { - row = getNextRow(++row); + visualRow += 1; + visualRow = getNextRow(visualRow); } } - return row; + return visualRow; }; coords.row = getNextRow(coords.row); @@ -107686,11 +107769,13 @@ var HiddenRows = function (_BasePlugin) { value: function onAfterCreateRow(index, amount) { var tempHidden = []; - (0, _array.arrayEach)(this.hiddenRows, function (col) { - if (col >= index) { - col += amount; + (0, _array.arrayEach)(this.hiddenRows, function (row) { + var visualRow = row; + + if (visualRow >= index) { + visualRow += amount; } - tempHidden.push(col); + tempHidden.push(visualRow); }); this.hiddenRows = tempHidden; } @@ -107708,11 +107793,13 @@ var HiddenRows = function (_BasePlugin) { value: function onAfterRemoveRow(index, amount) { var tempHidden = []; - (0, _array.arrayEach)(this.hiddenRows, function (col) { - if (col >= index) { - col -= amount; + (0, _array.arrayEach)(this.hiddenRows, function (row) { + var visualRow = row; + + if (visualRow >= index) { + visualRow -= amount; } - tempHidden.push(col); + tempHidden.push(visualRow); }); this.hiddenRows = tempHidden; } @@ -108135,8 +108222,8 @@ var TrimRows = function (_BasePlugin) { this.addHook('beforeRemoveRow', function (index, amount) { return _this2.onBeforeRemoveRow(index, amount); }); - this.addHook('afterRemoveRow', function (index, amount) { - return _this2.onAfterRemoveRow(index, amount); + this.addHook('afterRemoveRow', function () { + return _this2.onAfterRemoveRow(); }); this.addHook('afterLoadData', function (firstRun) { return _this2.onAfterLoadData(firstRun); @@ -108189,10 +108276,10 @@ var TrimRows = function (_BasePlugin) { var _this3 = this; (0, _array.arrayEach)(rows, function (row) { - row = parseInt(row, 10); + var physicalRow = parseInt(row, 10); - if (!_this3.isTrimmed(row)) { - _this3.trimmedRows.push(row); + if (!_this3.isTrimmed(physicalRow)) { + _this3.trimmedRows.push(physicalRow); } }); @@ -108231,10 +108318,10 @@ var TrimRows = function (_BasePlugin) { var _this4 = this; (0, _array.arrayEach)(rows, function (row) { - row = parseInt(row, 10); + var physicalRow = parseInt(row, 10); - if (_this4.isTrimmed(row)) { - _this4.trimmedRows.splice(_this4.trimmedRows.indexOf(row), 1); + if (_this4.isTrimmed(physicalRow)) { + _this4.trimmedRows.splice(_this4.trimmedRows.indexOf(physicalRow), 1); } }); @@ -108293,11 +108380,13 @@ var TrimRows = function (_BasePlugin) { }, { key: 'onModifyRow', value: function onModifyRow(row, source) { + var physicalRow = row; + if (source !== this.pluginName) { - row = this.rowsMapper.getValueByIndex(row); + physicalRow = this.rowsMapper.getValueByIndex(physicalRow); } - return row; + return physicalRow; } /** @@ -108312,11 +108401,13 @@ var TrimRows = function (_BasePlugin) { }, { key: 'onUnmodifyRow', value: function onUnmodifyRow(row, source) { + var visualRow = row; + if (source !== this.pluginName) { - row = this.rowsMapper.getIndexByValue(row); + visualRow = this.rowsMapper.getIndexByValue(visualRow); } - return row; + return visualRow; } /** @@ -108377,13 +108468,11 @@ var TrimRows = function (_BasePlugin) { * On after remove row listener. * * @private - * @param {Number} index Visual row index. - * @param {Number} amount Defines how many rows removed. */ }, { key: 'onAfterRemoveRow', - value: function onAfterRemoveRow(index, amount) { + value: function onAfterRemoveRow() { this.rowsMapper.unshiftItems(this.removedRows); } @@ -108432,7 +108521,7 @@ exports.__esModule = 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 _arrayMapper = __webpack_require__(51); +var _arrayMapper = __webpack_require__(55); var _arrayMapper2 = _interopRequireDefault(_arrayMapper); @@ -108480,7 +108569,7 @@ var RowsMapper = function () { (0, _number.rangeEach)(originLength - 1, function (itemIndex) { if (_this.trimRows.isTrimmed(itemIndex)) { - rowOffset++; + rowOffset += 1; } else { _this._arrayMap[itemIndex - rowOffset] = itemIndex; } @@ -108662,14 +108751,15 @@ var BottomOverlay = function (_Overlay) { }, { key: 'sumCellSizes', value: function sumCellSizes(from, to) { + var row = from; var sum = 0; var defaultRowHeight = this.wot.wtSettings.settings.defaultRowHeight; - while (from < to) { - var height = this.wot.wtTable.getRowHeight(from); + while (row < to) { + var height = this.wot.wtTable.getRowHeight(row); sum += height === void 0 ? defaultRowHeight : height; - from++; + row += 1; } return sum; @@ -108709,7 +108799,6 @@ var BottomOverlay = function (_Overlay) { var scrollbarWidth = masterHolder.clientWidth === masterHolder.offsetWidth ? 0 : (0, _element.getScrollbarWidth)(); var overlayRoot = this.clone.wtTable.holder.parentNode; var overlayRootStyle = overlayRoot.style; - var tableHeight = void 0; if (this.trimmingContainer === window) { overlayRootStyle.width = ''; @@ -108719,7 +108808,7 @@ var BottomOverlay = function (_Overlay) { this.clone.wtTable.holder.style.width = overlayRootStyle.width; - tableHeight = (0, _element.outerHeight)(this.clone.wtTable.TABLE); + var tableHeight = (0, _element.outerHeight)(this.clone.wtTable.TABLE); overlayRootStyle.height = (tableHeight === 0 ? tableHeight : tableHeight) + 'px'; } diff --git a/dist/handsontable.full.min.css b/dist/handsontable.full.min.css index 6a97e2e6..76b88681 100644 --- a/dist/handsontable.full.min.css +++ b/dist/handsontable.full.min.css @@ -21,8 +21,8 @@ * RELIABILITY AND PERFORMANCE WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE SOFTWARE WILL BE * UNINTERRUPTED OR ERROR FREE. * - * Version: 5.0.1 - * Release date: 16/08/2018 (built at 16/08/2018 12:33:13) + * Version: 5.0.2 + * Release date: 12/09/2018 (built at 12/09/2018 12:30:38) */.handsontable .table td,.handsontable .table th{border-top:none}.handsontable tr{background:#fff}.handsontable td{background-color:inherit}.handsontable .table caption+thead tr:first-child td,.handsontable .table caption+thead tr:first-child th,.handsontable .table colgroup+thead tr:first-child td,.handsontable .table colgroup+thead tr:first-child th,.handsontable .table thead:first-child tr:first-child td,.handsontable .table thead:first-child tr:first-child th{border-top:1px solid #ccc}.handsontable .table-bordered{border:0;border-collapse:separate}.handsontable .table-bordered td,.handsontable .table-bordered th{border-left:none}.handsontable .table-bordered td:first-child,.handsontable .table-bordered th:first-child{border-left:1px solid #ccc}.handsontable .table>tbody>tr>td,.handsontable .table>tbody>tr>th,.handsontable .table>tfoot>tr>td,.handsontable .table>tfoot>tr>th,.handsontable .table>thead>tr>td,.handsontable .table>thead>tr>th{line-height:21px;padding:0 4px}.col-lg-1.handsontable,.col-lg-2.handsontable,.col-lg-3.handsontable,.col-lg-4.handsontable,.col-lg-5.handsontable,.col-lg-6.handsontable,.col-lg-7.handsontable,.col-lg-8.handsontable,.col-lg-9.handsontable,.col-lg-10.handsontable,.col-lg-11.handsontable,.col-lg-12.handsontable,.col-md-1.handsontable,.col-md-2.handsontable,.col-md-3.handsontable,.col-md-4.handsontable,.col-md-5.handsontable,.col-md-6.handsontable,.col-md-7.handsontable,.col-md-8.handsontable,.col-md-9.handsontable .col-sm-1.handsontable,.col-md-10.handsontable,.col-md-11.handsontable,.col-md-12.handsontable,.col-sm-2.handsontable,.col-sm-3.handsontable,.col-sm-4.handsontable,.col-sm-5.handsontable,.col-sm-6.handsontable,.col-sm-7.handsontable,.col-sm-8.handsontable,.col-sm-9.handsontable .col-xs-1.handsontable,.col-sm-10.handsontable,.col-sm-11.handsontable,.col-sm-12.handsontable,.col-xs-2.handsontable,.col-xs-3.handsontable,.col-xs-4.handsontable,.col-xs-5.handsontable,.col-xs-6.handsontable,.col-xs-7.handsontable,.col-xs-8.handsontable,.col-xs-9.handsontable,.col-xs-10.handsontable,.col-xs-11.handsontable,.col-xs-12.handsontable{padding-left:0;padding-right:0}.handsontable .table-striped>tbody>tr:nth-of-type(2n){background-color:#fff}.handsontable{position:relative}.handsontable .hide{display:none}.handsontable .relative{position:relative}.handsontable.htAutoSize{visibility:hidden;left:-99000px;position:absolute;top:-99000px}.handsontable .wtHider{width:0}.handsontable .wtSpreader{position:relative;width:0;height:auto}.handsontable div,.handsontable input,.handsontable table,.handsontable tbody,.handsontable td,.handsontable textarea,.handsontable th,.handsontable thead{box-sizing:content-box;-webkit-box-sizing:content-box;-moz-box-sizing:content-box}.handsontable input,.handsontable textarea{min-height:0}.handsontable table.htCore{border-collapse:separate;border-spacing:0;margin:0;border-width:0;table-layout:fixed;width:0;outline-width:0;cursor:default;max-width:none;max-height:none}.handsontable col,.handsontable col.rowHeader{width:50px}.handsontable td,.handsontable th{border-top-width:0;border-left-width:0;border-right:1px solid #ccc;border-bottom:1px solid #ccc;height:22px;empty-cells:show;line-height:21px;padding:0 4px;background-color:#fff;vertical-align:top;overflow:hidden;outline-width:0;white-space:pre-line;background-clip:padding-box}.handsontable td.htInvalid{background-color:#ff4c42!important}.handsontable td.htNoWrap{white-space:nowrap}.handsontable th:last-child{border-right:1px solid #ccc;border-bottom:1px solid #ccc}.handsontable th.htNoFrame,.handsontable th:first-child.htNoFrame,.handsontable tr:first-child th.htNoFrame{border-left-width:0;background-color:#fff;border-color:#fff}.handsontable .htNoFrame+td,.handsontable .htNoFrame+th,.handsontable.htRowHeaders thead tr th:nth-child(2),.handsontable td:first-of-type,.handsontable th:first-child,.handsontable th:nth-child(2){border-left:1px solid #ccc}.handsontable tr:first-child td,.handsontable tr:first-child th{border-top:1px solid #ccc}.ht_master:not(.innerBorderLeft):not(.emptyColumns)~.handsontable:not(.ht_clone_top) thead tr th:first-child,.ht_master:not(.innerBorderLeft):not(.emptyColumns)~.handsontable tbody tr th{border-right-width:0}.ht_master:not(.innerBorderTop) thead tr.lastChild th,.ht_master:not(.innerBorderTop) thead tr:last-child th,.ht_master:not(.innerBorderTop)~.handsontable thead tr.lastChild th,.ht_master:not(.innerBorderTop)~.handsontable thead tr:last-child th{border-bottom-width:0}.handsontable th{background-color:#f0f0f0;color:#222;text-align:center;font-weight:400;white-space:nowrap}.handsontable thead th{padding:0}.handsontable th.active{background-color:#ccc}.handsontable thead th .relative{padding:2px 4px}#hot-display-license-info{font-size:10px;color:#323232;padding:5px 0 3px;font-family:Helvetica,Arial,sans-serif;text-align:left}.handsontable .manualColumnResizer{position:fixed;top:0;cursor:col-resize;z-index:110;width:5px;height:25px}.handsontable .manualRowResizer{position:fixed;left:0;cursor:row-resize;z-index:110;height:5px;width:50px}.handsontable .manualColumnResizer.active,.handsontable .manualColumnResizer:hover,.handsontable .manualRowResizer.active,.handsontable .manualRowResizer:hover{background-color:#34a9db}.handsontable .manualColumnResizerGuide{position:fixed;right:0;top:0;background-color:#34a9db;display:none;width:0;border-right:1px dashed #777;margin-left:5px}.handsontable .manualRowResizerGuide{position:fixed;left:0;bottom:0;background-color:#34a9db;display:none;height:0;border-bottom:1px dashed #777;margin-top:5px}.handsontable .manualColumnResizerGuide.active,.handsontable .manualRowResizerGuide.active{display:block;z-index:199}.handsontable .columnSorting{position:relative}.handsontable .columnSorting:hover{text-decoration:underline;cursor:pointer}.handsontable .columnSorting.ascending:after{content:"\25B2";color:#5f5f5f;position:absolute;right:-15px}.handsontable .columnSorting.descending:after{content:"\25BC";color:#5f5f5f;position:absolute;right:-15px}.handsontable .wtBorder{position:absolute;font-size:0}.handsontable .wtBorder.hidden{display:none!important}.handsontable .wtBorder.current{z-index:10}.handsontable .wtBorder.area{z-index:8}.handsontable .wtBorder.fill{z-index:6}.handsontable td.area,.handsontable td.area-1,.handsontable td.area-2,.handsontable td.area-3,.handsontable td.area-4,.handsontable td.area-5,.handsontable td.area-6,.handsontable td.area-7{position:relative}.handsontable td.area-1:before,.handsontable td.area-2:before,.handsontable td.area-3:before,.handsontable td.area-4:before,.handsontable td.area-5:before,.handsontable td.area-6:before,.handsontable td.area-7:before,.handsontable td.area:before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;bottom:-100%\9;background:#005eff}@media (-ms-high-contrast:none),screen and (-ms-high-contrast:active){.handsontable td.area-1:before,.handsontable td.area-2:before,.handsontable td.area-3:before,.handsontable td.area-4:before,.handsontable td.area-5:before,.handsontable td.area-6:before,.handsontable td.area-7:before,.handsontable td.area:before{bottom:-100%}}.handsontable td.area:before{opacity:.1}.handsontable td.area-1:before{opacity:.2}.handsontable td.area-2:before{opacity:.27}.handsontable td.area-3:before{opacity:.35}.handsontable td.area-4:before{opacity:.41}.handsontable td.area-5:before{opacity:.47}.handsontable td.area-6:before{opacity:.54}.handsontable td.area-7:before{opacity:.58}.handsontable tbody th.ht__highlight,.handsontable thead th.ht__highlight{background-color:#dcdcdc}.handsontable tbody th.ht__active_highlight,.handsontable thead th.ht__active_highlight{background-color:#8eb0e7;color:#000}.handsontable .wtBorder.corner{font-size:0;cursor:crosshair}.handsontable .htBorder.htFillBorder{background:red;width:1px;height:1px}.handsontableInput{border:none;outline-width:0;margin:0;padding:1px 5px 0;font-family:inherit;line-height:21px;font-size:inherit;box-shadow:inset 0 0 0 2px #5292f7;resize:none;display:block;color:#000;border-radius:0;background-color:#fff}.handsontableInputHolder{position:absolute;top:0;left:0;z-index:104}.htSelectEditor{-webkit-appearance:menulist-button!important;position:absolute;width:auto}.handsontable .htDimmed{color:#777}.handsontable .htSubmenu{position:relative}.handsontable .htSubmenu :after{content:"\25B6";color:#777;position:absolute;right:5px;font-size:9px}.handsontable .htLeft{text-align:left}.handsontable .htCenter{text-align:center}.handsontable .htRight{text-align:right}.handsontable .htJustify{text-align:justify}.handsontable .htTop{vertical-align:top}.handsontable .htMiddle{vertical-align:middle}.handsontable .htBottom{vertical-align:bottom}.handsontable .htPlaceholder{color:#999}.handsontable .htAutocompleteArrow{float:right;font-size:10px;color:#eee;cursor:default;width:16px;text-align:center}.handsontable td .htAutocompleteArrow:hover{color:#777}.handsontable td.area .htAutocompleteArrow{color:#d3d3d3}.handsontable .htCheckboxRendererInput{display:inline-block}.handsontable .htCheckboxRendererInput.noValue{opacity:.5}.handsontable .htCheckboxRendererLabel{cursor:pointer;display:inline-block;width:100%}.handsontable .handsontable.ht_clone_top .wtHider{padding:0 0 5px}.handsontable .autocompleteEditor.handsontable{padding-right:17px}.handsontable .autocompleteEditor.handsontable.htMacScroll{padding-right:15px}.handsontable.listbox{margin:0}.handsontable.listbox .ht_master table{border:1px solid #ccc;border-collapse:separate;background:#fff}.handsontable.listbox td,.handsontable.listbox th,.handsontable.listbox tr:first-child td,.handsontable.listbox tr:first-child th,.handsontable.listbox tr:last-child th{border-color:transparent}.handsontable.listbox td,.handsontable.listbox th{white-space:nowrap;text-overflow:ellipsis}.handsontable.listbox td.htDimmed{cursor:default;color:inherit;font-style:inherit}.handsontable.listbox .wtBorder{visibility:hidden}.handsontable.listbox tr:hover td,.handsontable.listbox tr td.current{background:#eee}.ht_clone_top{z-index:101}.ht_clone_left{z-index:102}.ht_clone_bottom_left_corner,.ht_clone_debug,.ht_clone_top_left_corner{z-index:103}.handsontable td.htSearchResult{background:#fcedd9;color:#583707}.htBordered{border-width:1px}.htBordered.htTopBorderSolid{border-top-style:solid;border-top-color:#000}.htBordered.htRightBorderSolid{border-right-style:solid;border-right-color:#000}.htBordered.htBottomBorderSolid{border-bottom-style:solid;border-bottom-color:#000}.htBordered.htLeftBorderSolid{border-left-style:solid;border-left-color:#000}.handsontable tbody tr th:nth-last-child(2){border-right:1px solid #ccc}.handsontable thead tr:nth-last-child(2) th.htGroupIndicatorContainer{border-bottom:1px solid #ccc;padding-bottom:5px}.ht_clone_top_left_corner thead tr th:nth-last-child(2){border-right:1px solid #ccc}.htCollapseButton{width:10px;height:10px;line-height:10px;text-align:center;border-radius:5px;border:1px solid #f3f3f3;box-shadow:1px 1px 3px rgba(0,0,0,.4);cursor:pointer;margin-bottom:3px;position:relative}.htCollapseButton:after{content:"";height:300%;width:1px;display:block;background:#ccc;margin-left:4px;position:absolute;bottom:10px}thead .htCollapseButton{right:5px;position:absolute;top:5px;background:#fff}thead .htCollapseButton:after{height:1px;width:700%;right:10px;top:4px}.handsontable tr th .htExpandButton{position:absolute;width:10px;height:10px;line-height:10px;text-align:center;border-radius:5px;border:1px solid #f3f3f3;box-shadow:1px 1px 3px rgba(0,0,0,.4);cursor:pointer;top:0;display:none}.handsontable thead tr th .htExpandButton{top:5px}.handsontable tr th .htExpandButton.clickable{display:block}.collapsibleIndicator{position:absolute;top:50%;transform:translateY(-50%);right:5px;border:1px solid #a6a6a6;line-height:10px;color:#222;border-radius:10px;font-size:10px;width:10px;height:10px;cursor:pointer;box-shadow:0 0 0 6px #eee;background:#eee}.handsontable col.hidden{width:0!important}.handsontable table tr th.lightRightBorder{border-right:1px solid #e6e6e6}.handsontable tr.hidden,.handsontable tr.hidden td,.handsontable tr.hidden th{display:none}.ht_clone_bottom,.ht_clone_left,.ht_clone_top,.ht_master{overflow:hidden}.ht_master .wtHolder{overflow:auto}.handsontable .ht_clone_left thead,.handsontable .ht_master thead,.handsontable .ht_master tr th{visibility:hidden}.ht_clone_bottom .wtHolder,.ht_clone_left .wtHolder,.ht_clone_top .wtHolder{overflow:hidden}.handsontable.mobile,.handsontable.mobile .wtHolder{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-overflow-scrolling:touch}.htMobileEditorContainer{display:none;position:absolute;top:0;width:70%;height:54pt;background:#f8f8f8;border-radius:20px;border:1px solid #ebebeb;z-index:999;box-sizing:border-box;-webkit-box-sizing:border-box;-webkit-text-size-adjust:none}.topLeftSelectionHandle-HitArea:not(.ht_master .topLeftSelectionHandle-HitArea),.topLeftSelectionHandle:not(.ht_master .topLeftSelectionHandle){z-index:9999}.bottomRightSelectionHandle,.bottomRightSelectionHandle-HitArea,.topLeftSelectionHandle,.topLeftSelectionHandle-HitArea{left:-10000px;top:-10000px}.htMobileEditorContainer.active{display:block}.htMobileEditorContainer .inputs{position:absolute;right:210pt;bottom:10pt;top:10pt;left:14px;height:34pt}.htMobileEditorContainer .inputs textarea{font-size:13pt;border:1px solid #a1a1a1;-webkit-appearance:none;box-shadow:none;position:absolute;left:14px;right:14px;top:0;bottom:0;padding:7pt}.htMobileEditorContainer .cellPointer{position:absolute;top:-13pt;height:0;width:0;left:30px;border-left:13pt solid transparent;border-right:13pt solid transparent;border-bottom:13pt solid #ebebeb}.htMobileEditorContainer .cellPointer.hidden{display:none}.htMobileEditorContainer .cellPointer:before{content:"";display:block;position:absolute;top:2px;height:0;width:0;left:-13pt;border-left:13pt solid transparent;border-right:13pt solid transparent;border-bottom:13pt solid #f8f8f8}.htMobileEditorContainer .moveHandle{position:absolute;top:10pt;left:5px;width:30px;bottom:0;cursor:move;z-index:9999}.htMobileEditorContainer .moveHandle:after{content:"..\A..\A..\A..";white-space:pre;line-height:10px;font-size:20pt;display:inline-block;margin-top:-8px;color:#ebebeb}.htMobileEditorContainer .positionControls{width:205pt;position:absolute;right:5pt;top:0;bottom:0}.htMobileEditorContainer .positionControls>div{width:50pt;height:100%;float:left}.htMobileEditorContainer .positionControls>div:after{content:" ";display:block;width:15pt;height:15pt;text-align:center;line-height:50pt}.htMobileEditorContainer .downButton:after,.htMobileEditorContainer .leftButton:after,.htMobileEditorContainer .rightButton:after,.htMobileEditorContainer .upButton:after{transform-origin:5pt 5pt;-webkit-transform-origin:5pt 5pt;margin:21pt 0 0 21pt}.htMobileEditorContainer .leftButton:after{border-top:2px solid #288ffe;border-left:2px solid #288ffe;-webkit-transform:rotate(-45deg)}.htMobileEditorContainer .leftButton:active:after{border-color:#cfcfcf}.htMobileEditorContainer .rightButton:after{border-top:2px solid #288ffe;border-left:2px solid #288ffe;-webkit-transform:rotate(135deg)}.htMobileEditorContainer .rightButton:active:after{border-color:#cfcfcf}.htMobileEditorContainer .upButton:after{border-top:2px solid #288ffe;border-left:2px solid #288ffe;-webkit-transform:rotate(45deg)}.htMobileEditorContainer .upButton:active:after{border-color:#cfcfcf}.htMobileEditorContainer .downButton:after{border-top:2px solid #288ffe;border-left:2px solid #288ffe;-webkit-transform:rotate(225deg)}.htMobileEditorContainer .downButton:active:after{border-color:#cfcfcf}.handsontable.hide-tween{animation:opacity-hide .3s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}.handsontable.show-tween{animation:opacity-show .3s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards} /*! diff --git a/dist/handsontable.full.min.js b/dist/handsontable.full.min.js index bc1492fe..1cdd08a0 100644 --- a/dist/handsontable.full.min.js +++ b/dist/handsontable.full.min.js @@ -20,19 +20,19 @@ * RELIABILITY AND PERFORMANCE WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE SOFTWARE WILL BE * UNINTERRUPTED OR ERROR FREE. * - * Version: 5.0.1 - * Release date: 16/08/2018 (built at 16/08/2018 12:33:13) + * Version: 5.0.2 + * Release date: 12/09/2018 (built at 12/09/2018 12:30:38) */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Handsontable",[],t):"object"==typeof exports?exports.Handsontable=t():e.Handsontable=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=480)}([function(e,t,n){"use strict";function r(e){for(var t=e.length,n=0;nt?e:t},Array.isArray(e)?e[0]:void 0)}function h(e){return a(e,function(e,t){return e1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:"value",o="_"+n,i=(t={_touched:!1},r(t,o,e),r(t,"isTouched",function(){return this._touched}),t);return Object.defineProperty(i,n,{get:function(){return this[o]},set:function(e){this._touched=!0,this[o]=e},enumerable:!0,configurable:!0}),i}function y(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.__esModule=!0;var w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.duckSchema=o,t.inherit=i,t.extend=a,t.deepExtend=s,t.deepClone=l,t.clone=u,t.mixin=c,t.isObjectEqual=f,t.isObject=h,t.defineGetter=d,t.objectEach=p,t.getProperty=g,t.deepObjectSize=v,t.createObjectPropListener=m,t.hasOwnProperty=y;var b=n(0)},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:0,n=-1,r=null;null!=e;){if(n===t){r=e;break}e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e=e.host:(n++,e=e.parentNode)}return r}function i(e,t,n){for(;null!=e&&e!==n;){if(e.nodeType===Node.ELEMENT_NODE&&(t.indexOf(e.nodeName)>-1||t.indexOf(e)>-1))return e;e=e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.host:e.parentNode}return null}function a(e,t,n){for(var r=[];e&&(e=i(e,t,n))&&(!n||n.contains(e));)r.push(e),e=e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.host:e.parentNode;var o=r.length;return o?r[o-1]:null}function s(e,t){var n=e.parentNode,r=[];for("string"==typeof t?r=Array.prototype.slice.call(document.querySelectorAll(t),0):r.push(t);null!=n;){if(r.indexOf(n)>-1)return!0;n=n.parentNode}return!1}function l(e){function t(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName===n.toUpperCase()}for(var n="hot-table",r=!1,o=u(e);null!=o;){if(t(o)){r=!0;break}if(o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(r=t(o.host))break;o=o.host}o=o.parentNode}return r}function u(e){return"undefined"!=typeof Polymer&&"function"==typeof wrap?wrap(e):e}function c(e){return"undefined"!=typeof Polymer&&"function"==typeof unwrap?unwrap(e):e}function f(e){var t=0;if(e.previousSibling)for(;e=e.previousSibling;)++t;return t}function h(e,t){var n=document.querySelector(".ht_clone_"+e);return n?n.contains(t):null}function d(e){var t=[];if(!e||!e.length)return t;for(var n=0;e[n];)t.push(e[n]),n++;return t}function p(e,t){return J(e,t)}function g(e,t){return ee(e,t)}function v(e,t){return te(e,t)}function m(e,t){if(3===e.nodeType)t.removeChild(e);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(e.nodeName)>-1)for(var n=e.childNodes,r=n.length-1;r>=0;r--)m(n[r],e)}function y(e){for(var t=void 0;t=e.lastChild;)e.removeChild(t)}function w(e,t){ie.test(t)?e.innerHTML=t:b(e,t)}function b(e,t){var n=e.firstChild;n&&3===n.nodeType&&null===n.nextSibling?ae?n.textContent=t:n.data=t:(y(e),e.appendChild(document.createTextNode(t)))}function C(e){for(var t=e;c(t)!==document.documentElement;){if(null===t)return!1;if(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(t.host){if(t.host.impl)return C(t.host.impl);if(t.host)return C(t.host);throw new Error("Lost in Web Components world")}return!1}if("none"===t.style.display)return!1;t=t.parentNode}return!0}function _(e){var t=void 0,n=void 0,r=void 0,o=void 0,i=void 0;if(o=document.documentElement,(0,Z.hasCaptionProblem)()&&e.firstChild&&"CAPTION"===e.firstChild.nodeName)return i=e.getBoundingClientRect(),{top:i.top+(window.pageYOffset||o.scrollTop)-(o.clientTop||0),left:i.left+(window.pageXOffset||o.scrollLeft)-(o.clientLeft||0)};for(t=e.offsetLeft,n=e.offsetTop,r=e;(e=e.offsetParent)&&e!==document.body;)t+=e.offsetLeft,n+=e.offsetTop,r=e;return r&&"fixed"===r.style.position&&(t+=window.pageXOffset||o.scrollLeft,n+=window.pageYOffset||o.scrollTop),{left:t,top:n}}function E(){var e=window.scrollY;return void 0===e&&(e=document.documentElement.scrollTop),e}function O(){var e=window.scrollX;return void 0===e&&(e=document.documentElement.scrollLeft),e}function S(e){return e===window?E():e.scrollTop}function T(e){return e===window?O():e.scrollLeft}function R(e){for(var t=["auto","scroll"],n=e.parentNode,r=void 0,o=void 0,i=void 0,a="",s="",l="",u="";n&&n.style&&document.body!==n;){if(r=n.style.overflow,o=n.style.overflowX,i=n.style.overflowY,"scroll"===r||"scroll"===o||"scroll"===i)return n;if(window.getComputedStyle&&(a=window.getComputedStyle(n),s=a.getPropertyValue("overflow"),l=a.getPropertyValue("overflow-y"),u=a.getPropertyValue("overflow-x"),"scroll"===s||"scroll"===u||"scroll"===l))return n;if(n.clientHeight<=n.scrollHeight+1&&(-1!==t.indexOf(i)||-1!==t.indexOf(r)||-1!==t.indexOf(s)||-1!==t.indexOf(l)))return n;if(n.clientWidth<=n.scrollWidth+1&&(-1!==t.indexOf(o)||-1!==t.indexOf(r)||-1!==t.indexOf(s)||-1!==t.indexOf(u)))return n;n=n.parentNode}return window}function M(e){for(var t=e.parentNode;t&&t.style&&document.body!==t;){if("visible"!==t.style.overflow&&""!==t.style.overflow)return t;if(window.getComputedStyle){var n=window.getComputedStyle(t);if("visible"!==n.getPropertyValue("overflow")&&""!==n.getPropertyValue("overflow"))return t}t=t.parentNode}return window}function k(e,t){if(e){if(e!==window){var n,r=e.style[t];return""!==r&&void 0!==r?r:(n=N(e),""!==n[t]&&void 0!==n[t]?n[t]:void 0)}if("width"===t)return window.innerWidth+"px";if("height"===t)return window.innerHeight+"px"}}function N(e){return e.currentStyle||document.defaultView.getComputedStyle(e)}function A(e){return e.offsetWidth}function I(e){return(0,Z.hasCaptionProblem)()&&e.firstChild&&"CAPTION"===e.firstChild.nodeName?e.offsetHeight+e.firstChild.offsetHeight:e.offsetHeight}function D(e){return e.clientHeight||e.innerHeight}function P(e){return e.clientWidth||e.innerWidth}function x(e,t,n){window.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function L(e,t,n){window.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)}function H(e){if(e.selectionStart)return e.selectionStart;if(document.selection){e.focus();var t=document.selection.createRange();if(null==t)return 0;var n=e.createTextRange(),r=n.duplicate();return n.moveToBookmark(t.getBookmark()),r.setEndPoint("EndToStart",n),r.text.length}return 0}function j(e){if(e.selectionEnd)return e.selectionEnd;if(document.selection){var t=document.selection.createRange();if(null==t)return 0;return e.createTextRange().text.indexOf(t.text)+t.text.length}return 0}function F(){var e="";return window.getSelection?e=window.getSelection().toString():document.selection&&"Control"!==document.selection.type&&(e=document.selection.createRange().text),e}function V(e,t,n){if(void 0===n&&(n=t),e.setSelectionRange){e.focus();try{e.setSelectionRange(t,n)}catch(i){var r=e.parentNode,o=r.style.display;r.style.display="block",e.setSelectionRange(t,n),r.style.display=o}}else if(e.createTextRange){var i=e.createTextRange();i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",t),i.select()}}function B(){var e=document.createElement("div");e.style.height="200px",e.style.width="100%";var t=document.createElement("div");t.style.boxSizing="content-box",t.style.height="150px",t.style.left="0px",t.style.overflow="hidden",t.style.position="absolute",t.style.top="0px",t.style.width="200px",t.style.visibility="hidden",t.appendChild(e),(document.body||document.documentElement).appendChild(t);var n=e.offsetWidth;t.style.overflow="scroll";var r=e.offsetWidth;return n==r&&(r=t.clientWidth),(document.body||document.documentElement).removeChild(t),n-r}function W(){return void 0===oe&&(oe=B()),oe}function U(e){return e.offsetWidth!==e.clientWidth}function Y(e){return e.offsetHeight!==e.clientHeight}function $(e,t,n){(0,q.isIE8)()||(0,q.isIE9)()?(e.style.top=n,e.style.left=t):(0,q.isSafari)()?e.style["-webkit-transform"]="translate3d("+t+","+n+",0)":e.style.transform="translate3d("+t+","+n+",0)"}function G(e){var t=void 0;return e.style.transform&&""!==(t=e.style.transform)?["transform",t]:e.style["-webkit-transform"]&&""!==(t=e.style["-webkit-transform"])?["-webkit-transform",t]:-1}function z(e){e.style.transform&&""!==e.style.transform?e.style.transform="":e.style["-webkit-transform"]&&""!==e.style["-webkit-transform"]&&(e.style["-webkit-transform"]="")}function X(e){var t=["INPUT","SELECT","TEXTAREA"];return e&&(t.indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function K(e){return X(e)&&-1==e.className.indexOf("handsontableInput")&&-1==e.className.indexOf("copyPaste")}t.__esModule=!0,t.HTML_CHARACTERS=void 0,t.getParent=o,t.closest=i,t.closestDown=a,t.isChildOf=s,t.isChildOfWebComponentTable=l,t.polymerWrap=u,t.polymerUnwrap=c,t.index=f,t.overlayContainsElement=h,t.hasClass=p,t.addClass=g,t.removeClass=v,t.removeTextNodes=m,t.empty=y,t.fastInnerHTML=w,t.fastInnerText=b,t.isVisible=C,t.offset=_,t.getWindowScrollTop=E,t.getWindowScrollLeft=O,t.getScrollTop=S,t.getScrollLeft=T,t.getScrollableElement=R,t.getTrimmingContainer=M,t.getStyle=k,t.getComputedStyle=N,t.outerWidth=A,t.outerHeight=I,t.innerHeight=D,t.innerWidth=P,t.addEvent=x,t.removeEvent=L,t.getCaretPosition=H,t.getSelectionEndPosition=j,t.getSelectionText=F,t.setCaretPosition=V,t.getScrollbarWidth=W,t.hasVerticalScrollbar=U,t.hasHorizontalScrollbar=Y,t.setOverlayPosition=$,t.getCssTransform=G,t.resetCssTransform=z,t.isInput=X,t.isOutsideInput=K;var q=n(50),Z=n(42),Q=!!document.documentElement.classList,J=void 0,ee=void 0,te=void 0;if(Q){var ne=function(){var e=document.createElement("div");return e.classList.add("test","test2"),e.classList.contains("test2")}();J=function(e,t){return void 0!==e.classList&&"string"==typeof t&&""!==t&&e.classList.contains(t)},ee=function(e,t){if("string"==typeof t&&(t=t.split(" ")),t=d(t),t.length>0)if(ne){var n;(n=e.classList).add.apply(n,r(t))}else for(var o=0;t&&t[o];)e.classList.add(t[o]),o++},te=function(e,t){if("string"==typeof t&&(t=t.split(" ")),t=d(t),t.length>0)if(ne){var n;(n=e.classList).remove.apply(n,r(t))}else for(var o=0;t&&t[o];)e.classList.remove(t[o]),o++}}else{var re=function(e){return new RegExp("(\\s|^)"+e+"(\\s|$)")};J=function(e,t){return void 0!==e.className&&re(t).test(e.className)},ee=function(e,t){var n=0,r=e.className;if("string"==typeof t&&(t=t.split(" ")),""===r)r=t.join(" ");else for(;t&&t[n];)re(t[n]).test(r)||(r+=" "+t[n]),n++;e.className=r},te=function(e,t){var n=0,r=e.className;for("string"==typeof t&&(t=t.split(" "));t&&t[n];)r=r.replace(re(t[n])," ").trim(),n++;e.className!==r&&(e.className=r)}}var oe,ie=t.HTML_CHARACTERS=/(<(.*)>|&(.*);)/,ae=!!document.createTextNode("test").textContent},function(e,t,n){"use strict";t.__esModule=!0;var r=t.CONTEXT_MENU_ITEMS_NAMESPACE="ContextMenu:items",o=(t.CONTEXTMENU_ITEMS_ROW_ABOVE=r+".insertRowAbove",t.CONTEXTMENU_ITEMS_ROW_BELOW=r+".insertRowBelow",t.CONTEXTMENU_ITEMS_INSERT_LEFT=r+".insertColumnOnTheLeft",t.CONTEXTMENU_ITEMS_INSERT_RIGHT=r+".insertColumnOnTheRight",t.CONTEXTMENU_ITEMS_REMOVE_ROW=r+".removeRow",t.CONTEXTMENU_ITEMS_REMOVE_COLUMN=r+".removeColumn",t.CONTEXTMENU_ITEMS_UNDO=r+".undo",t.CONTEXTMENU_ITEMS_REDO=r+".redo",t.CONTEXTMENU_ITEMS_READ_ONLY=r+".readOnly",t.CONTEXTMENU_ITEMS_CLEAR_COLUMN=r+".clearColumn",t.CONTEXTMENU_ITEMS_COPY=r+".copy",t.CONTEXTMENU_ITEMS_CUT=r+".cut",t.CONTEXTMENU_ITEMS_FREEZE_COLUMN=r+".freezeColumn",t.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN=r+".unfreezeColumn",t.CONTEXTMENU_ITEMS_MERGE_CELLS=r+".mergeCells",t.CONTEXTMENU_ITEMS_UNMERGE_CELLS=r+".unmergeCells",t.CONTEXTMENU_ITEMS_ADD_COMMENT=r+".addComment",t.CONTEXTMENU_ITEMS_EDIT_COMMENT=r+".editComment",t.CONTEXTMENU_ITEMS_REMOVE_COMMENT=r+".removeComment",t.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT=r+".readOnlyComment",t.CONTEXTMENU_ITEMS_ALIGNMENT=r+".align",t.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT=r+".align.left",t.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER=r+".align.center",t.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT=r+".align.right",t.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY=r+".align.justify",t.CONTEXTMENU_ITEMS_ALIGNMENT_TOP=r+".align.top",t.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE=r+".align.middle",t.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM=r+".align.bottom",t.CONTEXTMENU_ITEMS_BORDERS=r+".borders",t.CONTEXTMENU_ITEMS_BORDERS_TOP=r+".borders.top",t.CONTEXTMENU_ITEMS_BORDERS_RIGHT=r+".borders.right",t.CONTEXTMENU_ITEMS_BORDERS_BOTTOM=r+".borders.bottom",t.CONTEXTMENU_ITEMS_BORDERS_LEFT=r+".borders.left",t.CONTEXTMENU_ITEMS_REMOVE_BORDERS=r+".borders.remove",t.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD=r+".nestedHeaders.insertChildRow",t.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD=r+".nestedHeaders.detachFromParent",t.CONTEXTMENU_ITEMS_HIDE_COLUMN=r+".hideColumn",t.CONTEXTMENU_ITEMS_SHOW_COLUMN=r+".showColumn",t.CONTEXTMENU_ITEMS_HIDE_ROW=r+".hideRow",t.CONTEXTMENU_ITEMS_SHOW_ROW=r+".showRow",t.FILTERS_NAMESPACE="Filters:"),i=t.FILTERS_CONDITIONS_NAMESPACE=o+"conditions";t.FILTERS_CONDITIONS_NONE=i+".none",t.FILTERS_CONDITIONS_EMPTY=i+".isEmpty",t.FILTERS_CONDITIONS_NOT_EMPTY=i+".isNotEmpty",t.FILTERS_CONDITIONS_EQUAL=i+".isEqualTo",t.FILTERS_CONDITIONS_NOT_EQUAL=i+".isNotEqualTo",t.FILTERS_CONDITIONS_BEGINS_WITH=i+".beginsWith",t.FILTERS_CONDITIONS_ENDS_WITH=i+".endsWith",t.FILTERS_CONDITIONS_CONTAINS=i+".contains",t.FILTERS_CONDITIONS_NOT_CONTAIN=i+".doesNotContain",t.FILTERS_CONDITIONS_BY_VALUE=i+".byValue",t.FILTERS_CONDITIONS_GREATER_THAN=i+".greaterThan",t.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL=i+".greaterThanOrEqualTo",t.FILTERS_CONDITIONS_LESS_THAN=i+".lessThan",t.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL=i+".lessThanOrEqualTo",t.FILTERS_CONDITIONS_BETWEEN=i+".isBetween",t.FILTERS_CONDITIONS_NOT_BETWEEN=i+".isNotBetween",t.FILTERS_CONDITIONS_AFTER=i+".after",t.FILTERS_CONDITIONS_BEFORE=i+".before",t.FILTERS_CONDITIONS_TODAY=i+".today",t.FILTERS_CONDITIONS_TOMORROW=i+".tomorrow",t.FILTERS_CONDITIONS_YESTERDAY=i+".yesterday",t.FILTERS_DIVS_FILTER_BY_CONDITION=o+"labels.filterByCondition",t.FILTERS_DIVS_FILTER_BY_VALUE=o+"labels.filterByValue",t.FILTERS_LABELS_CONJUNCTION=o+"labels.conjunction",t.FILTERS_LABELS_DISJUNCTION=o+"labels.disjunction",t.FILTERS_VALUES_BLANK_CELLS=o+"values.blankCells",t.FILTERS_BUTTONS_SELECT_ALL=o+"buttons.selectAll",t.FILTERS_BUTTONS_CLEAR=o+"buttons.clear",t.FILTERS_BUTTONS_OK=o+"buttons.ok",t.FILTERS_BUTTONS_CANCEL=o+"buttons.cancel",t.FILTERS_BUTTONS_PLACEHOLDER_SEARCH=o+"buttons.placeholder.search",t.FILTERS_BUTTONS_PLACEHOLDER_VALUE=o+"buttons.placeholder.value",t.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE=o+"buttons.placeholder.secondValue"},function(e,t,n){"use strict";function r(e){var t=void 0===e?"undefined":s(e);return"number"==t?!isNaN(e)&&isFinite(e):"string"==t?!!e.length&&(1==e.length?/\d/.test(e):/^\s*[+-]?\s*(?:(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?)|(?:0x[a-f\d]+))\s*$/i.test(e)):"object"==t&&!(!e||"number"!=typeof e.valueOf()||e instanceof Date)}function o(e,t,n){var r=-1;for("function"==typeof t?(n=t,t=e):r=e-1;++r<=t&&!1!==n(r););}function i(e,t,n){var r=e+1;for("function"==typeof t&&(n=t,t=0);--r>=t&&!1!==n(r););}function a(e,t){return t=parseInt(t.toString().replace("%",""),10),t=parseInt(e*t/100,10)}t.__esModule=!0;var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.isNumeric=r,t.rangeEach=o,t.rangeEachReverse=i,t.valueAccordingPercent=a},function(e,t,n){"use strict";function r(e,t){e=(0,c.toUpperCaseFirst)(e),l.default.getSingleton().add("construct",function(){var n=void 0;f.has(this)||f.set(this,{}),n=f.get(this),n[e]||(n[e]=new t(this))}),l.default.getSingleton().add("afterDestroy",function(){if(f.has(this)){var e=f.get(this);(0,u.objectEach)(e,function(e){return e.destroy()}),f.delete(this)}})}function o(e,t){if("string"!=typeof t)throw Error('Only strings can be passed as "plugin" parameter');var n=(0,c.toUpperCaseFirst)(t);if(f.has(e)&&f.get(e)[n])return f.get(e)[n]}function i(e){return f.has(e)?Object.keys(f.get(e)):[]}function a(e,t){var n=null;return f.has(e)&&(0,u.objectEach)(f.get(e),function(e,r){e===t&&(n=r)}),n}t.__esModule=!0,t.getPluginName=t.getRegistredPluginNames=t.getPlugin=t.registerPlugin=void 0;var s=n(17),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=n(1),c=n(32),f=new WeakMap;t.registerPlugin=r,t.getPlugin=o,t.getRegistredPluginNames=i,t.getPluginName=a},function(e,t,n){var r=n(16),o=n(48),i=n(38),a=n(37),s=n(39),l=function(e,t,n){var u,c,f,h,d=e&l.F,p=e&l.G,g=e&l.S,v=e&l.P,m=e&l.B,y=p?r:g?r[t]||(r[t]={}):(r[t]||{}).prototype,w=p?o:o[t]||(o[t]={}),b=w.prototype||(w.prototype={});p&&(n=t);for(u in n)c=!d&&y&&void 0!==y[u],f=(c?y:n)[u],h=m&&c?s(f,r):v&&"function"==typeof f?s(Function.call,f):f,y&&a(y,u,f,e&l.U),w[u]!=f&&i(w,u,h),v&&b[u]!=f&&(b[u]=f)};r.core=o,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n=0&&c.splice(c.indexOf(this.pluginName),1),c.length||this.hot.runHooks("afterPluginsInitialized"),this.initialized=!0}},{key:"enablePlugin",value:function(){this.enabled=!0}},{key:"disablePlugin",value:function(){this.eventManager&&this.eventManager.clear(),this.clearHooks(),this.enabled=!1}},{key:"addHook",value:function(e,t){u.get(this).hooks[e]=u.get(this).hooks[e]||[];var n=u.get(this).hooks[e];this.hot.addHook(e,t),n.push(t),u.get(this).hooks[e]=n}},{key:"removeHooks",value:function(e){var t=this;(0,a.arrayEach)(u.get(this).hooks[e]||[],function(n){t.hot.removeHook(e,n)})}},{key:"clearHooks",value:function(){var e=this,t=u.get(this).hooks;(0,i.objectEach)(t,function(t,n){return e.removeHooks(n)}),t.length=0}},{key:"callOnPluginsReady",value:function(e){this.isPluginsReady?e():this.pluginsInitializedCallbacks.push(e)}},{key:"onAfterPluginsInitialized",value:function(){(0,a.arrayEach)(this.pluginsInitializedCallbacks,function(e){return e()}),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}},{key:"onUpdateSettings",value:function(){this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&this.updatePlugin())}},{key:"updatePlugin",value:function(){}},{key:"destroy",value:function(){var e=this;this.eventManager&&this.eventManager.destroy(),this.clearHooks(),(0,i.objectEach)(this,function(t,n){"hot"!==n&&"t"!==n&&(e[n]=null)}),delete this.t,delete this.hot}}]),e}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.Viewport=t.TableRenderer=t.Table=t.Settings=t.Selection=t.Scroll=t.Overlays=t.Event=t.Core=t.default=t.Border=t.TopLeftCornerOverlay=t.TopOverlay=t.LeftOverlay=t.DebugOverlay=t.RowFilter=t.ColumnFilter=t.CellRange=t.CellCoords=t.ViewportRowsCalculator=t.ViewportColumnsCalculator=void 0,n(88),n(97),n(98),n(99),n(100),n(103),n(105),n(106),n(107),n(108),n(109),n(110),n(111),n(112),n(113),n(114),n(115),n(116),n(117),n(118),n(119),n(120),n(121),n(122),n(123),n(126),n(127),n(128),n(129),n(130),n(131),n(132),n(133),n(135),n(136),n(137),n(138),n(139),n(82),n(140),n(141),n(142),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154);var o=n(192),i=r(o),a=n(193),s=r(a),l=n(64),u=r(l),c=n(194),f=r(c),h=n(195),d=r(h),p=n(196),g=r(p),v=n(503),m=r(v),y=n(505),w=r(y),b=n(506),C=r(b),_=n(507),E=r(_),O=n(325),S=r(O),T=n(197),R=r(T),M=n(318),k=r(M),N=n(319),A=r(N),I=n(320),D=r(I),P=n(508),x=r(P),L=n(321),H=r(L),j=n(322),F=r(j),V=n(323),B=r(V),W=n(324),U=r(W);t.ViewportColumnsCalculator=i.default,t.ViewportRowsCalculator=s.default,t.CellCoords=u.default,t.CellRange=f.default,t.ColumnFilter=d.default,t.RowFilter=g.default,t.DebugOverlay=m.default,t.LeftOverlay=w.default,t.TopOverlay=C.default,t.TopLeftCornerOverlay=E.default,t.Border=S.default,t.default=R.default,t.Core=R.default,t.Event=k.default,t.Overlays=A.default,t.Scroll=D.default,t.Selection=x.default,t.Settings=H.default,t.Table=F.default,t.TableRenderer=B.default,t.Viewport=U.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){var n=void 0,r=void 0,o=void 0,i=void 0,a=void 0,f=void 0;if(t.isTargetWebComponent=!1,t.realTarget=t.target,f=t.stopImmediatePropagation,t.stopImmediatePropagation=function(){f.apply(this),(0,c.stopImmediatePropagation)(this)},!h.isHotTableEnv)return t;for(t=(0,s.polymerWrap)(t),a=t.path?t.path.length:0;a--;){if("HOT-TABLE"===t.path[a].nodeName)n=!0;else if(n&&t.path[a].shadowRoot){i=t.path[a];break}0!==a||i||(i=t.path[a])}return i||(i=t.target),t.isTargetWebComponent=!0,(0,u.isWebComponentSupportedNatively)()?t.realTarget=t.srcElement||t.toElement:((0,l.hasOwnProperty)(e,"hot")||e.isHotTableEnv||e.wtTable)&&((0,l.hasOwnProperty)(e,"hot")?r=e.hot?e.hot.view.wt.wtTable.TABLE:null:e.isHotTableEnv?r=e.view.activeWt.wtTable.TABLE.parentNode.parentNode:e.wtTable&&(r=e.wtTable.TABLE.parentNode.parentNode),o=(0,s.closest)(t.target,["HOT-TABLE"],r),t.realTarget=o?r.querySelector("HOT-TABLE")||t.target:t.target),Object.defineProperty(t,"target",{get:function(){return(0,s.polymerWrap)(i)},enumerable:!0,configurable:!0}),t}function i(){return f}t.__esModule=!0;var a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null;r(this,e),this.context=t||this,this.context.eventListeners||(this.context.eventListeners=[])}return a(e,[{key:"addEventListener",value:function(e,t,n){function r(e){e=o(a,e),n.call(this,e)}var i=this,a=this.context;return this.context.eventListeners.push({element:e,event:t,callback:n,callbackProxy:r}),window.addEventListener?e.addEventListener(t,r,!1):e.attachEvent("on"+t,r),f++,function(){i.removeEventListener(e,t,n)}}},{key:"removeEventListener",value:function(e,t,n){for(var r=this.context.eventListeners.length,o=void 0;r--;)if(o=this.context.eventListeners[r],o.event===t&&o.element===e){if(n&&n!==o.callback)continue;this.context.eventListeners.splice(r,1),o.element.removeEventListener?o.element.removeEventListener(o.event,o.callbackProxy,!1):o.element.detachEvent("on"+o.event,o.callbackProxy),f--}}},{key:"clearEvents",value:function(){if(this.context)for(var e=this.context.eventListeners.length;e--;){var t=this.context.eventListeners[e];t&&this.removeEventListener(t.element,t.event,t.callback)}}},{key:"clear",value:function(){this.clearEvents()}},{key:"destroy",value:function(){this.clearEvents(),this.context=null}},{key:"fireEvent",value:function(e,t){var n={bubbles:!0,cancelable:"mousemove"!==t,view:window,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0},r=void 0;document.createEvent?(r=document.createEvent("MouseEvents"),r.initMouseEvent(t,n.bubbles,n.cancelable,n.view,n.detail,n.screenX,n.screenY,n.clientX,n.clientY,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey,n.button,n.relatedTarget||document.body.parentNode)):r=document.createEventObject(),e.dispatchEvent?e.dispatchEvent(r):e.fireEvent("on"+t,r)}}]),e}();t.default=h},function(e,t,n){"use strict";function r(e,t){if(!a[e])throw Error('Filter condition "'+e+'" does not exist.');var n=a[e],r=n.condition,o=n.descriptor;return o.inputValuesDecorator&&(t=o.inputValuesDecorator(t)),function(e){return r.apply(e.meta.instance,[].concat([e],[t]))}}function o(e){if(!a[e])throw Error('Filter condition "'+e+'" does not exist.');return a[e].descriptor}function i(e,t,n){n.key=e,a[e]={condition:t,descriptor:n}}t.__esModule=!0,t.getCondition=r,t.getConditionDescriptor=o,t.registerCondition=i;var a=t.conditions={}},function(e,t,n){"use strict";function r(e){var t=void 0;switch(void 0===e?"undefined":c(e)){case"string":case"number":t=""+e;break;case"object":t=null===e?"":e.toString();break;case"undefined":t="";break;default:t=e.toString()}return t}function o(e){return void 0!==e}function i(e){return void 0===e}function a(e){return null===e||""===e||i(e)}function s(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function l(e,t){e=b(e||"");var n="",r=!0,o=u(e),i=_(),s=a(e)||"trial"===e;if(s||o)if(o){var l=Math.floor((0,d.default)("16/08/2018","DD/MM/YYYY").toDate().getTime()/864e5),c=C(e);(c>45e3||c!==parseInt(c,10))&&(n="The license key provided to Handsontable Pro is invalid. Make sure you pass it correctly."),n||(l>c+1&&(n=(0,p.toSingleLine)(f)),r=l>c+15)}else n="Evaluation version of Handsontable Pro. Not licensed for use in a production environment.";else n="The license key provided to Handsontable Pro is invalid. Make sure you pass it correctly.";if(i&&(n=!1,r=!1),n&&!E&&(console[s?"info":"warn"](n),E=!0),r&&t.parentNode){var h=document.createElement("div");h.id="hot-display-license-info",h.appendChild(document.createTextNode("Evaluation version of Handsontable Pro.")),h.appendChild(document.createElement("br")),h.appendChild(document.createTextNode("Not licensed for production use.")),t.parentNode.insertBefore(h,t.nextSibling)}}function u(e){var t=[][g],n=t;if(e[g]!==w("Z"))return!1;for(var r="",o="B>1:r=y(e,i,i?1===o[g]?9:8:6);return n===t}t.__esModule=!0;var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n Your license key of Handsontable Pro has expired.‌‌‌‌ \n Renew your maintenance plan at https://handsontable.com or downgrade to the previous version of the software.\n "],["\n Your license key of Handsontable Pro has expired.‌‌‌‌ \n Renew your maintenance plan at https://handsontable.com or downgrade to the previous version of the software.\n "]);t.stringify=r,t.isDefined=o,t.isUndefined=i,t.isEmpty=a,t.isRegExp=s,t._injectProductInfo=l;var h=n(24),d=function(e){return e&&e.__esModule?e:{default:e}}(h),p=n(25),g="length",v=function(e){return parseInt(e,16)},m=function(e){return parseInt(e,10)},y=function(e,t,n){return e.substr(t,n)},w=function(e){return e.codePointAt(0)-65},b=function(e){return(""+e).replace(/\-/g,"")},C=function(e){return v(y(b(e),v("12"),w("F")))/(v(y(b(e),w("B"),~~![][g]))||9)},_=function(){return"undefined"!=typeof location&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host)},E=!1},function(e,t,n){"use strict";function r(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}function o(e){return!1===e.isImmediatePropagationEnabled}function i(e){"function"==typeof e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function a(e){return e.pageX?e.pageX:e.clientX+(0,c.getWindowScrollLeft)()}function s(e){return e.pageY?e.pageY:e.clientY+(0,c.getWindowScrollTop)()}function l(e){return 2===e.button}function u(e){return 0===e.button}t.__esModule=!0,t.stopImmediatePropagation=r,t.isImmediatePropagationStopped=o,t.stopPropagation=i,t.pageX=a,t.pageY=s,t.isRightClick=l,t.isLeftClick=u;var c=n(2)},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(94)("wks"),o=n(58),i=n(16).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if("function"==typeof e)return e;if(!O(e))throw Error('No registered renderer found under "'+e+'" name');return E(e)}t.__esModule=!0,t.getRegisteredRenderers=t.getRegisteredRendererNames=t.hasRenderer=t.getRenderer=t.registerRenderer=void 0;var i=n(49),a=r(i),s=n(520),l=r(s),u=n(521),c=r(u),f=n(522),h=r(f),d=n(523),p=r(d),g=n(524),v=r(g),m=n(525),y=r(m),w=n(526),b=r(w),C=(0,a.default)("renderers"),_=C.register,E=C.getItem,O=C.hasItem,S=C.getNames,T=C.getValues;_("base",l.default),_("autocomplete",c.default),_("checkbox",h.default),_("html",p.default),_("numeric",v.default),_("password",y.default),_("text",b.default),t.registerRenderer=_,t.getRenderer=o,t.hasRenderer=O,t.getRegisteredRendererNames=S,t.getRegisteredRenderers=T},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=this.createEmptyBucket()),e.pluginHookBucket):this.globalBucket}},{key:"add",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(Array.isArray(t))(0,i.arrayEach)(t,function(t){return n.add(e,t,r)});else{var o=this.getBucket(r);if(void 0===o[e]&&(this.register(e),o[e]=[]),t.skip=!1,-1===o[e].indexOf(t)){var a=!1;t.initialHook&&(0,i.arrayEach)(o[e],function(n,r){if(n.initialHook)return o[e][r]=t,a=!0,!1}),a||o[e].push(t)}}return this}},{key:"once",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Array.isArray(t)?(0,i.arrayEach)(t,function(t){return n.once(e,t,r)}):(t.runOnce=!0,this.add(e,t,r))}},{key:"remove",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.getBucket(n);return void 0!==r[e]&&r[e].indexOf(t)>=0&&(t.skip=!0,!0)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getBucket(t);return!(void 0===n[e]||!n[e].length)}},{key:"run",value:function(e,t,n,r,o,i,a,s){var l=this.globalBucket[t],u=-1,c=l?l.length:0;if(c)for(;++u0&&void 0!==arguments[0]?arguments[0]:null),function(e,t,n){return n[t].length=0})}},{key:"register",value:function(e){this.isRegistered(e)||s.push(e)}},{key:"deregister",value:function(e){this.isRegistered(e)&&s.splice(s.indexOf(e),1)}},{key:"isRegistered",value:function(e){return s.indexOf(e)>=0}},{key:"getRegistered",value:function(){return s}}]),e}(),u=new l;t.default=l},function(e,t,n){"use strict";function r(e){return 32===e||e>=48&&e<=57||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||e>=226||e>=65&&e<=90}function o(e){return-1!==[u.ARROW_DOWN,u.ARROW_UP,u.ARROW_LEFT,u.ARROW_RIGHT,u.HOME,u.END,u.DELETE,u.BACKSPACE,u.F1,u.F2,u.F3,u.F4,u.F5,u.F6,u.F7,u.F8,u.F9,u.F10,u.F11,u.F12,u.TAB,u.PAGE_DOWN,u.PAGE_UP,u.ENTER,u.ESCAPE,u.SHIFT,u.CAPS_LOCK,u.ALT].indexOf(e)}function i(e){var t=[];return window.navigator.platform.includes("Mac")?t.push(u.COMMAND_LEFT,u.COMMAND_RIGHT,u.COMMAND_FIREFOX):t.push(u.CONTROL),t.includes(e)}function a(e){return[u.CONTROL,u.COMMAND_LEFT,u.COMMAND_RIGHT,u.COMMAND_FIREFOX].includes(e)}function s(e,t){var n=t.split("|"),r=!1;return(0,l.arrayEach)(n,function(t){if(e===u[t])return r=!0,!1}),r}t.__esModule=!0,t.KEY_CODES=void 0,t.isPrintableChar=r,t.isMetaKey=o,t.isCtrlKey=i,t.isCtrlMetaKey=a,t.isKey=s;var l=n(0),u=t.KEY_CODES={MOUSE_LEFT:1,MOUSE_RIGHT:3,MOUSE_MIDDLE:2,BACKSPACE:8,COMMA:188,INSERT:45,DELETE:46,END:35,ENTER:13,ESCAPE:27,CONTROL:17,COMMAND_LEFT:91,COMMAND_RIGHT:93,COMMAND_FIREFOX:224,ALT:18,HOME:36,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,SPACE:32,SHIFT:16,CAPS_LOCK:20,TAB:9,ARROW_RIGHT:39,ARROW_LEFT:37,ARROW_UP:38,ARROW_DOWN:40,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,A:65,X:88,C:67,V:86}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t={},n=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in t||(t[e.guid]=new n(e)),t[e.guid]},f.default.getSingleton().add("afterDestroy",function(){t[this.guid]=null})}function i(e,t){var n=void 0;if("function"==typeof e)I.get(e)||s(null,e),n=I.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');n=x(e)}if(!n)throw Error('No editor registered under name "'+e+'"');return n.getInstance(t)}function a(e){if(!L(e))throw Error('No registered editor found under "'+e+'" name');return x(e).getConstructor()}function s(e,t){var n=new o(t);"string"==typeof e&&P(e,n),I.set(t,n)}t.__esModule=!0,t.getRegisteredEditors=t.getRegisteredEditorNames=t.hasEditor=t.getEditorInstance=t.getEditor=t.registerEditor=void 0,t.RegisteredEditor=o,t._getEditorInstance=i;var l=n(49),u=r(l),c=n(17),f=r(c),h=n(63),d=r(h),p=n(326),g=r(p),v=n(510),m=r(v),y=n(511),w=r(y),b=n(516),C=r(b),_=n(327),E=r(_),O=n(517),S=r(O),T=n(518),R=r(T),M=n(519),k=r(M),N=n(65),A=r(N),I=new WeakMap,D=(0,u.default)("editors"),P=D.register,x=D.getItem,L=D.hasItem,H=D.getNames,j=D.getValues;s("base",d.default),s("autocomplete",g.default),s("checkbox",m.default),s("date",w.default),s("dropdown",C.default),s("handsontable",E.default),s("numeric",S.default),s("password",R.default),s("select",k.default),s("text",A.default),t.registerEditor=s,t.getEditor=a,t.getEditorInstance=i,t.hasEditor=L,t.getRegisteredEditorNames=H,t.getRegisteredEditors=j},function(e,t,n){"use strict";t.__esModule=!0;var r=n(0),o=n(1),i={_localHooks:Object.create(null),addLocalHook:function(e,t){return this._localHooks[e]||(this._localHooks[e]=[]),this._localHooks[e].push(t),this},runLocalHooks:function(e){for(var t=this,n=arguments.length,o=Array(n>1?n-1:0),i=1;i'+String.fromCharCode(10003)+""+e}function v(e,t){return!e.hidden||!("function"==typeof e.hidden&&e.hidden.call(t))}function m(e,t){for(var n=e.slice(0);00?t[t.length-1].name!==e.name&&t.push(e):t.push(e)}),t}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:E.KEY,n=e.slice(0);return n=m(n,t),n=y(n,t),n=w(n)}t.__esModule=!0,t.normalizeSelection=r,t.isSeparator=o,t.hasSubMenu=i,t.isDisabled=a,t.isSelectionDisabled=s,t.getValidSelection=l,t.prepareVerticalAlignClass=u,t.prepareHorizontalAlignClass=c,t.getAlignmentClasses=f,t.align=h,t.checkSelectionConsistency=p,t.markLabelAsSelected=g,t.isItemHidden=v,t.filterSeparators=b;var C=n(0),_=n(2),E=n(159)},function(e,t,n){var r=n(21),o=n(168),i=n(90),a=Object.defineProperty;t.f=n(27)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){(function(e){!function(t,n){e.exports=n()}(0,function(){"use strict";function t(){return Mr.apply(null,arguments)}function r(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function i(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}function a(e){return void 0===e}function s(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function l(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function u(e,t){var n,r=[];for(n=0;n0)for(n=0;n0?"future":"past"];return T(n)?n(t):n.replace(/%s/i,t)}function L(e,t){var n=e.toLowerCase();jr[n]=jr[n+"s"]=jr[t]=e}function H(e){return"string"==typeof e?jr[e]||jr[e.toLowerCase()]:void 0}function j(e){var t,n,r={};for(n in e)c(e,n)&&(t=H(n))&&(r[t]=e[n]);return r}function F(e,t){Fr[e]=t}function V(e){var t=[];for(var n in e)t.push({unit:n,priority:Fr[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}function B(e,t,n){var r=""+Math.abs(e),o=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}function W(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(Ur[e]=o),t&&(Ur[t[0]]=function(){return B(o.apply(this,arguments),t[1],t[2])}),n&&(Ur[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function U(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Y(e){var t,n,r=e.match(Vr);for(t=0,n=r.length;t=0&&Br.test(e);)e=e.replace(Br,n),Br.lastIndex=0,r-=1;return e}function z(e,t,n){so[e]=T(t)?t:function(e,r){return e&&n?n:t}}function X(e,t){return c(so,e)?so[e](t._strict,t._locale):new RegExp(K(e))}function K(e){return q(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,o){return t||n||r||o}))}function q(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Z(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),s(t)&&(r=function(e,n){n[t]=C(e)}),n=0;n=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}function Ce(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function _e(e,t,n){var r=7+t-n;return-(7+Ce(e,0,r).getUTCDay()-t)%7+r-1}function Ee(e,t,n,r,o){var i,a,s=(7+n-r)%7,l=_e(e,r,o),u=1+7*(t-1)+s+l;return u<=0?(i=e-1,a=ee(i)+u):u>ee(e)?(i=e+1,a=u-ee(e)):(i=e,a=u),{year:i,dayOfYear:a}}function Oe(e,t,n){var r,o,i=_e(e.year(),t,n),a=Math.floor((e.dayOfYear()-i-1)/7)+1;return a<1?(o=e.year()-1,r=a+Se(o,t,n)):a>Se(e.year(),t,n)?(r=a-Se(e.year(),t,n),o=e.year()+1):(o=e.year(),r=a),{week:r,year:o}}function Se(e,t,n){var r=_e(e,t,n),o=_e(e+1,t,n);return(ee(e)-r+o)/7}function Te(e){return Oe(e,this._week.dow,this._week.doy).week}function Re(){return this._week.dow}function Me(){return this._week.doy}function ke(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Ne(e){var t=Oe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Ae(e,t){return"string"!=typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10)}function Ie(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function De(e,t){return e?r(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:r(this._weekdays)?this._weekdays:this._weekdays.standalone}function Pe(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort}function xe(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Le(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?(o=wo.call(this._weekdaysParse,a),-1!==o?o:null):"ddd"===t?(o=wo.call(this._shortWeekdaysParse,a),-1!==o?o:null):(o=wo.call(this._minWeekdaysParse,a),-1!==o?o:null):"dddd"===t?-1!==(o=wo.call(this._weekdaysParse,a))?o:-1!==(o=wo.call(this._shortWeekdaysParse,a))?o:(o=wo.call(this._minWeekdaysParse,a),-1!==o?o:null):"ddd"===t?-1!==(o=wo.call(this._shortWeekdaysParse,a))?o:-1!==(o=wo.call(this._weekdaysParse,a))?o:(o=wo.call(this._minWeekdaysParse,a),-1!==o?o:null):-1!==(o=wo.call(this._minWeekdaysParse,a))?o:-1!==(o=wo.call(this._weekdaysParse,a))?o:(o=wo.call(this._shortWeekdaysParse,a),-1!==o?o:null)}function He(e,t,n){var r,o,i;if(this._weekdaysParseExact)return Le.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function je(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Ae(e,this.localeData()),this.add(e-t,"d")):t}function Fe(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Ve(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Ie(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Be(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ye.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=No),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function We(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ye.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ao),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Ue(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ye.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Io),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ye(){function e(e,t){return t.length-e.length}var t,n,r,o,i,a=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),r=this.weekdaysMin(n,""),o=this.weekdaysShort(n,""),i=this.weekdays(n,""),a.push(r),s.push(o),l.push(i),u.push(r),u.push(o),u.push(i);for(a.sort(e),s.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)s[t]=q(s[t]),l[t]=q(l[t]),u[t]=q(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function $e(){return this.hours()%12||12}function Ge(){return this.hours()||24}function ze(e,t){W(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Xe(e,t){return t._meridiemParse}function Ke(e){return"p"===(e+"").toLowerCase().charAt(0)}function qe(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}function Ze(e){return e?e.toLowerCase().replace("_","-"):e}function Qe(e){for(var t,n,r,o,i=0;i0;){if(r=Je(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&_(o,n,!0)>=t-1)break;t--}i++}return null}function Je(t){var r=null;if(!Ho[t]&&void 0!==e&&e&&e.exports)try{r=Do._abbr;n(504)("./"+t),et(r)}catch(e){}return Ho[t]}function et(e,t){var n;return e&&(n=a(t)?rt(e):tt(e,t))&&(Do=n),Do._abbr}function tt(e,t){if(null!==t){var n=Lo;if(t.abbr=e,null!=Ho[e])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Ho[e]._config;else if(null!=t.parentLocale){if(null==Ho[t.parentLocale])return jo[t.parentLocale]||(jo[t.parentLocale]=[]),jo[t.parentLocale].push({name:e,config:t}),null;n=Ho[t.parentLocale]._config}return Ho[e]=new k(M(n,t)),jo[e]&&jo[e].forEach(function(e){tt(e.name,e.config)}),et(e),Ho[e]}return delete Ho[e],null}function nt(e,t){if(null!=t){var n,r,o=Lo;r=Je(e),null!=r&&(o=r._config),t=M(o,t),n=new k(t),n.parentLocale=Ho[e],Ho[e]=n,et(e)}else null!=Ho[e]&&(null!=Ho[e].parentLocale?Ho[e]=Ho[e].parentLocale:null!=Ho[e]&&delete Ho[e]);return Ho[e]}function rt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Do;if(!r(e)){if(t=Je(e))return t;e=[e]}return Qe(e)}function ot(){return Dr(Ho)}function it(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[co]<0||n[co]>11?co:n[fo]<1||n[fo]>ue(n[uo],n[co])?fo:n[ho]<0||n[ho]>24||24===n[ho]&&(0!==n[po]||0!==n[go]||0!==n[vo])?ho:n[po]<0||n[po]>59?po:n[go]<0||n[go]>59?go:n[vo]<0||n[vo]>999?vo:-1,p(e)._overflowDayOfYear&&(tfo)&&(t=fo),p(e)._overflowWeeks&&-1===t&&(t=mo),p(e)._overflowWeekday&&-1===t&&(t=yo),p(e).overflow=t),e}function at(e,t,n){return null!=e?e:null!=t?t:n}function st(e){var n=new Date(t.now());return e._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function lt(e){var t,n,r,o,i,a=[];if(!e._d){for(r=st(e),e._w&&null==e._a[fo]&&null==e._a[co]&&ut(e),null!=e._dayOfYear&&(i=at(e._a[uo],r[uo]),(e._dayOfYear>ee(i)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),n=Ce(i,0,e._dayOfYear),e._a[co]=n.getUTCMonth(),e._a[fo]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ho]&&0===e._a[po]&&0===e._a[go]&&0===e._a[vo]&&(e._nextDay=!0,e._a[ho]=0),e._d=(e._useUTC?Ce:be).apply(null,a),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ho]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(p(e).weekdayMismatch=!0)}}function ut(e){var t,n,r,o,i,a,s,l;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)i=1,a=4,n=at(t.GG,e._a[uo],Oe(Tt(),1,4).year),r=at(t.W,1),((o=at(t.E,1))<1||o>7)&&(l=!0);else{i=e._locale._week.dow,a=e._locale._week.doy;var u=Oe(Tt(),i,a);n=at(t.gg,e._a[uo],u.year),r=at(t.w,u.week),null!=t.d?((o=t.d)<0||o>6)&&(l=!0):null!=t.e?(o=t.e+i,(t.e<0||t.e>6)&&(l=!0)):o=i}r<1||r>Se(n,i,a)?p(e)._overflowWeeks=!0:null!=l?p(e)._overflowWeekday=!0:(s=Ee(n,r,o,i,a),e._a[uo]=s.year,e._dayOfYear=s.dayOfYear)}function ct(e){var t,n,r,o,i,a,s=e._i,l=Fo.exec(s)||Vo.exec(s);if(l){for(p(e).iso=!0,t=0,n=Wo.length;t0&&p(e).unusedInput.push(a),s=s.slice(s.indexOf(r)+r.length),u+=r.length),Ur[i]?(r?p(e).empty=!1:p(e).unusedTokens.push(i),J(i,r,e)):e._strict&&!r&&p(e).unusedTokens.push(i);p(e).charsLeftOver=l-u,s.length>0&&p(e).unusedInput.push(s),e._a[ho]<=12&&!0===p(e).bigHour&&e._a[ho]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[ho]=wt(e._locale,e._a[ho],e._meridiem),lt(e),it(e)}function wt(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?(r=e.isPM(n),r&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function bt(e){var t,n,r,o,i;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;othis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function zt(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e={};if(m(e,this),e=Et(e),e._a){var t=e._isUTC?h(e._a):Tt(e._a);this._isDSTShifted=this.isValid()&&_(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Xt(){return!!this.isValid()&&!this._isUTC}function Kt(){return!!this.isValid()&&this._isUTC}function qt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Zt(e,t){var n,r,o,i=e,a=null;return Pt(e)?i={ms:e._milliseconds,d:e._days,M:e._months}:s(e)?(i={},t?i[t]=e:i.milliseconds=e):(a=Qo.exec(e))?(n="-"===a[1]?-1:1,i={y:0,d:C(a[fo])*n,h:C(a[ho])*n,m:C(a[po])*n,s:C(a[go])*n,ms:C(xt(1e3*a[vo]))*n}):(a=Jo.exec(e))?(n="-"===a[1]?-1:1,i={y:Qt(a[2],n),M:Qt(a[3],n),w:Qt(a[4],n),d:Qt(a[5],n),h:Qt(a[6],n),m:Qt(a[7],n),s:Qt(a[8],n)}):null==i?i={}:"object"==typeof i&&("from"in i||"to"in i)&&(o=en(Tt(i.from),Tt(i.to)),i={},i.ms=o.milliseconds,i.M=o.months),r=new Dt(i),Pt(e)&&c(e,"_locale")&&(r._locale=e._locale),r}function Qt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Jt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function en(e,t){var n;return e.isValid()&&t.isValid()?(t=jt(t,e),e.isBefore(t)?n=Jt(e,t):(n=Jt(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function tn(e,t){return function(n,r){var o,i;return null===r||isNaN(+r)||(S(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),n="string"==typeof n?+n:n,o=Zt(n,r),nn(this,o,e),this}}function nn(e,n,r,o){var i=n._milliseconds,a=xt(n._days),s=xt(n._months);e.isValid()&&(o=null==o||o,s&&pe(e,oe(e,"Month")+s*r),a&&ie(e,"Date",oe(e,"Date")+a*r),i&&e._d.setTime(e._d.valueOf()+i*r),o&&t.updateOffset(e,a||s))}function rn(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function on(e,n){var r=e||Tt(),o=jt(r,this).startOf("day"),i=t.calendarFormat(this,o)||"sameElse";return this.format(n&&(T(n[i])?n[i].call(this,r):n[i])||this.localeData().calendar(i,this,Tt(r)))}function an(){return new y(this)}function sn(e,t){var n=w(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&(t=H(a(t)?"millisecond":t),"millisecond"===t?this.valueOf()>n.valueOf():n.valueOf()9999?$(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):T(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this._d.valueOf()).toISOString().replace("Z",$(n,"Z")):$(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function mn(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");return this.format("["+e+'("]'+(0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY")+"-MM-DD[T]HH:mm:ss.SSS"+t+'[")]')}function yn(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var n=$(this,e);return this.localeData().postformat(n)}function wn(e,t){return this.isValid()&&(w(e)&&e.isValid()||Tt(e).isValid())?Zt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function bn(e){return this.from(Tt(),e)}function Cn(e,t){return this.isValid()&&(w(e)&&e.isValid()||Tt(e).isValid())?Zt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function _n(e){return this.to(Tt(),e)}function En(e){var t;return void 0===e?this._locale._abbr:(t=rt(e),null!=t&&(this._locale=t),this)}function On(){return this._locale}function Sn(e){switch(e=H(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this}function Tn(e){return void 0===(e=H(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))}function Rn(){return this._d.valueOf()-6e4*(this._offset||0)}function Mn(){return Math.floor(this.valueOf()/1e3)}function kn(){return new Date(this.valueOf())}function Nn(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function An(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function In(){return this.isValid()?this.toISOString():null}function Dn(){return g(this)}function Pn(){return f({},p(this))}function xn(){return p(this).overflow}function Ln(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Hn(e,t){W(0,[e,e.length],0,t)}function jn(e){return Wn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Fn(e){return Wn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Vn(){return Se(this.year(),1,4)}function Bn(){var e=this.localeData()._week;return Se(this.year(),e.dow,e.doy)}function Wn(e,t,n,r,o){var i;return null==e?Oe(this,r,o).year:(i=Se(e,r,o),t>i&&(t=i),Un.call(this,e,t,n,r,o))}function Un(e,t,n,r,o){var i=Ee(e,t,n,r,o),a=Ce(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Yn(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function $n(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function Gn(e,t){t[vo]=C(1e3*("0."+e))}function zn(){return this._isUTC?"UTC":""}function Xn(){return this._isUTC?"Coordinated Universal Time":""}function Kn(e){return Tt(1e3*e)}function qn(){return Tt.apply(null,arguments).parseZone()}function Zn(e){return e}function Qn(e,t,n,r){return rt()[n](h().set(r,t),e)}function Jn(e,t,n){if(s(e)&&(t=e,e=void 0),e=e||"",null!=t)return Qn(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=Qn(e,r,n,"month");return o}function er(e,t,n,r){"boolean"==typeof e?(s(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,s(t)&&(n=t,t=void 0),t=t||"");var o=rt(),i=e?o._week.dow:0;if(null!=n)return Qn(t,(n+i)%7,r,"day");var a,l=[];for(a=0;a<7;a++)l[a]=Qn(t,(a+i)%7,r,"day");return l}function tr(e,t){return Jn(e,t,"months")}function nr(e,t){return Jn(e,t,"monthsShort")}function rr(e,t,n){return er(e,t,n,"weekdays")}function or(e,t,n){return er(e,t,n,"weekdaysShort")}function ir(e,t,n){return er(e,t,n,"weekdaysMin")}function ar(){var e=this._data;return this._milliseconds=ci(this._milliseconds),this._days=ci(this._days),this._months=ci(this._months),e.milliseconds=ci(e.milliseconds),e.seconds=ci(e.seconds),e.minutes=ci(e.minutes),e.hours=ci(e.hours),e.months=ci(e.months),e.years=ci(e.years),this}function sr(e,t,n,r){var o=Zt(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function lr(e,t){return sr(this,e,t,1)}function ur(e,t){return sr(this,e,t,-1)}function cr(e){return e<0?Math.floor(e):Math.ceil(e)}function fr(){var e,t,n,r,o,i=this._milliseconds,a=this._days,s=this._months,l=this._data;return i>=0&&a>=0&&s>=0||i<=0&&a<=0&&s<=0||(i+=864e5*cr(dr(s)+a),a=0,s=0),l.milliseconds=i%1e3,e=b(i/1e3),l.seconds=e%60,t=b(e/60),l.minutes=t%60,n=b(t/60),l.hours=n%24,a+=b(n/24),o=b(hr(a)),s+=o,a-=cr(dr(o)),r=b(s/12),s%=12,l.days=a,l.months=s,l.years=r,this}function hr(e){return 4800*e/146097}function dr(e){return 146097*e/4800}function pr(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=H(e))||"year"===e)return t=this._days+r/864e5,n=this._months+hr(t),"month"===e?n:n/12;switch(t=this._days+Math.round(dr(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function gr(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*C(this._months/12):NaN}function vr(e){return function(){return this.as(e)}}function mr(){return Zt(this)}function yr(e){return e=H(e),this.isValid()?this[e+"s"]():NaN}function wr(e){return function(){return this.isValid()?this._data[e]:NaN}}function br(){return b(this.days()/7)}function Cr(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}function _r(e,t,n){var r=Zt(e).abs(),o=Ti(r.as("s")),i=Ti(r.as("m")),a=Ti(r.as("h")),s=Ti(r.as("d")),l=Ti(r.as("M")),u=Ti(r.as("y")),c=o<=Ri.ss&&["s",o]||o0,c[4]=n,Cr.apply(null,c)}function Er(e){return void 0===e?Ti:"function"==typeof e&&(Ti=e,!0)}function Or(e,t){return void 0!==Ri[e]&&(void 0===t?Ri[e]:(Ri[e]=t,"s"===e&&(Ri.ss=t-1),!0))}function Sr(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=_r(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)}function Tr(e){return(e>0)-(e<0)||+e}function Rr(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r=Mi(this._milliseconds)/1e3,o=Mi(this._days),i=Mi(this._months);e=b(r/60),t=b(e/60),r%=60,e%=60,n=b(i/12),i%=12;var a=n,s=i,l=o,u=t,c=e,f=r?r.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var d=h<0?"-":"",p=Tr(this._months)!==Tr(h)?"-":"",g=Tr(this._days)!==Tr(h)?"-":"",v=Tr(this._milliseconds)!==Tr(h)?"-":"";return d+"P"+(a?p+a+"Y":"")+(s?p+s+"M":"")+(l?g+l+"D":"")+(u||c||f?"T":"")+(u?v+u+"H":"")+(c?v+c+"M":"")+(f?v+f+"S":"")}var Mr,kr;kr=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r68?1900:2e3)};var wo,bo=re("FullYear",!0);wo=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;tthis?this:e:v()}),Ko=function(){return Date.now?Date.now():+new Date},qo=["year","quarter","month","week","day","hour","minute","second","millisecond"];Lt("Z",":"),Lt("ZZ",""),z("Z",oo),z("ZZ",oo),Z(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Ht(oo,e)});var Zo=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var Qo=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Jo=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Zt.fn=Dt.prototype,Zt.invalid=It;var ei=tn(1,"add"),ti=tn(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ni=O("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});W(0,["gg",2],0,function(){return this.weekYear()%100}),W(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Hn("gggg","weekYear"),Hn("ggggg","weekYear"),Hn("GGGG","isoWeekYear"),Hn("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),z("G",no),z("g",no),z("GG",Kr,$r),z("gg",Kr,$r),z("GGGG",Jr,zr),z("gggg",Jr,zr),z("GGGGG",eo,Xr),z("ggggg",eo,Xr),Q(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=C(e)}),Q(["gg","GG"],function(e,n,r,o){n[o]=t.parseTwoDigitYear(e)}),W("Q",0,"Qo","quarter"),L("quarter","Q"),F("quarter",7),z("Q",Yr),Z("Q",function(e,t){t[co]=3*(C(e)-1)}),W("D",["DD",2],"Do","date"),L("date","D"),F("date",9),z("D",Kr),z("DD",Kr,$r),z("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),Z(["D","DD"],fo),Z("Do",function(e,t){t[fo]=C(e.match(Kr)[0])});var ri=re("Date",!0);W("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),F("dayOfYear",4),z("DDD",Qr),z("DDDD",Gr),Z(["DDD","DDDD"],function(e,t,n){n._dayOfYear=C(e)}),W("m",["mm",2],0,"minute"),L("minute","m"),F("minute",14),z("m",Kr),z("mm",Kr,$r),Z(["m","mm"],po);var oi=re("Minutes",!1);W("s",["ss",2],0,"second"),L("second","s"),F("second",15),z("s",Kr),z("ss",Kr,$r),Z(["s","ss"],go);var ii=re("Seconds",!1);W("S",0,0,function(){return~~(this.millisecond()/100)}),W(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),W(0,["SSS",3],0,"millisecond"),W(0,["SSSS",4],0,function(){return 10*this.millisecond()}),W(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),W(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),W(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),W(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),W(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),L("millisecond","ms"),F("millisecond",16),z("S",Qr,Yr),z("SS",Qr,$r),z("SSS",Qr,Gr);var ai;for(ai="SSSS";ai.length<=9;ai+="S")z(ai,to);for(ai="S";ai.length<=9;ai+="S")Z(ai,Gn);var si=re("Milliseconds",!1);W("z",0,0,"zoneAbbr"),W("zz",0,0,"zoneName");var li=y.prototype;li.add=ei,li.calendar=on,li.clone=an,li.diff=dn,li.endOf=Tn,li.format=yn,li.from=wn,li.fromNow=bn,li.to=Cn,li.toNow=_n,li.get=ae,li.invalidAt=xn,li.isAfter=sn,li.isBefore=ln,li.isBetween=un,li.isSame=cn,li.isSameOrAfter=fn,li.isSameOrBefore=hn,li.isValid=Dn,li.lang=ni,li.locale=En,li.localeData=On,li.max=Xo,li.min=zo,li.parsingFlags=Pn,li.set=se,li.startOf=Sn,li.subtract=ti,li.toArray=Nn,li.toObject=An,li.toDate=kn,li.toISOString=vn,li.inspect=mn,li.toJSON=In,li.toString=gn,li.unix=Mn,li.valueOf=Rn,li.creationData=Ln,li.year=bo,li.isLeapYear=ne,li.weekYear=jn,li.isoWeekYear=Fn,li.quarter=li.quarters=Yn,li.month=ge,li.daysInMonth=ve,li.week=li.weeks=ke,li.isoWeek=li.isoWeeks=Ne,li.weeksInYear=Bn,li.isoWeeksInYear=Vn,li.date=ri,li.day=li.days=je,li.weekday=Fe,li.isoWeekday=Ve,li.dayOfYear=$n,li.hour=li.hours=xo,li.minute=li.minutes=oi,li.second=li.seconds=ii,li.millisecond=li.milliseconds=si,li.utcOffset=Vt,li.utc=Wt,li.local=Ut,li.parseZone=Yt,li.hasAlignedHourOffset=$t,li.isDST=Gt,li.isLocal=Xt,li.isUtcOffset=Kt,li.isUtc=qt,li.isUTC=qt,li.zoneAbbr=zn,li.zoneName=Xn,li.dates=O("dates accessor is deprecated. Use date instead.",ri),li.months=O("months accessor is deprecated. Use month instead",ge),li.years=O("years accessor is deprecated. Use year instead",bo),li.zone=O("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Bt),li.isDSTShifted=O("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",zt);var ui=k.prototype;ui.calendar=N,ui.longDateFormat=A,ui.invalidDate=I,ui.ordinal=D,ui.preparse=Zn,ui.postformat=Zn,ui.relativeTime=P,ui.pastFuture=x,ui.set=R,ui.months=ce,ui.monthsShort=fe,ui.monthsParse=de,ui.monthsRegex=ye,ui.monthsShortRegex=me,ui.week=Te,ui.firstDayOfYear=Me,ui.firstDayOfWeek=Re,ui.weekdays=De,ui.weekdaysMin=xe,ui.weekdaysShort=Pe,ui.weekdaysParse=He,ui.weekdaysRegex=Be,ui.weekdaysShortRegex=We,ui.weekdaysMinRegex=Ue,ui.isPM=Ke,ui.meridiem=qe,et("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===C(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),t.lang=O("moment.lang is deprecated. Use moment.locale instead.",et),t.langData=O("moment.langData is deprecated. Use moment.localeData instead.",rt);var ci=Math.abs,fi=vr("ms"),hi=vr("s"),di=vr("m"),pi=vr("h"),gi=vr("d"),vi=vr("w"),mi=vr("M"),yi=vr("y"),wi=wr("milliseconds"),bi=wr("seconds"),Ci=wr("minutes"),_i=wr("hours"),Ei=wr("days"),Oi=wr("months"),Si=wr("years"),Ti=Math.round,Ri={ss:44,s:45,m:45,h:22,d:26,M:11},Mi=Math.abs,ki=Dt.prototype;return ki.isValid=At,ki.abs=ar,ki.add=lr,ki.subtract=ur,ki.as=pr,ki.asMilliseconds=fi,ki.asSeconds=hi,ki.asMinutes=di,ki.asHours=pi,ki.asDays=gi,ki.asWeeks=vi,ki.asMonths=mi,ki.asYears=yi,ki.valueOf=gr,ki._bubble=fr,ki.clone=mr,ki.get=yr,ki.milliseconds=wi,ki.seconds=bi,ki.minutes=Ci,ki.hours=_i,ki.days=Ei,ki.weeks=br,ki.months=Oi,ki.years=Si,ki.humanize=Sr,ki.toISOString=Rr,ki.toString=Rr,ki.toJSON=Rr,ki.locale=En,ki.localeData=On,ki.toIsoString=O("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Rr),ki.lang=ni,W("X",0,0,"unix"),W("x",0,0,"valueOf"),z("x",no),z("X",io),Z("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),Z("x",function(e,t,n){n._d=new Date(C(e))}),t.version="2.20.1",function(e){Mr=e}(Tt),t.fn=li,t.min=Mt,t.max=kt,t.now=Ko,t.utc=h,t.unix=Kn,t.months=tr,t.isDate=l,t.locale=et,t.invalid=v,t.duration=Zt,t.isMoment=w,t.weekdays=rr,t.parseZone=qn,t.localeData=rt,t.isDuration=Pt,t.monthsShort=nr,t.weekdaysMin=ir,t.defineLocale=tt,t.updateLocale=nt,t.locales=ot,t.weekdaysShort=or,t.normalizeUnits=H,t.relativeTimeRounding=Er,t.relativeTimeThreshold=Or,t.calendarFormat=rn,t.prototype=li,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},t}),window.moment=n(24)}).call(t,n(198)(e))},function(e,t,n){"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(6),o=n(48),i=n(28);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},function(e,t,n){"use strict";function r(e){return e[0].toUpperCase()+e.substr(1)}function o(){for(var e=[],t=arguments.length,n=Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return(""+e).replace(/(?:\\)?\[([^[\]]+)]/g,function(e,n){return"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[n]?"":t[n]})}function l(e){return e+="",e.replace(c,"")}t.__esModule=!0,t.toUpperCaseFirst=r,t.equalsIgnoreCase=o,t.randomString=i,t.isPercentValue=a,t.substitute=s,t.stripTags=l;var u=n(11),c=/<\/?\w+\/?>|<\w+[\s|\/][^>]*>/gi},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0],t=this.shouldBeRendered();this.clone&&(this.needFullRender||t)&&this.clone.draw(e),this.needFullRender=t}},{key:"reset",value:function(){if(this.clone){var e=this.clone.wtTable.holder;(0,l.arrayEach)([e.style,this.clone.wtTable.hider.style,e.parentNode.style],function(e){e.width="",e.height=""})}}},{key:"destroy",value:function(){new c.default(this.clone).destroy()}}]),e}()},function(e,t,n){"use strict";function r(e){return"function"==typeof e}function o(e){function t(){for(var t=this,a=arguments.length,s=Array(a),l=0;l1&&void 0!==arguments[1]?arguments[1]:200,r=0,o={lastCallThrottled:!0},i=null;return t}function i(e){function t(){s=i}function n(){for(var t=arguments.length,n=Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:200,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=o(e,r),s=i;return n.clearHits=t,n}function a(e){function t(){for(var t=this,i=arguments.length,a=Array(i),s=0;s1&&void 0!==arguments[1]?arguments[1]:200,r=null,o=void 0;return t}function s(){for(var e=arguments.length,t=Array(e),n=0;n1?t-1:0),r=1;r=n?e.apply(this,s):t(s)}}var n=e.length;return t([])}function c(e){function t(r){return function(){for(var o=arguments.length,i=Array(o),a=0;a=n?e.apply(this,s):t(s)}}var n=e.length;return t([])}t.__esModule=!0,t.isFunction=r,t.throttle=o,t.throttleAfterHits=i,t.debounce=a,t.pipe=s,t.partial=l,t.curry=u,t.curryRight=c;var f=n(0)},function(e,t,n){"use strict";function r(e){return"string"==typeof e&&e.length>=2&&"="===e.charAt(0)}function o(e){return"string"==typeof e&&"'"===e.charAt(0)&&"="===e.charAt(1)}function i(e){return o(e)?e.substr(1):e}function a(e){var t=/(\\"|"(?:\\"|[^"])*"|(\+))|(\\'|'(?:\\'|[^'])*'|(\+))/g,n=e.match(t)||[],r=-1;return e.toUpperCase().replace(t,function(){return++r,n[r]})}function s(e,t){return function(n){return{row:"row"===e?t:n.row,column:"column"===e?t:n.column}}}t.__esModule=!0,t.isFormulaExpression=r,t.isFormulaExpressionEscaped=o,t.unescapeFormulaExpression=i,t.toUpperCaseFormula=a,t.cellCoordFactory=s},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(16),o=n(38),i=n(36),a=n(58)("src"),s=Function.toString,l=(""+s).split("toString");n(48).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var u="function"==typeof n;u&&(i(n,"name")||o(n,"name",t)),e[t]!==n&&(u&&(i(n,a)||o(n,a,e[t]?""+e[t]:l.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||s.call(this)})},function(e,t,n){var r=n(23),o=n(59);e.exports=n(27)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(74);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(47);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(58)("meta"),o=n(13),i=n(36),a=n(23).f,s=0,l=Object.isExtensible||function(){return!0},u=!n(28)(function(){return l(Object.preventExtensions({}))}),c=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},f=function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[r].i},h=function(e,t){if(!i(e,r)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[r].w},d=function(e){return u&&p.NEED&&l(e)&&!i(e,r)&&c(e),e},p=e.exports={KEY:r,NEED:!1,fastKey:f,getWeak:h,onFreeze:d}},function(e,t,n){"use strict";function r(e){return d.call(window,e)}function o(e){p.call(window,e)}function i(){return"ontouchstart"in window}function a(){var e=document.createElement("div");return!(!e.createShadowRoot||!e.createShadowRoot.toString().match(/\[native code\]/))}function s(){var e=document.createElement("TABLE");e.style.borderSpacing=0,e.style.borderWidth=0,e.style.padding=0;var t=document.createElement("TBODY");e.appendChild(t),t.appendChild(document.createElement("TR")),t.firstChild.appendChild(document.createElement("TD")),t.firstChild.firstChild.innerHTML="t
t";var n=document.createElement("CAPTION");n.innerHTML="c
c
c
c",n.style.padding=0,n.style.margin=0,e.insertBefore(n,t),document.body.appendChild(e),v=e.offsetHeight<2*e.lastChild.offsetHeight,document.body.removeChild(e)}function l(){return void 0===v&&s(),v}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return m||(m="object"===("undefined"==typeof Intl?"undefined":c(Intl))?new Intl.Collator(e,t).compare:"function"==typeof String.prototype.localeCompare?function(e,t){return(""+e).localeCompare(t)}:function(e,t){return e===t?0:e>t?-1:1})}t.__esModule=!0;var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.requestAnimationFrame=r,t.cancelAnimationFrame=o,t.isTouchSupported=i,t.isWebComponentSupportedNatively=a,t.hasCaptionProblem=l,t.getComparisonFunction=u;for(var f=0,h=["ms","moz","webkit","o"],d=window.requestAnimationFrame,p=window.cancelAnimationFrame,g=0;g0}},{key:"hasPrecedent",value:function(e){return(0,l.arrayFilter)(this.precedents,function(t){return t.isEqual(e)}).length>0}}]),t}(c.default)},function(e,t,n){var r=n(169),o=n(95);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:"common";i.has(s)||i.set(s,new Map);var l=i.get(s);return{register:e,getItem:t,hasItem:n,getNames:o,getValues:a}}t.__esModule=!0,t.default=o;var i=t.collection=new Map},function(e,t,n){"use strict";function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.userAgent,n=void 0===t?navigator.userAgent:t,r=e.vendor,o=void 0===r?navigator.vendor:r;(0,h.objectEach)(p,function(e){return void(0,e.test)(n,o)})}function o(){return p.chrome.value}function i(){return p.edge.value}function a(){return p.ie.value}function s(){return p.ie8.value}function l(){return p.ie9.value}function u(){return p.ie.value||p.edge.value}function c(){return p.mobile.value}function f(){return p.safari.value}t.__esModule=!0,t.setBrowserMeta=r,t.isChrome=o,t.isEdge=i,t.isIE=a,t.isIE8=s,t.isIE9=l,t.isMSBrowser=u,t.isMobileBrowser=c,t.isSafari=f;var h=n(1),d=function(e){var t={value:!1};return t.test=function(n,r){t.value=e(n,r)},t},p={chrome:d(function(e,t){return/Chrome/.test(e)&&/Google/.test(t)}),edge:d(function(e){return/Edge/.test(e)}),ie:d(function(e){return/Trident/.test(e)}),ie8:d(function(){return!document.createTextNode("test").textContent}),ie9:d(function(){return!!document.documentMode}),mobile:d(function(e){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)}),safari:d(function(e,t){return/Safari/.test(e)&&/Apple Computer/.test(t)})};r()},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:1,r=(0,o.arrayMax)(this._arrayMap)+1,i=[];return(0,a.rangeEach)(n-1,function(n){i.push(t._arrayMap.splice(e+n,0,r+n))}),i},removeItems:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=[];if(Array.isArray(e)){var i=[].concat(this._arrayMap);e.sort(function(e,t){return t-e}),r=(0,o.arrayReduce)(e,function(e,n){return t._arrayMap.splice(n,1),e.concat(i.slice(n,n+1))},[])}else r=this._arrayMap.splice(e,n);return r},unshiftItems:function(e){function t(e){return(0,o.arrayReduce)(r,function(t,n){return e>n&&t++,t},0)}var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=this.removeItems(e,n);this._arrayMap=(0,o.arrayMap)(this._arrayMap,function(e){var n=t(e);return n&&(e-=n),e})},shiftItems:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this._arrayMap=(0,o.arrayMap)(this._arrayMap,function(t){return t>=e&&(t+=n),t}),(0,a.rangeEach)(n-1,function(n){t._arrayMap.splice(e+n,0,e+n)})},swapIndexes:function(e,t){var n;(n=this._arrayMap).splice.apply(n,[t,0].concat(r(this._arrayMap.splice(e,1))))},clearMap:function(){this._arrayMap.length=0}};(0,i.defineGetter)(s,"MIXIN_NAME","arrayMapper",{writable:!1,enumerable:!1}),t.default=s},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(13);e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){var r=n(14)("unscopables"),o=Array.prototype;void 0==o[r]&&n(38)(o,r,{}),e.exports=function(e){o[r][e]=!0}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){f.set(e,t)}function i(e){var t=void 0;if(!(e instanceof l.default)){if(!f.has(e))throw Error("Record translator was not registered for this object identity");e=f.get(e)}return h.has(e)?t=h.get(e):(t=new c(e),h.set(e,t)),t}t.__esModule=!0,t.RecordTranslator=void 0;var a=function(){function e(e,t){for(var n=0;n'+String.fromCharCode(10003)+""+e}t.__esModule=!0,t.createId=r,t.createDefaultCustomBorder=o,t.createSingleEmptyBorder=i,t.createDefaultHtBorder=a,t.createEmptyBorders=s,t.extendDefaultBorder=l,t.checkSelectionBorders=u,t.markSelected=c;var f=n(1),h=n(0)},function(e,t){e.exports=!1},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports={}},function(e,t,n){var r=n(23).f,o=n(36),i=n(14)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){"use strict";function r(e){this.instance=e,this.state=a.VIRGIN,this._opened=!1,this._fullEditMode=!1,this._closeCallback=null,this.init()}t.__esModule=!0,t.EditorState=void 0;var o=n(8),i=n(11),a=t.EditorState={VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"};r.prototype._fireCallbacks=function(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)},r.prototype.init=function(){},r.prototype.getValue=function(){throw Error("Editor getValue() method unimplemented")},r.prototype.setValue=function(){throw Error("Editor setValue() method unimplemented")},r.prototype.open=function(){throw Error("Editor open() method unimplemented")},r.prototype.close=function(){throw Error("Editor close() method unimplemented")},r.prototype.prepare=function(e,t,n,r,o,i){this.TD=r,this.row=e,this.col=t,this.prop=n,this.originalValue=o,this.cellProperties=i,this.state=a.VIRGIN},r.prototype.extend=function(){function e(){for(var e=arguments.length,n=Array(e),r=0;rn[2]&&(r=n[0],n[0]=n[2],n[2]=r),n[1]>n[3]&&(r=n[1],n[1]=n[3],n[3]=r)):n=[this.row,this.col,null,null],this.instance.populateFromArray(n[0],n[1],e,n[2],n[3],"edit")},r.prototype.beginEditing=function(e,t){if(this.state===a.VIRGIN){if(this.instance.view.scrollViewport(new o.CellCoords(this.row,this.col)),this.state=a.EDITING,this.isInFullEditMode()){this.setValue("string"==typeof e?e:(0,i.stringify)(this.originalValue))}this.open(t),this._opened=!0,this.focus(),this.instance.view.render(),this.instance.runHooks("afterBeginEditing",this.row,this.col)}},r.prototype.finishEditing=function(e,t,n){var r=this,o=void 0;if(n){var i=this._closeCallback;this._closeCallback=function(e){i&&i(e),n(e),r.instance.view.render()}}if(!this.isWaiting()){if(this.state===a.VIRGIN)return void this.instance._registerTimeout(function(){r._fireCallbacks(!0)});if(this.state===a.EDITING){if(e)return this.cancelChanges(),void this.instance.view.render();var s=this.getValue();o=this.instance.getSettings().trimWhitespace?[["string"==typeof s?String.prototype.trim.call(s||""):s]]:[[s]],this.state=a.WAITING,this.saveValue(o,t),this.instance.getCellValidator(this.cellProperties)?this.instance.addHookOnce("postAfterValidate",function(e){r.state=a.FINISHED,r.discardEditor(e)}):(this.state=a.FINISHED,this.discardEditor(!0))}}},r.prototype.cancelChanges=function(){this.state=a.FINISHED,this.discardEditor()},r.prototype.discardEditor=function(e){this.state===a.FINISHED&&(!1===e&&!0!==this.cellProperties.allowInvalid?(this.instance.selectCell(this.row,this.col),this.focus(),this.state=a.EDITING,this._fireCallbacks(!1)):(this.close(),this._opened=!1,this._fullEditMode=!1,this.state=a.VIRGIN,this._fireCallbacks(!0)))},r.prototype.enableFullEditMode=function(){this._fullEditMode=!0},r.prototype.isInFullEditMode=function(){return this._fullEditMode},r.prototype.isOpened=function(){return this._opened},r.prototype.isWaiting=function(){return this.state===a.WAITING},r.prototype.checkEditorSection=function(){var e=this.instance.countRows(),t="";return this.row=e-this.instance.getSettings().fixedRowsBottom?t=this.col=e.getSetting("totalRows")||this.col>=e.getSetting("totalColumns"))}},{key:"isEqual",value:function(e){return e===this||this.row===e.row&&this.col===e.col}},{key:"isSouthEastOf",value:function(e){return this.row>=e.row&&this.col>=e.col}},{key:"isNorthWestOf",value:function(e){return this.row<=e.row&&this.col<=e.col}},{key:"isSouthWestOf",value:function(e){return this.row>=e.row&&this.col<=e.col}},{key:"isNorthEastOf",value:function(e){return this.row<=e.row&&this.col>=e.col}},{key:"toObject",value:function(){return{row:this.row,col:this.col}}}]),e}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=n(2),i=n(509),a=r(i),s=n(63),l=r(s),u=n(9),c=r(u),f=n(18),h=n(12),d=l.default.prototype.extend();d.prototype.init=function(){var e=this;this.createElements(),this.eventManager=new c.default(this),this.bindEvents(),this.autoResize=(0,a.default)(),this.holderZIndex=-1,this.instance.addHook("afterDestroy",function(){e.destroy()})},d.prototype.prepare=function(e,t,n,r,o,i){for(var a=this,u=this.state,c=arguments.length,f=Array(c>6?c-6:0),h=6;h=0?this.holderZIndex:""},d.prototype.getValue=function(){return this.TEXTAREA.value},d.prototype.setValue=function(e){this.TEXTAREA.value=e},d.prototype.beginEditing=function(){if(this.state===s.EditorState.VIRGIN){this.TEXTAREA.value="";for(var e=arguments.length,t=Array(e),n=0;n0&&void 0!==arguments[0]&&arguments[0];if(this.state===s.EditorState.EDITING||e){if(!(this.TD=this.getEditedCell()))return void(e||this.close(!0));var t=(0,o.offset)(this.TD),n=(0,o.offset)(this.instance.rootElement),r=this.instance.view.wt.wtOverlays.topOverlay.mainTableScrollableElement,i=this.instance.countRows(),a=r!==window?r.scrollTop:0,l=r!==window?r.scrollLeft:0,u=this.checkEditorSection(),c=["","left"].includes(u)?a:0,f=["","top","bottom"].includes(u)?l:0,h=t.top===n.top?0:1,d=this.instance.getSettings(),p=this.instance.hasColHeaders(),g=this.TD.style.backgroundColor,v=t.top-n.top-h-c,m=t.left-n.left-1-f,y=void 0;switch(u){case"top":y=(0,o.getCssTransform)(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);break;case"left":y=(0,o.getCssTransform)(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);break;case"top-left-corner":y=(0,o.getCssTransform)(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom-left-corner":y=(0,o.getCssTransform)(this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom":y=(0,o.getCssTransform)(this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.holder.parentNode)}(p&&0===this.instance.getSelectedLast()[0]||d.fixedRowsBottom&&this.instance.getSelectedLast()[0]===i-d.fixedRowsBottom)&&(v+=1),0===this.instance.getSelectedLast()[1]&&(m+=1),y&&-1!==y?this.textareaParentStyle[y[0]]=y[1]:(0,o.resetCssTransform)(this.TEXTAREA_PARENT),this.textareaParentStyle.top=v+"px",this.textareaParentStyle.left=m+"px",this.showEditableElement();var w=this.instance.view.wt.wtViewport.rowsRenderCalculator.startPosition,b=this.instance.view.wt.wtViewport.columnsRenderCalculator.startPosition,C=this.instance.view.wt.wtOverlays.leftOverlay.getScrollPosition(),_=this.instance.view.wt.wtOverlays.topOverlay.getScrollPosition(),E=(0,o.getScrollbarWidth)(),O=this.TD.offsetTop+w-_,S=this.TD.offsetLeft+b-C,T=(0,o.innerWidth)(this.TD)-8,R=(0,o.hasVerticalScrollbar)(r)?E:0,M=(0,o.hasHorizontalScrollbar)(r)?E:0,k=this.instance.view.maximumVisibleElementWidth(S)-9-R,N=this.TD.scrollHeight+1,A=Math.max(this.instance.view.maximumVisibleElementHeight(O)-M,23),I=(0,o.getComputedStyle)(this.TD);this.TEXTAREA.style.fontSize=I.fontSize,this.TEXTAREA.style.fontFamily=I.fontFamily,this.TEXTAREA.style.backgroundColor=g||(0,o.getComputedStyle)(this.TEXTAREA).backgroundColor,this.autoResize.init(this.TEXTAREA,{minHeight:Math.min(N,A),maxHeight:A,minWidth:Math.min(T,k),maxWidth:k},!0)}},d.prototype.bindEvents=function(){var e=this;this.eventManager.addEventListener(this.TEXTAREA,"cut",function(e){(0,h.stopPropagation)(e)}),this.eventManager.addEventListener(this.TEXTAREA,"paste",function(e){(0,h.stopPropagation)(e)}),this.instance.addHook("afterScrollHorizontally",function(){e.refreshDimensions()}),this.instance.addHook("afterScrollVertically",function(){e.refreshDimensions()}),this.instance.addHook("afterColumnResize",function(){e.refreshDimensions(),e.focus()}),this.instance.addHook("afterRowResize",function(){e.refreshDimensions(),e.focus()}),this.instance.addHook("afterDestroy",function(){e.eventManager.destroy()})},d.prototype.destroy=function(){this.eventManager.destroy()},t.default=d},function(e,t,n){"use strict";function r(e,t){return"number"==typeof e&&"number"==typeof t?e-t:f(e,t)}function o(e,t){return""===e&&(e="("+t+")"),e}function i(e){return h&&(e=new Set(e)),function(t){return h?e.has(t):!!~e.indexOf(t)}}function a(e){return null==e?"":e}function s(e){return e=d?Array.from(new Set(e)):(0,c.arrayUnique)(e),e=e.sort(function(e,t){return"number"==typeof e&&"number"==typeof t?e-t:e===t?0:e>t?1:-1})}function l(e,t,n,r){var a=[],s=e===t,l=void 0;return s||(l=i(t)),(0,c.arrayEach)(e,function(e){var t=!1;(s||l(e))&&(t=!0);var i={checked:t,value:e,visualValue:o(e,n)};r&&r(i),a.push(i)}),a}t.__esModule=!0,t.sortComparison=r,t.toVisualValue=o,t.createArrayAssertion=i,t.toEmptyString=a,t.unifyColumnValues=s,t.intersectValues=l;var u=n(42),c=n(0),f=(0,u.getComparisonFunction)(),h=new Set([1]).has(1),d=h&&"function"==typeof Array.from},function(e,t,n){"use strict";function r(e){if(!a[e])throw Error('Operation with id "'+e+'" does not exist.');var t=a[e].func;return function(e,n){return t(e,n)}}function o(e){return a[e].name}function i(e,t,n){a[e]={name:t,func:n}}t.__esModule=!0,t.getOperationFunc=r,t.getOperationName=o,t.registerOperation=i;var a=t.operations={}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=function(){function e(e,t){for(var n=0;n-1?parseFloat(e):parseInt(e,10)),t}function o(e){return-1*r(e)}t.__esModule=!0,t.toNumber=r,t.invertNumber=o},function(module,exports,__webpack_require__){var utils=__webpack_require__(1),error=__webpack_require__(0),statistical=__webpack_require__(5),information=__webpack_require__(7);exports.ABS=function(e){return(e=utils.parseNumber(e))instanceof Error?e:Math.abs(e)},exports.ACOS=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.acos(e);return isNaN(t)&&(t=error.num),t},exports.ACOSH=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.log(e+Math.sqrt(e*e-1));return isNaN(t)&&(t=error.num),t},exports.ACOT=function(e){return(e=utils.parseNumber(e))instanceof Error?e:Math.atan(1/e)},exports.ACOTH=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=.5*Math.log((e+1)/(e-1));return isNaN(t)&&(t=error.num),t},exports.AGGREGATE=function(e,t,n,r){if(e=utils.parseNumber(e),t=utils.parseNumber(e),utils.anyIsError(e,t))return error.value;switch(e){case 1:return statistical.AVERAGE(n);case 2:return statistical.COUNT(n);case 3:return statistical.COUNTA(n);case 4:return statistical.MAX(n);case 5:return statistical.MIN(n);case 6:return exports.PRODUCT(n);case 7:return statistical.STDEV.S(n);case 8:return statistical.STDEV.P(n);case 9:return exports.SUM(n);case 10:return statistical.VAR.S(n);case 11:return statistical.VAR.P(n);case 12:return statistical.MEDIAN(n);case 13:return statistical.MODE.SNGL(n);case 14:return statistical.LARGE(n,r);case 15:return statistical.SMALL(n,r);case 16:return statistical.PERCENTILE.INC(n,r);case 17:return statistical.QUARTILE.INC(n,r);case 18:return statistical.PERCENTILE.EXC(n,r);case 19:return statistical.QUARTILE.EXC(n,r)}},exports.ARABIC=function(e){if(!/^M*(?:D?C{0,3}|C[MD])(?:L?X{0,3}|X[CL])(?:V?I{0,3}|I[XV])$/.test(e))return error.value;var t=0;return e.replace(/[MDLV]|C[MD]?|X[CL]?|I[XV]?/g,function(e){t+={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1}[e]}),t},exports.ASIN=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.asin(e);return isNaN(t)&&(t=error.num),t},exports.ASINH=function(e){return e=utils.parseNumber(e),e instanceof Error?e:Math.log(e+Math.sqrt(e*e+1))},exports.ATAN=function(e){return e=utils.parseNumber(e),e instanceof Error?e:Math.atan(e)},exports.ATAN2=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:Math.atan2(e,t)},exports.ATANH=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.log((1+e)/(1-e))/2;return isNaN(t)&&(t=error.num),t},exports.BASE=function(e,t,n){if(n=n||0,e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n))return error.value;n=void 0===n?0:n;var r=e.toString(t);return new Array(Math.max(n+1-r.length,0)).join("0")+r},exports.CEILING=function(e,t,n){if(t=void 0===t?1:Math.abs(t),n=n||0,e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n))return error.value;if(0===t)return 0;var r=-Math.floor(Math.log(t)/Math.log(10));return e>=0?exports.ROUND(Math.ceil(e/t)*t,r):0===n?-exports.ROUND(Math.floor(Math.abs(e)/t)*t,r):-exports.ROUND(Math.ceil(Math.abs(e)/t)*t,r)},exports.CEILING.MATH=exports.CEILING,exports.CEILING.PRECISE=exports.CEILING,exports.COMBIN=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:exports.FACT(e)/(exports.FACT(t)*exports.FACT(e-t))},exports.COMBINA=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:0===e&&0===t?1:exports.COMBIN(e+t-1,e-1)},exports.COS=function(e){return e=utils.parseNumber(e),e instanceof Error?e:Math.cos(e)},exports.COSH=function(e){return e=utils.parseNumber(e),e instanceof Error?e:(Math.exp(e)+Math.exp(-e))/2},exports.COT=function(e){return e=utils.parseNumber(e),e instanceof Error?e:1/Math.tan(e)},exports.COTH=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.exp(2*e);return(t+1)/(t-1)},exports.CSC=function(e){return e=utils.parseNumber(e),e instanceof Error?e:1/Math.sin(e)},exports.CSCH=function(e){return e=utils.parseNumber(e),e instanceof Error?e:2/(Math.exp(e)-Math.exp(-e))},exports.DECIMAL=function(e,t){return arguments.length<1?error.value:parseInt(e,t)},exports.DEGREES=function(e){return e=utils.parseNumber(e),e instanceof Error?e:180*e/Math.PI},exports.EVEN=function(e){return e=utils.parseNumber(e),e instanceof Error?e:exports.CEILING(e,-2,-1)},exports.EXP=function(e){return arguments.length<1?error.na:"number"!=typeof e||arguments.length>1?error.error:e=Math.exp(e)};var MEMOIZED_FACT=[];exports.FACT=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.floor(e);return 0===t||1===t?1:MEMOIZED_FACT[t]>0?MEMOIZED_FACT[t]:MEMOIZED_FACT[t]=exports.FACT(t-1)*t},exports.FACTDOUBLE=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.floor(e);return t<=0?1:t*exports.FACTDOUBLE(t-2)},exports.FLOOR=function(e,t){if(e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t))return error.value;if(0===t)return 0;if(!(e>0&&t>0||e<0&&t<0))return error.num;t=Math.abs(t);var n=-Math.floor(Math.log(t)/Math.log(10));return e>=0?exports.ROUND(Math.floor(e/t)*t,n):-exports.ROUND(Math.ceil(Math.abs(e)/t),n)},exports.FLOOR.MATH=function(e,t,n){if(t=void 0===t?1:t,n=void 0===n?0:n,e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n))return error.value;if(0===t)return 0;t=t?Math.abs(t):1;var r=-Math.floor(Math.log(t)/Math.log(10));return e>=0?exports.ROUND(Math.floor(e/t)*t,r):0===n||void 0===n?-exports.ROUND(Math.ceil(Math.abs(e)/t)*t,r):-exports.ROUND(Math.floor(Math.abs(e)/t)*t,r)},exports.FLOOR.PRECISE=exports.FLOOR.MATH,exports.GCD=function(){var e=utils.parseNumberArray(utils.flatten(arguments));if(e instanceof Error)return e;for(var t=e.length,n=e[0],r=n<0?-n:n,o=1;oa?r%=a:a%=r;r+=a}return r},exports.INT=function(e){return e=utils.parseNumber(e),e instanceof Error?e:Math.floor(e)},exports.ISO={CEILING:exports.CEILING},exports.LCM=function(){var e=utils.parseNumberArray(utils.flatten(arguments));if(e instanceof Error)return e;for(var t,n,r,o,i=1;void 0!==(r=e.pop());)for(;r>1;){if(r%2){for(t=3,n=Math.floor(Math.sqrt(r));t<=n&&r%t;t+=2);o=t<=n?t:r}else o=2;for(r/=o,i*=o,t=e.length;t;e[--t]%o==0&&1==(e[t]/=o)&&e.splice(t,1));}return i},exports.LN=function(e){return e=utils.parseNumber(e),e instanceof Error?e:Math.log(e)},exports.LN10=function(){return Math.log(10)},exports.LN2=function(){return Math.log(2)},exports.LOG10E=function(){return Math.LOG10E},exports.LOG2E=function(){return Math.LOG2E},exports.LOG=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:(t=void 0===t?10:t,Math.log(e)/Math.log(t))},exports.LOG10=function(e){return e=utils.parseNumber(e),e instanceof Error?e:Math.log(e)/Math.log(10)},exports.MOD=function(e,t){if(e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t))return error.value;if(0===t)return error.div0;var n=Math.abs(e%t);return t>0?n:-n},exports.MROUND=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:e*t<0?error.num:Math.round(e/t)*t},exports.MULTINOMIAL=function(){var e=utils.parseNumberArray(utils.flatten(arguments));if(e instanceof Error)return e;for(var t=0,n=1,r=0;r0?t:-t},exports.PI=function(){return Math.PI},exports.E=function(){return Math.E},exports.POWER=function(e,t){if(e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t))return error.value;var n=Math.pow(e,t);return isNaN(n)?error.num:n},exports.PRODUCT=function(){var e=utils.parseNumberArray(utils.flatten(arguments));if(e instanceof Error)return e;for(var t=1,n=0;n0?1:-1)*Math.floor(Math.abs(e)*Math.pow(10,t))/Math.pow(10,t)},exports.ROUNDUP=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:(e>0?1:-1)*Math.ceil(Math.abs(e)*Math.pow(10,t))/Math.pow(10,t)},exports.SEC=function(e){return e=utils.parseNumber(e),e instanceof Error?e:1/Math.cos(e)},exports.SECH=function(e){return e=utils.parseNumber(e),e instanceof Error?e:2/(Math.exp(e)+Math.exp(-e))},exports.SERIESSUM=function(e,t,n,r){if(e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),r=utils.parseNumberArray(r),utils.anyIsError(e,t,n,r))return error.value;for(var o=r[0]*Math.pow(e,t),i=1;i=t)},exports.LT=function(e,t){return 2!==arguments.length?error.na:(e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.error:e0?1:-1)*Math.floor(Math.abs(e)*Math.pow(10,t))/Math.pow(10,t)}},function(module,exports,__webpack_require__){var mathTrig=__webpack_require__(4),text=__webpack_require__(6),jStat=__webpack_require__(11).jStat,utils=__webpack_require__(1),error=__webpack_require__(0),misc=__webpack_require__(12);exports.AVEDEV=function(){var e=utils.parseNumberArray(utils.flatten(arguments));return e instanceof Error?e:jStat.sum(jStat(e).subtract(jStat.mean(e)).abs()[0])/e.length},exports.AVERAGE=function(){for(var e,t=utils.numbers(utils.flatten(arguments)),n=t.length,r=0,o=0,i=0;i=n)return r;r++}},exports.CHISQ={},exports.CHISQ.DIST=function(e,t,n){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:n?jStat.chisquare.cdf(e,t):jStat.chisquare.pdf(e,t)},exports.CHISQ.DIST.RT=function(e,t){return!e|!t?error.na:e<1||t>Math.pow(10,10)?error.num:"number"!=typeof e||"number"!=typeof t?error.value:1-jStat.chisquare.cdf(e,t)},exports.CHISQ.INV=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:jStat.chisquare.inv(e,t)},exports.CHISQ.INV.RT=function(e,t){return!e|!t?error.na:e<0||e>1||t<1||t>Math.pow(10,10)?error.num:"number"!=typeof e||"number"!=typeof t?error.value:jStat.chisquare.inv(1-e,t)},exports.CHISQ.TEST=function(e,t){if(2!==arguments.length)return error.na;if(!(e instanceof Array&&t instanceof Array))return error.value;if(e.length!==t.length)return error.value;if(e[0]&&t[0]&&e[0].length!==t[0].length)return error.value;var n,r,o,i=e.length;for(r=0;r=2;)n=n*e/r,r-=2;for(var o=n,i=t;o>1e-10*n;)i+=2,o=o*e/i,n+=o;return 1-n}(l,s))/1e6},exports.COLUMN=function(e,t){return 2!==arguments.length?error.na:t<0?error.num:e instanceof Array&&"number"==typeof t?0!==e.length?jStat.col(e,t):void 0:error.value},exports.COLUMNS=function(e){return 1!==arguments.length?error.na:e instanceof Array?0===e.length?0:jStat.cols(e):error.value},exports.CONFIDENCE={},exports.CONFIDENCE.NORM=function(e,t,n){return e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n)?error.value:jStat.normalci(1,e,t,n)[1]-1},exports.CONFIDENCE.T=function(e,t,n){return e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n)?error.value:jStat.tci(1,e,t,n)[1]-1},exports.CORREL=function(e,t){return e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t)?error.value:jStat.corrcoeff(e,t)},exports.COUNT=function(){return utils.numbers(utils.flatten(arguments)).length},exports.COUNTA=function(){var e=utils.flatten(arguments);return e.length-exports.COUNTBLANK(e)},exports.COUNTIN=function(e,t){var n=0;e=utils.flatten(e);for(var r=0;r=!]/.test(criteria)||(criteria='=="'+criteria+'"');for(var matches=0,i=0;i=!]/.test(criteria)||(criteria='=="'+criteria+'"');for(var j=0;j1?error.num:jStat.centralF.inv(e,t,n)},exports.F.INV.RT=function(e,t,n){return 3!==arguments.length?error.na:e<0||e>1||t<1||t>Math.pow(10,10)||n<1||n>Math.pow(10,10)?error.num:"number"!=typeof e||"number"!=typeof t||"number"!=typeof n?error.value:jStat.centralF.inv(1-e,t,n)},exports.F.TEST=function(e,t){if(!e||!t)return error.na;if(!(e instanceof Array&&t instanceof Array))return error.na;if(e.length<2||t.length<2)return error.div0;var n=function(e,t){for(var n=0,r=0;rt[i-1]&&e[a]<=t[i]&&(o[i]+=1):i===r&&e[a]>t[r-1]&&(o[r]+=1)}return o},exports.GAMMA=function(e){return e=utils.parseNumber(e),e instanceof Error?e:0===e?error.num:parseInt(e,10)===e&&e<0?error.num:jStat.gammafn(e)},exports.GAMMA.DIST=function(e,t,n,r){return 4!==arguments.length?error.na:e<0||t<=0||n<=0?error.value:"number"!=typeof e||"number"!=typeof t||"number"!=typeof n?error.value:r?jStat.gamma.cdf(e,t,n,!0):jStat.gamma.pdf(e,t,n,!1)},exports.GAMMA.INV=function(e,t,n){return 3!==arguments.length?error.na:e<0||e>1||t<=0||n<=0?error.num:"number"!=typeof e||"number"!=typeof t||"number"!=typeof n?error.value:jStat.gamma.inv(e,t,n)},exports.GAMMALN=function(e){return e=utils.parseNumber(e),e instanceof Error?e:jStat.gammaln(e)},exports.GAMMALN.PRECISE=function(e){return 1!==arguments.length?error.na:e<=0?error.num:"number"!=typeof e?error.value:jStat.gammaln(e)},exports.GAUSS=function(e){return e=utils.parseNumber(e),e instanceof Error?e:jStat.normal.cdf(e,0,1)-.5},exports.GEOMEAN=function(){var e=utils.parseNumberArray(utils.flatten(arguments));return e instanceof Error?e:jStat.geomean(e)},exports.GROWTH=function(e,t,n,r){if((e=utils.parseNumberArray(e))instanceof Error)return e;var o;if(void 0===t)for(t=[],o=1;o<=e.length;o++)t.push(o);if(void 0===n)for(n=[],o=1;o<=e.length;o++)n.push(o);if(t=utils.parseNumberArray(t),n=utils.parseNumberArray(n),utils.anyIsError(t,n))return error.value;void 0===r&&(r=!0);var i=e.length,a=0,s=0,l=0,u=0;for(o=0;oi&&(i=r[t],o=[]),r[t]===i&&(o[o.length]=t);return o},exports.MODE.SNGL=function(){var e=utils.parseNumberArray(utils.flatten(arguments));return e instanceof Error?e:exports.MODE.MULT(e).sort(function(e,t){return e-t})[0]},exports.NEGBINOM={},exports.NEGBINOM.DIST=function(e,t,n,r){return e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n)?error.value:r?jStat.negbin.cdf(e,t,n):jStat.negbin.pdf(e,t,n)},exports.NORM={},exports.NORM.DIST=function(e,t,n,r){return e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n)?error.value:n<=0?error.num:r?jStat.normal.cdf(e,t,n):jStat.normal.pdf(e,t,n)},exports.NORM.INV=function(e,t,n){return e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n)?error.value:jStat.normal.inv(e,t,n)},exports.NORM.S={},exports.NORM.S.DIST=function(e,t){return e=utils.parseNumber(e),e instanceof Error?error.value:t?jStat.normal.cdf(e,0,1):jStat.normal.pdf(e,0,1)},exports.NORM.S.INV=function(e){return e=utils.parseNumber(e),e instanceof Error?error.value:jStat.normal.inv(e,0,1)},exports.PEARSON=function(e,t){if(t=utils.parseNumberArray(utils.flatten(t)),e=utils.parseNumberArray(utils.flatten(e)),utils.anyIsError(t,e))return error.value;for(var n=jStat.mean(e),r=jStat.mean(t),o=e.length,i=0,a=0,s=0,l=0;l1-1/(n+1))return error.num;var r=t*(n+1)-1,o=Math.floor(r);return utils.cleanFloat(r===o?e[r]:e[o]+(r-o)*(e[o+1]-e[o]))},exports.PERCENTILE.INC=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumber(t),utils.anyIsError(e,t))return error.value;e=e.sort(function(e,t){return e-t});var n=e.length,r=t*(n-1),o=Math.floor(r);return utils.cleanFloat(r===o?e[r]:e[o]+(r-o)*(e[o+1]-e[o]))},exports.PERCENTRANK={},exports.PERCENTRANK.EXC=function(e,t,n){if(n=void 0===n?3:n,e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n))return error.value;e=e.sort(function(e,t){return e-t});for(var r=misc.UNIQUE.apply(null,e),o=e.length,i=r.length,a=Math.pow(10,n),s=0,l=!1,u=0;!l&&u=r[u]&&(t=r[u]&&(t=0?t[e.indexOf(n)]:0;for(var o=e.sort(function(e,t){return e-t}),i=o.length,a=0,s=0;s=n&&o[s]<=r&&(a+=t[e.indexOf(o[s])]);return a},exports.QUARTILE={},exports.QUARTILE.EXC=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumber(t),utils.anyIsError(e,t))return error.value;switch(t){case 1:return exports.PERCENTILE.EXC(e,.25);case 2:return exports.PERCENTILE.EXC(e,.5);case 3:return exports.PERCENTILE.EXC(e,.75);default:return error.num}},exports.QUARTILE.INC=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumber(t),utils.anyIsError(e,t))return error.value;switch(t){case 1:return exports.PERCENTILE.INC(e,.25);case 2:return exports.PERCENTILE.INC(e,.5);case 3:return exports.PERCENTILE.INC(e,.75);default:return error.num}},exports.RANK={},exports.RANK.AVG=function(e,t,n){if(e=utils.parseNumber(e),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t))return error.value;t=utils.flatten(t),n=n||!1,t=t.sort(n?function(e,t){return e-t}:function(e,t){return t-e});for(var r=t.length,o=0,i=0;i1?(2*t.indexOf(e)+o+1)/2:t.indexOf(e)+1},exports.RANK.EQ=function(e,t,n){return e=utils.parseNumber(e),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t)?error.value:(n=n||!1,t=t.sort(n?function(e,t){return e-t}:function(e,t){return t-e}),t.indexOf(e)+1)},exports.ROW=function(e,t){return 2!==arguments.length?error.na:t<0?error.num:e instanceof Array&&"number"==typeof t?0!==e.length?jStat.row(e,t):void 0:error.value},exports.ROWS=function(e){return 1!==arguments.length?error.na:e instanceof Array?0===e.length?0:jStat.rows(e):error.value},exports.RSQ=function(e,t){return e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t)?error.value:Math.pow(exports.PEARSON(e,t),2)},exports.SKEW=function(){var e=utils.parseNumberArray(utils.flatten(arguments));if(e instanceof Error)return e;for(var t=jStat.mean(e),n=e.length,r=0,o=0;o1||t<1?error.num:utils.anyIsError(e,t)?error.value:Math.abs(jStat.studentt.inv(e/2,t))},exports.T.TEST=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t))return error.value;var n,r=jStat.mean(e),o=jStat.mean(t),i=0,a=0;for(n=0;n-1;)e[t]="TRUE";for(var n=0;(n=e.indexOf(!1))>-1;)e[n]="FALSE";return e.join("")},t.DBCS=function(){throw new Error("DBCS is not implemented")},t.DOLLAR=function(e,t){if(t=void 0===t?2:t,e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t))return o.value;var n="";return t<=0?(e=Math.round(e*Math.pow(10,t))/Math.pow(10,t),n="($0,0)"):t>0&&(n="($0,0."+new Array(t+1).join("0")+")"),i(e).format(n)},t.EXACT=function(e,t){return 2!==arguments.length?o.na:e===t},t.FIND=function(e,t,n){return arguments.length<2?o.na:(n=void 0===n?0:n,t?t.indexOf(e,n-1)+1:null)},t.FIXED=function(e,t,n){if(t=void 0===t?2:t,n=void 0!==n&&n,e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t))return o.value;var a=n?"0":"0,0";return t<=0?e=Math.round(e*Math.pow(10,t))/Math.pow(10,t):t>0&&(a+="."+new Array(t+1).join("0")),i(e).format(a)},t.HTML2TEXT=function(e){var t="";return e&&(e instanceof Array?e.forEach(function(e){""!==t&&(t+="\n"),t+=e.replace(/<(?:.|\n)*?>/gm,"")}):t=e.replace(/<(?:.|\n)*?>/gm,"")),t},t.LEFT=function(e,t){return t=void 0===t?1:t,t=r.parseNumber(t),t instanceof Error||"string"!=typeof e?o.value:e?e.substring(0,t):null},t.LEN=function(e){return 0===arguments.length?o.error:"string"==typeof e?e?e.length:0:e.length?e.length:o.value},t.LOWER=function(e){return"string"!=typeof e?o.value:e?e.toLowerCase():e},t.MID=function(e,t,n){if(t=r.parseNumber(t),n=r.parseNumber(n),r.anyIsError(t,n)||"string"!=typeof e)return n;var o=t-1;return e.substring(o,o+n)},t.NUMBERVALUE=function(e,t,n){return t=void 0===t?".":t,n=void 0===n?",":n,Number(e.replace(t,".").replace(n,""))},t.PRONETIC=function(){throw new Error("PRONETIC is not implemented")},t.PROPER=function(e){return void 0===e||0===e.length?o.value:(!0===e&&(e="TRUE"),!1===e&&(e="FALSE"),isNaN(e)&&"number"==typeof e?o.value:("number"==typeof e&&(e=""+e),e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})))},t.REGEXEXTRACT=function(e,t){if(arguments.length<2)return o.na;var n=e.match(new RegExp(t));return n?n[n.length>1?n.length-1:0]:null},t.REGEXMATCH=function(e,t,n){if(arguments.length<2)return o.na;var r=e.match(new RegExp(t));return n?r:!!r},t.REGEXREPLACE=function(e,t,n){return arguments.length<3?o.na:e.replace(new RegExp(t),n)},t.REPLACE=function(e,t,n,i){return t=r.parseNumber(t),n=r.parseNumber(n),r.anyIsError(t,n)||"string"!=typeof e||"string"!=typeof i?o.value:e.substr(0,t-1)+i+e.substr(t-1+n)},t.REPT=function(e,t){return t=r.parseNumber(t),t instanceof Error?t:new Array(t+1).join(e)},t.RIGHT=function(e,t){return t=void 0===t?1:t,t=r.parseNumber(t),t instanceof Error?t:e?e.substring(e.length-t):o.na},t.SEARCH=function(e,t,n){var r;return"string"!=typeof e||"string"!=typeof t?o.value:(n=void 0===n?0:n,r=t.toLowerCase().indexOf(e.toLowerCase(),n-1)+1,0===r?o.value:r)},t.SPLIT=function(e,t){return e.split(t)},t.SUBSTITUTE=function(e,t,n,r){if(arguments.length<2)return o.na;if(!(e&&t&&n))return e;if(void 0===r)return e.replace(new RegExp(t,"g"),n);for(var i=0,a=0;e.indexOf(t,i)>0;)if(i=e.indexOf(t,i+1),++a===r)return e.substring(0,i)+n+e.substring(i+t.length)},t.T=function(e){return"string"==typeof e?e:""},t.TEXT=function(e,t){return e=r.parseNumber(e),r.anyIsError(e)?o.na:i(e).format(t)},t.TRIM=function(e){return"string"!=typeof e?o.value:e.replace(/ +/g," ").trim()},t.UNICHAR=t.CHAR,t.UNICODE=t.CODE,t.UPPER=function(e){return"string"!=typeof e?o.value:e.toUpperCase()},t.VALUE=function(e){if("string"!=typeof e)return o.value;var t=i().unformat(e);return void 0===t?0:t}},function(e,t,n){var r=n(0);t.CELL=function(){throw new Error("CELL is not implemented")},t.ERROR={},t.ERROR.TYPE=function(e){switch(e){case r.nil:return 1;case r.div0:return 2;case r.value:return 3;case r.ref:return 4;case r.name:return 5;case r.num:return 6;case r.na:return 7;case r.data:return 8}return r.na},t.INFO=function(){throw new Error("INFO is not implemented")},t.ISBLANK=function(e){return null===e},t.ISBINARY=function(e){return/^[01]{1,10}$/.test(e)},t.ISERR=function(e){return[r.value,r.ref,r.div0,r.num,r.name,r.nil].indexOf(e)>=0||"number"==typeof e&&(isNaN(e)||!isFinite(e))},t.ISERROR=function(e){return t.ISERR(e)||e===r.na},t.ISEVEN=function(e){return!(1&Math.floor(Math.abs(e)))},t.ISFORMULA=function(){throw new Error("ISFORMULA is not implemented")},t.ISLOGICAL=function(e){return!0===e||!1===e},t.ISNA=function(e){return e===r.na},t.ISNONTEXT=function(e){return"string"!=typeof e},t.ISNUMBER=function(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)},t.ISODD=function(e){return!!(1&Math.floor(Math.abs(e)))},t.ISREF=function(){throw new Error("ISREF is not implemented")},t.ISTEXT=function(e){return"string"==typeof e},t.N=function(e){return this.ISNUMBER(e)?e:e instanceof Date?e.getTime():!0===e?1:!1===e?0:this.ISERROR(e)?e:0},t.NA=function(){return r.na},t.SHEET=function(){throw new Error("SHEET is not implemented")},t.SHEETS=function(){throw new Error("SHEETS is not implemented")},t.TYPE=function(e){return this.ISNUMBER(e)?1:this.ISTEXT(e)?2:this.ISLOGICAL(e)?4:this.ISERROR(e)?16:Array.isArray(e)?64:void 0}},function(e,t,n){function r(e){return 1===new Date(e,1,29).getMonth()}function o(e,t){return Math.ceil((t-e)/1e3/60/60/24)}function i(e){return(e-l)/864e5+(e>-22038912e5?2:1)}var a=n(0),s=n(1),l=new Date(1900,0,1),u=[void 0,0,1,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,1,2,3,4,5,6,0],c=[[],[1,2,3,4,5,6,7],[7,1,2,3,4,5,6],[6,0,1,2,3,4,5],[],[],[],[],[],[],[],[7,1,2,3,4,5,6],[6,7,1,2,3,4,5],[5,6,7,1,2,3,4],[4,5,6,7,1,2,3],[3,4,5,6,7,1,2],[2,3,4,5,6,7,1],[1,2,3,4,5,6,7]],f=[[],[6,0],[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],void 0,void 0,void 0,[0,0],[1,1],[2,2],[3,3],[4,4],[5,5],[6,6]];t.DATE=function(e,t,n){return e=s.parseNumber(e),t=s.parseNumber(t),n=s.parseNumber(n),s.anyIsError(e,t,n)?a.value:e<0||t<0||n<0?a.num:new Date(e,t-1,n)},t.DATEVALUE=function(e){if("string"!=typeof e)return a.value;var t=Date.parse(e);return isNaN(t)?a.value:t<=-22038912e5?(t-l)/864e5+1:(t-l)/864e5+2},t.DAY=function(e){var t=s.parseDate(e);return t instanceof Error?t:t.getDate()},t.DAYS=function(e,t){return e=s.parseDate(e),t=s.parseDate(t),e instanceof Error?e:t instanceof Error?t:i(e)-i(t)},t.DAYS360=function(e,t,n){if(n=s.parseBool(n),e=s.parseDate(e),t=s.parseDate(t),e instanceof Error)return e;if(t instanceof Error)return t;if(n instanceof Error)return n;var r,o,i=e.getMonth(),a=t.getMonth();if(n)r=31===e.getDate()?30:e.getDate(),o=31===t.getDate()?30:t.getDate();else{var l=new Date(e.getFullYear(),i+1,0).getDate(),u=new Date(t.getFullYear(),a+1,0).getDate();r=e.getDate()===l?30:e.getDate(),t.getDate()===u?r<30?(a++,o=1):o=30:o=t.getDate()}return 360*(t.getFullYear()-e.getFullYear())+30*(a-i)+(o-r)},t.EDATE=function(e,t){return(e=s.parseDate(e))instanceof Error?e:isNaN(t)?a.value:(t=parseInt(t,10),e.setMonth(e.getMonth()+t),i(e))},t.EOMONTH=function(e,t){return(e=s.parseDate(e))instanceof Error?e:isNaN(t)?a.value:(t=parseInt(t,10),i(new Date(e.getFullYear(),e.getMonth()+t+1,0)))},t.HOUR=function(e){return e=s.parseDate(e),e instanceof Error?e:e.getHours()},t.INTERVAL=function(e){if("number"!=typeof e&&"string"!=typeof e)return a.value;e=parseInt(e,10);var t=Math.floor(e/94608e4);e%=94608e4;var n=Math.floor(e/2592e3);e%=2592e3;var r=Math.floor(e/86400);e%=86400;var o=Math.floor(e/3600);e%=3600;var i=Math.floor(e/60);e%=60;var s=e;return t=t>0?t+"Y":"",n=n>0?n+"M":"",r=r>0?r+"D":"",o=o>0?o+"H":"",i=i>0?i+"M":"",s=s>0?s+"S":"","P"+t+n+r+"T"+o+i+s},t.ISOWEEKNUM=function(e){if((e=s.parseDate(e))instanceof Error)return e;e.setHours(0,0,0),e.setDate(e.getDate()+4-(e.getDay()||7));var t=new Date(e.getFullYear(),0,1);return Math.ceil(((e-t)/864e5+1)/7)},t.MINUTE=function(e){return e=s.parseDate(e),e instanceof Error?e:e.getMinutes()},t.MONTH=function(e){return e=s.parseDate(e),e instanceof Error?e:e.getMonth()+1},t.NETWORKDAYS=function(e,t,n){return this.NETWORKDAYS.INTL(e,t,1,n)},t.NETWORKDAYS.INTL=function(e,t,n,r){if((e=s.parseDate(e))instanceof Error)return e;if((t=s.parseDate(t))instanceof Error)return t;if(!((n=void 0===n?f[1]:f[n])instanceof Array))return a.value;void 0===r?r=[]:r instanceof Array||(r=[r]);for(var o=0;o0?c.getUTCDay():c.getDay(),d=!1;h!==n[0]&&h!==n[1]||(d=!0);for(var p=0;pc||a===c&&i>=u))return(l===f&&r(l)||function(e,t){var n=e.getFullYear(),o=new Date(n,2,1);if(r(n)&&e=o)return!0;var i=t.getFullYear(),a=new Date(i,2,1);return r(i)&&t>=a&&et?e:t},Array.isArray(e)?e[0]:void 0)}function h(e){return a(e,function(e,t){return e1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:"value",o="_"+n,i=(t={_touched:!1},r(t,o,e),r(t,"isTouched",function(){return this._touched}),t);return Object.defineProperty(i,n,{get:function(){return this[o]},set:function(e){this._touched=!0,this[o]=e},enumerable:!0,configurable:!0}),i}function y(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.__esModule=!0;var w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.duckSchema=o,t.inherit=i,t.extend=a,t.deepExtend=s,t.deepClone=l,t.clone=u,t.mixin=c,t.isObjectEqual=f,t.isObject=h,t.defineGetter=d,t.objectEach=p,t.getProperty=g,t.deepObjectSize=v,t.createObjectPropListener=m,t.hasOwnProperty=y;var b=n(0)},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:0,n=-1,r=null,o=e;null!==o;){if(n===t){r=o;break}o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o=o.host:(n+=1,o=o.parentNode)}return r}function i(e,t,n){for(var r=e;null!==r&&r!==n;){if(r.nodeType===Node.ELEMENT_NODE&&(t.indexOf(r.nodeName)>-1||t.indexOf(r)>-1))return r;r=r.host&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?r.host:r.parentNode}return null}function a(e,t,n){for(var r=[],o=e;o&&(o=i(o,t,n))&&(!n||n.contains(o));)r.push(o),o=o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o.host:o.parentNode;var a=r.length;return a?r[a-1]:null}function s(e,t){var n=e.parentNode,r=[];for("string"==typeof t?r=Array.prototype.slice.call(document.querySelectorAll(t),0):r.push(t);null!==n;){if(r.indexOf(n)>-1)return!0;n=n.parentNode}return!1}function l(e){function t(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName===n.toUpperCase()}for(var n="hot-table",r=!1,o=u(e);null!==o;){if(t(o)){r=!0;break}if(o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(r=t(o.host))break;o=o.host}o=o.parentNode}return r}function u(e){return"undefined"!=typeof Polymer&&"function"==typeof wrap?wrap(e):e}function c(e){return"undefined"!=typeof Polymer&&"function"==typeof unwrap?unwrap(e):e}function f(e){var t=0,n=e;if(n.previousSibling)for(;n=n.previousSibling;)t+=1;return t}function h(e,t){var n=document.querySelector(".ht_clone_"+e);return n?n.contains(t):null}function d(e){var t=[];if(!e||!e.length)return t;for(var n=0;e[n];)t.push(e[n]),n+=1;return t}function p(e,t){return J(e,t)}function g(e,t){return ee(e,t)}function v(e,t){return te(e,t)}function m(e,t){if(3===e.nodeType)t.removeChild(e);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(e.nodeName)>-1)for(var n=e.childNodes,r=n.length-1;r>=0;r--)m(n[r],e)}function y(e){for(var t=void 0;t=e.lastChild;)e.removeChild(t)}function w(e,t){ie.test(t)?e.innerHTML=t:b(e,t)}function b(e,t){var n=e.firstChild;n&&3===n.nodeType&&null===n.nextSibling?ae?n.textContent=t:n.data=t:(y(e),e.appendChild(document.createTextNode(t)))}function C(e){for(var t=e;c(t)!==document.documentElement;){if(null===t)return!1;if(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(t.host){if(t.host.impl)return C(t.host.impl);if(t.host)return C(t.host);throw new Error("Lost in Web Components world")}return!1}if("none"===t.style.display)return!1;t=t.parentNode}return!0}function E(e){var t=document.documentElement,n=e,r=void 0,o=void 0,i=void 0,a=void 0;if((0,Z.hasCaptionProblem)()&&n.firstChild&&"CAPTION"===n.firstChild.nodeName)return a=n.getBoundingClientRect(),{top:a.top+(window.pageYOffset||t.scrollTop)-(t.clientTop||0),left:a.left+(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0)};for(r=n.offsetLeft,o=n.offsetTop,i=n;(n=n.offsetParent)&&n!==document.body;)r+=n.offsetLeft,o+=n.offsetTop,i=n;return i&&"fixed"===i.style.position&&(r+=window.pageXOffset||t.scrollLeft,o+=window.pageYOffset||t.scrollTop),{left:r,top:o}}function _(){var e=window.scrollY;return void 0===e&&(e=document.documentElement.scrollTop),e}function O(){var e=window.scrollX;return void 0===e&&(e=document.documentElement.scrollLeft),e}function S(e){return e===window?_():e.scrollTop}function T(e){return e===window?O():e.scrollLeft}function R(e){for(var t=["auto","scroll"],n=e.parentNode,r=void 0,o=void 0,i=void 0,a="",s="",l="",u="";n&&n.style&&document.body!==n;){if(r=n.style.overflow,o=n.style.overflowX,i=n.style.overflowY,"scroll"===r||"scroll"===o||"scroll"===i)return n;if(window.getComputedStyle&&(a=window.getComputedStyle(n),s=a.getPropertyValue("overflow"),l=a.getPropertyValue("overflow-y"),u=a.getPropertyValue("overflow-x"),"scroll"===s||"scroll"===u||"scroll"===l))return n;if(n.clientHeight<=n.scrollHeight+1&&(-1!==t.indexOf(i)||-1!==t.indexOf(r)||-1!==t.indexOf(s)||-1!==t.indexOf(l)))return n;if(n.clientWidth<=n.scrollWidth+1&&(-1!==t.indexOf(o)||-1!==t.indexOf(r)||-1!==t.indexOf(s)||-1!==t.indexOf(u)))return n;n=n.parentNode}return window}function M(e){for(var t=e.parentNode;t&&t.style&&document.body!==t;){if("visible"!==t.style.overflow&&""!==t.style.overflow)return t;if(window.getComputedStyle){var n=window.getComputedStyle(t);if("visible"!==n.getPropertyValue("overflow")&&""!==n.getPropertyValue("overflow"))return t}t=t.parentNode}return window}function k(e,t){if(e){if(e!==window){var n,r=e.style[t];return""!==r&&void 0!==r?r:(n=N(e),""!==n[t]&&void 0!==n[t]?n[t]:void 0)}if("width"===t)return window.innerWidth+"px";if("height"===t)return window.innerHeight+"px"}}function N(e){return e.currentStyle||document.defaultView.getComputedStyle(e)}function A(e){return e.offsetWidth}function I(e){return(0,Z.hasCaptionProblem)()&&e.firstChild&&"CAPTION"===e.firstChild.nodeName?e.offsetHeight+e.firstChild.offsetHeight:e.offsetHeight}function D(e){return e.clientHeight||e.innerHeight}function P(e){return e.clientWidth||e.innerWidth}function x(e,t,n){window.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function L(e,t,n){window.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)}function H(e){if(e.selectionStart)return e.selectionStart;if(document.selection){e.focus();var t=document.selection.createRange();if(null==t)return 0;var n=e.createTextRange(),r=n.duplicate();return n.moveToBookmark(t.getBookmark()),r.setEndPoint("EndToStart",n),r.text.length}return 0}function j(e){if(e.selectionEnd)return e.selectionEnd;if(document.selection){var t=document.selection.createRange();if(null==t)return 0;return e.createTextRange().text.indexOf(t.text)+t.text.length}return 0}function F(){var e="";return window.getSelection?e=window.getSelection().toString():document.selection&&"Control"!==document.selection.type&&(e=document.selection.createRange().text),e}function V(e,t,n){if(void 0===n&&(n=t),e.setSelectionRange){e.focus();try{e.setSelectionRange(t,n)}catch(i){var r=e.parentNode,o=r.style.display;r.style.display="block",e.setSelectionRange(t,n),r.style.display=o}}else if(e.createTextRange){var i=e.createTextRange();i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",t),i.select()}}function B(){var e=document.createElement("div");e.style.height="200px",e.style.width="100%";var t=document.createElement("div");t.style.boxSizing="content-box",t.style.height="150px",t.style.left="0px",t.style.overflow="hidden",t.style.position="absolute",t.style.top="0px",t.style.width="200px",t.style.visibility="hidden",t.appendChild(e),(document.body||document.documentElement).appendChild(t);var n=e.offsetWidth;t.style.overflow="scroll";var r=e.offsetWidth;return n==r&&(r=t.clientWidth),(document.body||document.documentElement).removeChild(t),n-r}function W(){return void 0===oe&&(oe=B()),oe}function U(e){return e.offsetWidth!==e.clientWidth}function Y(e){return e.offsetHeight!==e.clientHeight}function $(e,t,n){(0,q.isIE8)()||(0,q.isIE9)()?(e.style.top=n,e.style.left=t):(0,q.isSafari)()?e.style["-webkit-transform"]="translate3d("+t+","+n+",0)":e.style.transform="translate3d("+t+","+n+",0)"}function G(e){var t=void 0;return e.style.transform&&""!==(t=e.style.transform)?["transform",t]:e.style["-webkit-transform"]&&""!==(t=e.style["-webkit-transform"])?["-webkit-transform",t]:-1}function z(e){e.style.transform&&""!==e.style.transform?e.style.transform="":e.style["-webkit-transform"]&&""!==e.style["-webkit-transform"]&&(e.style["-webkit-transform"]="")}function X(e){var t=["INPUT","SELECT","TEXTAREA"];return e&&(t.indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function K(e){return X(e)&&-1==e.className.indexOf("handsontableInput")&&-1==e.className.indexOf("copyPaste")}t.__esModule=!0,t.HTML_CHARACTERS=void 0,t.getParent=o,t.closest=i,t.closestDown=a,t.isChildOf=s,t.isChildOfWebComponentTable=l,t.polymerWrap=u,t.polymerUnwrap=c,t.index=f,t.overlayContainsElement=h,t.hasClass=p,t.addClass=g,t.removeClass=v,t.removeTextNodes=m,t.empty=y,t.fastInnerHTML=w,t.fastInnerText=b,t.isVisible=C,t.offset=E,t.getWindowScrollTop=_,t.getWindowScrollLeft=O,t.getScrollTop=S,t.getScrollLeft=T,t.getScrollableElement=R,t.getTrimmingContainer=M,t.getStyle=k,t.getComputedStyle=N,t.outerWidth=A,t.outerHeight=I,t.innerHeight=D,t.innerWidth=P,t.addEvent=x,t.removeEvent=L,t.getCaretPosition=H,t.getSelectionEndPosition=j,t.getSelectionText=F,t.setCaretPosition=V,t.getScrollbarWidth=W,t.hasVerticalScrollbar=U,t.hasHorizontalScrollbar=Y,t.setOverlayPosition=$,t.getCssTransform=G,t.resetCssTransform=z,t.isInput=X,t.isOutsideInput=K;var q=n(50),Z=n(41),Q=!!document.documentElement.classList,J=void 0,ee=void 0,te=void 0;if(Q){var ne=function(){var e=document.createElement("div");return e.classList.add("test","test2"),e.classList.contains("test2")}();J=function(e,t){return void 0!==e.classList&&"string"==typeof t&&""!==t&&e.classList.contains(t)},ee=function(e,t){var n=t;if("string"==typeof n&&(n=n.split(" ")),n=d(n),n.length>0)if(ne){var o;(o=e.classList).add.apply(o,r(n))}else for(var i=0;n&&n[i];)e.classList.add(n[i]),i+=1},te=function(e,t){var n=t;if("string"==typeof n&&(n=n.split(" ")),n=d(n),n.length>0)if(ne){var o;(o=e.classList).remove.apply(o,r(n))}else for(var i=0;n&&n[i];)e.classList.remove(n[i]),i+=1}}else{var re=function(e){return new RegExp("(\\s|^)"+e+"(\\s|$)")};J=function(e,t){return void 0!==e.className&&re(t).test(e.className)},ee=function(e,t){var n=0,r=e.className,o=t;if("string"==typeof o&&(o=o.split(" ")),""===r)r=o.join(" ");else for(;o&&o[n];)re(o[n]).test(r)||(r+=" "+o[n]),n+=1;e.className=r},te=function(e,t){var n=0,r=e.className,o=t;for("string"==typeof o&&(o=o.split(" "));o&&o[n];)r=r.replace(re(o[n])," ").trim(),n+=1;e.className!==r&&(e.className=r)}}var oe,ie=t.HTML_CHARACTERS=/(<(.*)>|&(.*);)/,ae=!!document.createTextNode("test").textContent},function(e,t,n){"use strict";t.__esModule=!0;var r=t.CONTEXT_MENU_ITEMS_NAMESPACE="ContextMenu:items",o=(t.CONTEXTMENU_ITEMS_ROW_ABOVE=r+".insertRowAbove",t.CONTEXTMENU_ITEMS_ROW_BELOW=r+".insertRowBelow",t.CONTEXTMENU_ITEMS_INSERT_LEFT=r+".insertColumnOnTheLeft",t.CONTEXTMENU_ITEMS_INSERT_RIGHT=r+".insertColumnOnTheRight",t.CONTEXTMENU_ITEMS_REMOVE_ROW=r+".removeRow",t.CONTEXTMENU_ITEMS_REMOVE_COLUMN=r+".removeColumn",t.CONTEXTMENU_ITEMS_UNDO=r+".undo",t.CONTEXTMENU_ITEMS_REDO=r+".redo",t.CONTEXTMENU_ITEMS_READ_ONLY=r+".readOnly",t.CONTEXTMENU_ITEMS_CLEAR_COLUMN=r+".clearColumn",t.CONTEXTMENU_ITEMS_COPY=r+".copy",t.CONTEXTMENU_ITEMS_CUT=r+".cut",t.CONTEXTMENU_ITEMS_FREEZE_COLUMN=r+".freezeColumn",t.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN=r+".unfreezeColumn",t.CONTEXTMENU_ITEMS_MERGE_CELLS=r+".mergeCells",t.CONTEXTMENU_ITEMS_UNMERGE_CELLS=r+".unmergeCells",t.CONTEXTMENU_ITEMS_ADD_COMMENT=r+".addComment",t.CONTEXTMENU_ITEMS_EDIT_COMMENT=r+".editComment",t.CONTEXTMENU_ITEMS_REMOVE_COMMENT=r+".removeComment",t.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT=r+".readOnlyComment",t.CONTEXTMENU_ITEMS_ALIGNMENT=r+".align",t.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT=r+".align.left",t.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER=r+".align.center",t.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT=r+".align.right",t.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY=r+".align.justify",t.CONTEXTMENU_ITEMS_ALIGNMENT_TOP=r+".align.top",t.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE=r+".align.middle",t.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM=r+".align.bottom",t.CONTEXTMENU_ITEMS_BORDERS=r+".borders",t.CONTEXTMENU_ITEMS_BORDERS_TOP=r+".borders.top",t.CONTEXTMENU_ITEMS_BORDERS_RIGHT=r+".borders.right",t.CONTEXTMENU_ITEMS_BORDERS_BOTTOM=r+".borders.bottom",t.CONTEXTMENU_ITEMS_BORDERS_LEFT=r+".borders.left",t.CONTEXTMENU_ITEMS_REMOVE_BORDERS=r+".borders.remove",t.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD=r+".nestedHeaders.insertChildRow",t.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD=r+".nestedHeaders.detachFromParent",t.CONTEXTMENU_ITEMS_HIDE_COLUMN=r+".hideColumn",t.CONTEXTMENU_ITEMS_SHOW_COLUMN=r+".showColumn",t.CONTEXTMENU_ITEMS_HIDE_ROW=r+".hideRow",t.CONTEXTMENU_ITEMS_SHOW_ROW=r+".showRow",t.FILTERS_NAMESPACE="Filters:"),i=t.FILTERS_CONDITIONS_NAMESPACE=o+"conditions";t.FILTERS_CONDITIONS_NONE=i+".none",t.FILTERS_CONDITIONS_EMPTY=i+".isEmpty",t.FILTERS_CONDITIONS_NOT_EMPTY=i+".isNotEmpty",t.FILTERS_CONDITIONS_EQUAL=i+".isEqualTo",t.FILTERS_CONDITIONS_NOT_EQUAL=i+".isNotEqualTo",t.FILTERS_CONDITIONS_BEGINS_WITH=i+".beginsWith",t.FILTERS_CONDITIONS_ENDS_WITH=i+".endsWith",t.FILTERS_CONDITIONS_CONTAINS=i+".contains",t.FILTERS_CONDITIONS_NOT_CONTAIN=i+".doesNotContain",t.FILTERS_CONDITIONS_BY_VALUE=i+".byValue",t.FILTERS_CONDITIONS_GREATER_THAN=i+".greaterThan",t.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL=i+".greaterThanOrEqualTo",t.FILTERS_CONDITIONS_LESS_THAN=i+".lessThan",t.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL=i+".lessThanOrEqualTo",t.FILTERS_CONDITIONS_BETWEEN=i+".isBetween",t.FILTERS_CONDITIONS_NOT_BETWEEN=i+".isNotBetween",t.FILTERS_CONDITIONS_AFTER=i+".after",t.FILTERS_CONDITIONS_BEFORE=i+".before",t.FILTERS_CONDITIONS_TODAY=i+".today",t.FILTERS_CONDITIONS_TOMORROW=i+".tomorrow",t.FILTERS_CONDITIONS_YESTERDAY=i+".yesterday",t.FILTERS_DIVS_FILTER_BY_CONDITION=o+"labels.filterByCondition",t.FILTERS_DIVS_FILTER_BY_VALUE=o+"labels.filterByValue",t.FILTERS_LABELS_CONJUNCTION=o+"labels.conjunction",t.FILTERS_LABELS_DISJUNCTION=o+"labels.disjunction",t.FILTERS_VALUES_BLANK_CELLS=o+"values.blankCells",t.FILTERS_BUTTONS_SELECT_ALL=o+"buttons.selectAll",t.FILTERS_BUTTONS_CLEAR=o+"buttons.clear",t.FILTERS_BUTTONS_OK=o+"buttons.ok",t.FILTERS_BUTTONS_CANCEL=o+"buttons.cancel",t.FILTERS_BUTTONS_PLACEHOLDER_SEARCH=o+"buttons.placeholder.search",t.FILTERS_BUTTONS_PLACEHOLDER_VALUE=o+"buttons.placeholder.value",t.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE=o+"buttons.placeholder.secondValue"},function(e,t,n){"use strict";function r(e){var t=void 0===e?"undefined":s(e);return"number"==t?!isNaN(e)&&isFinite(e):"string"==t?!!e.length&&(1==e.length?/\d/.test(e):/^\s*[+-]?\s*(?:(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?)|(?:0x[a-f\d]+))\s*$/i.test(e)):"object"==t&&!(!e||"number"!=typeof e.valueOf()||e instanceof Date)}function o(e,t,n){var r=-1;for("function"==typeof t?(n=t,t=e):r=e-1;++r<=t&&!1!==n(r););}function i(e,t,n){var r=e+1;for("function"==typeof t&&(n=t,t=0);--r>=t&&!1!==n(r););}function a(e,t){return t=parseInt(t.toString().replace("%",""),10),t=parseInt(e*t/100,10)}t.__esModule=!0;var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.isNumeric=r,t.rangeEach=o,t.rangeEachReverse=i,t.valueAccordingPercent=a},function(e,t,n){"use strict";function r(e,t){var n=(0,c.toUpperCaseFirst)(e);l.default.getSingleton().add("construct",function(){f.has(this)||f.set(this,{});var e=f.get(this);e[n]||(e[n]=new t(this))}),l.default.getSingleton().add("afterDestroy",function(){if(f.has(this)){var e=f.get(this);(0,u.objectEach)(e,function(e){return e.destroy()}),f.delete(this)}})}function o(e,t){if("string"!=typeof t)throw Error('Only strings can be passed as "plugin" parameter');var n=(0,c.toUpperCaseFirst)(t);if(f.has(e)&&f.get(e)[n])return f.get(e)[n]}function i(e){return f.has(e)?Object.keys(f.get(e)):[]}function a(e,t){var n=null;return f.has(e)&&(0,u.objectEach)(f.get(e),function(e,r){e===t&&(n=r)}),n}t.__esModule=!0,t.getPluginName=t.getRegistredPluginNames=t.getPlugin=t.registerPlugin=void 0;var s=n(17),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=n(1),c=n(32),f=new WeakMap;t.registerPlugin=r,t.getPlugin=o,t.getRegistredPluginNames=i,t.getPluginName=a},function(e,t,n){var r=n(16),o=n(48),i=n(37),a=n(36),s=n(38),l=function(e,t,n){var u,c,f,h,d=e&l.F,p=e&l.G,g=e&l.S,v=e&l.P,m=e&l.B,y=p?r:g?r[t]||(r[t]={}):(r[t]||{}).prototype,w=p?o:o[t]||(o[t]={}),b=w.prototype||(w.prototype={});p&&(n=t);for(u in n)c=!d&&y&&void 0!==y[u],f=(c?y:n)[u],h=m&&c?s(f,r):v&&"function"==typeof f?s(Function.call,f):f,y&&a(y,u,f,e&l.U),w[u]!=f&&i(w,u,h),v&&b[u]!=f&&(b[u]=f)};r.core=o,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n=0&&c.splice(c.indexOf(this.pluginName),1),c.length||this.hot.runHooks("afterPluginsInitialized"),this.initialized=!0}},{key:"enablePlugin",value:function(){this.enabled=!0}},{key:"disablePlugin",value:function(){this.eventManager&&this.eventManager.clear(),this.clearHooks(),this.enabled=!1}},{key:"addHook",value:function(e,t){u.get(this).hooks[e]=u.get(this).hooks[e]||[];var n=u.get(this).hooks[e];this.hot.addHook(e,t),n.push(t),u.get(this).hooks[e]=n}},{key:"removeHooks",value:function(e){var t=this;(0,a.arrayEach)(u.get(this).hooks[e]||[],function(n){t.hot.removeHook(e,n)})}},{key:"clearHooks",value:function(){var e=this,t=u.get(this).hooks;(0,i.objectEach)(t,function(t,n){return e.removeHooks(n)}),t.length=0}},{key:"callOnPluginsReady",value:function(e){this.isPluginsReady?e():this.pluginsInitializedCallbacks.push(e)}},{key:"onAfterPluginsInitialized",value:function(){(0,a.arrayEach)(this.pluginsInitializedCallbacks,function(e){return e()}),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}},{key:"onUpdateSettings",value:function(){this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&this.updatePlugin())}},{key:"updatePlugin",value:function(){}},{key:"destroy",value:function(){var e=this;this.eventManager&&this.eventManager.destroy(),this.clearHooks(),(0,i.objectEach)(this,function(t,n){"hot"!==n&&"t"!==n&&(e[n]=null)}),delete this.t,delete this.hot}}]),e}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.Viewport=t.TableRenderer=t.Table=t.Settings=t.Selection=t.Scroll=t.Overlays=t.Event=t.Core=t.default=t.Border=t.TopLeftCornerOverlay=t.TopOverlay=t.LeftOverlay=t.DebugOverlay=t.RowFilter=t.ColumnFilter=t.CellRange=t.CellCoords=t.ViewportRowsCalculator=t.ViewportColumnsCalculator=void 0,n(88),n(97),n(98),n(99),n(100),n(103),n(105),n(106),n(107),n(108),n(109),n(110),n(111),n(112),n(113),n(114),n(115),n(116),n(117),n(118),n(119),n(120),n(121),n(122),n(123),n(126),n(127),n(128),n(129),n(130),n(131),n(132),n(133),n(135),n(136),n(137),n(138),n(139),n(82),n(140),n(141),n(142),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154);var o=n(192),i=r(o),a=n(193),s=r(a),l=n(64),u=r(l),c=n(194),f=r(c),h=n(195),d=r(h),p=n(196),g=r(p),v=n(503),m=r(v),y=n(505),w=r(y),b=n(506),C=r(b),E=n(507),_=r(E),O=n(325),S=r(O),T=n(197),R=r(T),M=n(318),k=r(M),N=n(319),A=r(N),I=n(320),D=r(I),P=n(508),x=r(P),L=n(321),H=r(L),j=n(322),F=r(j),V=n(323),B=r(V),W=n(324),U=r(W);t.ViewportColumnsCalculator=i.default,t.ViewportRowsCalculator=s.default,t.CellCoords=u.default,t.CellRange=f.default,t.ColumnFilter=d.default,t.RowFilter=g.default,t.DebugOverlay=m.default,t.LeftOverlay=w.default,t.TopOverlay=C.default,t.TopLeftCornerOverlay=_.default,t.Border=S.default,t.default=R.default,t.Core=R.default,t.Event=k.default,t.Overlays=A.default,t.Scroll=D.default,t.Selection=x.default,t.Settings=H.default,t.Table=F.default,t.TableRenderer=B.default,t.Viewport=U.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){var n=void 0,r=void 0,o=void 0,i=void 0,a=void 0;t.isTargetWebComponent=!1,t.realTarget=t.target;var f=t.stopImmediatePropagation;if(t.stopImmediatePropagation=function(){f.apply(this),(0,c.stopImmediatePropagation)(this)},!h.isHotTableEnv)return t;for(t=(0,s.polymerWrap)(t),a=t.path?t.path.length:0;a;){if(a-=1,"HOT-TABLE"===t.path[a].nodeName)n=!0;else if(n&&t.path[a].shadowRoot){i=t.path[a];break}0!==a||i||(i=t.path[a])}return i||(i=t.target),t.isTargetWebComponent=!0,(0,u.isWebComponentSupportedNatively)()?t.realTarget=t.srcElement||t.toElement:((0,l.hasOwnProperty)(e,"hot")||e.isHotTableEnv||e.wtTable)&&((0,l.hasOwnProperty)(e,"hot")?r=e.hot?e.hot.view.wt.wtTable.TABLE:null:e.isHotTableEnv?r=e.view.activeWt.wtTable.TABLE.parentNode.parentNode:e.wtTable&&(r=e.wtTable.TABLE.parentNode.parentNode),o=(0,s.closest)(t.target,["HOT-TABLE"],r),t.realTarget=o?r.querySelector("HOT-TABLE")||t.target:t.target),Object.defineProperty(t,"target",{get:function(){return(0,s.polymerWrap)(i)},enumerable:!0,configurable:!0}),t}function i(){return f}t.__esModule=!0;var a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null;r(this,e),this.context=t||this,this.context.eventListeners||(this.context.eventListeners=[])}return a(e,[{key:"addEventListener",value:function(e,t,n){function r(e){n.call(this,o(a,e))}var i=this,a=this.context;return this.context.eventListeners.push({element:e,event:t,callback:n,callbackProxy:r}),window.addEventListener?e.addEventListener(t,r,!1):e.attachEvent("on"+t,r),f+=1,function(){i.removeEventListener(e,t,n)}}},{key:"removeEventListener",value:function(e,t,n){for(var r=this.context.eventListeners.length,o=void 0;r;)if(r-=1,o=this.context.eventListeners[r],o.event===t&&o.element===e){if(n&&n!==o.callback)continue;this.context.eventListeners.splice(r,1),o.element.removeEventListener?o.element.removeEventListener(o.event,o.callbackProxy,!1):o.element.detachEvent("on"+o.event,o.callbackProxy),f-=1}}},{key:"clearEvents",value:function(){if(this.context)for(var e=this.context.eventListeners.length;e;){e-=1;var t=this.context.eventListeners[e];t&&this.removeEventListener(t.element,t.event,t.callback)}}},{key:"clear",value:function(){this.clearEvents()}},{key:"destroy",value:function(){this.clearEvents(),this.context=null}},{key:"fireEvent",value:function(e,t){var n={bubbles:!0,cancelable:"mousemove"!==t,view:window,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0},r=void 0;document.createEvent?(r=document.createEvent("MouseEvents"),r.initMouseEvent(t,n.bubbles,n.cancelable,n.view,n.detail,n.screenX,n.screenY,n.clientX,n.clientY,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey,n.button,n.relatedTarget||document.body.parentNode)):r=document.createEventObject(),e.dispatchEvent?e.dispatchEvent(r):e.fireEvent("on"+t,r)}}]),e}();t.default=h},function(e,t,n){"use strict";function r(e,t){if(!a[e])throw Error('Filter condition "'+e+'" does not exist.');var n=a[e],r=n.condition,o=n.descriptor,i=t;return o.inputValuesDecorator&&(i=o.inputValuesDecorator(i)),function(e){return r.apply(e.meta.instance,[].concat([e],[i]))}}function o(e){if(!a[e])throw Error('Filter condition "'+e+'" does not exist.');return a[e].descriptor}function i(e,t,n){n.key=e,a[e]={condition:t,descriptor:n}}t.__esModule=!0,t.getCondition=r,t.getConditionDescriptor=o,t.registerCondition=i;var a=t.conditions={}},function(e,t,n){"use strict";function r(e){var t=void 0;switch(void 0===e?"undefined":c(e)){case"string":case"number":t=""+e;break;case"object":t=null===e?"":e.toString();break;case"undefined":t="";break;default:t=e.toString()}return t}function o(e){return void 0!==e}function i(e){return void 0===e}function a(e){return null===e||""===e||i(e)}function s(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function l(e,t){e=b(e||"");var n="",r=!0,o=u(e),i=E(),s=a(e)||"trial"===e;if(s||o)if(o){var l=Math.floor((0,d.default)("12/09/2018","DD/MM/YYYY").toDate().getTime()/864e5),c=C(e);(c>45e3||c!==parseInt(c,10))&&(n="The license key provided to Handsontable Pro is invalid. Make sure you pass it correctly."),n||(l>c+1&&(n=(0,p.toSingleLine)(f)),r=l>c+15)}else n="Evaluation version of Handsontable Pro. Not licensed for use in a production environment.";else n="The license key provided to Handsontable Pro is invalid. Make sure you pass it correctly.";if(i&&(n=!1,r=!1),n&&!_&&(console[s?"info":"warn"](n),_=!0),r&&t.parentNode){var h=document.createElement("div");h.id="hot-display-license-info",h.appendChild(document.createTextNode("Evaluation version of Handsontable Pro.")),h.appendChild(document.createElement("br")),h.appendChild(document.createTextNode("Not licensed for production use.")),t.parentNode.insertBefore(h,t.nextSibling)}}function u(e){var t=[][g],n=t;if(e[g]!==w("Z"))return!1;for(var r="",o="B>1:r=y(e,i,i?1===o[g]?9:8:6);return n===t}t.__esModule=!0;var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n Your license key of Handsontable Pro has expired.‌‌‌‌ \n Renew your maintenance plan at https://handsontable.com or downgrade to the previous version of the software.\n "],["\n Your license key of Handsontable Pro has expired.‌‌‌‌ \n Renew your maintenance plan at https://handsontable.com or downgrade to the previous version of the software.\n "]);t.stringify=r,t.isDefined=o,t.isUndefined=i,t.isEmpty=a,t.isRegExp=s,t._injectProductInfo=l;var h=n(24),d=function(e){return e&&e.__esModule?e:{default:e}}(h),p=n(25),g="length",v=function(e){return parseInt(e,16)},m=function(e){return parseInt(e,10)},y=function(e,t,n){return e.substr(t,n)},w=function(e){return e.codePointAt(0)-65},b=function(e){return(""+e).replace(/\-/g,"")},C=function(e){return v(y(b(e),v("12"),w("F")))/(v(y(b(e),w("B"),~~![][g]))||9)},E=function(){return"undefined"!=typeof location&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host)},_=!1},function(e,t,n){"use strict";function r(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}function o(e){return!1===e.isImmediatePropagationEnabled}function i(e){"function"==typeof e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function a(e){return e.pageX?e.pageX:e.clientX+(0,c.getWindowScrollLeft)()}function s(e){return e.pageY?e.pageY:e.clientY+(0,c.getWindowScrollTop)()}function l(e){return 2===e.button}function u(e){return 0===e.button}t.__esModule=!0,t.stopImmediatePropagation=r,t.isImmediatePropagationStopped=o,t.stopPropagation=i,t.pageX=a,t.pageY=s,t.isRightClick=l,t.isLeftClick=u;var c=n(2)},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(94)("wks"),o=n(58),i=n(16).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if("function"==typeof e)return e;if(!O(e))throw Error('No registered renderer found under "'+e+'" name');return _(e)}t.__esModule=!0,t.getRegisteredRenderers=t.getRegisteredRendererNames=t.hasRenderer=t.getRenderer=t.registerRenderer=void 0;var i=n(49),a=r(i),s=n(520),l=r(s),u=n(521),c=r(u),f=n(522),h=r(f),d=n(523),p=r(d),g=n(524),v=r(g),m=n(525),y=r(m),w=n(526),b=r(w),C=(0,a.default)("renderers"),E=C.register,_=C.getItem,O=C.hasItem,S=C.getNames,T=C.getValues;E("base",l.default),E("autocomplete",c.default),E("checkbox",h.default),E("html",p.default),E("numeric",v.default),E("password",y.default),E("text",b.default),t.registerRenderer=E,t.getRenderer=o,t.hasRenderer=O,t.getRegisteredRendererNames=S,t.getRegisteredRenderers=T},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(){return c}t.__esModule=!0;var i=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=this.createEmptyBucket()),e.pluginHookBucket):this.globalBucket}},{key:"add",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(Array.isArray(t))(0,a.arrayEach)(t,function(t){return n.add(e,t,r)});else{var o=this.getBucket(r);if(void 0===o[e]&&(this.register(e),o[e]=[]),t.skip=!1,-1===o[e].indexOf(t)){var i=!1;t.initialHook&&(0,a.arrayEach)(o[e],function(n,r){if(n.initialHook)return o[e][r]=t,i=!0,!1}),i||o[e].push(t)}}return this}},{key:"once",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Array.isArray(t)?(0,a.arrayEach)(t,function(t){return n.once(e,t,r)}):(t.runOnce=!0,this.add(e,t,r))}},{key:"remove",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.getBucket(n);return void 0!==r[e]&&r[e].indexOf(t)>=0&&(t.skip=!0,!0)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getBucket(t);return!(void 0===n[e]||!n[e].length)}},{key:"run",value:function(e,t,n,r,o,i,a,s){var l=this.globalBucket[t],u=l?l.length:0,c=0;if(u)for(;c0&&void 0!==arguments[0]?arguments[0]:null),function(e,t,n){return n[t].length=0})}},{key:"register",value:function(e){this.isRegistered(e)||l.push(e)}},{key:"deregister",value:function(e){this.isRegistered(e)&&l.splice(l.indexOf(e),1)}},{key:"isRegistered",value:function(e){return l.indexOf(e)>=0}},{key:"getRegistered",value:function(){return l}}]),e}(),c=new u;t.default=u},function(e,t,n){"use strict";function r(e){return 32===e||e>=48&&e<=57||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||e>=226||e>=65&&e<=90}function o(e){return-1!==[u.ARROW_DOWN,u.ARROW_UP,u.ARROW_LEFT,u.ARROW_RIGHT,u.HOME,u.END,u.DELETE,u.BACKSPACE,u.F1,u.F2,u.F3,u.F4,u.F5,u.F6,u.F7,u.F8,u.F9,u.F10,u.F11,u.F12,u.TAB,u.PAGE_DOWN,u.PAGE_UP,u.ENTER,u.ESCAPE,u.SHIFT,u.CAPS_LOCK,u.ALT].indexOf(e)}function i(e){var t=[];return window.navigator.platform.includes("Mac")?t.push(u.COMMAND_LEFT,u.COMMAND_RIGHT,u.COMMAND_FIREFOX):t.push(u.CONTROL),t.includes(e)}function a(e){return[u.CONTROL,u.COMMAND_LEFT,u.COMMAND_RIGHT,u.COMMAND_FIREFOX].includes(e)}function s(e,t){var n=t.split("|"),r=!1;return(0,l.arrayEach)(n,function(t){if(e===u[t])return r=!0,!1}),r}t.__esModule=!0,t.KEY_CODES=void 0,t.isPrintableChar=r,t.isMetaKey=o,t.isCtrlKey=i,t.isCtrlMetaKey=a,t.isKey=s;var l=n(0),u=t.KEY_CODES={MOUSE_LEFT:1,MOUSE_RIGHT:3,MOUSE_MIDDLE:2,BACKSPACE:8,COMMA:188,INSERT:45,DELETE:46,END:35,ENTER:13,ESCAPE:27,CONTROL:17,COMMAND_LEFT:91,COMMAND_RIGHT:93,COMMAND_FIREFOX:224,ALT:18,HOME:36,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,SPACE:32,SHIFT:16,CAPS_LOCK:20,TAB:9,ARROW_RIGHT:39,ARROW_LEFT:37,ARROW_UP:38,ARROW_DOWN:40,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,A:65,X:88,C:67,V:86}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t={},n=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in t||(t[e.guid]=new n(e)),t[e.guid]},f.default.getSingleton().add("afterDestroy",function(){t[this.guid]=null})}function i(e,t){var n=void 0;if("function"==typeof e)I.get(e)||s(null,e),n=I.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');n=x(e)}if(!n)throw Error('No editor registered under name "'+e+'"');return n.getInstance(t)}function a(e){if(!L(e))throw Error('No registered editor found under "'+e+'" name');return x(e).getConstructor()}function s(e,t){var n=new o(t);"string"==typeof e&&P(e,n),I.set(t,n)}t.__esModule=!0,t.getRegisteredEditors=t.getRegisteredEditorNames=t.hasEditor=t.getEditorInstance=t.getEditor=t.registerEditor=void 0,t.RegisteredEditor=o,t._getEditorInstance=i;var l=n(49),u=r(l),c=n(17),f=r(c),h=n(63),d=r(h),p=n(326),g=r(p),v=n(510),m=r(v),y=n(511),w=r(y),b=n(516),C=r(b),E=n(327),_=r(E),O=n(517),S=r(O),T=n(518),R=r(T),M=n(519),k=r(M),N=n(65),A=r(N),I=new WeakMap,D=(0,u.default)("editors"),P=D.register,x=D.getItem,L=D.hasItem,H=D.getNames,j=D.getValues;s("base",d.default),s("autocomplete",g.default),s("checkbox",m.default),s("date",w.default),s("dropdown",C.default),s("handsontable",_.default),s("numeric",S.default),s("password",R.default),s("select",k.default),s("text",A.default),t.registerEditor=s,t.getEditor=a,t.getEditorInstance=i,t.hasEditor=L,t.getRegisteredEditorNames=H,t.getRegisteredEditors=j},function(e,t,n){"use strict";t.__esModule=!0;var r=n(0),o=n(1),i={_localHooks:Object.create(null),addLocalHook:function(e,t){return this._localHooks[e]||(this._localHooks[e]=[]),this._localHooks[e].push(t),this},runLocalHooks:function(e){for(var t=this,n=arguments.length,o=Array(n>1?n-1:0),i=1;i'+String.fromCharCode(10003)+""+e}function v(e,t){return!e.hidden||!("function"==typeof e.hidden&&e.hidden.call(t))}function m(e,t){for(var n=e.slice(0);00?t[t.length-1].name!==e.name&&t.push(e):t.push(e)}),t}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.KEY,n=e.slice(0);return n=m(n,t),n=y(n,t),n=w(n)}t.__esModule=!0,t.normalizeSelection=r,t.isSeparator=o,t.hasSubMenu=i,t.isDisabled=a,t.isSelectionDisabled=s,t.getValidSelection=l,t.prepareVerticalAlignClass=u,t.prepareHorizontalAlignClass=c,t.getAlignmentClasses=f,t.align=h,t.checkSelectionConsistency=p,t.markLabelAsSelected=g,t.isItemHidden=v,t.filterSeparators=b;var C=n(0),E=n(2),_=n(159)},function(e,t,n){var r=n(21),o=n(168),i=n(90),a=Object.defineProperty;t.f=n(27)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){(function(e){!function(t,n){e.exports=n()}(0,function(){"use strict";function t(){return Mr.apply(null,arguments)}function r(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function i(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}function a(e){return void 0===e}function s(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function l(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function u(e,t){var n,r=[];for(n=0;n0)for(n=0;n0?"future":"past"];return T(n)?n(t):n.replace(/%s/i,t)}function L(e,t){var n=e.toLowerCase();jr[n]=jr[n+"s"]=jr[t]=e}function H(e){return"string"==typeof e?jr[e]||jr[e.toLowerCase()]:void 0}function j(e){var t,n,r={};for(n in e)c(e,n)&&(t=H(n))&&(r[t]=e[n]);return r}function F(e,t){Fr[e]=t}function V(e){var t=[];for(var n in e)t.push({unit:n,priority:Fr[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}function B(e,t,n){var r=""+Math.abs(e),o=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}function W(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(Ur[e]=o),t&&(Ur[t[0]]=function(){return B(o.apply(this,arguments),t[1],t[2])}),n&&(Ur[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function U(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Y(e){var t,n,r=e.match(Vr);for(t=0,n=r.length;t=0&&Br.test(e);)e=e.replace(Br,n),Br.lastIndex=0,r-=1;return e}function z(e,t,n){so[e]=T(t)?t:function(e,r){return e&&n?n:t}}function X(e,t){return c(so,e)?so[e](t._strict,t._locale):new RegExp(K(e))}function K(e){return q(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,o){return t||n||r||o}))}function q(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Z(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),s(t)&&(r=function(e,n){n[t]=C(e)}),n=0;n=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}function Ce(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ee(e,t,n){var r=7+t-n;return-(7+Ce(e,0,r).getUTCDay()-t)%7+r-1}function _e(e,t,n,r,o){var i,a,s=(7+n-r)%7,l=Ee(e,r,o),u=1+7*(t-1)+s+l;return u<=0?(i=e-1,a=ee(i)+u):u>ee(e)?(i=e+1,a=u-ee(e)):(i=e,a=u),{year:i,dayOfYear:a}}function Oe(e,t,n){var r,o,i=Ee(e.year(),t,n),a=Math.floor((e.dayOfYear()-i-1)/7)+1;return a<1?(o=e.year()-1,r=a+Se(o,t,n)):a>Se(e.year(),t,n)?(r=a-Se(e.year(),t,n),o=e.year()+1):(o=e.year(),r=a),{week:r,year:o}}function Se(e,t,n){var r=Ee(e,t,n),o=Ee(e+1,t,n);return(ee(e)-r+o)/7}function Te(e){return Oe(e,this._week.dow,this._week.doy).week}function Re(){return this._week.dow}function Me(){return this._week.doy}function ke(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Ne(e){var t=Oe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Ae(e,t){return"string"!=typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10)}function Ie(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function De(e,t){return e?r(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:r(this._weekdays)?this._weekdays:this._weekdays.standalone}function Pe(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort}function xe(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Le(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?(o=wo.call(this._weekdaysParse,a),-1!==o?o:null):"ddd"===t?(o=wo.call(this._shortWeekdaysParse,a),-1!==o?o:null):(o=wo.call(this._minWeekdaysParse,a),-1!==o?o:null):"dddd"===t?-1!==(o=wo.call(this._weekdaysParse,a))?o:-1!==(o=wo.call(this._shortWeekdaysParse,a))?o:(o=wo.call(this._minWeekdaysParse,a),-1!==o?o:null):"ddd"===t?-1!==(o=wo.call(this._shortWeekdaysParse,a))?o:-1!==(o=wo.call(this._weekdaysParse,a))?o:(o=wo.call(this._minWeekdaysParse,a),-1!==o?o:null):-1!==(o=wo.call(this._minWeekdaysParse,a))?o:-1!==(o=wo.call(this._weekdaysParse,a))?o:(o=wo.call(this._shortWeekdaysParse,a),-1!==o?o:null)}function He(e,t,n){var r,o,i;if(this._weekdaysParseExact)return Le.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function je(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Ae(e,this.localeData()),this.add(e-t,"d")):t}function Fe(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Ve(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Ie(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Be(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ye.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=No),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function We(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ye.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ao),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Ue(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ye.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Io),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ye(){function e(e,t){return t.length-e.length}var t,n,r,o,i,a=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),r=this.weekdaysMin(n,""),o=this.weekdaysShort(n,""),i=this.weekdays(n,""),a.push(r),s.push(o),l.push(i),u.push(r),u.push(o),u.push(i);for(a.sort(e),s.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)s[t]=q(s[t]),l[t]=q(l[t]),u[t]=q(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function $e(){return this.hours()%12||12}function Ge(){return this.hours()||24}function ze(e,t){W(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Xe(e,t){return t._meridiemParse}function Ke(e){return"p"===(e+"").toLowerCase().charAt(0)}function qe(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}function Ze(e){return e?e.toLowerCase().replace("_","-"):e}function Qe(e){for(var t,n,r,o,i=0;i0;){if(r=Je(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&E(o,n,!0)>=t-1)break;t--}i++}return null}function Je(t){var r=null;if(!Ho[t]&&void 0!==e&&e&&e.exports)try{r=Do._abbr;n(504)("./"+t),et(r)}catch(e){}return Ho[t]}function et(e,t){var n;return e&&(n=a(t)?rt(e):tt(e,t))&&(Do=n),Do._abbr}function tt(e,t){if(null!==t){var n=Lo;if(t.abbr=e,null!=Ho[e])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Ho[e]._config;else if(null!=t.parentLocale){if(null==Ho[t.parentLocale])return jo[t.parentLocale]||(jo[t.parentLocale]=[]),jo[t.parentLocale].push({name:e,config:t}),null;n=Ho[t.parentLocale]._config}return Ho[e]=new k(M(n,t)),jo[e]&&jo[e].forEach(function(e){tt(e.name,e.config)}),et(e),Ho[e]}return delete Ho[e],null}function nt(e,t){if(null!=t){var n,r,o=Lo;r=Je(e),null!=r&&(o=r._config),t=M(o,t),n=new k(t),n.parentLocale=Ho[e],Ho[e]=n,et(e)}else null!=Ho[e]&&(null!=Ho[e].parentLocale?Ho[e]=Ho[e].parentLocale:null!=Ho[e]&&delete Ho[e]);return Ho[e]}function rt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Do;if(!r(e)){if(t=Je(e))return t;e=[e]}return Qe(e)}function ot(){return Dr(Ho)}function it(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[co]<0||n[co]>11?co:n[fo]<1||n[fo]>ue(n[uo],n[co])?fo:n[ho]<0||n[ho]>24||24===n[ho]&&(0!==n[po]||0!==n[go]||0!==n[vo])?ho:n[po]<0||n[po]>59?po:n[go]<0||n[go]>59?go:n[vo]<0||n[vo]>999?vo:-1,p(e)._overflowDayOfYear&&(tfo)&&(t=fo),p(e)._overflowWeeks&&-1===t&&(t=mo),p(e)._overflowWeekday&&-1===t&&(t=yo),p(e).overflow=t),e}function at(e,t,n){return null!=e?e:null!=t?t:n}function st(e){var n=new Date(t.now());return e._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function lt(e){var t,n,r,o,i,a=[];if(!e._d){for(r=st(e),e._w&&null==e._a[fo]&&null==e._a[co]&&ut(e),null!=e._dayOfYear&&(i=at(e._a[uo],r[uo]),(e._dayOfYear>ee(i)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),n=Ce(i,0,e._dayOfYear),e._a[co]=n.getUTCMonth(),e._a[fo]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ho]&&0===e._a[po]&&0===e._a[go]&&0===e._a[vo]&&(e._nextDay=!0,e._a[ho]=0),e._d=(e._useUTC?Ce:be).apply(null,a),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ho]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(p(e).weekdayMismatch=!0)}}function ut(e){var t,n,r,o,i,a,s,l;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)i=1,a=4,n=at(t.GG,e._a[uo],Oe(Tt(),1,4).year),r=at(t.W,1),((o=at(t.E,1))<1||o>7)&&(l=!0);else{i=e._locale._week.dow,a=e._locale._week.doy;var u=Oe(Tt(),i,a);n=at(t.gg,e._a[uo],u.year),r=at(t.w,u.week),null!=t.d?((o=t.d)<0||o>6)&&(l=!0):null!=t.e?(o=t.e+i,(t.e<0||t.e>6)&&(l=!0)):o=i}r<1||r>Se(n,i,a)?p(e)._overflowWeeks=!0:null!=l?p(e)._overflowWeekday=!0:(s=_e(n,r,o,i,a),e._a[uo]=s.year,e._dayOfYear=s.dayOfYear)}function ct(e){var t,n,r,o,i,a,s=e._i,l=Fo.exec(s)||Vo.exec(s);if(l){for(p(e).iso=!0,t=0,n=Wo.length;t0&&p(e).unusedInput.push(a),s=s.slice(s.indexOf(r)+r.length),u+=r.length),Ur[i]?(r?p(e).empty=!1:p(e).unusedTokens.push(i),J(i,r,e)):e._strict&&!r&&p(e).unusedTokens.push(i);p(e).charsLeftOver=l-u,s.length>0&&p(e).unusedInput.push(s),e._a[ho]<=12&&!0===p(e).bigHour&&e._a[ho]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[ho]=wt(e._locale,e._a[ho],e._meridiem),lt(e),it(e)}function wt(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?(r=e.isPM(n),r&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function bt(e){var t,n,r,o,i;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;othis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function zt(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e={};if(m(e,this),e=_t(e),e._a){var t=e._isUTC?h(e._a):Tt(e._a);this._isDSTShifted=this.isValid()&&E(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Xt(){return!!this.isValid()&&!this._isUTC}function Kt(){return!!this.isValid()&&this._isUTC}function qt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Zt(e,t){var n,r,o,i=e,a=null;return Pt(e)?i={ms:e._milliseconds,d:e._days,M:e._months}:s(e)?(i={},t?i[t]=e:i.milliseconds=e):(a=Qo.exec(e))?(n="-"===a[1]?-1:1,i={y:0,d:C(a[fo])*n,h:C(a[ho])*n,m:C(a[po])*n,s:C(a[go])*n,ms:C(xt(1e3*a[vo]))*n}):(a=Jo.exec(e))?(n="-"===a[1]?-1:1,i={y:Qt(a[2],n),M:Qt(a[3],n),w:Qt(a[4],n),d:Qt(a[5],n),h:Qt(a[6],n),m:Qt(a[7],n),s:Qt(a[8],n)}):null==i?i={}:"object"==typeof i&&("from"in i||"to"in i)&&(o=en(Tt(i.from),Tt(i.to)),i={},i.ms=o.milliseconds,i.M=o.months),r=new Dt(i),Pt(e)&&c(e,"_locale")&&(r._locale=e._locale),r}function Qt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Jt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function en(e,t){var n;return e.isValid()&&t.isValid()?(t=jt(t,e),e.isBefore(t)?n=Jt(e,t):(n=Jt(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function tn(e,t){return function(n,r){var o,i;return null===r||isNaN(+r)||(S(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),n="string"==typeof n?+n:n,o=Zt(n,r),nn(this,o,e),this}}function nn(e,n,r,o){var i=n._milliseconds,a=xt(n._days),s=xt(n._months);e.isValid()&&(o=null==o||o,s&&pe(e,oe(e,"Month")+s*r),a&&ie(e,"Date",oe(e,"Date")+a*r),i&&e._d.setTime(e._d.valueOf()+i*r),o&&t.updateOffset(e,a||s))}function rn(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function on(e,n){var r=e||Tt(),o=jt(r,this).startOf("day"),i=t.calendarFormat(this,o)||"sameElse";return this.format(n&&(T(n[i])?n[i].call(this,r):n[i])||this.localeData().calendar(i,this,Tt(r)))}function an(){return new y(this)}function sn(e,t){var n=w(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&(t=H(a(t)?"millisecond":t),"millisecond"===t?this.valueOf()>n.valueOf():n.valueOf()9999?$(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):T(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this._d.valueOf()).toISOString().replace("Z",$(n,"Z")):$(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function mn(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");return this.format("["+e+'("]'+(0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY")+"-MM-DD[T]HH:mm:ss.SSS"+t+'[")]')}function yn(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var n=$(this,e);return this.localeData().postformat(n)}function wn(e,t){return this.isValid()&&(w(e)&&e.isValid()||Tt(e).isValid())?Zt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function bn(e){return this.from(Tt(),e)}function Cn(e,t){return this.isValid()&&(w(e)&&e.isValid()||Tt(e).isValid())?Zt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function En(e){return this.to(Tt(),e)}function _n(e){var t;return void 0===e?this._locale._abbr:(t=rt(e),null!=t&&(this._locale=t),this)}function On(){return this._locale}function Sn(e){switch(e=H(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this}function Tn(e){return void 0===(e=H(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))}function Rn(){return this._d.valueOf()-6e4*(this._offset||0)}function Mn(){return Math.floor(this.valueOf()/1e3)}function kn(){return new Date(this.valueOf())}function Nn(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function An(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function In(){return this.isValid()?this.toISOString():null}function Dn(){return g(this)}function Pn(){return f({},p(this))}function xn(){return p(this).overflow}function Ln(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Hn(e,t){W(0,[e,e.length],0,t)}function jn(e){return Wn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Fn(e){return Wn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Vn(){return Se(this.year(),1,4)}function Bn(){var e=this.localeData()._week;return Se(this.year(),e.dow,e.doy)}function Wn(e,t,n,r,o){var i;return null==e?Oe(this,r,o).year:(i=Se(e,r,o),t>i&&(t=i),Un.call(this,e,t,n,r,o))}function Un(e,t,n,r,o){var i=_e(e,t,n,r,o),a=Ce(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Yn(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function $n(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function Gn(e,t){t[vo]=C(1e3*("0."+e))}function zn(){return this._isUTC?"UTC":""}function Xn(){return this._isUTC?"Coordinated Universal Time":""}function Kn(e){return Tt(1e3*e)}function qn(){return Tt.apply(null,arguments).parseZone()}function Zn(e){return e}function Qn(e,t,n,r){return rt()[n](h().set(r,t),e)}function Jn(e,t,n){if(s(e)&&(t=e,e=void 0),e=e||"",null!=t)return Qn(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=Qn(e,r,n,"month");return o}function er(e,t,n,r){"boolean"==typeof e?(s(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,s(t)&&(n=t,t=void 0),t=t||"");var o=rt(),i=e?o._week.dow:0;if(null!=n)return Qn(t,(n+i)%7,r,"day");var a,l=[];for(a=0;a<7;a++)l[a]=Qn(t,(a+i)%7,r,"day");return l}function tr(e,t){return Jn(e,t,"months")}function nr(e,t){return Jn(e,t,"monthsShort")}function rr(e,t,n){return er(e,t,n,"weekdays")}function or(e,t,n){return er(e,t,n,"weekdaysShort")}function ir(e,t,n){return er(e,t,n,"weekdaysMin")}function ar(){var e=this._data;return this._milliseconds=ci(this._milliseconds),this._days=ci(this._days),this._months=ci(this._months),e.milliseconds=ci(e.milliseconds),e.seconds=ci(e.seconds),e.minutes=ci(e.minutes),e.hours=ci(e.hours),e.months=ci(e.months),e.years=ci(e.years),this}function sr(e,t,n,r){var o=Zt(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function lr(e,t){return sr(this,e,t,1)}function ur(e,t){return sr(this,e,t,-1)}function cr(e){return e<0?Math.floor(e):Math.ceil(e)}function fr(){var e,t,n,r,o,i=this._milliseconds,a=this._days,s=this._months,l=this._data;return i>=0&&a>=0&&s>=0||i<=0&&a<=0&&s<=0||(i+=864e5*cr(dr(s)+a),a=0,s=0),l.milliseconds=i%1e3,e=b(i/1e3),l.seconds=e%60,t=b(e/60),l.minutes=t%60,n=b(t/60),l.hours=n%24,a+=b(n/24),o=b(hr(a)),s+=o,a-=cr(dr(o)),r=b(s/12),s%=12,l.days=a,l.months=s,l.years=r,this}function hr(e){return 4800*e/146097}function dr(e){return 146097*e/4800}function pr(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=H(e))||"year"===e)return t=this._days+r/864e5,n=this._months+hr(t),"month"===e?n:n/12;switch(t=this._days+Math.round(dr(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function gr(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*C(this._months/12):NaN}function vr(e){return function(){return this.as(e)}}function mr(){return Zt(this)}function yr(e){return e=H(e),this.isValid()?this[e+"s"]():NaN}function wr(e){return function(){return this.isValid()?this._data[e]:NaN}}function br(){return b(this.days()/7)}function Cr(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}function Er(e,t,n){var r=Zt(e).abs(),o=Ti(r.as("s")),i=Ti(r.as("m")),a=Ti(r.as("h")),s=Ti(r.as("d")),l=Ti(r.as("M")),u=Ti(r.as("y")),c=o<=Ri.ss&&["s",o]||o0,c[4]=n,Cr.apply(null,c)}function _r(e){return void 0===e?Ti:"function"==typeof e&&(Ti=e,!0)}function Or(e,t){return void 0!==Ri[e]&&(void 0===t?Ri[e]:(Ri[e]=t,"s"===e&&(Ri.ss=t-1),!0))}function Sr(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=Er(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)}function Tr(e){return(e>0)-(e<0)||+e}function Rr(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r=Mi(this._milliseconds)/1e3,o=Mi(this._days),i=Mi(this._months);e=b(r/60),t=b(e/60),r%=60,e%=60,n=b(i/12),i%=12;var a=n,s=i,l=o,u=t,c=e,f=r?r.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var d=h<0?"-":"",p=Tr(this._months)!==Tr(h)?"-":"",g=Tr(this._days)!==Tr(h)?"-":"",v=Tr(this._milliseconds)!==Tr(h)?"-":"";return d+"P"+(a?p+a+"Y":"")+(s?p+s+"M":"")+(l?g+l+"D":"")+(u||c||f?"T":"")+(u?v+u+"H":"")+(c?v+c+"M":"")+(f?v+f+"S":"")}var Mr,kr;kr=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r68?1900:2e3)};var wo,bo=re("FullYear",!0);wo=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;tthis?this:e:v()}),Ko=function(){return Date.now?Date.now():+new Date},qo=["year","quarter","month","week","day","hour","minute","second","millisecond"];Lt("Z",":"),Lt("ZZ",""),z("Z",oo),z("ZZ",oo),Z(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Ht(oo,e)});var Zo=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var Qo=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Jo=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Zt.fn=Dt.prototype,Zt.invalid=It;var ei=tn(1,"add"),ti=tn(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ni=O("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});W(0,["gg",2],0,function(){return this.weekYear()%100}),W(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Hn("gggg","weekYear"),Hn("ggggg","weekYear"),Hn("GGGG","isoWeekYear"),Hn("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),z("G",no),z("g",no),z("GG",Kr,$r),z("gg",Kr,$r),z("GGGG",Jr,zr),z("gggg",Jr,zr),z("GGGGG",eo,Xr),z("ggggg",eo,Xr),Q(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=C(e)}),Q(["gg","GG"],function(e,n,r,o){n[o]=t.parseTwoDigitYear(e)}),W("Q",0,"Qo","quarter"),L("quarter","Q"),F("quarter",7),z("Q",Yr),Z("Q",function(e,t){t[co]=3*(C(e)-1)}),W("D",["DD",2],"Do","date"),L("date","D"),F("date",9),z("D",Kr),z("DD",Kr,$r),z("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),Z(["D","DD"],fo),Z("Do",function(e,t){t[fo]=C(e.match(Kr)[0])});var ri=re("Date",!0);W("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),F("dayOfYear",4),z("DDD",Qr),z("DDDD",Gr),Z(["DDD","DDDD"],function(e,t,n){n._dayOfYear=C(e)}),W("m",["mm",2],0,"minute"),L("minute","m"),F("minute",14),z("m",Kr),z("mm",Kr,$r),Z(["m","mm"],po);var oi=re("Minutes",!1);W("s",["ss",2],0,"second"),L("second","s"),F("second",15),z("s",Kr),z("ss",Kr,$r),Z(["s","ss"],go);var ii=re("Seconds",!1);W("S",0,0,function(){return~~(this.millisecond()/100)}),W(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),W(0,["SSS",3],0,"millisecond"),W(0,["SSSS",4],0,function(){return 10*this.millisecond()}),W(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),W(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),W(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),W(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),W(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),L("millisecond","ms"),F("millisecond",16),z("S",Qr,Yr),z("SS",Qr,$r),z("SSS",Qr,Gr);var ai;for(ai="SSSS";ai.length<=9;ai+="S")z(ai,to);for(ai="S";ai.length<=9;ai+="S")Z(ai,Gn);var si=re("Milliseconds",!1);W("z",0,0,"zoneAbbr"),W("zz",0,0,"zoneName");var li=y.prototype;li.add=ei,li.calendar=on,li.clone=an,li.diff=dn,li.endOf=Tn,li.format=yn,li.from=wn,li.fromNow=bn,li.to=Cn,li.toNow=En,li.get=ae,li.invalidAt=xn,li.isAfter=sn,li.isBefore=ln,li.isBetween=un,li.isSame=cn,li.isSameOrAfter=fn,li.isSameOrBefore=hn,li.isValid=Dn,li.lang=ni,li.locale=_n,li.localeData=On,li.max=Xo,li.min=zo,li.parsingFlags=Pn,li.set=se,li.startOf=Sn,li.subtract=ti,li.toArray=Nn,li.toObject=An,li.toDate=kn,li.toISOString=vn,li.inspect=mn,li.toJSON=In,li.toString=gn,li.unix=Mn,li.valueOf=Rn,li.creationData=Ln,li.year=bo,li.isLeapYear=ne,li.weekYear=jn,li.isoWeekYear=Fn,li.quarter=li.quarters=Yn,li.month=ge,li.daysInMonth=ve,li.week=li.weeks=ke,li.isoWeek=li.isoWeeks=Ne,li.weeksInYear=Bn,li.isoWeeksInYear=Vn,li.date=ri,li.day=li.days=je,li.weekday=Fe,li.isoWeekday=Ve,li.dayOfYear=$n,li.hour=li.hours=xo,li.minute=li.minutes=oi,li.second=li.seconds=ii,li.millisecond=li.milliseconds=si,li.utcOffset=Vt,li.utc=Wt,li.local=Ut,li.parseZone=Yt,li.hasAlignedHourOffset=$t,li.isDST=Gt,li.isLocal=Xt,li.isUtcOffset=Kt,li.isUtc=qt,li.isUTC=qt,li.zoneAbbr=zn,li.zoneName=Xn,li.dates=O("dates accessor is deprecated. Use date instead.",ri),li.months=O("months accessor is deprecated. Use month instead",ge),li.years=O("years accessor is deprecated. Use year instead",bo),li.zone=O("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Bt),li.isDSTShifted=O("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",zt);var ui=k.prototype;ui.calendar=N,ui.longDateFormat=A,ui.invalidDate=I,ui.ordinal=D,ui.preparse=Zn,ui.postformat=Zn,ui.relativeTime=P,ui.pastFuture=x,ui.set=R,ui.months=ce,ui.monthsShort=fe,ui.monthsParse=de,ui.monthsRegex=ye,ui.monthsShortRegex=me,ui.week=Te,ui.firstDayOfYear=Me,ui.firstDayOfWeek=Re,ui.weekdays=De,ui.weekdaysMin=xe,ui.weekdaysShort=Pe,ui.weekdaysParse=He,ui.weekdaysRegex=Be,ui.weekdaysShortRegex=We,ui.weekdaysMinRegex=Ue,ui.isPM=Ke,ui.meridiem=qe,et("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===C(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),t.lang=O("moment.lang is deprecated. Use moment.locale instead.",et),t.langData=O("moment.langData is deprecated. Use moment.localeData instead.",rt);var ci=Math.abs,fi=vr("ms"),hi=vr("s"),di=vr("m"),pi=vr("h"),gi=vr("d"),vi=vr("w"),mi=vr("M"),yi=vr("y"),wi=wr("milliseconds"),bi=wr("seconds"),Ci=wr("minutes"),Ei=wr("hours"),_i=wr("days"),Oi=wr("months"),Si=wr("years"),Ti=Math.round,Ri={ss:44,s:45,m:45,h:22,d:26,M:11},Mi=Math.abs,ki=Dt.prototype;return ki.isValid=At,ki.abs=ar,ki.add=lr,ki.subtract=ur,ki.as=pr,ki.asMilliseconds=fi,ki.asSeconds=hi,ki.asMinutes=di,ki.asHours=pi,ki.asDays=gi,ki.asWeeks=vi,ki.asMonths=mi,ki.asYears=yi,ki.valueOf=gr,ki._bubble=fr,ki.clone=mr,ki.get=yr,ki.milliseconds=wi,ki.seconds=bi,ki.minutes=Ci,ki.hours=Ei,ki.days=_i,ki.weeks=br,ki.months=Oi,ki.years=Si,ki.humanize=Sr,ki.toISOString=Rr,ki.toString=Rr,ki.toJSON=Rr,ki.locale=_n,ki.localeData=On,ki.toIsoString=O("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Rr),ki.lang=ni,W("X",0,0,"unix"),W("x",0,0,"valueOf"),z("x",no),z("X",io),Z("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),Z("x",function(e,t,n){n._d=new Date(C(e))}),t.version="2.20.1",function(e){Mr=e}(Tt),t.fn=li,t.min=Mt,t.max=kt,t.now=Ko,t.utc=h,t.unix=Kn,t.months=tr,t.isDate=l,t.locale=et,t.invalid=v,t.duration=Zt,t.isMoment=w,t.weekdays=rr,t.parseZone=qn,t.localeData=rt,t.isDuration=Pt,t.monthsShort=nr,t.weekdaysMin=ir,t.defineLocale=tt,t.updateLocale=nt,t.locales=ot,t.weekdaysShort=or,t.normalizeUnits=H,t.relativeTimeRounding=_r,t.relativeTimeThreshold=Or,t.calendarFormat=rn,t.prototype=li,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},t}),window.moment=n(24)}).call(t,n(198)(e))},function(e,t,n){"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(6),o=n(48),i=n(28);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},function(e,t,n){"use strict";function r(e){return e[0].toUpperCase()+e.substr(1)}function o(){for(var e=[],t=arguments.length,n=Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return(""+e).replace(/(?:\\)?\[([^[\]]+)]/g,function(e,n){return"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[n]?"":t[n]})}function l(e){return(""+e).replace(c,"")}t.__esModule=!0,t.toUpperCaseFirst=r,t.equalsIgnoreCase=o,t.randomString=i,t.isPercentValue=a,t.substitute=s,t.stripTags=l;var u=n(11),c=/<\/?\w+\/?>|<\w+[\s|\/][^>]*>/gi},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0],t=this.shouldBeRendered();this.clone&&(this.needFullRender||t)&&this.clone.draw(e),this.needFullRender=t}},{key:"reset",value:function(){if(this.clone){var e=this.clone.wtTable.holder;(0,l.arrayEach)([e.style,this.clone.wtTable.hider.style,e.parentNode.style],function(e){e.width="",e.height=""})}}},{key:"destroy",value:function(){new c.default(this.clone).destroy()}}]),e}()},function(e,t,n){"use strict";function r(e){return"function"==typeof e}function o(e){function t(){for(var t=this,a=arguments.length,s=Array(a),l=0;l1&&void 0!==arguments[1]?arguments[1]:200,r=0,o={lastCallThrottled:!0},i=null;return t}function i(e){function t(){s=i}function n(){for(var t=arguments.length,n=Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:200,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=o(e,r),s=i;return n.clearHits=t,n}function a(e){function t(){for(var t=this,i=arguments.length,a=Array(i),s=0;s1&&void 0!==arguments[1]?arguments[1]:200,r=null,o=void 0;return t}function s(){for(var e=arguments.length,t=Array(e),n=0;n1?t-1:0),r=1;r=n?e.apply(this,s):t(s)}}var n=e.length;return t([])}function c(e){function t(r){return function(){for(var o=arguments.length,i=Array(o),a=0;a=n?e.apply(this,s):t(s)}}var n=e.length;return t([])}t.__esModule=!0,t.isFunction=r,t.throttle=o,t.throttleAfterHits=i,t.debounce=a,t.pipe=s,t.partial=l,t.curry=u,t.curryRight=c;var f=n(0)},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(16),o=n(37),i=n(35),a=n(58)("src"),s=Function.toString,l=(""+s).split("toString");n(48).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var u="function"==typeof n;u&&(i(n,"name")||o(n,"name",t)),e[t]!==n&&(u&&(i(n,a)||o(n,a,e[t]?""+e[t]:l.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||s.call(this)})},function(e,t,n){var r=n(23),o=n(59);e.exports=n(27)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(74);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(47);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(58)("meta"),o=n(13),i=n(35),a=n(23).f,s=0,l=Object.isExtensible||function(){return!0},u=!n(28)(function(){return l(Object.preventExtensions({}))}),c=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},f=function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[r].i},h=function(e,t){if(!i(e,r)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[r].w},d=function(e){return u&&p.NEED&&l(e)&&!i(e,r)&&c(e),e},p=e.exports={KEY:r,NEED:!1,fastKey:f,getWeak:h,onFreeze:d}},function(e,t,n){"use strict";function r(e){return d.call(window,e)}function o(e){p.call(window,e)}function i(){return"ontouchstart"in window}function a(){var e=document.createElement("div");return!(!e.createShadowRoot||!e.createShadowRoot.toString().match(/\[native code\]/))}function s(){var e=document.createElement("TABLE");e.style.borderSpacing=0,e.style.borderWidth=0,e.style.padding=0;var t=document.createElement("TBODY");e.appendChild(t),t.appendChild(document.createElement("TR")),t.firstChild.appendChild(document.createElement("TD")),t.firstChild.firstChild.innerHTML="t
t";var n=document.createElement("CAPTION");n.innerHTML="c
c
c
c",n.style.padding=0,n.style.margin=0,e.insertBefore(n,t),document.body.appendChild(e),v=e.offsetHeight<2*e.lastChild.offsetHeight,document.body.removeChild(e)}function l(){return void 0===v&&s(),v}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return m||(m="object"===("undefined"==typeof Intl?"undefined":c(Intl))?new Intl.Collator(e,t).compare:"function"==typeof String.prototype.localeCompare?function(e,t){return(""+e).localeCompare(t)}:function(e,t){return e===t?0:e>t?-1:1})}t.__esModule=!0;var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.requestAnimationFrame=r,t.cancelAnimationFrame=o,t.isTouchSupported=i,t.isWebComponentSupportedNatively=a,t.hasCaptionProblem=l,t.getComparisonFunction=u;for(var f=0,h=["ms","moz","webkit","o"],d=window.requestAnimationFrame,p=window.cancelAnimationFrame,g=0;g=2&&"="===e.charAt(0)}function o(e){return"string"==typeof e&&"'"===e.charAt(0)&&"="===e.charAt(1)}function i(e){return o(e)?e.substr(1):e}function a(e){var t=/(\\"|"(?:\\"|[^"])*"|(\+))|(\\'|'(?:\\'|[^'])*'|(\+))/g,n=e.match(t)||[],r=-1;return e.toUpperCase().replace(t,function(){return r+=1,n[r]})}function s(e,t){return function(n){return{row:"row"===e?t:n.row,column:"column"===e?t:n.column}}}t.__esModule=!0,t.isFormulaExpression=r,t.isFormulaExpressionEscaped=o,t.unescapeFormulaExpression=i,t.toUpperCaseFormula=a,t.cellCoordFactory=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=function(){function e(e,t){for(var n=0;n0}},{key:"hasPrecedent",value:function(e){return(0,l.arrayFilter)(this.precedents,function(t){return t.isEqual(e)}).length>0}}]),t}(c.default)},function(e,t,n){var r=n(169),o=n(95);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:"common";i.has(s)||i.set(s,new Map);var l=i.get(s);return{register:e,getItem:t,hasItem:n,getNames:o,getValues:a}}t.__esModule=!0,t.default=o;var i=t.collection=new Map},function(e,t,n){"use strict";function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.userAgent,n=void 0===t?navigator.userAgent:t,r=e.vendor,o=void 0===r?navigator.vendor:r;(0,h.objectEach)(p,function(e){return void(0,e.test)(n,o)})}function o(){return p.chrome.value}function i(){return p.edge.value}function a(){return p.ie.value}function s(){return p.ie8.value}function l(){return p.ie9.value}function u(){return p.ie.value||p.edge.value}function c(){return p.mobile.value}function f(){return p.safari.value}t.__esModule=!0,t.setBrowserMeta=r,t.isChrome=o,t.isEdge=i,t.isIE=a,t.isIE8=s,t.isIE9=l,t.isMSBrowser=u,t.isMobileBrowser=c,t.isSafari=f;var h=n(1),d=function(e){var t={value:!1};return t.test=function(n,r){t.value=e(n,r)},t},p={chrome:d(function(e,t){return/Chrome/.test(e)&&/Google/.test(t)}),edge:d(function(e){return/Edge/.test(e)}),ie:d(function(e){return/Trident/.test(e)}),ie8:d(function(){return!document.createTextNode("test").textContent}),ie9:d(function(){return!!document.documentMode}),mobile:d(function(e){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)}),safari:d(function(e,t){return/Safari/.test(e)&&/Apple Computer/.test(t)})};r()},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(13);e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){var r=n(14)("unscopables"),o=Array.prototype;void 0==o[r]&&n(37)(o,r,{}),e.exports=function(e){o[r][e]=!0}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){h.set(e,t)}function i(e){var t=e instanceof u.default?e:a(e),n=void 0;return d.has(t)?n=d.get(t):(n=new f(t),d.set(t,n)),n}function a(e){if(!h.has(e))throw Error("Record translator was not registered for this object identity");return h.get(e)}t.__esModule=!0,t.RecordTranslator=void 0;var s=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:1,r=(0,o.arrayMax)(this._arrayMap)+1,i=[];return(0,a.rangeEach)(n-1,function(n){i.push(t._arrayMap.splice(e+n,0,r+n))}),i},removeItems:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=[];if(Array.isArray(e)){var i=[].concat(this._arrayMap);e.sort(function(e,t){return t-e}),r=(0,o.arrayReduce)(e,function(e,n){return t._arrayMap.splice(n,1),e.concat(i.slice(n,n+1))},[])}else r=this._arrayMap.splice(e,n);return r},unshiftItems:function(e){function t(e){return(0,o.arrayReduce)(r,function(t,n){var r=t;return e>n&&(r+=1),r},0)}var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=this.removeItems(e,n);this._arrayMap=(0,o.arrayMap)(this._arrayMap,function(e){var n=e,r=t(n);return r&&(n-=r),n})},shiftItems:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this._arrayMap=(0,o.arrayMap)(this._arrayMap,function(t){var r=t;return r>=e&&(r+=n),r}),(0,a.rangeEach)(n-1,function(n){t._arrayMap.splice(e+n,0,e+n)})},swapIndexes:function(e,t){var n;(n=this._arrayMap).splice.apply(n,[t,0].concat(r(this._arrayMap.splice(e,1))))},clearMap:function(){this._arrayMap.length=0}};(0,i.defineGetter)(s,"MIXIN_NAME","arrayMapper",{writable:!1,enumerable:!1}),t.default=s},function(e,t,n){"use strict";function r(e,t){return"border_row"+e+"col"+t}function o(){return{width:1,color:"#000"}}function i(){return{hide:!0}}function a(){return{width:1,color:"#000",cornerVisible:!1}}function s(e,t){return{id:r(e,t),border:a(),row:e,col:t,top:i(),right:i(),bottom:i(),left:i()}}function l(e,t){return(0,f.hasOwnProperty)(t,"border")&&(e.border=t.border),(0,f.hasOwnProperty)(t,"top")&&(t.top?((0,f.isObject)(t.top)||(t.top=o()),e.top=t.top):(t.top=i(),e.top=t.top)),(0,f.hasOwnProperty)(t,"right")&&(t.right?((0,f.isObject)(t.right)||(t.right=o()),e.right=t.right):(t.right=i(),e.right=t.right)),(0,f.hasOwnProperty)(t,"bottom")&&(t.bottom?((0,f.isObject)(t.bottom)||(t.bottom=o()),e.bottom=t.bottom):(t.bottom=i(),e.bottom=t.bottom)),(0,f.hasOwnProperty)(t,"left")&&(t.left?((0,f.isObject)(t.left)||(t.left=o()),e.left=t.left):(t.left=i(),e.left=t.left)),e}function u(e,t){var n=!1;return(0,h.arrayEach)(e.getSelectedRange(),function(r){r.forAll(function(r,o){var i=e.getCellMeta(r,o).borders;if(i){if(!t)return n=!0,!1;if(!(0,f.hasOwnProperty)(i[t],"hide")||!1===i[t].hide)return n=!0,!1}})}),n}function c(e){return''+String.fromCharCode(10003)+""+e}t.__esModule=!0,t.createId=r,t.createDefaultCustomBorder=o,t.createSingleEmptyBorder=i,t.createDefaultHtBorder=a,t.createEmptyBorders=s,t.extendDefaultBorder=l,t.checkSelectionBorders=u,t.markSelected=c;var f=n(1),h=n(0)},function(e,t){e.exports=!1},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports={}},function(e,t,n){var r=n(23).f,o=n(35),i=n(14)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){"use strict";function r(e){this.instance=e,this.state=a.VIRGIN,this._opened=!1,this._fullEditMode=!1,this._closeCallback=null,this.init()}t.__esModule=!0,t.EditorState=void 0;var o=n(8),i=n(11),a=t.EditorState={VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"};r.prototype._fireCallbacks=function(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)},r.prototype.init=function(){},r.prototype.getValue=function(){throw Error("Editor getValue() method unimplemented")},r.prototype.setValue=function(){throw Error("Editor setValue() method unimplemented")},r.prototype.open=function(){throw Error("Editor open() method unimplemented")},r.prototype.close=function(){throw Error("Editor close() method unimplemented")},r.prototype.prepare=function(e,t,n,r,o,i){this.TD=r,this.row=e,this.col=t,this.prop=n,this.originalValue=o,this.cellProperties=i,this.state=a.VIRGIN},r.prototype.extend=function(){function e(){for(var e=arguments.length,n=Array(e),r=0;rn[2]&&(r=n[0],n[0]=n[2],n[2]=r),n[1]>n[3]&&(r=n[1],n[1]=n[3],n[3]=r)):n=[this.row,this.col,null,null],this.instance.populateFromArray(n[0],n[1],e,n[2],n[3],"edit")},r.prototype.beginEditing=function(e,t){if(this.state===a.VIRGIN){if(this.instance.view.scrollViewport(new o.CellCoords(this.row,this.col)),this.state=a.EDITING,this.isInFullEditMode()){this.setValue("string"==typeof e?e:(0,i.stringify)(this.originalValue))}this.open(t),this._opened=!0,this.focus(),this.instance.view.render(),this.instance.runHooks("afterBeginEditing",this.row,this.col)}},r.prototype.finishEditing=function(e,t,n){var r=this,o=void 0;if(n){var i=this._closeCallback;this._closeCallback=function(e){i&&i(e),n(e),r.instance.view.render()}}if(!this.isWaiting()){if(this.state===a.VIRGIN)return void this.instance._registerTimeout(function(){r._fireCallbacks(!0)});if(this.state===a.EDITING){if(e)return this.cancelChanges(),void this.instance.view.render();var s=this.getValue();o=this.instance.getSettings().trimWhitespace?[["string"==typeof s?String.prototype.trim.call(s||""):s]]:[[s]],this.state=a.WAITING,this.saveValue(o,t),this.instance.getCellValidator(this.cellProperties)?this.instance.addHookOnce("postAfterValidate",function(e){r.state=a.FINISHED,r.discardEditor(e)}):(this.state=a.FINISHED,this.discardEditor(!0))}}},r.prototype.cancelChanges=function(){this.state=a.FINISHED,this.discardEditor()},r.prototype.discardEditor=function(e){this.state===a.FINISHED&&(!1===e&&!0!==this.cellProperties.allowInvalid?(this.instance.selectCell(this.row,this.col),this.focus(),this.state=a.EDITING,this._fireCallbacks(!1)):(this.close(),this._opened=!1,this._fullEditMode=!1,this.state=a.VIRGIN,this._fireCallbacks(!0)))},r.prototype.enableFullEditMode=function(){this._fullEditMode=!0},r.prototype.isInFullEditMode=function(){return this._fullEditMode},r.prototype.isOpened=function(){return this._opened},r.prototype.isWaiting=function(){return this.state===a.WAITING},r.prototype.checkEditorSection=function(){var e=this.instance.countRows(),t="";return this.row=e-this.instance.getSettings().fixedRowsBottom?t=this.col=e.getSetting("totalRows")||this.col>=e.getSetting("totalColumns"))}},{key:"isEqual",value:function(e){return e===this||this.row===e.row&&this.col===e.col}},{key:"isSouthEastOf",value:function(e){return this.row>=e.row&&this.col>=e.col}},{key:"isNorthWestOf",value:function(e){return this.row<=e.row&&this.col<=e.col}},{key:"isSouthWestOf",value:function(e){return this.row>=e.row&&this.col<=e.col}},{key:"isNorthEastOf",value:function(e){return this.row<=e.row&&this.col>=e.col}},{key:"toObject",value:function(){return{row:this.row,col:this.col}}}]),e}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=n(2),i=n(509),a=r(i),s=n(63),l=r(s),u=n(9),c=r(u),f=n(18),h=n(12),d=l.default.prototype.extend();d.prototype.init=function(){var e=this;this.createElements(),this.eventManager=new c.default(this),this.bindEvents(),this.autoResize=(0,a.default)(),this.holderZIndex=-1,this.instance.addHook("afterDestroy",function(){e.destroy()})},d.prototype.prepare=function(e,t,n,r,o,i){for(var a=this,u=this.state,c=arguments.length,f=Array(c>6?c-6:0),h=6;h=0?this.holderZIndex:"",this.textareaParentStyle.position=""},d.prototype.getValue=function(){return this.TEXTAREA.value},d.prototype.setValue=function(e){this.TEXTAREA.value=e},d.prototype.beginEditing=function(){if(this.state===s.EditorState.VIRGIN){this.TEXTAREA.value="";for(var e=arguments.length,t=Array(e),n=0;n0&&void 0!==arguments[0]&&arguments[0];if(this.state===s.EditorState.EDITING||e){if(!(this.TD=this.getEditedCell()))return void(e||this.close(!0));var t=(0,o.offset)(this.TD),n=(0,o.offset)(this.instance.rootElement),r=this.instance.view.wt.wtOverlays.topOverlay.mainTableScrollableElement,i=this.instance.countRows(),a=r!==window?r.scrollTop:0,l=r!==window?r.scrollLeft:0,u=this.checkEditorSection(),c=["","left"].includes(u)?a:0,f=["","top","bottom"].includes(u)?l:0,h=t.top===n.top?0:1,d=this.instance.getSettings(),p=this.instance.hasColHeaders(),g=this.TD.style.backgroundColor,v=t.top-n.top-h-c,m=t.left-n.left-1-f,y=void 0;switch(u){case"top":y=(0,o.getCssTransform)(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);break;case"left":y=(0,o.getCssTransform)(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);break;case"top-left-corner":y=(0,o.getCssTransform)(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom-left-corner":y=(0,o.getCssTransform)(this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom":y=(0,o.getCssTransform)(this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.holder.parentNode)}(p&&0===this.instance.getSelectedLast()[0]||d.fixedRowsBottom&&this.instance.getSelectedLast()[0]===i-d.fixedRowsBottom)&&(v+=1),0===this.instance.getSelectedLast()[1]&&(m+=1),y&&-1!==y?this.textareaParentStyle[y[0]]=y[1]:(0,o.resetCssTransform)(this.TEXTAREA_PARENT),this.textareaParentStyle.top=v+"px",this.textareaParentStyle.left=m+"px",this.showEditableElement();var w=this.instance.view.wt.wtViewport.rowsRenderCalculator.startPosition,b=this.instance.view.wt.wtViewport.columnsRenderCalculator.startPosition,C=this.instance.view.wt.wtOverlays.leftOverlay.getScrollPosition(),E=this.instance.view.wt.wtOverlays.topOverlay.getScrollPosition(),_=(0,o.getScrollbarWidth)(),O=this.TD.offsetTop+w-E,S=this.TD.offsetLeft+b-C,T=(0,o.innerWidth)(this.TD)-8,R=(0,o.hasVerticalScrollbar)(r)?_:0,M=(0,o.hasHorizontalScrollbar)(r)?_:0,k=this.instance.view.maximumVisibleElementWidth(S)-9-R,N=this.TD.scrollHeight+1,A=Math.max(this.instance.view.maximumVisibleElementHeight(O)-M,23),I=(0,o.getComputedStyle)(this.TD);this.TEXTAREA.style.fontSize=I.fontSize,this.TEXTAREA.style.fontFamily=I.fontFamily,this.TEXTAREA.style.backgroundColor=g||(0,o.getComputedStyle)(this.TEXTAREA).backgroundColor,this.autoResize.init(this.TEXTAREA,{minHeight:Math.min(N,A),maxHeight:A,minWidth:Math.min(T,k),maxWidth:k},!0)}},d.prototype.bindEvents=function(){var e=this;this.eventManager.addEventListener(this.TEXTAREA,"cut",function(e){(0,h.stopPropagation)(e)}),this.eventManager.addEventListener(this.TEXTAREA,"paste",function(e){(0,h.stopPropagation)(e)}),this.instance.addHook("afterScrollHorizontally",function(){e.refreshDimensions()}),this.instance.addHook("afterScrollVertically",function(){e.refreshDimensions()}),this.instance.addHook("afterColumnResize",function(){e.refreshDimensions(),e.focus()}),this.instance.addHook("afterRowResize",function(){e.refreshDimensions(),e.focus()}),this.instance.addHook("afterDestroy",function(){e.eventManager.destroy()})},d.prototype.destroy=function(){this.eventManager.destroy()},t.default=d},function(e,t,n){"use strict";function r(e,t){return"number"==typeof e&&"number"==typeof t?e-t:f(e,t)}function o(e,t){var n=e;return""===n&&(n="("+t+")"),n}function i(e){var t=e;return h&&(t=new Set(t)),function(e){return h?t.has(e):!!~t.indexOf(e)}}function a(e){return null===e||void 0===e?"":e}function s(e){var t=e;return t=d?Array.from(new Set(t)):(0,c.arrayUnique)(t),t=t.sort(function(e,t){return"number"==typeof e&&"number"==typeof t?e-t:e===t?0:e>t?1:-1})}function l(e,t,n,r){var a=[],s=e===t,l=void 0;return s||(l=i(t)),(0,c.arrayEach)(e,function(e){var t=!1;(s||l(e))&&(t=!0);var i={checked:t,value:e,visualValue:o(e,n)};r&&r(i),a.push(i)}),a}t.__esModule=!0,t.sortComparison=r,t.toVisualValue=o,t.createArrayAssertion=i,t.toEmptyString=a,t.unifyColumnValues=s,t.intersectValues=l;var u=n(41),c=n(0),f=(0,u.getComparisonFunction)(),h=new Set([1]).has(1),d=h&&"function"==typeof Array.from},function(e,t,n){"use strict";function r(e){if(!a[e])throw Error('Operation with id "'+e+'" does not exist.');var t=a[e].func;return function(e,n){return t(e,n)}}function o(e){return a[e].name}function i(e,t,n){a[e]={name:t,func:n}}t.__esModule=!0,t.getOperationFunc=r,t.getOperationName=o,t.registerOperation=i;var a=t.operations={}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=function(){function e(e,t){for(var n=0;n-1?parseFloat(e):parseInt(e,10)),t}function o(e){return-1*r(e)}t.__esModule=!0,t.toNumber=r,t.invertNumber=o},function(module,exports,__webpack_require__){var utils=__webpack_require__(1),error=__webpack_require__(0),statistical=__webpack_require__(5),information=__webpack_require__(7);exports.ABS=function(e){return(e=utils.parseNumber(e))instanceof Error?e:Math.abs(e)},exports.ACOS=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.acos(e);return isNaN(t)&&(t=error.num),t},exports.ACOSH=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.log(e+Math.sqrt(e*e-1));return isNaN(t)&&(t=error.num),t},exports.ACOT=function(e){return(e=utils.parseNumber(e))instanceof Error?e:Math.atan(1/e)},exports.ACOTH=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=.5*Math.log((e+1)/(e-1));return isNaN(t)&&(t=error.num),t},exports.AGGREGATE=function(e,t,n,r){if(e=utils.parseNumber(e),t=utils.parseNumber(e),utils.anyIsError(e,t))return error.value;switch(e){case 1:return statistical.AVERAGE(n);case 2:return statistical.COUNT(n);case 3:return statistical.COUNTA(n);case 4:return statistical.MAX(n);case 5:return statistical.MIN(n);case 6:return exports.PRODUCT(n);case 7:return statistical.STDEV.S(n);case 8:return statistical.STDEV.P(n);case 9:return exports.SUM(n);case 10:return statistical.VAR.S(n);case 11:return statistical.VAR.P(n);case 12:return statistical.MEDIAN(n);case 13:return statistical.MODE.SNGL(n);case 14:return statistical.LARGE(n,r);case 15:return statistical.SMALL(n,r);case 16:return statistical.PERCENTILE.INC(n,r);case 17:return statistical.QUARTILE.INC(n,r);case 18:return statistical.PERCENTILE.EXC(n,r);case 19:return statistical.QUARTILE.EXC(n,r)}},exports.ARABIC=function(e){if(!/^M*(?:D?C{0,3}|C[MD])(?:L?X{0,3}|X[CL])(?:V?I{0,3}|I[XV])$/.test(e))return error.value;var t=0;return e.replace(/[MDLV]|C[MD]?|X[CL]?|I[XV]?/g,function(e){t+={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1}[e]}),t},exports.ASIN=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.asin(e);return isNaN(t)&&(t=error.num),t},exports.ASINH=function(e){return e=utils.parseNumber(e),e instanceof Error?e:Math.log(e+Math.sqrt(e*e+1))},exports.ATAN=function(e){return e=utils.parseNumber(e),e instanceof Error?e:Math.atan(e)},exports.ATAN2=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:Math.atan2(e,t)},exports.ATANH=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.log((1+e)/(1-e))/2;return isNaN(t)&&(t=error.num),t},exports.BASE=function(e,t,n){if(n=n||0,e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n))return error.value;n=void 0===n?0:n;var r=e.toString(t);return new Array(Math.max(n+1-r.length,0)).join("0")+r},exports.CEILING=function(e,t,n){if(t=void 0===t?1:Math.abs(t),n=n||0,e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n))return error.value;if(0===t)return 0;var r=-Math.floor(Math.log(t)/Math.log(10));return e>=0?exports.ROUND(Math.ceil(e/t)*t,r):0===n?-exports.ROUND(Math.floor(Math.abs(e)/t)*t,r):-exports.ROUND(Math.ceil(Math.abs(e)/t)*t,r)},exports.CEILING.MATH=exports.CEILING,exports.CEILING.PRECISE=exports.CEILING,exports.COMBIN=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:exports.FACT(e)/(exports.FACT(t)*exports.FACT(e-t))},exports.COMBINA=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:0===e&&0===t?1:exports.COMBIN(e+t-1,e-1)},exports.COS=function(e){return e=utils.parseNumber(e),e instanceof Error?e:Math.cos(e)},exports.COSH=function(e){return e=utils.parseNumber(e),e instanceof Error?e:(Math.exp(e)+Math.exp(-e))/2},exports.COT=function(e){return e=utils.parseNumber(e),e instanceof Error?e:1/Math.tan(e)},exports.COTH=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.exp(2*e);return(t+1)/(t-1)},exports.CSC=function(e){return e=utils.parseNumber(e),e instanceof Error?e:1/Math.sin(e)},exports.CSCH=function(e){return e=utils.parseNumber(e),e instanceof Error?e:2/(Math.exp(e)-Math.exp(-e))},exports.DECIMAL=function(e,t){return arguments.length<1?error.value:parseInt(e,t)},exports.DEGREES=function(e){return e=utils.parseNumber(e),e instanceof Error?e:180*e/Math.PI},exports.EVEN=function(e){return e=utils.parseNumber(e),e instanceof Error?e:exports.CEILING(e,-2,-1)},exports.EXP=function(e){return arguments.length<1?error.na:"number"!=typeof e||arguments.length>1?error.error:e=Math.exp(e)};var MEMOIZED_FACT=[];exports.FACT=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.floor(e);return 0===t||1===t?1:MEMOIZED_FACT[t]>0?MEMOIZED_FACT[t]:MEMOIZED_FACT[t]=exports.FACT(t-1)*t},exports.FACTDOUBLE=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.floor(e);return t<=0?1:t*exports.FACTDOUBLE(t-2)},exports.FLOOR=function(e,t){if(e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t))return error.value;if(0===t)return 0;if(!(e>0&&t>0||e<0&&t<0))return error.num;t=Math.abs(t);var n=-Math.floor(Math.log(t)/Math.log(10));return e>=0?exports.ROUND(Math.floor(e/t)*t,n):-exports.ROUND(Math.ceil(Math.abs(e)/t),n)},exports.FLOOR.MATH=function(e,t,n){if(t=void 0===t?1:t,n=void 0===n?0:n,e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n))return error.value;if(0===t)return 0;t=t?Math.abs(t):1;var r=-Math.floor(Math.log(t)/Math.log(10));return e>=0?exports.ROUND(Math.floor(e/t)*t,r):0===n||void 0===n?-exports.ROUND(Math.ceil(Math.abs(e)/t)*t,r):-exports.ROUND(Math.floor(Math.abs(e)/t)*t,r)},exports.FLOOR.PRECISE=exports.FLOOR.MATH,exports.GCD=function(){var e=utils.parseNumberArray(utils.flatten(arguments));if(e instanceof Error)return e;for(var t=e.length,n=e[0],r=n<0?-n:n,o=1;oa?r%=a:a%=r;r+=a}return r},exports.INT=function(e){return e=utils.parseNumber(e),e instanceof Error?e:Math.floor(e)},exports.ISO={CEILING:exports.CEILING},exports.LCM=function(){var e=utils.parseNumberArray(utils.flatten(arguments));if(e instanceof Error)return e;for(var t,n,r,o,i=1;void 0!==(r=e.pop());)for(;r>1;){if(r%2){for(t=3,n=Math.floor(Math.sqrt(r));t<=n&&r%t;t+=2);o=t<=n?t:r}else o=2;for(r/=o,i*=o,t=e.length;t;e[--t]%o==0&&1==(e[t]/=o)&&e.splice(t,1));}return i},exports.LN=function(e){return e=utils.parseNumber(e),e instanceof Error?e:Math.log(e)},exports.LN10=function(){return Math.log(10)},exports.LN2=function(){return Math.log(2)},exports.LOG10E=function(){return Math.LOG10E},exports.LOG2E=function(){return Math.LOG2E},exports.LOG=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:(t=void 0===t?10:t,Math.log(e)/Math.log(t))},exports.LOG10=function(e){return e=utils.parseNumber(e),e instanceof Error?e:Math.log(e)/Math.log(10)},exports.MOD=function(e,t){if(e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t))return error.value;if(0===t)return error.div0;var n=Math.abs(e%t);return t>0?n:-n},exports.MROUND=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:e*t<0?error.num:Math.round(e/t)*t},exports.MULTINOMIAL=function(){var e=utils.parseNumberArray(utils.flatten(arguments));if(e instanceof Error)return e;for(var t=0,n=1,r=0;r0?t:-t},exports.PI=function(){return Math.PI},exports.E=function(){return Math.E},exports.POWER=function(e,t){if(e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t))return error.value;var n=Math.pow(e,t);return isNaN(n)?error.num:n},exports.PRODUCT=function(){var e=utils.parseNumberArray(utils.flatten(arguments));if(e instanceof Error)return e;for(var t=1,n=0;n0?1:-1)*Math.floor(Math.abs(e)*Math.pow(10,t))/Math.pow(10,t)},exports.ROUNDUP=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:(e>0?1:-1)*Math.ceil(Math.abs(e)*Math.pow(10,t))/Math.pow(10,t)},exports.SEC=function(e){return e=utils.parseNumber(e),e instanceof Error?e:1/Math.cos(e)},exports.SECH=function(e){return e=utils.parseNumber(e),e instanceof Error?e:2/(Math.exp(e)+Math.exp(-e))},exports.SERIESSUM=function(e,t,n,r){if(e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),r=utils.parseNumberArray(r),utils.anyIsError(e,t,n,r))return error.value;for(var o=r[0]*Math.pow(e,t),i=1;i=t)},exports.LT=function(e,t){return 2!==arguments.length?error.na:(e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.error:e0?1:-1)*Math.floor(Math.abs(e)*Math.pow(10,t))/Math.pow(10,t)}},function(module,exports,__webpack_require__){var mathTrig=__webpack_require__(4),text=__webpack_require__(6),jStat=__webpack_require__(11).jStat,utils=__webpack_require__(1),error=__webpack_require__(0),misc=__webpack_require__(12);exports.AVEDEV=function(){var e=utils.parseNumberArray(utils.flatten(arguments));return e instanceof Error?e:jStat.sum(jStat(e).subtract(jStat.mean(e)).abs()[0])/e.length},exports.AVERAGE=function(){for(var e,t=utils.numbers(utils.flatten(arguments)),n=t.length,r=0,o=0,i=0;i=n)return r;r++}},exports.CHISQ={},exports.CHISQ.DIST=function(e,t,n){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:n?jStat.chisquare.cdf(e,t):jStat.chisquare.pdf(e,t)},exports.CHISQ.DIST.RT=function(e,t){return!e|!t?error.na:e<1||t>Math.pow(10,10)?error.num:"number"!=typeof e||"number"!=typeof t?error.value:1-jStat.chisquare.cdf(e,t)},exports.CHISQ.INV=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:jStat.chisquare.inv(e,t)},exports.CHISQ.INV.RT=function(e,t){return!e|!t?error.na:e<0||e>1||t<1||t>Math.pow(10,10)?error.num:"number"!=typeof e||"number"!=typeof t?error.value:jStat.chisquare.inv(1-e,t)},exports.CHISQ.TEST=function(e,t){if(2!==arguments.length)return error.na;if(!(e instanceof Array&&t instanceof Array))return error.value;if(e.length!==t.length)return error.value;if(e[0]&&t[0]&&e[0].length!==t[0].length)return error.value;var n,r,o,i=e.length;for(r=0;r=2;)n=n*e/r,r-=2;for(var o=n,i=t;o>1e-10*n;)i+=2,o=o*e/i,n+=o;return 1-n}(l,s))/1e6},exports.COLUMN=function(e,t){return 2!==arguments.length?error.na:t<0?error.num:e instanceof Array&&"number"==typeof t?0!==e.length?jStat.col(e,t):void 0:error.value},exports.COLUMNS=function(e){return 1!==arguments.length?error.na:e instanceof Array?0===e.length?0:jStat.cols(e):error.value},exports.CONFIDENCE={},exports.CONFIDENCE.NORM=function(e,t,n){return e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n)?error.value:jStat.normalci(1,e,t,n)[1]-1},exports.CONFIDENCE.T=function(e,t,n){return e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n)?error.value:jStat.tci(1,e,t,n)[1]-1},exports.CORREL=function(e,t){return e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t)?error.value:jStat.corrcoeff(e,t)},exports.COUNT=function(){return utils.numbers(utils.flatten(arguments)).length},exports.COUNTA=function(){var e=utils.flatten(arguments);return e.length-exports.COUNTBLANK(e)},exports.COUNTIN=function(e,t){var n=0;e=utils.flatten(e);for(var r=0;r=!]/.test(criteria)||(criteria='=="'+criteria+'"');for(var matches=0,i=0;i=!]/.test(criteria)||(criteria='=="'+criteria+'"');for(var j=0;j1?error.num:jStat.centralF.inv(e,t,n)},exports.F.INV.RT=function(e,t,n){return 3!==arguments.length?error.na:e<0||e>1||t<1||t>Math.pow(10,10)||n<1||n>Math.pow(10,10)?error.num:"number"!=typeof e||"number"!=typeof t||"number"!=typeof n?error.value:jStat.centralF.inv(1-e,t,n)},exports.F.TEST=function(e,t){if(!e||!t)return error.na;if(!(e instanceof Array&&t instanceof Array))return error.na;if(e.length<2||t.length<2)return error.div0;var n=function(e,t){for(var n=0,r=0;rt[i-1]&&e[a]<=t[i]&&(o[i]+=1):i===r&&e[a]>t[r-1]&&(o[r]+=1)}return o},exports.GAMMA=function(e){return e=utils.parseNumber(e),e instanceof Error?e:0===e?error.num:parseInt(e,10)===e&&e<0?error.num:jStat.gammafn(e)},exports.GAMMA.DIST=function(e,t,n,r){return 4!==arguments.length?error.na:e<0||t<=0||n<=0?error.value:"number"!=typeof e||"number"!=typeof t||"number"!=typeof n?error.value:r?jStat.gamma.cdf(e,t,n,!0):jStat.gamma.pdf(e,t,n,!1)},exports.GAMMA.INV=function(e,t,n){return 3!==arguments.length?error.na:e<0||e>1||t<=0||n<=0?error.num:"number"!=typeof e||"number"!=typeof t||"number"!=typeof n?error.value:jStat.gamma.inv(e,t,n)},exports.GAMMALN=function(e){return e=utils.parseNumber(e),e instanceof Error?e:jStat.gammaln(e)},exports.GAMMALN.PRECISE=function(e){return 1!==arguments.length?error.na:e<=0?error.num:"number"!=typeof e?error.value:jStat.gammaln(e)},exports.GAUSS=function(e){return e=utils.parseNumber(e),e instanceof Error?e:jStat.normal.cdf(e,0,1)-.5},exports.GEOMEAN=function(){var e=utils.parseNumberArray(utils.flatten(arguments));return e instanceof Error?e:jStat.geomean(e)},exports.GROWTH=function(e,t,n,r){if((e=utils.parseNumberArray(e))instanceof Error)return e;var o;if(void 0===t)for(t=[],o=1;o<=e.length;o++)t.push(o);if(void 0===n)for(n=[],o=1;o<=e.length;o++)n.push(o);if(t=utils.parseNumberArray(t),n=utils.parseNumberArray(n),utils.anyIsError(t,n))return error.value;void 0===r&&(r=!0);var i=e.length,a=0,s=0,l=0,u=0;for(o=0;oi&&(i=r[t],o=[]),r[t]===i&&(o[o.length]=t);return o},exports.MODE.SNGL=function(){var e=utils.parseNumberArray(utils.flatten(arguments));return e instanceof Error?e:exports.MODE.MULT(e).sort(function(e,t){return e-t})[0]},exports.NEGBINOM={},exports.NEGBINOM.DIST=function(e,t,n,r){return e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n)?error.value:r?jStat.negbin.cdf(e,t,n):jStat.negbin.pdf(e,t,n)},exports.NORM={},exports.NORM.DIST=function(e,t,n,r){return e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n)?error.value:n<=0?error.num:r?jStat.normal.cdf(e,t,n):jStat.normal.pdf(e,t,n)},exports.NORM.INV=function(e,t,n){return e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n)?error.value:jStat.normal.inv(e,t,n)},exports.NORM.S={},exports.NORM.S.DIST=function(e,t){return e=utils.parseNumber(e),e instanceof Error?error.value:t?jStat.normal.cdf(e,0,1):jStat.normal.pdf(e,0,1)},exports.NORM.S.INV=function(e){return e=utils.parseNumber(e),e instanceof Error?error.value:jStat.normal.inv(e,0,1)},exports.PEARSON=function(e,t){if(t=utils.parseNumberArray(utils.flatten(t)),e=utils.parseNumberArray(utils.flatten(e)),utils.anyIsError(t,e))return error.value;for(var n=jStat.mean(e),r=jStat.mean(t),o=e.length,i=0,a=0,s=0,l=0;l1-1/(n+1))return error.num;var r=t*(n+1)-1,o=Math.floor(r);return utils.cleanFloat(r===o?e[r]:e[o]+(r-o)*(e[o+1]-e[o]))},exports.PERCENTILE.INC=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumber(t),utils.anyIsError(e,t))return error.value;e=e.sort(function(e,t){return e-t});var n=e.length,r=t*(n-1),o=Math.floor(r);return utils.cleanFloat(r===o?e[r]:e[o]+(r-o)*(e[o+1]-e[o]))},exports.PERCENTRANK={},exports.PERCENTRANK.EXC=function(e,t,n){if(n=void 0===n?3:n,e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n))return error.value;e=e.sort(function(e,t){return e-t});for(var r=misc.UNIQUE.apply(null,e),o=e.length,i=r.length,a=Math.pow(10,n),s=0,l=!1,u=0;!l&&u=r[u]&&(t=r[u]&&(t=0?t[e.indexOf(n)]:0;for(var o=e.sort(function(e,t){return e-t}),i=o.length,a=0,s=0;s=n&&o[s]<=r&&(a+=t[e.indexOf(o[s])]);return a},exports.QUARTILE={},exports.QUARTILE.EXC=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumber(t),utils.anyIsError(e,t))return error.value;switch(t){case 1:return exports.PERCENTILE.EXC(e,.25);case 2:return exports.PERCENTILE.EXC(e,.5);case 3:return exports.PERCENTILE.EXC(e,.75);default:return error.num}},exports.QUARTILE.INC=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumber(t),utils.anyIsError(e,t))return error.value;switch(t){case 1:return exports.PERCENTILE.INC(e,.25);case 2:return exports.PERCENTILE.INC(e,.5);case 3:return exports.PERCENTILE.INC(e,.75);default:return error.num}},exports.RANK={},exports.RANK.AVG=function(e,t,n){if(e=utils.parseNumber(e),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t))return error.value;t=utils.flatten(t),n=n||!1,t=t.sort(n?function(e,t){return e-t}:function(e,t){return t-e});for(var r=t.length,o=0,i=0;i1?(2*t.indexOf(e)+o+1)/2:t.indexOf(e)+1},exports.RANK.EQ=function(e,t,n){return e=utils.parseNumber(e),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t)?error.value:(n=n||!1,t=t.sort(n?function(e,t){return e-t}:function(e,t){return t-e}),t.indexOf(e)+1)},exports.ROW=function(e,t){return 2!==arguments.length?error.na:t<0?error.num:e instanceof Array&&"number"==typeof t?0!==e.length?jStat.row(e,t):void 0:error.value},exports.ROWS=function(e){return 1!==arguments.length?error.na:e instanceof Array?0===e.length?0:jStat.rows(e):error.value},exports.RSQ=function(e,t){return e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t)?error.value:Math.pow(exports.PEARSON(e,t),2)},exports.SKEW=function(){var e=utils.parseNumberArray(utils.flatten(arguments));if(e instanceof Error)return e;for(var t=jStat.mean(e),n=e.length,r=0,o=0;o1||t<1?error.num:utils.anyIsError(e,t)?error.value:Math.abs(jStat.studentt.inv(e/2,t))},exports.T.TEST=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t))return error.value;var n,r=jStat.mean(e),o=jStat.mean(t),i=0,a=0;for(n=0;n-1;)e[t]="TRUE";for(var n=0;(n=e.indexOf(!1))>-1;)e[n]="FALSE";return e.join("")},t.DBCS=function(){throw new Error("DBCS is not implemented")},t.DOLLAR=function(e,t){if(t=void 0===t?2:t,e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t))return o.value;var n="";return t<=0?(e=Math.round(e*Math.pow(10,t))/Math.pow(10,t),n="($0,0)"):t>0&&(n="($0,0."+new Array(t+1).join("0")+")"),i(e).format(n)},t.EXACT=function(e,t){return 2!==arguments.length?o.na:e===t},t.FIND=function(e,t,n){return arguments.length<2?o.na:(n=void 0===n?0:n,t?t.indexOf(e,n-1)+1:null)},t.FIXED=function(e,t,n){if(t=void 0===t?2:t,n=void 0!==n&&n,e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t))return o.value;var a=n?"0":"0,0";return t<=0?e=Math.round(e*Math.pow(10,t))/Math.pow(10,t):t>0&&(a+="."+new Array(t+1).join("0")),i(e).format(a)},t.HTML2TEXT=function(e){var t="";return e&&(e instanceof Array?e.forEach(function(e){""!==t&&(t+="\n"),t+=e.replace(/<(?:.|\n)*?>/gm,"")}):t=e.replace(/<(?:.|\n)*?>/gm,"")),t},t.LEFT=function(e,t){return t=void 0===t?1:t,t=r.parseNumber(t),t instanceof Error||"string"!=typeof e?o.value:e?e.substring(0,t):null},t.LEN=function(e){return 0===arguments.length?o.error:"string"==typeof e?e?e.length:0:e.length?e.length:o.value},t.LOWER=function(e){return"string"!=typeof e?o.value:e?e.toLowerCase():e},t.MID=function(e,t,n){if(t=r.parseNumber(t),n=r.parseNumber(n),r.anyIsError(t,n)||"string"!=typeof e)return n;var o=t-1;return e.substring(o,o+n)},t.NUMBERVALUE=function(e,t,n){return t=void 0===t?".":t,n=void 0===n?",":n,Number(e.replace(t,".").replace(n,""))},t.PRONETIC=function(){throw new Error("PRONETIC is not implemented")},t.PROPER=function(e){return void 0===e||0===e.length?o.value:(!0===e&&(e="TRUE"),!1===e&&(e="FALSE"),isNaN(e)&&"number"==typeof e?o.value:("number"==typeof e&&(e=""+e),e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})))},t.REGEXEXTRACT=function(e,t){if(arguments.length<2)return o.na;var n=e.match(new RegExp(t));return n?n[n.length>1?n.length-1:0]:null},t.REGEXMATCH=function(e,t,n){if(arguments.length<2)return o.na;var r=e.match(new RegExp(t));return n?r:!!r},t.REGEXREPLACE=function(e,t,n){return arguments.length<3?o.na:e.replace(new RegExp(t),n)},t.REPLACE=function(e,t,n,i){return t=r.parseNumber(t),n=r.parseNumber(n),r.anyIsError(t,n)||"string"!=typeof e||"string"!=typeof i?o.value:e.substr(0,t-1)+i+e.substr(t-1+n)},t.REPT=function(e,t){return t=r.parseNumber(t),t instanceof Error?t:new Array(t+1).join(e)},t.RIGHT=function(e,t){return t=void 0===t?1:t,t=r.parseNumber(t),t instanceof Error?t:e?e.substring(e.length-t):o.na},t.SEARCH=function(e,t,n){var r;return"string"!=typeof e||"string"!=typeof t?o.value:(n=void 0===n?0:n,r=t.toLowerCase().indexOf(e.toLowerCase(),n-1)+1,0===r?o.value:r)},t.SPLIT=function(e,t){return e.split(t)},t.SUBSTITUTE=function(e,t,n,r){if(arguments.length<2)return o.na;if(!(e&&t&&n))return e;if(void 0===r)return e.replace(new RegExp(t,"g"),n);for(var i=0,a=0;e.indexOf(t,i)>0;)if(i=e.indexOf(t,i+1),++a===r)return e.substring(0,i)+n+e.substring(i+t.length)},t.T=function(e){return"string"==typeof e?e:""},t.TEXT=function(e,t){return e=r.parseNumber(e),r.anyIsError(e)?o.na:i(e).format(t)},t.TRIM=function(e){return"string"!=typeof e?o.value:e.replace(/ +/g," ").trim()},t.UNICHAR=t.CHAR,t.UNICODE=t.CODE,t.UPPER=function(e){return"string"!=typeof e?o.value:e.toUpperCase()},t.VALUE=function(e){if("string"!=typeof e)return o.value;var t=i().unformat(e);return void 0===t?0:t}},function(e,t,n){var r=n(0);t.CELL=function(){throw new Error("CELL is not implemented")},t.ERROR={},t.ERROR.TYPE=function(e){switch(e){case r.nil:return 1;case r.div0:return 2;case r.value:return 3;case r.ref:return 4;case r.name:return 5;case r.num:return 6;case r.na:return 7;case r.data:return 8}return r.na},t.INFO=function(){throw new Error("INFO is not implemented")},t.ISBLANK=function(e){return null===e},t.ISBINARY=function(e){return/^[01]{1,10}$/.test(e)},t.ISERR=function(e){return[r.value,r.ref,r.div0,r.num,r.name,r.nil].indexOf(e)>=0||"number"==typeof e&&(isNaN(e)||!isFinite(e))},t.ISERROR=function(e){return t.ISERR(e)||e===r.na},t.ISEVEN=function(e){return!(1&Math.floor(Math.abs(e)))},t.ISFORMULA=function(){throw new Error("ISFORMULA is not implemented")},t.ISLOGICAL=function(e){return!0===e||!1===e},t.ISNA=function(e){return e===r.na},t.ISNONTEXT=function(e){return"string"!=typeof e},t.ISNUMBER=function(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)},t.ISODD=function(e){return!!(1&Math.floor(Math.abs(e)))},t.ISREF=function(){throw new Error("ISREF is not implemented")},t.ISTEXT=function(e){return"string"==typeof e},t.N=function(e){return this.ISNUMBER(e)?e:e instanceof Date?e.getTime():!0===e?1:!1===e?0:this.ISERROR(e)?e:0},t.NA=function(){return r.na},t.SHEET=function(){throw new Error("SHEET is not implemented")},t.SHEETS=function(){throw new Error("SHEETS is not implemented")},t.TYPE=function(e){return this.ISNUMBER(e)?1:this.ISTEXT(e)?2:this.ISLOGICAL(e)?4:this.ISERROR(e)?16:Array.isArray(e)?64:void 0}},function(e,t,n){function r(e){return 1===new Date(e,1,29).getMonth()}function o(e,t){return Math.ceil((t-e)/1e3/60/60/24)}function i(e){return(e-l)/864e5+(e>-22038912e5?2:1)}var a=n(0),s=n(1),l=new Date(1900,0,1),u=[void 0,0,1,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,1,2,3,4,5,6,0],c=[[],[1,2,3,4,5,6,7],[7,1,2,3,4,5,6],[6,0,1,2,3,4,5],[],[],[],[],[],[],[],[7,1,2,3,4,5,6],[6,7,1,2,3,4,5],[5,6,7,1,2,3,4],[4,5,6,7,1,2,3],[3,4,5,6,7,1,2],[2,3,4,5,6,7,1],[1,2,3,4,5,6,7]],f=[[],[6,0],[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],void 0,void 0,void 0,[0,0],[1,1],[2,2],[3,3],[4,4],[5,5],[6,6]];t.DATE=function(e,t,n){return e=s.parseNumber(e),t=s.parseNumber(t),n=s.parseNumber(n),s.anyIsError(e,t,n)?a.value:e<0||t<0||n<0?a.num:new Date(e,t-1,n)},t.DATEVALUE=function(e){if("string"!=typeof e)return a.value;var t=Date.parse(e);return isNaN(t)?a.value:t<=-22038912e5?(t-l)/864e5+1:(t-l)/864e5+2},t.DAY=function(e){var t=s.parseDate(e);return t instanceof Error?t:t.getDate()},t.DAYS=function(e,t){return e=s.parseDate(e),t=s.parseDate(t),e instanceof Error?e:t instanceof Error?t:i(e)-i(t)},t.DAYS360=function(e,t,n){if(n=s.parseBool(n),e=s.parseDate(e),t=s.parseDate(t),e instanceof Error)return e;if(t instanceof Error)return t;if(n instanceof Error)return n;var r,o,i=e.getMonth(),a=t.getMonth();if(n)r=31===e.getDate()?30:e.getDate(),o=31===t.getDate()?30:t.getDate();else{var l=new Date(e.getFullYear(),i+1,0).getDate(),u=new Date(t.getFullYear(),a+1,0).getDate();r=e.getDate()===l?30:e.getDate(),t.getDate()===u?r<30?(a++,o=1):o=30:o=t.getDate()}return 360*(t.getFullYear()-e.getFullYear())+30*(a-i)+(o-r)},t.EDATE=function(e,t){return(e=s.parseDate(e))instanceof Error?e:isNaN(t)?a.value:(t=parseInt(t,10),e.setMonth(e.getMonth()+t),i(e))},t.EOMONTH=function(e,t){return(e=s.parseDate(e))instanceof Error?e:isNaN(t)?a.value:(t=parseInt(t,10),i(new Date(e.getFullYear(),e.getMonth()+t+1,0)))},t.HOUR=function(e){return e=s.parseDate(e),e instanceof Error?e:e.getHours()},t.INTERVAL=function(e){if("number"!=typeof e&&"string"!=typeof e)return a.value;e=parseInt(e,10);var t=Math.floor(e/94608e4);e%=94608e4;var n=Math.floor(e/2592e3);e%=2592e3;var r=Math.floor(e/86400);e%=86400;var o=Math.floor(e/3600);e%=3600;var i=Math.floor(e/60);e%=60;var s=e;return t=t>0?t+"Y":"",n=n>0?n+"M":"",r=r>0?r+"D":"",o=o>0?o+"H":"",i=i>0?i+"M":"",s=s>0?s+"S":"","P"+t+n+r+"T"+o+i+s},t.ISOWEEKNUM=function(e){if((e=s.parseDate(e))instanceof Error)return e;e.setHours(0,0,0),e.setDate(e.getDate()+4-(e.getDay()||7));var t=new Date(e.getFullYear(),0,1);return Math.ceil(((e-t)/864e5+1)/7)},t.MINUTE=function(e){return e=s.parseDate(e),e instanceof Error?e:e.getMinutes()},t.MONTH=function(e){return e=s.parseDate(e),e instanceof Error?e:e.getMonth()+1},t.NETWORKDAYS=function(e,t,n){return this.NETWORKDAYS.INTL(e,t,1,n)},t.NETWORKDAYS.INTL=function(e,t,n,r){if((e=s.parseDate(e))instanceof Error)return e;if((t=s.parseDate(t))instanceof Error)return t;if(!((n=void 0===n?f[1]:f[n])instanceof Array))return a.value;void 0===r?r=[]:r instanceof Array||(r=[r]);for(var o=0;o0?c.getUTCDay():c.getDay(),d=!1;h!==n[0]&&h!==n[1]||(d=!0);for(var p=0;pc||a===c&&i>=u))return(l===f&&r(l)||function(e,t){var n=e.getFullYear(),o=new Date(n,2,1);if(r(n)&&e=o)return!0;var i=t.getFullYear(),a=new Date(i,2,1);return r(i)&&t>=a&&e0?c=r+o+l(i-o.length):(a=+r<0?"-0":"0",t>0&&(a+="."),u=l(-1*i-1),s=(u+Math.abs(r)+o).substr(0,t),c=a+s),+i>0&&t>0&&(c+="."+l(t)),c}function c(e,t,n,r){var o,i,a=Math.pow(10,t);return e.toString().indexOf("e")>-1?(i=u(e,t),"-"===i.charAt(0)&&+i>=0&&(i=i.substr(1))):i=(n(e+"e+"+t)/a).toFixed(t),r&&(o=new RegExp("0{1,"+r+"}$"),i=i.replace(o,"")),i}function f(e,t,n){var r=t.replace(/\{[^\{\}]*\}/g,"");return r.indexOf("$")>-1?d(e,k[A].currency.symbol,t,n):r.indexOf("%")>-1?g(e,t,n):r.indexOf(":")>-1?v(e):w(e._value,t,n)}function h(e,t){var n,r,o,i,a,s=t,l=!1;if(t.indexOf(":")>-1)e._value=m(t);else if(t===I)e._value=0;else{for("."!==k[A].delimiters.decimal&&(t=t.replace(/\./g,"").replace(k[A].delimiters.decimal,".")),n=new RegExp("[^a-zA-Z]"+k[A].abbreviations.thousand+"(?:\\)|(\\"+k[A].currency.symbol+")?(?:\\))?)?$"),r=new RegExp("[^a-zA-Z]"+k[A].abbreviations.million+"(?:\\)|(\\"+k[A].currency.symbol+")?(?:\\))?)?$"),o=new RegExp("[^a-zA-Z]"+k[A].abbreviations.billion+"(?:\\)|(\\"+k[A].currency.symbol+")?(?:\\))?)?$"),i=new RegExp("[^a-zA-Z]"+k[A].abbreviations.trillion+"(?:\\)|(\\"+k[A].currency.symbol+")?(?:\\))?)?$"),a=1;a-1?l=Math.pow(1024,a):t.indexOf(T[a])>-1&&(l=Math.pow(1e3,a));var u=t.replace(/[^0-9\.]+/g,"");""===u?e._value=NaN:(e._value=(l||1)*(s.match(n)?Math.pow(10,3):1)*(s.match(r)?Math.pow(10,6):1)*(s.match(o)?Math.pow(10,9):1)*(s.match(i)?Math.pow(10,12):1)*(t.indexOf("%")>-1?.01:1)*((t.split("-").length+Math.min(t.split("(").length-1,t.split(")").length-1))%2?1:-1)*Number(u),e._value=l?Math.ceil(e._value):e._value)}return e._value}function d(e,t,n,r){var o,i,a=n,s=a.indexOf("$"),l=a.indexOf("("),u=a.indexOf("+"),c=a.indexOf("-"),f="",h="";if(-1===a.indexOf("$")?"infix"===k[A].currency.position?(h=t,k[A].currency.spaceSeparated&&(h=" "+h+" ")):k[A].currency.spaceSeparated&&(f=" "):a.indexOf(" $")>-1?(f=" ",a=a.replace(" $","")):a.indexOf("$ ")>-1?(f=" ",a=a.replace("$ ","")):a=a.replace("$",""),i=w(e._value,a,r,h),-1===n.indexOf("$"))switch(k[A].currency.position){case"postfix":i.indexOf(")")>-1?(i=i.split(""),i.splice(-1,0,f+t),i=i.join("")):i=i+f+t;break;case"infix":break;case"prefix":i.indexOf("(")>-1||i.indexOf("-")>-1?(i=i.split(""),o=Math.max(l,c)+1,i.splice(o,0,t+f),i=i.join("")):i=t+f+i;break;default:throw Error('Currency position should be among ["prefix", "infix", "postfix"]')}else s<=1?i.indexOf("(")>-1||i.indexOf("+")>-1||i.indexOf("-")>-1?(i=i.split(""),o=1,(s-1?(i=i.split(""),i.splice(-1,0,f+t),i=i.join("")):i=i+f+t;return i}function p(e,t,n,r){return d(e,t,n,r)}function g(e,t,n){var r,o="",i=100*e._value;return t.indexOf(" %")>-1?(o=" ",t=t.replace(" %","")):t=t.replace("%",""),r=w(i,t,n),r.indexOf(")")>-1?(r=r.split(""),r.splice(-1,0,o+"%"),r=r.join("")):r=r+o+"%",r}function v(e){var t=Math.floor(e._value/60/60),n=Math.floor((e._value-60*t*60)/60),r=Math.round(e._value-60*t*60-60*n);return t+":"+(n<10?"0"+n:n)+":"+(r<10?"0"+r:r)}function m(e){var t=e.split(":"),n=0;return 3===t.length?(n+=60*Number(t[0])*60,n+=60*Number(t[1]),n+=Number(t[2])):2===t.length&&(n+=60*Number(t[0]),n+=Number(t[1])),Number(n)}function y(e,t,n){var r,o,i,a=t[0],s=Math.abs(e);if(s>=n){for(r=1;r=o&&s-1?(O=!0,t=t.slice(1,-1)):t.indexOf("+")>-1&&(S=!0,t=t.replace(/\+/g,"")),t.indexOf("a")>-1&&(p=t.split(".")[0].match(/[0-9]+/g)||["0"],p=parseInt(p[0],10),N=t.indexOf("aK")>=0,D=t.indexOf("aM")>=0,P=t.indexOf("aB")>=0,x=t.indexOf("aT")>=0,L=N||D||P||x,t.indexOf(" a")>-1?(R=" ",t=t.replace(" a","")):t=t.replace("a",""),a=s(e),f=a%3,f=0===f?3:f,p&&0!==F&&(h=3*~~((Math.min(p,a)-f)/3),F/=Math.pow(10,h)),a!==p&&(F>=Math.pow(10,12)&&!L||x?(R+=k[A].abbreviations.trillion,e/=Math.pow(10,12)):F=Math.pow(10,9)&&!L||P?(R+=k[A].abbreviations.billion,e/=Math.pow(10,9)):F=Math.pow(10,6)&&!L||D?(R+=k[A].abbreviations.million,e/=Math.pow(10,6)):(F=Math.pow(10,3)&&!L||N)&&(R+=k[A].abbreviations.thousand,e/=Math.pow(10,3))),u=s(e),p&&u-1){t.indexOf(" "+o.marker)>-1&&(H=" "),t=t.replace(H+o.marker,""),i=y(e,o.suffixes,o.scale),e=i.value,H+=i.suffix;break}if(t.indexOf("o")>-1&&(t.indexOf(" o")>-1?(j=" ",t=t.replace(" o","")):t=t.replace("o",""),k[A].ordinal&&(j+=k[A].ordinal(e))),t.indexOf("[.]")>-1&&(T=!0,t=t.replace("[.]",".")),g=t.split(".")[1],w=t.indexOf(","),g){var z=[];if(-1!==g.indexOf("*")?(V=e.toString(),z=V.split("."),z.length>1&&(V=c(e,z[1].length,n))):g.indexOf("[")>-1?(g=g.replace("]",""),g=g.split("["),V=c(e,g[0].length+g[1].length,n,g[1].length)):V=c(e,g.length,n),z=V.split("."),d=z[0],z.length>1&&z[1].length){V=(r?R+r:k[A].delimiters.decimal)+z[1]}else V="";T&&0===Number(V.slice(1))&&(V="")}else d=c(e,0,n);return d.indexOf("-")>-1&&(d=d.slice(1),W=!0),d.length<_&&(d=l(_-d.length)+d),w>-1&&(d=d.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+k[A].delimiters.thousands)),0===t.indexOf(".")&&(d=""),b=t.indexOf("("),C=t.indexOf("-"),U=br?n:r},-1/0)}var O,S=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],T=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],R={general:{scale:1024,suffixes:T,marker:"bd"},binary:{scale:1024,suffixes:S,marker:"b"},decimal:{scale:1e3,suffixes:T,marker:"d"}},M=[R.general,R.binary,R.decimal],k={},N=k,A="en-US",I=null,D="0,0",P="0$",x=void 0!==e&&e.exports,L={delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$",position:"prefix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00"}};O=function(e){return e=O.isNumbro(e)?e.value():"string"==typeof e||"number"==typeof e?O.fn.unformat(e):NaN,new a(Number(e))},O.version="1.11.1",O.isNumbro=function(e){return e instanceof a},O.setLanguage=function(e,t){console.warn("`setLanguage` is deprecated since version 1.6.0. Use `setCulture` instead");var n=e,r=e.split("-")[0],o=null;N[n]||(Object.keys(N).forEach(function(e){o||e.split("-")[0]!==r||(o=e)}),n=o||t||"en-US"),C(n)},O.setCulture=function(e,t){var n=e,r=e.split("-")[1],o=null;k[n]||(r&&Object.keys(k).forEach(function(e){o||e.split("-")[1]!==r||(o=e)}),n=o||t||"en-US"),C(n)},O.language=function(e,t){if(console.warn("`language` is deprecated since version 1.6.0. Use `culture` instead"),!e)return A;if(e&&!t){if(!N[e])throw new Error("Unknown language : "+e);C(e)}return!t&&N[e]||b(e,t),O},O.culture=function(e,t){if(!e)return A;if(e&&!t){if(!k[e])throw new Error("Unknown culture : "+e);C(e)}return!t&&k[e]||b(e,t),O},O.languageData=function(e){if(console.warn("`languageData` is deprecated since version 1.6.0. Use `cultureData` instead"),!e)return N[A];if(!N[e])throw new Error("Unknown language : "+e);return N[e]},O.cultureData=function(e){if(!e)return k[A];if(!k[e])throw new Error("Unknown culture : "+e);return k[e]},O.culture("en-US",L),O.languages=function(){return console.warn("`languages` is deprecated since version 1.6.0. Use `cultures` instead"),N},O.cultures=function(){return k},O.zeroFormat=function(e){I="string"==typeof e?e:null},O.defaultFormat=function(e){D="string"==typeof e?e:"0.0"},O.defaultCurrencyFormat=function(e){P="string"==typeof e?e:"0$"},O.validate=function(e,t){var n,r,o,i,a,s,l,u;if("string"!=typeof e&&(e+="",console.warn&&console.warn("Numbro.js: Value is not string. It has been co-erced to: ",e)),e=e.trim(),e=e.replace(/^[+-]?/,""),e.match(/^\d+$/))return!0;if(""===e)return!1;try{l=O.cultureData(t)}catch(e){l=O.cultureData(O.culture())}return o=l.currency.symbol,a=l.abbreviations,n=l.delimiters.decimal,r="."===l.delimiters.thousands?"\\.":l.delimiters.thousands,(null===(u=e.match(/^[^\d\.\,]+/))||(e=e.substr(1),u[0]===o))&&((null===(u=e.match(/[^\d]+$/))||(e=e.slice(0,-1),u[0]===a.thousand||u[0]===a.million||u[0]===a.billion||u[0]===a.trillion))&&(s=new RegExp(r+"{2}"),!e.match(/[^\d.,]/g)&&(i=e.split(n),!(i.length>2)&&(i.length<2?!!i[0].match(/^\d+.*\d$/)&&!i[0].match(s):""===i[0]?!i[0].match(s)&&!!i[1].match(/^\d+$/):1===i[0].length?!!i[0].match(/^\d+$/)&&!i[0].match(s)&&!!i[1].match(/^\d+$/):!!i[0].match(/^\d+.*\d$/)&&!i[0].match(s)&&!!i[1].match(/^\d+$/)))))},O.loadLanguagesInNode=function(){console.warn("`loadLanguagesInNode` is deprecated since version 1.6.0. Use `loadCulturesInNode` instead"),O.loadCulturesInNode()},O.loadCulturesInNode=function(){var e=n(27);for(var t in e)t&&O.culture(t,e[t])},"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(e,t){if(null===this||void 0===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof e)throw new TypeError(e+" is not a function");var n,r,o=this.length>>>0,i=!1;for(1n;++n)this.hasOwnProperty(n)&&(i?r=e(r,this[n],n,this):(r=this[n],i=!0));if(!i)throw new TypeError("Reduce of empty array with no initial value");return r}),O.fn=a.prototype={clone:function(){return O(this)},format:function(e,t){return f(this,e||D,void 0!==t?t:Math.round)},formatCurrency:function(e,t){return d(this,k[A].currency.symbol,e||P,void 0!==t?t:Math.round)},formatForeignCurrency:function(e,t,n){return p(this,e,t||P,void 0!==n?n:Math.round)},unformat:function(e){if("number"==typeof e)return e;if("string"==typeof e){var t=h(this,e);return isNaN(t)?void 0:t}},binaryByteUnits:function(){return y(this._value,R.binary.suffixes,R.binary.scale).suffix},byteUnits:function(){return y(this._value,R.general.suffixes,R.general.scale).suffix},decimalByteUnits:function(){return y(this._value,R.decimal.suffixes,R.decimal.scale).suffix},value:function(){return this._value},valueOf:function(){return this._value},set:function(e){return this._value=Number(e),this},add:function(e){function t(e,t){return e+n*t}var n=E.call(null,this._value,e);return this._value=[this._value,e].reduce(t,0)/n,this},subtract:function(e){function t(e,t){return e-n*t}var n=E.call(null,this._value,e);return this._value=[e].reduce(t,this._value*n)/n,this},multiply:function(e){function t(e,t){var n=E(e,t),r=e*n;return r*=t*n,r/=n*n}return this._value=[this._value,e].reduce(t,1),this},divide:function(e){function t(e,t){var n=E(e,t);return e*n/(t*n)}return this._value=[this._value,e].reduce(t),this},difference:function(e){return Math.abs(O(this._value).subtract(e).value())}},function(){return void 0!==r&&void 0===r.browser&&r.title&&(-1!==r.title.indexOf("node")||r.title.indexOf("meteor-tool")>0||"grunt"===r.title||"gulp"===r.title)&&!0}()&&O.loadCulturesInNode(),x?e.exports=O:("undefined"==typeof ender&&(this.numbro=O),o=[],void 0!==(i=function(){return O}.apply(t,o))&&(e.exports=i))}).call("undefined"==typeof window?this:window)}).call(t,n(10))},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function i(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function a(){g&&d&&(g=!1,d.length?p=d.concat(p):v=-1,p.length&&s())}function s(){if(!g){var e=o(a);g=!0;for(var t=p.length;t;){for(d=p,p=[];++v1)for(var n=1;nn?t:n;return e.pow(10,17-~~(e.log(r>0?r:-r)*e.LOG10E))}function r(e){return"[object Function]"===d.call(e)}function o(e){return"number"==typeof e&&e===e}function a(e){return f.apply([],e)}function s(){return new s._init(arguments)}function l(){return 0}function u(){return 1}function c(e,t){return e===t?1:0}var f=Array.prototype.concat,h=Array.prototype.slice,d=Object.prototype.toString,p=Array.isArray||function(e){return"[object Array]"===d.call(e)};s.fn=s.prototype,s._init=function(e){var t;if(p(e[0]))if(p(e[0][0])){r(e[1])&&(e[0]=s.map(e[0],e[1]));for(var t=0;t=0;t--,r++)n[r]=[e[r][t]];return n},s.transpose=function(e){var t,n,r,o,i,a=[];p(e[0])||(e=[e]),n=e.length,r=e[0].length;for(var i=0;i0&&(a[r][0]=e[r][0]),s=1;sn&&r>0)return[];if(r>0)for(i=e;in;i+=r)o.push(i);return o},s.slice=function(){function e(e,n,r,o){var i,a=[],l=e.length;if(n===t&&r===t&&o===t)return s.copy(e);if(n=n||0,r=r||e.length,n=n>=0?n:l+n,r=r>=0?r:l+r,o=o||1,n===r||0===o)return[];if(nr&&o>0)return[];if(o>0)for(i=n;ir;i+=o)a.push(e[i]);return a}function n(t,n){if(n=n||{},o(n.row)){if(o(n.col))return t[n.row][n.col];var r=s.rowa(t,n.row),i=n.col||{};return e(r,i.start,i.end,i.step)}if(o(n.col)){var a=s.cola(t,n.col),l=n.row||{};return e(a,l.start,l.end,l.step)}var l=n.row||{},i=n.col||{};return e(t,l.start,l.end,l.step).map(function(t){return e(t,i.start,i.end,i.step)})}return n}(),s.sliceAssign=function(n,r,i){if(o(r.row)){if(o(r.col))return n[r.row][r.col]=i;r.col=r.col||{},r.col.start=r.col.start||0,r.col.end=r.col.end||n[0].length,r.col.step=r.col.step||1;var a=s.arange(r.col.start,e.min(n.length,r.col.end),r.col.step),l=r.row;return a.forEach(function(e,t){n[l][e]=i[t]}),n}if(o(r.col)){r.row=r.row||{},r.row.start=r.row.start||0,r.row.end=r.row.end||n.length,r.row.step=r.row.step||1;var u=s.arange(r.row.start,e.min(n[0].length,r.row.end),r.row.step),c=r.col;return u.forEach(function(e,t){n[e][c]=i[t]}),n}i[0].length===t&&(i=[i]),r.row.start=r.row.start||0,r.row.end=r.row.end||n.length,r.row.step=r.row.step||1,r.col.start=r.col.start||0,r.col.end=r.col.end||n[0].length,r.col.step=r.col.step||1;var u=s.arange(r.row.start,e.min(n.length,r.row.end),r.row.step),a=s.arange(r.col.start,e.min(n[0].length,r.col.end),r.col.step);return u.forEach(function(e,t){a.forEach(function(r,o){n[e][r]=i[t][o]})}),n},s.diagonal=function(e){var t=s.zeros(e.length,e.length);return e.forEach(function(e,n){t[n][n]=e}),t},s.copy=function(e){return e.map(function(e){return o(e)?e:e.map(function(e){return e})})};var g=s.prototype;return g.length=0,g.push=Array.prototype.push,g.sort=Array.prototype.sort,g.splice=Array.prototype.splice,g.slice=Array.prototype.slice,g.toArray=function(){return this.length>1?h.call(this):h.call(this)[0]},g.map=function(e,t){return s(s.map(this,e,t))},g.cumreduce=function(e,t){return s(s.cumreduce(this,e,t))},g.alter=function(e){return s.alter(this,e),this},function(e){for(var t=0;t=0;)t+=e[n];return t},e.sumsqrd=function(e){for(var t=0,n=e.length;--n>=0;)t+=e[n]*e[n];return t},e.sumsqerr=function(t){for(var n,r=e.mean(t),o=0,i=t.length;--i>=0;)n=t[i]-r,o+=n*n;return o},e.sumrow=function(e){for(var t=0,n=e.length;--n>=0;)t+=e[n];return t},e.product=function(e){for(var t=1,n=e.length;--n>=0;)t*=e[n];return t},e.min=function(e){for(var t=e[0],n=0;++nt&&(t=e[n]);return t},e.unique=function(e){for(var t={},n=[],r=0;ra?(l=[o[t]],a=i,s=0):i===a&&(l.push(o[t]),s++),i=1);return 0===s?l[0]:l},e.range=function(t){return e.max(t)-e.min(t)},e.variance=function(t,n){return e.sumsqerr(t)/(t.length-(n?1:0))},e.pooledvariance=function(t){return t.reduce(function(t,n){return t+e.sumsqerr(n)},0)/(t.reduce(function(e,t){return e+t.length},0)-t.length)},e.deviation=function(t){for(var n=e.mean(t),r=t.length,o=new Array(r),i=0;i=0;i--)o.push(t.abs(n[i]-r));return e.mean(o)},e.meddev=function(n){for(var r=e.median(n),o=[],i=n.length-1;i>=0;i--)o.push(t.abs(n[i]-r));return e.median(o)},e.coeffvar=function(t){return e.stdev(t)/e.mean(t)},e.quartiles=function(e){var r=e.length,o=e.slice().sort(n);return[o[t.round(r/4)-1],o[t.round(r/2)-1],o[t.round(3*r/4)-1]]},e.quantiles=function(e,o,i,a){var s,l,u,c,f,h,d=e.slice().sort(n),p=[o.length],g=e.length;void 0===i&&(i=3/8),void 0===a&&(a=3/8);for(var s=0;s1){for(l=!0===n?this:this.transpose();s1){for("sumrow"!==t&&(l=!0===n?this:this.transpose());s1){for(a=a.transpose();rh)for(var n=0;n=1?n:1/n)+.4*n+17);if(r<0||n<=0)return NaN;if(r170||r>170?t.exp(e.combinationln(n,r)):e.factorial(n)/e.factorial(r)/e.factorial(n-r)},e.combinationln=function(t,n){return e.factorialln(t)-e.factorialln(n)-e.factorialln(t-n)},e.permutation=function(t,n){return e.factorial(t)/e.factorial(t-n)},e.betafn=function(n,r){if(!(n<=0||r<=0))return n+r>170?t.exp(e.betaln(n,r)):e.gammafn(n)*e.gammafn(r)/e.gammafn(n+r)},e.betaln=function(t,n){return e.gammaln(t)+e.gammaln(n)-e.gammaln(t+n)},e.betacf=function(e,n,r){var o,i,a,s,l=1,u=n+r,c=n+1,f=n-1,h=1,d=1-u*e/c;for(t.abs(d)<1e-30&&(d=1e-30),d=1/d,s=d;l<=100&&(o=2*l,i=l*(r-l)*e/((f+o)*(n+o)),d=1+i*d,t.abs(d)<1e-30&&(d=1e-30),h=1+i/h,t.abs(h)<1e-30&&(h=1e-30),d=1/d,s*=d*h,i=-(n+l)*(u+l)*e/((n+o)*(c+o)),d=1+i*d,t.abs(d)<1e-30&&(d=1e-30),h=1+i/h,t.abs(h)<1e-30&&(h=1e-30),d=1/d,a=d*h,s*=a,!(t.abs(a-1)<3e-7));l++);return s},e.gammapinv=function(n,r){var o,i,a,s,l,u,c,f=0,h=r-1,d=e.gammaln(r);if(n>=1)return t.max(100,r+100*t.sqrt(r));if(n<=0)return 0;for(r>1?(u=t.log(h),c=t.exp(h*(u-1)-d),l=n<.5?n:1-n,a=t.sqrt(-2*t.log(l)),o=(2.30753+.27061*a)/(1+a*(.99229+.04481*a))-a,n<.5&&(o=-o),o=t.max(.001,r*t.pow(1-1/(9*r)-o/(3*t.sqrt(r)),3))):(a=1-r*(.253+.12*r),o=n1?c*t.exp(-(o-h)+h*(t.log(o)-u)):t.exp(-o+h*t.log(o)-d),s=i/a,o-=a=s/(1-.5*t.min(1,s*((r-1)/o-1))),o<=0&&(o=.5*(o+a)),t.abs(a)<1e-8*o)break}return o},e.erf=function(e){var n,r,o,i,a=[-1.3026537197817094,.6419697923564902,.019476473204185836,-.00956151478680863,-.000946595344482036,.000366839497852761,42523324806907e-18,-20278578112534e-18,-1624290004647e-18,130365583558e-17,1.5626441722e-8,-8.5238095915e-8,6.529054439e-9,5.059343495e-9,-9.91364156e-10,-2.27365122e-10,9.6467911e-11,2.394038e-12,-6.886027e-12,8.94487e-13,3.13092e-13,-1.12708e-13,3.81e-16,7.106e-15,-1.523e-15,-9.4e-17,1.21e-16,-2.8e-17],s=a.length-1,l=!1,u=0,c=0;for(e<0&&(e=-e,l=!0),n=2/(2+e),r=4*n-2;s>0;s--)o=u,u=r*u-c+a[s],c=o;return i=n*t.exp(-e*e+.5*(a[0]+r*u)-c),l?i-1:1-i},e.erfc=function(t){return 1-e.erf(t)},e.erfcinv=function(n){var r,o,i,a,s=0;if(n>=2)return-100;if(n<=0)return 100;for(a=n<1?n:2-n,i=t.sqrt(-2*t.log(a/2)),r=-.70711*((2.30753+.27061*i)/(1+i*(.99229+.04481*i))-i);s<2;s++)o=e.erfc(r)-a,r+=o/(1.1283791670955126*t.exp(-r*r)-r*o);return n<1?r:-r},e.ibetainv=function(n,r,o){var i,a,s,l,u,c,f,h,d,p,g,v=r-1,m=o-1,y=0;if(n<=0)return 0;if(n>=1)return 1;for(r>=1&&o>=1?(s=n<.5?n:1-n,l=t.sqrt(-2*t.log(s)),f=(2.30753+.27061*l)/(1+l*(.99229+.04481*l))-l,n<.5&&(f=-f),h=(f*f-3)/6,d=2/(1/(2*r-1)+1/(2*o-1)),p=f*t.sqrt(h+d)/d-(1/(2*o-1)-1/(2*r-1))*(h+5/6-2/(3*d)),f=r/(r+o*t.exp(2*p))):(i=t.log(r/(r+o)),a=t.log(o/(r+o)),l=t.exp(r*i)/r,u=t.exp(o*a)/o,p=l+u,f=n=1&&(f=.5*(f+l+1)),t.abs(l)<1e-8*f&&y>0)break}return f},e.ibeta=function(n,r,o){var i=0===n||1===n?0:t.exp(e.gammaln(r+o)-e.gammaln(r)-e.gammaln(o)+r*t.log(n)+o*t.log(1-n));return!(n<0||n>1)&&(n<(r+1)/(r+o+2)?i*e.betacf(n,r,o)/r:1-i*e.betacf(1-n,o,r)/o)},e.randn=function(n,r){var o,i,a,s,l;if(r||(r=n),n)return e.create(n,r,function(){return e.randn()});do{o=t.random(),i=1.7156*(t.random()-.5),a=o-.449871,s=t.abs(i)+.386595,l=a*a+s*(.196*s-.25472*a)}while(l>.27597&&(l>.27846||i*i>-4*t.log(o)*o*o));return i/o},e.randg=function(n,r,o){var i,a,s,l,u,c,f=n;if(o||(o=r),n||(n=1),r)return c=e.zeros(r,o),c.alter(function(){return e.randg(n)}),c;n<1&&(n+=1),i=n-1/3,a=1/t.sqrt(9*i);do{do{u=e.randn(),l=1+a*u}while(l<=0);l*=l*l,s=t.random()}while(s>1-.331*t.pow(u,4)&&t.log(s)>.5*u*u+i*(1-l+t.log(l)));if(n==f)return i*l;do{s=t.random()}while(0===s);return t.pow(s,1/f)*i*l},function(t){for(var n=0;n=8)return 1;var l=2*e.normal.cdf(s,0,1,1,0)-1;l=l>=t.exp(-50/o)?t.pow(l,o):0;var u;u=n>3?2:3;for(var c=s,f=(8-s)/u,h=c+f,d=0,p=o-1,g=1;g<=u;g++){for(var v=0,m=.5*(h+c),y=.5*(h-c),w=1;w<=12;w++){var b,C;660)break;var S=2*e.normal.cdf(E,0,1,1,0),T=2*e.normal.cdf(E,n,1,1,0),R=.5*S-.5*T;R>=t.exp(-30/p)&&(R=a[b-1]*t.exp(-.5*O)*t.pow(R,p),v+=R)}v*=2*y*o/t.sqrt(2*t.PI),d+=v,c=h,h+=f}return(l+=d)<=t.exp(-30/r)?0:(l=t.pow(l,r),l>=1?1:l)}function o(e,n,r){var o=.5-.5*e,i=t.sqrt(t.log(1/(o*o))),a=i+((((-453642210148e-16*i-.204231210125)*i-.342242088547)*i-1)*i+.322232421088)/((((.0038560700634*i+.10353775285)*i+.531103462366)*i+.588581570495)*i+.099348462606);r<120&&(a+=(a*a*a+a)/r/4);var s=.8832-.2368*a;return r<120&&(s+=-1.214/r+1.208*a/r),a*(s*t.log(n-1)+1.4142)}!function(t){for(var n=0;n1||n<0?0:1==r&&1==o?1:r<512&&o<512?t.pow(n,r-1)*t.pow(1-n,o-1)/e.betafn(r,o):t.exp((r-1)*t.log(n)+(o-1)*t.log(1-n)-e.betaln(r,o))},cdf:function(t,n,r){return t>1||t<0?1*(t>1):e.ibeta(t,n,r)},inv:function(t,n,r){return e.ibetainv(t,n,r)},mean:function(e,t){return e/(e+t)},median:function(t,n){return e.ibetainv(.5,t,n)},mode:function(e,t){return(e-1)/(e+t-2)},sample:function(t,n){var r=e.randg(t);return r/(r+e.randg(n))},variance:function(e,n){return e*n/(t.pow(e+n,2)*(e+n+1))}}),e.extend(e.centralF,{pdf:function(n,r,o){var i,a;return n<0?0:r<=2?0===n&&r<2?1/0:0===n&&2===r?1:1/e.betafn(r/2,o/2)*t.pow(r/o,r/2)*t.pow(n,r/2-1)*t.pow(1+r/o*n,-(r+o)/2):(i=r*n/(o+n*r),a=o/(o+n*r),r*a/2*e.binomial.pdf((r-2)/2,(r+o-2)/2,i))},cdf:function(t,n,r){return t<0?0:e.ibeta(n*t/(n*t+r),n/2,r/2)},inv:function(t,n,r){return r/(n*(1/e.ibetainv(t,n/2,r/2)-1))},mean:function(e,t){return t>2?t/(t-2):void 0},mode:function(e,t){return e>2?t*(e-2)/(e*(t+2)):void 0},sample:function(t,n){return 2*e.randg(t/2)/t/(2*e.randg(n/2)/n)},variance:function(e,t){if(!(t<=4))return 2*t*t*(e+t-2)/(e*(t-2)*(t-2)*(t-4))}}),e.extend(e.cauchy,{pdf:function(e,n,r){return r<0?0:r/(t.pow(e-n,2)+t.pow(r,2))/t.PI},cdf:function(e,n,r){return t.atan((e-n)/r)/t.PI+.5},inv:function(e,n,r){return n+r*t.tan(t.PI*(e-.5))},median:function(e,t){return e},mode:function(e,t){return e},sample:function(n,r){return e.randn()*t.sqrt(1/(2*e.randg(.5)))*r+n}}),e.extend(e.chisquare,{pdf:function(n,r){return n<0?0:0===n&&2===r?.5:t.exp((r/2-1)*t.log(n)-n/2-r/2*t.log(2)-e.gammaln(r/2))},cdf:function(t,n){return t<0?0:e.lowRegGamma(n/2,t/2)},inv:function(t,n){return 2*e.gammapinv(t,.5*n)},mean:function(e){return e},median:function(e){return e*t.pow(1-2/(9*e),3)},mode:function(e){return e-2>0?e-2:0},sample:function(t){return 2*e.randg(t/2)},variance:function(e){return 2*e}}),e.extend(e.exponential,{pdf:function(e,n){return e<0?0:n*t.exp(-n*e)},cdf:function(e,n){return e<0?0:1-t.exp(-n*e)},inv:function(e,n){return-t.log(1-e)/n},mean:function(e){return 1/e},median:function(e){return 1/e*t.log(2)},mode:function(e){return 0},sample:function(e){return-1/e*t.log(t.random())},variance:function(e){return t.pow(e,-2)}}),e.extend(e.gamma,{pdf:function(n,r,o){return n<0?0:0===n&&1===r?1/o:t.exp((r-1)*t.log(n)-n/o-e.gammaln(r)-r*t.log(o))},cdf:function(t,n,r){return t<0?0:e.lowRegGamma(n,t/r)},inv:function(t,n,r){return e.gammapinv(t,n)*r},mean:function(e,t){return e*t},mode:function(e,t){if(e>1)return(e-1)*t},sample:function(t,n){return e.randg(t)*n},variance:function(e,t){return e*t*t}}),e.extend(e.invgamma,{pdf:function(n,r,o){return n<=0?0:t.exp(-(r+1)*t.log(n)-o/n-e.gammaln(r)+r*t.log(o))},cdf:function(t,n,r){return t<=0?0:1-e.lowRegGamma(n,r/t)},inv:function(t,n,r){return r/e.gammapinv(1-t,n)},mean:function(e,t){return e>1?t/(e-1):void 0},mode:function(e,t){return t/(e+1)},sample:function(t,n){return n/e.randg(t)},variance:function(e,t){if(!(e<=2))return t*t/((e-1)*(e-1)*(e-2))}}),e.extend(e.kumaraswamy,{pdf:function(e,n,r){return 0===e&&1===n?r:1===e&&1===r?n:t.exp(t.log(n)+t.log(r)+(n-1)*t.log(e)+(r-1)*t.log(1-t.pow(e,n)))},cdf:function(e,n,r){return e<0?0:e>1?1:1-t.pow(1-t.pow(e,n),r)},inv:function(e,n,r){return t.pow(1-t.pow(1-e,1/r),1/n)},mean:function(t,n){return n*e.gammafn(1+1/t)*e.gammafn(n)/e.gammafn(1+1/t+n)},median:function(e,n){return t.pow(1-t.pow(2,-1/n),1/e)},mode:function(e,n){if(e>=1&&n>=1&&1!==e&&1!==n)return t.pow((e-1)/(e*n-1),1/e)},variance:function(e,t){throw new Error("variance not yet implemented")}}),e.extend(e.lognormal,{pdf:function(e,n,r){return e<=0?0:t.exp(-t.log(e)-.5*t.log(2*t.PI)-t.log(r)-t.pow(t.log(e)-n,2)/(2*r*r))},cdf:function(n,r,o){return n<0?0:.5+.5*e.erf((t.log(n)-r)/t.sqrt(2*o*o))},inv:function(n,r,o){return t.exp(-1.4142135623730951*o*e.erfcinv(2*n)+r)},mean:function(e,n){return t.exp(e+n*n/2)},median:function(e,n){return t.exp(e)},mode:function(e,n){return t.exp(e-n*n)},sample:function(n,r){return t.exp(e.randn()*r+n)},variance:function(e,n){return(t.exp(n*n)-1)*t.exp(2*e+n*n)}}),e.extend(e.noncentralt,{pdf:function(n,r,o){return t.abs(o)<1e-14?e.studentt.pdf(n,r):t.abs(n)<1e-14?t.exp(e.gammaln((r+1)/2)-o*o/2-.5*t.log(t.PI*r)-e.gammaln(r/2)):r/n*(e.noncentralt.cdf(n*t.sqrt(1+2/r),r+2,o)-e.noncentralt.cdf(n,r,o))},cdf:function(n,r,o){if(t.abs(o)<1e-14)return e.studentt.cdf(n,r);var i=!1;n<0&&(i=!0,o=-o);for(var a=e.normal.cdf(-o,0,1),s=1e-14+1,l=s,u=n*n/(n*n+r),c=0,f=t.exp(-o*o/2),h=t.exp(-o*o/2-.5*t.log(2)-e.gammaln(1.5))*o;c<200||l>1e-14||s>1e-14;)l=s,c>0&&(f*=o*o/(2*c),h*=o*o/(2*(c+.5))),s=f*e.beta.cdf(u,c+.5,r/2)+h*e.beta.cdf(u,c+1,r/2),a+=.5*s,c++;return i?1-a:a}}),e.extend(e.normal,{pdf:function(e,n,r){return t.exp(-.5*t.log(2*t.PI)-t.log(r)-t.pow(e-n,2)/(2*r*r))},cdf:function(n,r,o){return.5*(1+e.erf((n-r)/t.sqrt(2*o*o)))},inv:function(t,n,r){return-1.4142135623730951*r*e.erfcinv(2*t)+n},mean:function(e,t){return e},median:function(e,t){return e},mode:function(e,t){return e},sample:function(t,n){return e.randn()*n+t},variance:function(e,t){return t*t}}),e.extend(e.pareto,{pdf:function(e,n,r){return e1e100?1e100:r,1/(t.sqrt(r)*e.betafn(.5,r/2))*t.pow(1+n*n/r,-(r+1)/2)},cdf:function(n,r){var o=r/2;return e.ibeta((n+t.sqrt(n*n+r))/(2*t.sqrt(n*n+r)),o,o)},inv:function(n,r){var o=e.ibetainv(2*t.min(n,1-n),.5*r,.5);return o=t.sqrt(r*(1-o)/o),n>.5?o:-o},mean:function(e){return e>1?0:void 0},median:function(e){return 0},mode:function(e){return 0},sample:function(n){return e.randn()*t.sqrt(n/(2*e.randg(n/2)))},variance:function(e){return e>2?e/(e-2):e>1?1/0:void 0}}),e.extend(e.weibull,{pdf:function(e,n,r){return e<0||n<0||r<0?0:r/n*t.pow(e/n,r-1)*t.exp(-t.pow(e/n,r))},cdf:function(e,n,r){return e<0?0:1-t.exp(-t.pow(e/n,r))},inv:function(e,n,r){return n*t.pow(-t.log(1-e),1/r)},mean:function(t,n){return t*e.gammafn(1+1/n)},median:function(e,n){return e*t.pow(t.log(2),1/n)},mode:function(e,n){return n<=1?0:e*t.pow((n-1)/n,1/n)},sample:function(e,n){return e*t.pow(-t.log(t.random()),1/n)},variance:function(n,r){return n*n*e.gammafn(1+2/r)-t.pow(e.weibull.mean(n,r),2)}}),e.extend(e.uniform,{pdf:function(e,t,n){return en?0:1/(n-t)},cdf:function(e,t,n){return e>>0&&(n<0?0:e.combination(n+r-1,r-1)*t.pow(1-o,n)*t.pow(o,r))},cdf:function(t,n,r){var o=0,i=0;if(t<0)return 0;for(;i<=t;i++)o+=e.negbin.pdf(i,n,r);return o}}),e.extend(e.hypgeom,{pdf:function(n,r,o,i){if(n!==n|0)return!1;if(n<0||ni||n>o)return 0;if(2*o>r)return 2*i>r?e.hypgeom.pdf(r-o-i+n,r,r-o,r-i):e.hypgeom.pdf(i-n,r,r-o,i);if(2*i>r)return e.hypgeom.pdf(o-n,r,o,r-i);if(o1&&s=i||n>=o)return 1;if(2*o>r)return 2*i>r?e.hypgeom.cdf(r-o-i+n,r,r-o,r-i):1-e.hypgeom.cdf(i-n-1,r,r-o,i);if(2*i>r)return 1-e.hypgeom.cdf(o-n-1,r,o,r-i);if(o1&&lo);return r-1}}),e.extend(e.triangular,{pdf:function(e,t,n,r){return n<=t||rn?NaN:en?0:er?NaN:e<=n?0:e>=r?1:e<=o?t.pow(e-n,2)/((r-n)*(o-n)):1-t.pow(r-e,2)/((r-n)*(r-o))},inv:function(e,n,r,o){return r<=n||or?NaN:e<=(o-n)/(r-n)?n+(r-n)*t.sqrt(e*((o-n)/(r-n))):n+(r-n)*(1-t.sqrt((1-e)*(1-(o-n)/(r-n))))},mean:function(e,t,n){return(e+t+n)/3},median:function(e,n,r){return r<=(e+n)/2?n-t.sqrt((n-e)*(n-r))/t.sqrt(2):r>(e+n)/2?e+t.sqrt((n-e)*(r-e))/t.sqrt(2):void 0},mode:function(e,t,n){return n},sample:function(e,n,r){var o=t.random();return o<(r-e)/(n-e)?e+t.sqrt(o*(n-e)*(r-e)):n-t.sqrt((1-o)*(n-e)*(n-r))},variance:function(e,t,n){return(e*e+t*t+n*n-e*t-e*n-t*n)/18}}),e.extend(e.arcsine,{pdf:function(e,n,r){return r<=n?NaN:e<=n||e>=r?0:2/t.PI*t.pow(t.pow(r-n,2)-t.pow(2*e-n-r,2),-.5)},cdf:function(e,n,r){return e25e3)return r(n,1,a);var u,c=.5*i,f=c*t.log(i)-i*t.log(2)-e.gammaln(c),h=c-1,d=.25*i;u=i<=100?1:i<=800?.5:i<=5e3?.25:.125,f+=t.log(u);for(var p=0,g=1;g<=50;g++){for(var v=0,m=(2*g-1)*u,y=1;y<=16;y++){var w,b;8=-30){C=8=1&&v<=1e-14)break;p+=v}if(v>1e-14)throw new Error("tukey.cdf failed to converge");return p>1&&(p=1),p},inv:function(n,r,i){var a=r;if(i<2||a<2)return NaN;if(n<0||n>1)return NaN;if(0===n)return 0;if(1===n)return 1/0;var s,l=o(n,a,i),u=e.tukey.cdf(l,r,i)-n;s=u>0?t.max(0,l-1):l+1;for(var c,f=e.tukey.cdf(s,r,i)-n,h=1;h<50;h++){c=s-f*(s-l)/(f-u),u=f,l=s,c<0&&(c=0,f=-n),f=e.tukey.cdf(c,r,i)-n,s=c;if(t.abs(s-l)<1e-4)return c}throw new Error("tukey.inv failed to converge")}})}(e,Math),function(e,t){function n(t){return a(t)||t instanceof e}var o=Array.prototype.push,a=e.utils.isArray;e.extend({add:function(t,r){return n(r)?(n(r[0])||(r=[r]),e.map(t,function(e,t,n){return e+r[t][n]})):e.map(t,function(e){return e+r})},subtract:function(t,r){return n(r)?(n(r[0])||(r=[r]),e.map(t,function(e,t,n){return e-r[t][n]||0})):e.map(t,function(e){return e-r})},divide:function(t,r){return n(r)?(n(r[0])||(r=[r]),e.multiply(t,e.inv(r))):e.map(t,function(e){return e/r})},multiply:function(t,r){var o,i,a,s,l,u,c,f;if(void 0===t.length&&void 0===r.length)return t*r;if(l=t.length,u=t[0].length,c=e.zeros(l,a=n(r)?r[0].length:u),f=0,n(r)){for(;f=0;l--){for(d=0,u=l+1;u<=c-1;u++)d+=p[u]*n[l][u];p[l]=(n[l][o-1]-d)/n[l][l]}return p},gauss_jordan:function(n,r){for(var o=e.aug(n,r),i=o.length,a=o[0].length,s=0,l=0;lt.abs(o[u][l])&&(u=c);var f=o[l];o[l]=o[u],o[u]=f;for(var c=l+1;c=0;l--){s=o[l][l];for(var c=0;cl-1;h--)o[c][h]-=o[l][h]*o[c][l]/s;o[l][l]/=s;for(var h=i;hf?(d[c][f]=n[c][f],p[c][f]=g[c][f]=0):ci;)a=u,u=e.add(e.multiply(l,a),s),c++;return u},gauss_seidel:function(n,r,o,i){for(var a,s,l,u,c,f=0,h=n.length,d=[],p=[],g=[];fa?(d[f][a]=n[f][a],p[f][a]=g[f][a]=0):fi;)s=c,c=e.add(e.multiply(u,s),l),f+=1;return c},SOR:function(n,r,o,i,a){for(var s,l,u,c,f,h=0,d=n.length,p=[],g=[],v=[];hs?(p[h][s]=n[h][s],g[h][s]=v[h][s]=0):hi;)l=f,f=e.add(e.multiply(c,l),u),h++;return f},householder:function(n){for(var r,o,i,a,s,l=n.length,u=n[0].length,c=0,f=[],h=[];c0?-1:1,r=s*t.sqrt(r),o=t.sqrt((r*r-n[c+1][c]*r)/2),f=e.zeros(l,1),f[c+1][0]=(n[c+1][c]-r)/(2*o),i=c+2;i0?t.PI/4:-t.PI/4:t.atan(2*n[a][s]/(n[a][a]-n[s][s]))/2,c=e.identity(d,d),c[a][a]=t.cos(u),c[a][s]=-t.sin(u),c[s][a]=t.sin(u),c[s][s]=t.cos(u),p=e.multiply(p,c),r=e.multiply(e.multiply(e.inv(c),n),c),n=r,f=0;for(var o=1;o.001&&(f=1)}for(var o=0;o=f;)a=i(e,r+o),s=i(e,r),d[h]=(n[a]-2*n[s]+n[2*s-a])/(o*o),o/=2,h++;for(u=d.length,l=1;1!=u;){for(c=0;cr);o++);return o-=1,n[o]+(r-t[o])*h[o]+e.sq(r-t[o])*c[o]+(r-t[o])*e.sq(r-t[o])*d[o]},gauss_quadrature:function(){throw new Error("gauss_quadrature not yet implemented")},PCA:function(t){for(var n,r,o=t.length,i=t[0].length,a=0,s=[],l=[],u=[],c=[],f=[],h=[],d=[],p=[],g=[],v=[],a=0;a1||r>1||e<=0||r<=0)throw new Error("Proportions should be greater than 0 and less than 1");var i=(e*n+r*o)/(n+o);return(e-r)/t.sqrt(i*(1-i)*(1/n+1/o))}var r=[].slice,o=e.utils.isNumber,i=e.utils.isArray;e.extend({zscore:function(){var t=r.call(arguments);return o(t[1])?(t[0]-t[1])/t[2]:(t[0]-e.mean(t[1]))/e.stdev(t[1],t[2])},ztest:function(){var n,o=r.call(arguments);return i(o[1])?(n=e.zscore(o[0],o[1],o[3]),1===o[2]?e.normal.cdf(-t.abs(n),0,1):2*e.normal.cdf(-t.abs(n),0,1)):o.length>2?(n=e.zscore(o[0],o[1],o[2]),1===o[3]?e.normal.cdf(-t.abs(n),0,1):2*e.normal.cdf(-t.abs(n),0,1)):(n=o[0],1===o[1]?e.normal.cdf(-t.abs(n),0,1):2*e.normal.cdf(-t.abs(n),0,1))}}),e.extend(e.fn,{zscore:function(e,t){return(e-this.mean())/this.stdev(t)},ztest:function(n,r,o){var i=t.abs(this.zscore(n,o));return 1===r?e.normal.cdf(-i,0,1):2*e.normal.cdf(-i,0,1)}}),e.extend({tscore:function(){var n=r.call(arguments);return 4===n.length?(n[0]-n[1])/(n[2]/t.sqrt(n[3])):(n[0]-e.mean(n[1]))/(e.stdev(n[1],!0)/t.sqrt(n[1].length))},ttest:function(){var n,i=r.call(arguments);return 5===i.length?(n=t.abs(e.tscore(i[0],i[1],i[2],i[3])),1===i[4]?e.studentt.cdf(-n,i[3]-1):2*e.studentt.cdf(-n,i[3]-1)):o(i[1])?(n=t.abs(i[0]),1==i[2]?e.studentt.cdf(-n,i[1]-1):2*e.studentt.cdf(-n,i[1]-1)):(n=t.abs(e.tscore(i[0],i[1])),1==i[2]?e.studentt.cdf(-n,i[1].length-1):2*e.studentt.cdf(-n,i[1].length-1))}}),e.extend(e.fn,{tscore:function(e){return(e-this.mean())/(this.stdev(!0)/t.sqrt(this.cols()))},ttest:function(n,r){return 1===r?1-e.studentt.cdf(t.abs(this.tscore(n)),this.cols()-1):2*e.studentt.cdf(-t.abs(this.tscore(n)),this.cols()-1)}}),e.extend({anovafscore:function(){var n,o,i,a,s,l,u,c,f=r.call(arguments);if(1===f.length){s=new Array(f[0].length);for(var u=0;u.5?1-r:r)}),l=e.studentt.inv(.975,n.df_resid),u=n.coef.map(function(e,t){var n=l*i[t];return[e-n,e+n]});return{se:i,t:a,p:s,sigmaHat:o,interval95:u}}function o(t){var n=t.R2/t.df_model/((1-t.R2)/t.df_resid);return{F_statistic:n,pvalue:1-function(t,n,r){return e.beta.cdf(t/(r/n+t),n/2,r/2)}(n,t.df_model,t.df_resid)}}function i(e,t){var i=n(e,t),a=r(i),s=o(i),l=1-(i.nobs-1)/i.df_resid*(1-i.R2);return i.t=a,i.f=s,i.adjust_R2=l,i}return{ols:i}}(),e.jStat=e,e})},function(e,t,n){var r=n(1),o=n(9),i=n(0);t.UNIQUE=function(){for(var e=[],t=0;t=i.length?a.REPT("0",t-i.length)+i:o.num)},t.BIN2OCT=function(e,t){if(!r(e))return o.num;var n=e.toString();if(10===n.length&&"1"===n.substring(0,1))return(1073741312+parseInt(n.substring(1),2)).toString(8);var i=parseInt(e,2).toString(8);return void 0===t?i:isNaN(t)?o.value:t<0?o.num:(t=Math.floor(t),t>=i.length?a.REPT("0",t-i.length)+i:o.num)},t.BITAND=function(e,t){return e=s.parseNumber(e),t=s.parseNumber(t),s.anyIsError(e,t)?o.value:e<0||t<0?o.num:Math.floor(e)!==e||Math.floor(t)!==t?o.num:e>0xffffffffffff||t>0xffffffffffff?o.num:e&t},t.BITLSHIFT=function(e,t){return e=s.parseNumber(e),t=s.parseNumber(t),s.anyIsError(e,t)?o.value:e<0?o.num:Math.floor(e)!==e?o.num:e>0xffffffffffff?o.num:Math.abs(t)>53?o.num:t>=0?e<>-t},t.BITOR=function(e,t){return e=s.parseNumber(e),t=s.parseNumber(t),s.anyIsError(e,t)?o.value:e<0||t<0?o.num:Math.floor(e)!==e||Math.floor(t)!==t?o.num:e>0xffffffffffff||t>0xffffffffffff?o.num:e|t},t.BITRSHIFT=function(e,t){return e=s.parseNumber(e),t=s.parseNumber(t),s.anyIsError(e,t)?o.value:e<0?o.num:Math.floor(e)!==e?o.num:e>0xffffffffffff?o.num:Math.abs(t)>53?o.num:t>=0?e>>t:e<<-t},t.BITXOR=function(e,t){return e=s.parseNumber(e),t=s.parseNumber(t),s.anyIsError(e,t)?o.value:e<0||t<0?o.num:Math.floor(e)!==e||Math.floor(t)!==t?o.num:e>0xffffffffffff||t>0xffffffffffff?o.num:e^t},t.COMPLEX=function(e,t,n){if(e=s.parseNumber(e),t=s.parseNumber(t),s.anyIsError(e,t))return e;if("i"!==(n=void 0===n?"i":n)&&"j"!==n)return o.value;if(0===e&&0===t)return 0;if(0===e)return 1===t?n:t.toString()+n;if(0===t)return e.toString();var r=t>0?"+":"";return e.toString()+r+(1===t?n:t.toString()+n)},t.CONVERT=function(e,t,n){if((e=s.parseNumber(e))instanceof Error)return e;for(var r,i=[["a.u. of action","?",null,"action",!1,!1,1.05457168181818e-34],["a.u. of charge","e",null,"electric_charge",!1,!1,1.60217653141414e-19],["a.u. of energy","Eh",null,"energy",!1,!1,4.35974417757576e-18],["a.u. of length","a?",null,"length",!1,!1,5.29177210818182e-11],["a.u. of mass","m?",null,"mass",!1,!1,9.10938261616162e-31],["a.u. of time","?/Eh",null,"time",!1,!1,2.41888432650516e-17],["admiralty knot","admkn",null,"speed",!1,!0,.514773333],["ampere","A",null,"electric_current",!0,!1,1],["ampere per meter","A/m",null,"magnetic_field_intensity",!0,!1,1],["ångström","Å",["ang"],"length",!1,!0,1e-10],["are","ar",null,"area",!1,!0,100],["astronomical unit","ua",null,"length",!1,!1,1.49597870691667e-11],["bar","bar",null,"pressure",!1,!1,1e5],["barn","b",null,"area",!1,!1,1e-28],["becquerel","Bq",null,"radioactivity",!0,!1,1],["bit","bit",["b"],"information",!1,!0,1],["btu","BTU",["btu"],"energy",!1,!0,1055.05585262],["byte","byte",null,"information",!1,!0,8],["candela","cd",null,"luminous_intensity",!0,!1,1],["candela per square metre","cd/m?",null,"luminance",!0,!1,1],["coulomb","C",null,"electric_charge",!0,!1,1],["cubic ångström","ang3",["ang^3"],"volume",!1,!0,1e-30],["cubic foot","ft3",["ft^3"],"volume",!1,!0,.028316846592],["cubic inch","in3",["in^3"],"volume",!1,!0,16387064e-12],["cubic light-year","ly3",["ly^3"],"volume",!1,!0,8.46786664623715e-47],["cubic metre","m?",null,"volume",!0,!0,1],["cubic mile","mi3",["mi^3"],"volume",!1,!0,4168181825.44058],["cubic nautical mile","Nmi3",["Nmi^3"],"volume",!1,!0,6352182208],["cubic Pica","Pica3",["Picapt3","Pica^3","Picapt^3"],"volume",!1,!0,7.58660370370369e-8],["cubic yard","yd3",["yd^3"],"volume",!1,!0,.764554857984],["cup","cup",null,"volume",!1,!0,.0002365882365],["dalton","Da",["u"],"mass",!1,!1,1.66053886282828e-27],["day","d",["day"],"time",!1,!0,86400],["degree","°",null,"angle",!1,!1,.0174532925199433],["degrees Rankine","Rank",null,"temperature",!1,!0,.555555555555556],["dyne","dyn",["dy"],"force",!1,!0,1e-5],["electronvolt","eV",["ev"],"energy",!1,!0,1.60217656514141],["ell","ell",null,"length",!1,!0,1.143],["erg","erg",["e"],"energy",!1,!0,1e-7],["farad","F",null,"electric_capacitance",!0,!1,1],["fluid ounce","oz",null,"volume",!1,!0,295735295625e-16],["foot","ft",null,"length",!1,!0,.3048],["foot-pound","flb",null,"energy",!1,!0,1.3558179483314],["gal","Gal",null,"acceleration",!1,!1,.01],["gallon","gal",null,"volume",!1,!0,.003785411784],["gauss","G",["ga"],"magnetic_flux_density",!1,!0,1],["grain","grain",null,"mass",!1,!0,647989e-10],["gram","g",null,"mass",!1,!0,.001],["gray","Gy",null,"absorbed_dose",!0,!1,1],["gross registered ton","GRT",["regton"],"volume",!1,!0,2.8316846592],["hectare","ha",null,"area",!1,!0,1e4],["henry","H",null,"inductance",!0,!1,1],["hertz","Hz",null,"frequency",!0,!1,1],["horsepower","HP",["h"],"power",!1,!0,745.69987158227],["horsepower-hour","HPh",["hh","hph"],"energy",!1,!0,2684519.538],["hour","h",["hr"],"time",!1,!0,3600],["imperial gallon (U.K.)","uk_gal",null,"volume",!1,!0,.00454609],["imperial hundredweight","lcwt",["uk_cwt","hweight"],"mass",!1,!0,50.802345],["imperial quart (U.K)","uk_qt",null,"volume",!1,!0,.0011365225],["imperial ton","brton",["uk_ton","LTON"],"mass",!1,!0,1016.046909],["inch","in",null,"length",!1,!0,.0254],["international acre","uk_acre",null,"area",!1,!0,4046.8564224],["IT calorie","cal",null,"energy",!1,!0,4.1868],["joule","J",null,"energy",!0,!0,1],["katal","kat",null,"catalytic_activity",!0,!1,1],["kelvin","K",["kel"],"temperature",!0,!0,1],["kilogram","kg",null,"mass",!0,!0,1],["knot","kn",null,"speed",!1,!0,.514444444444444],["light-year","ly",null,"length",!1,!0,9460730472580800],["litre","L",["l","lt"],"volume",!1,!0,.001],["lumen","lm",null,"luminous_flux",!0,!1,1],["lux","lx",null,"illuminance",!0,!1,1],["maxwell","Mx",null,"magnetic_flux",!1,!1,1e-18],["measurement ton","MTON",null,"volume",!1,!0,1.13267386368],["meter per hour","m/h",["m/hr"],"speed",!1,!0,.00027777777777778],["meter per second","m/s",["m/sec"],"speed",!0,!0,1],["meter per second squared","m?s??",null,"acceleration",!0,!1,1],["parsec","pc",["parsec"],"length",!1,!0,0x6da012f958ee1c],["meter squared per second","m?/s",null,"kinematic_viscosity",!0,!1,1],["metre","m",null,"length",!0,!0,1],["miles per hour","mph",null,"speed",!1,!0,.44704],["millimetre of mercury","mmHg",null,"pressure",!1,!1,133.322],["minute","?",null,"angle",!1,!1,.000290888208665722],["minute","min",["mn"],"time",!1,!0,60],["modern teaspoon","tspm",null,"volume",!1,!0,5e-6],["mole","mol",null,"amount_of_substance",!0,!1,1],["morgen","Morgen",null,"area",!1,!0,2500],["n.u. of action","?",null,"action",!1,!1,1.05457168181818e-34],["n.u. of mass","m?",null,"mass",!1,!1,9.10938261616162e-31],["n.u. of speed","c?",null,"speed",!1,!1,299792458],["n.u. of time","?/(me?c??)",null,"time",!1,!1,1.28808866778687e-21],["nautical mile","M",["Nmi"],"length",!1,!0,1852],["newton","N",null,"force",!0,!0,1],["œrsted","Oe ",null,"magnetic_field_intensity",!1,!1,79.5774715459477],["ohm","Ω",null,"electric_resistance",!0,!1,1],["ounce mass","ozm",null,"mass",!1,!0,.028349523125],["pascal","Pa",null,"pressure",!0,!1,1],["pascal second","Pa?s",null,"dynamic_viscosity",!0,!1,1],["pferdestärke","PS",null,"power",!1,!0,735.49875],["phot","ph",null,"illuminance",!1,!1,1e-4],["pica (1/6 inch)","pica",null,"length",!1,!0,.00035277777777778],["pica (1/72 inch)","Pica",["Picapt"],"length",!1,!0,.00423333333333333],["poise","P",null,"dynamic_viscosity",!1,!1,.1],["pond","pond",null,"force",!1,!0,.00980665],["pound force","lbf",null,"force",!1,!0,4.4482216152605],["pound mass","lbm",null,"mass",!1,!0,.45359237],["quart","qt",null,"volume",!1,!0,.000946352946],["radian","rad",null,"angle",!0,!1,1],["second","?",null,"angle",!1,!1,484813681109536e-20],["second","s",["sec"],"time",!0,!0,1],["short hundredweight","cwt",["shweight"],"mass",!1,!0,45.359237],["siemens","S",null,"electrical_conductance",!0,!1,1],["sievert","Sv",null,"equivalent_dose",!0,!1,1],["slug","sg",null,"mass",!1,!0,14.59390294],["square ångström","ang2",["ang^2"],"area",!1,!0,1e-20],["square foot","ft2",["ft^2"],"area",!1,!0,.09290304],["square inch","in2",["in^2"],"area",!1,!0,64516e-8],["square light-year","ly2",["ly^2"],"area",!1,!0,8.95054210748189e31],["square meter","m?",null,"area",!0,!0,1],["square mile","mi2",["mi^2"],"area",!1,!0,2589988.110336],["square nautical mile","Nmi2",["Nmi^2"],"area",!1,!0,3429904],["square Pica","Pica2",["Picapt2","Pica^2","Picapt^2"],"area",!1,!0,1792111111111e-17],["square yard","yd2",["yd^2"],"area",!1,!0,.83612736],["statute mile","mi",null,"length",!1,!0,1609.344],["steradian","sr",null,"solid_angle",!0,!1,1],["stilb","sb",null,"luminance",!1,!1,1e-4],["stokes","St",null,"kinematic_viscosity",!1,!1,1e-4],["stone","stone",null,"mass",!1,!0,6.35029318],["tablespoon","tbs",null,"volume",!1,!0,147868e-10],["teaspoon","tsp",null,"volume",!1,!0,492892e-11],["tesla","T",null,"magnetic_flux_density",!0,!0,1],["thermodynamic calorie","c",null,"energy",!1,!0,4.184],["ton","ton",null,"mass",!1,!0,907.18474],["tonne","t",null,"mass",!1,!1,1e3],["U.K. pint","uk_pt",null,"volume",!1,!0,.00056826125],["U.S. bushel","bushel",null,"volume",!1,!0,.03523907],["U.S. oil barrel","barrel",null,"volume",!1,!0,.158987295],["U.S. pint","pt",["us_pt"],"volume",!1,!0,.000473176473],["U.S. survey mile","survey_mi",null,"length",!1,!0,1609.347219],["U.S. survey/statute acre","us_acre",null,"area",!1,!0,4046.87261],["volt","V",null,"voltage",!0,!1,1],["watt","W",null,"power",!0,!0,1],["watt-hour","Wh",["wh"],"energy",!1,!0,3600],["weber","Wb",null,"magnetic_flux",!0,!1,1],["yard","yd",null,"length",!1,!0,.9144],["year","yr",null,"time",!1,!0,31557600]],a={Yi:["yobi",80,1.2089258196146292e24,"Yi","yotta"],Zi:["zebi",70,0x400000000000000000,"Zi","zetta"],Ei:["exbi",60,0x1000000000000000,"Ei","exa"],Pi:["pebi",50,0x4000000000000,"Pi","peta"],Ti:["tebi",40,1099511627776,"Ti","tera"],Gi:["gibi",30,1073741824,"Gi","giga"],Mi:["mebi",20,1048576,"Mi","mega"],ki:["kibi",10,1024,"ki","kilo"]},l={Y:["yotta",1e24,"Y"],Z:["zetta",1e21,"Z"],E:["exa",1e18,"E"],P:["peta",1e15,"P"],T:["tera",1e12,"T"],G:["giga",1e9,"G"],M:["mega",1e6,"M"],k:["kilo",1e3,"k"],h:["hecto",100,"h"],e:["dekao",10,"e"],d:["deci",.1,"d"],c:["centi",.01,"c"],m:["milli",.001,"m"],u:["micro",1e-6,"u"],n:["nano",1e-9,"n"],p:["pico",1e-12,"p"],f:["femto",1e-15,"f"],a:["atto",1e-18,"a"],z:["zepto",1e-21,"z"],y:["yocto",1e-24,"y"]},u=null,c=null,f=t,h=n,d=1,p=1,g=0;g=0)&&(u=i[g]),(i[g][1]===h||r.indexOf(h)>=0)&&(c=i[g]);if(null===u){var v=a[t.substring(0,2)],m=l[t.substring(0,1)];"da"===t.substring(0,2)&&(m=["dekao",10,"da"]),v?(d=v[2],f=t.substring(2)):m&&(d=m[1],f=t.substring(m[2].length));for(var y=0;y=0)&&(u=i[y])}if(null===c){var w=a[n.substring(0,2)],b=l[n.substring(0,1)];"da"===n.substring(0,2)&&(b=["dekao",10,"da"]),w?(p=w[2],h=n.substring(2)):b&&(p=b[1],h=n.substring(b[2].length));for(var C=0;C=0)&&(c=i[C])}return null===u||null===c?o.na:u[3]!==c[3]?o.na:e*u[6]*d/(c[6]*p)},t.DEC2BIN=function(e,t){if((e=s.parseNumber(e))instanceof Error)return e;if(!/^-?[0-9]{1,3}$/.test(e)||e<-512||e>511)return o.num;if(e<0)return"1"+a.REPT("0",9-(512+e).toString(2).length)+(512+e).toString(2);var n=parseInt(e,10).toString(2);return void 0===t?n:isNaN(t)?o.value:t<0?o.num:(t=Math.floor(t),t>=n.length?a.REPT("0",t-n.length)+n:o.num)},t.DEC2HEX=function(e,t){if((e=s.parseNumber(e))instanceof Error)return e;if(!/^-?[0-9]{1,12}$/.test(e)||e<-549755813888||e>549755813887)return o.num;if(e<0)return(1099511627776+e).toString(16);var n=parseInt(e,10).toString(16);return void 0===t?n:isNaN(t)?o.value:t<0?o.num:(t=Math.floor(t),t>=n.length?a.REPT("0",t-n.length)+n:o.num)},t.DEC2OCT=function(e,t){if((e=s.parseNumber(e))instanceof Error)return e;if(!/^-?[0-9]{1,9}$/.test(e)||e<-536870912||e>536870911)return o.num;if(e<0)return(1073741824+e).toString(8);var n=parseInt(e,10).toString(8);return void 0===t?n:isNaN(t)?o.value:t<0?o.num:(t=Math.floor(t),t>=n.length?a.REPT("0",t-n.length)+n:o.num)},t.DELTA=function(e,t){return t=void 0===t?0:t,e=s.parseNumber(e),t=s.parseNumber(t),s.anyIsError(e,t)?o.value:e===t?1:0},t.ERF=function(e,t){return t=void 0===t?0:t,e=s.parseNumber(e),t=s.parseNumber(t),s.anyIsError(e,t)?o.value:i.erf(e)},t.ERF.PRECISE=function(){throw new Error("ERF.PRECISE is not implemented")},t.ERFC=function(e){return isNaN(e)?o.value:i.erfc(e)},t.ERFC.PRECISE=function(){throw new Error("ERFC.PRECISE is not implemented")},t.GESTEP=function(e,t){return t=t||0,e=s.parseNumber(e),s.anyIsError(t,e)?e:e>=t?1:0},t.HEX2BIN=function(e,t){if(!/^[0-9A-Fa-f]{1,10}$/.test(e))return o.num;var n=10===e.length&&"f"===e.substring(0,1).toLowerCase(),r=n?parseInt(e,16)-1099511627776:parseInt(e,16);if(r<-512||r>511)return o.num;if(n)return"1"+a.REPT("0",9-(512+r).toString(2).length)+(512+r).toString(2);var i=r.toString(2);return void 0===t?i:isNaN(t)?o.value:t<0?o.num:(t=Math.floor(t),t>=i.length?a.REPT("0",t-i.length)+i:o.num)},t.HEX2DEC=function(e){if(!/^[0-9A-Fa-f]{1,10}$/.test(e))return o.num;var t=parseInt(e,16);return t>=549755813888?t-1099511627776:t},t.HEX2OCT=function(e,t){if(!/^[0-9A-Fa-f]{1,10}$/.test(e))return o.num;var n=parseInt(e,16);if(n>536870911&&n<0xffe0000000)return o.num;if(n>=0xffe0000000)return(n-0xffc0000000).toString(8);var r=n.toString(8);return void 0===t?r:isNaN(t)?o.value:t<0?o.num:(t=Math.floor(t),t>=r.length?a.REPT("0",t-r.length)+r:o.num)},t.IMABS=function(e){var n=t.IMREAL(e),r=t.IMAGINARY(e);return s.anyIsError(n,r)?o.value:Math.sqrt(Math.pow(n,2)+Math.pow(r,2))},t.IMAGINARY=function(e){if(void 0===e||!0===e||!1===e)return o.value;if(0===e||"0"===e)return 0;if(["i","j"].indexOf(e)>=0)return 1;e=e.replace("+i","+1i").replace("-i","-1i").replace("+j","+1j").replace("-j","-1j");var t=e.indexOf("+"),n=e.indexOf("-");0===t&&(t=e.indexOf("+",1)),0===n&&(n=e.indexOf("-",1));var r=e.substring(e.length-1,e.length),i="i"===r||"j"===r;return t>=0||n>=0?i?t>=0?isNaN(e.substring(0,t))||isNaN(e.substring(t+1,e.length-1))?o.num:Number(e.substring(t+1,e.length-1)):isNaN(e.substring(0,n))||isNaN(e.substring(n+1,e.length-1))?o.num:-Number(e.substring(n+1,e.length-1)):o.num:i?isNaN(e.substring(0,e.length-1))?o.num:e.substring(0,e.length-1):isNaN(e)?o.num:0},t.IMARGUMENT=function(e){var n=t.IMREAL(e),r=t.IMAGINARY(e);return s.anyIsError(n,r)?o.value:0===n&&0===r?o.div0:0===n&&r>0?Math.PI/2:0===n&&r<0?-Math.PI/2:0===r&&n>0?0:0===r&&n<0?-Math.PI:n>0?Math.atan(r/n):n<0&&r>=0?Math.atan(r/n)+Math.PI:Math.atan(r/n)-Math.PI},t.IMCONJUGATE=function(e){var n=t.IMREAL(e),r=t.IMAGINARY(e);if(s.anyIsError(n,r))return o.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",0!==r?t.COMPLEX(n,-r,i):e},t.IMCOS=function(e){var n=t.IMREAL(e),r=t.IMAGINARY(e);if(s.anyIsError(n,r))return o.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.cos(n)*(Math.exp(r)+Math.exp(-r))/2,-Math.sin(n)*(Math.exp(r)-Math.exp(-r))/2,i)},t.IMCOSH=function(e){var n=t.IMREAL(e),r=t.IMAGINARY(e);if(s.anyIsError(n,r))return o.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.cos(r)*(Math.exp(n)+Math.exp(-n))/2,Math.sin(r)*(Math.exp(n)-Math.exp(-n))/2,i)},t.IMCOT=function(e){var n=t.IMREAL(e),r=t.IMAGINARY(e);return s.anyIsError(n,r)?o.value:t.IMDIV(t.IMCOS(e),t.IMSIN(e))},t.IMDIV=function(e,n){var r=t.IMREAL(e),i=t.IMAGINARY(e),a=t.IMREAL(n),l=t.IMAGINARY(n);if(s.anyIsError(r,i,a,l))return o.value;var u=e.substring(e.length-1),c=n.substring(n.length-1),f="i";if("j"===u?f="j":"j"===c&&(f="j"),0===a&&0===l)return o.num;var h=a*a+l*l;return t.COMPLEX((r*a+i*l)/h,(i*a-r*l)/h,f)},t.IMEXP=function(e){var n=t.IMREAL(e),r=t.IMAGINARY(e);if(s.anyIsError(n,r))return o.value;var i=e.substring(e.length-1);i="i"===i||"j"===i?i:"i";var a=Math.exp(n);return t.COMPLEX(a*Math.cos(r),a*Math.sin(r),i)},t.IMLN=function(e){var n=t.IMREAL(e),r=t.IMAGINARY(e);if(s.anyIsError(n,r))return o.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.log(Math.sqrt(n*n+r*r)),Math.atan(r/n),i)},t.IMLOG10=function(e){var n=t.IMREAL(e),r=t.IMAGINARY(e);if(s.anyIsError(n,r))return o.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.log(Math.sqrt(n*n+r*r))/Math.log(10),Math.atan(r/n)/Math.log(10),i)},t.IMLOG2=function(e){var n=t.IMREAL(e),r=t.IMAGINARY(e);if(s.anyIsError(n,r))return o.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.log(Math.sqrt(n*n+r*r))/Math.log(2),Math.atan(r/n)/Math.log(2),i)},t.IMPOWER=function(e,n){n=s.parseNumber(n);var r=t.IMREAL(e),i=t.IMAGINARY(e);if(s.anyIsError(n,r,i))return o.value;var a=e.substring(e.length-1);a="i"===a||"j"===a?a:"i";var l=Math.pow(t.IMABS(e),n),u=t.IMARGUMENT(e);return t.COMPLEX(l*Math.cos(n*u),l*Math.sin(n*u),a)},t.IMPRODUCT=function(){var e=arguments[0];if(!arguments.length)return o.value;for(var n=1;n=0)return 0;var t=e.indexOf("+"),n=e.indexOf("-");0===t&&(t=e.indexOf("+",1)),0===n&&(n=e.indexOf("-",1));var r=e.substring(e.length-1,e.length),i="i"===r||"j"===r;return t>=0||n>=0?i?t>=0?isNaN(e.substring(0,t))||isNaN(e.substring(t+1,e.length-1))?o.num:Number(e.substring(0,t)):isNaN(e.substring(0,n))||isNaN(e.substring(n+1,e.length-1))?o.num:Number(e.substring(0,n)):o.num:i?isNaN(e.substring(0,e.length-1))?o.num:0:isNaN(e)?o.num:e},t.IMSEC=function(e){if(!0===e||!1===e)return o.value;var n=t.IMREAL(e),r=t.IMAGINARY(e);return s.anyIsError(n,r)?o.value:t.IMDIV("1",t.IMCOS(e))},t.IMSECH=function(e){var n=t.IMREAL(e),r=t.IMAGINARY(e);return s.anyIsError(n,r)?o.value:t.IMDIV("1",t.IMCOSH(e))},t.IMSIN=function(e){var n=t.IMREAL(e),r=t.IMAGINARY(e);if(s.anyIsError(n,r))return o.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.sin(n)*(Math.exp(r)+Math.exp(-r))/2,Math.cos(n)*(Math.exp(r)-Math.exp(-r))/2,i)},t.IMSINH=function(e){var n=t.IMREAL(e),r=t.IMAGINARY(e);if(s.anyIsError(n,r))return o.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.cos(r)*(Math.exp(n)-Math.exp(-n))/2,Math.sin(r)*(Math.exp(n)+Math.exp(-n))/2,i)},t.IMSQRT=function(e){var n=t.IMREAL(e),r=t.IMAGINARY(e);if(s.anyIsError(n,r))return o.value;var i=e.substring(e.length-1);i="i"===i||"j"===i?i:"i";var a=Math.sqrt(t.IMABS(e)),l=t.IMARGUMENT(e);return t.COMPLEX(a*Math.cos(l/2),a*Math.sin(l/2),i)},t.IMCSC=function(e){if(!0===e||!1===e)return o.value;var n=t.IMREAL(e),r=t.IMAGINARY(e);return s.anyIsError(n,r)?o.num:t.IMDIV("1",t.IMSIN(e))},t.IMCSCH=function(e){if(!0===e||!1===e)return o.value;var n=t.IMREAL(e),r=t.IMAGINARY(e);return s.anyIsError(n,r)?o.num:t.IMDIV("1",t.IMSINH(e))},t.IMSUB=function(e,t){var n=this.IMREAL(e),r=this.IMAGINARY(e),i=this.IMREAL(t),a=this.IMAGINARY(t);if(s.anyIsError(n,r,i,a))return o.value;var l=e.substring(e.length-1),u=t.substring(t.length-1),c="i";return"j"===l?c="j":"j"===u&&(c="j"),this.COMPLEX(n-i,r-a,c)},t.IMSUM=function(){if(!arguments.length)return o.value;for(var e=s.flatten(arguments),t=e[0],n=1;n511)return o.num;if(n)return"1"+a.REPT("0",9-(512+r).toString(2).length)+(512+r).toString(2);var i=r.toString(2);return void 0===t?i:isNaN(t)?o.value:t<0?o.num:(t=Math.floor(t),t>=i.length?a.REPT("0",t-i.length)+i:o.num)},t.OCT2DEC=function(e){if(!/^[0-7]{1,10}$/.test(e))return o.num;var t=parseInt(e,8);return t>=536870912?t-1073741824:t},t.OCT2HEX=function(e,t){if(!/^[0-7]{1,10}$/.test(e))return o.num;var n=parseInt(e,8);if(n>=536870912)return"ff"+(n+3221225472).toString(16);var r=n.toString(16);return void 0===t?r:isNaN(t)?o.value:t<0?o.num:(t=Math.floor(t),t>=r.length?a.REPT("0",t-r.length)+r:o.num)}},function(e,t,n){"use strict";t.__esModule=!0,t.default=["ABS","ACCRINT","ACOS","ACOSH","ACOT","ACOTH","ADD","AGGREGATE","AND","ARABIC","ARGS2ARRAY","ASIN","ASINH","ATAN","ATAN2","ATANH","AVEDEV","AVERAGE","AVERAGEA","AVERAGEIF","AVERAGEIFS","BASE","BESSELI","BESSELJ","BESSELK","BESSELY","BETA.DIST","BETA.INV","BETADIST","BETAINV","BIN2DEC","BIN2HEX","BIN2OCT","BINOM.DIST","BINOM.DIST.RANGE","BINOM.INV","BINOMDIST","BITAND","BITLSHIFT","BITOR","BITRSHIFT","BITXOR","CEILING","CEILINGMATH","CEILINGPRECISE","CHAR","CHISQ.DIST","CHISQ.DIST.RT","CHISQ.INV","CHISQ.INV.RT","CHOOSE","CHOOSE","CLEAN","CODE","COLUMN","COLUMNS","COMBIN","COMBINA","COMPLEX","CONCATENATE","CONFIDENCE","CONFIDENCE.NORM","CONFIDENCE.T","CONVERT","CORREL","COS","COSH","COT","COTH","COUNT","COUNTA","COUNTBLANK","COUNTIF","COUNTIFS","COUNTIN","COUNTUNIQUE","COVARIANCE.P","COVARIANCE.S","CSC","CSCH","CUMIPMT","CUMPRINC","DATE","DATEVALUE","DAY","DAYS","DAYS360","DB","DDB","DEC2BIN","DEC2HEX","DEC2OCT","DECIMAL","DEGREES","DELTA","DEVSQ","DIVIDE","DOLLAR","DOLLARDE","DOLLARFR","E","EDATE","EFFECT","EOMONTH","EQ","ERF","ERFC","EVEN","EXACT","EXP","EXPON.DIST","EXPONDIST","F.DIST","F.DIST.RT","F.INV","F.INV.RT","FACT","FACTDOUBLE","FALSE","FDIST","FDISTRT","FIND","FINV","FINVRT","FISHER","FISHERINV","FIXED","FLATTEN","FLOOR","FORECAST","FREQUENCY","FV","FVSCHEDULE","GAMMA","GAMMA.DIST","GAMMA.INV","GAMMADIST","GAMMAINV","GAMMALN","GAMMALN.PRECISE","GAUSS","GCD","GEOMEAN","GESTEP","GROWTH","GTE","HARMEAN","HEX2BIN","HEX2DEC","HEX2OCT","HOUR","HTML2TEXT","HYPGEOM.DIST","HYPGEOMDIST","IF","IMABS","IMAGINARY","IMARGUMENT","IMCONJUGATE","IMCOS","IMCOSH","IMCOT","IMCSC","IMCSCH","IMDIV","IMEXP","IMLN","IMLOG10","IMLOG2","IMPOWER","IMPRODUCT","IMREAL","IMSEC","IMSECH","IMSIN","IMSINH","IMSQRT","IMSUB","IMSUM","IMTAN","INT","INTERCEPT","INTERVAL","IPMT","IRR","ISBINARY","ISBLANK","ISEVEN","ISLOGICAL","ISNONTEXT","ISNUMBER","ISODD","ISODD","ISOWEEKNUM","ISPMT","ISTEXT","JOIN","KURT","LARGE","LCM","LEFT","LEN","LINEST","LN","LOG","LOG10","LOGEST","LOGNORM.DIST","LOGNORM.INV","LOGNORMDIST","LOGNORMINV","LOWER","LT","LTE","MATCH","MAX","MAXA","MEDIAN","MID","MIN","MINA","MINUS","MINUTE","MIRR","MOD","MODE.MULT","MODE.SNGL","MODEMULT","MODESNGL","MONTH","MROUND","MULTINOMIAL","MULTIPLY","NE","NEGBINOM.DIST","NEGBINOMDIST","NETWORKDAYS","NOMINAL","NORM.DIST","NORM.INV","NORM.S.DIST","NORM.S.INV","NORMDIST","NORMINV","NORMSDIST","NORMSINV","NOT","NOW","NPER","NPV","NUMBERS","NUMERAL","OCT2BIN","OCT2DEC","OCT2HEX","ODD","OR","PDURATION","PEARSON","PERCENTILEEXC","PERCENTILEINC","PERCENTRANKEXC","PERCENTRANKINC","PERMUT","PERMUTATIONA","PHI","PI","PMT","POISSON.DIST","POISSONDIST","POW","POWER","PPMT","PROB","PRODUCT","PROPER","PV","QUARTILE.EXC","QUARTILE.INC","QUARTILEEXC","QUARTILEINC","QUOTIENT","RADIANS","RAND","RANDBETWEEN","RANK.AVG","RANK.EQ","RANKAVG","RANKEQ","RATE","REFERENCE","REGEXEXTRACT","REGEXMATCH","REGEXREPLACE","REPLACE","REPT","RIGHT","ROMAN","ROUND","ROUNDDOWN","ROUNDUP","ROW","ROWS","RRI","RSQ","SEARCH","SEC","SECH","SECOND","SERIESSUM","SIGN","SIN","SINH","SKEW","SKEW.P","SKEWP","SLN","SLOPE","SMALL","SPLIT","SPLIT","SQRT","SQRTPI","STANDARDIZE","STDEV.P","STDEV.S","STDEVA","STDEVP","STDEVPA","STDEVS","STEYX","SUBSTITUTE","SUBTOTAL","SUM","SUMIF","SUMIFS","SUMPRODUCT","SUMSQ","SUMX2MY2","SUMX2PY2","SUMXMY2","SWITCH","SYD","T","T.DIST","T.DIST.2T","T.DIST.RT","T.INV","T.INV.2T","TAN","TANH","TBILLEQ","TBILLPRICE","TBILLYIELD","TDIST","TDIST2T","TDISTRT","TEXT","TIME","TIMEVALUE","TINV","TINV2T","TODAY","TRANSPOSE","TREND","TRIM","TRIMMEAN","TRUE","TRUNC","UNICHAR","UNICODE","UNIQUE","UPPER","VALUE","VAR.P","VAR.S","VARA","VARP","VARPA","VARS","WEEKDAY","WEEKNUM","WEIBULL.DIST","WEIBULLDIST","WORKDAY","XIRR","XNPV","XOR","YEAR","YEARFRAC"]},function(e,t,n){"use strict";function r(e){var t=parseInt(e,10);return t=isNaN(t)?-1:Math.max(t-1,-1)}function o(e){var t="";return e>=0&&(t=""+(e+1)),t}function i(e){var t=0;if("string"==typeof e){e=e.toUpperCase();for(var n=0,r=e.length-1;n=0;)t=String.fromCharCode(e%c+97)+t,e=Math.floor(e/c)-1;return t.toUpperCase()}function s(e){if("string"!=typeof e||!f.test(e))return[];var t=e.toUpperCase().match(f),n=t[1],o=t[2],a=t[3],s=t[4];return[{index:r(s),label:s,isAbsolute:"$"===a},{index:i(o),label:o,isAbsolute:"$"===n}]}function l(e,t){var n=(e.isAbsolute?"$":"")+o(e.index);return(t.isAbsolute?"$":"")+a(t.index)+n}t.__esModule=!0,t.rowLabelToIndex=r,t.rowIndexToLabel=o,t.columnLabelToIndex=i,t.columnIndexToLabel=a,t.extractLabel=s,t.toLabel=l;var u="ABCDEFGHIJKLMNOPQRSTUVWXYZ",c=u.length,f=/^([$])?([A-Za-z]+)([$])?([0-9]+)$/},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.rowLabelToIndex=t.rowIndexToLabel=t.columnLabelToIndex=t.columnIndexToLabel=t.toLabel=t.extractLabel=t.error=t.Parser=t.ERROR_VALUE=t.ERROR_REF=t.ERROR_NUM=t.ERROR_NULL=t.ERROR_NOT_AVAILABLE=t.ERROR_NAME=t.ERROR_DIV_ZERO=t.ERROR=t.SUPPORTED_FORMULAS=void 0;var o=n(17),i=r(o),a=n(14),s=r(a),l=n(2),u=r(l),c=n(15);t.SUPPORTED_FORMULAS=s.default,t.ERROR=l.ERROR,t.ERROR_DIV_ZERO=l.ERROR_DIV_ZERO,t.ERROR_NAME=l.ERROR_NAME,t.ERROR_NOT_AVAILABLE=l.ERROR_NOT_AVAILABLE,t.ERROR_NULL=l.ERROR_NULL,t.ERROR_NUM=l.ERROR_NUM,t.ERROR_REF=l.ERROR_REF,t.ERROR_VALUE=l.ERROR_VALUE,t.Parser=i.default,t.error=u.default,t.extractLabel=c.extractLabel,t.toLabel=c.toLabel,t.columnIndexToLabel=c.columnIndexToLabel,t.columnLabelToIndex=c.columnLabelToIndex,t.rowIndexToLabel=c.rowIndexToLabel,t.rowLabelToIndex=c.rowLabelToIndex},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(18),l=r(s),u=n(19),c=r(u),f=n(41),h=n(43),d=n(3),p=n(2),g=r(p),v=n(15);t.default=function(e){function t(){o(this,t);var n=i(this,e.call(this));return n.parser=new f.Parser,n.parser.yy={toNumber:d.toNumber,trimEdges:h.trimEdges,invertNumber:d.invertNumber,throwError:function(e){return n._throwError(e)},callVariable:function(e){return n._callVariable(e)},evaluateByOperator:c.default,callFunction:function(e,t){return n._callFunction(e,t)},cellValue:function(e){return n._callCellValue(e)},rangeValue:function(e,t){return n._callRangeValue(e,t)}},n.variables=Object.create(null),n.functions=Object.create(null),n.setVariable("TRUE",!0).setVariable("FALSE",!1).setVariable("NULL",null),n}return a(t,e),t.prototype.parse=function(e){var t=null,n=null;try{t=""===e?"":this.parser.parse(e)}catch(e){var r=(0,g.default)(e.message);n=r||(0,g.default)(p.ERROR)}return t instanceof Error&&(n=(0,g.default)(t.message)||(0,g.default)(p.ERROR),t=null),{error:n,result:t}},t.prototype.setVariable=function(e,t){return this.variables[e]=t,this},t.prototype.getVariable=function(e){return this.variables[e]},t.prototype._callVariable=function(e){var t=this.getVariable(e);if(this.emit("callVariable",e,function(e){void 0!==e&&(t=e)}),void 0===t)throw Error(p.ERROR_NAME);return t},t.prototype.setFunction=function(e,t){return this.functions[e]=t,this},t.prototype.getFunction=function(e){return this.functions[e]},t.prototype._callFunction=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=this.getFunction(e),r=void 0;return n&&(r=n(t)),this.emit("callFunction",e,t,function(e){void 0!==e&&(r=e)}),void 0===r?(0,c.default)(e,t):r},t.prototype._callCellValue=function(e){e=e.toUpperCase();var t=(0,v.extractLabel)(e),n=t[0],r=t[1],o=void 0;return this.emit("callCellValue",{label:e,row:n,column:r},function(e){o=e}),o},t.prototype._callRangeValue=function(e,t){e=e.toUpperCase(),t=t.toUpperCase();var n=(0,v.extractLabel)(e),r=n[0],o=n[1],i=(0,v.extractLabel)(t),a=i[0],s=i[1],l={},u={};r.index<=a.index?(l.row=r,u.row=a):(l.row=a,u.row=r),o.index<=s.index?(l.column=o,u.column=s):(l.column=s,u.column=o),l.label=(0,v.toLabel)(l.row,l.column),u.label=(0,v.toLabel)(u.row,u.column);var c=[];return this.emit("callRangeValue",l,u,function(){c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]}),c},t.prototype._throwError=function(e){if((0,p.isValidStrict)(e))throw Error(e);throw Error(p.ERROR)},t}(l.default)},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){function r(){o.off(e,r),t.apply(n,arguments)}var o=this;return r._=t,this.on(e,r,n)},emit:function(e){var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;for(r;r1&&void 0!==arguments[1]?arguments[1]:[];if(e=e.toUpperCase(),!D[e])throw Error(I.ERROR_NAME);return D[e].apply(D,t)}function i(e,t){Array.isArray(e)||(e=[e.toUpperCase()]),e.forEach(function(e){D[e]=t.isFactory?t(e):t})}t.__esModule=!0,t.default=o,t.registerOperation=i;var a=n(20),s=r(a),l=n(21),u=r(l),c=n(22),f=r(c),h=n(23),d=r(h),p=n(24),g=r(p),v=n(33),m=r(v),y=n(34),w=r(y),b=n(35),C=r(b),_=n(36),E=r(_),O=n(37),S=r(O),T=n(38),R=r(T),M=n(39),k=r(M),N=n(40),A=r(N),I=n(2),D=Object.create(null);i(s.default.SYMBOL,s.default),i(u.default.SYMBOL,u.default),i(f.default.SYMBOL,f.default),i(d.default.SYMBOL,d.default),i(A.default.SYMBOL,A.default),i(g.default.SYMBOL,g.default),i(m.default.SYMBOL,m.default),i(w.default.SYMBOL,w.default),i(C.default.SYMBOL,C.default),i(E.default.SYMBOL,E.default),i(R.default.SYMBOL,R.default),i(k.default.SYMBOL,k.default),i(S.default.SYMBOL,S.default)},function(e,t,n){"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;rr)i=o(n,r,e(a.abs(n)),t(a.abs(n)),-1);else{for(l=2*a.floor((r+a.floor(a.sqrt(40*r)))/2),u=0,f=i=c=0,h=1,s=l;s>0;s--)d=s*p*h-f,f=h,h=d,a.abs(h)>1e10&&(h*=1e-10,f*=1e-10,i*=1e-10,c*=1e-10),u&&(c+=h),u=!u,s==r&&(i=f);c=2*c-h,i/=c}return n<0&&r%2?-i:i}}(),l=function(){function e(e){var t,i,f,h=e*e,d=e-.785398164;return e<8?(i=r(n,h),f=r(o,h),t=i/f+c*s(e,0)*a.log(e)):(h=64/h,i=r(l,h),f=r(u,h),t=a.sqrt(c/e)*(a.sin(d)*i+a.cos(d)*f*8/e)),t}function t(e){var t,n,o,i=e*e,l=e-2.356194491;return e<8?(n=e*r(f,i),o=r(h,i),t=n/o+c*(s(e,1)*a.log(e)-1/e)):(i=64/i,n=r(d,i),o=r(p,i),t=a.sqrt(c/e)*(a.sin(l)*n+a.cos(l)*o*8/e)),t}var n=[-2957821389,7062834065,-512359803.6,10879881.29,-86327.92757,228.4622733].reverse(),o=[40076544269,745249964.8,7189466.438,47447.2647,226.1030244,1].reverse(),l=[1,-.001098628627,2734510407e-14,-2073370639e-15,2.093887211e-7].reverse(),u=[-.01562499995,.0001430488765,-6911147651e-15,7.621095161e-7,-9.34945152e-8].reverse(),c=.636619772,f=[-4900604943e3,127527439e4,-51534381390,734926455.1,-4237922.726,8511.937935].reverse(),h=[249958057e5,424441966400,3733650367,22459040.02,102042.605,354.9632885,1].reverse(),d=[1,.00183105,-3516396496e-14,2457520174e-15,-2.40337019e-7].reverse(),p=[.04687499995,-.0002002690873,8449199096e-15,-8.8228987e-7,1.05787412e-7].reverse();return i(e,t,"BESSELY",1,-1)}(),u=function(){function e(e){return e<=3.75?r(n,e*e/14.0625):a.exp(a.abs(e))/a.sqrt(a.abs(e))*r(o,3.75/a.abs(e))}function t(e){return e<3.75?e*r(i,e*e/14.0625):(e<0?-1:1)*a.exp(a.abs(e))/a.sqrt(a.abs(e))*r(s,3.75/a.abs(e))}var n=[1,3.5156229,3.0899424,1.2067492,.2659732,.0360768,.0045813].reverse(),o=[.39894228,.01328592,.00225319,-.00157565,.00916281,-.02057706,.02635537,-.01647633,.00392377].reverse(),i=[.5,.87890594,.51498869,.15084934,.02658733,.00301532,32411e-8].reverse(),s=[.39894228,-.03988024,-.00362018,.00163801,-.01031555,.02282967,-.02895312,.01787654,-.00420059].reverse();return function n(r,o){if(0===(o=Math.round(o)))return e(r);if(1==o)return t(r);if(o<0)throw"BESSELI Order ("+o+") must be nonnegative";if(0===a.abs(r))return 0;var i,s,l,u,c,f,h=2/a.abs(r);for(l=2*a.round((o+a.round(a.sqrt(40*o)))/2),u=i=0,c=1,s=l;s>0;s--)f=s*h*c+u,u=c,c=f,a.abs(c)>1e10&&(c*=1e-10,u*=1e-10,i*=1e-10),s==o&&(i=u);return i*=n(r,0)/c,r<0&&o%2?-i:i}}(),c=function(){function e(e){return e<=2?-a.log(e/2)*u(e,0)+r(n,e*e/4):a.exp(-e)/a.sqrt(e)*r(o,2/e)}function t(e){return e<=2?a.log(e/2)*u(e,1)+1/e*r(s,e*e/4):a.exp(-e)/a.sqrt(e)*r(l,2/e)}var n=[-.57721566,.4227842,.23069756,.0348859,.00262698,1075e-7,74e-7].reverse(),o=[1.25331414,-.07832358,.02189568,-.01062446,.00587872,-.0025154,53208e-8].reverse(),s=[1,.15443144,-.67278579,-.18156897,-.01919402,-.00110404,-4686e-8].reverse(),l=[1.25331414,.23498619,-.0365562,.01504268,-.00780353,.00325614,-68245e-8].reverse();return i(e,t,"BESSELK",2,1)}();t.besselj=s,t.bessely=l,t.besseli=u,t.besselk=c},function(module,exports,__webpack_require__){function compact(e){var t=[];return utils.arrayEach(e,function(e){e&&t.push(e)}),t}function findResultIndex(database,criterias){for(var matches={},i=1;imaxCriteriaLength&&(maxCriteriaLength=criterias[i].length);for(var k=1;k1?error.num:o[r[0]]},exports.DMAX=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return error.value;var r=findResultIndex(e,n),o=[];if("string"==typeof t){var i=exports.FINDFIELD(e,t);o=utils.rest(e[i])}else o=utils.rest(e[t]);var a=o[r[0]];return utils.arrayEach(r,function(e){ao[e]&&(a=o[e])}),a},exports.DPRODUCT=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return error.value;var r=findResultIndex(e,n),o=[];if("string"==typeof t){var i=exports.FINDFIELD(e,t);o=utils.rest(e[i])}else o=utils.rest(e[t]);var a=[];utils.arrayEach(r,function(e){a.push(o[e])}),a=compact(a);var s=1;return utils.arrayEach(a,function(e){s*=e}),s},exports.DSTDEV=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return error.value;var r=findResultIndex(e,n),o=[];if("string"==typeof t){var i=exports.FINDFIELD(e,t);o=utils.rest(e[i])}else o=utils.rest(e[t]);var a=[];return utils.arrayEach(r,function(e){a.push(o[e])}),a=compact(a),stats.STDEV.S(a)},exports.DSTDEVP=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return error.value;var r=findResultIndex(e,n),o=[];if("string"==typeof t){var i=exports.FINDFIELD(e,t);o=utils.rest(e[i])}else o=utils.rest(e[t]);var a=[];return utils.arrayEach(r,function(e){a.push(o[e])}),a=compact(a),stats.STDEV.P(a)},exports.DSUM=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return error.value;var r=findResultIndex(e,n),o=[];if("string"==typeof t){var i=exports.FINDFIELD(e,t);o=utils.rest(e[i])}else o=utils.rest(e[t]);var a=[];return utils.arrayEach(r,function(e){a.push(o[e])}),maths.SUM(a)},exports.DVAR=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return error.value;var r=findResultIndex(e,n),o=[];if("string"==typeof t){var i=exports.FINDFIELD(e,t);o=utils.rest(e[i])}else o=utils.rest(e[t]);var a=[];return utils.arrayEach(r,function(e){a.push(o[e])}),stats.VAR.S(a)},exports.DVARP=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return error.value;var r=findResultIndex(e,n),o=[];if("string"==typeof t){var i=exports.FINDFIELD(e,t);o=utils.rest(e[i])}else o=utils.rest(e[t]);var a=[];return utils.arrayEach(r,function(e){a.push(o[e])}),stats.VAR.P(a)}},function(e,t,n){var r=n(0),o=n(1),i=n(7);t.AND=function(){for(var e=o.flatten(arguments),t=!0,n=0;n254?r.value:arguments.length0){var t=arguments[0],n=arguments.length-1,o=Math.floor(n/2),i=!1,a=n%2!=0,s=n%2==0?null:arguments[arguments.length-1];if(o)for(var l=0;la)return i.num;if(0!==l&&1!==l)return i.num;var u=t.PMT(e,n,r,0,l),c=0;1===o&&0===l&&(c=-r,o++);for(var f=o;f<=a;f++)c+=1===l?t.FV(e,f-2,u,r,1)-u:t.FV(e,f-1,u,r,0);return c*=e},t.CUMPRINC=function(e,n,r,o,a,l){if(e=s.parseNumber(e),n=s.parseNumber(n),r=s.parseNumber(r),s.anyIsError(e,n,r))return i.value;if(e<=0||n<=0||r<=0)return i.num;if(o<1||a<1||o>a)return i.num;if(0!==l&&1!==l)return i.num;var u=t.PMT(e,n,r,0,l),c=0;1===o&&(c=0===l?u+r*e:u,o++);for(var f=o;f<=a;f++)c+=l>0?u-(t.FV(e,f-2,u,r,1)-u)*e:u-t.FV(e,f-1,u,r,0)*e;return c},t.DB=function(e,t,n,r,o){if(o=void 0===o?12:o,e=s.parseNumber(e),t=s.parseNumber(t),n=s.parseNumber(n),r=s.parseNumber(r),o=s.parseNumber(o),s.anyIsError(e,t,n,r,o))return i.value;if(e<0||t<0||n<0||r<0)return i.num;if(-1===[1,2,3,4,5,6,7,8,9,10,11,12].indexOf(o))return i.num;if(r>n)return i.num;if(t>=e)return 0;for(var a=(1-Math.pow(t/e,1/n)).toFixed(3),l=e*a*o/12,u=l,c=0,f=r===n?n-1:r,h=2;h<=f;h++)c=(e-u)*a,u+=c;return 1===r?l:r===n?(e-u)*a:c},t.DDB=function(e,t,n,r,o){if(o=void 0===o?2:o,e=s.parseNumber(e),t=s.parseNumber(t),n=s.parseNumber(n),r=s.parseNumber(r),o=s.parseNumber(o),s.anyIsError(e,t,n,r,o))return i.value;if(e<0||t<0||n<0||r<0||o<=0)return i.num;if(r>n)return i.num;if(t>=e)return 0;for(var a=0,l=0,u=1;u<=r;u++)l=Math.min(o/n*(e-a),e-t-a),a+=l;return l},t.DISC=function(){throw new Error("DISC is not implemented")},t.DOLLARDE=function(e,t){if(e=s.parseNumber(e),t=s.parseNumber(t),s.anyIsError(e,t))return i.value;if(t<0)return i.num;if(t>=0&&t<1)return i.div0;t=parseInt(t,10);var n=parseInt(e,10);n+=e%1*Math.pow(10,Math.ceil(Math.log(t)/Math.LN10))/t;var r=Math.pow(10,Math.ceil(Math.log(t)/Math.LN2)+1);return n=Math.round(n*r)/r},t.DOLLARFR=function(e,t){if(e=s.parseNumber(e),t=s.parseNumber(t),s.anyIsError(e,t))return i.value;if(t<0)return i.num;if(t>=0&&t<1)return i.div0;t=parseInt(t,10);var n=parseInt(e,10);return n+=e%1*Math.pow(10,-Math.ceil(Math.log(t)/Math.LN10))*t},t.DURATION=function(){throw new Error("DURATION is not implemented")},t.EFFECT=function(e,t){return e=s.parseNumber(e),t=s.parseNumber(t),s.anyIsError(e,t)?i.value:e<=0||t<1?i.num:(t=parseInt(t,10),Math.pow(1+e/t,t)-1)},t.FV=function(e,t,n,r,o){if(r=r||0,o=o||0,e=s.parseNumber(e),t=s.parseNumber(t),n=s.parseNumber(n),r=s.parseNumber(r),o=s.parseNumber(o),s.anyIsError(e,t,n,r,o))return i.value;var a;if(0===e)a=r+n*t;else{var l=Math.pow(1+e,t);a=1===o?r*l+n*(1+e)*(l-1)/e:r*l+n*(l-1)/e}return-a},t.FVSCHEDULE=function(e,t){if(e=s.parseNumber(e),t=s.parseNumberArray(s.flatten(t)),s.anyIsError(e,t))return i.value;for(var n=t.length,r=e,o=0;o0&&(r=!0),e[a]<0&&(o=!0);if(!r||!o)return i.num;t=void 0===t?.1:t;var l,u,c,f=t,h=!0;do{c=function(e,t,n){for(var r=n+1,o=e[0],i=1;i1e-10&&Math.abs(c)>1e-10}while(h);return f},t.ISPMT=function(e,t,n,r){return e=s.parseNumber(e),t=s.parseNumber(t),n=s.parseNumber(n),r=s.parseNumber(r),s.anyIsError(e,t,n,r)?i.value:r*e*(t/n-1)},t.MDURATION=function(){throw new Error("MDURATION is not implemented")},t.MIRR=function(e,n,r){if(e=s.parseNumberArray(s.flatten(e)),n=s.parseNumber(n),r=s.parseNumber(r),s.anyIsError(e,n,r))return i.value;for(var o=e.length,a=[],l=[],u=0;u1e-10&&p<50;)g=(c*f-u*h)/(c-u),f=h,h=g,Math.abs(g)<1e-10?l=n*(1+e*g)+t*(1+g*o)*e+r:(d=Math.exp(e*Math.log(1+g)),l=n*d+t*(1/g+o)*(d-1)+r),u=c,c=l,++p;return g},t.RECEIVED=function(){throw new Error("RECEIVED is not implemented")},t.RRI=function(e,t,n){return e=s.parseNumber(e),t=s.parseNumber(t),n=s.parseNumber(n),s.anyIsError(e,t,n)?i.value:0===e||0===t?i.num:Math.pow(n/t,1/e)-1},t.SLN=function(e,t,n){return e=s.parseNumber(e),t=s.parseNumber(t),n=s.parseNumber(n),s.anyIsError(e,t,n)?i.value:0===n?i.num:(e-t)/n},t.SYD=function(e,t,n,r){return e=s.parseNumber(e),t=s.parseNumber(t),n=s.parseNumber(n),r=s.parseNumber(r),s.anyIsError(e,t,n,r)?i.value:0===n?i.num:r<1||r>n?i.num:(r=parseInt(r,10),(e-t)*(n-r+1)*2/(n*(n+1)))},t.TBILLEQ=function(e,t,n){return e=s.parseDate(e),t=s.parseDate(t),n=s.parseNumber(n),s.anyIsError(e,t,n)?i.value:n<=0?i.num:e>t?i.num:t-e>31536e6?i.num:365*n/(360-n*a.DAYS360(e,t,!1))},t.TBILLPRICE=function(e,t,n){return e=s.parseDate(e),t=s.parseDate(t),n=s.parseNumber(n),s.anyIsError(e,t,n)?i.value:n<=0?i.num:e>t?i.num:t-e>31536e6?i.num:100*(1-n*a.DAYS360(e,t,!1)/360)},t.TBILLYIELD=function(e,t,n){return e=s.parseDate(e),t=s.parseDate(t),n=s.parseNumber(n),s.anyIsError(e,t,n)?i.value:n<=0?i.num:e>t?i.num:t-e>31536e6?i.num:360*(100-n)/(n*a.DAYS360(e,t,!1))},t.VDB=function(){throw new Error("VDB is not implemented")},t.XNPV=function(e,t,n){if(e=s.parseNumber(e),t=s.parseNumberArray(s.flatten(t)),n=s.parseDateArray(s.flatten(n)),s.anyIsError(e,t,n))return i.value;for(var r=0,o=0;oi&&(o=a+1,i=t[a]):(o=a+1,i=t[a]))}else if(0===n){if("string"==typeof e){if(e=e.replace(/\?/g,"."),t[a].toLowerCase().match(e.toLowerCase()))return a+1}else if(t[a]===e)return a+1}else if(-1===n){if(t[a]===e)return a+1;t[a]>e&&(i?t[a]t}t.__esModule=!0,t.default=r,r.SYMBOL=t.SYMBOL=">"},function(e,t,n){"use strict";function r(e,t){return e>=t}t.__esModule=!0,t.default=r,r.SYMBOL=t.SYMBOL=">="},function(e,t,n){"use strict";function r(e,t){return e1?t-1:0),r=1;r1?t-1:0),r=1;r"},function(e,t,n){"use strict";function r(e,t){var n=Math.pow((0,o.toNumber)(e),(0,o.toNumber)(t));if(isNaN(n))throw Error(i.ERROR_VALUE);return n}t.__esModule=!0,t.SYMBOL=void 0,t.default=r;var o=n(3),i=n(2);r.SYMBOL=t.SYMBOL="^"},function(module,exports,__webpack_require__){(function(module,process){var grammarParser=function(){function Parser(){this.yy={}}var o=function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},$V0=[1,5],$V1=[1,8],$V2=[1,6],$V3=[1,7],$V4=[1,9],$V5=[1,14],$V6=[1,15],$V7=[1,16],$V8=[1,12],$V9=[1,13],$Va=[1,17],$Vb=[1,19],$Vc=[1,20],$Vd=[1,21],$Ve=[1,22],$Vf=[1,23],$Vg=[1,24],$Vh=[1,25],$Vi=[1,26],$Vj=[1,27],$Vk=[1,28],$Vl=[5,9,10,11,13,14,15,16,17,18,19,20,29,30],$Vm=[5,9,10,11,13,14,15,16,17,18,19,20,29,30,32],$Vn=[5,9,10,11,13,14,15,16,17,18,19,20,29,30,34],$Vo=[5,10,11,13,14,15,16,17,29,30],$Vp=[5,10,13,14,15,16,29,30],$Vq=[5,10,11,13,14,15,16,17,18,19,29,30],$Vr=[13,29,30],parser={trace:function(){},yy:{},symbols_:{error:2,expressions:3,expression:4,EOF:5,variableSequence:6,number:7,STRING:8,"&":9,"=":10,"+":11,"(":12,")":13,"<":14,">":15,NOT:16,"-":17,"*":18,"/":19,"^":20,FUNCTION:21,expseq:22,cell:23,ABSOLUTE_CELL:24,RELATIVE_CELL:25,MIXED_CELL:26,":":27,ARRAY:28,";":29,",":30,VARIABLE:31,DECIMAL:32,NUMBER:33,"%":34,ERROR:35,$accept:0,$end:1},terminals_:{5:"EOF",8:"STRING",9:"&",10:"=",11:"+",12:"(",13:")",14:"<",15:">",16:"NOT",17:"-",18:"*",19:"/",20:"^",21:"FUNCTION",24:"ABSOLUTE_CELL",25:"RELATIVE_CELL",26:"MIXED_CELL",27:":",28:"ARRAY",29:";",30:",",31:"VARIABLE",32:"DECIMAL",33:"NUMBER",34:"%",35:"ERROR"},productions_:[0,[3,2],[4,1],[4,1],[4,1],[4,3],[4,3],[4,3],[4,3],[4,4],[4,4],[4,4],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,2],[4,2],[4,3],[4,4],[4,1],[4,1],[4,2],[23,1],[23,1],[23,1],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[22,1],[22,1],[22,3],[22,3],[6,1],[6,3],[7,1],[7,3],[7,2],[2,1]],performAction:function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 1:return $$[$0-1];case 2:this.$=yy.callVariable($$[$0][0]);break;case 3:this.$=yy.toNumber($$[$0]);break;case 4:this.$=yy.trimEdges($$[$0]);break;case 5:this.$=yy.evaluateByOperator("&",[$$[$0-2],$$[$0]]);break;case 6:this.$=yy.evaluateByOperator("=",[$$[$0-2],$$[$0]]);break;case 7:this.$=yy.evaluateByOperator("+",[$$[$0-2],$$[$0]]);break;case 8:this.$=$$[$0-1];break;case 9:this.$=yy.evaluateByOperator("<=",[$$[$0-3],$$[$0]]);break;case 10:this.$=yy.evaluateByOperator(">=",[$$[$0-3],$$[$0]]);break;case 11:this.$=yy.evaluateByOperator("<>",[$$[$0-3],$$[$0]]);break;case 12:this.$=yy.evaluateByOperator("NOT",[$$[$0-2],$$[$0]]);break;case 13:this.$=yy.evaluateByOperator(">",[$$[$0-2],$$[$0]]);break;case 14:this.$=yy.evaluateByOperator("<",[$$[$0-2],$$[$0]]);break;case 15:this.$=yy.evaluateByOperator("-",[$$[$0-2],$$[$0]]);break;case 16:this.$=yy.evaluateByOperator("*",[$$[$0-2],$$[$0]]);break;case 17:this.$=yy.evaluateByOperator("/",[$$[$0-2],$$[$0]]);break;case 18:this.$=yy.evaluateByOperator("^",[$$[$0-2],$$[$0]]);break;case 19:var n1=yy.invertNumber($$[$0]);this.$=n1,isNaN(this.$)&&(this.$=0);break;case 20:var n1=yy.toNumber($$[$0]);this.$=n1,isNaN(this.$)&&(this.$=0);break;case 21:this.$=yy.callFunction($$[$0-2]);break;case 22:this.$=yy.callFunction($$[$0-3],$$[$0-1]);break;case 26:case 27:case 28:this.$=yy.cellValue($$[$0]);break;case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:this.$=yy.rangeValue($$[$0-2],$$[$0]);break;case 38:case 42:this.$=[$$[$0]];break;case 39:var result=[],arr=eval("["+yytext+"]");arr.forEach(function(e){result.push(e)}),this.$=result;break;case 40:case 41:$$[$0-2].push($$[$0]),this.$=$$[$0-2];break;case 43:this.$=Array.isArray($$[$0-2])?$$[$0-2]:[$$[$0-2]],this.$.push($$[$0]);break;case 44:this.$=$$[$0];break;case 45:this.$=1*($$[$0-2]+"."+$$[$0]);break;case 46:this.$=.01*$$[$0-1];break;case 47:this.$=yy.throwError($$[$0])}},table:[{2:11,3:1,4:2,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{1:[3]},{5:[1,18],9:$Vb,10:$Vc,11:$Vd,14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk},o($Vl,[2,2],{32:[1,29]}),o($Vl,[2,3],{34:[1,30]}),o($Vl,[2,4]),{2:11,4:31,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:32,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:33,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{12:[1,34]},o($Vl,[2,23]),o($Vl,[2,24],{2:35,35:$Va}),o($Vm,[2,42]),o($Vn,[2,44],{32:[1,36]}),o($Vl,[2,26],{27:[1,37]}),o($Vl,[2,27],{27:[1,38]}),o($Vl,[2,28],{27:[1,39]}),o([5,9,10,11,13,14,15,16,17,18,19,20,29,30,35],[2,47]),{1:[2,1]},{2:11,4:40,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:41,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:42,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:45,6:3,7:4,8:$V0,10:[1,43],11:$V1,12:$V2,15:[1,44],17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:47,6:3,7:4,8:$V0,10:[1,46],11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:48,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:49,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:50,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:51,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:52,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{31:[1,53]},o($Vn,[2,46]),{9:$Vb,10:$Vc,11:$Vd,13:[1,54],14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk},o($Vo,[2,19],{9:$Vb,18:$Vi,19:$Vj,20:$Vk}),o($Vo,[2,20],{9:$Vb,18:$Vi,19:$Vj,20:$Vk}),{2:11,4:57,6:3,7:4,8:$V0,11:$V1,12:$V2,13:[1,55],17:$V3,21:$V4,22:56,23:10,24:$V5,25:$V6,26:$V7,28:[1,58],31:$V8,33:$V9,35:$Va},o($Vl,[2,25]),{33:[1,59]},{24:[1,60],25:[1,61],26:[1,62]},{24:[1,63],25:[1,64],26:[1,65]},{24:[1,66],25:[1,67],26:[1,68]},o($Vl,[2,5]),o([5,10,13,29,30],[2,6],{9:$Vb,11:$Vd,14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vo,[2,7],{9:$Vb,18:$Vi,19:$Vj,20:$Vk}),{2:11,4:69,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:70,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},o($Vp,[2,14],{9:$Vb,11:$Vd,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),{2:11,4:71,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},o($Vp,[2,13],{9:$Vb,11:$Vd,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o([5,10,13,16,29,30],[2,12],{9:$Vb,11:$Vd,14:$Ve,15:$Vf,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vo,[2,15],{9:$Vb,18:$Vi,19:$Vj,20:$Vk}),o($Vq,[2,16],{9:$Vb,20:$Vk}),o($Vq,[2,17],{9:$Vb,20:$Vk}),o([5,10,11,13,14,15,16,17,18,19,20,29,30],[2,18],{9:$Vb}),o($Vm,[2,43]),o($Vl,[2,8]),o($Vl,[2,21]),{13:[1,72],29:[1,73],30:[1,74]},o($Vr,[2,38],{9:$Vb,10:$Vc,11:$Vd,14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vr,[2,39]),o($Vn,[2,45]),o($Vl,[2,29]),o($Vl,[2,30]),o($Vl,[2,31]),o($Vl,[2,32]),o($Vl,[2,33]),o($Vl,[2,34]),o($Vl,[2,35]),o($Vl,[2,36]),o($Vl,[2,37]),o($Vp,[2,9],{9:$Vb,11:$Vd,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vp,[2,11],{9:$Vb,11:$Vd,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vp,[2,10],{9:$Vb,11:$Vd,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vl,[2,22]),{2:11,4:75,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:76,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},o($Vr,[2,40],{9:$Vb,10:$Vc,11:$Vd,14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vr,[2,41],{9:$Vb,10:$Vc,11:$Vd,14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk})],defaultActions:{18:[2,1]},parseError:function(e,t){function n(e,t){this.message=e,this.hash=t}if(!t.recoverable)throw n.prototype=Error,new n(e,t);this.trace(e)},parse:function(e){function t(e){for(var t=r.length-1,n=0;;){if(f.toString()in a[e])return n;if(0===e||t<2)return!1;t-=2,e=r[t],++n}}var n=this,r=[0],o=[null],i=[],a=this.table,s="",l=0,u=0,c=0,f=2,h=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(e,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var v=d.yylloc;i.push(v);var m=d.options&&d.options.ranges;this.parseError="function"==typeof p.yy.parseError?p.yy.parseError:Object.getPrototypeOf(this).parseError;for(var y,w,b,C,_,E,O,S,T,R=function(){var e;return e=d.lex()||1,"number"!=typeof e&&(e=n.symbols_[e]||e),e},M={};;){if(b=r[r.length-1],this.defaultActions[b]?C=this.defaultActions[b]:(null!==y&&void 0!==y||(y=R()),C=a[b]&&a[b][y]),void 0===C||!C.length||!C[0]){var k,N="";if(c)1!==w&&(k=t(b));else{k=t(b),T=[];for(E in a[b])this.terminals_[E]&&E>f&&T.push("'"+this.terminals_[E]+"'");N=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==y?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(N,{text:d.match,token:this.terminals_[y]||y,line:d.yylineno,loc:v,expected:T,recoverable:!1!==k})}if(3==c){if(1===y||1===w)throw new Error(N||"Parsing halted while starting to recover from another error.");u=d.yyleng,s=d.yytext,l=d.yylineno,v=d.yylloc,y=R()}if(!1===k)throw new Error(N||"Parsing halted. No suitable error recovery rule available.");!function(e){r.length=r.length-2*e,o.length=o.length-e,i.length=i.length-e}(k),w=y==f?null:y,y=f,b=r[r.length-1],C=a[b]&&a[b][f],c=3}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+y);switch(C[0]){case 1:r.push(y),o.push(d.yytext),i.push(d.yylloc),r.push(C[1]),y=null,w?(y=w,w=null):(u=d.yyleng,s=d.yytext,l=d.yylineno,v=d.yylloc,c>0&&c--);break;case 2:if(O=this.productions_[C[1]][1],M.$=o[o.length-O],M._$={first_line:i[i.length-(O||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(O||1)].first_column,last_column:i[i.length-1].last_column},m&&(M._$.range=[i[i.length-(O||1)].range[0],i[i.length-1].range[1]]),void 0!==(_=this.performAction.apply(M,[s,u,l,p.yy,C[1],o,i].concat(h))))return _;O&&(r=r.slice(0,-1*O*2),o=o.slice(0,-1*O),i=i.slice(0,-1*O)),r.push(this.productions_[C[1]][0]),o.push(M.$),i.push(M._$),S=a[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0}},lexer=function(){return{EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var o=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var n,r,o;if(this.options.backtrack_lexer&&(o={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(o.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var i in o)this[i]=o[i];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),i=0;it[0].length)){if(t=n,r=i,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,o[i])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,o[r]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,n,r){switch(n){case 0:break;case 1:case 2:return 8;case 3:return 21;case 4:return 35;case 5:return 24;case 6:case 7:return 26;case 8:return 25;case 9:return 21;case 10:case 11:return 31;case 12:return 33;case 13:return 28;case 14:return 9;case 15:return" ";case 16:return 32;case 17:return 27;case 18:return 29;case 19:return 30;case 20:return 18;case 21:return 19;case 22:return 17;case 23:return 11;case 24:return 20;case 25:return 12;case 26:return 13;case 27:return 15;case 28:return 14;case 29:return 16;case 30:return'"';case 31:return"'";case 32:return"!";case 33:return 10;case 34:return 34;case 35:return"#";case 36:return 5}},rules:[/^(?:\s+)/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:[A-Za-z]{1,}[A-Za-z_0-9\.]+(?=[(]))/,/^(?:#[A-Z0-9\/]+(!|\?)?)/,/^(?:\$[A-Za-z]+\$[0-9]+)/,/^(?:\$[A-Za-z]+[0-9]+)/,/^(?:[A-Za-z]+\$[0-9]+)/,/^(?:[A-Za-z]+[0-9]+)/,/^(?:[A-Za-z\.]+(?=[(]))/,/^(?:[A-Za-z]{1,}[A-Za-z_0-9]+)/,/^(?:[A-Za-z_]+)/,/^(?:[0-9]+)/,/^(?:\[(.*)?\])/,/^(?:&)/,/^(?: )/,/^(?:[.])/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\/)/,/^(?:-)/,/^(?:\+)/,/^(?:\^)/,/^(?:\()/,/^(?:\))/,/^(?:>)/,/^(?:<)/,/^(?:NOT\b)/,/^(?:")/,/^(?:')/,/^(?:!)/,/^(?:=)/,/^(?:%)/,/^(?:[#])/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],inclusive:!0}}}}();return parser.lexer=lexer,Parser.prototype=parser,parser.Parser=Parser,new Parser}();exports.parser=grammarParser,exports.Parser=grammarParser.Parser,exports.parse=function(){return grammarParser.parse.apply(grammarParser,arguments)},void 0!==module&&__webpack_require__.c[__webpack_require__.s]===module&&exports.main(process.argv.slice(1))}).call(exports,__webpack_require__(42)(module),__webpack_require__(10))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e=e.substring(t,e.length-t)}t.__esModule=!0,t.trimEdges=r}])})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return(0,s.arrayEach)(this.cells,function(e){null!=n&&t._translateCell(e,"row",n,o.row),null!=r&&t._translateCell(e,"column",r,o.column)}),this}},{key:"toString",value:function(){var e=this,t=this.expression.replace(v,function(t,n,r){var o=-1===t.indexOf(":"),i=t,s=t,l=null;o&&(s=h.test(n)?n:r);var u=e._searchCell(s);return u&&(l=u.refError?(0,a.error)(a.ERROR_REF):u.toLabel(),i=o?t.replace(s,l):l),i});return t.startsWith("=")||(t="="+t),t}},{key:"_translateCell",value:function(e,t,n,r){var i=e.start,a=e.end,s=i[t].index,l=a[t].index,u=n,c=n,f=!1;if(this.customModifier){var h=this.customModifier(e,t,n,r),d=o(h,3);u=d[0],c=d[1],f=d[2]}else i[t].isAbsolute&&(u=0),a[t].isAbsolute&&(c=0);u&&!f&&(s+u<0&&(f=!0),i[t].index=Math.max(s+u,0)),c&&!f&&(l+c<0&&(f=!0),a[t].index=Math.max(l+c,0)),f&&(e.refError=!0)}},{key:"_extractCells",value:function(){var e=this,t=this.expression.match(p);t&&(0,s.arrayEach)(t,function(t){if(t=t.match(d)){var n=(0,a.extractLabel)(t[0]),r=o(n,2),i=r[0],s=r[1];e.cells.push(e._createCell({row:i,column:s},{row:i,column:s},t[0]))}})}},{key:"_extractCellsRange",value:function(){var e=this,t=this.expression.match(g);t&&(0,s.arrayEach)(t,function(t){var n=t.split(":"),r=o(n,2),i=r[0],s=r[1],l=(0,a.extractLabel)(i),u=o(l,2),c=u[0],f=u[1],h=(0,a.extractLabel)(s),d=o(h,2);e.cells.push(e._createCell({row:c,column:f},{row:d[0],column:d[1]},t))})}},{key:"_searchCell",value:function(e){var t=(0,s.arrayFilter)(this.cells,function(t){return t.origLabel===e});return o(t,1)[0]||null}},{key:"_createCell",value:function(e,t,n){return{start:e,end:t,origLabel:n,type:-1===n.indexOf(":")?"cell":"range",refError:!1,toLabel:function(){var e=(0,a.toLabel)(this.start.row,this.start.column);return"range"===this.type&&(e+=":"+(0,a.toLabel)(this.end.row,this.end.column)),e}}}}]),e}();(0,l.mixin)(m,c.default),t.default=m},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(71),o=Math.max,i=Math.min;e.exports=function(e,t){return e=r(e),e<0?o(e+t,0):i(e,t)}},function(e,t,n){var r=n(37);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(39),o=n(172),i=n(173),a=n(21),s=n(30),l=n(174),u={},c={},t=e.exports=function(e,t,n,f,h){var d,p,g,v,m=h?function(){return e}:l(e),y=r(n,f,t?2:1),w=0;if("function"!=typeof m)throw TypeError(e+" is not iterable!");if(i(m)){for(d=s(e.length);d>w;w++)if((v=t?y(a(p=e[w])[0],p[1]):y(e[w]))===u||v===c)return v}else for(g=m.call(e);!(p=g.next()).done;)if((v=o(g,y,p.value,t))===u||v===c)return v};t.BREAK=u,t.RETURN=c},function(e,t,n){"use strict";var r=n(16),o=n(6),i=n(37),a=n(73),s=n(41),l=n(76),u=n(75),c=n(13),f=n(28),h=n(96),d=n(61),p=n(483);e.exports=function(e,t,n,g,v,m){var y=r[e],w=y,b=v?"set":"add",C=w&&w.prototype,_={},E=function(e){var t=C[e];i(C,e,"delete"==e?function(e){return!(m&&!c(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(m&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return m&&!c(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof w&&(m||C.forEach&&!f(function(){(new w).entries().next()}))){var O=new w,S=O[b](m?{}:-0,1)!=O,T=f(function(){O.has(1)}),R=h(function(e){new w(e)}),M=!m&&f(function(){for(var e=new w,t=5;t--;)e[b](t,t);return!e.has(-0)});R||(w=t(function(t,n){u(t,w,e);var r=p(new y,t,w);return void 0!=n&&l(n,v,r[b],r),r}),w.prototype=C,C.constructor=w),(T||M)&&(E("delete"),E("has"),v&&E("get")),(M||S)&&E(b),m&&C.clear&&delete C.clear}else w=g.getConstructor(t,e,v,b),a(w.prototype,n),s.NEED=!0;return d(w,e),_[e]=w,o(o.G+o.W+o.F*(w!=y),_),m||g.setStrong(w,e,v),w}},function(e,t,n){var r=n(62),o=n(59),i=n(29),a=n(90),s=n(36),l=n(168),u=Object.getOwnPropertyDescriptor;t.f=n(27)?u:function(e,t){if(e=i(e),t=a(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return o(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(39),o=n(92),i=n(40),a=n(30),s=n(484);e.exports=function(e,t){var n=1==e,l=2==e,u=3==e,c=4==e,f=6==e,h=5==e||f,d=t||s;return function(t,s,p){for(var g,v,m=i(t),y=o(m),w=r(s,p,3),b=a(y.length),C=0,_=n?d(t,b):l?d(t,0):void 0;b>C;C++)if((h||C in y)&&(g=y[C],v=w(g,C,m),e))if(n)_[C]=v;else if(v)switch(e){case 3:return!0;case 5:return g;case 6:return C;case 2:_.push(g)}else if(c)return!1;return f?-1:u||c?c:_}}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var r=n(38),o=n(37),i=n(28),a=n(47),s=n(14);e.exports=function(e,t,n){var l=s(e),u=n(a,l,""[e]),c=u[0],f=u[1];i(function(){var t={};return t[l]=function(){return 7},7!=""[e](t)})&&(o(String.prototype,e,c),r(RegExp.prototype,l,2==t?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)}))}},function(e,t,n){"use strict";var r=n(54),o=n(178),i=n(60),a=n(29);e.exports=n(176)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):"keys"==t?o(0,n):"values"==t?o(0,e[n]):o(0,[n,e[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t,n){"use strict";function r(e){for(var t=e+1,n="",r=void 0;t>0;)r=(t-1)%d,n=String.fromCharCode(65+r)+n,t=parseInt((t-r)/d,10);return n}function o(e){var t=0;if(e)for(var n=0,r=e.length-1;n0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=[],o=void 0,i=void 0;for(o=0;o0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=[],o=void 0,i=void 0;for(o=0;o1&&void 0!==arguments[1]?arguments[1]:w;if(t!==w&&t!==b)throw new Error("The second argument is used internally only and cannot be overwritten.");var n=Array.isArray(e),o=t===w,i=d;if(n){var a=e[0];if(0===e.length)i=p;else if(o&&a instanceof c.CellRange)i=v;else if(o&&Array.isArray(a))i=r(a,b);else if(e.length>=2&&e.length<=4){var s=!e.some(function(e,t){return!y[t].includes(void 0===e?"undefined":u(e))});s&&(i=g)}}return i}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.keepDirection,r=void 0!==n&&n,o=t.propToCol;if(!m.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(t){var n=e===v,i=n?t.from.row:t[0],a=n?t.from.col:t[1],s=n?t.to.row:t[2],l=n?t.to.col:t[3];if("function"==typeof o&&("string"==typeof a&&(a=o(a)),"string"==typeof l&&(l=o(l))),(0,h.isUndefined)(s)&&(s=i),(0,h.isUndefined)(l)&&(l=a),!r){var u=i,c=a,f=s,d=l;i=Math.min(u,f),a=Math.min(c,d),s=Math.max(u,f),l=Math.max(c,d)}return[i,a,s,l]}}function i(e){var t=r(e);if(t===d||t===p)return[];var n=o(t),i=new Set;(0,f.arrayEach)(e,function(e){var t=n(e),r=l(t,4),o=r[1],a=r[3],s=a-o+1;(0,f.arrayEach)(Array.from(new Array(s),function(e,t){return o+t}),function(e){i.has(e)||i.add(e)})});var a=Array.from(i).sort(function(e,t){return e-t});return(0,f.arrayReduce)(a,function(e,t,n,r){return 0!==n&&t===r[n-1]+1?e[e.length-1][1]++:e.push([t,1]),e},[])}function a(e){var t=r(e);if(t===d||t===p)return[];var n=o(t),i=new Set;(0,f.arrayEach)(e,function(e){var t=n(e),r=l(t,3),o=r[0],a=r[2],s=a-o+1;(0,f.arrayEach)(Array.from(new Array(s),function(e,t){return o+t}),function(e){i.has(e)||i.add(e)})});var a=Array.from(i).sort(function(e,t){return e-t});return(0,f.arrayReduce)(a,function(e,t,n,r){return 0!==n&&t===r[n-1]+1?e[e.length-1][1]++:e.push([t,1]),e},[])}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;return"number"==typeof e&&e>=0&&e0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(o(this,"Map"),e);return t&&t.v},set:function(e,t){return r.def(o(this,"Map"),0===e?0:e,t)}},r,!0)},function(e,t,n){var r=n(13),o=n(16).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){var r=n(13);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(21),o=n(481),i=n(95),a=n(93)("IE_PROTO"),s=function(){},l=function(){var e,t=n(89)("iframe"),r=i.length;for(t.style.display="none",n(171).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("